e6801d6a07aec685a60ceb3677666d65201971ee
[gnulib.git] / ChangeLog
1 2007-01-21  Bruno Haible  <bruno@clisp.org>
2
3         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
4
5 2007-01-21  Bruno Haible  <bruno@clisp.org>
6
7         * modules/striconveha: New file.
8         * lib/striconveha.h: New file.
9         * lib/striconveha.c: New file.
10         * MODULES.html.sh (Internationalization functions): Add striconveha.
11         * lib/striconv.c (str_iconv): Optimize the case of an empty input
12         string.
13         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
14
15 2007-01-21  Bruno Haible  <bruno@clisp.org>
16
17         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
18         * lib/striconveh.c (str_iconveh): Likewise.
19
20 2007-01-21  Bruno Haible  <bruno@clisp.org>
21
22         * lib/striconveh.h (mem_iconveh): New declaration.
23         * lib/striconveh.c (mem_iconveh): New function.
24         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
25
26 2007-01-21  Bruno Haible  <bruno@clisp.org>
27
28         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
29
30         * lib/striconveh.h (mem_cd_iconveh): Change specification.
31         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
32         original result buffer.
33         (str_cd_iconveh): Update.
34         * tests/test-striconveh.c (main): Update.
35
36         * lib/striconv.h (mem_cd_iconv): Change specification.
37         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
38         result buffer.
39         (str_cd_iconv): Update.
40         * tests/test-striconv.c (main): Update.
41
42 2007-01-21  Bruno Haible  <bruno@clisp.org>
43
44         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
45
46 2007-01-20  Jim Meyering  <jim@meyering.net>
47
48         * lib/userspec.c (parse_with_separator): If a user or group string
49         starts with "+", skip the corresponding name-to-ID look-up, since
50         such a look-up must fail: user and group names may not include "+".
51
52 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
53
54         * lib/poll.c: Include sys/time.h and time.h unconditionally,
55         since we now assume the sys_time module.
56         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
57         check for sys/time.h; no longer needed.
58         * modules/poll (Depends-on): Depend on sys_time.
59
60 2007-01-18  Bruno Haible  <bruno@clisp.org>
61
62         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
63         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
64
65         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
66         gettimeofday.
67
68         * tests/test-gettimeofday.c: Include <time.h>.
69         (dummy): Remove variable.
70
71         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
72         gl_HEADER_SYS_TIME_H.
73         (gl_HEADER_SYS_TIME_H): New macro.
74
75         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
76         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
77         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
78         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
79         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
80         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
81         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
82         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
83         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
84         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
85         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
86
87         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
88         last change; it caused a compilation error when cross-compiling to
89         Cygwin.
90
91 2007-01-18  Jim Meyering  <jim@meyering.net>
92
93         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
94         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
95         than the race-prone "test -d sys || mkdir sys".
96         (configure.ac): Use AC_PROG_MKDIR_P.
97         * modules/sys_select: Likewise.
98         * modules/sys_socket: Likewise.
99         * modules/sys_time: Likewise.
100
101 2007-01-18  Eric Blake  <ebb9@byu.net>
102
103         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
104         replace gettimeofday.
105         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
106         name, to avoid infinite recursion.
107
108 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
109
110         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
111         module sys_time.
112         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
113         assume timespec.h defines struct timeval.
114         * lib/settime.c: Likewise.
115         * lib/utimens.c: Likewise.
116         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
117         since we now assume the gettimeofday module.
118         * lib/tempname.c (__gen_tempname): Likewise.
119         * lib/gettimeofday.h: Remove.
120         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
121         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
122         Include <time.h>, for 'time()'.
123         (localtime_buffer_addr): Also use this workaround if
124         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
125         to simplify the uses.  All uses changed.
126         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
127         that #undef is inside {}, and 'const' follows type name consistently.
128         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
129         (gettimeofday): Do not use the maximum possible value for
130         tv->tv_usec, since that might break usages other than ls.c.
131         Instead, we'll leave ls.c alone.  This undoes today's patch
132         by Bruno.  Add a compile-time warning for 1s-clock resolution;
133         we've never observed the problem but might as well keep the
134         canary.
135         * lib/nanosleep.c: Include timespec.h first, for interface check.
136         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
137         now assume the sys_time module.
138         * lib/tempname.c: Likewise.
139         * lib/timespec.h: Likewise.
140         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
141         needed.
142         * lib/strftime.c: Likewise.
143         * lib/timespec.h: Likewise.
144         * lib/posixtm.c: Include posixtm.h first, for interface check.
145         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
146         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
147         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
148         * lib/sys_time_.h: New file.
149         * lib/timespec.h (struct timespec): Use long int, not long.
150         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
151         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
152         Remove obsolescent call to AC_HEADER_TIME.
153         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
154         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
155         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
156         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
157         Likewise.
158         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
159         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
160         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
161         into the sys_time module.  Check for gettimeofday just once.
162         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
163         for gettimeofday signature to just check the signature.  Merely
164         compile it, since linking doesn't test signature.  Improve test for
165         whether gettimeofday.o is actually needed.
166         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
167         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
168         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
169         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
170         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
171         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
172         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
173         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
174         than worrying about sys/time.h.
175         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
176         Don't bother worrying about TIME_WITH_SYS_TIME.
177         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
178         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
179         * m4/sys_time_h.m4: New file.
180         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
181         Don't include sys/time.h.  Return from main rather than exiting.
182         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
183         all uses changed.
184         * modules/gethrxtime (Depends-on): Add sys_time.
185         * modules/gettime (Depends-on): Likewise.
186         * modules/gettimeofday (Depends-on): Likewise.
187         * modules/nanosleep (Depends-on): Likewise.
188         * modules/settime (Depends-on): Likewise.
189         * modules/tempname (Depends-on): Likewise.
190         * modules/utimens (Depends-on): Likewise.
191         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
192         (Include:) Change back to <sys/time.h>.
193         (Maintainer:) Add self.
194         * modules/sys_time: New file.
195         * modules/tempname (Depends-on): Add gettimeofday.
196         * tests/test-gettimeofday.c: Include <sys/time.h>
197         rather than gettimeofday.h.
198
199 2007-01-17  Bruno Haible  <bruno@clisp.org>
200
201         * gnulib-tool (func_get_license): Revert last patch. Instead, let
202         the license default to GPL.
203         (func_create_testdir): Don't complain if a module is LGPL and its
204         tests module depends on GPLed modules.
205
206 2007-01-17  Bruno Haible  <bruno@clisp.org>
207
208         * lib/gettimeofday.c (gettimeofday): Add code for the case
209         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
210         maximum possible value for tv->tv_usec, rather than the minimum one.
211
212 2005-10-08  Martin Lambers  <marlam@marlam.de>
213 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
214 2007-01-16  Bruno Haible  <bruno@clisp.org>
215
216         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
217         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
218         gl_FUNC_GETTIMEOFDAY.
219         (Include): Add gettimeofday.h.
220         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
221         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
222         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
223         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
224         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
225         * lib/gettimeofday.h: New file.
226         * lib/gettimeofday.c: Include <sys/timeb.h>.
227         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
228         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
229         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
230         fall back on time().
231
232         * tests/test-gettimeofday.c: New file.
233         * modules/gettimeofday-tests: New file.
234
235 2007-01-16  Eric Blake  <ebb9@byu.net>
236
237         * modules/fnmatch (Depends-on): Depend on wchar.
238         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
239         * m4/fnmatch.m4: Likewise.
240         * modules/mbchar (Makefile.am): Assume <wchar.h>.
241         * m4/mbchar.m4: Likewise.
242         * modules/mbswidth (Depends-on): Depend on wchar.
243         * lib/mbswidth.c: Assume <wchar.h>.
244         * m4/mbswidth.m4: Likewise.
245         * modules/quotearg (Depends-on): Depend on wchar.
246         * lib/quotearg.c: Assume <wchar.h>.
247         * m4/quotearg.m4: Likewise.
248         * modules/regex (Depends-on): Depend on wchar.
249         * lib/regex_internal.h: Assume <wchar.h>.
250         * m4/regex.m4: Likewise.
251         * modules/stdint (Depends-on): Depend on wchar.
252         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
253         * m4/stdint.m4: Likewise.
254         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
255         * modules/strftime (Depends-on): Depend on wchar.
256         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
257         * modules/strtol (Depends-on): Depend on wchar.
258         * lib/strtol.c: Assume <wchar.h>.
259         * modules/wcwidth (Depends-on): Depend on wchar.
260         * lib/wcwidth.h: Assume <wchar.h>.
261         * m4/wcwidth.m4: Likewise.
262
263 2007-01-16  Bruno Haible  <bruno@clisp.org>
264
265         * modules/csharpexec-script: New, created from...
266         * modules/csharpexec: ... this.
267
268 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
269
270         * modules/javaexec-script: New, created from...
271         * modules/javaexec: ... this.
272
273 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
274
275         * modules/poll (Dependencies): Add sys_select.
276
277 2007-01-15  Jim Meyering  <jim@meyering.net>
278
279         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
280         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
281         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
282         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
283
284 2007-01-15  Bruno Haible  <bruno@clisp.org>
285
286         * modules/striconveh: New file.
287         * lib/striconveh.h: New file.
288         * lib/striconveh.c: New file.
289         * MODULES.html.sh (Internationalization functions): Add striconveh.
290
291         * modules/striconveh-tests: New file.
292         * tests/test-striconveh.c: New file.
293
294 2007-01-15  Bruno Haible  <bruno@clisp.org>
295
296         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
297         not from GNU libiconv or GNU libc.
298
299 2007-01-15  Bruno Haible  <bruno@clisp.org>
300
301         * doc/gnulib-intro.texi (Copyright): Explain the different license
302         terms for module descriptions, autoconf macros, tests, documentation.
303
304 2007-01-14  Bruno Haible  <bruno@clisp.org>
305
306         * modules/striconv-tests: New file.
307         * tests/test-striconv.c: New file.
308
309 2007-01-14  Bruno Haible  <bruno@clisp.org>
310
311         * modules/iconv-tests: New file.
312         * tests/test-iconv.c: New file.
313
314 2007-01-14  Bruno Haible  <bruno@clisp.org>
315
316         * gnulib-tool (func_get_license): For test modules, use the license of
317         the main module.
318
319 2007-01-14  Bruno Haible  <bruno@clisp.org>
320
321         * modules/iconv (Include): Clarify that <iconv.h> can only be included
322         if iconv is found to exist.
323
324 2007-01-14  Bruno Haible  <bruno@clisp.org>
325
326         * modules/c-ctype-tests: New file.
327         * tests/test-c-ctype.c: New file.
328
329 2007-01-14  Bruno Haible  <bruno@clisp.org>
330
331         * modules/binary-io-tests: New file.
332         * tests/test-binary-io.sh: New file.
333         * tests/test-binary-io.c: New file.
334
335 2007-01-14  Bruno Haible  <bruno@clisp.org>
336
337         * modules/array-oset-tests: New file.
338         * tests/test-array_oset.c: New file.
339
340 2007-01-14  Bruno Haible  <bruno@clisp.org>
341
342         * modules/array-list-tests: New file.
343         * tests/test-array_list.c: New file.
344
345 2007-01-14  Bruno Haible  <bruno@clisp.org>
346
347         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
348         and make.
349         Reported by Simon Josefsson in
350         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
351
352 2007-01-14  Bruno Haible  <bruno@clisp.org>
353
354         * modules/allocsa-tests: New file.
355         * tests/test-allocsa.c: New file.
356
357 2007-01-14  Bruno Haible  <bruno@clisp.org>
358
359         * modules/fchdir (Depends-on): Add absolute-header.
360         * modules/unistd (Depends-on): Likewise.
361
362 2006-12-30  Bruno Haible  <bruno@clisp.org>
363
364         * modules/fchdir: New file.
365         * modules/unistd (Files): Add lib/unistd_.h.
366         (Makefile.am): Generate unistd.h from unistd_.h.
367         * lib/fchdir.c: New file.
368         * lib/dirent_.h: New file.
369         * lib/unistd_.h: New file.
370         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
371         * m4/fchdir.m4: New file.
372         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
373         (gl_HEADER_UNISTD): Invoke it.
374         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
375         function.
376         * lib/backupfile.c (opendir, closedir): Undefine.
377         * lib/chown.c (open, close): Undefine.
378         * lib/clean-temp.c (open, close): Undefine.
379         * lib/copy-file.c (open, close): Undefine.
380         * lib/execute.c (open, close): Undefine.
381         * lib/fsusage.c (open, close): Undefine.
382         * lib/gc-gnulib.c (open, close): Undefine.
383         * lib/getcwd.c (opendir, closedir): Undefine.
384         * lib/glob.c (opendir, closedir): Undefine.
385         * lib/javacomp.c (open, close): Undefine.
386         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
387         * lib/openat-proc.c (open, close): Undefine.
388         * lib/pagealign_alloc.c (open, close): Undefine.
389         * lib/pipe.c (open, close): Undefine.
390         * lib/progreloc.c (open, close): Undefine.
391         * lib/savedir.c (opendir, closedir): Undefine.
392         * lib/utime.c (open, close): Undefine.
393         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
394
395 2007-01-10  Bruno Haible  <bruno@clisp.org>
396
397         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
398
399 2007-01-12  Eric Blake  <ebb9@byu.net>
400
401         Provide a robust <wchar.h>.  Further simplifications are now
402         possible in other modules, but not included here.
403         * modules/wchar: New module.
404         * m4/wchar.m4: New file.
405         * lib/wchar_.h: Likewise.
406         * modules/mbchar (Depends-on): Depend on wchar, as the first use
407         of the new module.
408         * MODULES.html.sh (Extended multibyte and wide character utilities):
409         New section.
410
411 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
412
413         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
414         to a reasonable default for memory allocation.
415         (xreadlink): Don't allocate a huge buffer, to work around a buggy
416         file system that reports garbage st_size values for symlinks.
417         Problem reported by Liyang Hu.
418
419 2007-01-11  Simon Josefsson  <simon@josefsson.org>
420
421         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
422         Emacs .#* auto-save files).
423
424 2007-01-11  Bruno Haible  <bruno@clisp.org>
425
426         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
427         directory.
428
429 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
430
431         Use @...@ consistently in lib/wctype_.h.
432         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
433         on it being set to 1 or 0.
434         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
435         go back to AC_SUBSTing it.
436         * modules/wctype (Makefile.am): Undo previous change.
437
438 2007-01-10  Eric Blake  <ebb9@byu.net>
439
440         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
441         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
442         * modules/wctype (Makefile.am): Likewise.
443         Reported by Chris McGuire.
444
445 2007-01-10  Jim Meyering  <jim@meyering.net>
446
447         fts.c: a small readability/maintainability improvement
448         * lib/fts.c (fts_read): Make this code slightly more readable and
449         maintainable by hoisting the "sp->fts_cur = p" assignments to
450         immediately follow the statements that set P.  Derived from
451         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
452
453 2007-01-10  Eric Blake  <ebb9@byu.net>
454
455         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
456         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
457         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
458         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
459         Reported by Chris McGuire.
460
461 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
462
463         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
464         in sed script.
465
466 2007-01-09  Bruno Haible  <bruno@clisp.org>
467
468         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
469         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
470         variables.
471         (func_module): Use them.
472
473 2007-01-09  Bruno Haible  <bruno@clisp.org>
474
475         * modules/unistr/base: New file.
476         * lib/unistr.h: New file.
477
478         * modules/unistr/u8-to-u16: New file.
479         * lib/unistr/u8-to-u16.c: New file.
480
481         * modules/unistr/u8-to-u32: New file.
482         * lib/unistr/u8-to-u32.c: New file.
483
484         * modules/unistr/u16-to-u8: New file.
485         * lib/unistr/u16-to-u8.c: New file.
486
487         * modules/unistr/u16-to-u32: New file.
488         * lib/unistr/u16-to-u32.c: New file.
489
490         * modules/unistr/u32-to-u8: New file.
491         * lib/unistr/u32-to-u8.c: New file.
492
493         * modules/unistr/u32-to-u16: New file.
494         * lib/unistr/u32-to-u16.c: New file.
495
496         * modules/unistr/u8-check: New file.
497         * modules/unistr/u16-check: New file.
498         * modules/unistr/u32-check: New file.
499         * lib/unistr/u8-check.c: New file.
500         * lib/unistr/u16-check.c: New file.
501         * lib/unistr/u32-check.c: New file.
502
503         * modules/unistr/u8-chr: New file.
504         * modules/unistr/u16-chr: New file.
505         * modules/unistr/u32-chr: New file.
506         * lib/unistr/u8-chr.c: New file.
507         * lib/unistr/u16-chr.c: New file.
508         * lib/unistr/u32-chr.c: New file.
509
510         * modules/unistr/u8-cmp: New file.
511         * modules/unistr/u16-cmp: New file.
512         * modules/unistr/u32-cmp: New file.
513         * lib/unistr/u8-cmp.c: New file.
514         * lib/unistr/u16-cmp.c: New file.
515         * lib/unistr/u32-cmp.c: New file.
516
517         * modules/unistr/u8-cpy: New file.
518         * modules/unistr/u16-cpy: New file.
519         * modules/unistr/u32-cpy: New file.
520         * lib/unistr/u8-cpy.c: New file.
521         * lib/unistr/u16-cpy.c: New file.
522         * lib/unistr/u32-cpy.c: New file.
523         * lib/unistr/u-cpy.h: New file.
524
525         * modules/unistr/u8-cpy-alloc: New file.
526         * modules/unistr/u16-cpy-alloc: New file.
527         * modules/unistr/u32-cpy-alloc: New file.
528         * lib/unistr/u8-cpy-alloc.c: New file.
529         * lib/unistr/u16-cpy-alloc.c: New file.
530         * lib/unistr/u32-cpy-alloc.c: New file.
531         * lib/unistr/u-cpy-alloc.h: New file.
532
533         * modules/unistr/u8-endswith: New file.
534         * modules/unistr/u16-endswith: New file.
535         * modules/unistr/u32-endswith: New file.
536         * lib/unistr/u8-endswith.c: New file.
537         * lib/unistr/u16-endswith.c: New file.
538         * lib/unistr/u32-endswith.c: New file.
539         * lib/unistr/u-endswith.h: New file.
540
541         * modules/unistr/u8-mblen: New file.
542         * modules/unistr/u16-mblen: New file.
543         * modules/unistr/u32-mblen: New file.
544         * lib/unistr/u8-mblen.c: New file.
545         * lib/unistr/u16-mblen.c: New file.
546         * lib/unistr/u32-mblen.c: New file.
547
548         * modules/unistr/u8-mbtouc: New file.
549         * modules/unistr/u16-mbtouc: New file.
550         * modules/unistr/u32-mbtouc: New file.
551         * lib/unistr/u8-mbtouc.c: New file.
552         * lib/unistr/u16-mbtouc.c: New file.
553         * lib/unistr/u32-mbtouc.c: New file.
554
555         * modules/unistr/u8-mbtouc-safe: New file.
556         * modules/unistr/u16-mbtouc-safe: New file.
557         * modules/unistr/u32-mbtouc-safe: New file.
558         * lib/unistr/u8-mbtouc-safe.c: New file.
559         * lib/unistr/u16-mbtouc-safe.c: New file.
560         * lib/unistr/u32-mbtouc-safe.c: New file.
561
562         * modules/unistr/u8-move: New file.
563         * modules/unistr/u16-move: New file.
564         * modules/unistr/u32-move: New file.
565         * lib/unistr/u8-move.c: New file.
566         * lib/unistr/u16-move.c: New file.
567         * lib/unistr/u32-move.c: New file.
568         * lib/unistr/u-move.h: New file.
569
570         * modules/unistr/u8-next: New file.
571         * modules/unistr/u16-next: New file.
572         * modules/unistr/u32-next: New file.
573         * lib/unistr/u8-next.c: New file.
574         * lib/unistr/u16-next.c: New file.
575         * lib/unistr/u32-next.c: New file.
576
577         * modules/unistr/u8-prev: New file.
578         * modules/unistr/u16-prev: New file.
579         * modules/unistr/u32-prev: New file.
580         * lib/unistr/u8-prev.c: New file.
581         * lib/unistr/u16-prev.c: New file.
582         * lib/unistr/u32-prev.c: New file.
583
584         * modules/unistr/u8-set: New file.
585         * modules/unistr/u16-set: New file.
586         * modules/unistr/u32-set: New file.
587         * lib/unistr/u8-set.c: New file.
588         * lib/unistr/u16-set.c: New file.
589         * lib/unistr/u32-set.c: New file.
590         * lib/unistr/u-set.h: New file.
591
592         * modules/unistr/u8-startswith: New file.
593         * modules/unistr/u16-startswith: New file.
594         * modules/unistr/u32-startswith: New file.
595         * lib/unistr/u8-startswith.c: New file.
596         * lib/unistr/u16-startswith.c: New file.
597         * lib/unistr/u32-startswith.c: New file.
598         * lib/unistr/u-startswith.h: New file.
599
600         * modules/unistr/u8-stpcpy: New file.
601         * modules/unistr/u16-stpcpy: New file.
602         * modules/unistr/u32-stpcpy: New file.
603         * lib/unistr/u8-stpcpy.c: New file.
604         * lib/unistr/u16-stpcpy.c: New file.
605         * lib/unistr/u32-stpcpy.c: New file.
606         * lib/unistr/u-stpcpy.h: New file.
607
608         * modules/unistr/u8-stpncpy: New file.
609         * modules/unistr/u16-stpncpy: New file.
610         * modules/unistr/u32-stpncpy: New file.
611         * lib/unistr/u8-stpncpy.c: New file.
612         * lib/unistr/u16-stpncpy.c: New file.
613         * lib/unistr/u32-stpncpy.c: New file.
614         * lib/unistr/u-stpncpy.h: New file.
615
616         * modules/unistr/u8-strcat: New file.
617         * modules/unistr/u16-strcat: New file.
618         * modules/unistr/u32-strcat: New file.
619         * lib/unistr/u8-strcat.c: New file.
620         * lib/unistr/u16-strcat.c: New file.
621         * lib/unistr/u32-strcat.c: New file.
622         * lib/unistr/u-strcat.h: New file.
623
624         * modules/unistr/u8-strchr: New file.
625         * modules/unistr/u16-strchr: New file.
626         * modules/unistr/u32-strchr: New file.
627         * lib/unistr/u8-strchr.c: New file.
628         * lib/unistr/u16-strchr.c: New file.
629         * lib/unistr/u32-strchr.c: New file.
630
631         * modules/unistr/u8-strcmp: New file.
632         * modules/unistr/u16-strcmp: New file.
633         * modules/unistr/u32-strcmp: New file.
634         * lib/unistr/u8-strcmp.c: New file.
635         * lib/unistr/u16-strcmp.c: New file.
636         * lib/unistr/u32-strcmp.c: New file.
637
638         * modules/unistr/u8-strcpy: New file.
639         * modules/unistr/u16-strcpy: New file.
640         * modules/unistr/u32-strcpy: New file.
641         * lib/unistr/u8-strcpy.c: New file.
642         * lib/unistr/u16-strcpy.c: New file.
643         * lib/unistr/u32-strcpy.c: New file.
644         * lib/unistr/u-strcpy.h: New file.
645
646         * modules/unistr/u8-strcspn: New file.
647         * modules/unistr/u16-strcspn: New file.
648         * modules/unistr/u32-strcspn: New file.
649         * lib/unistr/u8-strcspn.c: New file.
650         * lib/unistr/u16-strcspn.c: New file.
651         * lib/unistr/u32-strcspn.c: New file.
652         * lib/unistr/u-strcspn.h: New file.
653
654         * modules/unistr/u8-strdup: New file.
655         * modules/unistr/u16-strdup: New file.
656         * modules/unistr/u32-strdup: New file.
657         * lib/unistr/u8-strdup.c: New file.
658         * lib/unistr/u16-strdup.c: New file.
659         * lib/unistr/u32-strdup.c: New file.
660         * lib/unistr/u-strdup.h: New file.
661
662         * modules/unistr/u8-strlen: New file.
663         * modules/unistr/u16-strlen: New file.
664         * modules/unistr/u32-strlen: New file.
665         * lib/unistr/u8-strlen.c: New file.
666         * lib/unistr/u16-strlen.c: New file.
667         * lib/unistr/u32-strlen.c: New file.
668         * lib/unistr/u-strlen.h: New file.
669
670         * modules/unistr/u8-strmblen: New file.
671         * modules/unistr/u16-strmblen: New file.
672         * modules/unistr/u32-strmblen: New file.
673         * lib/unistr/u8-strmblen.c: New file.
674         * lib/unistr/u16-strmblen.c: New file.
675         * lib/unistr/u32-strmblen.c: New file.
676
677         * modules/unistr/u8-strmbtouc: New file.
678         * modules/unistr/u16-strmbtouc: New file.
679         * modules/unistr/u32-strmbtouc: New file.
680         * lib/unistr/u8-strmbtouc.c: New file.
681         * lib/unistr/u16-strmbtouc.c: New file.
682         * lib/unistr/u32-strmbtouc.c: New file.
683
684         * modules/unistr/u8-strncat: New file.
685         * modules/unistr/u16-strncat: New file.
686         * modules/unistr/u32-strncat: New file.
687         * lib/unistr/u8-strncat.c: New file.
688         * lib/unistr/u16-strncat.c: New file.
689         * lib/unistr/u32-strncat.c: New file.
690         * lib/unistr/u-strncat.h: New file.
691
692         * modules/unistr/u8-strncmp: New file.
693         * modules/unistr/u16-strncmp: New file.
694         * modules/unistr/u32-strncmp: New file.
695         * lib/unistr/u8-strncmp.c: New file.
696         * lib/unistr/u16-strncmp.c: New file.
697         * lib/unistr/u32-strncmp.c: New file.
698
699         * modules/unistr/u8-strncpy: New file.
700         * modules/unistr/u16-strncpy: New file.
701         * modules/unistr/u32-strncpy: New file.
702         * lib/unistr/u8-strncpy.c: New file.
703         * lib/unistr/u16-strncpy.c: New file.
704         * lib/unistr/u32-strncpy.c: New file.
705         * lib/unistr/u-strncpy.h: New file.
706
707         * modules/unistr/u8-strnlen: New file.
708         * modules/unistr/u16-strnlen: New file.
709         * modules/unistr/u32-strnlen: New file.
710         * lib/unistr/u8-strnlen.c: New file.
711         * lib/unistr/u16-strnlen.c: New file.
712         * lib/unistr/u32-strnlen.c: New file.
713         * lib/unistr/u-strnlen.h: New file.
714
715         * modules/unistr/u8-strpbrk: New file.
716         * modules/unistr/u16-strpbrk: New file.
717         * modules/unistr/u32-strpbrk: New file.
718         * lib/unistr/u8-strpbrk.c: New file.
719         * lib/unistr/u16-strpbrk.c: New file.
720         * lib/unistr/u32-strpbrk.c: New file.
721         * lib/unistr/u-strpbrk.h: New file.
722
723         * modules/unistr/u8-strrchr: New file.
724         * modules/unistr/u16-strrchr: New file.
725         * modules/unistr/u32-strrchr: New file.
726         * lib/unistr/u8-strrchr.c: New file.
727         * lib/unistr/u16-strrchr.c: New file.
728         * lib/unistr/u32-strrchr.c: New file.
729
730         * modules/unistr/u8-strspn: New file.
731         * modules/unistr/u16-strspn: New file.
732         * modules/unistr/u32-strspn: New file.
733         * lib/unistr/u8-strspn.c: New file.
734         * lib/unistr/u16-strspn.c: New file.
735         * lib/unistr/u32-strspn.c: New file.
736         * lib/unistr/u-strspn.h: New file.
737
738         * modules/unistr/u8-strstr: New file.
739         * modules/unistr/u16-strstr: New file.
740         * modules/unistr/u32-strstr: New file.
741         * lib/unistr/u8-strstr.c: New file.
742         * lib/unistr/u16-strstr.c: New file.
743         * lib/unistr/u32-strstr.c: New file.
744         * lib/unistr/u-strstr.h: New file.
745
746         * modules/unistr/u8-strtok: New file.
747         * modules/unistr/u16-strtok: New file.
748         * modules/unistr/u32-strtok: New file.
749         * lib/unistr/u8-strtok.c: New file.
750         * lib/unistr/u16-strtok.c: New file.
751         * lib/unistr/u32-strtok.c: New file.
752         * lib/unistr/u-strtok.h: New file.
753
754         * modules/unistr/u8-uctomb: New file.
755         * modules/unistr/u16-uctomb: New file.
756         * modules/unistr/u32-uctomb: New file.
757         * lib/unistr/u8-uctomb.c: New file.
758         * lib/unistr/u16-uctomb.c: New file.
759         * lib/unistr/u32-uctomb.c: New file.
760
761         * MODULES.html.sh (Unicode string functions): Add the new modules.
762
763 2007-01-08  Bruno Haible  <bruno@clisp.org>
764
765         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
766         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
767         subdirectories.
768
769 2007-01-08  Karl Berry  <karl@gnu.org>
770
771         * doc/error.texi: mention that main() fns must set program_name
772         when progname is used.
773
774 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
775
776         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
777         WCTYPE_H is empty, for the benefit of builds from non-distclean
778         directories.  Problem reported by Eric Blake in
779         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
780
781 2007-01-08  Bruno Haible  <bruno@clisp.org>
782
783         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
784         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
785         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
786         PROVIDE_CANONICALIZE_FILENAME_MODE.
787         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
788
789 2007-01-08  Bruno Haible  <bruno@clisp.org>
790
791         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
792         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
793         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
794         * lib/fts.c: Likewise.
795         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
796
797 2006-12-25  Bruno Haible  <bruno@clisp.org>
798
799         * modules/utf8-ucs4-safe: New file.
800         * lib/utf8-ucs4-safe.h: New file.
801         * lib/unistr/utf8-ucs4-safe.c: New file.
802
803         * modules/utf16-ucs4-safe: New file.
804         * lib/utf16-ucs4-safe.h: New file.
805         * lib/unistr/utf16-ucs4-safe.c: New file.
806
807         * MODULES.html.sh (Unicode string functions): Add the new modules.
808
809 2007-01-08  Bruno Haible  <bruno@clisp.org>
810
811         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
812         (Depends-on): Add unitypes.
813         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
814         (u8_mbtouc_aux): Move out to separate file.
815         (u8_mbtouc): Use ucs4_t, uint8_t types.
816         * lib/unistr/utf8-ucs4.c: New file.
817
818         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
819         (Depends-on): Add unitypes.
820         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
821         (u16_mbtouc_aux): Move out to separate file.
822         (u16_mbtouc): Use ucs4_t, uint16_t types.
823         * lib/unistr/utf16-ucs4.c: New file.
824
825         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
826         (Depends-on): Add unitypes.
827         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
828         (u8_uctomb_aux): Move out to separate file.
829         (u8_uctomb): Use ucs4_t, uint8_t types.
830         * lib/unistr/ucs4-utf8.c: New file.
831
832         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
833         (Depends-on): Add unitypes.
834         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
835         (u16_uctomb_aux): Move out to separate file.
836         (u16_uctomb): Use ucs4_t, uint16_t types.
837         * lib/unistr/ucs4-utf16.c: New file.
838
839 2006-12-25  Bruno Haible  <bruno@clisp.org>
840
841         * modules/unitypes: New file.
842         * lib/unitypes.h: New file.
843         * MODULES.html.sh (func_all_modules): New section "Unicode string
844         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
845         this section. Add unitypes.
846
847 2007-01-08  Bruno Haible  <bruno@clisp.org>
848
849         Avoid variable names that conflict with those from libtool.
850         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
851         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
852         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
853         library_names_spec to acl_library_names_spec, hardcode_* to
854         acl_hardcode_*.
855         Reported by Ralf Wildenhues.
856
857 2007-01-08  Bruno Haible  <bruno@clisp.org>
858
859         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
860         definition.
861         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
862         definition.
863         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
864         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
865         definition.
866         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
867         definition.
868         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
869         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
870         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
871         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
872         definition.
873         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
874         definition.
875         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
876         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
877         GC_USE_<algorithm>.
878         * lib/gc-libgcrypt.c: Likewise.
879         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
880         * modules/gc-arctwo (configure.ac): Likewise.
881         * modules/gc-des (configure.ac): Likewise.
882         * modules/gc-hmac-md5 (configure.ac): Likewise.
883         * modules/gc-hmac-sha1 (configure.ac): Likewise.
884         * modules/gc-md2 (configure.ac): Likewise.
885         * modules/gc-md4 (configure.ac): Likewise.
886         * modules/gc-md5 (configure.ac): Likewise.
887         * modules/gc-random (configure.ac): Likewise.
888         * modules/gc-rijndael (configure.ac): Likewise.
889         * modules/gc-sha1 (configure.ac): Likewise.
890
891 2007-01-08  Bruno Haible  <bruno@clisp.org>
892
893         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
894         macro definition.
895         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
896         definition.
897         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
898         definition.
899         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
900         * modules/fcntl-safer (configure.ac): Likewise.
901         * modules/fopen-safer (configure.ac): Likewise.
902         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
903         GNULIB_FWRITEERROR macro definition.
904
905 2007-01-08  Bruno Haible  <bruno@clisp.org>
906
907         * m4/gnulib-common.m4: New file.
908         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
909         (func_get_filelist): Add m4/gnulib-common.m4.
910
911 2007-01-08  Bruno Haible  <bruno@clisp.org>
912
913         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
914         command.
915
916 2007-01-08  Jim Meyering  <jim@meyering.net>
917
918         Use a more robust test for a "can't happen" condition.
919         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
920         narrowed the st_size value.  Presuming the "can't happen" condition
921         is true, that narrowing could conceivably convert an invalid st_size
922         value into a valid one.  Instead, use a change based on Matthew
923         Woehlke's original patch.
924
925         Slight readability improvement: use an assert-like macro
926         in place of literal "abort ()" uses.
927         * lib/fts.c (fts_assert): Define.
928         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
929         Use this macro instead of a bare 'abort'.
930
931 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
932
933         Don't worry about using IRIX 5.3's wctype.h broken definitions;
934         simply work around them.
935         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
936         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
937         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
938         Don't bother to define as macros, since the standard doesn't require it.
939         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
940         longer worry about IRIX 5.3.
941         (HAVE_WCTYPE_CTMP_BUG): Remove.
942
943 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
944
945         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
946         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
947         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
948         Problems reported by Georg Schwarz for IRIX 5.3.
949
950         * gnulib-tool (autoconf_minversion): Take the maximum version number
951         found, not the minimum.  Problem reported by James Youngman.
952
953 2007-01-03  Karl Berry  <karl@gnu.org>
954
955         * doc/error.texi: new file, explaining interaction with progname.
956         * doc/gnulib.texi: include it.  Update copyright.
957
958 2007-01-03  Simon Josefsson  <simon@josefsson.org>
959
960         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
961         AC_CANONICAL_HOST, to improve autobuild outputs.
962
963 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
964             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
965
966         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
967         sockets, server sockets, and other file descriptors.  Count errors
968         to compute the return value.  Reorder the code a bit to be easier
969         to follow.  Don't set event bits that were not requested (except
970         POLLERR and POLLHUP).
971
972 2007-01-01  Bruno Haible  <bruno@clisp.org>
973
974         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
975
976 2007-01-03  Jim Meyering  <jim@meyering.net>
977
978         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
979
980 2007-01-02  Bruno Haible  <bruno@clisp.org>
981
982         * modules/settime (Include): Require timespec.h.
983         * modules/nanosleep (Include): Likewise.
984
985 2007-01-01  Bruno Haible  <bruno@clisp.org>
986
987         * gnulib-tool (func_emit_copyright_notice): Bump year.
988         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
989
990 2007-01-01  Bruno Haible  <bruno@clisp.org>
991
992         Improve support for OpenBSD.
993         * build-aux/config.rpath (libname_spec): Export.
994         (library_names_spec): New variable. Export.
995         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
996         library_names_spec from the config.rpath output. Locate shared library
997         through the name pattern in library_names_spec.
998
999 2007-01-01  Eric Blake  <ebb9@byu.net>
1000
1001         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1002
1003 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1004
1005         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1006         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1007         assume the C locale, and avoid an "eval" that could cause trouble.
1008         Problem with SORT reported by Bob Proulx.
1009
1010         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1011         Define.  Trivial patch from Henning Nielsen Lund, originally
1012         sent to bug-grep@gnu.org today.
1013
1014 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1015
1016         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1017         struct stat.  Problem reported by Henning Nielsen Lund.
1018         * lib/acl.c: Include acl.h first, to check interface.  Don't
1019         bother to include sys/types.h and sys/stat.h again.
1020
1021 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1022
1023         Import the following change from libc; problem reported by
1024         Sven Verdoolaege.
1025
1026         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1027
1028         [BZ #1373]
1029         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1030
1031 2006-12-28  Jim Meyering  <jim@meyering.net>
1032
1033         * build-aux/announce-gen: Do not assume that the package
1034         builds any of tar.gz, tar.bz2, and .xdelta files.
1035         Suggestion from Simon Josefsson.
1036
1037 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1038
1039         * modules/announce-gen: New file.
1040
1041 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1042
1043         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1044         handles its gotchas now.
1045         * lib/mbswidth.c: Likewise.
1046         * lib/wcwidth.h: Likewise.
1047         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1048         and iswcntrl; the wctype module does this stuff now.
1049         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1050         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1051         * modules/mbchar (Depends-on): Add wctype.
1052         * modules/mbswidth (Depends-on): Likewise.
1053         * modules/wcwidth (Depends-on): Likewise.
1054
1055 2006-12-27  Eric Blake  <ebb9@byu.net>
1056
1057         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1058         module uses more than what <wctype.h> is required to provide.
1059
1060 2006-12-26  Eric Blake  <ebb9@byu.net>
1061
1062         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1063
1064 2006-12-26  Eric Blake  <ebb9@byu.net>
1065
1066         * modules/absolute-header: New module.
1067         * modules/fcntl (Depends-on): Depend on it.
1068         * modules/inttypes (Depends-on): Likewise.
1069         * modules/stdint (Depends-on): Likewise.
1070         * modules/sys_stat (Depends-on): Likewise.
1071         * modules/wctype (Depends-on): Likewise.
1072         * MODULES.html.sh (Support for building libraries and
1073         executables): Document it.
1074
1075 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1076
1077         * gnulib-tool (SED): Remove, undoing previous change.
1078         The problem was that it broke coreutils on Solaris, because
1079         "sed --posix" leaked into a makefile.
1080         (sed): New alias, if 'alias' and GNU sed.
1081
1082 2006-12-24  Jim Meyering  <jim@meyering.net>
1083
1084         Work around an fchownat bug in glibc-2.4:
1085         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1086         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1087         in spite of the -P option.
1088         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1089         New macros.
1090         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1091         * modules/openat (Files): Add lib/fchownat.c.
1092         * lib/openat.c (fchownat): Don't define here.  Move to...
1093         * lib/fchownat.c: ...this new file.
1094
1095 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1096
1097         Fix bug reported by Bruno Haible in
1098         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1099         where quotearg.c didn't compile on Mac OS X 10.2 because it
1100         lacks <wchar.h> and wint_t.
1101         * lib/wctype_.h (__wctype_wint_t): New type.
1102         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1103         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1104         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1105         Arg is now of type __wctype_wint_t, not wint_t.
1106         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1107         substitute HAVE_WINT_T.
1108         * modules/wctype (Files): Add m4/wint_t.m4.
1109         (wctype.h): Substitute HAVE_WINT_T.
1110
1111 2006-12-23  Bruno Haible  <bruno@clisp.org>
1112
1113         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1114
1115 2006-12-23  Bruno Haible  <bruno@clisp.org>
1116
1117         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1118         S_ISLNK.
1119         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1120         mingw.
1121
1122 2006-12-22  Bruno Haible  <bruno@clisp.org>
1123
1124         * lib/copy-file.c: Include acl.h.
1125         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1126         Close the file descriptors only after being done with copy_acl.
1127         * modules/copy-file (Depends-on): Add acl.
1128
1129 2006-12-22  Bruno Haible  <bruno@clisp.org>
1130
1131         * gnulib-tool (SED): New variable.
1132         Use $SED instead of sed everywhere.
1133
1134 2006-12-22  Bruno Haible  <bruno@clisp.org>
1135
1136         * modules/no-c++: New file.
1137         * m4/no-c++.m4: New file.
1138         * MODULES.html.sh (Support for building libraries and executables):
1139         Add no-c++.
1140
1141 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1142
1143         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1144         Include <limits.h>, and use its INT_MAX to rewrite the
1145         j loop so that it does not overflow 'int'.  Problem reported by
1146         Ralf Wildenhues in
1147         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1148         Play it safe by shifting left by 1 rather than multiplying by 2,
1149         as GCC is less likely to optimize this away when the value
1150         is signed (when it assumes overflow leads to undefined behavior).
1151         Also, don't assume time_t uses two's complement.
1152
1153 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1154
1155         * MODULES.html.sh: New module wctype.
1156         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1157         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1158         <wctype.h>, since the new wctype module should fix this.
1159         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1160         the wctype module should arrange for it.
1161         * lib/regex_internal.h: Likewise.
1162         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1163         since the wctype module should handle this now.
1164         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1165         * modules/fnmatch (Depends-on): Add wctype.
1166         * modules/quotearg (Depends-on): Likewise.
1167         * modules/regex (Depends-on): Likewise.
1168
1169 2006-12-19  Bruno Haible  <bruno@clisp.org>
1170
1171         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1172         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1173
1174 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1175
1176         * modules/savewd (Depends-on): Fix dependency on fcntl.
1177
1178 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1179
1180         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1181         conforms to C99, rather than relying on the user's environment
1182         setting of STDINT_H.
1183
1184 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1185         and Eric Blake  <ebb9@byu.net>
1186
1187         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1188         This is more consistent with the other defines here.
1189         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1190         Port to z/OS.  Problem reported by Paul Gilmartin.
1191         Change local vars to use gl_ prefix rather than ac_.
1192         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1193         with other defines.
1194         * modules/double-slash-root: New module.
1195         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1196         (Depends-on): Add double-slash-root.
1197         * MODULES.html.sh (File system functions): Mention new module.
1198
1199 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1200
1201         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1202         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1203         This is for the benefit of gzip, which doesn't do i18n.
1204
1205 2006-12-12  Jim Meyering  <jim@meyering.net>
1206
1207         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1208         Reported by Andreas Schwab <schwab@suse.de>.
1209
1210 2006-12-12  Bruno Haible  <bruno@clisp.org>
1211
1212         Merge these changes.
1213         2006-09-05  Bruno Haible  <bruno@clisp.org>
1214         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1215         iconv_alloc succeeded.
1216         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1217         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1218         test for " && dest " at the end - dest is always != NULL there. Call
1219         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1220         with 2xNULL arguments, also to flush the state storage. Handle the
1221         IRIX iconv behaviour. Realloc the final result, to throw away unused
1222         memory.
1223
1224 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1225
1226         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1227         and fchmodat unconditionally, since glibc 2.4 has them.
1228         Problem reported by Arkadiusz Miskiewicz.
1229
1230 2006-12-10  Bruno Haible  <bruno@clisp.org>
1231
1232         * gnulib-tool (func_import): Show the include files only for those
1233         modules that are copied and specified.
1234         Reported by Karl Berry.
1235
1236 2006-12-08  Jim Meyering  <jim@meyering.net>
1237
1238         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1239         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1240
1241         * build-aux/announce-gen: Add two new options, both optional:
1242         --bootstrap-tools=TOOL_LIST
1243               a comma-separated list of tools, e.g.,
1244               autoconf,automake,bison,gnulib
1245         --gnulib-snapshot-date=DATE
1246               if gnulib is in the bootstrap tool list,
1247               then report this as the snapshot date.
1248               If not specified, use the current date/time.
1249               If you specify a date here, be sure it's UTC.
1250
1251 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1252
1253         * tests/test-argp-2.sh: Fix test to match actual output.
1254         (func_compare): Fix sed script to be portable.
1255
1256 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1257
1258         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1259         workaround for this case.  It is not autoconfigured now; offhand
1260         it's hard to see how to autoconfigure it.
1261
1262 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1263
1264         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1265         a directory that is about to be chowned.  Such a directory's
1266         initial file permissions should permit the owner only and this
1267         should not be changed until after the chown, since the group and
1268         other bits would be incorrect if they granted permission before
1269         the chown.
1270
1271         Fix porting problem for iswctype reported by Georg Schwarz in:
1272         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1273         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1274         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1275         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1276         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1277
1278 2006-12-03  Jim Meyering  <jim@meyering.net>
1279
1280         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1281         p->fts_statp may not yet be defined.
1282         (fts_read): Instead, set it in the caller, once p->fts_statp is
1283         sure to be defined, and corresponds to a top-level directory.
1284         This bug made du -x fail.  Here's the coreutils test case:
1285         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1286         Reported by Mike Frysinger.
1287
1288 2006-12-01  Jim Meyering  <jim@meyering.net>
1289
1290         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1291         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1292         Reported by Simon Josefsson.
1293
1294 2006-11-30  Jim Meyering  <jim@meyering.net>
1295
1296         * m4/warning.m4: Use the all-permissive copyright notice
1297         recommended by RMS (rather than LGPL).
1298         * m4/vararrays.m4: Likewise.
1299         * m4/flexmember.m4: Likewise.
1300
1301 2006-11-29  Bruno Haible  <bruno@clisp.org>
1302
1303         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1304         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1305         using +=.
1306         Reported by Simon Josefsson <simon@josefsson.org>.
1307
1308 2006-11-28  James Youngman <jay@gnu.org>
1309
1310         * README: Advise users that they might find the bug-gnulib@gnu.org
1311         and autotools-announce@gnu.org mailing lists useful.
1312
1313 2006-11-28  Bruno Haible  <bruno@clisp.org>
1314
1315         * m4/ptrdiff_max.m4: Remove file.
1316
1317 2006-11-21  Bruno Haible  <bruno@clisp.org>
1318
1319         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1320         _AC_COMPUTE_INT.
1321         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1322         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1323         _AC_COMPUTE_INT.
1324         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1325         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1326         _AC_COMPUTE_INT.
1327         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1328
1329 2006-11-28  Jim Meyering  <jim@meyering.net>
1330
1331         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1332         warning from "gcc -Wshadow" about shadowing the builtin.
1333
1334 2006-11-27  Bruno Haible  <bruno@clisp.org>
1335
1336         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1337         _AC_COMPUTE_INT.
1338         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1339
1340 2006-11-27  Bruno Haible  <bruno@clisp.org>
1341             Paul Eggert  <eggert@cs.ucla.edu>
1342
1343         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1344
1345 2006-11-26  Bruno Haible  <bruno@clisp.org>
1346
1347         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1348         noinst_LTLIBRARIES.
1349
1350 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1351             Bruno Haible  <bruno@clisp.org>
1352
1353         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1354         if compiling with "gcc -ansi".
1355
1356 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1357
1358         Fix some incompatibilities with gcc -ansi -pedantic.
1359         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
1360         if compiling pedantically with GCC, unless it's C99 or later.
1361         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1362         it mishandles gcc -ansi -pedantic as well.
1363         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1364         if gcc -pedantic.
1365         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1366         initializers for struct if -pedantic, unless it's C99 or later.
1367
1368 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1369
1370         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1371         Don't close an fd more than once. Identical atimes indicate
1372         success, not failure.
1373
1374 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1375
1376         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1377
1378 2006-11-23  Jim Meyering  <jim@meyering.net>
1379
1380         * build-aux/announce-gen: New file.  From coreutils.
1381
1382 2006-11-22  Jim Meyering  <jim@meyering.net>
1383
1384         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1385         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1386         (fts_read): Use a temporary to narrow the overused st_size member
1387         before using it in a switch statement.  Reported by Matthew Woehlke.
1388
1389         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1390         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1391
1392 2006-11-20  Bruno Haible  <bruno@clisp.org>
1393
1394         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1395         changequote instead of pairs of brackets.
1396         Reported by Andreas Schwab <schwab@suse.de>.
1397
1398 2006-11-21  Jim Meyering  <jim@meyering.net>
1399
1400         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1401         so as to remain compatible with older compilers.
1402         Patch from Michael Deutschmann.
1403
1404 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1405
1406         * MODULES.html.sh (File system functions): Add openat.
1407
1408         * lib/openat.h (rpl_fstatat): New macro, if
1409         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1410         (fstatat): Define to rpl_fstatat under the same conditions,
1411         unless COMPILING_FSTATAT.
1412         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1413         seems to have the bug.
1414         * lib/fstatat.c: New file.
1415         * modules/openat (Files): Add it.
1416
1417 2006-11-20  Bruno Haible  <bruno@clisp.org>
1418
1419         * Makefile: New file.
1420
1421 2006-11-20  Jim Meyering  <jim@meyering.net>
1422
1423         The beginnings of syntax-related checks for gnulib.
1424         * lib/Makefile: New file.
1425         * lib/t-idcache: New script.  Ensure that the two halves of
1426         idcache.c stay in sync.
1427
1428         * lib/idcache.c: Adjust comments in user- and group- portions to
1429         be more accurate, and to be consistent with one another.
1430
1431 2006-11-20  Jim Meyering  <jim@meyering.net>
1432
1433         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1434         continue using the flexible array member (thus, this module performs
1435         half as many malloc calls), with the addition that...
1436         (getgroup, getuser): Consistently record a non-match via an empty
1437         "name" string, and map an empty string match to a NULL return value.
1438         * modules/idcache (Depends-on): Re-add flexmember.
1439
1440         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1441         (getuidbyname, getgroup, getgidbyname): Likewise.
1442
1443         Use cleaner syntax: NULL rather than 0.
1444         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1445
1446 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1447
1448         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1449         It mishandled the case where the group was missing.
1450         Problem reported by Greg Schafer.
1451         * modules/idcache: Likewise.
1452
1453 2006-11-18  Jim Meyering  <jim@meyering.net>
1454
1455         * check-module (%exempt_header): Add exception for some
1456         conditionally-included headers.
1457
1458         * modules/i-ring (Depends-on): Add verify.
1459         (License): Change to LGPL.
1460
1461 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1462
1463         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1464         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1465         and inttostr.h.  Use snprintf rather than uinttostr, so that
1466         LGPLed code doesn't depend on GPLed.
1467
1468 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1469
1470         * modules/inline (License): Change from GPL to LGPL.
1471
1472 2006-11-17  Jim Meyering  <jim@meyering.net>
1473
1474         * modules/d-type (License): Switch to LGPL.
1475
1476 2006-11-15  Bruno Haible  <bruno@clisp.org>
1477
1478         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1479
1480 2006-11-15  Eric Blake  <ebb9@byu.net>
1481
1482         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1483         the module dependency.
1484
1485 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1486             Bruno Haible  <bruno@clisp.org>
1487
1488         * gnulib-tool (func_create_testdir): Add license consistency check.
1489
1490 2006-11-15  Eric Blake  <ebb9@byu.net>
1491
1492         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1493         random "(cached)" in configure output.
1494
1495 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1496
1497         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1498         test for conforming inttypes.h is both announced and cached.
1499
1500         * MODULES.html.sh (seen_modules, seen_files): New variables.
1501         (func_module): Rewrite to use a few less gnulib-tool and sed
1502         invocations.  Avoid a couple of quadratic algorithms for ...
1503         (missed_modules, missed_files): ... these, with ...
1504         (func_append, func_tmpdir): ... these new functions, from
1505         gnulib-tool.  Analogously, install traps for cleanup.
1506
1507         * tests/test-gc.c (main): Remove unused variables.
1508         * tests/test-read-file.c: Include stdlib.h, for 'free'.
1509
1510 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
1511
1512         * modules/inttostr (License): Change to LGPL.
1513
1514 2006-11-14  Eric Blake  <ebb9@byu.net>
1515
1516         * modules/tempname (License): Change to LGPL.
1517
1518 2006-11-14  Eric Blake  <ebb9@byu.net>
1519
1520         * doc/functions.texi (Function Portability): *printf functions on
1521         Cygwin now understand all POSIX size specifiers.
1522
1523 2006-11-14  Bruno Haible  <bruno@clisp.org>
1524
1525         * modules/c-ctype (License): Change to LGPL.
1526
1527 2006-11-12  Bruno Haible  <bruno@clisp.org>
1528
1529         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
1530         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
1531         for GNOME libraries, for which the include files are installed in
1532         subdirectories of $prefix/include.
1533
1534 2006-11-12  Bruno Haible  <bruno@clisp.org>
1535
1536         * m4/lib-link.m4: Require at least autoconf-2.54.
1537         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
1538         name to underscores for the --with option.
1539
1540 2006-11-13  Bruno Haible  <bruno@clisp.org>
1541
1542         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
1543         the tests directory.
1544         Reported by Ralf Wildenhues.
1545
1546 2006-11-13  Bruno Haible  <bruno@clisp.org>
1547
1548         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
1549         (func_emit_initmacro_end): Undo the override here.
1550         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
1551         Works around the famous automake error in coreutils.
1552
1553 2006-11-13  Eric Blake  <ebb9@byu.net>
1554
1555         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
1556         element, not its node.
1557
1558 2006-11-12  Bruno Haible  <bruno@clisp.org>
1559
1560         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
1561         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
1562
1563 2006-11-12  Bruno Haible  <bruno@clisp.org>
1564
1565         * gnulib-tool: New option --local-symlink.
1566         (func_usage): Document it.
1567         (lsymbolic): New variable.
1568         (func_import, func_create_testdir): If --symlink was not specified,
1569         test whether --local-symlink was specified and the file comes from
1570         the local_gnulib_dir.
1571
1572 2006-11-12  Bruno Haible  <bruno@clisp.org>
1573
1574         * gnulib-tool (func_ln): New function.
1575         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
1576
1577 2006-11-12  Bruno Haible  <bruno@clisp.org>
1578
1579         Finish support for source files in subdirectories.
1580         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
1581         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
1582         AUTOMAKE_OPTIONS.
1583         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
1584
1585 2006-11-12  Bruno Haible  <bruno@clisp.org>
1586
1587         * gnulib-tool (func_get_automake_snippet): Synthesize also an
1588         EXTRA_lib_SOURCES augmentation.
1589         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
1590
1591 2006-11-12  Jim Meyering  <jim@meyering.net>
1592
1593         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
1594         file descriptors.  This also averts a failure on systems with
1595         native openat support when a traversed directory lacks "x" access.
1596         * lib/fts_.h: Include "i-ring.h"
1597         (struct FTS) [fts_fd_ring]: New member.
1598         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
1599         (FCHDIR): Add parentheses.
1600         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
1601         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
1602         When descending, rather than simply closing the previous
1603         fts_cwd_fd value, push that file descriptor onto the ring.
1604         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
1605         (fts_open): Initialize the new fd_ring member.
1606         (fts_close): Clear the ring.
1607         (fts_safe_changedir): When possible, use our new fd_ring to skip
1608         the diropen and fstat and dev/ino comparison that would normally
1609         accompany a virtual `chdir ("..")'.
1610
1611         * modules/fts (Depends-on): Add i-ring.
1612         * modules/i-ring: New module.
1613         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
1614         * m4/i-ring.m4: New file.
1615
1616 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1617
1618         * gnulib-tool (func_create_testdir): Fix replacement of
1619         `build-aux' in configure.ac.  Run autotools in gltests
1620         subdirectory.
1621         (func_create_testdir, func_create_megatestdir, test): There is
1622         no need for '--force' in most autotool invocations in a new
1623         tree.  Actually fail the whole test if any of the tools, or the
1624         configure or make stages fail.
1625
1626         Sync from Automake.
1627         * build-aux/gnupload: Revert last change.  Add pointer to upload
1628         instructions of the GNU Maintenance Instructions.
1629         Suggestion by Karl Berry.
1630
1631 2006-11-10  Jim Meyering  <jim@meyering.net>
1632
1633         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
1634
1635 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1636
1637         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
1638         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
1639         (bind_textdomain_codeset) [! ENABLE_NLS]:
1640         Evaluate all the arguments.  That way, callers get compatible behavior
1641         if the arguments have side effects.  Also, it avoids some GCC
1642         diagnostics in some cases; Joel E. Denny reported problems when Bison
1643         was configured with --enable-gcc-warnigs.
1644
1645 2006-11-10  Jim Meyering  <jim@meyering.net>
1646
1647         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
1648         relevant options in CFLAGS (like -O, -fno-inline) are taken into
1649         account.
1650
1651 2006-11-10  Jim Meyering  <jim@meyering.net>
1652
1653         * modules/inline: New file/module.
1654         * modules/xalloc (Files): Remove m4/inline.m4.
1655         (Depends-on): Add inline, instead.
1656         * modules/oset: Likewise.
1657         * modules/list: Likewise.
1658
1659 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1660
1661         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
1662         Problem reported by Matthew Woehlke.
1663
1664 2006-11-09  Bruno Haible  <bruno@clisp.org>
1665
1666         * lib/tempname.c (gen_tempname): Remove variant that invokes
1667         __gen_tempname.
1668         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
1669         __gen_tempname.
1670
1671 2006-11-08  Bruno Haible  <bruno@clisp.org>
1672
1673         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
1674         to 'yes' instead of 'cross-compiling'.
1675
1676 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
1677
1678         * lib/quotearg.h (quotearg_free): New decl.
1679         * lib/quotearg.c (quotearg_free): New function.
1680         (slot0, nslots, slotvec0, slotvec):
1681         Now file-scope so that quotearg_free can get at them.
1682
1683 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1684
1685         Sync from Automake.
1686         * build-aux/gnupload: Add missing 'gnu' to example URL.
1687         Report by Karl Berry.
1688
1689 2006-11-08  Bruno Haible  <bruno@clisp.org>
1690
1691         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
1692         Suggested by Paul Eggert.
1693
1694 2006-11-08  Jim Meyering  <jim@meyering.net>
1695
1696         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
1697         It's already included if !_LIBC.
1698         (fts_safe_changedir): Add a comment.
1699
1700 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1701
1702         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
1703         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
1704         Matthew Woehlke.
1705
1706         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
1707         definitions up, to avoid colliding with change below.
1708         (static_inline) [HAVE_INLINE]: New macro.
1709         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
1710         Provide extern decls when !HAVE_INLINE.  Do not define unless
1711         static_inline is defined, either by us or by xmalloc.c.  Use
1712         static_inline rather than static inline.
1713         (XCALLOC): Optimize sizeof(T) = 1 case.
1714         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
1715
1716 2006-11-07  Bruno Haible  <bruno@clisp.org>
1717
1718         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
1719         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
1720         AC_C_INLINE.
1721         * modules/xalloc (Files): Add m4/inline.m4.
1722
1723 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1724
1725         * README: Fix typo.
1726         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
1727         (Miscellanous Notes): ...from this.
1728
1729 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1730
1731         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
1732         Mention that offsetof should be used instead of sizeof.
1733         From Bruno Haible.
1734
1735 2006-11-07  Bruno Haible  <bruno@clisp.org>
1736
1737         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
1738
1739 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1740
1741         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1742         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
1743         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1744         (gl_tree_add_before, gl_tree_add_after):
1745         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
1746         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
1747         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1748         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
1749         (gl_linked_add_after, gl_linked_add_at): Likewise.
1750         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
1751         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1752         (gl_tree_add_before, gl_tree_add_after): Likewise.
1753         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
1754         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
1755         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
1756
1757 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1758
1759         * lib/gl_oset.h: Use C comment style, not C++ comment style.
1760
1761 2006-11-06  Bruno Haible  <bruno@clisp.org>
1762
1763         * m4/inline.m4: New file.
1764         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
1765         * modules/list (Files): Add m4/inline.m4.
1766         * modules/oset (Files): Likewise.
1767
1768 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1769
1770         * lib/idcache.c: Include <stddef.h>, for offsetof.
1771         (struct userid.name): Change from char * to a flexible array member.
1772         All uses changed.
1773         * modules/idcache (Depends-on): Add flexmember.
1774
1775         * MODULES.html.sh (Core language properties): New module flexmember.
1776         * modules/flexmember, m4/flexmember.m4: New files.
1777
1778         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
1779         inline functions that are identical with the old xnmalloc_inline,
1780         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
1781         that we can avoid some unnecessary integer multiplications and
1782         divisions in the common case where the element size is known at
1783         compile time.
1784         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
1785         needed.
1786         (xnboundedmalloc): Remove.
1787         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
1788         arguments, for consistency with rest of this header.
1789         (xcharalloc): Rewrite using XNMALLOC.
1790         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
1791         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
1792         versions have been moved to lib/xalloc.h and renamed to be the
1793         non-*_inline versions.
1794         (xmalloc, xrealloc): Implement without reference to the xnmalloc
1795         and xnrealloc functions, since those functions are now inline and
1796         now call us.
1797         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
1798         renaming described above.
1799         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
1800         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
1801         captures the dependency in AC_C_INLINE.
1802
1803         New module canonicalize-lgpl, proposed by Charles Wilson in
1804         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
1805         with a few small changes afterwards.
1806         * MODULES.html.sh (File system functions): New module
1807         canonicalize-lgpl.
1808         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
1809         and canonicalize_file_name.
1810         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
1811         * modules/canonicalize-lgpl: New files.
1812
1813 2006-11-05  Bruno Haible  <bruno@clisp.org>
1814
1815         * gnulib-tool (func_import, func_create_testdir): Create directories
1816         also for files in subdirectories of lib/.
1817
1818 2006-11-05  Bruno Haible  <bruno@clisp.org>
1819
1820         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
1821         ANSI C compliant.
1822
1823 2006-11-03  Bruno Haible  <bruno@clisp.org>
1824
1825         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1826         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
1827         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
1828         (xnboundedmalloc): New inline function.
1829         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
1830         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
1831         xmalloc.
1832         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
1833         xmalloc.
1834         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
1835         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
1836         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
1837         xmalloc.
1838         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1839         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
1840         xmalloc.
1841         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
1842         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1843         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
1844         xmalloc.
1845         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1846         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
1847         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1848         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
1849         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
1850         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
1851         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
1852
1853 2006-11-03  Bruno Haible  <bruno@clisp.org>
1854
1855         * lib/c-ctype.h [C++]: Define functions without name mangling.
1856         * lib/fwriteerror.h [C++]: Likewise.
1857         * lib/gcd.h [C++]: Likewise.
1858         * lib/linebreak.h [C++]: Likewise.
1859
1860 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
1861
1862         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
1863         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
1864         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
1865         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
1866         Check for functions and headers just once.
1867         Check for declaration of canonicalize_file_name.
1868         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
1869
1870 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1871
1872         * gnulib-tool (func_import): Fix typo in actioncmd.
1873
1874 2006-11-02  Bruno Haible  <bruno@clisp.org>
1875
1876         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
1877         newline sequence in the Makefile.am snippet as a space, like "make"
1878         does.
1879         Reported by Roger Persson <perrog@gmail.com>.
1880
1881 2006-11-01  Bruno Haible  <bruno@clisp.org>
1882
1883         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
1884         already declared in <string.h>.
1885         * lib/strcase.h (strncasecmp): Don't declare it if yes.
1886
1887 2006-11-01  Bruno Haible  <bruno@clisp.org>
1888
1889         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
1890         * lib/strcase.h: Include <string.h>.
1891         (strcasecmp): Define to rpl_strcasecmp here.
1892
1893 2006-11-01  Bruno Haible  <bruno@clisp.org>
1894
1895         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
1896
1897 2006-11-01  Eric Blake  <ebb9@byu.net>
1898
1899         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
1900
1901         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
1902
1903 2006-10-29  Bruno Haible  <bruno@clisp.org>
1904
1905         Make it compile in C++ mode.
1906         * lib/full-write.c (full_rw): Add a cast.
1907
1908 2006-11-01  Bruno Haible  <bruno@clisp.org>
1909
1910         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
1911         be POSIX compliant.
1912         Reported by Roger Persson <perrog@gmail.com>.
1913
1914 2006-11-01  Eric Blake  <ebb9@byu.net>
1915
1916         * lib/getopt_.h: Fix comments.
1917
1918 2006-10-31  Eric Blake  <ebb9@byu.net>
1919
1920         * modules/tmpdir (Depends-on): Add sys_stat.
1921         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
1922         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
1923         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
1924         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
1925         tempname.
1926
1927 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
1928
1929         Avoid some C++ diagnostics reported by Bruno Haible.
1930         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
1931         xmalloc.
1932         (quotearg_alloc): Use xcharalloc rather than xmalloc.
1933         (struct slotvec): Move to top level.
1934         (quotearg_n_options): Rewrite to avoid xmalloc.
1935         * lib/xalloc.h (xcharalloc): New function.
1936         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
1937         [defined __cplusplus]: Add function template that provides result
1938         type propagation.  This part of the change is from Bruno Haible.
1939
1940 2006-10-29  Bruno Haible  <bruno@clisp.org>
1941
1942         Make it compile in C++ mode.
1943         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
1944         * lib/strnlen1.c (strnlen1): Cast memchr result.
1945         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
1946         * lib/clean-temp.c (string_equals, string_hash): Add casts.
1947         (create_temp_dir): Rename local variable 'template'.
1948         (compile_csharp_using_sscli): Add cast.
1949         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
1950         * lib/findprog.c (find_in_path): Likewise.
1951         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
1952         * lib/wait-process.c (register_slave_subprocess): Likewise.
1953
1954 2006-10-22  Bruno Haible  <bruno@clisp.org>
1955
1956         * modules/tsearch: New file.
1957         * lib/tsearch.h: New file.
1958         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
1959         * m4/tsearch.m4: New file.
1960         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
1961
1962 2006-10-29  Eric Blake  <ebb9@byu.net>
1963
1964         * lib/arcfour.c: Assume config.h.
1965         * lib/arctwo.c: Likewise.
1966         * lib/base64.c: Likewise.
1967         * lib/check-version.c: Likewise.
1968         * lib/crc.c: Likewise.
1969         * lib/des.c: Likewise.
1970         * lib/gc-gnulib.c: Likewise.
1971         * lib/gc-libgcrypt.c: Likewise.
1972         * lib/gc-pbkdf2-sha1.c: Likewise.
1973         * lib/getaddrinfo.c: Likewise.
1974         * lib/getdelim.c: Likewise.
1975         * lib/getline.c: Likewise.
1976         * lib/hmac-md5.c: Likewise.
1977         * lib/hmac-sha1.c: Likewise.
1978         * lib/iconvme.c: Likewise.
1979         * lib/md2.c: Likewise.
1980         * lib/md4.c: Likewise.
1981         * lib/memxor.c: Likewise.
1982         * lib/read-file.c: Likewise.
1983         * lib/readline.c: Likewise.
1984         * lib/rijndael-alg-fst.c: Likewise.
1985         * lib/rijndael-api-fst.c: Likewise.
1986         * lib/xgetdomainname.c: Likewise.
1987
1988 2006-10-28  Eric Blake  <ebb9@byu.net>
1989
1990         * lib/xstrndup.c: Assume config.h.
1991
1992 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
1993
1994         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
1995         stat-macros.h is now for our own macros, whereas stat_h is for
1996         macros in the <sys/stat.h> name space.
1997         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
1998         (STAT_MACROS_H): Remove.
1999         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2000         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2001         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2002         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2003         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2004         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2005         Move these macros to ...
2006         * lib/stat_.h: here.  Don't include stat-macros.h.
2007         * lib/canonicalize.c: Don't include stat-macros.h.
2008         * lib/chown.c: Likewise.
2009         * lib/euidaccess.c: Likewise.
2010         * lib/file-type.c: Likewise.
2011         * lib/filemode.c: Likewise.
2012         * lib/glob.c: Likewise.
2013         * lib/isapipe.c: Likewise.
2014         * lib/lchown.c: Likewise.
2015         * lib/lstat.c: Likewise.
2016         * lib/mkdir-p.c: Likewise.
2017         * lib/rmdir.c: Likewise.
2018         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2019         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2020         unless mkdir isn't declared, to speed up 'configure'.
2021         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2022         would define all the S_* symbols.
2023         * modules/canonicalize (Depends-on):
2024         Depend on sys_stat, not stat-macros.
2025         * modules/chown: Likewise.
2026         * modules/euidaccess: Likewise.
2027         * modules/filemode: Likewise.
2028         * modules/file-type: Likewise.
2029         * modules/glob: Likewise.
2030         * modules/isapipe: Likewise.
2031         * modules/lchown: Likewise.
2032         * modules/lstat: Likewise.
2033         * modules/mkancesdirs: Likewise.
2034         * modules/rmdir: Likewise.
2035         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2036         * modules/modechange: Likewise.
2037         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2038         (configure.ac): Remove gl_STAT_MACROS.
2039         * modules/sys_stat (Depends-on): Remove stat-macros.
2040
2041 2006-10-27  Bruno Haible  <bruno@clisp.org>
2042
2043         * m4/signed.m4: Remove file.
2044         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2045         invocation.
2046         * modules/vasnprintf (Files): Remove m4/signed.m4.
2047
2048 2006-10-27  Bruno Haible  <bruno@clisp.org>
2049
2050         Update to GNU gettext 0.16.
2051         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2052         m4/inttypes-h.m4, m4/signed.m4.
2053         * m4/gettext.m4: Update to GNU gettext 0.16.
2054         * m4/intl.m4: New file, from GNU gettext.
2055         * m4/intldir.m4: New file, from GNU gettext.
2056         * config/srclist.txt: Update
2057
2058 2006-10-27  Eric Blake  <ebb9@byu.net>
2059
2060         * MODULES.html.sh: Document tempname.
2061         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2062         dependencies.
2063         (Files): Move lib/tempname.c...
2064         * modules/tempname: ...to this new module.
2065         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2066         (gl_PREREQ_TEMPNAME): Move...
2067         * m4/tempname.m4: ...to this new file.
2068         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2069         * modules/sys_stat (Depends-on): Add stat-macros.
2070         * lib/stat_.h (includes): Pick up stat macros.
2071         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2072         if stat macros are broken.
2073         * lib/tempname.c (includes): No need to include "stat-macros.h".
2074         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2075         (direxists, __path_search) [!_LIBC]: Don't compile these in
2076         gnulib; the tmpdir module covers that.
2077         * lib/tempname.h: New file.
2078
2079 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2080
2081         * COPYING: Explain how gnulib-tool converts licence headers.
2082         Almost all wording by Eric Blake.
2083
2084 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2085
2086         * lib/mbchar.h (is_basic_table): Make read-only.
2087         * lib/mbchar.c (is_basic_table): Likewise.
2088         Reported by John Darrington.
2089
2090 2006-10-25  Bruno Haible  <bruno@clisp.org>
2091
2092         * lib/progname.h (set_program_name): Undefine before defining.
2093
2094 2006-10-25  Bruno Haible  <bruno@clisp.org>
2095
2096         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2097         false for non-gcc C++ compilers.
2098         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2099
2100 2006-10-24  Bruno Haible  <bruno@clisp.org>
2101
2102         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2103         iconv implementations like Irix iconv.
2104
2105 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2106
2107         * modules/vararrays: New file.
2108         * m4/vararrays.m4: New file, taken from diffutils.
2109         * MODULES.html.sh: New module vararrays.
2110
2111 2006-10-24  Karl Berry  <karl@gnu.org>
2112
2113         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2114         Don't call GNU Unix.
2115
2116 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2117
2118         * users.txt: Add Libtool.
2119
2120         Sync from Libtool:
2121
2122         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2123
2124         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2125         to gnulib's policy of including config.h unconditionally.
2126
2127 2006-10-24  Bruno Haible  <bruno@clisp.org>
2128
2129         * modules/wcwidth (Files): Add m4/wint_t.m4.
2130         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2131         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2132
2133 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2134
2135         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2136         to pacify GCC with some -W flags enabled.  Problem reported by
2137         Bruno Haible.
2138
2139 2006-10-24  Jim Meyering  <jim@meyering.net>
2140
2141         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2142         Reported by Karl Berry.
2143
2144 2006-10-23  Bruno Haible  <bruno@clisp.org>
2145
2146         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2147
2148 2006-10-24  Bruno Haible  <bruno@clisp.org>
2149
2150         * lib/gl_list.h: Use C comment style, not C++ comment style.
2151
2152 2006-10-23  Eric Blake  <ebb9@byu.net>
2153
2154         * lib/getaddrinfo.c (includes): Add missing include.
2155
2156 2006-10-23  Bruno Haible  <bruno@clisp.org>
2157             Paul Eggert  <eggert@cs.ucla.edu>
2158
2159         Ability to rename obstack_free.
2160         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2161         obstack_free.
2162         (obstack_free): Invoke the __obstack_free macro.
2163         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2164
2165 2006-10-23  Bruno Haible  <bruno@clisp.org>
2166             Paul Eggert  <eggert@cs.ucla.edu>
2167
2168         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2169         __argc, __argv from the declaration. (They are defined as macros on
2170         mingw.)
2171
2172 2006-10-22  Bruno Haible  <bruno@clisp.org>
2173
2174         * doc/gnulib-intro.texi: New file.
2175         * doc/gnulib.texi: Include it.
2176
2177 2006-10-21  Bruno Haible  <bruno@clisp.org>
2178
2179         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2180         "Introduction", "Miscellanous Notes", "Particular Modules".
2181
2182 2006-10-21  Bruno Haible  <bruno@clisp.org>
2183
2184         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2185         Change mostlyclean-local rule to avoid sh syntax error from bash
2186         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2187
2188 2006-10-23  Jim Meyering  <jim@meyering.net>
2189
2190         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2191         in place of snprintf.
2192
2193         * modules/inttostr (Files): Add lib/uinttostr.c.
2194         * lib/uinttostr.c (inttostr): New file/function.
2195         * lib/inttostr.h (uinttostr): Declare.
2196         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2197         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2198         Add uinttostr.
2199         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2200
2201 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2202
2203         * lib/canonicalize.c (ELOOP): Define if not already defined.
2204         Problem reported by Bruno Haible in
2205         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2206
2207 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2208
2209         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2210         Problem reported by Perry Smith and Ville Laurikari.
2211
2212         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2213         uses.
2214
2215 2006-10-19  Bruno Haible  <bruno@clisp.org>
2216
2217         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2218         for mingw.
2219
2220 2006-10-19  Bruno Haible  <bruno@clisp.org>
2221
2222         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2223         Needed for mingw.
2224
2225 2006-10-19  Bruno Haible  <bruno@clisp.org>
2226
2227         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2228
2229 2006-10-19  Bruno Haible  <bruno@clisp.org>
2230
2231         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2232         it.
2233
2234 2006-10-19  Bruno Haible  <bruno@clisp.org>
2235
2236         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2237         invocation.
2238
2239 2006-10-19  Bruno Haible  <bruno@clisp.org>
2240
2241         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2242         mountlist by default.
2243
2244 2006-10-16  Bruno Haible  <bruno@clisp.org>
2245
2246         * lib/c-strstr.c: Include c-strstr.h.
2247
2248 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2249
2250         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2251         in a slash.
2252
2253 2006-10-18  Bruno Haible  <bruno@clisp.org>
2254
2255         * lib/lock.h [C++]: Wrap definitions in extern "C".
2256
2257 2006-10-18  Bruno Haible  <bruno@clisp.org>
2258
2259         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2260         gl_LIBOBJS list.
2261
2262 2006-10-18  Bruno Haible  <bruno@clisp.org>
2263
2264         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2265
2266 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2267
2268         * lib/xstrtol.h: Include gettext.h.
2269         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2270         Problem reported by Eric Blake.
2271         * modules/xstrtol (Depends-on): Add gettext-h.
2272
2273 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2274
2275         * lib/strftime.c (advance): New macro.
2276         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2277         incomplete type, so you can't add 0 to it.  Problem and patch
2278         reported by Eelco Dolstra for dietlibc.
2279
2280 2006-10-18  Jim Meyering  <jim@meyering.net>
2281
2282         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2283         type for a local, and rename it: s/up/user_proc/.
2284
2285 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2286
2287         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2288         READ_UTMP_USER_PROCESS.
2289         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2290
2291 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2292
2293         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2294         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2295
2296 2006-10-17  Eric Blake  <ebb9@byu.net>
2297
2298         * lib/sigprocmask.c (sigprocmask): Fix typo.
2299
2300         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2301
2302         * modules/clean-temp (Makefile.am): Don't add to make output...
2303         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2304         config.h.
2305
2306 2006-10-17  Bruno Haible  <bruno@clisp.org>
2307
2308         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2309         differently if DEFAULT_TEXT_DOMAIN is set.
2310
2311 2006-10-16  Bruno Haible  <bruno@clisp.org>
2312
2313         * lib/clean-temp.c: Include fwriteerror.h.
2314
2315 2006-10-16  Bruno Haible  <bruno@clisp.org>
2316
2317         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2318
2319 2006-10-16  Bruno Haible  <bruno@clisp.org>
2320
2321         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2322         * lib/sigprocmask.h: Include <sys/types.h>.
2323         (sigset_t): Use the system's definition if present.
2324
2325 2006-10-17  Eric Blake  <ebb9@byu.net>
2326
2327         * lib/xvasprintf.c (includes): Assume config.h.
2328         * lib/xasprintf.c (includes): Likewise.
2329
2330 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2331
2332         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2333         at least as wide as intmax_t.
2334
2335 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2336
2337         (Imported from Automake.)
2338         * build-aux/gnupload: Update to version 1.1 of directive file.
2339
2340 2006-10-16  Eric Blake  <ebb9@byu.net>
2341
2342         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2343         match Automake 1.10a.
2344
2345 2006-10-14  Bruno Haible  <bruno@clisp.org>
2346
2347         * modules/sigprocmask: New file.
2348         * lib/sigprocmask.h: New file.
2349         * lib/sigprocmask.c: New file.
2350         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2351         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2352         request sigprocmask.o.
2353         (gl_PREREQ_SIGPROCMASK): New macro.
2354         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2355         (Depends-on): Add sigprocmask.
2356         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2357         gt_SIGNALBLOCKING. Test for 'raise' only once.
2358         * lib/fatal-signal.c: Include sigprocmask.h.
2359         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
2360         unblock_fatal_signals): Define always.
2361         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2362         sigprocmask.
2363
2364 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2365
2366         Sync from Automake.
2367         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2368         which incorrectly sets the mode of an existing destination
2369         directory.  In some cases the unpatched install-sh could do the
2370         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2371         system.  We hope this is rare in practice, but it's clearly worth
2372         fixing.  Problem reported by Alex Unleashed in
2373         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2374         Also, don't bother to check for -m bugs unless we're using -m;
2375         suggested by Stepan Kasal.
2376
2377 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2378
2379         Sync from Automake.
2380         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2381         `-c' flag, so they appear at the same position as in %FASTDEP%
2382         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2383         which ignores unknown options only after the first non-option.
2384         Bug report against M4 by Nelson H. F. Beebe.
2385
2386 2006-10-13  Jim Meyering  <jim@meyering.net>
2387
2388         Fix a bug in yesterday's change.
2389         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2390         p->fts_statp->st_dev would be used uninitialized.
2391         Ensures that we always call fts_stat on the very first entry.
2392         Miklos Szeredi reported that find -xdev stopped working.
2393
2394 2006-10-12  Bruno Haible  <bruno@clisp.org>
2395
2396         * gnulib-tool (func_get_automake_snippet): Append an automatically
2397         computed EXTRA_DIST augmentation.
2398         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2399         * modules/alloca-opt (Makefile.am): Likewise.
2400         * modules/allocsa (Makefile.am): Likewise.
2401         * modules/arcfour (Makefile.am): Likewise.
2402         * modules/arctwo (Makefile.am): Likewise.
2403         * modules/argmatch (Makefile.am): Likewise.
2404         * modules/argz (Makefile.am): Likewise.
2405         * modules/atexit (Makefile.am): Likewise.
2406         * modules/backupfile (Makefile.am): Likewise.
2407         * modules/byteswap (Makefile.am): Likewise.
2408         * modules/c-strtod (Makefile.am): Likewise.
2409         * modules/c-strtold (Makefile.am): Likewise.
2410         * modules/calloc (Makefile.am): Likewise.
2411         * modules/canon-host (Makefile.am): Likewise.
2412         * modules/canonicalize (Makefile.am): Likewise.
2413         * modules/chdir-long (Makefile.am): Likewise.
2414         * modules/chdir-safer (Makefile.am): Likewise.
2415         * modules/check-version (Makefile.am): Likewise.
2416         * modules/chown (Makefile.am): Likewise.
2417         * modules/cloexec (Makefile.am): Likewise.
2418         * modules/close-stream (Makefile.am): Likewise.
2419         * modules/closeout (Makefile.am): Likewise.
2420         * modules/crc (Makefile.am): Likewise.
2421         * modules/csharpexec (Makefile.am): Likewise.
2422         * modules/cycle-check (Makefile.am): Likewise.
2423         * modules/des (Makefile.am): Likewise.
2424         * modules/dev-ino (Makefile.am): Likewise.
2425         * modules/dirfd (Makefile.am): Likewise.
2426         * modules/dirname (Makefile.am): Likewise.
2427         * modules/dup2 (Makefile.am): Likewise.
2428         * modules/eealloc (Makefile.am): Likewise.
2429         * modules/error (Makefile.am): Likewise.
2430         * modules/euidaccess (Makefile.am): Likewise.
2431         * modules/exclude (Makefile.am): Likewise.
2432         * modules/exitfail (Makefile.am): Likewise.
2433         * modules/fcntl-safer (Makefile.am): Likewise.
2434         * modules/fcntl (Makefile.am): Likewise.
2435         * modules/file-type (Makefile.am): Likewise.
2436         * modules/fileblocks (Makefile.am): Likewise.
2437         * modules/filemode (Makefile.am): Likewise.
2438         * modules/filenamecat (Makefile.am): Likewise.
2439         * modules/fnmatch (Makefile.am): Likewise.
2440         * modules/fopen-safer (Makefile.am): Likewise.
2441         * modules/fpending (Makefile.am): Likewise.
2442         * modules/fprintftime (Makefile.am): Likewise.
2443         * modules/free (Makefile.am): Likewise.
2444         * modules/fsusage (Makefile.am): Likewise.
2445         * modules/ftruncate (Makefile.am): Likewise.
2446         * modules/fts (Makefile.am): Likewise.
2447         * modules/gc-arcfour (Makefile.am): Likewise.
2448         * modules/gc-des (Makefile.am): Likewise.
2449         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2450         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2451         * modules/gc-md4 (Makefile.am): Likewise.
2452         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2453         * modules/gc-sha1 (Makefile.am): Likewise.
2454         * modules/gc (Makefile.am): Likewise.
2455         * modules/getaddrinfo (Makefile.am): Likewise.
2456         * modules/getcwd (Makefile.am): Likewise.
2457         * modules/getdelim (Makefile.am): Likewise.
2458         * modules/getdomainname (Makefile.am): Likewise.
2459         * modules/getgroups (Makefile.am): Likewise.
2460         * modules/gethostname (Makefile.am): Likewise.
2461         * modules/gethrxtime (Makefile.am): Likewise.
2462         * modules/getline (Makefile.am): Likewise.
2463         * modules/getloadavg (Makefile.am): Likewise.
2464         * modules/getlogin_r (Makefile.am): Likewise.
2465         * modules/getndelim2 (Makefile.am): Likewise.
2466         * modules/getopt (Makefile.am): Likewise.
2467         * modules/getpagesize (Makefile.am): Likewise.
2468         * modules/getpass-gnu (Makefile.am): Likewise.
2469         * modules/getpass (Makefile.am): Likewise.
2470         * modules/getsubopt (Makefile.am): Likewise.
2471         * modules/gettime (Makefile.am): Likewise.
2472         * modules/gettimeofday (Makefile.am): Likewise.
2473         * modules/getugroups (Makefile.am): Likewise.
2474         * modules/getusershell (Makefile.am): Likewise.
2475         * modules/glob (Makefile.am): Likewise.
2476         * modules/group-member (Makefile.am): Likewise.
2477         * modules/hard-locale (Makefile.am): Likewise.
2478         * modules/hash (Makefile.am): Likewise.
2479         * modules/hmac-md5 (Makefile.am): Likewise.
2480         * modules/hmac-sha1 (Makefile.am): Likewise.
2481         * modules/human (Makefile.am): Likewise.
2482         * modules/idcache (Makefile.am): Likewise.
2483         * modules/imaxabs (Makefile.am): Likewise.
2484         * modules/imaxdiv (Makefile.am): Likewise.
2485         * modules/inet_ntop (Makefile.am): Likewise.
2486         * modules/inet_pton (Makefile.am): Likewise.
2487         * modules/intprops (Makefile.am): Likewise.
2488         * modules/inttostr (Makefile.am): Likewise.
2489         * modules/inttypes (Makefile.am): Likewise.
2490         * modules/isapipe (Makefile.am): Likewise.
2491         * modules/javaversion (Makefile.am): Likewise.
2492         * modules/lchmod (Makefile.am): Likewise.
2493         * modules/lchown (Makefile.am): Likewise.
2494         * modules/localcharset (Makefile.am): Likewise.
2495         * modules/long-options (Makefile.am): Likewise.
2496         * modules/lstat (Makefile.am): Likewise.
2497         * modules/malloc (Makefile.am): Likewise.
2498         * modules/mathl (Makefile.am): Likewise.
2499         * modules/mbchar (Makefile.am): Likewise.
2500         * modules/md2 (Makefile.am): Likewise.
2501         * modules/md4 (Makefile.am): Likewise.
2502         * modules/md5 (Makefile.am): Likewise.
2503         * modules/memcasecmp (Makefile.am): Likewise.
2504         * modules/memchr (Makefile.am): Likewise.
2505         * modules/memcmp (Makefile.am): Likewise.
2506         * modules/memcoll (Makefile.am): Likewise.
2507         * modules/memcpy (Makefile.am): Likewise.
2508         * modules/memmem (Makefile.am): Likewise.
2509         * modules/memmove (Makefile.am): Likewise.
2510         * modules/mempcpy (Makefile.am): Likewise.
2511         * modules/memrchr (Makefile.am): Likewise.
2512         * modules/memset (Makefile.am): Likewise.
2513         * modules/memxor (Makefile.am): Likewise.
2514         * modules/mkancesdirs (Makefile.am): Likewise.
2515         * modules/mkdir-p (Makefile.am): Likewise.
2516         * modules/mkdir (Makefile.am): Likewise.
2517         * modules/mkdtemp (Makefile.am): Likewise.
2518         * modules/mkstemp (Makefile.am): Likewise.
2519         * modules/mktime (Makefile.am): Likewise.
2520         * modules/modechange (Makefile.am): Likewise.
2521         * modules/mountlist (Makefile.am): Likewise.
2522         * modules/nanosleep (Makefile.am): Likewise.
2523         * modules/obstack (Makefile.am): Likewise.
2524         * modules/openat (Makefile.am): Likewise.
2525         * modules/pagealign_alloc (Makefile.am): Likewise.
2526         * modules/pathmax (Makefile.am): Likewise.
2527         * modules/physmem (Makefile.am): Likewise.
2528         * modules/poll (Makefile.am): Likewise.
2529         * modules/posixtm (Makefile.am): Likewise.
2530         * modules/posixver (Makefile.am): Likewise.
2531         * modules/putenv (Makefile.am): Likewise.
2532         * modules/quote (Makefile.am): Likewise.
2533         * modules/quotearg (Makefile.am): Likewise.
2534         * modules/raise (Makefile.am): Likewise.
2535         * modules/read-file (Makefile.am): Likewise.
2536         * modules/readline (Makefile.am): Likewise.
2537         * modules/readlink (Makefile.am): Likewise.
2538         * modules/readtokens (Makefile.am): Likewise.
2539         * modules/readutmp (Makefile.am): Likewise.
2540         * modules/realloc (Makefile.am): Likewise.
2541         * modules/regex (Makefile.am): Likewise.
2542         * modules/rename-dest-slash (Makefile.am): Likewise.
2543         * modules/rename (Makefile.am): Likewise.
2544         * modules/rijndael (Makefile.am): Likewise.
2545         * modules/rmdir (Makefile.am): Likewise.
2546         * modules/rpmatch (Makefile.am): Likewise.
2547         * modules/safe-read (Makefile.am): Likewise.
2548         * modules/safe-write (Makefile.am): Likewise.
2549         * modules/same-inode (Makefile.am): Likewise.
2550         * modules/same (Makefile.am): Likewise.
2551         * modules/save-cwd (Makefile.am): Likewise.
2552         * modules/savedir (Makefile.am): Likewise.
2553         * modules/setenv (Makefile.am): Likewise.
2554         * modules/settime (Makefile.am): Likewise.
2555         * modules/sha1 (Makefile.am): Likewise.
2556         * modules/sig2str (Makefile.am): Likewise.
2557         * modules/snprintf (Makefile.am): Likewise.
2558         * modules/stat-macros (Makefile.am): Likewise.
2559         * modules/stat-time (Makefile.am): Likewise.
2560         * modules/stdbool (Makefile.am): Likewise.
2561         * modules/stdint (Makefile.am): Likewise.
2562         * modules/stdlib-safer (Makefile.am): Likewise.
2563         * modules/stpcpy (Makefile.am): Likewise.
2564         * modules/stpncpy (Makefile.am): Likewise.
2565         * modules/strcase (Makefile.am): Likewise.
2566         * modules/strcasestr (Makefile.am): Likewise.
2567         * modules/strchrnul (Makefile.am): Likewise.
2568         * modules/strcspn (Makefile.am): Likewise.
2569         * modules/strdup (Makefile.am): Likewise.
2570         * modules/strerror (Makefile.am): Likewise.
2571         * modules/strftime (Makefile.am): Likewise.
2572         * modules/strndup (Makefile.am): Likewise.
2573         * modules/strnlen (Makefile.am): Likewise.
2574         * modules/strpbrk (Makefile.am): Likewise.
2575         * modules/strsep (Makefile.am): Likewise.
2576         * modules/strstr (Makefile.am): Likewise.
2577         * modules/strtod (Makefile.am): Likewise.
2578         * modules/strtoimax (Makefile.am): Likewise.
2579         * modules/strtok_r (Makefile.am): Likewise.
2580         * modules/strtol (Makefile.am): Likewise.
2581         * modules/strtoll (Makefile.am): Likewise.
2582         * modules/strtoul (Makefile.am): Likewise.
2583         * modules/strtoull (Makefile.am): Likewise.
2584         * modules/strtoumax (Makefile.am): Likewise.
2585         * modules/strverscmp (Makefile.am): Likewise.
2586         * modules/sys_socket (Makefile.am): Likewise.
2587         * modules/sys_stat (Makefile.am): Likewise.
2588         * modules/sysexits (Makefile.am): Likewise.
2589         * modules/time_r (Makefile.am): Likewise.
2590         * modules/timegm (Makefile.am): Likewise.
2591         * modules/timespec (Makefile.am): Likewise.
2592         * modules/tmpfile-safer (Makefile.am): Likewise.
2593         * modules/trim (Makefile.am): Likewise.
2594         * modules/unistd-safer (Makefile.am): Likewise.
2595         * modules/unlinkdir (Makefile.am): Likewise.
2596         * modules/unlocked-io (Makefile.am): Likewise.
2597         * modules/userspec (Makefile.am): Likewise.
2598         * modules/utime (Makefile.am): Likewise.
2599         * modules/utimecmp (Makefile.am): Likewise.
2600         * modules/utimens (Makefile.am): Likewise.
2601         * modules/vasnprintf (Makefile.am): Likewise.
2602         * modules/vasprintf (Makefile.am): Likewise.
2603         * modules/vsnprintf (Makefile.am): Likewise.
2604         * modules/xalloc (Makefile.am): Likewise.
2605         * modules/xgetcwd (Makefile.am): Likewise.
2606         * modules/xnanosleep (Makefile.am): Likewise.
2607         * modules/xreadlink (Makefile.am): Likewise.
2608         * modules/xstrtod (Makefile.am): Likewise.
2609         * modules/xstrtol (Makefile.am): Likewise.
2610         * modules/xstrtold (Makefile.am): Likewise.
2611         * modules/yesno (Makefile.am): Likewise.
2612         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
2613
2614 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2615
2616         * modules/error (Makefile.am): Distribute files through
2617         EXTRA_DIST, not lib_SOURCES.
2618
2619 2006-10-12  Eric Blake  <ebb9@byu.net>
2620
2621         * modules/error (Makefile.am): Distribute files in /lib.
2622         * modules/obstack (Makefile.am): Likewise.
2623
2624 2006-10-12  Bruno Haible  <bruno@clisp.org>
2625
2626         * modules/acl (Makefile.am): Distribute all files in lib/ through
2627         EXTRA_DIST.
2628         * modules/arcfour (Makefile.am): Likewise.
2629         * modules/arctwo (Makefile.am): Likewise.
2630         * modules/argmatch (Makefile.am): Likewise.
2631         * modules/argz (Makefile.am): Likewise.
2632         * modules/atexit (Makefile.am): Likewise.
2633         * modules/backupfile (Makefile.am): Likewise.
2634         * modules/c-strtod (Makefile.am): Likewise.
2635         * modules/c-strtold (Makefile.am): Likewise.
2636         * modules/calloc (Makefile.am): Likewise.
2637         * modules/canon-host (Makefile.am): Likewise.
2638         * modules/canonicalize (Makefile.am): Likewise.
2639         * modules/chdir-long (Makefile.am): Likewise.
2640         * modules/chdir-safer (Makefile.am): Likewise.
2641         * modules/check-version (Makefile.am): Likewise.
2642         * modules/chown (Makefile.am): Likewise.
2643         * modules/cloexec (Makefile.am): Likewise.
2644         * modules/close-stream (Makefile.am): Likewise.
2645         * modules/closeout (Makefile.am): Likewise.
2646         * modules/crc (Makefile.am): Likewise.
2647         * modules/cycle-check (Makefile.am): Likewise.
2648         * modules/des (Makefile.am): Likewise.
2649         * modules/dirfd (Makefile.am): Likewise.
2650         * modules/dirname (Makefile.am): Likewise.
2651         * modules/dup2 (Makefile.am): Likewise.
2652         * modules/euidaccess (Makefile.am): Likewise.
2653         * modules/exclude (Makefile.am): Likewise.
2654         * modules/exitfail (Makefile.am): Likewise.
2655         * modules/fcntl-safer (Makefile.am): Likewise.
2656         * modules/file-type (Makefile.am): Likewise.
2657         * modules/fileblocks (Makefile.am): Likewise.
2658         * modules/filemode (Makefile.am): Likewise.
2659         * modules/filenamecat (Makefile.am): Likewise.
2660         * modules/fnmatch (Makefile.am): Likewise.
2661         * modules/fopen-safer (Makefile.am): Likewise.
2662         * modules/fpending (Makefile.am): Likewise.
2663         * modules/fprintftime (Makefile.am): Likewise.
2664         * modules/free (Makefile.am): Likewise.
2665         * modules/fsusage (Makefile.am): Likewise.
2666         * modules/ftruncate (Makefile.am): Likewise.
2667         * modules/fts (Makefile.am): Likewise.
2668         * modules/gc (Makefile.am): Likewise.
2669         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2670         * modules/getaddrinfo (Makefile.am): Likewise.
2671         * modules/getcwd (Makefile.am): Likewise.
2672         * modules/getdelim (Makefile.am): Likewise.
2673         * modules/getdomainname (Makefile.am): Likewise.
2674         * modules/getgroups (Makefile.am): Likewise.
2675         * modules/gethostname (Makefile.am): Likewise.
2676         * modules/gethrxtime (Makefile.am): Likewise.
2677         * modules/getline (Makefile.am): Likewise.
2678         * modules/getloadavg (Makefile.am): Likewise.
2679         * modules/getlogin_r (Makefile.am): Likewise.
2680         * modules/getopt (Makefile.am): Likewise.
2681         * modules/getpass (Makefile.am): Likewise.
2682         * modules/getpass-gnu (Makefile.am): Likewise.
2683         * modules/getsubopt (Makefile.am): Likewise.
2684         * modules/gettime (Makefile.am): Likewise.
2685         * modules/gettimeofday (Makefile.am): Likewise.
2686         * modules/getugroups (Makefile.am): Likewise.
2687         * modules/getusershell (Makefile.am): Likewise.
2688         * modules/glob (Makefile.am): Likewise.
2689         * modules/group-member (Makefile.am): Likewise.
2690         * modules/hard-locale (Makefile.am): Likewise.
2691         * modules/hash (Makefile.am): Likewise.
2692         * modules/hmac-md5 (Makefile.am): Likewise.
2693         * modules/hmac-sha1 (Makefile.am): Likewise.
2694         * modules/human (Makefile.am): Likewise.
2695         * modules/idcache (Makefile.am): Likewise.
2696         * modules/imaxabs (Makefile.am): Likewise.
2697         * modules/imaxdiv (Makefile.am): Likewise.
2698         * modules/inet_ntop (Makefile.am): Likewise.
2699         * modules/inet_pton (Makefile.am): Likewise.
2700         * modules/inttostr (Makefile.am): Likewise.
2701         * modules/isapipe (Makefile.am): Likewise.
2702         * modules/lchown (Makefile.am): Likewise.
2703         * modules/long-options (Makefile.am): Likewise.
2704         * modules/lstat (Makefile.am): Likewise.
2705         * modules/malloc (Makefile.am): Likewise.
2706         * modules/mathl (Makefile.am): Likewise.
2707         * modules/mbchar (Makefile.am): Likewise.
2708         * modules/md2 (Makefile.am): Likewise.
2709         * modules/md4 (Makefile.am): Likewise.
2710         * modules/md5 (Makefile.am): Likewise.
2711         * modules/memcasecmp (Makefile.am): Likewise.
2712         * modules/memchr (Makefile.am): Likewise.
2713         * modules/memcmp (Makefile.am): Likewise.
2714         * modules/memcoll (Makefile.am): Likewise.
2715         * modules/memcpy (Makefile.am): Likewise.
2716         * modules/memmem (Makefile.am): Likewise.
2717         * modules/memmove (Makefile.am): Likewise.
2718         * modules/mempcpy (Makefile.am): Likewise.
2719         * modules/memrchr (Makefile.am): Likewise.
2720         * modules/memset (Makefile.am): Likewise.
2721         * modules/memxor (Makefile.am): Likewise.
2722         * modules/mkancesdirs (Makefile.am): Likewise.
2723         * modules/mkdir (Makefile.am): Likewise.
2724         * modules/mkdir-p (Makefile.am): Likewise.
2725         * modules/mkdtemp (Makefile.am): Likewise.
2726         * modules/mkstemp (Makefile.am): Likewise.
2727         * modules/mktime (Makefile.am): Likewise.
2728         * modules/modechange (Makefile.am): Likewise.
2729         * modules/mountlist (Makefile.am): Likewise.
2730         * modules/nanosleep (Makefile.am): Likewise.
2731         * modules/openat (Makefile.am): Likewise.
2732         * modules/pagealign_alloc (Makefile.am): Likewise.
2733         * modules/physmem (Makefile.am): Likewise.
2734         * modules/poll (Makefile.am): Likewise.
2735         * modules/posixtm (Makefile.am): Likewise.
2736         * modules/posixver (Makefile.am): Likewise.
2737         * modules/putenv (Makefile.am): Likewise.
2738         * modules/quote (Makefile.am): Likewise.
2739         * modules/quotearg (Makefile.am): Likewise.
2740         * modules/raise (Makefile.am): Likewise.
2741         * modules/read-file (Makefile.am): Likewise.
2742         * modules/readline (Makefile.am): Likewise.
2743         * modules/readlink (Makefile.am): Likewise.
2744         * modules/readtokens (Makefile.am): Likewise.
2745         * modules/readutmp (Makefile.am): Likewise.
2746         * modules/realloc (Makefile.am): Likewise.
2747         * modules/regex (Makefile.am): Likewise.
2748         * modules/rename (Makefile.am): Likewise.
2749         * modules/rename-dest-slash (Makefile.am): Likewise.
2750         * modules/rijndael (Makefile.am): Likewise.
2751         * modules/rmdir (Makefile.am): Likewise.
2752         * modules/rpmatch (Makefile.am): Likewise.
2753         * modules/safe-read (Makefile.am): Likewise.
2754         * modules/safe-write (Makefile.am): Likewise.
2755         * modules/same (Makefile.am): Likewise.
2756         * modules/save-cwd (Makefile.am): Likewise.
2757         * modules/savedir (Makefile.am): Likewise.
2758         * modules/setenv (Makefile.am): Likewise.
2759         * modules/settime (Makefile.am): Likewise.
2760         * modules/sha1 (Makefile.am): Likewise.
2761         * modules/sig2str (Makefile.am): Likewise.
2762         * modules/snprintf (Makefile.am): Likewise.
2763         * modules/stdlib-safer (Makefile.am): Likewise.
2764         * modules/stpcpy (Makefile.am): Likewise.
2765         * modules/stpncpy (Makefile.am): Likewise.
2766         * modules/strcase (Makefile.am): Likewise.
2767         * modules/strcasestr (Makefile.am): Likewise.
2768         * modules/strchrnul (Makefile.am): Likewise.
2769         * modules/strcspn (Makefile.am): Likewise.
2770         * modules/strdup (Makefile.am): Likewise.
2771         * modules/strerror (Makefile.am): Likewise.
2772         * modules/strftime (Makefile.am): Likewise.
2773         * modules/strndup (Makefile.am): Likewise.
2774         * modules/strnlen (Makefile.am): Likewise.
2775         * modules/strpbrk (Makefile.am): Likewise.
2776         * modules/strsep (Makefile.am): Likewise.
2777         * modules/strstr (Makefile.am): Likewise.
2778         * modules/strtod (Makefile.am): Likewise.
2779         * modules/strtoimax (Makefile.am): Likewise.
2780         * modules/strtok_r (Makefile.am): Likewise.
2781         * modules/strtol (Makefile.am): Likewise.
2782         * modules/strtoll (Makefile.am): Likewise.
2783         * modules/strtoul (Makefile.am): Likewise.
2784         * modules/strtoull (Makefile.am): Likewise.
2785         * modules/strtoumax (Makefile.am): Likewise.
2786         * modules/strverscmp (Makefile.am): Likewise.
2787         * modules/time_r (Makefile.am): Likewise.
2788         * modules/timegm (Makefile.am): Likewise.
2789         * modules/tmpfile-safer (Makefile.am): Likewise.
2790         * modules/unistd-safer (Makefile.am): Likewise.
2791         * modules/unlinkdir (Makefile.am): Likewise.
2792         * modules/userspec (Makefile.am): Likewise.
2793         * modules/utime (Makefile.am): Likewise.
2794         * modules/utimecmp (Makefile.am): Likewise.
2795         * modules/utimens (Makefile.am): Likewise.
2796         * modules/vasnprintf (Makefile.am): Likewise.
2797         * modules/vasprintf (Makefile.am): Likewise.
2798         * modules/vsnprintf (Makefile.am): Likewise.
2799         * modules/xalloc (Makefile.am): Likewise.
2800         * modules/xgetcwd (Makefile.am): Likewise.
2801         * modules/xnanosleep (Makefile.am): Likewise.
2802         * modules/xreadlink (Makefile.am): Likewise.
2803         * modules/xstrtod (Makefile.am): Likewise.
2804         * modules/xstrtol (Makefile.am): Likewise.
2805         * modules/xstrtold (Makefile.am): Likewise.
2806         * modules/yesno (Makefile.am): Likewise.
2807
2808 2006-10-12  Jim Meyering  <jim@meyering.net>
2809
2810         * m4/getloadavg.m4: Revert the change below.
2811
2812         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
2813         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
2814         fail with a symlink, which is what coreutils' ./bootstrap now
2815         creates by default.
2816
2817 2006-10-12  Bruno Haible  <bruno@clisp.org>
2818
2819         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
2820         mingw.
2821         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
2822         MSVC and mingw explicitly.
2823
2824 2006-10-11  Simon Josefsson  <jas@extundo.com>
2825             Bruno Haible  <bruno@clisp.org>
2826
2827         Add support for multiple gnulib-tool invocations in the scope of a
2828         single configure.ac file.
2829         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
2830         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
2831         with the same contents as the _LIBADD variable.
2832         (func_emit_initmacro_start, func_emit_initmacro_end,
2833         func_emit_initmacro_done): New functions.
2834         (func_import, func_create_testdir): Invoke them. Allow the identifiers
2835         gl_LIBOBJS and gl_LTLIBOBJS.
2836
2837 2006-10-11  Bruno Haible  <bruno@clisp.org>
2838
2839         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
2840         (func_create_testdir): Don't create po/Makefile.am, don't invoke
2841         autoreconf. Instead, invoke autopoint explicitly but move back the
2842         *.m4 files from gnulib.
2843
2844 2006-10-11  Bruno Haible  <bruno@clisp.org>
2845
2846         * gnulib-tool (func_usage): Make module names after --create-testdir
2847         optional.
2848         (func_create_testdir): If no module was specified, use nearly all
2849         modules.
2850
2851 2006-10-12  Jim Meyering  <jim@meyering.net>
2852
2853         Big performance improvement for fts-based tools that use FTS_NOSTAT.
2854         Avoid spurious inode-mismatch problems on non-POSIX file systems.
2855         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
2856         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
2857         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
2858         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
2859         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
2860         (fts_set_stat_required): New function.
2861         (fts_open): Defer the calls to fts_stat, if possible or requested.
2862         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
2863         into fts_stat itself.
2864         (fts_read): Perform any required (deferred) fts_stat call.
2865         (fts_build): Likewise, for the directory we're about to open and read.
2866         In the readdir loop, carefully decide whether each entry will require
2867         an eventual call to fts_stat, using dirent.d_type info if available.
2868         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
2869         a command line argument into this function.  Update all callers.
2870         Map a return value of FTS_DOT to FTS_D for a command line argument.
2871         * modules/fts (Depends-on): Add d-type.  Alphabetize.
2872         Thanks to Miklos Szeredi for his tenacity and for the initial
2873         bug report about "find" failing on a FUSE-based file system.
2874
2875         * lib/fts.c (fts_open): Use consistent indentation.
2876
2877 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2878
2879         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
2880         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
2881         reported by Jim Meyering.  All uses of cache variables renamed
2882         to match Autoconf's.
2883         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
2884         the other one.
2885
2886         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
2887         Fix misspelling in diagnostic.
2888
2889 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2890
2891         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
2892         defined.  Problem reported by Matthew Woehlke.
2893
2894         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
2895         Add support for Tandem NonStop R series.
2896         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
2897         Use new macro.
2898
2899         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
2900         (has_trailing_slash): Omit size arg; all callers changed.
2901         Omit 'inline', since it doesn't help performance and we'd
2902         need to configure it.
2903         Don't count //, ///, etc. as having a trailing slash.
2904         As a side effect, this removes a C99ism reported by Matthew Woehlke.
2905         (rpl_rename_dest_slash): On failure, use rename's errno rather
2906         than (in some cases) an incorrect or junk errno.
2907         Simplify code by removing need to compute length; this does
2908         cause it to make two passes instead of one over the file name,
2909         but it's worth it.
2910
2911         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
2912         change, since Autoconf's version may no longer be appropriate now
2913         that we are using CVS Autoconf's version.  Add support for Tandem.
2914
2915 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
2916             Bruno Haible  <bruno@clisp.org>
2917
2918         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
2919         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
2920         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
2921         gl_AC_TYPE_LONG_LONG.
2922
2923         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
2924         instead of HAVE_LONG_LONG.
2925         * lib/printf-args.c (printf_fetchargs): Likewise.
2926         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
2927         * lib/vasnprintf.c (VASNPRINTF): Likewise.
2928         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
2929         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
2930         gl_AC_TYPE_LONG_LONG.
2931
2932 2006-10-11  Bruno Haible  <bruno@clisp.org>
2933
2934         * m4/longlong.m4: Add comments.
2935         * m4/ulonglong.m4: Likewise.
2936
2937 2006-10-10  Bruno Haible  <bruno@clisp.org>
2938
2939         Make it possible to #define stpcpy, strdup to aliases.
2940         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
2941         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
2942
2943 2006-10-10  Bruno Haible  <bruno@clisp.org>
2944
2945         Make it possible to #define gcd to an alias.
2946         * lib/gcd.c: Include config.h.
2947
2948 2006-10-10  Bruno Haible  <bruno@clisp.org>
2949
2950         Make it possible to #define c_isascii to an alias.
2951         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
2952         defined. Undefine the macros before defining them, to avoid gcc
2953         warnings.
2954         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
2955         define NO_C_CTYPE_MACROS early.
2956
2957 2006-10-10  Bruno Haible  <bruno@clisp.org>
2958
2959         Make it possible to #define set_program_name to an alias.
2960         * lib/progname.c: Don't undefine set_program_name; instead, undefine
2961         ENABLE_RELOCATABLE early.
2962
2963 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
2964
2965         Port to Tandem NSK OSS, which has 64-bit signed int but at most
2966         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
2967         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
2968         More generally, don't assume that 64-bit signed int is available
2969         if unsigned int is, and vice versa.
2970         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
2971         unsigned symbols, not on their signed counterparts.
2972         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
2973         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
2974         (UINT64_C, UINTMAX_C):
2975         Likewise.
2976         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
2977         unsigned counterparts.
2978         (Have_long_long, Unsigned): New macros.
2979         (Int): Renamed from INT.
2980         (strtoimax): Use the new macros.
2981         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
2982         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
2983         * modules/inttypes (inttypes.h): Substitute
2984         HAVE_UNSIGNED_LONG_LONG_INT.
2985         * modules/stdint (stdint.h): Likewise.
2986         (Files): Add m4/ulonglong.m4.
2987
2988 2006-10-10  Bruno Haible  <bruno@clisp.org>
2989
2990         Fix a gcc -Wshadow warning.
2991         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
2992         to 'bucket'.
2993         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
2994         gl_linked_indexof_from_to): Likewise.
2995         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
2996         Likewise.
2997         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
2998         Likewise.
2999         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3000         Reported by Eric Blake.
3001
3002 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3003
3004         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3005         for NetBSD.  Problem reported by Bruno Haible.
3006
3007 2006-10-09  Jim Meyering  <jim@meyering.net>
3008
3009         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3010         Patch from Bruno Haible.
3011
3012 2006-10-09  Jim Meyering  <jim@meyering.net>
3013
3014         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3015         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3016         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3017
3018 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3019
3020         Don't include <config.h> twice; this doesn't work in some cases,
3021         e.g., when config.h has "#define intmax_t long long int" and
3022         we include <config.h>, <inttypes.h>, <config.h> in that order.
3023         Problem reported by Matthew Woehlke in:
3024         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3025         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3026         * lib/fts-cycle.c: Don't include config.h.
3027         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3028         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3029         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3030         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3031         inttypes.h.
3032         * lib/xstrtoumax.c: Likewise.
3033         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3034         __strtol and the like, so that this module is more like its siblings.
3035         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3036         Remove; no longer needed now that we assume gnulib inttypes.h.
3037
3038 2006-10-08  Bruno Haible  <bruno@clisp.org>
3039
3040         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3041         option.
3042
3043 2006-10-07  Jim Meyering  <jim@meyering.net>
3044
3045         * modules/inttypes (inttypes.h): Revert what seems to have been
3046         an inadvertent part of today's change: use "|", not "/" in the
3047         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3048
3049 2006-10-07  Bruno Haible  <bruno@clisp.org>
3050
3051         * modules/sublist: New file.
3052
3053 2006-10-07  Bruno Haible  <bruno@clisp.org>
3054
3055         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3056         * modules/argz (argz.h): Likewise.
3057         * modules/arpa_inet (arpa/inet.h): Likewise.
3058         * modules/byteswap (byteswap.h): Likewise.
3059         * modules/configmake (configmake.h): Likewise.
3060         * modules/fcntl (fcntl.h): Likewise.
3061         * modules/fnmatch (fnmatch.h): Likewise.
3062         * modules/getopt (getopt.h): Likewise.
3063         * modules/glob (glob.h): Likewise.
3064         * modules/inttypes (inttypes.h): Likewise.
3065         * modules/netinet_in (netinet/in.h): Likewise.
3066         * modules/poll (poll.h): Likewise.
3067         * modules/stdbool (stdbool.h): Likewise.
3068         * modules/stdint (stdint.h): Likewise.
3069         * modules/sys_select (sys/select.h): Likewise.
3070         * modules/sys_socket (sys/socket.h): Likewise.
3071         * modules/sys_stat (sys/stat.h): Likewise.
3072         * modules/sysexits (sysexits.h): Likewise.
3073         * modules/unistd (unistd.h): Likewise.
3074         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3075         Add a "DO NOT EDIT" comment to the generated file.
3076         (func_import): Likewise for gnulib-comp.m4.
3077
3078 2006-10-07  Bruno Haible  <bruno@clisp.org>
3079
3080         * lib/gl_sublist.h: New file.
3081         * lib/gl_sublist.c: New file.
3082
3083 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3084
3085         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3086         name (relative to the original working directory) and the file
3087         name component (relative to the temporary working directory).  All
3088         callers changed.
3089         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3090         * lib/mkdir-p.c (make_dir_parents): Likewise.
3091         * lib/mkdir-p.h (make_dir_parents): Likewise.
3092
3093 2006-10-06  Eric Blake  <ebb9@byu.net>
3094
3095         Define several macros for use by the clean-temp module.
3096         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3097         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3098         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3099
3100         * lib/clean-temp.h (close_stream_temp): New declaration.
3101         * lib/clean-temp.c (includes): Pull in headers according to what
3102         other modules are in use.
3103         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3104
3105 2006-10-06  Bruno Haible  <bruno@clisp.org>
3106
3107         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3108         instead of fopen, fwriteerror.
3109
3110 2006-10-06  Bruno Haible  <bruno@clisp.org>
3111
3112         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3113         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3114         int.
3115         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3116         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3117         Return an error indicator.
3118         Suggested by Eric Blake.
3119
3120 2006-10-06  Bruno Haible  <bruno@clisp.org>
3121
3122         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3123         Reported by Eric Blake.
3124
3125 2006-10-06  Bruno Haible  <bruno@clisp.org>
3126
3127         * modules/closeout (Description): Mention stderr too.
3128
3129 2006-10-06  Bruno Haible  <bruno@clisp.org>
3130         and Paul Eggert  <eggert@cs.ucla.edu>
3131
3132         * lib/closeout.c (close_stdout): Also close stderr.
3133         * lib/closeout.h: Update comment.
3134
3135 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3136
3137         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3138         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3139         * lib/dirchownmod.c: Include lchown.h.
3140         * lib/lchown.c: Don't include files that lchown.h now includes.
3141         Don't declare chown, since lchown.h now does that.
3142         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3143         (lchown): Define to rpl_chown if lchown is declared but
3144         does not exist.  Declare using a prototype if lchown is not
3145         declared.  Add a copyright notice.
3146         * lib/mkstemp.h: Include <unistd.h>.
3147         * lib/openat.c: Include lchown.h.
3148
3149         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3150         we now test for that separately.
3151         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3152         rather than O_NOFOLLOW, when testing whether it's possible to
3153         avoid a race condition reliably.
3154         * lib/savewd.c (savewd_chdir): Likewise.
3155
3156         Remove macros that are no longer needed now that stdint.h is
3157         reliable.
3158         * lib/fsusage.c (UINTMAX_MAX): Remove.
3159         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3160         * lib/utimecmp.c (SIZE_MAX): Remove.
3161
3162         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3163
3164         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3165         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3166         O_NOATIME works.
3167
3168 2006-10-05  Bruno Haible  <bruno@clisp.org>
3169
3170         * lib/gl_list.h (gl_sortedlist_search_from_to,
3171         gl_sortedlist_indexof_from_to): New declarations.
3172         (gl_list_implementation): New fields sortedlist_search_from_to,
3173         sortedlist_indexof_from_to.
3174         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3175         inline functions.
3176         * lib/gl_list.c (gl_sortedlist_search_from_to,
3177         gl_sortedlist_indexof_from_to): New functions.
3178         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3179         function.
3180         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3181         (gl_array_sortedlist_search_from_to): New function.
3182         (gl_array_list_implementation): Update.
3183         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3184         function.
3185         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3186         (gl_carray_sortedlist_search_from_to): New function.
3187         (gl_carray_list_implementation): Update.
3188         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3189         gl_linked_sortedlist_indexof_from_to): New functions.
3190         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3191         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3192         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3193         gl_tree_sortedlist_indexof_from_to): New functions.
3194         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3195         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3196         Update.
3197         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3198         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3199         Update.
3200
3201 2006-10-05  Bruno Haible  <bruno@clisp.org>
3202
3203         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3204         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3205         (struct gl_list_implementation): Add fields search_from_to,
3206         indexof_from_to. Remove fields search, indexof.
3207         (gl_list_search): Use the search_from_to method.
3208         (gl_list_search_from, gl_list_search_from_to): New functions.
3209         (gl_list_indexof): Use the indexof_from_to method.
3210         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3211         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3212         (gl_list_search_from, gl_list_search_from_to): New functions.
3213         (gl_list_indexof): Use the indexof_from_to method.
3214         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3215         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3216         gl_array_indexof. Add start_index, end_index arguments.
3217         (gl_array_search_from_to): Renamed from gl_array_search. Add
3218         start_index, end_index arguments.
3219         (gl_array_remove, gl_array_list_implementation): Update.
3220         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3221         gl_carray_indexof. Add start_index, end_index arguments.
3222         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3223         start_index, end_index arguments.
3224         (gl_carray_remove, gl_carray_list_implementation): Update.
3225         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3226         gl_linked_search. Add start_index, end_index arguments.
3227         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3228         start_index, end_index arguments.
3229         (gl_linked_remove): Update.
3230         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3231         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3232         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3233         field to 'size_t'.
3234         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3235         gl_tree_search. Add start_index, end_index arguments.
3236         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3237         start_index, end_index arguments.
3238         (gl_tree_remove): Update.
3239         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3240         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3241         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3242         function.
3243         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3244         gl_tree_search. Add start_index, end_index arguments.
3245         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3246         start_index, end_index arguments.
3247         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3248         Update.
3249         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3250
3251 2006-10-05  Bruno Haible  <bruno@clisp.org>
3252
3253         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3254
3255         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3256         fwriteerror_temp): New declarations.
3257         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3258         (descriptors): New variable.
3259         (cleanup): First, close the descriptors.
3260         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3261         fclose_temp, fwriteerror_temp): New functions.
3262
3263 2006-10-04  Jim Meyering  <jim@meyering.net>
3264
3265         * lib/fts.c (fts_open): Tiny comment change.
3266
3267 2006-10-04  Bruno Haible  <bruno@clisp.org>
3268
3269         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3270         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3271         gl_LOCK_BODY.
3272         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3273         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3274         gl_LOCK_EARLY_BODY.
3275         (gl_LOCK): Require gl_LOCK_BODY.
3276
3277 2006-10-04  Bruno Haible  <bruno@clisp.org>
3278
3279         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3280         (gl_oset_search_atleast): New declaration.
3281         (struct gl_oset_implementation): Add field 'search_atleast'.
3282         (gl_oset_search_atleast): New inline function.
3283         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3284         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3285         (gl_array_oset_implementation): Update.
3286         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3287         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3288         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3289
3290 2006-10-04  Bruno Haible  <bruno@clisp.org>
3291
3292         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3293
3294 2006-10-03  Bruno Haible  <bruno@clisp.org>
3295
3296         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3297         from gl_avltreehash_list_implementation.
3298
3299 2006-10-03  Bruno Haible  <bruno@clisp.org>
3300
3301         * lib/gl_oset.c (gl_oset_add): Fix return type.
3302
3303 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3304
3305         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3306
3307 2006-10-02  Eric Blake  <ebb9@byu.net>
3308
3309         * modules/strnlen (Depends-on): Add extensions.
3310
3311 2006-10-02  Eric Blake  <ebb9@byu.net>
3312
3313         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3314         definition in 2.60+.
3315
3316 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3317
3318         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3319         checks.
3320
3321 2006-10-02  Bruno Haible  <bruno@clisp.org>
3322
3323         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3324         to the AUTOMAKE_OPTIONS.
3325         Reported by Jim Meyering.
3326
3327 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3328
3329         Work around bug in Solaris 10 /proc file system:
3330         /proc/self/fd/NNN/.. isn't the parent directory of
3331         the directory whose file descriptor is NNN.  This needs to
3332         be worked around at run time, not compile time, since a
3333         program might be built on Solaris 8, where things work, and
3334         run on Solaris 10.
3335         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3336         to use the following interface instead:
3337         (OPENAT_BUFFER_SIZE): New macro.
3338         (openat_proc_name): New function.
3339         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3340         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3341         Likewise.
3342         * lib/openat-proc.c: New file.
3343         * modules/openat (Files): Add lib/openat-proc.c.
3344         (Depends-on): Add same-inode, stdbool.
3345         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3346
3347 2006-09-29  Bruno Haible  <bruno@clisp.org>
3348
3349         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3350         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3351         argument. Set stdout_closed before testing for ferror, not after.
3352         (fwriteerror, fwriteerror_no_ebadf): New functions.
3353
3354 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3355
3356         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3357
3358 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
3359
3360         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3361         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3362
3363 2006-09-28  Jim Meyering  <jim@meyering.net>
3364
3365         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3366         Include <unistd.h>.
3367
3368 2006-09-28  Bruno Haible  <bruno@clisp.org>
3369
3370         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3371         * modules/linkedhash-list (Depends-on): Likewise.
3372         * modules/rbtreehash-list (Depends-on): Likewise.
3373
3374 2006-09-28  Bruno Haible  <bruno@clisp.org>
3375
3376         * lib/strndup.h: Simplify the redefinition of strndup.
3377         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3378         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3379
3380 2006-09-28  Bruno Haible  <bruno@clisp.org>
3381
3382         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3383         * lib/gl_linkedhash_list.c: Likewise.
3384         * lib/gl_rbtreehash_list.c: Likewise.
3385
3386 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3387
3388         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3389         getaddrinfo.
3390
3391         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3392         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3393         it causes <stdio_ext.h> to cause a compile-time error.
3394         Problem reported by Nelson H. F. Beebe.
3395         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3396         of HAVE_DECL___PENDING.
3397
3398         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3399         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3400         declaration.
3401
3402 2006-09-27  Jim Meyering  <jim@meyering.net>
3403
3404         This file could end up with a definition for a function
3405         named __strndup, rather than rpl_strndup on a system with
3406         incomplete weak_alias support.
3407         * lib/strndup.c (strndup): Rename from __strndup.
3408         Remove #defines that used to map __strndup to strndup.
3409         Don't use K&R prototypes.
3410         Remove LIBC-related code, since this file is not sync'd with glibc.
3411         * lib/strndup.h: Revamp, accordingly.
3412         * m4/strndup.m4: Modernize.
3413
3414 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3415
3416         * modules/savewd (Depends-on): Add 'raise'.
3417         * lib/savewd.c: Include <signal.h>, for 'raise'.
3418
3419 2006-09-26  Jim Meyering  <jim@meyering.net>
3420
3421         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3422         when we detect Darwin 8.7.0's acl_get_file bug.
3423         Rearrange to perform the new (below) run-test while $LIBS
3424         contains any acl-related library.  Set USE_ACL at the end.
3425         (gl_ACL_GET_FILE): New function.
3426
3427 2006-09-26  Eric Blake  <ebb9@byu.net>
3428
3429         * lib/verror.c: Include <config.h> unconditionally.
3430
3431 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3432
3433         * modules/clock-time (Maintainer): Add self.
3434         * modules/getlogin_r (Depends-on): Add extensions.
3435
3436 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3437
3438         * modules/clock-time: New module.
3439         * modules/nanosleep (Depends-on): Add clock-time.
3440         * modules/gethrxtime (Depends-on): Likewise.
3441         * modules/gettime (Depends-on): Likewise.
3442         * modules/settime (Depends-on): Likewise.
3443
3444         * modules/fts-lgpl: Depend on openat.
3445         * modules/mkancesdirs: Depend on savewd.
3446         * modules/mkdir-p: Likewise.
3447
3448 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3449
3450         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3451
3452         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3453         `gl_have_arbitrary_file_name_length_limit' to
3454         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3455         actually works between configure runs.
3456
3457 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3458             Bruno Haible  <bruno@clisp.org>
3459
3460         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3461
3462 2006-09-25  Jim Meyering  <jim@meyering.net>
3463
3464         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3465         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3466
3467 2006-09-25  Eric Blake  <ebb9@byu.net>
3468
3469         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3470         exec's in 2006-09-18 patch when shuffling fds.
3471
3472 2006-09-25  Bruno Haible  <bruno@clisp.org>
3473
3474         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3475         Reported by Jim Meyering.
3476
3477 2006-09-24  Jim Meyering  <jim@meyering.net>
3478
3479         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3480         compare a pointer against a literal "0".  That caused failures with
3481         at least HP-UX's hpcc.
3482
3483 2006-09-22  Simon Josefsson  <jas@extundo.com>
3484
3485         * modules/gc-sha1:
3486         * modules/gc-md4:
3487         * modules/gc-hmac-sha1:
3488         * modules/gc-hmac-md5:
3489         * modules/gc-des:
3490         * modules/gc-arcfour: Distribute more files.
3491
3492 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3493
3494         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3495         (gl_linked_iterator_from_to): Initialize struct completely.
3496         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3497         (gl_tree_iterator_from_to): Likewise
3498         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3499         * lib/gl_array_list.c [lint] (gl_array_iterator)
3500         (gl_array_iterator_from_to): Likewise.
3501         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
3502         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
3503         (gl_carray_iterator_from_to): Likewise.
3504
3505         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
3506         * lib/md4.c (md4_process_block): Remove unused variable.
3507         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
3508         parentheses for clarity.
3509
3510 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3511
3512         * modules/bison-i18n (Depends-on): Add gettext.
3513
3514 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3515
3516         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
3517         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
3518         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
3519         also add missing comma that caused broken test.
3520         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
3521         stdlib.h, for `abort'.
3522         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
3523         variables.
3524         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
3525         include unistd.h if present, for `rmdir'.
3526         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
3527         variables.
3528         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
3529         in the process include standard headers for prototypes.
3530         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
3531         gets declared on GNU/Linux.
3532         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
3533         unistd.h, for `rmdir'.
3534         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
3535
3536         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
3537         always true.
3538         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
3539
3540         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
3541
3542 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3543
3544         * gnulib-tool (func_version): Create output all at once.  This
3545         may help avoid triggering unnecessary SIGPIPEs, and at any
3546         rate it doesn't hurt.
3547
3548 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3549             Bruno Haible  <bruno@clisp.org>
3550
3551         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
3552         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3553         * m4/signed.m4 (bh_C_SIGNED): Likewise.
3554
3555         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
3556         (gl_FUNC_VASPRINTF): Invoke it.
3557
3558 2006-09-22  Bruno Haible  <bruno@clisp.org>
3559
3560         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
3561         getloadavg.c as first argument.
3562
3563 2006-09-22  Bruno Haible  <bruno@clisp.org>
3564
3565         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
3566         at the beginning of the gl_INIT macro.
3567         * modules/getloadavg (configure.ac): Pass $gl_source_base to
3568         gl_GETLOADAVG.
3569
3570 2006-09-22  Bruno Haible  <bruno@clisp.org>
3571
3572         * gnulib-tool (func_create_megatestdir): Don't include the config-h
3573         module.
3574         Suggested by Ralf Wildenhues.
3575
3576 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
3577
3578         Import this patch from libc:
3579
3580         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
3581
3582         * lib/regex_internal.c (re_string_reconstruct): Handle
3583         offset < pstr->valid_raw_len && pstr->offsets_needed case.
3584         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
3585         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
3586         re_string_context_at.
3587
3588         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
3589         now requires it.
3590         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
3591         gl_REGEX now does it for us.
3592         (gl_REGEX): Add test taken from
3593         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
3594
3595         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
3596         Check that large offsets work.  Modernize Autoconf usages.
3597         Prefer "yes" to mean a good thing rather than a bad.
3598         Don't put "#define mkstemp" in config.h, as this might interfere
3599         with standard system headers that "#define mkstemp mkstemp64".
3600
3601         * modules/mkstemp (Depends-on): Add extensions, so that
3602         mkstemp is visible on some platforms.
3603         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
3604         (Include): Change to "mkstemp.h" from <stdlib.h>.
3605         (Files): Add mkstemp.h.
3606
3607         * lib/mkstemp.h: New file, since some standard headers
3608         #define mkstemp.
3609         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
3610         Include "mkstemp.h".
3611         Make the _LIBC code resemble glibc original more,
3612         e.g., use K&R style.
3613         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
3614         (mkstemp): Remove, since mkstemp.h does this for us.
3615         * lib/stdlib--.h: Include mkstemp.h.
3616
3617         Import this patch from libc:
3618
3619         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3620
3621         * lib/tempname.c (__gen_tempname): Change attempts_min
3622         into a macro.  Use preprocessor to decide how to initialize
3623         attempts [Coverity CID 67].
3624
3625 2006-09-20  Bruno Haible  <bruno@clisp.org>
3626
3627         * lib/mkdtemp.c: Import from libc.
3628         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3629                 * sysdeps/posix/tempname.c (__gen_tempname): Change
3630                 attempts_min into a macro.  Use preprocessor to decide how to
3631                 initialize attempts [Coverity CID 67].
3632         2001-11-27  Paul Eggert  <eggert@twinsun.com>
3633                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
3634                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
3635
3636 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3637
3638         * gnulib-tool (func_exit): New function, to allow to pass the
3639         exit status portably through the trap.  Use everywhere.
3640         (--help, --version): Signal a write error.
3641         (trap): catch SIGPIPE, for write errors.
3642         Exit at the end of the trap, with the correct exit status.
3643
3644 2006-09-19  Karl Berry  <karl@gnu.org>
3645
3646         * doc/gnulib.texi: note about the license texinfo files.
3647
3648 2006-09-19  Eric Blake  <ebb9@byu.net>
3649
3650         * gnulib-tool: Avoid space-tab.
3651
3652 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3653
3654         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
3655         that prevented coreutils 6.1 from building.  Problem reported
3656         by Petter Reinholdtsen.
3657
3658 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3659
3660         * gnulib-tool (avoidlist): Fix typo that broke options like
3661         --avoid=lock that are used by coreutils bootstrap.
3662
3663 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
3664
3665         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
3666         more systematically.
3667
3668 2006-09-18  Jim Meyering  <jim@meyering.net>
3669
3670         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
3671
3672 2006-09-18  Bruno Haible  <bruno@clisp.org>
3673
3674         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
3675
3676 2006-09-18  Bruno Haible  <bruno@clisp.org>
3677
3678         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
3679         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
3680         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
3681         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
3682         * m4/gettext.m4: Require autoconf >= 2.52.
3683         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
3684         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
3685         of gl_cv_header_inttypes_h.
3686
3687 2006-09-18  Bruno Haible  <bruno@clisp.org>
3688
3689         * lib/javaversion.c: Include configmake.h.
3690
3691 2006-09-18  Bruno Haible  <bruno@clisp.org>
3692
3693         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
3694         avoid that the while loops be executed in a subshell.
3695
3696 2006-09-18  Bruno Haible  <bruno@clisp.org>
3697
3698         * MODULES.html.sh (func_module): Break long lines.
3699         Suggested by Bruce Korb <bkorb@gnu.org>.
3700
3701 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3702
3703         Speed up by a factor of 1.12.
3704         * gnulib-tool (nl): New variable.
3705         (func_import): Rewrite include directive extraction to only read each
3706         directive once.
3707
3708 2006-09-17  Bruno Haible  <bruno@clisp.org>
3709
3710         * modules/javaversion (Makefile.am): Remove DEFS setting.
3711         (Depends-on): Add configmake, for PKGDATADIR definition.
3712
3713 2006-09-17  Bruno Haible  <bruno@clisp.org>
3714
3715         * gnulib-tool (func_create_testdir): Rewrite all files at once.
3716
3717 2006-09-17  Bruno Haible  <bruno@clisp.org>
3718
3719         * gnulib-tool (func_append): New function, stolen from libtool.m4.
3720         (func_modules_transitive_closure, func_modules_add_dummy,
3721         func_modules_to_filelist, func_import, func_create_testdir,
3722         func_create_megatestdir, ...): Use it wherever possible.
3723         Suggested by Ralf Wildenhues.
3724
3725 2006-09-16  Karl Berry  <karl@gnu.org>
3726
3727         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
3728         to avoid sectioning errors.
3729         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
3730         [ifinfo]: blank line after @center-ed titles.
3731         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
3732         Spell FSF address consistently with others.
3733         (These changes approved by rms.)
3734
3735 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3736
3737         Speed up by a factor of 1.61.
3738         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
3739         already checked module names again.
3740
3741 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3742
3743         Speed up by a factor of 1.13.
3744         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
3745         for new_files, and the input to func_add_or_update.
3746
3747 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3748
3749         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
3750         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
3751
3752 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3753
3754         * modules/mkancesdirs (Depends-on): Add fcntl.
3755         * modules/savewd: New file.
3756         * MODULES.html.sh (File system functions): Add savewd.
3757
3758         * modules/configmake (Makefile.am): Add support for the
3759         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
3760
3761 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3762
3763         * m4/savewd.m4: New file.
3764
3765 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3766
3767         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
3768         (dirchownmod): New arg FD.  All callers changed.
3769         Use FD rather than opening the directory ourself, as opening is
3770         now the caller's responsibility.
3771         * lib/dirchownmod.h: Likewise.
3772         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
3773         hosts that require <sys/types.h> before <sys/stat.h>.  Include
3774         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
3775         (test_dir): Remove.
3776         (mkancesdirs): Return length of prefix of FILE that has already
3777         been made, or -2 if there is a child doing the work.  Redo
3778         algorithm so that it is O(N) rather than O(N**2).  Optimize away
3779         ".", and treat ".." specially since it might stray back into
3780         already-created areas.  Use a subprocess if necessary.  New arg
3781         WD; all users changed.  MAKE_DIR function should now return 1
3782         if it creates a directory that is not readable.  Return -2 if
3783         a child process is spun off.
3784         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
3785         Adjust signature to match code.
3786         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
3787         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
3788         all users changed.
3789         * lib/savewd.c, lib/savewd.h: New files.
3790
3791 2006-09-15  Jim Meyering  <jim@meyering.net>
3792
3793         * modules/rename-dest-slash: New module.
3794         * MODULES.html.sh (posix_compat): Add it here.
3795
3796         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
3797
3798 2006-09-15  Jim Meyering  <jim@meyering.net>
3799
3800         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
3801         file.
3802
3803         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
3804
3805 2006-09-15  Jim Meyering  <jim@meyering.net>
3806
3807         * lib/rename-dest-slash.c (has_trailing_slash): Use
3808         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
3809         (rpl_rename_dest_slash): Perform the cheaper trailing slash
3810         test before testing whether SRC is a directory.
3811         Suggestions from Bruno Haible.
3812
3813         Avoid a warning about an unused variable.
3814         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
3815         into the #ifdef block where it's used.
3816
3817         * lib/rename-dest-slash.c: New file.
3818
3819 2006-09-14  Bruno Haible  <bruno@clisp.org>
3820
3821         * lib/allocsa.c: Include <config.h> unconditionally.
3822         * lib/asnprintf.c: Likewise.
3823         * lib/asprintf.c: Likewise.
3824         * lib/c-strcasecmp.c: Likewise.
3825         * lib/c-strcasestr.c: Likewise.
3826         * lib/c-strncasecmp.c: Likewise.
3827         * lib/c-strstr.c: Likewise.
3828         * lib/classpath.c: Likewise.
3829         * lib/clean-temp.c: Likewise.
3830         * lib/concatpath.c: Likewise.
3831         * lib/copy-file.c: Likewise.
3832         * lib/csharpcomp.c: Likewise.
3833         * lib/csharpexec.c: Likewise.
3834         * lib/execute.c: Likewise.
3835         * lib/fatal-signal.c: Likewise.
3836         * lib/findprog.c: Likewise.
3837         * lib/fwriteerror.c: Likewise.
3838         * lib/gl_array_list.c: Likewise.
3839         * lib/gl_array_oset.c: Likewise.
3840         * lib/gl_avltree_list.c: Likewise.
3841         * lib/gl_avltree_oset.c: Likewise.
3842         * lib/gl_avltreehash_list.c: Likewise.
3843         * lib/gl_carray_list.c: Likewise.
3844         * lib/gl_linked_list.c: Likewise.
3845         * lib/gl_linkedhash_list.c: Likewise.
3846         * lib/gl_list.c: Likewise.
3847         * lib/gl_oset.c: Likewise.
3848         * lib/gl_rbtree_list.c: Likewise.
3849         * lib/gl_rbtree_oset.c: Likewise.
3850         * lib/gl_rbtreehash_list.c: Likewise.
3851         * lib/imaxabs.c: Likewise.
3852         * lib/imaxdiv.c: Likewise.
3853         * lib/javacomp.c: Likewise.
3854         * lib/javaexec.c: Likewise.
3855         * lib/javaversion.c: Likewise.
3856         * lib/linebreak.c: Likewise.
3857         * lib/localcharset.c: Likewise.
3858         * lib/lock.c: Likewise.
3859         * lib/mbchar.c: Likewise.
3860         * lib/mbswidth.c: Likewise.
3861         * lib/mkdtemp.c: Likewise.
3862         * lib/pipe.c: Likewise.
3863         * lib/printf-args.c: Likewise.
3864         * lib/printf-parse.c: Likewise.
3865         * lib/progname.c: Likewise.
3866         * lib/progreloc.c: Likewise.
3867         * lib/readlink.c: Likewise.
3868         * lib/sh-quote.c: Likewise.
3869         * lib/stpcpy.c: Likewise.
3870         * lib/stpncpy.c: Likewise.
3871         * lib/strcasecmp.c: Likewise.
3872         * lib/strcasestr.c: Likewise.
3873         * lib/strcspn.c: Likewise.
3874         * lib/striconv.c: Likewise.
3875         * lib/strncasecmp.c: Likewise.
3876         * lib/strnlen1.c: Likewise.
3877         * lib/strstr.c: Likewise.
3878         * lib/strtok_r.c: Likewise.
3879         * lib/tls.c: Likewise.
3880         * lib/tmpdir.c: Likewise.
3881         * lib/unicodeio.c: Likewise.
3882         * lib/unsetenv.c: Likewise.
3883         * lib/vasnprintf.c: Likewise.
3884         * lib/vasprintf.c: Likewise.
3885         * lib/wait-process.c: Likewise.
3886         * lib/xallocsa.c: Likewise.
3887         * lib/xsetenv.c: Likewise.
3888         * lib/xstriconv.c: Likewise.
3889
3890 2006-09-13  Simon Josefsson  <jas@extundo.com>
3891
3892         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
3893         that internally, suggested by Ralf Wildenhues
3894         <Ralf.Wildenhues@gmx.de>.
3895
3896 2006-09-13  Simon Josefsson  <jas@extundo.com>
3897
3898         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
3899         @LIBOBJS@.
3900         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
3901
3902 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
3903
3904         * lib/_fpending.c: Include <config.h> unconditionally, since we no
3905         longer worry about uses that don't define HAVE_CONFIG_H.
3906         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
3907         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
3908         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
3909         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
3910         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
3911         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
3912         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
3913         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
3914         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
3915         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
3916         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
3917         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
3918         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
3919         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
3920         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
3921         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
3922         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
3923         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
3924         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
3925         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
3926         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
3927         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
3928         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
3929         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
3930         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
3931         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
3932         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
3933         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
3934         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
3935         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
3936         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
3937         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
3938         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
3939         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
3940         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
3941         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
3942         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
3943         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
3944         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
3945         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
3946         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
3947         Likewise.
3948
3949 2006-09-13  Eric Blake  <ebb9@byu.net>
3950
3951         * lib/getopt.c: Fix typo in last commit.
3952
3953 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
3954
3955         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
3956         dgettext.
3957
3958 2006-09-12  Jim Meyering  <jim@meyering.net>
3959
3960         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
3961         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
3962         Reported by Nelson H. F. Beebe.
3963
3964 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
3965
3966         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
3967         program_invocation_name and program_invocation_short_name are
3968         initialized.
3969         * lib/argp-namefrob.h: Move declarations of program_invocation_name
3970         and program_invocation_short_name to argp.h, so they are visible
3971         to user programs.
3972         * lib/argp.h: Likewise
3973
3974 2006-09-10  Bruno Haible  <bruno@clisp.org>
3975
3976         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3977         m4/inttypes_h.m4, m4/uintmax_t.m4.
3978
3979 2006-09-10  Bruno Haible  <bruno@clisp.org>
3980
3981         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
3982         gl_AC_TYPE_UINTMAX_T.
3983
3984 2006-09-10  Bruno Haible  <bruno@clisp.org>
3985
3986         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
3987
3988 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
3989
3990         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
3991         convention.  Text proposed by Bruno Haible.
3992         (struct argp_option): Document the use of N_() wrappers.
3993
3994         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
3995         '\v', and translate the two parts separately, instead of feeding
3996         the whole string to gettext.  This allows to exclude
3997         '\v' from the strings visible to the translator by writing doc
3998         strings as N_("..") "\v" N_("..").
3999
4000 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4001
4002         * config/srclist.txt: Undo latest change; the bug was fixed.
4003
4004 2006-09-09  Bruno Haible  <bruno@clisp.org>
4005
4006         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4007         assignments if building a library without libtool.
4008         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4009         in func_emit_lib_Makefile_am.
4010         (func_import): When building a static library libfoo.a, arrange to
4011         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4012         (func_create_testdir): Likewise.
4013         * modules/gc (configure.ac, Makefile.am): If building statically,
4014         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4015         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4016         * modules/striconv (configure.ac, Makefile.am): Likewise.
4017         Based on a suggestion by Ralf Wildenhues.
4018
4019 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4020
4021         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4022         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4023         Also:
4024
4025         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4026         Add year_2050_test to catch glibc bug 2821
4027         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4028
4029         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4030         Prefer #ifdef to #if.
4031
4032         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4033         Return from 'main' instead of calling 'exit'.
4034
4035 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4036
4037         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4038         returned the maximum time_t value rather than (time_t) -1.
4039         Problem originally reported by William Bardwell
4040         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4041
4042         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4043         Moved to here ...
4044         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4045         ... from here.
4046
4047 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4048
4049         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4050         2821 is fixed.
4051
4052 2006-09-08  Jim Meyering  <jim@meyering.net>
4053
4054         Don't make generated files read-only.  That would bother too many
4055         people.  However, do retain the ability to work when targets are
4056         read-only: remove the destination and temporary files before writing
4057         them (when generated via sed or echo), or by using the -f option for
4058         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4059         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4060         * modules/byteswap, modules/configmake, modules/fcntl:
4061         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4062         * modules/localcharset, modules/netinet_in, modules/poll:
4063         * modules/stdbool, modules/stdint, modules/sys_select:
4064         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4065
4066 2006-09-08  Jim Meyering  <jim@meyering.net>
4067
4068         Avoid new build failure on FreeBSD 6.0.
4069         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4070         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4071         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4072
4073 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4074
4075         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4076
4077 2006-09-07  Jim Meyering  <jim@meyering.net>
4078
4079         Fix global typo in last change: use chmod u-w, not chmod u-x.
4080         Spotted by Paul Eggert and Bruce Korb.
4081         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4082         * modules/byteswap, modules/configmake, modules/fcntl:
4083         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4084         * modules/localcharset, modules/netinet_in, modules/poll:
4085         * modules/stdbool, modules/stdint, modules/sys_select:
4086         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4087
4088 2006-09-06  Jim Meyering  <jim@meyering.net>
4089
4090         Make generated files be read-only.
4091         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4092         Ensure that each generated file is now read-only.
4093         * modules/argz: Likewise.
4094         * modules/arpa_inet: Likewise.
4095         * modules/byteswap: Likewise.
4096         * modules/configmake: Likewise.
4097         * modules/fcntl: Likewise.
4098         * modules/fnmatch: Likewise.
4099         * modules/getopt: Likewise.
4100         * modules/glob: Likewise.
4101         * modules/inttypes: Likewise.
4102         * modules/netinet_in: Likewise.
4103         * modules/poll: Likewise.
4104         * modules/stdbool: Likewise.
4105         * modules/stdint: Likewise.
4106         * modules/sys_select: Likewise.
4107         * modules/sys_socket: Likewise.
4108         * modules/sys_stat: Likewise.
4109         * modules/sysexits: Likewise.
4110         * modules/localcharset: Same as above, but continue using temporary
4111         file named "t-$@" (why different?) rather than the "$@-t" used
4112         everywhere else.
4113
4114         * modules/sysexits (Makefile.am): Replace literal occurrences
4115         of "sysexit.h" more readable, and more consistent, "$@".
4116
4117 2006-09-06  Bruno Haible  <bruno@clisp.org>
4118
4119         * modules/striconv: New file.
4120         * modules/xstriconv: New file.
4121         * MODULES.html.sh (Internationalization functions): Add striconv,
4122         xstriconv.
4123
4124 2006-09-06  Bruno Haible  <bruno@clisp.org>
4125
4126         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4127         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4128         not using libtool correctly.
4129
4130 2006-09-06  Bruno Haible  <bruno@clisp.org>
4131
4132         * lib/striconv.h: New file.
4133         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4134         iconvstring.c.
4135         * lib/xstriconv.h: New file.
4136         * lib/xstriconv.c: New file.
4137
4138 2006-09-06  Bruno Haible  <bruno@clisp.org>
4139
4140         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4141         lib_..._LDFLAGS.
4142
4143 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4144
4145         * lib/argz_.h: Sync from Libtool.
4146
4147         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4148                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4149
4150         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4151
4152 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4153
4154         * modules/trim: New file.
4155
4156 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4157
4158         * lib/trim.h: New file.
4159         * lib/trim.c: New file.
4160
4161 2006-09-05  Bruno Haible  <bruno@clisp.org>
4162
4163         * MODULES.html.sh (String handling): Add trim.
4164
4165 2006-09-04  Karl Berry  <karl@gnu.org>
4166
4167         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4168         until next release.
4169
4170 2006-09-03  Bruno Haible  <bruno@clisp.org>
4171
4172         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4173         correctly.
4174
4175 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4176
4177         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4178         not gl_GETLOADAVG.  Omit unneeded semicolons.
4179         Problems reported by Ralf Wildenhues in
4180         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4181         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4182         at the end, which is the usual gnulib style.
4183
4184         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4185         of doing all the work ourselves.
4186         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4187         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4188
4189 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4190
4191         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4192         Problem reported by Ralf Wildenhues in
4193         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4194
4195         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4196         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4197
4198 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4199
4200         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4201         yesterday's patch by changing test -n to test -z.
4202
4203 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4204
4205         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4206         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4207         the former is now obsolescent.
4208
4209         * modules/chdir-long (Depends-on): Add fcntl.
4210
4211 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4212
4213         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4214         obsolescent, and programs should use gnulib instead.
4215         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4216         but with prefixes changed.
4217
4218 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4219
4220         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4221         or stdbool.h, because they might not exist while configuring.
4222
4223         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4224         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4225         does that for us.
4226         (O_DIRECTORY): Remove.
4227
4228 2006-08-31  Eric Blake  <ebb9@byu.net>
4229
4230         * gnulib-tool: Don't let emacs change spaces to TAB.
4231
4232 2006-08-31  Bruno Haible  <bruno@clisp.org>
4233
4234         * gnulib-tool: When calling func_import more than once, do it in a
4235         subshell.
4236         Reported by Eric Blake <ebb9@byu.net>.
4237
4238 2006-08-31  Bruno Haible  <bruno@clisp.org>
4239
4240         * gnulib-tool (nl): Remove variable.
4241         (sed_transform_lib_file): Use more robust test for config-h module.
4242         (func_import): Fix typo in 2006-08-25 patch.
4243
4244 2006-08-31  Bruno Haible  <bruno@clisp.org>
4245
4246         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4247         specified, augment Makefile.am variables instead of assigning them.
4248
4249 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4250
4251         Work around a bug in both the Linux and SunOS 64-bit kernels:
4252         nanosleep mishandles sleeps for longer than 2**31 seconds.
4253         Problem reported by Frank v Waveren in
4254         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4255         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4256         Check for nanosleep bug.
4257         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4258
4259 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4260
4261         Work around a bug in both the Linux and SunOS 64-bit kernels:
4262         nanosleep mishandles sleeps for longer than 2**31 seconds.
4263         Problem reported by Frank v Waveren in
4264         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4265         * lib/nanosleep.c (BILLION): New constant.
4266         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4267         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4268         implementation.
4269
4270 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4271
4272         * modules/nanosleep (Depends-on): Add gettime.
4273
4274 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4275         and Simon Josefsson  <jas@extundo.com>
4276         and Oskar Liljeblad  <oskar@osk.mine.nu>
4277
4278         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4279         * gnulib-tool (func_import): New license type 'unmodifiable license
4280         text'.
4281         * modules/fdl: Use it.  Longer description.
4282         * module/gpl, module/lgpl: New files.
4283
4284 2006-08-30  Jim Meyering  <jim@meyering.net>
4285
4286         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4287         shadowing the parameter.
4288
4289 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4290
4291         Sync from Libtool:
4292
4293         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4294
4295         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4296         sharing with gnulib.  Report by Eric Blake.
4297
4298 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4299
4300         * modules/isapipe: New file.
4301         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4302
4303 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4304
4305         * modules/configmake (Makefile.am): Add a comment, and omit
4306         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4307         by Bruno Haible.
4308
4309 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4310
4311         * m4/isapipe.m4: New file.
4312
4313 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4314
4315         * lib/isapipe.c, lib/isapipe.h: New files.
4316
4317 2006-08-29  Jim Meyering  <jim@meyering.net>
4318
4319         * modules/configmake (Makefile.am): Make configmake.h depend on
4320         Makefile.  Otherwise, a stale configmake.h could hang around.
4321
4322 2006-08-29  Eric Blake  <ebb9@byu.net>
4323
4324         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4325         resolution of upstream bug 3044.
4326
4327 2006-08-29  Bruno Haible  <bruno@clisp.org>
4328
4329         * modules/localcharset (Depends-on): Add configmake.
4330         (Makefile.am): Remove setting of LIBDIR through DEFS.
4331
4332 2006-08-29  Bruno Haible  <bruno@clisp.org>
4333
4334         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4335         defined.
4336
4337 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4338
4339         * modules/fcntl: New file.
4340         * modules/chdir-safer (Depends-on): Add fcntl.
4341         * modules/fts: Likewise.
4342         * modules/mkdir-p: Likewise.
4343
4344         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4345         This undoes the most recent change, since we're now addressing the
4346         problem in a different way.
4347
4348         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4349         into output, since the output might be called Makefile.am even
4350         if $makefile_name is something different.
4351         (func_import): Use $makefile_am rather than
4352         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4353         empty.
4354
4355         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4356
4357 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4358
4359         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
4360         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4361         recent change to stdint.m4, since we're now addressing the problem in a
4362         different way.
4363
4364 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4365
4366         * m4/fcntl_h.m4: New file.
4367
4368 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4369
4370         * lib/fcntl_.h: New file.
4371         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4372         the fcntl module.
4373         * lib/dirchownmod.c: Likewise.
4374         * lib/fts.c: Likewise.
4375
4376         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4377         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4378         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4379         just before including <inttypes.h>, to avoid circular inclusion.
4380
4381 2006-08-28  Jim Meyering  <jim@meyering.net>
4382
4383         * doc/visibility.texi: Actually read and correct the grammar of the
4384         sentence affected by yesterday's change.
4385
4386 2006-08-28  Eric Blake  <ebb9@byu.net>
4387
4388         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4389         needs wrapper.
4390
4391 2006-08-28  Eric Blake  <ebb9@byu.net>
4392
4393         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4394
4395 2006-08-28  Eric Blake  <ebb9@byu.net>
4396
4397         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4398
4399 2006-08-28  Bruno Haible  <bruno@clisp.org>
4400
4401         * modules/c-strstr: New file, from GNU gettext.
4402         * MODULES.html.sh (String handling): Add c-strstr.
4403
4404 2006-08-28  Bruno Haible  <bruno@clisp.org>
4405
4406         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4407         macros.
4408         Reported by Eric Blake.
4409
4410 2006-08-28  Bruno Haible  <bruno@clisp.org>
4411
4412         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4413         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4414         * lib/vasprintf.c: Include errno.h, limits.h.
4415         (EOVERFLOW): New fallback definition.
4416         (vasprintf): Test here whether the string length is > INT_MAX.
4417         * lib/vsnprintf.c: Include errno.h, limits.h.
4418         (EOVERFLOW): New fallback definition.
4419         (vsnprintf): Fix bug when generated string was too long for the buffer.
4420         Test here whether the string length is > INT_MAX.
4421
4422 2006-08-28  Bruno Haible  <bruno@clisp.org>
4423
4424         * lib/inttypes_.h (SCNX*): Remove definitions.
4425         Reported by Eric Blake.
4426
4427 2006-08-28  Bruno Haible  <bruno@clisp.org>
4428
4429         * lib/c-strstr.h: New file, from GNU gettext.
4430         * lib/c-strstr.c: New file, from GNU gettext.
4431
4432 2006-08-28  Bruno Haible  <bruno@clisp.org>
4433
4434         * gnulib-tool: Reorder some statements.
4435
4436 2006-08-28  Bruno Haible  <bruno@clisp.org>
4437
4438         * gnulib-tool: New option --makefile-name.
4439         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4440         $makefile_name.
4441         (func_import): Write $makefile_name to the cache file, and read it from
4442         there unless explicitly specified. Use $makefile_name as file name
4443         instead of Makefile.am. Adjust the recommendations accordingly.
4444
4445 2006-08-28  Bruno Haible  <bruno@clisp.org>
4446
4447         * gnulib-tool (func_verify_module): Check against misapplying patch.
4448
4449 2006-08-28  Bruno Haible  <bruno@clisp.org>
4450
4451         * gnulib-tool (func_relativize, func_relconcat): New functions.
4452         Give an error if --local-dir is given with --update.
4453         Remove trailing slashes from $local_gnulib_dir.
4454         (func_import): Store the relativized $local_gnulib_dir in
4455         gnulib-cache.m4, and read it from there if not specified explicitly.
4456
4457 2006-08-28  Bruno Haible  <bruno@clisp.org>
4458
4459         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4460         is the current directory. Respect also $local_gnulib_dir.
4461
4462 2006-08-28  Bruno Haible  <bruno@clisp.org>
4463             Simon Josefsson  <jas@extundo.com>
4464
4465         BeOS portability.
4466         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4467
4468 2006-08-27  Jim Meyering  <jim@meyering.net>
4469
4470         * doc/visibility.texi: Remove duplicate word: "pointer".
4471
4472 2006-08-26  Bruno Haible  <bruno@clisp.org>
4473
4474         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4475         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4476         (Makefile.am): Create inttypes.h from inttypes_.h.
4477         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4478
4479         * modules/imaxabs: New file.
4480
4481         * modules/imaxdiv: New file.
4482
4483 2006-08-26  Bruno Haible  <bruno@clisp.org>
4484
4485         * m4/inttypes.m4: New file.
4486         * m4/_inttypes_h.m4: Remove file.
4487         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4488         PRI_MACROS_BROKEN.
4489         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4490
4491         * m4/imaxabs.m4: New file.
4492
4493         * m4/imaxdiv.m4: New file.
4494
4495 2006-08-26  Bruno Haible  <bruno@clisp.org>
4496
4497         * lib/inttypes_.h: New file.
4498         * lib/inttypes.h: Remove file.
4499         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4500
4501         * lib/imaxabs.c: New file.
4502
4503         * lib/imaxdiv.c: New file.
4504
4505 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4506
4507         New config-h module, so that "make" output needn't be cluttered
4508         by -DHAVE_CONFIG_H.
4509         * MODULES.html.sh (Support for building libraries and executables):
4510         Add config-h.
4511         * modules/config-h: New file.
4512         * gnulib-tool (nl, sed_transform_lib_file): New vars.
4513         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
4514         the config-h module is used.
4515
4516         New configmake module, so that "make" output needn't be cluttered
4517         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
4518         * MODULES.html.sh (Support for building libraries and executables):
4519         Add configmake.
4520         * modules/configmake: New file.
4521
4522 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4523
4524         * m4/config-h.m4: New file.
4525
4526 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4527
4528         * config/srclist.txt: Add elisp-comp.
4529
4530 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4531
4532         * MODULES.html.sh (Support for building libraries and executables):
4533         Add elisp-comp.
4534         * build-aux/elisp-comp: New file.
4535         * modules/elisp-comp: New file.
4536
4537 2006-08-24  Bruno Haible  <bruno@clisp.org>
4538
4539         * gnulib-tool (func_create_testdir): Use non-default values of
4540         sourcebase and m4base.
4541
4542 2006-08-24  Bruno Haible  <bruno@clisp.org>
4543
4544         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
4545         HTML structure.
4546
4547 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
4548
4549         * modules/openat (Depends-on): Add lchown.
4550
4551 2006-08-23  Bruno Haible  <bruno@clisp.org>
4552
4553         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
4554         of gl_LOCK_EARLY instead of gl_LOCK.
4555
4556 2006-08-23  Bruno Haible  <bruno@clisp.org>
4557
4558         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
4559         on OSF/1 to no.
4560         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
4561
4562 2006-08-23  Bruno Haible  <bruno@clisp.org>
4563
4564         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
4565         as unusable.
4566
4567         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
4568         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
4569         (gl_LOCK): New macro.
4570
4571 2006-08-22  Simon Josefsson  <jas@extundo.com>
4572
4573         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
4574         to md5 module.
4575
4576 2006-08-22  Simon Josefsson  <jas@extundo.com>
4577
4578         * MODULES.html.sh: Add "Support for maintaining and release
4579         projects".
4580
4581         * build-aux/gnupload: New file, from coreutils.
4582
4583 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4584
4585         Avoid the need for AC_LIBSOURCES in m4 macros.
4586         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
4587         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
4588         * modules/check-version (EXTRA_DIST): Add check-version.h.
4589         * modules/crc (EXTRA_DIST): Add crc.h.
4590         * modules/des (EXTRA_DIST): Add des.h.
4591         * modules/gc (EXTRA_DIST): Add gc.h.
4592         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
4593         * modules/getline (EXTRA_DIST): Add getline.h.
4594         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
4595         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
4596         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
4597         * modules/md2 (EXTRA_DIST): Add md2.h.
4598         * modules/md4 (EXTRA_DIST): Add md4.h.
4599         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
4600         * modules/read-file (EXTRA_DIST): Add read-file.h.
4601         * modules/readline (EXTRA_DIST): Add readline.h.
4602         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
4603         rijndael-api-fst.h.
4604
4605 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4606
4607         * m4/rijndael.m4 (gl_ARCFOUR):
4608         * m4/arctwo.m4 (gl_ARCTWO):
4609         * m4/check-version.m4 (gl_CHECK_VERSION):
4610         * m4/crc.m4 (gl_CRC):
4611         * m4/des.m4 (gl_DES):
4612         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
4613         * m4/gc.m4 (gl_GC):
4614         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
4615         * m4/getline.m4 (gl_FUNC_GETLINE):
4616         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
4617         * m4/hmac-md5.m4 (gl_HMAC_MD5):
4618         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
4619         * m4/md2.m4 (gl_MD2):
4620         * m4/md4.m4 (gl_MD4):
4621         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
4622         * m4/read-file.m4 (gl_FUNC_READ_FILE):
4623         * m4/readline.m4 (gl_FUNC_READLINE):
4624         * m4/rijndael.m4 (gl_RIJNDAEL):
4625         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4626         to get the necessary .h files and whatnot.
4627
4628 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4629
4630         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
4631         gnulib rather than the other way around.
4632         * config/srclistvars.sh (COREUTILS): Remove.
4633
4634 2006-08-22  Jim Meyering  <jim@meyering.net>
4635
4636         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
4637
4638         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
4639
4640 2006-08-22  Eric Blake  <ebb9@byu.net>
4641
4642         * modules/regexprops-generic: New file.
4643         * MODULES.html.sh (Support for building documentation): List it.
4644
4645 2006-08-22  Eric Blake  <ebb9@byu.net>
4646
4647         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
4648         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
4649         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
4650         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
4651
4652 2006-08-22  Bruno Haible  <bruno@clisp.org>
4653
4654         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
4655         and lib_LTLIBRARIES like the other lib_* variables.
4656
4657 2006-08-22  Bruno Haible  <bruno@clisp.org>
4658
4659         * build-aux/x-to-1.in: New file, from GNU gettext.
4660
4661 2006-08-22  Bruno Haible  <bruno@clisp.org>
4662
4663         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
4664         <utmpx.h> exists.
4665
4666 2006-08-22  Bruno Haible  <bruno@clisp.org>
4667
4668         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
4669         <utmpx.h> exists.
4670
4671 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4672
4673         BeOS portability.
4674         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
4675         exist.
4676         Problem reported by Bruno Haible.
4677
4678 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4679
4680         Avoid the need for AC_LIBSOURCES in m4 macros.
4681         * modules/acl (EXTRA_DIST): Add acl.h.
4682         * modules/argmatch (Files): Add m4/argmatch.m4.
4683         (configure.ac): Add gl_ARGMATCH.
4684         (EXTRA_DIST): Renamed from lib_SOURCES, for
4685         consistency with the other modules.  Remove argmatch.c.
4686         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
4687         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
4688         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
4689         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
4690         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
4691         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
4692         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
4693         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
4694         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
4695         * modules/closeout (EXTRA_DIST): Add closeout.h.
4696         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
4697         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
4698         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
4699         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
4700         dirname.h; remove basename.c and stripslash.c.
4701         * modules/exclude (EXTRA_DIST): Add exclude.h.
4702         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
4703         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
4704         * modules/file-type (EXTRA_DIST): Add file-type.h.
4705         * modules/filemode (EXTRA_DIST): Add filemode.h.
4706         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
4707         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4708         * modules/fpending (EXTRA_DIST): Add __fpending.h.
4709         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
4710         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
4711         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
4712         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
4713         * modules/getdate (EXTRA_DIST): Add getdate.c.
4714         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
4715         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
4716         * modules/getpass (EXTRA_DIST): Add getpass.h.
4717         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
4718         * modules/group-member (EXTRA_DIST): Add group-member.h.
4719         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
4720         * modules/hash (EXTRA_DIST): Add hash.h.
4721         * modules/human (EXTRA_DIST): Add human.h.
4722         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
4723         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
4724         * modules/lchown (EXTRA_DIST): Add lchown.h.
4725         * modules/long-options (EXTRA_DIST): Add long-options.h.
4726         * modules/lstat (EXTRA_DIST): Add lstat.h.
4727         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
4728         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
4729         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
4730         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
4731         * modules/memxor (EXTRA_DIST): Add memxor.h.
4732         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
4733         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
4734         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
4735         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
4736         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
4737         * modules/physmem (EXTRA_DIST): Add physmem.h.
4738         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
4739         * modules/posixver (EXTRA_DIST): Add posixver.h.
4740         * modules/quote (EXTRA_DIST): Add quote.h.
4741         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
4742         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
4743         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
4744         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
4745         regex_internal.h regexec.c.
4746         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
4747         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
4748         * modules/same (EXTRA_DIST): Add same.h.
4749         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
4750         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
4751         * modules/savedir (EXTRA_DIST): Add savedir.h.
4752         * modules/sha1 (EXTRA_DIST): Add sha1.h.
4753         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
4754         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
4755         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
4756         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
4757         * modules/strdup (EXTRA_DIST): Add strdup.h.
4758         * modules/strftime (EXTRA_DIST): Add strftime.h.
4759         * modules/strndup (EXTRA_DIST): Add strndup.h.
4760         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
4761         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
4762         * modules/time_r (EXTRA_DIST): Add time_r.h.
4763         * modules/timespec (EXTRA_DIST): Add timespec.h.
4764         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4765         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
4766         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
4767         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
4768         * modules/userspec (EXTRA_DIST): Add userspec.h.
4769         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
4770         * modules/utimens (EXTRA_DIST): Add utimens.h.
4771         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
4772         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
4773         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
4774         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
4775         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
4776         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
4777         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
4778         * modules/yesno (EXTRA_DIST): Add yesno.h.
4779
4780 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4781
4782         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
4783
4784         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
4785         * m4/dev-ino.m4, same-inode.m4: Remove.
4786
4787         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
4788         * m4/acl.m4 (AC_FUNC_ACL):
4789         * m4/backupfile.m4 (gl_BACKUPFILE):
4790         * m4/c-strtod.m4 (gl_C99_STRTOLD):
4791         * m4/canon-host.m4 (gl_CANON_HOST):
4792         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4793         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
4794         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
4795         * m4/cloexec.m4 (gl_CLOEXEC):
4796         * m4/close-stream.m4 (gl_CLOSE_STREAM):
4797         * m4/closeout.m4 (gl_CLOSEOUT):
4798         * m4/dirfd.m4 (gl_FUNC_DIRFD):
4799         * m4/dirname.m4 (gl_DIRNAME):
4800         * m4/exclude.m4 (gl_EXCLUDE):
4801         * m4/exitfail.m4 (gl_EXITFAIL):
4802         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
4803         * m4/file-type.m4 (gl_FILE_TYPE):
4804         * m4/filemode.m4 (gl_FILEMODE):
4805         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
4806         * m4/fpending.m4 (gl_FUNC_FPENDING):
4807         * m4/fprintftime.m4 (gl_FPRINTFTIME):
4808         * m4/fts.m4 (gl_FUNC_FTS):
4809         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
4810         * m4/getdate.m4 (gl_GETDATE):
4811         * m4/gethrxtime.m4 (gl_GETHRXTIME):
4812         * m4/getpagesize.m4 (gl_GETPAGESIZE):
4813         * m4/getpass.m4 (gl_FUNC_GETPASS):
4814         * m4/gettime.m4 (gl_GETTIME):
4815         * m4/getugroups.m4 (gl_GETUGROUPS):
4816         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
4817         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
4818         * m4/hard-locale.m4 (gl_HARD_LOCALE):
4819         * m4/hash.m4 (gl_HASH):
4820         * m4/idcache.m4 (gl_IDCACHE):
4821         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
4822         * m4/lchown.m4 (gl_FUNC_LCHOWN):
4823         * m4/long-options.m4 (gl_LONG_OPTIONS):
4824         * m4/lstat.m4 (gl_FUNC_LSTAT):
4825         * m4/md5.m4 (gl_MD5):
4826         * m4/memcasecmp.m4 (gl_MEMCASECMP):
4827         * m4/memcoll.m4 (gl_MEMCOLL):
4828         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
4829         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
4830         * m4/memxor.m4 (gl_MEMXOR):
4831         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
4832         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
4833         * m4/modechange.m4 (gl_MODECHANGE):
4834         * m4/mountlist.m4 (gl_MOUNTLIST):
4835         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4836         * m4/openat.m4 (gl_FUNC_OPENAT):
4837         * m4/pathmax.m4 (gl_PATHMAX):
4838         * m4/physmem.m4 (gl_PHYSMEM):
4839         * m4/posixtm.m4 (gl_POSIXTM):
4840         * m4/posixver.m4 (gl_POSIXVER):
4841         * m4/quote.m4 (gl_QUOTE):
4842         * m4/quotearg.m4 (gl_QUOTEARG):
4843         * m4/readtokens.m4 (gl_READTOKENS):
4844         * m4/readutmp.m4 (gl_READUTMP):
4845         * m4/regex.m4 (gl_REGEX):
4846         * m4/safe-read.m4 (gl_SAFE_READ):
4847         * m4/safe-write.m4 (gl_SAFE_WRITE):
4848         * m4/same.m4 (gl_SAME):
4849         * m4/save-cwd.m4 (gl_SAVE_CWD):
4850         * m4/savedir.m4 (gl_SAVEDIR):
4851         * m4/settime.m4 (gl_SETTIME):
4852         * m4/sha1.m4 (gl_SHA1):
4853         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
4854         * m4/stat-macros.m4 (gl_STAT_MACROS):
4855         * m4/stat-time.m4 (gl_STAT_TIME):
4856         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
4857         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
4858         * m4/strdup.m4 (gl_FUNC_STRDUP):
4859         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
4860         * m4/strndup.m4 (gl_FUNC_STRNDUP):
4861         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
4862         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
4863         * m4/time_r.m4 (gl_TIME_R):
4864         * m4/timespec.m4 (gl_TIMESPEC):
4865         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
4866         * m4/unlinkdir.m4 (gl_UNLINKDIR):
4867         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
4868         * m4/userspec.m4 (gl_USERSPEC):
4869         * m4/utimecmp.m4 (gl_UTIMECMP):
4870         * m4/utimens.m4 (gl_UTIMENS):
4871         * m4/xalloc.m4 (gl_XALLOC):
4872         * m4/xgetcwd.m4 (gl_XGETCWD):
4873         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
4874         * m4/xreadlink.m4 (gl_XREADLINK):
4875         * m4/xstrtod.m4 (gl_XSTRTOD):
4876         * m4/yesno.m4 (gl_YESNO):
4877         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4878         to get the necessary .h files and whatnot.
4879
4880 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
4881             Bruno Haible  <bruno@clisp.org>
4882
4883         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
4884         /bin/sh understanding of '!' conditional negation.
4885
4886 2006-08-21  Jim Meyering  <jim@meyering.net>
4887
4888         * modules/openat (Depends-on): Really alphabetize.
4889
4890         * modules/acl (Depends-on): Add error and quote.
4891
4892         * check-module (find_included_lib_files): Add at-func.c to the
4893         ok-to-include-more-than-once white list.
4894
4895         * modules/openat (Depends-on): Add lstat.  Alphabetize.
4896
4897 2006-08-21  Bruno Haible  <bruno@clisp.org>
4898
4899         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4900         Emit a pkgdata_DATA variable only if some snippets add contents to it.
4901         Reported by Martin Lambers <marlam@marlam.de>.
4902
4903 2006-08-21  Bruno Haible  <bruno@clisp.org>
4904
4905         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
4906         specify an installation location, don't emit a noinst_LIBRARIES or
4907         noinst_LTLIBRARIES assignment.
4908
4909 2006-08-21  Bruno Haible  <bruno@clisp.org>
4910
4911         BeOS portability.
4912         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
4913         BeOS has mbrtowc() but no <wctype.h>.
4914
4915 2006-08-21  Bruno Haible  <bruno@clisp.org>
4916
4917         BeOS portability.
4918         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
4919         exist.
4920
4921 2006-08-21  Bruno Haible  <bruno@clisp.org>
4922
4923         BeOS portability.
4924         * lib/mbchar.h: Include <wctype.h> only if it exists.
4925
4926 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4927
4928         Remove files that are no longer needed by their respective modules.
4929         * m4/obstack.m4: Remove.
4930         * m4/strerror_r.m4: Remove.
4931         * m4/uint32_t.m4: Remove.
4932         * m4/uintptr_t.m4: Remove.
4933         * m4/ullong_max.m4: Remove.
4934         * m4/xstrtoimax.m4: Remove.
4935         * m4/xstrtoumax.m4: Remove.
4936
4937         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
4938         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
4939         dependencies now capture this.
4940
4941         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
4942         Do not use AC_LIBSOURCES, since gnulib modules now do this.
4943         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
4944         * m4/human.m4 (gl_HUMAN): Likewise.
4945         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
4946         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
4947
4948         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
4949
4950         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
4951         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
4952         stdint.
4953         * m4/human.m4 (gl_HUMAN): Likewise.
4954         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
4955         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
4956         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4957         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4958         * m4/xstrtol (gl_XSTRTOL): Likewise.
4959
4960         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
4961         AC_TYPE_LONG_LONG_INT.
4962         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
4963         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
4964         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
4965         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
4966
4967         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
4968         on stdbool.
4969
4970         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
4971         (gl_PREREQ_XSTRTOUL): Remove.
4972
4973         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
4974
4975         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
4976         mode.
4977
4978 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4979
4980         Add and change modules to make it easier for coreutils to use
4981         gnulib-tool.
4982         * modules/backupfile (Files): Remove m4/d-ino.m4.
4983         (Depends-on): Add d-ino.
4984         * modules/cycle-check (Depends-on): Add stdint.
4985         (lib_SOURCES): Add cycle-check.h.
4986         * modules/d-ino: New module.
4987         * modules/d-type: New module.
4988         * modules/error (Files): Remove m4/strerror_r.m4.
4989         * modules/filemode (Files): Add m4/st_dm_mode.m4.
4990         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4991         m4/inttypes_h.m4, m4/uintmax_t.m4.
4992         (Depends-on): Add stdint.
4993         (lib_SOURCES): Add fsusage.h.
4994         * modules/getcwd (Files): Remove d-ino.m4.
4995         (Depends-on): Add d-ino.
4996         * modules/getndelim2 (Depends-on): Add stdint.
4997         * modules/glob (Files): Remove m4/d-type.m4.
4998         (Depends-on): Add d-type.
4999         * modules/host-os: New module.
5000         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5001         m4/inttypes_h.m4, m4/uintmax_t.m4.
5002         * Depends-on: Add stdint.
5003         (lib_SOURCES): Add human.h.
5004         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5005         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5006         m4/uintmax_t.m4, m4/ulonglong.m4.
5007         (Depends-on): Add stdint.
5008         (EXTRA_DIST): Add inttostr.h.
5009         * modules/lchmod: New module.
5010         * modules/link-follow: New module.
5011         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5012         (Depends-on): Add lchmod.
5013         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5014         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5015         (Depends-on): Add stdint.
5016         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5017         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5018         (Depends-on): Add stdint.
5019         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5020         * modules/perl: New module.
5021         * modules/regex (Depends-on): Add stdint.
5022         * modules/rmdir-errno: New module.
5023         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5024         m4/intmax_t.m4.
5025         (Depends-on): Add stdint.
5026         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5027         m4/uintmax_t.m4.
5028         (Depends-on): Add stdint.
5029         * modules/unlink-busy: New module.
5030         * modules/utimecmp (Depends-on): Add stdint.
5031         * modules/uptime: New module.
5032         * modules/winsz-ioctl: New module.
5033         * modules/winsz-termios: New module.
5034         * modules/xnanosleep (Depends-on): Add nanosleep.
5035         * modules/ullong_max: Remove.
5036         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5037         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5038         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5039         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5040         (Depends-on): Add inttypes.
5041         (lib_SOURCES): Add xstrtol.h.
5042         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5043         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5044         * MODULES.html.sh: Move 'assert' into the assert section.
5045         Move 'dummy' into the linking section.
5046         Remove ullong_max.
5047         Add section for compatibility checks for POSIX:2001 functions,
5048         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5049         winsz-ioctl, and winsz-termios into it.
5050         Add lchmod.
5051         Add top-level Misc section and put host-os, perl, and uptime
5052         into it.
5053
5054 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5055
5056         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5057         now assume the stdint module.  Do not include inttypes.h.
5058         * lib/fsusage.h: Likewise.
5059         * lib/getndelim2.c: Likewise.
5060         * lib/human.h: Likewise.
5061         * lib/inttostr.h: Likewise.
5062         * lib/obstack.c: Likewise.
5063         * lib/regex_internal.h: Likewise.
5064         * lib/tempname.c: Likewise.
5065         * lib/utimecmp.c: Likewise.
5066         * lib/xstrtol.h: Likewise.
5067
5068         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5069
5070         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5071         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5072         * lib/xtime.h: Likewise.
5073
5074 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5075
5076         * modules/openat (Files): Add lib/fchmodat.c.
5077         Fixes problem reported by Jay Youngman.
5078
5079 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5080
5081         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5082         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5083
5084 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5085             Bruno Haible  <bruno@clisp.org>
5086
5087         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5088         and is a script that invokes bison. Tighten the code. Add comments.
5089
5090 2006-08-18  Jim Meyering  <jim@meyering.net>
5091
5092         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5093         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5094         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5095         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5096
5097 2006-08-18  Bruno Haible  <bruno@clisp.org>
5098
5099         * modules/bison-i18n: New file.
5100         * MODULES.html.sh (Internationalization functions): Add it.
5101
5102 2006-08-18  Bruno Haible  <bruno@clisp.org>
5103
5104         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5105         sys/statvfs.h. When getmntinfo was found, check its declaration and
5106         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5107
5108 2006-08-18  Bruno Haible  <bruno@clisp.org>
5109
5110         * m4/bison-i18n.m4: New file, from bison.
5111
5112 2006-08-18  Bruno Haible  <bruno@clisp.org>
5113
5114         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5115         (ME_DUMMY): Treat "kernfs" as a dummy.
5116         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5117
5118 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5119
5120         Update from coreutils.
5121
5122         2006-08-15  Jim Meyering  <jim@meyering.net>
5123
5124         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5125
5126         2006-01-17  Jim Meyering  <jim@meyering.net>
5127
5128         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5129
5130         2006-01-11  Jim Meyering  <jim@meyering.net>
5131
5132         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5133         Check for the lchmod function.
5134
5135 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5136
5137         Update from coreutils.
5138
5139         * lib/__fpending.h: Add copyright notice.
5140         * lib/fprintftime.h: Likewise.
5141         * lib/savedir.c: Use (C) in copyright notice.
5142         * lib/savedir.h: Likewise.
5143
5144         2006-08-15  Jim Meyering  <jim@meyering.net>
5145
5146         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5147         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5148         in support of the EXPECTED_ERRNO macro.
5149         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5150         definitions.  Instead, define the appropriate symbols and include
5151         "at-func.c".
5152         * lib/mkdirat.c (mkdirat): Likewise.
5153         * lib/fchmodat.c (fchmodat): Likewise.
5154         (ENOSYS): Remove definition.
5155         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5156         it.  Don't include "unistd--.h" -- it wasn't ever used.
5157
5158         2006-01-17  Jim Meyering  <jim@meyering.net>
5159
5160         Rewrite fts.c not to change the current working directory,
5161         by using openat, fstatat, fdopendir, etc..
5162
5163         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5164         (HAVE_OPENAT_SUPPORT): Define.
5165         [_LIBC] (fchdir): Don't undef or define; no longer used.
5166         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5167         Now, this `function' always succeeds, and consumes its file descriptor
5168         parameter -- so callers must not close such FDs.  Update callers.
5169         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5170         (diropen): Add parameter, SP.  Adjust all callers.
5171         Implement using diropen_fd, rather than open.
5172         (fts_open): Initialize new member, fts_cwd_fd.
5173         Remove fts_rft-setting code.
5174         (fts_close): Close fts_cwd_fd, if necessary.
5175         (__opendir2): Define in terms of opendir or opendirat,
5176         depending on whether the FST_NOCHDIR flag is set.
5177         (fts_build): Since fts_safe_changedir consumes its FD, and since
5178         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5179         and close the dup'd file descriptor upon failure.
5180         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5181         (fts_safe_changedir): Tweak semantics to reflect that this function
5182         now calls cwd_advance_fd and hence consumes its FD argument.
5183         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5184         [struct FTS] (fts_rft): Remove now-unused member.
5185         [struct FTS] (fts_cycle.state): Improve comment.
5186
5187         * lib/openat.c (openat_needs_fchdir): New function.
5188         * lib/openat.h (openat_needs_fchdir): Declare it.
5189
5190 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5191
5192         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5193         Problem and fix reported by Pádraig Brady in
5194         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5195
5196 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5197
5198         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5199
5200 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5201
5202         * lib/memcoll.c (memcoll): Optimize for the common case where the
5203         arguments are bytewise equal.
5204
5205 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5206
5207         * doc/regexprops-generic.texi: Add a copyright notice.
5208
5209 2006-08-15  Bruno Haible  <bruno@clisp.org>
5210
5211         * modules/tmpdir (License): Change to LGPL.
5212
5213 2006-08-15  Bruno Haible  <bruno@clisp.org>
5214
5215         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5216         module.
5217
5218 2006-08-14  Simon Josefsson  <jas@extundo.com>
5219
5220         * config/srclist.txt: Add gnupload.
5221
5222 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5223
5224         Change copyright notice from LGPL 2 to GPL 2, since that's the
5225         standard form used in the gnulib repository.
5226         * tests/test-lock.c: Likewise.
5227         * tests/test-stdint.c: Likewise.
5228         * tests/test-tls.c: Likewise.
5229
5230         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5231         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5232         Add copyright notice.
5233
5234         * check-module: Add copyright notice.  Output a copyright
5235         notice if "--version" is specified.
5236         * modules/COPYING: New file.
5237         * tests/test-getaddrinfo.c: Add copyright notice.
5238         * tests/test-verify.c: Likewise.
5239
5240 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5241
5242         Change copyright notice from LGPL 2 to GPL 2, since that's the
5243         standard form used in the gnulib repository.
5244         * lib/lock.c: LGPL -> GPL.
5245         * lib/lock.h: Likewise.
5246         * lib/strnlen1.c: Likewise.
5247         * lib/strnlen1.h: Likewise.
5248         * lib/tls.c: Likewise.
5249         * lib/tls.h: Likewise.
5250         * lib/tmpdir.c: Likewise.
5251
5252         * lib/TODO: Remove; this belongs only in coreutils.
5253
5254 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5255
5256         Add copyright notices to long-enough files that lack them, since
5257         otherwise the files aren't clearly free.  Use the same notice that
5258         getdate.texi already uses.
5259         * doc/alloca-opt.texi: Add copyright notice.
5260         * doc/alloca.texi: Likewise.
5261         * doc/ctime.texi: Likewise.
5262         * doc/functions.texi: Likewise.
5263         * doc/gcd.texi: Likewise.
5264         * doc/gnulib-tool.texi: Likewise.
5265         * doc/inet_ntoa.texi: Likewise.
5266         * doc/visibility.texi: Likewise.
5267
5268         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5269         * doc/quote.texi: Add copyright notice.
5270
5271         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5272         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5273         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5274         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5275         is now obsolete, and give a pointer to the Sun list.
5276         Add copyright notice.
5277
5278 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5279
5280         * config/srclistvars.sh: Add copyright notice.
5281
5282 2006-08-14  Eric Blake  <ebb9@byu.net>
5283
5284         Import the following change from libc:
5285
5286         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5287
5288         Upstream bug 2997.
5289         * lib/misc/error.c: Add space between program name and message if file
5290         name is missing.
5291
5292 2006-08-12  Karl Berry  <karl@gnu.org>
5293
5294         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5295         remove, these originate in gnulib now.
5296
5297 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5298
5299         * doc/Makefile (standards.info standards.html standards.dvi):
5300         Also depend on make-stds.texi.
5301
5302 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5303
5304         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5305         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5306
5307         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5308         in wchar_t.  Problem reported by Eric Blake.
5309
5310         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5311         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5312         Also, help the compiler to keep LEN in a register.
5313
5314 2006-08-11  Eric Blake  <ebb9@byu.net>
5315
5316         * users.txt: Sort.  Add tar.
5317
5318 2006-08-11  Bruno Haible  <bruno@clisp.org>
5319
5320         * users.txt: New file.
5321
5322 2006-08-11  Bruno Haible  <bruno@clisp.org>
5323
5324         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5325         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5326
5327 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5328
5329         * modules/snprintf (Depends-on): Remove minmax.
5330         (Maintainer): Add self and Bruno.
5331
5332 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5333
5334         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5335         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5336         (EOVERFLOW): Define if the system does not.
5337         Do not include "minmax.h"; it wasn't used.
5338         (snprintf): Don't assume size_t promotes to an unsigned type.
5339         Fix bug when generated string was too long for the buffer: the
5340         buffer's contents are supposed to be the initial prefix of the
5341         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5342         exceeds INT_MAX; do the check ourselves.
5343
5344         Import the following changes from libc:
5345
5346         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5347
5348         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5349         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5350         set wc to the byte which couldn't be converted.
5351         (re_string_reconstruct): Don't clear valid_raw_len before calling
5352         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5353         tip_context using re_string_context_at.
5354
5355         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5356
5357         * lib/posix/regex.h: g++ still cannot handled [restrict].
5358
5359         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
5360
5361         * lib/posix/regex.h: Remove special handling for VMS.
5362
5363 2006-08-10  Jim Meyering  <jim@meyering.net>
5364
5365         * modules/same-inode: New module.
5366         * modules/dev-ino: New module.
5367         * modules/cycle-check: Depend on these modules, rather than simply
5368         including their .h files.
5369         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5370         required via m4/cycle-check.m4.
5371         * modules/same: Depend on new same-inode module, rather than
5372         including same-inode.h.
5373         * modules/chdir-safer: New file.
5374
5375         * modules/chown (Depends-on): Add stat-macros.
5376
5377 2006-08-10  Jim Meyering  <jim@meyering.net>
5378
5379         * m4/cycle-check.m4: New file.
5380         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5381         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5382
5383 2006-08-10  Eric Blake  <ebb9@byu.net>
5384
5385         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5386         in from original proposal.
5387
5388 2006-08-10  Eric Blake  <ebb9@byu.net>
5389         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5390
5391         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5392         namespace.
5393
5394 2006-08-10  Bruno Haible  <bruno@clisp.org>
5395
5396         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5397         as well.
5398
5399 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5400
5401         Sync from coreutils.
5402
5403         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5404
5405         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5406         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5407
5408 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5409
5410         * modules/restrict: Remove; no longer needed now that we assume
5411         Autoconf 2.59 or later.
5412         * MODULES.html.sh: Remove 'restrict'.
5413         * modules/argp (Depends-on): Remove 'restrict'.
5414         * modules/base64 (Depends-on): Likewise.
5415         * modules/gc (Depends-on): Likewise.
5416         * modules/getaddrinfo (Depends-on): Likewise.
5417         * modules/glob (Depends-on): Likewise.
5418         * modules/inet_ntop (Depends-on): Likewise.
5419         * modules/inet_pton (Depends-on): Likewise.
5420         * modules/memxor (Depends-on): Likewise.
5421         * modules/regex (Depends-on): Likewise.
5422         * modules/strtok_r (Depends-on): Likewise.
5423         * modules/time_r (Depends-on): Likewise.
5424
5425 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5426
5427         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5428         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5429         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5430         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5431         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5432         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5433         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5434         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5435
5436         Merge from coreutils.
5437         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5438         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5439         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5440         * m4/time_r.m4 (gl_TIME_R): Likewise.
5441
5442 2006-08-09  Karl Berry  <karl@gnu.org>
5443
5444         * config/srclist.txt: no more gettext-tools, per Bruno.
5445
5446 2006-08-08  Eric Blake  <ebb9@byu.net>
5447
5448         * modules/verror: New module.
5449         * MODULES.html.sh: Document it.
5450
5451 2006-08-08  Eric Blake  <ebb9@byu.net>
5452
5453         * lib/verror.h, lib/verror.c: New files.
5454
5455 2006-08-08  Eric Blake  <ebb9@byu.net>
5456
5457         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5458         verror_at_line output complies with GNU Coding Standards even when
5459         file is NULL.
5460
5461 2006-08-07  Bruno Haible  <bruno@clisp.org>
5462
5463         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5464         versions of AIX.
5465         Reported by Ralf Wildenhues.
5466
5467 2006-08-07  Bruno Haible  <bruno@clisp.org>
5468
5469         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5470         in an AC_DEFUN. Needed so that the autoconf snippets can use
5471         AC_REQUIRE.
5472
5473 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5474
5475         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5476         Initialize pkgdata_DATA.
5477         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5478         overriding it.
5479
5480 2006-08-06  Eric Blake  <ebb9@byu.net>
5481
5482         * lib/error.h: Fold in some upstream changes from glibc.
5483         * lib/error.c: Likewise.
5484
5485 2006-08-04  Bruno Haible  <bruno@clisp.org>
5486
5487         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5488         Make the mostlyclean-local rule depend on mostlyclean-generic.
5489         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5490
5491 2006-07-31  Bruno Haible  <bruno@clisp.org>
5492
5493         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5494         <stdlib.h>, <string.h>.
5495
5496 2006-07-30  Bruno Haible  <bruno@clisp.org>
5497
5498         * modules/readlink (License): Change to LGPL.
5499
5500 2006-07-30  Bruno Haible  <bruno@clisp.org>
5501
5502         * modules/javaversion (Makefile.am): Distribute javaversion.java and
5503         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
5504         set PKGDATADIR to point to it.
5505
5506 2006-07-30  Bruno Haible  <bruno@clisp.org>
5507
5508         * modules/csharpexec (configure.ac): Comment out macro invocation.
5509         * modules/javaexec (configure.ac): Likewise.
5510         * modules/javacomp-script (configure.ac): Likewise.
5511
5512         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
5513
5514 2006-07-30  Bruno Haible  <bruno@clisp.org>
5515
5516         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
5517         linked-list.
5518
5519 2006-07-30  Bruno Haible  <bruno@clisp.org>
5520
5521         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
5522
5523 2006-07-30  Bruno Haible  <bruno@clisp.org>
5524
5525         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5526         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
5527         get removed.
5528
5529 2006-07-29  Bruno Haible  <bruno@clisp.org>
5530
5531         Make it possible for gnulib-tool to work with locally modified or
5532         augmented gnulib repositories.
5533         * gnulib-tool (func_usage): Document --local-dir option.
5534         (local_gnulib_dir): New variable.
5535         Handle --local-dir option.
5536         (func_lookup_file): New function.
5537         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
5538         (func_get_description, func_get_filelist, func_get_description,
5539         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
5540         func_get_automake_snippet, func_get_include_directive,
5541         func_get_license, func_get_maintainer): Use func_lookup_file.
5542         (func_import, func_create_testdir): Use func_lookup_file.
5543
5544 2006-07-29  Bruno Haible  <bruno@clisp.org>
5545
5546         * modules/setenv (Depends-on): Add unistd.
5547
5548 2006-07-29  Bruno Haible  <bruno@clisp.org>
5549
5550         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
5551
5552 2006-07-29  Bruno Haible  <bruno@clisp.org>
5553
5554         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
5555
5556 2006-07-29  Bruno Haible  <bruno@clisp.org>
5557
5558         * gnulib-tool (import, update): If there is no Makefile.am, look at
5559         aclocal.m4, instead of bailing out.
5560
5561 2006-07-29  Bruno Haible  <bruno@clisp.org>
5562
5563         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
5564         Categorize the options by when they are useful.
5565
5566 2006-07-29  Bruno Haible  <bruno@clisp.org>
5567
5568         * gnulib-tool (func_usage): Document option --no-libtool.
5569         Handle option --no-libtool.
5570         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
5571         for changed semantics of $libtool variable.
5572         (func_import): Likewise. If libtool is not used, show this through
5573         an option --no-libtool.
5574         (func_create_testdir): Update.
5575
5576 2006-07-29  Bruno Haible  <bruno@clisp.org>
5577
5578         * gnulib-tool (func_import): Extend error message about missing
5579         --doc-base.
5580
5581 2006-07-29  Bruno Haible  <bruno@clisp.org>
5582
5583         * gnulib-tool (func_import): Don't create the $docbase directory if
5584         there is no file to store there.
5585
5586 2006-07-29  Bruno Haible  <bruno@clisp.org>
5587
5588         * gnulib-tool (autoconf_minversion): If a --dir option is given and
5589         relevant, look for configure.ac there, not in the current directory.
5590         Also use a simple search for AC_PREREQ, not "autoconf --trace".
5591
5592 2006-07-29  Bruno Haible  <bruno@clisp.org>
5593
5594         * gnulib-tool (SORT): New variable.
5595         (func_usage): Undocument --assume-autoconf option.
5596         Remove --assume-autoconf option handling.
5597         (autoconf_minversion): Determine from the contents of configure.ac.
5598         (func_import): Remove autoconf_minversion handling.
5599         Suggested by Eric Blake.
5600
5601 2006-07-29  Bruno Haible  <bruno@clisp.org>
5602
5603         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
5604
5605 2006-07-29  Bruno Haible  <bruno@clisp.org>
5606
5607         * config/srclist.txt (*setenv.[ch]): Remove rules.
5608
5609 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5610
5611         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
5612
5613 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5614
5615         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
5616         arpa/inet.h.
5617
5618 2006-07-28  Simon Josefsson  <jas@extundo.com>
5619
5620         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
5621         * modules/inet_pton (Depends-on): Likewise.
5622
5623 2006-07-28  Simon Josefsson  <jas@extundo.com>
5624
5625         * m4/netinet_in_h.m4: New file.
5626
5627 2006-07-28  Simon Josefsson  <jas@extundo.com>
5628
5629         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
5630         #include's.
5631
5632 2006-07-28  Simon Josefsson  <jas@extundo.com>
5633
5634         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
5635         #include's.
5636
5637 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
5638
5639         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
5640         setgid on directories only if they set these bits.
5641         * lib/modechange.h: Remove obsolete comment about masks.
5642
5643 2006-07-28  Eric Blake  <ebb9@byu.net>
5644
5645         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
5646         macro expansion.
5647
5648 2006-07-28  Bruno Haible  <bruno@clisp.org>
5649
5650         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
5651
5652 2006-07-28  Bruno Haible  <bruno@clisp.org>
5653
5654         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
5655
5656 2006-07-28  Bruno Haible  <bruno@clisp.org>
5657
5658         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
5659         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
5660         Define fallbacks.
5661         Avoids link error on FreeBSD 4.x.
5662         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
5663
5664         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
5665         encoding.
5666         * lib/mbswidth.c (iswcntrl): Likewise.
5667
5668 2006-07-27  Bruno Haible  <bruno@clisp.org>
5669
5670         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
5671         test.
5672
5673 2006-07-27  Bruno Haible  <bruno@clisp.org>
5674
5675         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
5676         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
5677         defined.
5678
5679 2006-07-26  Eric Blake  <ebb9@byu.net>
5680
5681         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
5682
5683 2006-07-26  Eric Blake  <ebb9@byu.net>
5684
5685         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
5686         like mingw that lack mkstemp.
5687         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
5688         avoid compilation warning on mingw.
5689
5690 2006-07-26  Bruno Haible  <bruno@clisp.org>
5691
5692         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
5693         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
5694         INT_FAST*_MIN, INTPTR_MIN.
5695
5696 2006-07-25  Bruno Haible  <bruno@clisp.org>
5697
5698         * modules/version-etc (Depends-on): Add stdarg.
5699
5700 2006-07-25  Bruno Haible  <bruno@clisp.org>
5701
5702         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
5703         complex commands.
5704
5705 2006-07-25  Bruno Haible  <bruno@clisp.org>
5706
5707         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
5708         defined in <stdarg.h> or config.h.
5709
5710 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5711
5712         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
5713         (gl_STDIO_SAFER): Remove.
5714
5715 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5716
5717         * MODULES.html.sh (File stream based Input/Output):
5718         Add fopen-safer, tmpfile-safer; remove stdio-safer.
5719         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
5720         * modules/fopen-safer, modules/tmpfile-safer: New files.
5721         * modules/stdio-safer: Remove.
5722
5723 2006-07-24  Bruno Haible  <bruno@clisp.org>
5724
5725         * modules/tmpdir: New file.
5726         * MODULES.html.sh (File system functions): Add it.
5727
5728 2006-07-24  Bruno Haible  <bruno@clisp.org>
5729
5730         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
5731         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
5732
5733 2006-07-24  Bruno Haible  <bruno@clisp.org>
5734
5735         * modules/clean-temp: New file.
5736
5737 2006-07-24  Bruno Haible  <bruno@clisp.org>
5738
5739         * m4/tmpdir.m4: New file, from GNU gettext.
5740
5741 2006-07-24  Bruno Haible  <bruno@clisp.org>
5742
5743         * lib/tmpdir.h: New file, from GNU gettext.
5744         * lib/tmpdir.c: New file, from GNU gettext.
5745
5746 2006-07-24  Bruno Haible  <bruno@clisp.org>
5747
5748         * lib/clean-temp.h: New file, from GNU gettext.
5749         * lib/clean-temp.c: New file, from GNU gettext.
5750
5751 2006-07-23  Eric Blake  <ebb9@byu.net>
5752
5753         * modules/stdio-safer (Files): Add tmpfile-safer.c.
5754         (Depends-on): Add binary-io.
5755
5756 2006-07-23  Eric Blake  <ebb9@byu.net>
5757
5758         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
5759
5760 2006-07-23  Eric Blake  <ebb9@byu.net>
5761
5762         * lib/tmpfile-safer.c: New file.
5763         * lib/stdio-safer.h (fopen_safer): Add prototype.
5764         * lib/stdio--.h (tmpfile): Make safer.
5765
5766 2006-07-23  Bruno Haible  <bruno@clisp.org>
5767
5768         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
5769         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
5770         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
5771         gl_linked_remove_at): Use it.
5772
5773 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5774         and Simon Josefsson <jas@extundo.com>
5775
5776         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
5777
5778         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
5779
5780 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5781
5782         * modules/close-stream: New file.
5783         * modules/closeout (Description): Make it clear that it exits
5784         with a diagnostic on error.
5785         (Depends-on): Add close-stream.  Remove fpending, stdbool.
5786         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
5787
5788 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5789
5790         * m4/close-stream.m4: New file.
5791
5792 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5793
5794         * lib/close-stream.c, lib/close-stream.h: New files.
5795
5796 2006-07-22  Bruno Haible  <bruno@clisp.org>
5797
5798         Merge from GNU gettext 0.15.
5799
5800         2006-05-01  Bruno Haible  <bruno@clisp.org>
5801
5802                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
5803
5804         2006-07-22  Bruno Haible  <bruno@clisp.org>
5805
5806                 * modules/javaversion: New file.
5807                 * MODULES.html.sh (Java): Add javaversion.
5808
5809         2006-03-12  Bruno Haible  <bruno@clisp.org>
5810
5811                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
5812
5813         2005-12-04  Bruno Haible  <bruno@clisp.org>
5814
5815                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
5816                 (untested).
5817
5818         2006-06-21  Bruno Haible  <bruno@clisp.org>
5819
5820                 Avoid warnings from recent versions of mcs.
5821                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
5822                 -o, -L, -r any more. Use options documented since mcs-1.0
5823                 instead. Similarly for -g.
5824
5825         2005-12-04  Bruno Haible  <bruno@clisp.org>
5826
5827                 * build-aux/csharpcomp.sh.in: Suffix for resources is
5828                 .resources, not .resource.
5829
5830         2005-07-09  Bruno Haible  <bruno@clisp.org>
5831
5832                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
5833                 add a .dll suffix.
5834                 Reported by Mark Junker <mjscod@gmx.de>.
5835
5836         2006-07-22  Bruno Haible  <bruno@clisp.org>
5837
5838                 * modules/gettext: Upgrade to gettext-0.15.
5839                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
5840                 m4/visibility.m4.
5841                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
5842
5843 2006-07-22  Bruno Haible  <bruno@clisp.org>
5844
5845         Merge from GNU gettext 0.15.
5846
5847         2006-03-25  Bruno Haible  <bruno@clisp.org>
5848
5849                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
5850
5851         2006-07-21  Bruno Haible  <bruno@clisp.org>
5852
5853                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
5854                 "1.1".
5855
5856         2006-05-09  Bruno Haible  <bruno@clisp.org>
5857
5858                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
5859                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
5860                 for the conftestver execution.
5861
5862         2006-05-01  Bruno Haible  <bruno@clisp.org>
5863
5864                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
5865                 optional target-version argument. Verify that the compiler
5866                 groks source of the specified source-version, or add -source
5867                 option as necessary. Verify that the compiler produces
5868                 bytecode in the specified target-version, or add -target and
5869                 -source options as necessary. Make the result of the test
5870                 available as variable CONF_JAVAC. Also log error output in
5871                 config.log.
5872
5873         2006-03-11  Bruno Haible  <bruno@clisp.org>
5874
5875                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
5876
5877         2006-05-09  Bruno Haible  <bruno@clisp.org>
5878
5879                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
5880                 CLASSPATH_SEPARATOR to a semicolon.
5881
5882         2006-03-12  Bruno Haible  <bruno@clisp.org>
5883
5884                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
5885                 available as variable CONF_JAVA, for subsequent autoconf
5886                 tests. Also log error output in config.log.
5887
5888         2006-07-19  Bruno Haible  <bruno@clisp.org>
5889
5890                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
5891                 that getline works on glibc2 systems. Needed to avoid trouble
5892                 in relocatable.c.
5893                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
5894
5895         2005-12-04  Bruno Haible  <bruno@clisp.org>
5896
5897                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
5898                 launcher (untested).
5899
5900         2005-12-04  Bruno Haible  <bruno@clisp.org>
5901
5902                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
5903
5904         2006-07-22  Bruno Haible  <bruno@clisp.org>
5905
5906                 * gettext.m4: Update from GNU gettext-0.15.
5907                 * nls.m4: Likewise.
5908                 * po.m4: Likewise.
5909                 * inttypes-pri.m4: Likewise.
5910                 * inttypes-h.m4: Renamed from inttypes.m4.
5911                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
5912
5913 2006-07-22  Bruno Haible  <bruno@clisp.org>
5914
5915         Merge from GNU gettext 0.15.
5916
5917         2005-07-05  Bruno Haible  <bruno@clisp.org>
5918
5919                 * printf-args.c (printf_fetchargs): Work around broken
5920                 definition of wint_t on mingw.
5921
5922         2005-02-12  Bruno Haible  <bruno@clisp.org>
5923
5924                 * xallocsa.h: Add extern "C" for C++.
5925
5926         2006-05-17  Bruno Haible  <bruno@clisp.org>
5927
5928                 Cygwin portability.
5929                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
5930
5931         2006-04-30  Bruno Haible  <bruno@clisp.org>
5932
5933                 * progreloc.c: Include <mach-o/dyld.h> if available.
5934                 (find_executable): Use _NSGetExecutablePath when possible.
5935
5936         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5937
5938                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
5939                 function.
5940
5941         2005-12-29  Bruno Haible  <bruno@clisp.org>
5942
5943                 * progreloc.c (set_program_name_and_installdir): Fix
5944                 compilation error.
5945
5946         2005-12-04  Bruno Haible  <bruno@clisp.org>
5947
5948                 Cygwin portability.
5949                 * progreloc.c: Include <windows.h> also on Cygwin.
5950                 (find_executable): Add support for Cygwin.
5951                 (set_program_name_and_installdir): Handle also platforms with
5952                 nonempty EXEEXT.
5953
5954         2006-07-11  Bruno Haible  <bruno@clisp.org>
5955
5956                 * javacomp.c: Fix a comment.
5957                 Reported by Jim Meyering.
5958
5959         2006-04-30  Bruno Haible  <bruno@clisp.org>
5960
5961                 * javacomp.h (compile_java_class): Add source_version,
5962                 target_version arguments.
5963                 * javacomp.c: Rewritten to choose only a compiler that
5964                 respects the specified source_version and target_version.
5965
5966         2006-06-27  Bruno Haible  <bruno@clisp.org>
5967
5968                 Assume correct S_ISDIR macro.
5969                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
5970
5971         2006-07-22  Bruno Haible  <bruno@clisp.org>
5972
5973                 * javaversion.h: New file, from GNU gettext.
5974                 * javaversion.c: New file, from GNU gettext.
5975                 * javaversion.java: New file, from GNU gettext.
5976                 * javaversion.class: New file, from GNU gettext.
5977
5978         2006-05-17  Bruno Haible  <bruno@clisp.org>
5979
5980                 Cygwin portability.
5981                 * javaexec.c (execute_java_class): Test for jview program
5982                 also on Cygwin.
5983
5984         2006-04-09  Bruno Haible  <bruno@clisp.org>
5985
5986                 * fatal-signal.c: Don't include string.h.
5987                 (at_fatal_signal): Use a copying loop instead of memcpy.
5988
5989         2005-12-04  Bruno Haible  <bruno@clisp.org>
5990
5991                 * csharpexec.c: Add support for 'clix' launcher (untested).
5992                 (execute_csharp_using_sscli): New function.
5993                 (execute_csharp_program): Call it.
5994
5995         2006-06-21  Bruno Haible  <bruno@clisp.org>
5996
5997                 Avoid warnings from recent versions of mcs.
5998                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
5999                 -o, -L, -r any more. Use options documented since mcs-1.0
6000                 instead. Similarly for -g.
6001
6002         2005-07-09  Bruno Haible  <bruno@clisp.org>
6003
6004                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6005                 add a .dll suffix.
6006                 Reported by Mark Junker <mjscod@gmx.de>.
6007
6008         2006-06-17  Bruno Haible  <bruno@clisp.org>
6009
6010                 * config.charset: Update for NetBSD 3.0.
6011
6012         2006-05-17  Bruno Haible  <bruno@clisp.org>
6013
6014                 Cygwin portability.
6015                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6016
6017         2006-05-16  Bruno Haible  <bruno@clisp.org>
6018
6019                 * localcharset.c [CYGWIN]: Include <windows.h>.
6020                 (get_charset_aliases): For Cygwin, return the same CPxxx
6021                 aliases list as under WIN32.
6022                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6023                 the environment variables. Fall back to GetACP().
6024
6025         2006-04-05  Bruno Haible  <bruno@clisp.org>
6026
6027                 * config.charset: Update Juan Manuel Guerrero's address.
6028
6029         2005-02-12  Bruno Haible  <bruno@clisp.org>
6030
6031                 * allocsa.h: Add extern "C" for C++.
6032
6033         2005-02-10  Bruno Haible  <bruno@clisp.org>
6034
6035                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6036                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6037
6038         2006-07-22  Bruno Haible  <bruno@clisp.org>
6039
6040                 * gettext.h: Update to GNU gettext-0.15.
6041
6042 2006-07-22  Bruno Haible  <bruno@clisp.org>
6043
6044         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6045         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6046         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6047
6048 2006-07-21  Eric Blake  <ebb9@byu.net>
6049
6050         * modules/stdlib-safer: New file.
6051         * MODULES.html.sh (File stream based Input/Output): Add
6052         stdlib-safer.
6053
6054 2006-07-21  Eric Blake  <ebb9@byu.net>
6055
6056         * lib/stdlib-safer.h: New file from coreutils, required by
6057         stdlib--.h.
6058
6059 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6060
6061         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6062
6063 2006-07-20  Bruno Haible  <bruno@clisp.org>
6064
6065         * gnulib-tool: Recognize new option --assume-autoconf.
6066         (autoconf_minversion): New variable.
6067         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6068
6069 2006-07-20  Bruno Haible  <bruno@clisp.org>
6070
6071         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6072
6073 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6074
6075         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6076         Reindent and repaginate.
6077
6078 2006-07-19  Derek Price  <derek@ximbiot.com>
6079
6080         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6081         Correct grammar.
6082
6083 2006-07-17  Bruno Haible  <bruno@clisp.org>
6084
6085         * modules/list: New file.
6086         * modules/array-list: New file.
6087         * modules/carray-list, modules/carray-list-tests: New files.
6088         * modules/linked-list, modules/linked-list-tests: New files.
6089         * modules/avltree-list, modules/avltree-list-tests: New files.
6090         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6091         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6092         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6093         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6094         * modules/oset: New file.
6095         * modules/array-oset: New file.
6096         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6097         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6098         * tests/test-carray_list.c: New file.
6099         * tests/test-linked_list.c: New file.
6100         * tests/test-avltree_list.c: New file.
6101         * tests/test-rbtree_list.c: New file.
6102         * tests/test-linkedhash_list.c: New file.
6103         * tests/test-avltreehash_list.c: New file.
6104         * tests/test-rbtreehash_list.c: New file.
6105         * tests/test-avltree_oset.c: New file.
6106         * tests/test-rbtree_oset.c: New file.
6107         * MODULES.html.sh (Container data structures): New section.
6108
6109 2006-07-17  Bruno Haible  <bruno@clisp.org>
6110
6111         * m4/gl_list.m4: New file.
6112
6113 2006-07-17  Bruno Haible  <bruno@clisp.org>
6114
6115         * lib/gl_list.h: New file.
6116         * lib/gl_list.c: New file.
6117         * lib/gl_array_list.h: New file.
6118         * lib/gl_array_list.c: New file.
6119         * lib/gl_carray_list.h: New file.
6120         * lib/gl_carray_list.c: New file.
6121         * lib/gl_linked_list.h: New file.
6122         * lib/gl_linked_list.c: New file.
6123         * lib/gl_anylinked_list1.h: New file.
6124         * lib/gl_anylinked_list2.h: New file.
6125         * lib/gl_avltree_list.h: New file.
6126         * lib/gl_avltree_list.c: New file.
6127         * lib/gl_anyavltree_list1.h: New file.
6128         * lib/gl_anyavltree_list2.h: New file.
6129         * lib/gl_rbtree_list.h: New file.
6130         * lib/gl_rbtree_list.c: New file.
6131         * lib/gl_anyrbtree_list1.h: New file.
6132         * lib/gl_anyrbtree_list2.h: New file.
6133         * lib/gl_anytree_list1.h: New file.
6134         * lib/gl_anytree_list2.h: New file.
6135         * lib/gl_linkedhash_list.h: New file.
6136         * lib/gl_linkedhash_list.c: New file.
6137         * lib/gl_anyhash_list1.h: New file.
6138         * lib/gl_anyhash_list2.h: New file.
6139         * lib/gl_avltreehash_list.h: New file.
6140         * lib/gl_avltreehash_list.c: New file.
6141         * lib/gl_rbtreehash_list.h: New file.
6142         * lib/gl_rbtreehash_list.c: New file.
6143         * lib/gl_anytreehash_list1.h: New file.
6144         * lib/gl_anytreehash_list2.h: New file.
6145
6146         * lib/gl_oset.h: New file.
6147         * lib/gl_oset.c: New file.
6148         * lib/gl_array_oset.h: New file.
6149         * lib/gl_array_oset.c: New file.
6150         * lib/gl_avltree_oset.h: New file.
6151         * lib/gl_avltree_oset.c: New file.
6152         * lib/gl_rbtree_oset.h: New file.
6153         * lib/gl_rbtree_oset.c: New file.
6154         * lib/gl_anytree_oset.h: New file.
6155
6156 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6157
6158         * m4/mkancesdirs.m4: New file.
6159         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6160         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6161         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6162         it.
6163
6164 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6165
6166         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6167         * lib/mkancesdirs.h: New files.
6168         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6169         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6170         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6171         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6172         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6173         callers changed.  Revamp internals significantly, by not
6174         attempting to create directories that are temporarily more
6175         permissive than the final results.  Do not attempt to use
6176         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6177         This removes some race conditions, fixes some bugs, and simplifies
6178         things.  Use new dirchownmod function to do owner and mode changes.
6179         * lib/mkdir-p.h: Likewise.
6180         * lib/modechange.c (octal_to_mode): New function.
6181         (struct mode_change): New member mentioned.
6182         (make_node_op_equals): New arg mentioned.  All callers changed.
6183         (mode_compile): Keep track of which mode bits the user has explicitly
6184         mentioned.
6185         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6186         New arg PMODE_BITS, to keep track of which mode bits the user
6187         mentioned; it treats S_ISUID and S_ISGID speciall.
6188         All callers changed.
6189         * lib/modechange.h: Likewise.
6190
6191 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6192
6193         * MODULES.html.sh: Add mkancestors.
6194         * modules/mkancesdirs: New module.
6195         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6196         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6197         The chdir-safer and afs files are now orphans; I'll remove them
6198         unless someone speaks up.
6199         Add lib/dirchownmod.c, lib/dirchownmod.h.
6200         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6201         Add lchown, mkancesdirs.
6202         (Maintainer): Add self.
6203
6204 2006-07-15  Karl Berry  <karl@gnu.org>
6205
6206         * gnulib-tool: help message wording/arrangement.
6207
6208 2006-07-14  Simon Josefsson  <jas@extundo.com>
6209
6210         * doc/gnulib.texi (Libtool and Windows): New section.
6211
6212 2006-07-12  Simon Josefsson  <jas@extundo.com>
6213
6214         * modules/gendocs (License): Fix license, approved by Karl.
6215
6216 2006-07-12  Eric Blake  <ebb9@byu.net>
6217
6218         * MODULES.html.sh: Add gendocs.
6219
6220 2006-07-11  Eric Blake  <ebb9@byu.net>
6221
6222         * modules/fdl: New module, to install doc/fdl.texi.
6223         * MODULES.html.sh: Add new section for documentation modules.
6224         * gnulib-tool: Avoid space-tab.
6225         (--doc-base): New option, to manage files from doc.
6226
6227 2006-07-11  Eric Blake  <ebb9@byu.net>
6228
6229         * m4/absolute-header.m4: Fix comments to match recent change.
6230
6231 2006-07-11  Eric Blake  <ebb9@byu.net>
6232
6233         * gnulib-tool: List --doc-base before --tests-base.
6234
6235 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6236
6237         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6238
6239 2006-07-11  Bruno Haible  <bruno@clisp.org>
6240
6241         * README: Mention where to put documentation.
6242
6243 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6244
6245         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6246
6247 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6248
6249         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6250         to stdint.m4.
6251
6252 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6253
6254         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6255         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6256         "no/such/file/stdint.h" when there is no such file, so that
6257         the resulting C code can be parsed by dodgy compilers.
6258         Problems reported by Bob Proulx.
6259
6260 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6261
6262         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6263         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6264         macros into the GNU _D_EXACT_NAMLEN.
6265         * lib/savedir.c:  Likewise.
6266         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6267
6268 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6269         and Paul Eggert  <eggert@cs.ucla.edu>
6270
6271         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6272         * m4/savedir.m4:
6273         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6274         macros into the GNU _D_EXACT_NAMLEN.
6275
6276 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6277
6278         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6279         around the absolute name, to work around a problem with the HP-UX
6280         11.23 native C compiler, reported by Bob Proulx.
6281
6282 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6283
6284         * doc/maintain.texi, make-stds.texi: Sync from
6285         <http://savannah.gnu.org/projects/gnustandards>.
6286
6287 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6288
6289         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6290
6291 2006-07-09  Jim Meyering  <jim@meyering.net>
6292
6293         * m4/glob.m4: Remove a doubled word in a comment.
6294
6295 2006-07-09  Jim Meyering  <jim@meyering.net>
6296
6297         * lib/argp-pv.c: Remove a doubled word in a comment.
6298         * lib/check-version.c (check_version): Likewise.
6299         * lib/javacomp.c (compile_java_class): Likewise.
6300
6301 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6302
6303         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6304         for the benefit of people using Autoconf 2.60.  If you want to
6305         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6306         (or m4/onceonly.m4, if pre-2.57) manually.
6307
6308 2006-07-08  Jim Meyering  <jim@meyering.net>
6309
6310         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6311         comment.
6312         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6313         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6314         comment.
6315
6316 2006-07-08  Jim Meyering  <jim@meyering.net>
6317
6318         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6319
6320 2006-07-07  Simon Josefsson  <jas@extundo.com>
6321
6322         * tests/test-crc.c: Change expected crc value, the test vector
6323         were probably computed using the old broken crc.c?
6324
6325 2006-07-06  Simon Josefsson  <jas@extundo.com>
6326
6327         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6328         now the canonical place for the M4 file).
6329
6330         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6331         from the sys_socket dependency now.
6332
6333         * modules/inet_pton (Files): Ditto.
6334
6335         * modules/inet_ntop (Files): Ditto.
6336
6337 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6338
6339         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6340         not gl_PREREQ_GETUSERSHELL.
6341
6342 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6343
6344         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6345         with only one argument, for Autoconf 2.60.
6346         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6347         expand to nothing, so add a shell command to avoid syntax error.
6348         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6349
6350 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6351
6352         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6353
6354 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6355
6356         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6357         no longer needed.  Check for isblank decl.
6358         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
6359         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
6360         of existence.
6361
6362 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6363
6364         * lib/getloadavg.c: Use __VMS, not VMS.
6365         * lib/getopt.c: Likewise.
6366         * lib/getpagesize.h: Likewise.
6367         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6368         and probably does not work.
6369
6370 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6371
6372         * lib/.cppi-disable: Add wcwidth.
6373         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6374         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6375         (ISGRAPH): Remove.  All uses changed to isgraph.
6376         (FOLD) [!defined _LIBC]: Remove special case.
6377         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6378         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6379         HAVE_ISBLANK.
6380         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6381         case.
6382
6383 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6384
6385         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6386         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6387         brackets.  Other minor changes to suppress some compiler
6388         warnings.
6389
6390 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6391         and Paul Eggert  <eggert@cs.ucla.edu>
6392
6393         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6394         of invoking obsolescent AC_HEADER_DIRENT macro.
6395         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6396         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6397         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6398         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6399         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6400         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6401         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6402         * m4/readdir.m4: Remove; no longer needed.
6403
6404 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6405         and Paul Eggert  <eggert@cs.ucla.edu>
6406
6407         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6408         Don't worry about this obsolete case any more.
6409         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6410         directories.
6411         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6412         worry about this obsolete case any more.
6413         * lib/fts.c: Likewise.
6414         * lib/getcwd.c: Likewise.
6415         * lib/glob.h: Likewise.
6416         * lib/savedir.c: Likewise.
6417
6418 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6419
6420         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6421         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6422         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6423         needed.
6424         All uses removed.
6425         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6426         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6427         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6428         needed.
6429         * m4/getdate.m4 (gl_GETDATE): Likewise.
6430         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6431         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6432         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6433         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6434         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6435         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6436         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6437         needed.
6438
6439 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6440
6441         * lib/memcasecmp.c: Include <limits.h>.
6442         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6443         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6444         Don't assume isdigit succeeds only on '0' through '9'.
6445
6446 2006-07-05  Eric Blake  <ebb9@byu.net>
6447
6448         * modules/getaddrinfo (Depends-on): Add snprintf.
6449
6450 2006-07-05  Eric Blake  <ebb9@byu.net>
6451
6452         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6453         to avoid 'header present but could not be compiled' on cygwin.
6454
6455 2006-07-05  Eric Blake  <ebb9@byu.net>
6456
6457         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6458         missing from netdb.h.
6459         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6460
6461 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6462
6463         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6464         no longer needed.
6465         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6466         * m4/getdate.m4 (gl_GETDATE): Likewise.
6467         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6468         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6469         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6470         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6471         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6472
6473 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6474
6475         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6476         All uses of is_space replaced by isspace.
6477         * lib/exit.h: Don't talk about STDC_HEADERS.
6478         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6479         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6480         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6481         replaced by isprint etc.
6482         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6483         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6484         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6485         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6486         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6487         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6488
6489 2006-07-05  Bruno Haible  <bruno@clisp.org>
6490
6491         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6492         the function exists, before testing against AIX.
6493         Reported by Martin Lambers <marlam@marlam.de>.
6494
6495 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6496
6497         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6498         From Mark D. Baushke.
6499
6500 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6501
6502         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
6503         to the absolute name, not just one, to bypass Sun C 5.8's
6504         "warning: #include of /usr/include/... may be non-portable".
6505
6506 2006-07-04  Eric Blake  <ebb9@byu.net>
6507
6508         * modules/dirname-tests: New test module.
6509         * tests/test-dirname.c: New file, replacing dirname.c
6510         TEST_DIRNAME section that was recently deleted.
6511
6512 2006-07-04  Bruno Haible  <bruno@clisp.org>
6513
6514         Assume ANSI C header files and <ctype.h> functions.
6515         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
6516         (mbsnwidth): Use isprint, iscntrl instead.
6517
6518 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6519
6520         Merge from coreutils.
6521         * MODULES.html.sh: Add xstrtold.
6522         * modules/xstrtold: New file.
6523         * modules/cycle-check (Files): Add lib/same-inode.h.
6524         * modules/dirname (Files): Add m4/double-slash-root.m4.
6525         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
6526         * modules/mkdir-p (Files): Add lib/same-inode.h.
6527         * modules/same (Files): Add lib/same-inode.h.
6528
6529 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6530
6531         * m4/absolute-header.m4: Renamed from full-header-path.m4.
6532         This is to keep the terminology clean; POSIX talks about
6533         "absolute pathnames", not "full pathnames", but the GNU
6534         Coding Standards say to use "path" for something else;
6535         so use "absolute" to keep both sides happy.
6536         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
6537         Set gl_absolute_header, not gl_full_header_path.
6538         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
6539         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
6540         All uses changed.
6541
6542         Merge from coreutils.
6543
6544         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6545
6546         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
6547         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
6548         want to require the building of c-strtod.o.
6549         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
6550         needs -lm directly.
6551         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
6552
6553         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6554
6555         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
6556         --as-needed option if available.  Problem reported by Albert Chin in
6557         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
6558         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
6559         cc merely issues a bunch of annoying warnings for --as-needed
6560         (this problem was reported by Bob Proulx).  Also, try linking with
6561         -lm to detect a bug in binutils 2.16 (this problem was reported
6562         by Ralf Wildenhues).
6563
6564         2006-06-18  Jim Meyering  <jim@meyering.net>
6565
6566         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
6567         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
6568         macro.
6569         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
6570         also check for glibc-2.4's abort-inducing bug.
6571
6572         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
6573         Low-probability clean-up should be to use rmdir to get rid of
6574         the just-created directory, not unlink.
6575
6576         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
6577         configure fail, and request a bug report to inform us about it.
6578         Add a comment that, barring reports to the contrary, in 2007 we'll
6579         assume ftruncate is universally available.
6580
6581         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6582
6583         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
6584
6585         2006-03-12  Jim Meyering  <jim@meyering.net>
6586
6587         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
6588         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
6589         * m4/same.m4 (gl_SAME): Likewise.
6590         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
6591
6592         2006-03-11  Eric Blake  <ebb9@byu.net>
6593
6594         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
6595         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
6596         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
6597         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
6598
6599 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6600
6601         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
6602         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
6603         reported by Mark D. Baushke, one in
6604         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
6605
6606         Merge from coreutils.
6607
6608         * lib/.cppi-disable: Add stdint_.h.
6609         * lib/.cvsignore: Add stdint.h.
6610
6611         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6612
6613         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
6614         both double and long double versions.
6615         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
6616         * lib/xstrtold.c: New file.
6617         * lib/xstrtod.h (xstrtold): New decl.
6618
6619         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
6620
6621         * lib/filemode.c (setst): Remove.
6622         (strmode): Rewrite to avoid setst.  This makes the code shorter,
6623         (arguably) clearer, and the generated code is a bit smaller on my
6624         Debian GNU/Linux stable x86 host.
6625
6626         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6627
6628         * lib/filemode.c: Include "filemode.h" first, to test the interface.
6629         Assume that filemode.h includes sys/types.h and sys/stat.h.
6630         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
6631         (ftypelet): Reorder to put common cases first, for efficiency.
6632         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
6633         to do 'M'.
6634         (strmode): Renamed from mode_string, and now stores 12 bytes instead
6635         of 10, for compatibility with FreeBSD.  All callers changed.
6636         (filemodestring): Now stores 12 bytes instead of 10, and sets file
6637         types that can't be deduced solely from st_mode.  First arg is now a
6638         const pointer.
6639         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
6640         (strmode): Renamed from mode_string.
6641         (filemodestring): New decl.
6642         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
6643         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
6644         needed.
6645         (S_ISPORT, S_ISWHT): New macros, if not already defined.
6646
6647         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
6648
6649         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
6650         fsusage.h now does that.  Include fsusage.h first, to test interface.
6651         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
6652         at most one method (the old code could have generated decls that
6653         didn't conform to C89, not that this was ever exercised).
6654         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
6655
6656         2006-03-19  Jim Meyering  <jim@meyering.net>
6657
6658         Work even in a chroot where d_ino values for entries in "/"
6659         don't match the stat.st_ino values for the same names.
6660         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
6661         number, iterate through all entries again, using lstat instead.
6662         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
6663         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
6664
6665         * lib/getcwd.c (__getcwd): Clarify a comment.
6666         Use memcpy in place of a call to strcpy.
6667
6668         2006-03-12  Jim Meyering  <jim@meyering.net>
6669
6670         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
6671         matches that of the current directory (which we're about to chdir ".."
6672         out of), then save the dev-ino of the parent, instead.
6673
6674         * lib/same-inode.h (SAME_INODE): New file/macro.
6675         * lib/chdir-safer.c (SAME_INODE): Remove definition.
6676         Include "same-inode.h", instead.
6677         * lib/same.c: Likewise.
6678         * lib/cycle-check.h: Include "same-inode.h".
6679         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
6680         * lib/cycle-check.c (SAME_INODE): Remove definition.
6681         * lib/root-dev-ino.h: Include "same-inode.h".
6682
6683         2006-03-11  Eric Blake  <ebb9@byu.net>
6684
6685         * lib/same.c (same_name): s/base_name/last_component/
6686         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
6687         * lib/filenamecat.c (file_name_concat): Likewise.
6688
6689         2006-03-11  Eric Blake  <ebb9@byu.net>,
6690                     Paul Eggert  <eggert@cs.ucla.edu>
6691
6692         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
6693         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
6694         drive prefix.
6695         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
6696         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
6697         (last_component): New method.
6698         * lib/dirname.c (dir_len): Determine when drive letters need a
6699         subsequent slash.  Preserve // when it is special.
6700         (dir_name): Don't append dot when drive letter is absolute.
6701         [TEST_DIRNAME]: Move into a full-blown gnulib test.
6702         * lib/basename.c (base_name): New semantics - malloc the result.
6703         Preserve // when it is special.  Preserve relative files that look
6704         like drive letters.
6705         (base_len): Preserve // when it is special.
6706         (last_component): New method, similar to old base_name semantics.
6707         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
6708         base_name.  Strip redundant slashes from ///.
6709
6710 2006-07-03  Jim Meyering  <jim@meyering.net>
6711
6712         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
6713         macro is used before the first cycle_check call.
6714
6715 2006-07-03  Eric Blake  <ebb9@byu.net>
6716
6717         * modules/dirname (Depends-on): Add xstrndup.
6718
6719 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6720
6721         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
6722         test cases, so that config.log is a bit easier to follow.
6723
6724 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6725
6726         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
6727         both are 64 bits, since this seems to be the tradition, and this
6728         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
6729         we ever run into a host that prefers long long to long in this
6730         case, we'll need another configure-time test.  Problem reported by
6731         Jim Meyering.
6732
6733 2006-07-02  Eric Blake  <ebb9@byu.net>
6734
6735         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
6736
6737 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6738
6739         * modules/inttypes (Depends-on): No longer depends on stdint.
6740         * modules/stdint (Description): Say more about assumptions.
6741         Say that the fast types might differ.  Say macros are used.
6742         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
6743         (Makefile.am): Revise list of substituted symbols to match
6744         new stdint.m4.
6745         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
6746         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
6747         * tests/test-stdint.c (verify_same_types)
6748         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
6749         the code conforms to C99/C89.
6750         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
6751         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
6752
6753 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6754
6755         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
6756         but fix a bug, by requiring at least 64 bits.
6757         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
6758         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
6759         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
6760         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
6761
6762         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
6763         changes.  Make 2.59 a prerequisite.  Check and substitute for
6764         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
6765         inttypes.h.  Do not use special include files; just use the
6766         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
6767         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
6768         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
6769         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
6770         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
6771         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
6772         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
6773         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
6774         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
6775         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
6776         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
6777         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
6778         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
6779         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
6780         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
6781         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
6782         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
6783         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
6784         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
6785         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
6786         WINT_MAX.  Check for C99 conformance more strictly, by detecting
6787         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
6788         not check for things that C99 does not require, e.g., int8_t.  If
6789         a test isn't needed unless <stdint.h> isn't working, and is
6790         unlikely to be needed for any other reason, then don't do it
6791         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
6792         size_t, since we assume C89 freestanding at least.  Do not check
6793         for sig_atomic_t, wchar_t, or wint_t, since the code now does
6794         the right thing even if the types are not defined.  Instead use:
6795         (gl_STDINT_TYPE_PROPERTIES): New macro.
6796         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
6797         testing whether <sys/types.h> clashes, as Autoconf does this for
6798         us now.  All uses removed.
6799         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
6800         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
6801         (gl_CHECK_TYPE_SAME):
6802         Remove; no longer needed.
6803         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
6804         exists, since we'll return 0 anyway in that case.
6805         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
6806
6807 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6808
6809         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
6810         possible collision with system files.
6811         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
6812         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
6813         WCHAR_MIN and WCHAR_MAX in this case.
6814         (<stddef.h>): Do not include; no longer needed.
6815         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
6816         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
6817         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
6818         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
6819         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
6820         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
6821         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
6822         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
6823         !defined(__c99))]: Include in this case too, since it's harmless
6824         now.
6825         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
6826         dangerous to do so.
6827         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
6828         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
6829         (_STDINT_MIN, _STDINT_MAX): New macros.
6830         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
6831         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
6832         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
6833         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
6834         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
6835         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
6836         macros, not typedefs; this simplifies things quite a bit.
6837         Use long int for all types narrower than int64_t.
6838         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
6839         Define in terms of long long int or int64_t or long int,
6840         not int64_t or int32_t.  This saves some compile-time testing.
6841         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
6842         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
6843         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
6844         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
6845         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
6846         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
6847         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
6848         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
6849         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
6850         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
6851         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6852         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6853         undef any previous version and define our own version, for
6854         simplicity and consistency with the new macros for types.
6855         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6856         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
6857         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
6858         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
6859         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
6860         @WINT_T_SUFFIX@ to keep things simple here.
6861         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
6862         Simplify by assuming typical 8/16/32/64 host, since we're
6863         already doing that elsewhere anyway.
6864         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
6865         and assume long long int is 64 bits if available.  This
6866         speeds up 'configure'.
6867
6868 2006-07-01  Eric Blake  <ebb9@byu.net>
6869
6870         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
6871         Reported by Andreas Buening.
6872
6873 2006-07-01  Eric Blake  <ebb9@byu.net>
6874
6875         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
6876
6877 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6878
6879         * lib/getaddrinfo.c: fixed typo
6880
6881 2006-06-29  Jim Meyering  <jim@meyering.net>
6882
6883         * modules/strftime (Maintainer): Add my name, since with the
6884         FPRINTFTIME changes strftime.c has forked from glibc.
6885
6886 2006-06-29  Eric Blake  <ebb9@byu.net>
6887
6888         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
6889
6890 2006-06-29  Eric Blake  <ebb9@byu.net>
6891
6892         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
6893
6894 2006-06-29  Eric Blake  <ebb9@byu.net>
6895
6896         * lib/stat_.h: New file.
6897
6898 2006-06-29  Eric Blake  <ebb9@byu.net>
6899
6900         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
6901         unused static function.
6902
6903 2006-06-29  Eric Blake  <ebb9@byu.net>
6904
6905         * doc/functions.texi (Function Portability): Document missing lstat
6906         on mingw.
6907
6908 2006-06-29  Eric Blake  <ebb9@byu.net>
6909
6910         * MODULES.html.sh: Add sys_stat.
6911         * modules/sys_stat: New module.
6912         * modules/mkstemp (Depends-on): Add sys_stat.
6913
6914 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6915
6916         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
6917
6918 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6919
6920         * m4/c-bs-a.m4: Removed.
6921
6922 2006-06-29  Derek R. Price  <derek@ximbiot.com>
6923
6924         * lib/strftime.c: Assume strftime() exists.
6925
6926 2006-06-29  Derek Price  <derek@ximbiot.com>
6927
6928         * modules/c-bs-a: Removed - \a is C89.
6929         * MODULES.html.sh: Remove c-bs-a.
6930
6931 2006-06-29  Bruno Haible  <bruno@clisp.org>
6932
6933         * modules/wcwidth (License): Change to LGPL.
6934
6935 2006-06-28  Simon Josefsson  <jas@extundo.com>
6936
6937         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
6938         on _WIN32.
6939
6940         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
6941         getnameinfo.
6942
6943 2006-06-28  Simon Josefsson  <jas@extundo.com>
6944
6945         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
6946
6947 2006-06-28  Simon Josefsson  <jas@extundo.com>
6948
6949         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
6950         functions there.  It will succeed on Windows XP, but on Windows
6951         2000 and (presumably) earlier, it will fail, and use the internal
6952         re-implementation.
6953         (use_win32_p): New function.
6954         (getaddrinfo): Use strtoul on servname, to support numeric ports.
6955         Support AI_NUMERICSERV to disable getservbyname.
6956         (getnameinfo): New function, only supports
6957         NI_NUMERICHOST|NI_NUMERICSERV for now.
6958
6959         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
6960         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
6961         getnameinfo.
6962
6963 2006-06-28  Eric Blake  <ebb9@byu.net>
6964
6965         * modules/wcwidth: New file.
6966         * modules/mbchar (Depends-on): Add wcwidth.
6967         * modules/mbswidth (Depends-on): Add wcwidth.
6968         * MODULES.html.sh: Add wcwidth.
6969
6970 2006-06-28  Eric Blake  <ebb9@byu.net>
6971
6972         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
6973         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
6974
6975 2006-06-28  Eric Blake  <ebb9@byu.net>
6976
6977         * lib/xvasprintf.h: Fix comments.
6978
6979 2006-06-28  Eric Blake  <ebb9@byu.net>
6980
6981         * lib/mbchar.h (wcwidth): Include wcwidth.h.
6982         * lib/mbswidth.c (wcwidth): Move from here...
6983         * lib/wcwidth.h: ...to this new file.
6984
6985 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6986
6987         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
6988
6989         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
6990         it's obsolete.
6991         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
6992
6993 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6994
6995         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
6996         Autoconf 2.60 says this stuff was obsolete.
6997
6998 2006-06-28  Bruno Haible  <bruno@clisp.org>
6999
7000         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7001
7002 2006-06-28  Bruno Haible  <bruno@clisp.org>
7003
7004         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7005         gt_TYPE_WCHAR_T.
7006
7007 2006-06-28  Bruno Haible  <bruno@clisp.org>
7008
7009         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7010         declaration for wcwidth.
7011         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7012
7013 2006-06-28  Bruno Haible  <bruno@clisp.org>
7014
7015         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7016         (mkdir): Define using _mkdir.
7017
7018 2006-06-28  Bruno Haible  <bruno@clisp.org>
7019
7020         * lib/getaddrinfo.h: Fix POSIX URL.
7021         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7022         _WIN32.
7023         (use_win32_p): Make static.
7024         (getaddrinfo): Reject service name if it is empty or does not consist
7025         solely of decimal digits, or if its value is > 65535.
7026         (getnameinfo): Remove useless casts.
7027
7028 2006-06-27  Simon Josefsson  <jas@extundo.com>
7029
7030         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7031         Eggert and Martin Lambers.
7032
7033 2006-06-27  Simon Josefsson  <jas@extundo.com>
7034
7035         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7036         Eggert and Martin Lambers.
7037
7038 2006-06-27  Bruno Haible  <bruno@clisp.org>
7039
7040         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7041         result to 0, not to empty.
7042         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7043
7044 2006-06-27  Bruno Haible  <bruno@clisp.org>
7045
7046         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7047
7048 2006-06-26  Simon Josefsson  <jas@extundo.com>
7049
7050         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7051         present.
7052
7053 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7054
7055         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7056         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7057         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7058
7059 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7060
7061         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7062
7063 2006-06-26  Bruno Haible  <bruno@clisp.org>
7064
7065         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7066
7067 2006-06-26  Bruno Haible  <bruno@clisp.org>
7068
7069         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7070
7071 2006-06-26  Bruno Haible  <bruno@clisp.org>
7072
7073         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7074         SGI C compiler in pre-C99 mode.
7075         Suggested by Mark D. Baushke and Larry Jones.
7076
7077 2006-06-26  Bruno Haible  <bruno@clisp.org>
7078
7079         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7080         WCHAR_MAX.
7081         Reported by Mark D. Baushke and Larry Jones.
7082
7083 2006-06-26  Bruno Haible  <bruno@clisp.org>
7084
7085         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7086         in pre-C99 mode.
7087         Suggested by Mark D. Baushke and Larry Jones.
7088
7089 2006-06-23  Simon Josefsson  <jas@extundo.com>
7090             Bruno Haible  <bruno@clisp.org>
7091
7092         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7093         Emit mostlyclean-local rule.
7094         (func_emit_tests_Makefile_am): Likewise.
7095         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7096
7097 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7098
7099         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7100
7101 2006-06-23  Bruno Haible  <bruno@clisp.org>
7102
7103         * tests/test-stdint.c: Update to match ISO C 99 Technical
7104         Corrigendum 1.
7105
7106 2006-06-23  Bruno Haible  <bruno@clisp.org>
7107
7108         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7109
7110 2006-06-23  Bruno Haible  <bruno@clisp.org>
7111
7112         * lib/stdint_.h: Treat IRIX like OpenBSD.
7113
7114 2006-06-23  Bruno Haible  <bruno@clisp.org>
7115
7116         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7117         ISO C 99 Technical Corrigendum 1.
7118
7119 2006-06-22  Simon Josefsson  <jas@extundo.com>
7120
7121         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7122         MinGW.
7123
7124 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7125
7126         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7127         needed.  Some compiler complained about some of them.  Problem reported
7128         by Larry Jones in
7129         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7130
7131 2006-06-21  Simon Josefsson  <jas@extundo.com>
7132
7133         * tests/test-getaddrinfo.c: New file.
7134
7135         * modules/getaddrinfo-tests: New file.
7136
7137         * MODULES.html.sh: Add inet_pton.
7138
7139         * modules/inet_pton: New file.
7140
7141 2006-06-21  Simon Josefsson  <jas@extundo.com>
7142
7143         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7144         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7145         of using the (limited) gnulib implementation on Windows XP.
7146
7147         * m4/inet_pton.m4: New file.
7148
7149 2006-06-21  Simon Josefsson  <jas@extundo.com>
7150
7151         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7152         variable.
7153
7154         * lib/socket_.h: Don't define WINVER.
7155
7156         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7157         slightly modified to work in gnulib.
7158
7159 2006-06-21  Simon Josefsson  <jas@extundo.com>
7160
7161         * doc/gnulib.texi (Windows sockets): Add.
7162
7163 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7164
7165         * lib/read-file.c (fread_file): Start with buffer allocation of
7166         0 bytes rather than 1 byte; this simplifies the code.
7167         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7168         code to free buffer and save/restore errno.
7169         (internal_read_file): Remove unused local.
7170
7171 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7172
7173         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7174         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7175         Problem reported by Denis Excoffier in
7176         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7177
7178 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7179
7180         * modules/sys_socket, modules/socklen: Include sys/types since
7181         FreeBSD 4.x's sys/socket.h needs it.
7182
7183 2006-06-19  Simon Josefsson  <jas@extundo.com>
7184
7185         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7186
7187 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7188
7189         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7190
7191 2006-06-19  Bruno Haible  <bruno@clisp.org>
7192
7193         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7194         and FULL_PATH_INTTYPES_H in angle brackets.
7195         Reported by Mark D. Baushke <mdb@gnu.org>.
7196
7197 2006-06-17  Eric Blake  <ebb9@byu.net>
7198
7199         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7200         errno.
7201
7202 2006-06-17  Bruno Haible  <bruno@clisp.org>
7203
7204         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7205         <sys/inttypes.h>.
7206
7207 2006-06-17  Bruno Haible  <bruno@clisp.org>
7208
7209         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7210         whether errno is declared. Assume <errno.h> declares errno.
7211
7212 2006-06-17  Bruno Haible  <bruno@clisp.org>
7213
7214         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7215
7216 2006-06-17  Bruno Haible  <bruno@clisp.org>
7217
7218         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7219         problem on Solaris 2.5.1.
7220
7221 2006-06-16  Eric Blake  <ebb9@byu.net>
7222
7223         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7224         * lib/unicodeio.c [!defined errno]: Likewise.
7225         * lib/strtol.c [!defined errno]: Likewise.
7226         * lib/strtod.c [!defined errno]: Likewise.
7227
7228 2006-06-15  Eric Blake  <ebb9@byu.net>
7229
7230         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7231
7232 2006-06-15  Eric Blake  <ebb9@byu.net>
7233
7234         * config/srclist.txt (ssize_t.m4): Lose sync.
7235
7236 2006-06-15  Bruno Haible  <bruno@clisp.org>
7237
7238         * modules/stdint (Files): Include m4/full-header-path.m4,
7239         m4/size_max.m4, m4/wchar_t.m4.
7240         (Makefile.am): Many more substitutions.
7241         * modules/stdint-tests: New file.
7242         * tests/test-stdint.c: New file.
7243
7244 2006-06-15  Bruno Haible  <bruno@clisp.org>
7245
7246         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7247         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7248         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7249         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7250         gl_CHECK_TYPE_SAME): New macros.
7251
7252 2006-06-15  Bruno Haible  <bruno@clisp.org>
7253
7254         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7255
7256 2006-06-15  Bruno Haible  <bruno@clisp.org>
7257
7258         * lib/stdint_.h: Rewritten to be fully auto-configured.
7259         Fixes bug on HP-UX/IA64.
7260
7261 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7262
7263         * lib/getdate.y (__attribute__): Don't define if already defined.
7264         Problem reported by Larry Jones.
7265         * lib/utimens.c (__attribute__): Likewise.
7266
7267 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7268
7269         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7270         reported by Andreas Schwab.
7271
7272 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7273             Bruno Haible  <bruno@clisp.org>
7274
7275         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7276         check for the declaration of strnlen and a run test that exposes the
7277         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7278         rpl_strndup.
7279
7280 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7281             Bruno Haible  <bruno@clisp.org>
7282
7283         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7284
7285 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7286
7287         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7288         compile test, for Tru64 4.0D.
7289
7290 2006-05-28  Karl Berry  <karl@gnu.org>
7291
7292         * config/srclist.txt (printf-args.c): lose sync.
7293
7294 2006-05-26  Martin Lambers  <marlam@marlam.de>
7295
7296         * lib/getpass.c: Updates the test for the native W32 API, and adds
7297         missing includes, thus fixing compilation warnings.
7298
7299 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7300
7301         * lib/exclude.c (exclude_fnmatch): New function.
7302         (excluded_file_name): Call exclude_fnmatch.
7303         * lib/exclude.h (excluded_file_name): New prototype
7304
7305 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7306
7307         * lib/tempname.c (small_open, large_open): New macros.
7308         (__open, __open64) [!_LIBC]: Remove.
7309         (__gen_tempname): Use small_open and large_open instead of __open
7310         and __open64.  This fixes a portability bug on HP-UX 11.11i
7311         reported by Simon Wing-Tang in
7312         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7313
7314 2006-05-24  Bruno Haible  <bruno@clisp.org>
7315
7316         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7317         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7318         Reported by Thorsten Maerz <torte@netztorte.de> via
7319         Aaron Stone <aaron@serendipity.cx>.
7320
7321 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7322
7323         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7324         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7325         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7326         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7327         not really conditional on the cache.
7328         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7329
7330 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7331
7332         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7333         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7334         (my_usleep): Don't mishandle maximum value.
7335
7336 2006-05-19  Jim Meyering  <jim@meyering.net>
7337
7338         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7339
7340 2006-05-17  Bruno Haible  <bruno@clisp.org>
7341
7342         Cygwin portability.
7343         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7344
7345 2006-05-17  Bruno Haible  <bruno@clisp.org>
7346
7347         * lib/stdint_.h: Fix recognition of Cygwin.
7348
7349 2006-05-15  Bruno Haible  <bruno@clisp.org>
7350
7351         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7352         on libtool patch by Ralf Wildenhues.
7353
7354 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7355
7356         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7357         test for C99 conformance; (bool) 0.5 is an integer constant
7358         expression, but (bool) -0.5 is not.  Problem reported by Fedor
7359         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
7360
7361 2006-05-11  Simon Josefsson  <jas@extundo.com>
7362
7363         * m4/xvasprintf.m4: Fix obvious typo.
7364
7365 2006-05-11  Jim Meyering  <jim@meyering.net>
7366
7367         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7368         James Lemley.
7369
7370 2006-05-10  Simon Josefsson  <jas@extundo.com>
7371
7372         * lib/md4.c: Typo fix, update copyright years.
7373         (K1, K2): Don't use L because it turn computations into 64-bit on
7374         64-bit platforms.
7375
7376 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7377
7378         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7379         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7380         unwanted sign propagation, e.g., on hosts with 64-bit int.
7381         There still are some problems with reeelly weird theoretical hosts
7382         (e.g., 33-bit int) but it's not worth worrying about now.
7383         * lib/sha1.c (rol): Likewise.
7384         (K1, K2, K3, K4): Remove unnecessary L suffix.
7385
7386 2006-05-10  Bruno Haible  <bruno@clisp.org>
7387
7388         * lib/des.c: Cast to avoid warnings.
7389
7390 2006-05-09  Bruno Haible  <bruno@clisp.org>
7391
7392         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7393         (Depends-on): Depend also on xsize, stdarg.
7394         (configure.ac): Add gl_XVASPRINTF.
7395
7396 2006-05-09  Bruno Haible  <bruno@clisp.org>
7397
7398         * m4/xvasprintf.m4: New file.
7399
7400 2006-05-09  Bruno Haible  <bruno@clisp.org>
7401
7402         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7403         (EOVERFLOW): Define fallback value.
7404         (xstrcat): New function.
7405         (xvasprintf): Recognize the special case of a string concatenation.
7406
7407 2006-05-08  Eric Blake  <ebb9@byu.net>
7408
7409         * gnulib-tool (func_version): Base copyright year on CVS date.
7410         (func_emit_copyright_notice): New function.
7411         (func_emit_lib_Makefile_am): Use it.
7412         (func_emit_tests_Makefile_am): Likewise.
7413         (func_import): Likewise.
7414
7415 2006-05-08  Bruno Haible  <bruno@clisp.org>
7416
7417         * modules/stdarg: New file.
7418         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7419
7420 2006-05-08  Bruno Haible  <bruno@clisp.org>
7421
7422         * m4/stdarg.m4: New file, from GNU gettext.
7423
7424 2006-05-08  Bruno Haible  <bruno@clisp.org>
7425
7426         * config/srclist.txt (build-aux/config.rpath): different from latest
7427         release.
7428
7429 2006-05-08  Bruno Haible  <bruno@clisp.org>
7430
7431         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7432
7433 2006-05-05  Jim Meyering  <jim@meyering.net>
7434
7435         * m4/warning.m4: New file, derived from bison's file by the same name.
7436
7437 2006-05-03  Bruno Haible  <bruno@clisp.org>
7438
7439         * lib/stdint_.h: Shorter URL.
7440         * lib/inttypes.h: Likewise.
7441
7442 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7443
7444         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7445
7446 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7447
7448         * lib/verify.h: Document the internals better.  Most of this change
7449         was written by Bruno Haible.
7450
7451 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7452
7453         * doc/verify.texi: New file, partly based on a proposal by
7454         Bruno Haible.
7455
7456 2006-05-02  Bruno Haible  <bruno@clisp.org>
7457
7458         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7459         test from here...
7460         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7461
7462 2006-04-29  Bruno Haible  <bruno@clisp.org>
7463
7464         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7465         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7466
7467 2006-04-29  Bruno Haible  <bruno@clisp.org>
7468
7469         * gnulib-tool: Make --update option actually work.
7470
7471 2006-04-29  Bruno Haible  <bruno@clisp.org>
7472
7473         * doc/gcd.texi: New file.
7474         * doc/gnulib.texi: Include it.
7475
7476 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7477
7478         * lib/getdate.y (get_date): When adding relative date, start with the
7479         initial time, not with the result of the first mktime call.
7480
7481 2006-04-25  Bruno Haible  <bruno@clisp.org>
7482
7483         * gnulib-tool (func_import): Output the include directives in three
7484         blocks, sorted separately.
7485         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7486
7487 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7488
7489         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7490         to define main with arguments, for C++.  Reported by Eric Blake.
7491         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7492         Prefer 'int main ()' to 'int main (void)', for C++.
7493         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7494         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7495         for 'main', for C99 and C++.
7496
7497 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7498
7499         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7500         Don't assume that exit status -1 is valid.
7501         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7502         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
7503         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
7504         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
7505         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
7506         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
7507         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
7508         functions can be used without declaring them, or that you can
7509         exit with status -1.
7510         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
7511
7512 2006-04-24  Karl Berry  <karl@gnu.org>
7513
7514         * config/srclist.txt (longdouble.m4): sync lost.
7515
7516 2006-04-24  Eric Blake  <ebb9@byu.net>
7517
7518         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
7519
7520 2006-04-24  Bruno Haible  <bruno@clisp.org>
7521
7522         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
7523         poll() implementation in AIX.
7524         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7525
7526 2006-04-24  Bruno Haible  <bruno@clisp.org>
7527
7528         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
7529         assigned exactly once.
7530
7531 2006-04-23  Claudio Fontana  <claudio@gnu.org>
7532             Bruno Haible  <bruno@clisp.org>
7533
7534         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
7535         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
7536         for AM_CPPFLAGS.
7537
7538 2006-04-23  Bruno Haible  <bruno@clisp.org>
7539
7540         * modules/copy-file: Depend on unistd.
7541         * modules/execute: Likewise.
7542         * modules/fatal-signal: Likewise.
7543         * modules/findprog: Likewise.
7544         * modules/mkdtemp : Likewise.
7545         * modules/pipe: Likewise.
7546         * modules/wait-process: Likewise.
7547
7548 2006-04-23  Bruno Haible  <bruno@clisp.org>
7549
7550         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
7551         condition was already detected.
7552         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7553
7554 2006-04-23  Bruno Haible  <bruno@clisp.org>
7555
7556         * lib/copy-file.c: Include <unistd.h> unconditionally.
7557         * lib/execute.c: Likewise.
7558         * lib/fatal-signal.c: Likewise.
7559         * lib/findprog.c: Likewise.
7560         * lib/mkdtemp.c: Likewise.
7561         * lib/pipe.h: Likewise.
7562         * lib/pipe.c: Likewise.
7563         * lib/wait-process.h: Likewise.
7564
7565 2006-04-23  Bruno Haible  <bruno@clisp.org>
7566
7567         * gnulib-tool (func_usage): Fix --import description. Document
7568         --update.
7569         (func_import): Create temporary file in a temporary directory, if
7570         --dry-run is specified. Silence errors from 'grep' when there are no
7571         m4 files in $m4dir.
7572         (func_create_testdir): Silence errors from 'grep' when there are no
7573         m4 files in $m4dir.
7574         Reported by Karl Berry <karl@freefriends.org>.
7575
7576 2006-04-20  Bruno Haible  <bruno@clisp.org>
7577
7578         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
7579         one argument, so that the code will be portable to Autoconf 2.60.
7580         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
7581         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7582         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
7583
7584 2006-04-19  Derek Price  <derek@ximbiot.com>
7585             Eric Blake  <ebb9@byu.net>
7586
7587         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
7588         rather than "/full/path.h".  Update comment to match.  Shorten &
7589         generalize m4_translit call via AS_TR_CPP.
7590
7591 2006-04-19  Derek Price  <derek@ximbiot.com>
7592             Eric Blake  <ebb9@byu.net>
7593
7594         * lib/inttypes.h: Correct grammar in comment.
7595
7596 2006-04-18  Derek Price  <derek@ximbiot.com>
7597             Paul Eggert  <eggert@cs.ucla.edu>
7598
7599         * modules/inttypes: New file.
7600         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
7601
7602 2006-04-18  Derek Price  <derek@ximbiot.com>
7603             Paul Eggert  <eggert@cs.ucla.edu>
7604
7605         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
7606         New files.
7607
7608 2006-04-18  Derek Price  <derek@ximbiot.com>
7609             Paul Eggert  <eggert@cs.ucla.edu>
7610
7611         * lib/inttypes.h: New file.
7612         * lib/strtoimax.c: Assume <inttypes.h>.
7613
7614 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
7615
7616         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
7617         isn't mounted.  Problem reported by Kir Kolyshkin.
7618
7619 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
7620
7621         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
7622         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
7623         Derek R. Price.
7624         * lib/regex.h (RE_DUP_MAX): Update comment to match current
7625         implementation.
7626
7627 2006-04-12  Eric Blake  <ebb9@byu.net>
7628
7629         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
7630         is now done automatically by the corresponding Autoconf macro.
7631
7632 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
7633
7634         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
7635         time_r.h.
7636
7637 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7638
7639         Merge regex changes from libc, removing some of our
7640         POSIX-conformance changes that were rejected and redoing them in a
7641         less-intrusive way.
7642
7643         * lib/regcomp.c (re_compile_internal, init_dfa):
7644         Length arg is now size_t, not Idx.  All uses changed.
7645         (peek_token): Forward decl now says internal_function.
7646         (__re_error_msgid, __re_error_msgid_idx):
7647         Now static rather than extern with attribute_hidden.
7648         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
7649         For some reason libc prefers K&R style defns for external functions.
7650         (regerror) [!defined _LIBC]: Likewise.
7651         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
7652         (seek_collating_symbol_entry, lookup_collation_sequence_value):
7653         (build_range_exp, build_collating_symbol):
7654         Use K&R-style defn.
7655         (re_compile_fastmap): Use '\0' to memset, not 0.
7656         (utf8_sb_map): Make the calculations more obvious.
7657         (init_dfa, parse_bracket_exp, build_charclass_op):
7658         Call calloc and cast result, as glibc does.
7659         (init_word_char, fetch_token, peek_token, peek_token_bracket):
7660         (build_range_exp, build_collating_symbol):
7661         Now internal functions.
7662
7663         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
7664
7665         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
7666         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
7667         Don't depend on VMS; depend on __VMS instead, for POSIX
7668         namespace cleanness.
7669         (regoff_t): Define to ssize_t, not long int.
7670
7671         Remove the REG_ macros named below.  Instead, make the old names
7672         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
7673         __USE_GNU_REGEX.
7674         (REG_BACKSLASH_ESCAPE_IN_LISTS):
7675         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
7676         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
7677         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
7678         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
7679         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
7680         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
7681         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
7682         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
7683         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
7684         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
7685         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
7686         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
7687         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
7688         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
7689         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
7690         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
7691         (REG_NREGS):
7692         Remove.  All uses replaced by the old RE_* names.
7693         (RE_BACKSLASH_ESCAPE_IN_LISTS):
7694         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
7695         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
7696         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
7697         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
7698         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
7699         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
7700         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
7701         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
7702         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
7703         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
7704         Don't bother having these macros be independent of each others'
7705         values, since they no longer exist in the POSIX name space.
7706
7707         Rename the following member names back to their old names,
7708         unless !__USE_GNU_REGEX.  All uses changed back.
7709         (buffer): Renamed from re_buffer.
7710         (allocated): Renamed from re_allocated.
7711         (used): Renamed from re_used.
7712         (syntax): Renamed from re_syntax.
7713         (fastmap): Renamed from re_fastmap.
7714         (translate): Renamed from re_translate.
7715         (can_be_null): Renamed from re_can_be_null.
7716         (regs_allocated): Renamed from re_regs_allocated.
7717         (fastmap_accurate): Renamed from re_fastmap_accurate.
7718         (no_sub): Renamed from re_no_sub.
7719         (not_bol): Renamed from re_not_bol.
7720         (not_eol): Renamed from re_not_eol.
7721         (newline_anchor): Renamed from re_newline_anchor.
7722         (num_regs): Renamed from rm_num_regs.
7723         (start): Renamed from rm_start.
7724         (end): Renamed from rm_end.
7725
7726         (free_state): Move up a bit.
7727
7728         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
7729         #define to be empty.
7730         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
7731         when that is what is intended.
7732         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
7733         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
7734         (MAX): New macro.
7735         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
7736         All uses changed back to re_malloc, etc.  It's now the caller's
7737         responsibility to check for overflow; all callers changed.
7738         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
7739         (re_x2nrealloc): Remove.
7740         (free_state): Remove decl.
7741
7742         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
7743         (re_set_registers, re_exec):
7744         Use K&R-style defn.
7745
7746         2006-01-31  Roland McGrath  <roland@redhat.com>
7747
7748         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
7749         Reported by Mike Frysinger <vapier@gentoo.org>.
7750
7751         2006-01-15  Andreas Jaeger  <aj@suse.de>
7752
7753         [BZ #1950]
7754         * lib/regex_internal.c (re_string_reconstruct): Adjust for
7755         build_wcs_upper_buffer change.
7756         (build_wcs_upper_buffer): Change return type.
7757
7758         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
7759
7760         * lib/regex_internal.h: Include <stdint.h> if available.
7761
7762         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
7763
7764         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
7765
7766         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7767
7768         * lib/regcomp.c: Adjust for changed secondary hash function.
7769
7770         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
7771
7772         * lib/regex.h: Pretty printing.
7773         Clean up namespace a bit.
7774
7775         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
7776
7777         * lib/regexec.c (update_cur_sifted_state, check_arrival,
7778         check_arrival_add_next_nodes): Avoid using uninitialized variable.
7779
7780         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
7781                     Ulrich Drepper  <drepper@redhat.com>
7782
7783         [BZ #1302]
7784         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
7785         changed.
7786         (bitset_word_t): Renamed from bitset_word.  All uses changed.
7787
7788         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
7789
7790         [BZ #281]
7791         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
7792         * lib/regcomp.c: Remove unnecessary uses of
7793         unsigned RE_TRANSLATE_TYPE.
7794         * lib/regex_internal.h: Likewise.
7795         * lib/regex_internal.c: Likewise.
7796         * lib/regexec.c: Likewise.
7797         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
7798
7799         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
7800
7801         * lib/regexec.c (find_recover_state): Remove unnecessary
7802         initialization.
7803         (transit_state_bkref): Make DFA a const pointer.
7804         (get_subexp): Likewise.
7805         (check_arrival): Likewise.
7806         (update_cur_sifted_state): Likewise.
7807         (re_search_internal): Likewise.
7808         (prune_impossible_nodes): Likewise.
7809         (acquire_init_state_context): Likewise.
7810         (proceed_next_node): Likewise.
7811         (set_regs): Likewise.
7812         (free_fail_stack_return): Likewise.
7813         (check_arrival_expand_ecl): Mark DFA parameter as const.
7814         (check_arrival_expand_ecl_sub): Likewise.
7815         (check_subexp_limits): Likewise.
7816         (sub_epsilon_src_nodes):  Likewise.
7817         (add_epsilon_src_nodes):  Likewise.
7818         (merge_state_array): Likewise.
7819         (update_regs): Likewise.
7820         (build_trtable): Likewise.
7821         (sift_states_backward): Mark MCTX parameter as const.
7822         (build_sifted_states): Likewise.
7823         (update_cur_sifted_state): Likewise.
7824         (sift_states_mkref): Likewise.
7825         (check_arrival_expand_ecl): Mark eclosure as const.
7826         (check_dst_limits_calc_pos_1): Likewise.
7827         * lib/regex_internal.h (re_match_context_t): Make dfa a const
7828         pointer.
7829
7830         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
7831
7832         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
7833         (transit_state_sb): Likewise.
7834         (transit_state_mb): Likewise.
7835         (sift_states_iter_mb): Likewise.
7836         (check_arrival_add_next_nodes): Likewise.
7837         (check_node_accept_bytes): Change first parameter to pointer-to-const.
7838         [_LIBC] (re_search_2_stub): Use mempcpy.
7839
7840         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
7841         mbrtowc for very simple UTF-8 case.
7842
7843         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
7844         a pointer-to-const.
7845         (re_acquire_state_context): Likewise.
7846         * lib/regex_internal.h: Adjust prototypes.
7847
7848         * lib/regex.c: Prevent using C++ compilers.
7849
7850         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
7851         (re_acquire_state_context): Likewise.
7852
7853 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7854
7855         * modules/regex (Depends-on): Add ssize_t.
7856
7857 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7858
7859         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
7860         translation table.
7861
7862 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7863
7864         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
7865
7866 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
7867             Bruno Haible  <bruno@clisp.org>
7868
7869         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
7870         <sys/types.h> and <inttypes.h>.
7871
7872 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7873
7874         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
7875         `__error_t_defined', so argp.h will not typedef the former.
7876
7877 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
7878
7879         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
7880         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
7881         glibc names.  Even if glibc is changed to conform to POSIX, the
7882         traditional names will be available anyway, since regex depends on
7883         the extensions module.  Also, fix a longstanding typo in the
7884         implementation of Spencer ERE test #75 from grep 2.3.  Problems
7885         reported by Emanuele Giaquinta.  Also, change sense of cached
7886         variable, so that the message makes sense.
7887
7888 2006-03-24  Simon Josefsson  <jas@extundo.com>
7889
7890         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
7891         including some doc fixes.
7892         (base64_encode_alloc): Fix +1 bug on allocation failures.
7893
7894 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7895
7896         * lib/base64.c (base64_encode): Do not read past end of array with
7897         unsanitized input on systems with CHAR_BIT > 8.
7898
7899 2006-03-24  Eric Blake  <ebb9@byu.net>
7900
7901         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
7902
7903 2006-03-22  Karl Berry  <karl@gnu.org>
7904
7905         * config/srclist.txt (*setenv.[ch]): get from coreutils.
7906         * config/srclistvars.sh (COREUTILS): new var.
7907
7908 2006-03-17  Jim Meyering  <jim@meyering.net>
7909
7910         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
7911         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
7912
7913 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7914
7915         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
7916         no longer needs it.  Instead, check that regoff_t is as least
7917         as wide as ptrdiff_t.
7918
7919         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
7920         so that our regex.h stays compatible with the installed regex.
7921         This is helpful for installers who configure --without-included-regex.
7922         Problem reported by Emanuele Giaquinta.
7923
7924 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
7925
7926         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
7927         Typedef to long int, not to off_, as POSIX will likely change
7928         in that direction.
7929
7930 2006-03-15  Eric Blake  <ebb9@byu.net>
7931
7932         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
7933
7934 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7935
7936         * lib/argp-help.c (validate_uparams): Fix typo
7937         * lib/argp-parse.c (argp_default_options): Consistently begin help
7938         messages with a lowercase letter.
7939
7940 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
7941
7942         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
7943         overrun buffers and shouldn't be used (much as gets shouldn't be
7944         used).
7945         * lib/time_r.c (asctime_r, ctime_r): Likewise.
7946
7947 2006-03-08  Simon Josefsson  <jas@extundo.com>
7948
7949         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
7950         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7951
7952 2006-03-08  Simon Josefsson  <jas@extundo.com>
7953
7954         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
7955         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7956
7957 2006-03-08  Simon Josefsson  <jas@extundo.com>
7958
7959         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
7960         signal that configure disabled the device.
7961
7962 2006-03-08  Simon Josefsson  <jas@extundo.com>
7963
7964         * build-aux/maint.mk: Fix refresh-po, to handle no translated
7965         languages.
7966
7967 2006-03-07  Simon Josefsson  <jas@extundo.com>
7968
7969         * modules/getopt (Depends-on): Add unistd.
7970
7971         * modules/unistd: New file.
7972
7973 2006-03-07  Simon Josefsson  <jas@extundo.com>
7974
7975         * modules/gc-random: New file.
7976
7977 2006-03-07  Simon Josefsson  <jas@extundo.com>
7978
7979         * m4/unistd_h.m4: New file.
7980
7981 2006-03-07  Simon Josefsson  <jas@extundo.com>
7982
7983         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
7984         test to be side-effect free by storing the result in the cache
7985         variable gl_cv_lib_readline, and moving the assignment of
7986         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
7987         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7988
7989 2006-03-07  Simon Josefsson  <jas@extundo.com>
7990
7991         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
7992         error on missing devices (the functions will return an error).
7993
7994         * m4/gc.m4: Move random stuff to gc-random.m4
7995
7996 2006-03-07  Simon Josefsson  <jas@extundo.com>
7997
7998         * lib/unistd_.h: New file.
7999
8000 2006-03-07  Simon Josefsson  <jas@extundo.com>
8001
8002         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8003
8004 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8005
8006         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8007         Problem reported by Juan Manuel Guerrero.
8008
8009 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8010
8011         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8012         the unistd module.
8013         * lib/getlogin_r.c: Likewise.
8014         * lib/getlogin_r.h: Likewise.
8015         * lib/glob.c: Likewise.
8016         * lib/pagealign_alloc.c: Likewise.
8017         * lib/unistd_.h: Remove; no longer needed.
8018
8019 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8020
8021         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8022         Add unistd.
8023         * modules/c-stack (Depends-on): Add unistd.
8024         * modules/getlogin_r: Likewise.
8025         * modules/glob: Likewise.
8026         * modules/pagealign_alloc: Likewise.
8027         * modules/unistd (Files): Remove lib/unistd_.h.
8028         (EXTRA_DIST): Remove.
8029         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8030         need unistd_.h.
8031         (MOSTLYCLEANFILES): Remove unistd.h-t.
8032
8033 2006-03-03  Simon Josefsson  <jas@extundo.com>
8034
8035         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8036
8037 2006-03-03  Simon Josefsson  <jas@extundo.com>
8038
8039         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8040         libidn and bison.
8041
8042 2006-03-03  Simon Josefsson  <jas@extundo.com>
8043
8044         * build-aux/maint.mk: Add indent target.
8045
8046 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8047
8048         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8049         our replacement poll.h in any case, to avoid a differing
8050         declaration from a system header.  Seen on AIX.
8051
8052 2006-03-01  Simon Josefsson  <jas@extundo.com>
8053
8054         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8055         <kasal@ucw.cz>.
8056
8057 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8058
8059         * modules/gettime (Depends-on): Add extensions module.
8060         * modules/nanosleep (Depends-on): Likewise.
8061         * modules/settime (Depends-on): Likewise.
8062
8063 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8064
8065         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8066         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8067         pedantically.
8068         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8069         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8070
8071         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8072         not "==".  Reported by Ralf Wildenhues.
8073
8074 2006-03-01  Karl Berry  <karl@gnu.org>
8075
8076         * doc/Copyright/request-*: new files, synced from gnuorg.
8077
8078 2006-03-01  Karl Berry  <karl@gnu.org>
8079
8080         * config/srclist.txt (Copyright/*): new entries.
8081
8082 2006-02-28  Simon Josefsson  <jas@extundo.com>
8083
8084         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8085
8086 2006-02-27  Simon Josefsson  <jas@extundo.com>
8087
8088         * lib/base64.h: Indent #define's.  From Jim Meyering
8089         <jim@meyering.net>.
8090
8091 2006-02-27  Jim Meyering  <jim@meyering.net>
8092
8093         Revert the change of 2006-02-24, so these files can continue
8094         to be sync'd from gettext.
8095         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8096         of `config.h'.
8097
8098 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8099
8100         * modules/intprops: New file.
8101         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8102         Add intprops.
8103         * modules/getloadavg (Files): Remove lib/intprops.h.
8104         (Depends-on): Add intprops.
8105         * modules/human: Likewise.
8106         * modules/inttostr: Likewise.
8107         * modules/openat: Likewise.
8108         * modules/sig2str: Likewise.
8109         * modules/userspec: Likewise.
8110         * modules/utimecmp: Likewise.
8111         * modules/xnanosleep: Likewise.
8112         * modules/xstrtol: Likewise.
8113
8114 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8115
8116         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8117         * modules/lock-tests (TESTS): Use $(EXEEXT).
8118         * modules/tls-tests: Likewise.
8119         * modules/argp-tests: Likewise.
8120         (check_PROGRAMS): New var, replacing...
8121         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8122
8123 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8124
8125         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8126         `config.h'.
8127
8128 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8129
8130         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8131
8132 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8133
8134         Sync from coreutils.
8135         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8136         gl_CHDIR_SAFER.
8137
8138 2006-02-22  Jim Meyering  <jim@meyering.net>
8139
8140         Sync from coreutils.
8141         * m4/chdir-safer.m4: New file.
8142
8143 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8144
8145         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8146         AT_FDCWD exceeds INT_MAX.
8147         * lib/openat.h (AT_FDCWD): Likewise.
8148
8149 2006-02-17  Eric Blake  <address@hidden>
8150
8151         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8152
8153 2006-02-16  Simon Josefsson  <jas@extundo.com>
8154
8155         * modules/getaddrinfo (Depends-on): Add sys_socket.
8156
8157 2006-02-15  Simon Josefsson  <jas@extundo.com>
8158
8159         * build-aux/maint.mk: Add dsyntax-check rule.
8160
8161 2006-02-15  Eric Blake  <ebb9@byu.net>
8162
8163         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8164         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8165         'present but cannot compile' warnings on cygwin.
8166         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8167         use ws2tcpip.h if sys/socket.h works.
8168         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8169         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8170
8171 2006-02-14  Simon Josefsson  <jas@extundo.com>
8172
8173         * modules/maintainer-makefile (Files): Rename.
8174
8175         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8176         and (the local) Makefile.cfg to maint-cfg.mk.
8177
8178         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8179         to the latter.
8180
8181         * modules/maintainer-makefile: New module.
8182
8183         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8184         severaly stripped to make it possible to build it up from scratch
8185         with reliable tests.
8186
8187         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8188         fixes to permit overriding the default actions when configure and
8189         makefile are not available.
8190
8191 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8192
8193         Sync from coreutils.
8194         * modules/lstat (Depends-on): Don't depend on xalloc.
8195         (License): Change from GPL to LGPL, since this is now simply a
8196         replacement for a libc function.
8197
8198 2006-02-14  Jim Meyering  <jim@meyering.net>
8199
8200         Sync from coreutils.
8201
8202         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8203         failure on deficient systems, and simplify gnulib lgpl dependencies.
8204         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8205         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8206
8207         * lib/xalloc-die.c: Remove unused definition of N_.
8208
8209 2006-02-14  Jim Meyering  <jim@meyering.net>
8210
8211         Sync from coreutils.
8212         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8213         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8214         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8215         double-quote uses of that variable, to accommodate the rare case in
8216         which getmntent is available in none of the libraries checked.  This
8217         happens at least on FreeBSD 5.0.
8218
8219 2006-02-13  Simon Josefsson  <jas@extundo.com>
8220
8221         * gnulib-tool (Usage): Fix --import, from
8222         karl@freefriends.org (Karl Berry).
8223
8224 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8225
8226         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8227
8228 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8229
8230         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8231         "autoupdate" on 2005-12-12.
8232
8233 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8234
8235         * modules/closeout (Depends-on): Remove atexit.
8236
8237 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8238
8239         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8240         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8241
8242 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8243
8244         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8245         __EXTENSIONS__ if this causes compilation to fail.  Problem
8246         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8247         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8248
8249 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8250
8251         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8252         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8253         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8254         All uses changed.
8255
8256 2006-01-26  Simon Josefsson  <jas@extundo.com>
8257
8258         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8259         prototype is visible on mingw32.
8260
8261         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8262         for mingw32.
8263
8264         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8265         mingw32).
8266
8267 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8268
8269         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8270         attempt to open for write; this always fails, at least on POSIX
8271         hosts.  This reinstates the 2006-01-09 change, which was
8272         inadvertently removed.
8273
8274 2006-01-26  Bruno Haible  <bruno@clisp.org>
8275
8276         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8277         Reported by Paul Eggert.
8278
8279 2006-01-26  Bruno Haible  <bruno@clisp.org>
8280             Paul Eggert  <eggert@cs.ucla.edu>
8281
8282         * lib/stdbool_.h (_Bool)
8283         [(! (defined __cplusplus || defined __BEOS__)
8284           && !defined __GNUC__
8285           && !(defined __HP_cc || defined __xlc__
8286                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8287                || defined __sgi))]:
8288         #define to signed char in these cases too; this simplifies
8289         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8290         etc., separately) and makes it more conservative.
8291
8292 2006-01-25  Simon Josefsson  <jas@extundo.com>
8293
8294         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8295         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8296         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8297
8298 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8299
8300         * lib/argp-namefrob.h: Bugfix. Remove stray #
8301
8302 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8303
8304         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8305         so that we test the test.
8306         Check for yet another HP-UX cc bug involving *bool |= bool.
8307
8308 2006-01-25  Karl Berry  <karl@gnu.org>
8309
8310         * config/srclist.txt (vasnprintf.c): sync lost.
8311
8312 2006-01-25  Jim Meyering  <jim@meyering.net>
8313
8314         Sync from the stable (b5) branch of coreutils:
8315
8316         * lib/fts.c (fts_children): Don't let close() clobber errno from
8317         failed fchdir().
8318
8319         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8320         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8321         a dangling symlink.  That can also happen at least for ELOOP.
8322         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8323         FYI, this bug predates the inclusion of fts.c in coreutils.
8324
8325         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8326         in their own block, so pre-c99 compilers don't object.
8327
8328         Avoid the double-free (first in fts_read, second in fts_close) that
8329         would occur when an `active' directory is made inaccessible (e.g.,
8330         via chmod a-x) during a traversal.
8331         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8332         before returning.  Reproduce this failure by
8333         mkdir -p a/b; cd a; chmod a-x . b
8334         Reported by Stavros Passas.
8335
8336 2006-01-25  Jim Meyering  <jim@meyering.net>
8337
8338         * lib/fileblocks.c: Remove more useless parentheses.
8339         * lib/readutmp.h: Likewise.
8340
8341 2006-01-25  Bruno Haible  <bruno@clisp.org>
8342
8343         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8344         warnings.
8345         Reported by Paul Eggert.
8346
8347 2006-01-25  Bruno Haible  <bruno@clisp.org>
8348
8349         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8350         rid of a trap command. For Solaris sh.
8351         Reported by Mark D. Baushke <mdb@gnu.org>.
8352
8353 2006-01-24  Simon Josefsson  <jas@extundo.com>
8354
8355         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8356         Bruno.
8357
8358 2006-01-24  Karl Berry  <karl@gnu.org>
8359
8360         * config/srclist.txt (argp-namefrob.h): sync lost.
8361
8362 2006-01-24  Jim Meyering  <jim@meyering.net>
8363
8364         * modules/openat (Files): Add lib/intprops.h.
8365         From Mark D. Baushke.
8366
8367 2006-01-24  Jim Meyering  <jim@meyering.net>
8368
8369         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8370         Reported by Mark D. Baushke.
8371
8372 2006-01-24  Jim Meyering  <jim@meyering.net>
8373
8374         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8375
8376 2006-01-24  Bruno Haible  <bruno@clisp.org>
8377
8378         * modules/strnlen (Maintainer): Change from glibc to all.
8379
8380 2006-01-24  Bruno Haible  <bruno@clisp.org>
8381
8382         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8383         Patch by Paul Eggert.
8384
8385 2006-01-24  Bruno Haible  <bruno@clisp.org>
8386
8387         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8388         already has it.
8389         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8390         2005-11-26.
8391
8392         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8393         'signed char' to avoid problems with the built-in _Bool type.
8394         Reported by Paul Eggert on 2005-11-26.
8395
8396 2006-01-24  Bruno Haible  <bruno@clisp.org>
8397
8398         * gnulib-tool (func_import): Avoid constructing complicated sed
8399         expressions inside backquote.
8400         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8401
8402 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8403
8404         These changes imported from libc.
8405         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8406         test and two separate function calls.
8407         * lib/strndup.c (__strndup): Add libc_hidden_def.
8408
8409 2006-01-23  Simon Josefsson  <jas@extundo.com>
8410
8411         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8412         Remove the test_*_SOURCES variable: automake infers it by default.
8413         * modules/tls-tests: Likewise.
8414
8415 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8416
8417         Work around porting bugs reported by Dieter in
8418         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8419         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8420         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8421         Include "getopt.h" first, to check interface.
8422         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8423         !HAVE_DECL_GETENV.
8424         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8425         (__strndup): Revert to K&R-style function dfns, the glibc style.
8426         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8427         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8428         Include strnlen.h first, to get prototype properly.
8429         (strnlen): Renamed from __strnlen.
8430         Remove weak alias.
8431
8432 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8433
8434         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8435
8436 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8437
8438         * config/srclist.txt: Adjust to reflect glibc reorganization.
8439         This affects only comments.
8440
8441 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8442
8443          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8444          Reported by Bruce Korb <bkorb@gnu.org>.
8445
8446 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8447
8448         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8449         to pacify gcc -Wswitch-default.
8450
8451 2006-01-22  Bruno Haible  <bruno@clisp.org>
8452
8453         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8454         temporary buffer for sprintf, take into account the precision also
8455         for 'd', 'i', 'u', 'o', 'x', 'X'.
8456
8457 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8458
8459         * modules/argp-tests: New module
8460         * tests/test-argp.c: New file
8461         * tests/test-argp-2.sh: New file
8462
8463 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8464
8465         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8466         (__argp_base_name): Removed
8467         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8468         typo.
8469         (__argp_base_name): Provide macro definition or extern declaration
8470         depending on the configuration
8471
8472 2006-01-20  Simon Josefsson  <jas@extundo.com>
8473
8474         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8475
8476 2006-01-20  Simon Josefsson  <jas@extundo.com>
8477
8478         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8479
8480 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8481
8482         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8483         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8484         Suggested by Bruno Haible.
8485
8486 2006-01-20  Karl Berry  <karl@gnu.org>
8487
8488         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8489         until changes propagate, I guess.
8490
8491 2006-01-19  Simon Josefsson  <jas@extundo.com>
8492
8493         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8494
8495 2006-01-19  Simon Josefsson  <jas@extundo.com>
8496
8497         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8498
8499 2006-01-19  Simon Josefsson  <jas@extundo.com>
8500
8501         * gnulib-tool: Set check_PROGRAMS.
8502
8503         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8504         modules/des-tests, modules/gc-arcfour-tests,
8505         modules/gc-arctwo-tests, modules/gc-des-tests,
8506         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8507         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8508         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8509         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8510         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8511         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
8512         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
8513         test_*_SOURCES.
8514
8515 2006-01-18  Simon Josefsson  <jas@extundo.com>
8516
8517         * modules/socklen (Depends-on): Depend on sys_socket.
8518
8519 2006-01-18  Simon Josefsson  <jas@extundo.com>
8520
8521         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8522         modules/des-tests, modules/gc-arcfour-tests,
8523         modules/gc-arctwo-tests, modules/gc-des-tests,
8524         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8525         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8526         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8527         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8528         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8529         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
8530         $(EXEEXT) to automake TESTS variable, for mingw32.
8531
8532 2006-01-17  Simon Josefsson  <jas@extundo.com>
8533
8534         * modules/socklen (Include): Need sys/socket.h.
8535
8536 2006-01-17  Bruno Haible  <bruno@clisp.org>
8537
8538         * modules/ssize_t (Include): Add <sys/types.h>.
8539
8540 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
8541
8542         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
8543         it's not portable and it doesn't work with cross-compiles.
8544         Problem reported by Bruno Haible.  Fix missing-$ typo in
8545         'test "gl_cv_ignore_unused_libraries" ...' that prevented
8546         -zignore from being used with Sun's C compiler.
8547
8548 2006-01-12  Simon Josefsson  <jas@extundo.com>
8549
8550         * lib/base64.c: Fix warning, reported by Bruno Haible
8551         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
8552
8553 2006-01-12  Bruno Haible  <bruno@clisp.org>
8554
8555         * modules/ldd: New file.
8556         * build-aux/ldd.sh.in: New file.
8557         * MODULES.html.sh (Support for building libraries and executables): Add
8558         ldd.
8559
8560 2006-01-12  Bruno Haible  <bruno@clisp.org>
8561
8562         * m4/ldd.m4: New file.
8563
8564 2006-01-12  Bruno Haible  <bruno@clisp.org>
8565
8566         * gnulib-tool (func_import, func_create_testdir): Don't go into an
8567         endless loop while replacing $auxdir with build-aux.
8568
8569 2006-01-11  Simon Josefsson  <jas@extundo.com>
8570
8571         * lib/stdint_.h (SIZE_MAX): Add missing (.
8572
8573 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
8574
8575         Sync from coreutils.
8576         * lib/md5.c: Fix commentary typos.
8577         (alignof, UNALIGNED_P): No need for a GCC-specific version.
8578         * lib/md5.h (__attribute__): Remove; unused.
8579         * lib/sha1.c: Fix commentary to match md5 better.
8580         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
8581         so that we don't need to worry about alignment.  All uses changed.
8582         This merges the 2005-10-28 md5 change into sha1.
8583
8584 2006-01-11  Jim Meyering  <jim@meyering.net>
8585
8586         Sync from coreutils.
8587         * lib/md5.c (OP): Fix spacing.
8588
8589 2006-01-11  Bruno Haible  <bruno@clisp.org>
8590
8591         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8592         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
8593         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
8594
8595 2006-01-11  Bruno Haible  <bruno@clisp.org>
8596
8597         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8598         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
8599         the "early" section as well.
8600
8601 2006-01-11  Bruno Haible  <bruno@clisp.org>
8602
8603         Avoid "ar: no archive members specified" error on MacOS X.
8604         * gnulib-tool (func_modules_add_dummy): New function.
8605         (func_import, func_create_testdir): Invoke it.
8606
8607 2006-01-11  Bruno Haible  <bruno@clisp.org>
8608
8609         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
8610         with $auxdir in AC_CONFIG_FILES statements.
8611
8612 2006-01-11  Bruno Haible  <bruno@clisp.org>
8613
8614         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8615         Initialize also noinst_HEADERS to empty.
8616
8617 2006-01-11  Bruno Haible  <bruno@clisp.org>
8618
8619         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
8620         variables.
8621         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
8622         autoreconf.
8623
8624 2006-01-11  Bruno Haible  <bruno@clisp.org>
8625
8626         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
8627         overridable by the user.
8628         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8629
8630 2006-01-10  Simon Josefsson  <jas@extundo.com>
8631
8632         * modules/sys_socket: New file.
8633
8634 2006-01-10  Simon Josefsson  <jas@extundo.com>
8635
8636         * m4/sys_socket_h.m4: New file.
8637
8638 2006-01-10  Simon Josefsson  <jas@extundo.com>
8639
8640         * lib/socket_.h: New file.
8641
8642 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8643
8644         * modules/readutmp (Maintainer): Add myself.
8645
8646 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8647
8648         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
8649         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
8650         People who are still concerned with buggy memcmp implementations
8651         can invoke gl_FUNC_MEMCMP themselves.
8652
8653 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8654
8655         * lib/regex_internal.h (BITSET_WORD_BITS):
8656         Work around a bug in 64-bit PGC (before version 6.1-2), where the
8657         preprocessor mishandles large unsigned values as if they were signed.
8658         Problem reported by Claudio Fontana in
8659         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
8660
8661 2006-01-10  Jim Meyering  <jim@meyering.net>
8662
8663         Avoid the double-free (first in fts_read, second in fts_close) that
8664         would occur when an `active' directory is made inaccessible (e.g.,
8665         via chmod a-x) during a traversal.
8666         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8667         before returning.  Reproduce this failure by
8668         mkdir -p a/b; cd a; chmod a-x . b
8669         Reported by Stavros Passas.
8670
8671         Sync from coreutils.
8672         * lib/sha1.c: Tweak grammar in a comment.
8673
8674 2006-01-10  Jim Meyering  <jim@meyering.net>
8675
8676         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
8677         Patch by Joerg Sonnenberger.
8678
8679 2006-01-10  Bruno Haible  <bruno@clisp.org>
8680
8681         * modules/readutmp: Depend on module free.
8682         * modules/strtok_r: Depend on module restrict.
8683
8684 2006-01-10  Bruno Haible  <bruno@clisp.org>
8685
8686         * modules/gettext (configure.ac): Add an invocation of
8687         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
8688
8689 2006-01-10  Bruno Haible  <bruno@clisp.org>
8690
8691         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
8692         Reported by Werner Lemberg <wl@gnu.org>.
8693
8694 2006-01-10  Bruno Haible  <bruno@clisp.org>
8695
8696         * lib/localcharset.c: Update from GNU gettext.
8697
8698 2006-01-10  Bruno Haible  <bruno@clisp.org>
8699
8700         * lib/argp.h (__const): Remove macro. Use const instead.
8701         * lib/argp-fmtstream.h (__const): Likewise.
8702         * lib/glob_.h (__const): Remove macro.
8703         * lib/glob-libc.h: Use const instead of __const.
8704
8705 2006-01-10  Bruno Haible  <bruno@clisp.org>
8706
8707         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
8708         variable.
8709         Needed to avoid an automake error regarding the 'gettext' module.
8710
8711 2006-01-09  Simon Josefsson  <jas@extundo.com>
8712
8713         * modules/inet_ntop (Depends-on): Add restrict.
8714
8715 2006-01-09  Simon Josefsson  <jas@extundo.com>
8716
8717         * modules/gc-rijndael-tests (License): Put under LGPL.
8718
8719         * modules/gc-des-tests (License): Likewise.
8720
8721         * modules/gc-arcfour-tests (License): Likewise.
8722
8723         * modules/gc-arctwo-tests (License): Likewise.
8724
8725         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
8726
8727         * modules/gc-hmac-sha1-tests (Files): Likewise.
8728
8729         * modules/gc-hmac-md5-tests (License): Likewise.
8730
8731         * modules/gc-sha1-tests (License): Likewise.
8732
8733         * modules/gc-md5-tests (License): Likewise.
8734
8735         * modules/gc-md4-tests (License): Likewise.
8736
8737         * modules/gc-md2-tests (License): Likewise.
8738
8739         * modules/gc-tests (License): Likewise.
8740
8741         * modules/des-tests (License): Likewise.
8742
8743         * modules/md4-tests (License): Likewise.
8744
8745         * modules/md2-tests (License): Likewise.
8746
8747 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8748
8749         Sync from coreutils:
8750
8751         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
8752         * modules/lib-ignore: New file.
8753         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
8754         chdir-safer.m4, lchmod.m4.
8755         * modules/openat: Add mkdirat.c, openat-priv.h.
8756
8757 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8758
8759         Sync from coreutils.
8760         * m4/lib-ignore.m4: New file.
8761         * m4/lchmod.m4: New file.
8762
8763 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8764
8765         Sync from coreutils.
8766         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
8767         for write access: POSIX says that must fail.
8768         * lib/fts.c (diropen): Likewise.
8769         * lib/save-cwd.c (save_cwd): Likewise.
8770         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
8771         well, for minor improvements on hosts that lack O_DIRECTORY.
8772         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
8773         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
8774         Fall back on chown if open failed with EACCES.
8775
8776         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
8777         Report an error at compile-time if only a 1-second nominal clock
8778         resolution is found.
8779
8780         * lib/lchmod.h: New file.
8781         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
8782         (make_dir_parents): Use lchown rather than chown, and
8783         lchmod rather than chmod.
8784
8785         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
8786         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
8787         "proc" reported by n0dalus.
8788
8789         * lib/mountlist.c: Include <limits.h>.
8790         (dev_from_mount_options)
8791         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
8792         New function.  It no longer assumes "dev=" has the System V meaning
8793         on Linux (since it doesn't).  It also parses "dev=" more carefully.
8794         (read_file_system_list)
8795         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
8796         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
8797         dev= in that case.
8798
8799         * lib/posixtm.h (PDS_PRE_2000): New macro.
8800         * lib/posixtm.c (year): Arg is now syntax_bits rather than
8801         allow_century.  All usages changed.  Reject dates outside the range
8802         1969-1999 if PDS_PRE_2000 is used.
8803
8804 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8805
8806         Sync from coreutils.
8807         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
8808         (Time of day items): Mention the possibility of leap seconds.
8809         Problem reported by Dr. David Alan Gilbert.
8810
8811 2006-01-09  Jim Meyering  <jim@meyering.net>
8812
8813         Sync from coreutils.
8814
8815         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
8816
8817         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
8818
8819         * lib/modechange.c (mode_compile): Reject an invalid mode string
8820         that starts with an octal digit.  From Andreas Gruenbacher.
8821
8822         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
8823         and dup to open_safer and dup_safer, respectively.
8824         (openat_permissive): Fix typo in comment.
8825
8826         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
8827         "gettext.h"; either no longer needed or are guaranteed by openat.h.
8828         (_): Remove; no longer needed.
8829         (openat): Renamed from rpl_openat; no need for rpl_openat
8830         since openat.h renames openat for us.
8831         Replace most of the body with a call to openat_permissive,
8832         to avoid duplicate code.
8833         Port to (probably hypothetical) environments were mode_t is
8834         wider than int.
8835         (openat_permissive): Require mode arg, so that we can check
8836         types better.  Put it just after flags.  Change cwd failure
8837         indicator from pointer-to-bool to pointer-to-errno-value.
8838         All callers changed.
8839         Invoke openat_save_fail and/or openat_restore_fail if
8840         cwd_errno is null, so that openat can call us.
8841         (openat_permissive, fdopendir, fstatat, unlinkat):
8842         Simplify errno handling to avoid some duplicate code,
8843         as it's OK to set errno on success.
8844         * lib/openat.h: Revamp code so that function macros depend on
8845         __OPENAT_PREFIX only, not also on AT_FDCWD.
8846         (openat_ro): Remove.  Caller changed to use openat_permissive.
8847         (openat_permissive): Now a macro, if not a function.
8848         (openat_restore_fail, openat_save_fail): Now always functions,
8849         since mkdirat needs them even if __OPENAT_PREFIX is defined.
8850
8851         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
8852         and openat.c.
8853         * lib/mkdirat.c: Include openat-priv.h.
8854         Remove definitions of macros defined therein.
8855         * lib/openat.c: Likewise.
8856
8857         * lib/mkdirat.c (mkdirat): New file and function.
8858         * lib/openat.h (mkdirat): Declare.
8859
8860         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
8861
8862         * lib/openat.h (openat_permissive): Declare.
8863         (openat_ro): Define.
8864
8865         * lib/openat.c (EXPECTED_ERRNO): New macro.
8866         (openat_permissive): New function -- used in remove.c rewrite.
8867         (all functions): Set errno just before returning, only if there
8868         was an actual failure.
8869         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
8870
8871         Emulate openat-family functions using Linux's procfs, if possible.
8872         Idea and some code based on Ulrich Drepper's glibc changes.
8873
8874         * lib/openat.c: (BUILD_PROC_NAME): New macro.
8875         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
8876         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
8877         before falling back on save_cwd and restore_cwd.
8878         (fdopendir, fstatat, unlinkat): Likewise.
8879
8880         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
8881         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
8882
8883         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
8884         as second argument to va_arg.  Otherwise, some versions of gcc
8885         warn that `if this code is reached, the program will abort'.
8886
8887 2006-01-09  Jim Meyering  <jim@meyering.net>
8888
8889         Sync from coreutils.
8890         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
8891         Require openat-priv.h.
8892
8893 2006-01-09  Bruno Haible  <bruno@clisp.org>
8894
8895         * modules/strnlen (Include): Use strnlen.h.
8896
8897 2006-01-09  Bruno Haible  <bruno@clisp.org>
8898
8899         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
8900
8901 2006-01-09  Bruno Haible  <bruno@clisp.org>
8902
8903         * lib/sysexit_.h (EX_OK): New macro.
8904         Suggested by Martin Lambers <marlam@marlam.de>.
8905
8906 2006-01-09  Bruno Haible  <bruno@clisp.org>
8907
8908         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
8909         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
8910
8911 2006-01-09  Bruno Haible  <bruno@clisp.org>
8912
8913         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
8914         numbers.
8915
8916 2006-01-09  Bruno Haible  <bruno@clisp.org>
8917
8918         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
8919         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
8920         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
8921         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
8922
8923 2006-01-09  Bruno Haible  <bruno@clisp.org>
8924
8925         * build-aux/javacomp.sh.in: New file, moved from lib/.
8926         * modules/javacomp-script (Files): Update.
8927         (configure.ac): Add AC_CONFIG_FILES invocation.
8928         (EXTRA_DIST): Remove variable.
8929
8930         * build-aux/javaexec.sh.in: New file, moved from lib/.
8931         * modules/javaexec (Files): Update.
8932         (configure.ac): Add AC_CONFIG_FILES invocation.
8933         (EXTRA_DIST): Remove javaexec.sh.in.
8934
8935         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
8936         * modules/csharpcomp-script (Files): Update.
8937         (configure.ac): Add AC_CONFIG_FILES invocation.
8938         (EXTRA_DIST): Remove variable.
8939
8940         * build-aux/csharpexec.sh.in: New file, moved from lib/.
8941         * modules/csharpexec (Files): Update.
8942         (configure.ac): Add AC_CONFIG_FILES invocation.
8943         (EXTRA_DIST): Remove csharpexec.sh.in.
8944
8945 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8946
8947         Sync from coreutils.
8948
8949         Add POSIX ACL support
8950         * lib/acl.h (copy_acl, set_acl): Add declarations.
8951         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
8952         systems other than Linux.
8953         (chmod_or_fchmod): New function: use fchmod when possible,
8954         and chmod otherwise.
8955         (file_has_acl): Add a POSIX ACL implementation, with a
8956         Linux-specific subcase.
8957         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
8958         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
8959         acls are unsupported.
8960         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
8961         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
8962         are unsupported.
8963
8964 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
8965
8966         Sync from coreutils.
8967         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
8968
8969 2006-01-07  Bruno Haible  <bruno@clisp.org>
8970
8971         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
8972         gl_EARLY.
8973
8974 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8975
8976         * lib/strftime.c (tzname): Don't declare if it is already #defined.
8977         Problem reported for Mingw by Mark Junker.
8978
8979 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8980
8981         * README: Gnulib normally doesn't generate a tarball.
8982
8983 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
8984
8985         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
8986         long int, not int, for nanosecond counts, so that people who are
8987         used to POSIX struct timespec won't be surprised.  Reported by Jim
8988         Meyering.
8989
8990 2005-12-28  Bruno Haible  <bruno@clisp.org>
8991
8992         * build-aux/config.rpath: Update from GNU gettext.
8993
8994 2005-12-16  Jim Meyering  <jim@meyering.net>
8995
8996         * modules/fprintftime: New module.
8997         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
8998
8999 2005-12-16  Jim Meyering  <jim@meyering.net>
9000
9001         * m4/fprintftime.m4: New file.
9002
9003 2005-12-16  Jim Meyering  <jim@meyering.net>
9004
9005         * lib/fprintftime.c, lib/fprintftime.h: New files.
9006
9007 2005-12-15  Simon Josefsson  <jas@extundo.com>
9008
9009         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9010         new m4/socklen.m4.
9011
9012 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9013
9014         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9015         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9016
9017 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9018
9019         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9020         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9021         struct uparams is valid. Fall back to the default values if it is
9022         not.
9023
9024 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9025
9026         * modules/argp (Files): Add argp-pin.c
9027         (Depends-on): dirname
9028         (lib_SOURCES): Add argp-pin.c
9029
9030 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9031
9032         * m4/argp.m4:  Check if program_invocation_name and
9033         program_invocation_short_name are declared and define appropriate
9034         macros if they are not.
9035
9036 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9037
9038         * lib/argp-help.c (__argp_base_name): New function
9039         (__argp_short_program_name): Rewrite using __argp_base_name
9040         * lib/argp-namefrob.h: Define program_invocation_name and
9041         program_invocation_short_name if requested
9042         (__argp_base_name): Add prototype
9043         * lib/argp-parse.c (argp_def): Use gettext wrappers
9044         (argp_default_parser): Use __argp_base_name
9045         * lib/argp-pin.c: New file. Defines program_invocation_name and
9046         program_invocation_short_name on systems that lack them.
9047
9048 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9049
9050         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9051         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9052         porting problem reported by Georg Schwarz in
9053         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9054
9055 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9056
9057         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9058         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9059         porting problem reported by Georg Schwarz in
9060         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9061
9062 2005-12-05  Bruno Haible  <bruno@clisp.org>
9063
9064         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9065         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9066         Reported by Mark Junker <mjscod@gmx.de>.
9067
9068 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9069
9070         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9071         Use implementation from Albert Chin, with some
9072         comments/corrections by Stepan Kasal and myself.
9073
9074 2005-12-02  Bruno Haible  <bruno@clisp.org>
9075
9076         * gnulib-tool (func_import): Accept GPLed build tool modules when
9077         --lgpl is given.
9078         * modules/csharpcomp-script: New file.
9079         * modules/csharpcomp: Depend on it.
9080         * modules/javacomp-script: New file.
9081         * modules/javacomp: Depend on it.
9082         Suggested by Simon Josefsson.
9083
9084 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9085
9086         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9087         statement, to work around an HP-UX 10.20 compiler bug reported by
9088         Peter O'Gorman.
9089
9090 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9091
9092         * modules/savedir (Depends-on): Add openat.
9093
9094 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9095
9096         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9097         (uintmax_t) [defined uintmax_t]: Do not declare.
9098         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9099         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9100         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9101         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9102         sake of portability to weird hosts that C allows (though we don't
9103         know of any practical examples).
9104
9105         * lib/savedir.h (fdsavedir): New decl.
9106         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9107         contains most of the former guts of savedir.
9108         (savedir): Use savedirstream.
9109         Include "openat.h".
9110
9111 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9112
9113         * modules/obstack (Files): Add m4/ulonglong.m4.
9114         Problem reported by Davide Angelocola.
9115
9116 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9117
9118         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9119         coreutils no longer futzes with rounding modes.
9120
9121 2005-11-14  Jim Meyering  <jim@meyering.net>
9122
9123         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9124         replacement of mkstemp.
9125
9126 2005-11-10  Simon Josefsson  <jas@extundo.com>
9127
9128         * lib/readline.c: Remove EOL.
9129
9130 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9131
9132         * modules/gethrxtime (Depends-on): Add gettime.
9133
9134 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9135
9136         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9137         or gettimeofday; no longer needed.
9138
9139 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9140
9141         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9142         time business.
9143         (gethrxtime) [! (HAVE_NANOUPTIME
9144         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9145         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9146         our own approximation.
9147
9148 2005-11-08  Eric Blake  <ebb9@byu.net>
9149
9150         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9151
9152 2005-11-08  Eric Blake  <ebb9@byu.net>
9153
9154         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9155
9156 2005-11-04  Bruno Haible  <bruno@clisp.org>
9157
9158         * gnulib-tool: Implement --update mode.
9159
9160 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9161
9162         Fix porting problem reported by Theodoros V. Kalamatianos.
9163         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9164         Don't assume that futimes failing means we must fail.
9165
9166 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9167
9168         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9169         variables to suggest the intended function of the PATH_MAX check.
9170
9171 2005-10-30  Kean Johnston  <jkj@sco.com>
9172
9173         Trivial changes to support SCO systems.
9174         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9175         as PATH_MAX.
9176         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9177         where __ptr is null when no I/O is pending.
9178
9179 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9180
9181         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9182         leave errno alone.  Problem reported by Dmitry V. Levin.
9183
9184 2005-10-28  Simon Josefsson  <jas@extundo.com>
9185
9186         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9187         Test more.
9188
9189         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9190
9191         * modules/md2, modules/md2-tests: New files.
9192
9193 2005-10-28  Simon Josefsson  <jas@extundo.com>
9194
9195         * m4/inet_ntop.m4: More tests.
9196
9197         * m4/gc-md2.m4, md2.m4: New file.
9198
9199 2005-10-28  Simon Josefsson  <jas@extundo.com>
9200
9201         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9202         "restrict" keywords, as per POSIX.  Protect the function
9203         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9204         Don't use K&R prototypes.  Check the sprintf return values.
9205         Re-define EAFNOSUPPORT if not present.  Indent.
9206
9207         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9208         suggested by Bruno Haible <bruno@clisp.org>.
9209
9210         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9211
9212         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9213
9214         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9215         libgcrypt).
9216
9217         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9218
9219         * lib/md2.h, lib/md2.c: New files.
9220
9221 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9222
9223         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9224         errno alone.  Problem reported by Frederic Jolliton.
9225
9226 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9227
9228         * modules/verify (License): Change from GPL to LGPL.  This is a
9229         tiny module and there are apparently near-equivalents that are
9230         under the BSD license.
9231
9232 2005-10-24  Simon Josefsson  <jas@extundo.com>
9233
9234         * modules/sha1: Relicense to LGPL.
9235
9236 2005-10-24  Simon Josefsson  <jas@extundo.com>
9237
9238         * lib/md4.h: Shrink buffer size, now that we changed the type.
9239
9240 2005-10-23  Simon Josefsson  <jas@extundo.com>
9241
9242         * gnulib-tool (func_import): Fix --tests-base.
9243
9244 2005-10-22  Simon Josefsson  <jas@extundo.com>
9245
9246         * modules/arcfour (Depends-on): Need stdint.
9247
9248 2005-10-22  Simon Josefsson  <jas@extundo.com>
9249
9250         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9251         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9252
9253 2005-10-22  Simon Josefsson  <jas@extundo.com>
9254
9255         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9256         suggested by Bruno Haible <bruno@clisp.org>.
9257
9258 2005-10-22  Simon Josefsson  <jas@extundo.com>
9259
9260         * lib/crc.h: Include stddef.h, for size_t.
9261
9262 2005-10-22  Simon Josefsson  <jas@extundo.com>
9263
9264         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9265         arcfour_context struct (simplify test vector testing in GNU
9266         Shishi).
9267
9268 2005-10-21  Simon Josefsson  <jas@extundo.com>
9269
9270         * modules/des, modules/des-tests: New files.
9271
9272         * modules/gc-des, modules/gc-des-tests: New files.
9273
9274         * tests/test-des.c, tests/test-gc-des.c: New file.
9275
9276 2005-10-21  Simon Josefsson  <jas@extundo.com>
9277
9278         * modules/arctwo, modules/arctwo-tests: New files.
9279
9280         * tests/test-arctwo.c: New file.
9281
9282         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9283
9284         * tests/test-gc-arctwo.c: New file.
9285
9286 2005-10-21  Simon Josefsson  <jas@extundo.com>
9287
9288         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9289         Bruno Haible <bruno@clisp.org>.
9290
9291         * m4/gc-des.m4: New file.
9292
9293 2005-10-21  Simon Josefsson  <jas@extundo.com>
9294
9295         * m4/arctwo.m4: New file.
9296
9297         * m4/gc-arctwo.m4: New file.
9298
9299 2005-10-21  Simon Josefsson  <jas@extundo.com>
9300
9301         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9302         block.
9303
9304 2005-10-21  Simon Josefsson  <jas@extundo.com>
9305
9306         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9307         <bruno@clisp.org>.
9308
9309         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9310
9311         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9312         Bruno Haible <bruno@clisp.org>.
9313
9314         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9315         <bruno@clisp.org>.
9316
9317 2005-10-21  Simon Josefsson  <jas@extundo.com>
9318
9319         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9320
9321 2005-10-21  Simon Josefsson  <jas@extundo.com>
9322
9323         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9324
9325 2005-10-21  Simon Josefsson  <jas@extundo.com>
9326
9327         * lib/des.h, lib/des.c: New files.
9328
9329         * lib/gc-gnulib.c: Support DES.c
9330
9331 2005-10-21  Simon Josefsson  <jas@extundo.com>
9332
9333         * lib/arctwo.h, lib/arctwo.c: New files.
9334
9335         * lib/gc-gnulib.c: Support ARCTWO.
9336
9337 2005-10-21  Simon Josefsson  <jas@extundo.com>
9338
9339         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9340         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9341
9342 2005-10-21  Simon Josefsson  <jas@extundo.com>
9343
9344         * gnulib-tool (func_import, func_create_testdir): Define automake
9345         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9346         Makefile.am snippet),
9347         suggested by Bruno Haible <bruno@clisp.org>.
9348
9349         * modules/gc (Makefile.am): Use it.
9350
9351 2005-10-21  Bruno Haible  <bruno@clisp.org>
9352
9353         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9354         patch.
9355
9356 2005-10-19  Simon Josefsson  <jas@extundo.com>
9357
9358         * tests/test-gc-rijndael.c: New file.
9359
9360         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9361
9362 2005-10-19  Simon Josefsson  <jas@extundo.com>
9363
9364         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9365         interface too.
9366
9367 2005-10-19  Simon Josefsson  <jas@extundo.com>
9368
9369         * tests/test-gc-arcfour.c: New file.
9370
9371         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9372
9373 2005-10-19  Simon Josefsson  <jas@extundo.com>
9374
9375         * modules/gc-md4, modules/gc-md4-tests: New file.
9376
9377         * tests/test-gc-md4.c: New file.
9378
9379 2005-10-19  Simon Josefsson  <jas@extundo.com>
9380
9381         * m4/gc-md4.m4: New file.
9382
9383 2005-10-19  Simon Josefsson  <jas@extundo.com>
9384
9385         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9386         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9387         <kasal@ucw.cz>.
9388
9389 2005-10-19  Simon Josefsson  <jas@extundo.com>
9390
9391         * m4/gc-arcfour.m4: New file.
9392
9393         * m4/gc-rijndael.m4: New file.
9394
9395 2005-10-19  Simon Josefsson  <jas@extundo.com>
9396
9397         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9398
9399 2005-10-19  Simon Josefsson  <jas@extundo.com>
9400
9401         * lib/gc-gnulib.c: Support ARCFOUR.
9402
9403 2005-10-19  Simon Josefsson  <jas@extundo.com>
9404
9405         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9406         support.
9407
9408         * lib/gc.h: Add ECB enum type.
9409
9410         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9411
9412 2005-10-18  Simon Josefsson  <jas@extundo.com>
9413
9414         * tests/test-md5.c: New file.
9415
9416         * modules/md5-tests: New file.
9417
9418 2005-10-18  Simon Josefsson  <jas@extundo.com>
9419
9420         * tests/test-md4.c: New file.
9421
9422         * modules/md4, modules/md4-tests: New files.
9423
9424 2005-10-18  Simon Josefsson  <jas@extundo.com>
9425
9426         * m4/md4.m4: New file.
9427
9428 2005-10-18  Simon Josefsson  <jas@extundo.com>
9429
9430         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9431
9432 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9433
9434         * gnulib-tool (func_create_testdir): Omit the second check whether
9435         BUILT_SOURCES in nonempty.
9436
9437 2005-10-17  Simon Josefsson  <jas@extundo.com>
9438
9439         * tests/test-rijndael.c: New file.
9440
9441 2005-10-17  Simon Josefsson  <jas@extundo.com>
9442
9443         * modules/sha1: Depend on stdint instead of md5.
9444
9445         * modules/md5: Depend on stdint, remove uint32_t.
9446
9447 2005-10-17  Simon Josefsson  <jas@extundo.com>
9448
9449         * modules/gc-sha1-tests: New file.
9450
9451         * tests/test-gc-sha1.c: New file.
9452
9453 2005-10-17  Simon Josefsson  <jas@extundo.com>
9454
9455         * m4/md5.m4: Remove call to uint32_t.m4.
9456
9457 2005-10-17  Simon Josefsson  <jas@extundo.com>
9458
9459         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9460
9461         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9462         md5.h.
9463
9464         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9465
9466         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9467
9468 2005-10-17  Simon Josefsson  <jas@extundo.com>
9469
9470         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9471
9472 2005-10-17  Simon Josefsson  <jas@extundo.com>
9473
9474         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9475
9476 2005-10-17  Simon Josefsson  <jas@extundo.com>
9477
9478         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9479
9480         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9481
9482 2005-10-17  Bruno Haible  <bruno@clisp.org>
9483
9484         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9485         that it can also be used in a test.
9486
9487 2005-10-16  Bruno Haible  <bruno@clisp.org>
9488
9489         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9490         TESTS_ENVIRONMENT, so that individual tests can augment it.
9491
9492         * gnulib-tool (func_create_testdir): Use an intermediate target for
9493         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9494         macros, like $(ALLOCA_H), which cannot be passed through the command
9495         line.
9496
9497 2005-10-15  Simon Josefsson  <jas@extundo.com>
9498
9499         * modules/rijndael-tests: New file.
9500
9501         * modules/rijndael: New file.
9502
9503 2005-10-15  Simon Josefsson  <jas@extundo.com>
9504
9505         * m4/rijndael.m4: New file.
9506
9507 2005-10-15  Simon Josefsson  <jas@extundo.com>
9508
9509         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
9510
9511         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
9512
9513 2005-10-14  Simon Josefsson  <jas@extundo.com>
9514
9515         * tests/test-arcfour.c: New file.
9516
9517         * modules/arcfour, modules/arcfour-tests: New files.
9518
9519 2005-10-14  Simon Josefsson  <jas@extundo.com>
9520
9521         * m4/arcfour.m4: New file.
9522
9523 2005-10-14  Simon Josefsson  <jas@extundo.com>
9524
9525         * lib/arcfour.h, lib/arcfour.c: New files.
9526
9527 2005-10-14  Roland McGrath  <roland@redhat.com>
9528
9529         Import from libc.  [BZ #1331]
9530         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
9531         macro argument.
9532         Reported by Matej Vela <vela@debian.org>.
9533
9534 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9535
9536         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
9537         include <wchar.h>; no longer needed.
9538
9539 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9540
9541         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
9542
9543 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
9544         and  Ulrich Drepper  <drepper@redhat.com>
9545
9546         Import from libc.
9547         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
9548         instead of inline stream orientation test and two separate
9549         function calls.  Pay no attention to USE_IN_LIBIO.
9550
9551 2005-10-13  Simon Josefsson  <jas@extundo.com>
9552
9553         * modules/gc-hmac-md5-tests: New file.
9554
9555         * tests/test-gc-hmac-sha1.c: New file.
9556
9557         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
9558
9559         * modules/gc-hmac-md5-tests: New file.
9560
9561         * tests/test-gc-md5.c: New file.
9562
9563         * modules/gc-md5-tests: New file.
9564
9565 2005-10-13  Simon Josefsson  <jas@extundo.com>
9566
9567         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
9568         Move memory allocation outside of loop.
9569
9570 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
9571
9572         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
9573         intermediate directory is in a read-only file system.  Problem
9574         reported by Eric Blake.
9575
9576 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
9577
9578         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
9579
9580 2005-10-12  Simon Josefsson  <jas@extundo.com>
9581
9582         * tests/test-hmac-sha1.c: New file.
9583
9584         * modules/hmac-sha1-tests: New file.
9585
9586         * modules/hmac-sha1: New file.
9587
9588 2005-10-12  Simon Josefsson  <jas@extundo.com>
9589
9590         * modules/gc-sha1: New file.
9591
9592 2005-10-12  Simon Josefsson  <jas@extundo.com>
9593
9594         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
9595
9596         * tests/test-gc-pbkdf2-sha1.c: New file.
9597
9598 2005-10-12  Simon Josefsson  <jas@extundo.com>
9599
9600         * modules/gc-md5, modules/gc-hmac-md5: New files.
9601
9602         * modules/gc (Files): Remove md5, memxor and hmac files.
9603
9604 2005-10-12  Simon Josefsson  <jas@extundo.com>
9605
9606         * m4/gc-pbkdf2-sha1.m4: New file.
9607
9608         * m4/gc-hmac-sha1.m4: New file.
9609
9610         * m4/gc-sha1: New file.
9611
9612         * m4/hmac-sha1.m4: New file.
9613
9614 2005-10-12  Simon Josefsson  <jas@extundo.com>
9615
9616         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
9617
9618         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
9619
9620 2005-10-12  Simon Josefsson  <jas@extundo.com>
9621
9622         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
9623         suggested by Bruno Haible <bruno@clisp.org>.
9624
9625 2005-10-12  Simon Josefsson  <jas@extundo.com>
9626
9627         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
9628
9629 2005-10-12  Simon Josefsson  <jas@extundo.com>
9630
9631         * lib/gc-pbkdf2-sha1.c: New file.
9632
9633         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
9634
9635 2005-10-12  Simon Josefsson  <jas@extundo.com>
9636
9637         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
9638
9639         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
9640
9641 2005-10-12  Simon Josefsson  <jas@extundo.com>
9642
9643         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
9644         GC_USE_HMAC_MD5, respectively.
9645
9646         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
9647         (gc_md5): Fix typo.
9648
9649         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
9650
9651         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
9652
9653         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
9654
9655 2005-10-12  Bruno Haible  <bruno@clisp.org>
9656
9657         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
9658         Reported by Stepan Kasal <kasal@ucw.cz>.
9659
9660 2005-10-11  Simon Josefsson  <jas@extundo.com>
9661
9662         * tests/test-crc.c: New file.
9663
9664         * modules/crc, modules/crc-tests: New files.
9665
9666 2005-10-11  Simon Josefsson  <jas@extundo.com>
9667
9668         * m4/crc.m4: New file.
9669
9670 2005-10-11  Simon Josefsson  <jas@extundo.com>
9671
9672         * lib/gc.h: Add gc_hash and gc_hash_buffer.
9673
9674         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
9675
9676         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
9677
9678 2005-10-11  Simon Josefsson  <jas@extundo.com>
9679
9680         * lib/crc.h, lib/crc.c: New files.
9681
9682         * lib/gc.h (gc_hash_buffer): Add doc.
9683
9684 2005-10-11  Bruno Haible  <bruno@clisp.org>
9685
9686         * modules/c-strcasestr: New file.
9687         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
9688
9689 2005-10-11  Bruno Haible  <bruno@clisp.org>
9690
9691         * modules/c-strcase: New file.
9692         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
9693
9694 2005-10-11  Bruno Haible  <bruno@clisp.org>
9695
9696         * lib/strcasecmp.c: Include limits.h.
9697         (strcasecmp): Avoid integer overflow on exotic platforms.
9698         * lib/strncasecmp.c: Include limits.h.
9699         (strncasecmp): Avoid integer overflow on exotic platforms.
9700         Reported by Paul Eggert.
9701
9702 2005-10-11  Bruno Haible  <bruno@clisp.org>
9703
9704         * lib/c-strcasestr.h: New file, from GNU gettext.
9705         * lib/c-strcasestr.c: New file, from GNU gettext.
9706
9707 2005-10-11  Bruno Haible  <bruno@clisp.org>
9708
9709         * lib/c-strcase.h: New file, from GNU gettext.
9710         * lib/c-strcasecmp.c: New file, from GNU gettext.
9711         * lib/c-strncasecmp.c: New file, from GNU gettext.
9712
9713 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9714
9715         * modules/mempcpy (License): GPL -> LGPL.
9716         * modules/strchrnul (License): Likewise.
9717         * modules/sysexits (License): Likewise.
9718
9719 2005-10-08  Simon Josefsson  <jas@extundo.com>
9720
9721         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
9722
9723 2005-10-07  Simon Josefsson  <jas@extundo.com>
9724
9725         * m4/memxor.m4: Remove gl_C_RESTRICT call.
9726
9727 2005-10-06  Simon Josefsson  <jas@extundo.com>
9728
9729         * tests/test-hmac-md5.c: New file.
9730
9731         * modules/hmac-md5-tests: New file.
9732
9733         * modules/hmac-md5: New file.
9734
9735 2005-10-06  Simon Josefsson  <jas@extundo.com>
9736
9737         * m4/hmac-md5.m4: New file.
9738
9739         * m4/memxor.m4: Require gl_C_RESTRICT.
9740
9741 2005-10-06  Simon Josefsson  <jas@extundo.com>
9742
9743         * lib/memxor.c (memxor): Avoid casts and warnings.
9744
9745 2005-10-06  Simon Josefsson  <jas@extundo.com>
9746
9747         * lib/hmac-md5.c: New file.
9748
9749         * lib/hmac.h: New file.
9750
9751 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9752
9753         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
9754         promotes to int, not unsigned int, to catch the AIX 5.3
9755         compiler bug.
9756
9757 2005-10-05  Simon Josefsson  <jas@extundo.com>
9758
9759         * modules/memxor: New file.
9760
9761         * modules/iconv (Files): Move config.rpath to havelib, it is used
9762         there.
9763
9764         * modules/havelib (Files): Add config.rpath.
9765
9766 2005-10-05  Simon Josefsson  <jas@extundo.com>
9767
9768         * m4/memxor.m4: New file.
9769
9770 2005-10-05  Simon Josefsson  <jas@extundo.com>
9771
9772         * lib/memxor.c (memxor): Fix compiler error.
9773
9774         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
9775         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
9776
9777         * lib/memxor.h, lib/memxor.c: New files.
9778
9779         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
9780         we assume all systems have it, suggested by Jim Meyering
9781         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
9782         any systems lack sys/socket.h; mingw32 is known to lack it, but we
9783         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
9784         same reasons.
9785
9786 2005-10-05  Simon Josefsson  <jas@extundo.com>
9787
9788         * config/srclist.txt: Add glibc bug 1423 for md5.h.
9789
9790 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9791
9792         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
9793         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
9794         needed, since the source code now assumes these .h files.
9795
9796 2005-10-05  Derek Price  <derek@ximbiot.com>
9797
9798         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
9799
9800 2005-10-05  Bruno Haible  <bruno@clisp.org>
9801
9802         * modules/stdint (License): Change to LGPL.
9803
9804 2005-10-04  Simon Josefsson  <jas@extundo.com>
9805
9806         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
9807         D. Baushke" <mdb@gnu.org>.
9808
9809 2005-10-04  Bruno Haible  <bruno@clisp.org>
9810
9811         * lib/verify.h (verify_true): Provide alternative definition for C++.
9812
9813 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9814
9815         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
9816         (SSIZE_MAX): New macro, if not already defined.
9817         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
9818         than 2 GiB.
9819
9820 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9821
9822         Sync from coreutils.
9823         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
9824         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
9825         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
9826         ULLONG_MAX doesn't work with 2.7.2.1.
9827
9828 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9829
9830         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
9831         From Ben Pfaff.
9832
9833         * modules/exclude (Depends-on): Depend on verify.
9834         * modules/strtoimax (Depends-on): Likewise.
9835         * modules/utimecmp (Depends-on): Likewise.
9836
9837 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9838
9839         * lib/exclude.c: Include verify.h.
9840         (verify): Remove.  All callers changed to use verify.h's version.
9841         * lib/strtoimax.c: Likewise.
9842         * lib/utimecmp.c: Likewis.e
9843
9844         Sync from coreutils.
9845         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
9846         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
9847         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
9848         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
9849         bother returning ENOSYS if settimeofday or stime fails; just let
9850         them return whatever errno they want to return.
9851         * lib/utimens.c: Include unistd.h, for dup2.
9852         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
9853         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
9854
9855 2005-10-02  Jim Meyering  <jim@meyering.net>
9856
9857         Sync from coreutils.
9858         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
9859         from glibc-2.2.5 that fails for read-only files.
9860
9861 2005-10-02  Jim Meyering  <jim@meyering.net>
9862
9863         Sync from coreutils.
9864         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
9865         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
9866         `#if HAVE_CONFIG_H'.
9867         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
9868         Remove AT_FDCWD test.
9869         Do not consume the fd unless successful.
9870         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
9871         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
9872         block, so that we don't even try to compile it if settimeofday is
9873         available.  This works around a compilation failure on OSF1 V5.1,
9874         due to stime requiring a `long int*' while tv_sec is `int'.
9875
9876 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
9877
9878         Sync from coreutils.
9879         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
9880         against `yes', rather than just testing for nonempty.
9881
9882 2005-10-01  Simon Josefsson  <jas@extundo.com>
9883
9884         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
9885         and Darwin.
9886
9887         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
9888         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
9889         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
9890         freeaddrinfo and gai_strerror are declared by the POSIX headers.
9891         Check if struct addrinfo is declared.
9892
9893 2005-10-01  Simon Josefsson  <jas@extundo.com>
9894
9895         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
9896         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
9897         AI_* and EAI_* definitions.  Protect function declarations.
9898
9899 2005-10-01  Jim Meyering  <jim@meyering.net>
9900
9901         Sync from coreutils.
9902
9903         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
9904         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
9905         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
9906         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9907         in the inet and nsl libraries.  Required on Solaris 5.7.
9908
9909 2005-10-01  Jim Meyering  <jim@meyering.net>
9910
9911         Sync from coreutils.
9912         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
9913         in the inet and nsl libraries.  Required on Solaris 5.7.
9914
9915 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
9916
9917         * lib/getdelim.c (getdelim): Remove unused variables.
9918
9919 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
9920
9921         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
9922         so that the code works even with ancient cpp.  Portability problem
9923         with GCC 2.7.2.1 reported by Thomas M.Ott.
9924
9925 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
9926
9927         * modules/regex (Depends-on): Add strcase.
9928
9929         * modules/gethostname (Licence): Change from GPL to LGPL, since
9930         gethostname.c is a trivial implementation of a standard library
9931         function.
9932         * modules/poll (License): Change from GPL to LGPL, since it's
9933         derived from LGPL code.
9934
9935 2005-09-27  Jim Meyering  <jim@meyering.net>
9936
9937         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
9938         HAVE_CONFIG_H.
9939
9940         * lib/intprops.h (signed_type_or_expr__): Define.
9941         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
9942         for unsigned types.
9943
9944 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
9945
9946         * lib/verify.h (verify_expr): Remove, replacing with:
9947         (verify_true): New macro that returns true instead of void.
9948         (verify_type__): Remove.
9949         (verify): Use verify_true rather than verify_type__.
9950
9951 2005-09-26  Bruno Haible  <bruno@clisp.org>
9952
9953         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
9954         is necessary.
9955         (lib_SOURCES): Remove mbchar.c.
9956         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
9957         (Files): Add m4/mbrtowc.m4.
9958         * modules/mbiter: Likewise.
9959         * modules/mbuiter: Likewise.
9960
9961 2005-09-26  Bruno Haible  <bruno@clisp.org>
9962
9963         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
9964         compile mbchar.c if they are not both present.
9965         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
9966         * m4/mbiter.m4 (gl_MBITER): Likewise.
9967         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
9968         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
9969         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
9970
9971 2005-09-25  Jim Meyering  <jim@meyering.net>
9972
9973         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
9974         also uses socklen_t.
9975
9976 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
9977
9978         * lib/utimens.c (ENOSYS): Define if not already defined.
9979         (futimens): Support having a null PATH if the file descriptor
9980         is nonnegative.
9981
9982         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
9983         Remove.
9984         (__attribute): Define to empty unless GCC 3.1 or later.
9985         This works around a core dump on OpenBSD 3.4, which has GCC
9986         2.95.3, which dumps core when given __attribute__(()).  It also
9987         simplifies other tests, since we really don't want to bother with
9988         worrying about which ancient version of GCC supported what.
9989         Original problem reported by Yoann Vandoorselaere, with part of
9990         the fix suggested by Derek Price.
9991
9992 2005-09-24  Jim Meyering  <jim@meyering.net>
9993
9994         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
9995         so we can once again use a positive bitfield width of 1 -- now we
9996         don't have to explain why we were using a bitfield width of 2.
9997
9998 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9999
10000         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10001         and similarly for the other external symbols.  Problem reported
10002         by James Gallager.
10003
10004         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10005         bug reported by Jim Meyering.
10006
10007         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10008         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10009         not needed, since socklen is a prerequisite module.
10010
10011 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10012
10013         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10014         Problem reported by Eric Blake.
10015         (getaddrinfo): Initialize se so that it's not garbage.
10016         Redo internal storage allocation so that it doesn't make unportable
10017         assumptions about alignment.
10018         Fix a memory leak.
10019
10020         * lib/utimens.c (futimens): Use futimesat if available.
10021         Prefer it to futimes since it doesn't have the futimes bug.
10022
10023         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10024         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10025         Instead, declare a function that returns a pointer to an array,
10026         and use verify_type__ to declare the size of the array.
10027         Problem and germ of a solution reported by Bruno Haible.
10028         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10029         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10030
10031 2005-09-23  Jim Meyering  <jim@meyering.net>
10032
10033         Sync from coreutils.
10034         Correct build failure (socklen_t not defined) on at least
10035         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10036         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10037
10038 2005-09-23  Jim Meyering  <jim@meyering.net>
10039
10040         * modules/getaddrinfo (Depends-on): Add socklen.
10041
10042 2005-09-23  Bruno Haible  <bruno@clisp.org>
10043
10044         * tests/test-verify.c: New file.
10045
10046 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10047
10048         Sync from coreutils.
10049
10050         * modules/argmatch (Depends-on): Add verify.
10051         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10052         unistd-safer.
10053         * modules/save-cwd (Depends-on): Likewise.
10054
10055         * modules/openat (Files): Add lib/openat-die.c.
10056         (Depends-on): Remove error, exitfail.
10057         Add dirname.
10058
10059         * modules/verify: New file.
10060         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10061         with "verify" module.
10062
10063 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10064
10065         Sync from coreutils.
10066
10067         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10068         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10069         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10070         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10071         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10072         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10073         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10074         Don't bother checking for string.h, stdlib.h, unistd.h.
10075         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10076         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10077         module's job.
10078         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10079         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10080
10081         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10082         (gl_GETDATE): Use it.
10083
10084         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10085
10086 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10087
10088         Sync from coreutils.
10089
10090         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10091         stat-time.h.
10092         * lib/argmatch.h: Include verify.h
10093         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10094         (ARGMATCH_ASSERT): Remove; unused.
10095         * lib/canonicalize.c: Assume STDC_HEADERS.
10096         * lib/exclude.c: Include "strcase.h".
10097         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10098         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10099         and stdio-safer.h.
10100         (getusershell): Call fopen, not fopen_safer.
10101         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10102         Do not include unistd-safer.h.
10103         (save_cwd): Don't call fd_safer; no longer needed
10104         now that we include fcntl--.h.
10105
10106         * lib/getdate.y (relative_time): New type.
10107         (RELATIVE_TIME_0): New constant.
10108         (parser_control): Use relative_time instead of doing it ourselves.
10109         (%union): Add new relative_time rel member.
10110         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10111         Now typeless.
10112         (relunit, relunit_snumber): Now of type rel.
10113         (zone, rel, relunit, get_date): Adjust to above changes.
10114
10115         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10116         Do not include unistd-safer.h.
10117         (getloadavg): Don't call fd_safer; no longer needed
10118         now that we include fcntl--.h.
10119
10120         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10121         (make_dir_parents): Treat ENOSYS like EEXIST.
10122
10123         Improve quality of diagnostics on restore_cwd failure.
10124         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10125         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10126         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10127         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10128         each time through the loop.  Do not diagnose restore_cwd failure;
10129         that is the caller's job (and perhaps the caller does not care).
10130
10131         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10132         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10133         If the file already exists but is not a directory, don't bother
10134         to try to make its parents.
10135         Close potential file descriptor leak if we can't chdir("/") (!).
10136         Don't always return true if chdir($PWD) fails; return true only
10137         if the requested action was done successfully (except for the
10138         chdir($PWD)).
10139         Don't log final directory unless we actually made it.
10140         Refactor to avoid duplicate code to fix up permissions.
10141         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10142
10143         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10144         to make it a bit faster and (I hope) clearer.
10145         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10146         Fix bug in formats like %2N.
10147
10148         * lib/verify.h: New file.
10149
10150 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10151
10152         Sync from coreutils.
10153         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10154
10155 2005-09-22  Jim Meyering  <jim@meyering.net>
10156
10157         Sync from coreutils.
10158
10159         * m4/lstat.m4 (gl_FUNC_LSTAT):
10160         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10161         Remove obsolete comment.
10162         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10163         * m4/xstrtod.m4: Likewise.
10164
10165         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10166
10167 2005-09-22  Jim Meyering  <jim@meyering.net>
10168
10169         Sync from coreutils.
10170
10171         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10172
10173         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10174         the .tm_year member, since otherwise gcc-4.0 would now warn about
10175         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10176
10177         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10178         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10179
10180         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10181         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10182         when run in a time zone for which daylight savings time is in effect
10183         for the starting date.
10184
10185         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10186         stop us from restricting permissions of just-created absolute-named
10187         directories.
10188         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10189         to restore initial working directory.
10190         * lib/mkdir-p.c (make_dir_parents): New parameter:
10191         different_working_dir, to tell caller if/when we change the working
10192         directory and are unable to return to the initial one.
10193         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10194         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10195         `return false'.  This fixes a bug introduced on 2004-07-30.
10196
10197         * lib/openat.c (fdopendir): Be sure to close the supplied
10198         file descriptor before returning.  This makes our replacement
10199         implementation a little closer to Solaris's, where fdopendir
10200         ties the file descriptor to the returned DIR* pointer.
10201         * lib/openat.c (unlinkat): New function.
10202         * lib/openat.h (unlinkat): Add prototype.
10203         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10204         (openat_restore_fail): Rename from openat_restore_die.
10205         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10206
10207         Provide an alternative to exiting immediately upon save_cwd or
10208         restore_cwd failure.  Now, an application can arrange e.g.,
10209         to perform a longjump in that case.
10210         * lib/openat.c: Include dirname.h.
10211         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10212         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10213         and openat_restore_die rather than calling error directly.
10214         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10215
10216         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10217         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10218         define.
10219
10220         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10221         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10222                             int utc, int nanoseconds);
10223         Background:
10224         date should not have to allocate a megabyte of virtual memory to
10225         handle a format argument like +%1048575T.  When implemented with
10226         strftime, it must allocate such a buffer, use strftime to fill it
10227         in, print it, then free it.
10228         With fprintftime, it simply prints everything and exits.
10229         With no need for memory allocation, that's one fewer way to fail.
10230         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10231         optional field width, not before, so we accept %9:z, not %:9z.
10232         (my_strftime): Be sure to use L_('x') for literals.
10233
10234         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10235         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10236         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10237         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10238         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10239         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10240         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10241         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10242         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10243         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10244         * lib/xgethostname.c, lib/xreadlink.c:
10245         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10246
10247         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10248         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10249         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10250         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10251         and don't include <sys/file.h>).
10252
10253 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10254
10255         Sync from coreutils.
10256
10257         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10258         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10259         [!LDAV_DONE]: Avoid unused variable warning.
10260
10261 2005-09-21  Bruno Haible  <bruno@clisp.org>
10262
10263         * lib/unicodeio.h (unicode_to_mb): New declaration.
10264
10265 2005-09-20  Derek Price  <derek@ximbiot.com>
10266
10267         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10268         getaddrinfo.h.
10269
10270 2005-09-20  Bruno Haible  <bruno@clisp.org>
10271
10272         * gnulib-tool: Remove trailing slashes from the values specified for
10273         --source-base, --m4-base, --tests-base, --aux-dir.
10274         Suggested by Simon Josefsson <jas@extundo.com>.
10275
10276 2005-09-20  Bruno Haible  <bruno@clisp.org>
10277
10278         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10279         func_modules_to_filelist, func_import, func_create_testdir): Make all
10280         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10281         change when gnulib-tool is invoked in a different locale.
10282
10283 2005-09-19  Simon Josefsson  <jas@extundo.com>
10284
10285         * m4/socklen.m4: Fix typo.
10286
10287 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10288
10289         Use a consistent style for including <config.h>.
10290         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10291         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10292         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10293         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10294         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10295         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10296         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10297         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10298         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10299         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10300         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10301         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10302         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10303         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10304         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10305         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10306         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10307         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10308         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10309         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10310         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10311         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10312         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10313         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10314         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10315         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10316         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10317         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10318         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10319         lib/xstrtoumax.c, lib/yesno.c:
10320         Standardize inclusion of config.h.
10321         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10322         lib/inttostr.h:  Removed inclusion of config.h from header files.
10323         * lib/inttostr.c:  Adjusted in-tree users.
10324         * lib/timespec.h: Remove superfluous warning to include config.h.
10325         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10326         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10327         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10328         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10329         config.h with HAVE_CONFIG_H.
10330
10331 2005-09-19  Jim Meyering  <jim@meyering.net>
10332
10333         * modules/pathmax (License): Change to LGPL.
10334
10335 2005-09-19  Derek Price  <derek@ximbiot.com>
10336
10337         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10338
10339 2005-09-19  Bruno Haible  <bruno@clisp.org>
10340
10341         * gnulib-tool (import): Provide default for --tests-base.
10342
10343 2005-09-19  Bruno Haible  <bruno@clisp.org>
10344
10345         * doc/quote.texi: New file, extracted from gnulib.texi.
10346         * doc/ctime.texi: New file, extracted from gnulib.texi.
10347         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10348         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10349         * doc/gnulib.texi: Include them.
10350
10351 2005-09-18  Bruno Haible  <bruno@clisp.org>
10352
10353         Portability fix.
10354         * gnulib-tool (func_readlink): New function.
10355         (func_ln_if_changed): Use it.
10356
10357 2005-09-18  Bruno Haible  <bruno@clisp.org>
10358
10359         * gnulib-tool: Support --with-tests also with --import.
10360         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10361         (func_import): Use variables $testsbase and $inctests. Emit a
10362         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10363         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10364         SUBDIRS += $testsdir.
10365         (func_create_testdir): Update.
10366
10367 2005-09-18  Bruno Haible  <bruno@clisp.org>
10368
10369         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10370         instead of $dry_run.
10371         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10372         (func_ln_if_changed): Don't handle dry-run here.
10373         (func_import): In dry-run mode, detect more precisely which actions
10374         would be performed, and don't use "...ing" verbs.
10375
10376 2005-09-18  Bruno Haible  <bruno@clisp.org>
10377
10378         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10379         (func_import): Use join on two temporary files instead of three nested
10380         loops, in order to determine which files are new or old.
10381
10382 2005-09-18  Bruno Haible  <bruno@clisp.org>
10383
10384         * gnulib-tool (func_import): Comment out code that spits out the
10385         new files with --dry-run.
10386
10387 2005-09-18  Bruno Haible  <bruno@clisp.org>
10388
10389         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10390
10391 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10392
10393         * lib/stat-time.h: New file.
10394         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10395         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10396         in a different way.
10397         (timespec_cmp): New function.
10398         * lib/utimecmp.c: Include stat-time.h.
10399         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10400         members exist, not on the obsolescent ST_MTIM_NSEC.
10401         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10402
10403 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10404
10405         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10406
10407 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10408
10409         * MODULES.html.sh (File system functions): Add stat-time.
10410         * modules/stat-time: New file.
10411         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10412         is now done in a different way, by the stat-time module.
10413         * modules/utimecmp (Depends-on): Add stat-time.
10414
10415 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10416
10417         * m4/st_mtim.m4: Remove.  Superseded by...
10418         * m4/stat-time.m4: New file.
10419         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10420         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10421
10422 2005-09-15  Derek Price  <derek@ximbiot.com>
10423
10424         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10425
10426 2005-09-15  Derek Price  <derek@ximbiot.com>
10427
10428         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10429         * lib/regex_internal.c: Ditto, using this...
10430         (__GNUC_PREREQ): ...new macro.
10431         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10432         using...
10433         (__GNUC_PREREQ): ...this new macro.
10434
10435         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10436
10437 2005-09-15  Derek Price  <derek@ximbiot.com>
10438             Paul Eggert  <eggert@cs.ucla.edu>
10439
10440         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10441         changes, consolidating in...
10442         * lib/regex_internal.h: ...this file.
10443
10444 2005-09-13  Jim Meyering  <jim@meyering.net>
10445
10446         * lib/canon-host.c: Filter through gnu indent and reword comments
10447         slightly.
10448         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10449
10450 2005-09-13  Derek Price  <derek@ximbiot.com>
10451
10452         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10453         failure.
10454         Reported by Jim Meyering  <jim@meyering.net>.
10455
10456 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10457
10458         * lib/base64.c: Typo.
10459         (base64_encode): Put b64str in initialized data section.
10460
10461 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10462
10463         Merge glibc and coreutils changes into gnulib, plus a few
10464         extra fixes.
10465         * lib/md5.c: Use #error rather than a string.
10466         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10467         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10468         (__attribute__): Define to empty for non recent-GCC.
10469         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10470         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10471         Renamed from their non-__ counterparts, with new macros replacing
10472         them if not _LIBC.  Add __THROW attribute.
10473         (rol): Remove.
10474         (struct md5_ctx): Align buffer if using GCC.
10475         * lib/sha1.h (struct sha1_ctx): Likewise.
10476         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10477         The old name was backwards.
10478         (NOTSWAP): Remove; not used.
10479         (rol): New macro, moved here from md5.h.
10480         (sha1_process_block): Remove a FIXME that doesn't make sense.
10481
10482 2005-09-12  Derek Price  <derek@ximbiot.com>
10483
10484         Return usable errors from canon-host.
10485         * lib/canon-host.h: New file.
10486         * lib/canon-host.c (canon_host): Wrap...
10487         (canon_host_r): ...this new function, which now relies exclusively on
10488         getaddrinfo.
10489         (ch_strerror): New function.
10490         (last_cherror): New global.
10491         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10492         interface.
10493         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10494         void *.
10495         (freeaddrinfo): Free ai->ai_canonname when set.
10496
10497 2005-09-12  Derek Price  <derek@ximbiot.com>
10498
10499         Make canon-host require getaddrinfo.
10500         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10501         AC_LIBSOURCE canon-host.h.  Call...
10502         (gl_PREREQ_CANON_HOST): ...this new function, which requires
10503         gl_GETADDRINFO.
10504         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
10505
10506 2005-09-12  Derek Price  <derek@ximbiot.com>
10507
10508         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
10509         LGPL.
10510         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
10511
10512 2005-09-12  Derek Price  <derek@ximbiot.com>
10513
10514         * lib/gai_strerror.c: Include config.h when available.  Include
10515         getaddrinfo.h before other headers to test interface.
10516         Reported by Larry Jones <lawrence.jones@ugs.com>.
10517
10518 2005-09-12  Derek Price  <derek@ximbiot.com>
10519             Paul Eggert  <eggert@cs.ucla.edu>
10520
10521         * modules/glob (Files): Add glob-libc.h.
10522
10523 2005-09-12  Derek Price  <derek@ximbiot.com>
10524             Paul Eggert  <eggert@cs.ucla.edu>
10525
10526         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
10527         glob_.h, glob-libc.h.
10528         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
10529
10530 2005-09-12  Derek Price  <derek@ximbiot.com>
10531             Paul Eggert  <eggert@cs.ucla.edu>
10532
10533         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
10534         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
10535         protecting things that should be done only in gnulib contexts.
10536         * lib/glob_.h: New file, containing only the glob things needed for
10537         gnulib.
10538         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
10539         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
10540         (glob, globfree, glob_pattern_p): Now defined simply in terms of
10541         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
10542         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
10543         and to respect the namespace rules better.
10544
10545 2005-09-08  Simon Josefsson  <jas@extundo.com>
10546
10547         * modules/socklen: New file.
10548
10549 2005-09-08  Simon Josefsson  <jas@extundo.com>
10550
10551         * m4/socklen.m4: New file.
10552
10553 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10554
10555         * modules/utimens (Files): Add m4/utimbuf.m4, since
10556         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
10557         Reported by Sergey Poznyakoff.
10558
10559 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10560
10561         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
10562         definitions, since that's the preferred style in glibc.
10563         Fix a minor spacing issue, and update copyright notice to match
10564         glibc's.
10565
10566 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10567
10568         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
10569
10570 2005-09-06  Simon Josefsson  <jas@extundo.com>
10571
10572         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
10573         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
10574
10575 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10576
10577         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
10578         warning.
10579
10580 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10581
10582         * config/srclist.txt: Add glibc bug 1302.
10583
10584 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
10585
10586         Change bitset word type from unsigned int to unsigned long int,
10587         as this has better performance on typical 64-bit hosts.
10588         Port bitset code to hosts with unusual word sizes.
10589         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
10590         (build_collating_symbol):
10591         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
10592         argument is a bitset.  This is merely a style issue, but it makes
10593         it clearer that an entire array is expected.
10594         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
10595         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
10596         Port to the case where bitset_word is not the same as unsigned int.
10597         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10598         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
10599         Likewise.
10600         * lib/regexec.c (check_dst_limits_calc_pos_1,
10601         check_subexp_matching_top):
10602         (build_trtable, group_nodes_into_DFAstates):
10603         Likewise.
10604         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
10605         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
10606         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
10607         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
10608         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
10609         * lib/regcomp.c (optimize_subexps, lower_subexp):
10610         Work even if bitset_word has holes in its bitwise representation.
10611         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
10612         * lib/regexec.c (check_dst_limits_calc_pos_1,
10613         check_subexp_matching_top):
10614         Likewise.
10615         * lib/regex_internal.c (re_string_reconstruct):
10616         Don't assume UCHAR_MAX == 255.
10617         * lib/regex_internal.h (bitset_set_all): Likewise.
10618         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
10619         All uses changed.
10620         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
10621         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
10622         All uses changed.
10623         (BITSET_WORD_MAX): New macro.
10624         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
10625         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
10626         (bitset_empty, bitset_copy):
10627         Prefer sizeof (bitset) to multiplying it out ourselves.
10628         (bitset_not_merge): Remove; unused.
10629         (bitset_contain): Return bool, not unsigned int with one bit on.
10630         All callers changed.
10631         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
10632         alignment than re_node_set; do this by defining a new internal
10633         type struct dests_alloc and using it to allocate memory.
10634
10635 2005-09-05  Bruno Haible  <bruno@clisp.org>
10636
10637         * gnulib-tool (func_import): Fix comparison in handling of symbolic
10638         links.
10639
10640 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
10641
10642         * modules/size_max (Makefile.am): Add size_max.h
10643
10644 2005-09-04  Derek Price  <derek@ximbiot.com>
10645
10646         * gnulib-tool (func_import): Fix reversed $symbolic logic.
10647
10648 2005-09-03  Simon Josefsson  <jas@extundo.com>
10649
10650         * gnulib-tool: Fix typo.
10651
10652 2005-09-03  Simon Josefsson  <jas@extundo.com>
10653
10654         * config/srclist.txt: Add glibc bug 1293.
10655
10656 2005-09-03  Derek Price  <derek@ximbiot.com>
10657
10658         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
10659         From Larry Jones <lawrence.jones@ugs.com>.
10660
10661 2005-09-02  Simon Josefsson  <jas@extundo.com>
10662
10663         * modules/socklen: New file.
10664
10665 2005-09-02  Simon Josefsson  <jas@extundo.com>
10666
10667         * modules/havelib: New module.
10668
10669         * modules/gettext, modules/iconv, modules/lock, modules/readline:
10670         Use havelib.
10671
10672 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10673
10674         Check for arithmetic overflow when calculating sizes, to prevent
10675         some buffer-overflow issues.  These patches are conservative, in the
10676         sense that when I couldn't determine whether an overflow was possible,
10677         I inserted a run-time check.
10678         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
10679         macros.
10680         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
10681         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
10682         (re_xnrealloc, re_x2nrealloc): New inline functions.
10683         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
10684         parse_bracket_exp):
10685         (build_equiv_class, build_charclass): Check for arithmetic overflow
10686         in size expression calculations.
10687         * lib/regex_internal.c (re_string_realloc_buffers):
10688         (build_wcs_upper_buffer, re_node_set_add_intersect):
10689         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
10690         (re_dfa_add_node, register_state): Likewise.
10691         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
10692         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
10693         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
10694         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
10695
10696 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10697
10698         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
10699         m4/ulonglong.m4.  Problem reported by Martin Lambers.
10700
10701 2005-09-02  Bruno Haible  <bruno@clisp.org>
10702
10703         Support for lib vs. lib64 distinction on biarch platforms.
10704         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
10705         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
10706         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
10707
10708 2005-09-02  Bruno Haible  <bruno@clisp.org>
10709
10710         * gnulib-tool (import): In the other first-use case, provide defaults
10711         as well.
10712
10713 2005-09-02  Bruno Haible  <bruno@clisp.org>
10714
10715         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
10716         patches not yet found in the latest gettext release.
10717
10718 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10719
10720         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
10721         to avoid a collision with bits/local_lim.h in glibc.
10722         All uses changed.  Problem reported by Dmitry V. Levin in
10723         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
10724
10725         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
10726         bugs in int versus size_t comparisons.
10727         (re_string_context_at): Fix bug where the code assumed that
10728         Idx is signed.
10729
10730         Use bool where appropriate.
10731         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
10732         All callers changed.
10733         (calc_eclosure_iter): Likewise, for ROOT arg.
10734         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
10735         (build_charclass_op): Likewise, for NON_MATCH arg.
10736         * lib/regex_internal.c (re_string_allocate, re_string_construct):
10737         (re_string_construct_common): Likewise, for ICASE arg.
10738         * lib/regexec.c (re_search_2_stub, re_search_stub):
10739         Likewise, for RET_LEN arg.
10740         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
10741         (set_regs): Likewise, for FL_BACKTRACK arg.
10742         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
10743         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
10744         (calc_eclosure_iter, parse_bracket_exp):
10745         Use bool for internal variables that are booleans.
10746         * lib/regexec.c (re_search_internal, check_matching,
10747         proceed_next_node):
10748         (set_regs, build_sifted_states, sift_states_bkref):
10749         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
10750         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10751         (find_collation_sequence_value):
10752         Likewise.
10753         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
10754         (re_node_set_compare):
10755         Return bool, not int. All callers changed.
10756         * lib/regexec.c (check_halt_node_context, check_dst_limits):
10757         (build_trtable, check_node_accept): Likewise.
10758         * lib/regex_internal.h: Include stdbool.h.
10759
10760         Fix bugs uncovered when converting to bool.
10761         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
10762         failure instead of charging ahead blindly.
10763         * lib/regex_internal.c (register_state): Likewise.
10764         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
10765         for freeing internal storage.
10766         (group_nodes_into_DFA_states): Use unsigned int, not int, for
10767         bitset pieces used as boolean, to avoid undefined behavior
10768         on hosts that do int overflow checking.
10769
10770 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10771
10772         * config/srclist.txt: Add glibc bugs 1285-1287.
10773
10774 2005-09-01  Jim Meyering  <jim@meyering.net>
10775
10776         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
10777         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
10778         Require gl_STAT_MACROS, too.
10779
10780 2005-09-01  Bruno Haible  <bruno@clisp.org>
10781
10782         * gnulib-tool (import): In the first-use case, provide defaults.
10783
10784 2005-09-01  Bruno Haible  <bruno@clisp.org>
10785
10786         * gnulib-tool (func_import): Remove the .tmp files.
10787
10788 2005-09-01  Bruno Haible  <bruno@clisp.org>
10789
10790         * gnulib-tool (func_import): Fix handling of symbolic links.
10791
10792 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10793
10794         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
10795         old glibc regex code mishandles strings longer than 2**31 bytes.
10796         This patch fixes this when the regex code is used in gnulib
10797         (i.e., outside glibc).
10798
10799         This patch should not affect the use of the regex code inside
10800         glibc.  No doubt this problem also needs to be handled for glibc
10801         as well, but the result will be an incompatible change to the
10802         glibc ABI, and the old ABI will have to be supported too.  That
10803         can be the the subject for another patch.
10804
10805         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
10806         governing whether the rest of this patch is active.  By default,
10807         the macro is disabled and the patch has no effect.
10808         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
10809         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
10810         (struct re_pattern_buffer, re_search, re_search_2, re_match):
10811         (re_match_2, re_set_registers): Use the new types.
10812         * lib/regex_internal.h (Idx, re_hashval_t): New types.
10813         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
10814         New macros.
10815         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
10816         (re_string_context_at, bin_tree_t, re_dfastate_t):
10817         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
10818         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
10819         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
10820         (re_string_char_size_at, re_string_wchar_at):
10821         (re_string_elem_size_at):
10822         Use the new types and macros to port to 64-bit hosts.
10823         Use unsigned types for internal values, so that the code
10824         mostly works even for arrays larger than SSIZE_MAX.
10825         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
10826         (search_duplicated_node, calc_eclosure_iter, fetch_number):
10827         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
10828         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
10829         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
10830         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
10831         (calc_inveclosure, parse_dup_op, build_range_exp):
10832         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
10833         (fetch_number, create_token_tree, mark_opt_subexp):
10834         Likewise.
10835         * lib/regex_internal.c (re_string_construct_common,
10836         create_ci_newstate):
10837         (create_cd_newstate, re_string_allocate, re_string_construct):
10838         (re_string_realloc_buffers, build_wcs_upper_buffer):
10839         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10840         (re_string_reconstruct, re_string_peek_byte_case):
10841         (re_string_fetch_byte_case, re_string_context_at):
10842         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10843         (re_node_set_init_copy, re_node_set_add_intersect):
10844         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10845         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10846         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10847         (re_acquire_state, re_acquire_state_context, register_state):
10848         Likewise.
10849         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
10850         search_cur_bkref_entry):
10851         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
10852         (re_search_internal, re_search_2_stub, re_search_stub)
10853         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
10854         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
10855         (update_cur_sifted_state, check_dst_limits):
10856         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10857         (check_subexp_limits, sift_states_bkref, merge_state_array):
10858         (check_subexp_matching_top, get_subexp, get_subexp_sub):
10859         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
10860         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10861         (expand_bkref_cache, check_node_accept_bytes):
10862         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
10863         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
10864         (acquire_init_state_context, check_halt_node_context):
10865         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
10866         (sift_states_backward, clean_state_log_if_needed):
10867         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
10868         (find_recover_state, transit_state_sb, transit_state_mb):
10869         (transit_state_bkref, build_trtable, match_ctx_clean):
10870         Likewise.
10871         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
10872         to work around an assumption that REG_MISSING is negative.
10873
10874         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
10875         (seek_collating_symbol_entry) [defined _LIBC]:
10876         (lookup_collation_sequence_value) [defined _LIBC]:
10877         (build_range_exp, build_collating_symbol) [defined _LIBC]:
10878         Use prototypes rather than old-style function definitions.
10879         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
10880         (transit_state_sb) [0]:
10881         (find_collation_sequence_value) [defined _LIBC]: Likewise.
10882
10883         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
10884         rm_eo.
10885
10886         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
10887         (optimize_subexps, lower_subexp):
10888         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
10889         since the signed shift might overflow.  Use 1u<<31 instead.
10890         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10891         Likewise.
10892         * lib/regexec.c (check_dst_limits_calc_pos_1,
10893         check_subexp_matching_top): Likewise.
10894
10895         * lib/regcomp.c (optimize_subexps, lower_subexp):
10896         Use CHAR_BIT rather than 8, for clarity.
10897         * lib/regexec.c (check_dst_limits_calc_pos_1):
10898         (check_subexp_matching_top): Likewise.
10899         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
10900         have to worry about portability issues when shifting it left.
10901         Remove no-longer-needed test for table_size > 0.
10902         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
10903         in a word, as the resulting behavior is undefined.
10904         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
10905         in one case, a <= should have been an <, and in another case the
10906         whole test was missing.
10907         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
10908         the standard name CHAR_BIT.
10909         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
10910         this is not true on one's complement and signed-magnitude hosts.
10911
10912         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
10913         next_last_offset.
10914         (struct re_dfa_t): Remove unused member states_alloc.
10915         * lib/regcomp.c (init_dfa): Don't initialize unused members.
10916
10917 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10918
10919         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
10920         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
10921         and large-file glibc and in 32-bit large-file Solaris.
10922
10923 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10924
10925         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
10926         lengths fit in regoff_t; this isn't true if regoff_t is the same
10927         width as size_t.
10928         * lib/regex.c (re_search_internal): 5th arg is LAST_START
10929         (= START + RANGE) instead of RANGE.  This avoids overflow
10930         problems when regoff_t is the same width as size_t.
10931         All callers changed.
10932         (re_search_2_stub): Check for overflow when adding the
10933         sizes of the two strings.
10934         (re_search_stub): Check for overflow when adding START
10935         to RANGE; if it occurs, substitute the extreme value.
10936
10937 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10938
10939         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
10940
10941 2005-08-31  Jim Meyering  <jim@meyering.net>
10942
10943         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
10944         a pointer-to-const.
10945         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
10946         (register_state): Likewise.
10947         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
10948         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
10949         (group_nodes_into_DFAstates): Likewise.
10950
10951 2005-08-31  Jim Meyering  <jim@meyering.net>
10952
10953         * check-module: Add a FIXME comment.
10954
10955 2005-08-31  Eric Blake  <ebb9@byu.net>
10956
10957         * modules/unistd-safer (Files): Add unistd--.h.
10958         * modules/stdio-safer (Files): Add stdio--.h.
10959
10960 2005-08-31  Derek Price  <derek@ximbiot.com>
10961
10962         * lib/getdelim.c (getdelim): Return EOF on EOF.
10963         Reported by Larry Jones <lawrence.jones@ugs.com>.
10964
10965 2005-08-31  Bruno Haible  <bruno@clisp.org>
10966
10967         Avoid unnecessary diffs in the generated lib/Makefile.am.
10968         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
10969         the generated files.
10970         (func_import): Don't set cmd.
10971
10972 2005-08-31  Bruno Haible  <bruno@clisp.org>
10973
10974         * lib/strstr.c: Include <stddef.h>, for NULL.
10975         * lib/strcasestr.c: Likewise.
10976         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10977
10978 2005-08-31  Bruno Haible  <bruno@clisp.org>
10979
10980         * gnulib-tool: New option --macro-prefix.
10981         (func_import): Use macro_prefix.
10982         (import): Handle option --macro-prefix.
10983
10984 2005-08-31  Bruno Haible  <bruno@clisp.org>
10985
10986         * gnulib-tool (import): Rename most ac_* variables to cached_*.
10987         Also use new variables cached_lgpl, cached_libtool.
10988
10989 2005-08-31  Bruno Haible  <bruno@clisp.org>
10990
10991         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
10992         always instantiating them.
10993
10994 2005-08-31  Bruno Haible  <bruno@clisp.org>
10995
10996         * gnulib-tool (func_import): Read the previous cached settings
10997         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
10998         earlier added by gnulib but are now dropped. Warn when a gnulib file
10999         overwrites a non-gnulib file.
11000
11001 2005-08-31  Bruno Haible  <bruno@clisp.org>
11002
11003         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11004         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11005         projects that don't keep autogenerated files in CVS. Put into
11006         actioncmd only the specified modules, not the transitive closure.
11007
11008 2005-08-31  Bruno Haible  <bruno@clisp.org>
11009
11010         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11011         Create directories that shall be filled.
11012         (import): Don't look for gl_* macros in configure.ac. Recurse across
11013         all directories containing a gnulib-cache.m4 files, if meaningful.
11014
11015 2005-08-31  Bruno Haible  <bruno@clisp.org>
11016
11017         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11018         (import): Set seen_libtool when we see gl_LIBTOOL.
11019
11020 2005-08-31  Bruno Haible  <bruno@clisp.org>
11021
11022         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11023         declaration macro definitions from generated gnulib.m4.
11024
11025 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11026
11027         * lib/iconvme.h: Add prototype for iconv_alloc.
11028
11029 2005-08-29  Simon Josefsson  <jas@extundo.com>
11030
11031         * lib/iconvme.c: Fix errno.
11032
11033 2005-08-29  Bruno Haible  <bruno@clisp.org>
11034
11035         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11036         that it works when the directory contains spaces.
11037
11038 2005-08-29  Bruno Haible  <bruno@clisp.org>
11039
11040         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11041
11042 2005-08-29  Bruno Haible  <bruno@clisp.org>
11043
11044         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11045         Emit more advice.
11046
11047 2005-08-29  Bruno Haible  <bruno@clisp.org>
11048         and Stepan Kasal  <kasal@ucw.cz>
11049
11050         * check-module: If more parameters are given, check each of them
11051         separately; add more exceptions, as noted by Jim Meyering.
11052         (check_module): New procedure.
11053         (%exempt_header): Now contains all exceptions.
11054
11055 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11056
11057         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11058
11059 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11060
11061         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11062
11063 2005-08-28  Bruno Haible  <bruno@clisp.org>
11064
11065         * m4/gnulib-tool.m4: New file.
11066
11067 2005-08-27  Jim Meyering  <jim@meyering.net>
11068
11069         * modules/unistd-safer (Files): Add pipe-safer.c.
11070         * modules/fcntl-safer (Files): Add creat-safer.c.
11071
11072 2005-08-27  Jim Meyering  <jim@meyering.net>
11073
11074         * m4/stdlib-safer.m4: New file.  From coreutils.
11075         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11076         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11077         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11078         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11079         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11080
11081 2005-08-27  Jim Meyering  <jim@meyering.net>
11082
11083         * lib/fopen-safer.c: Merge minor changes from coreutils.
11084         * lib/dup-safer.c: Likewise.
11085         * lib/fd-safer.c: Likewise.
11086
11087         Merge from coreutils.
11088         * lib/stdio--.h: New file.
11089         * lib/stdlib--.h: New file.
11090         * lib/mkstemp-safer.c: New file.
11091
11092         GNU tar needs these.
11093         * lib/pipe-safer.c: New file.
11094         * lib/creat-safer.c: New file.
11095         * lib/fcntl--.h (creat): Define to creat_safer.
11096         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11097         * lib/unistd--.h (pipe): Define to pipe_safer.
11098         * lib/unistd-safer.h: Declare pipe_safer.
11099
11100 2005-08-26  Simon Josefsson  <jas@extundo.com>
11101
11102         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11103         Haible <bruno@clisp.org>.
11104
11105 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11106
11107         * lib/regex_internal.h: Remove all references to
11108         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11109         or better.
11110         (bitset_not, bitset_merge, bitset_not_merge):
11111         (bitset_mask, re_string_allocate, re_string_construct):
11112         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11113         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11114         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11115         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11116         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11117         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11118         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11119         (re_acquire_state_context):
11120         Remove unnecessary forward decls.
11121         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11122         Put __attribute at function definition,
11123         now that the function decl has been removed.
11124         * lib/regex_internal.c (re_string_peek_byte_case):
11125         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11126         Likewise.
11127
11128 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11129
11130         * m4/regex.m4: Add AC_PREREQ(2.50).
11131         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11132
11133 2005-08-25  Simon Josefsson  <jas@extundo.com>
11134
11135         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11136         __fsetlocking.
11137
11138 2005-08-25  Simon Josefsson  <jas@extundo.com>
11139
11140         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11141         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11142         GLIBC specific code.
11143
11144 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11145
11146         Make regex safe for g++.  This fixes one real bug (an "err"
11147         that should have been "*err").  g++ problem reported by
11148         Sam Steingold.
11149         * lib/regex_internal.h (re_calloc): New macro, consistent with
11150         re_malloc etc.  All callers of calloc changed to use re_calloc.
11151         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11152         not int.  All callers changed.
11153         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11154         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11155         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11156         (find_recover_state): Change "err" to "*err"; this fixes what
11157         appears to be a real bug.
11158         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11159         versus int.
11160
11161 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11162
11163         * modules/regex (Depends-on): Add malloc, since the code
11164         assumes that !malloc(0) means failure.
11165
11166 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11167
11168         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11169
11170         alloca modernization/simplification for regex.
11171         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11172         needs to be at the start of the file, and can be moved into
11173         regex_internal.h and simplified.
11174         * lib/regex_internal.h: Include <alloca.h>.
11175         (__libc_use_alloca) [!defined _LIBC]: New macro.
11176         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11177         now works outside glibc.
11178
11179 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11180
11181         * config/srclist.txt: Add glibc bugs 1241, 1245.
11182
11183 2005-08-25  Jim Meyering  <jim@meyering.net>
11184
11185         * lib/open-safer.c: Include <config.h>.
11186         Otherwise, we'd lose LARGEFILE support in any file using
11187         e.g. "fcntl--.h"
11188
11189 2005-08-25  Bruno Haible  <bruno@clisp.org>
11190
11191         * m4/minmax.m4: Require autoconf 2.52.
11192         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11193         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11194         alternatives of translit over the alphabet.
11195         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11196
11197 2005-08-24  Simon Josefsson  <jas@extundo.com>
11198
11199         * tests/test-getpass.c: New file.
11200
11201 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11202
11203         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11204         for GNU regex features.
11205
11206 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11207
11208         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11209         * lib/regex.h (regerror): Likewise.
11210
11211         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11212         requires this.  (The code never needed it.)
11213
11214         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11215         All uses of recently-renamed identifiers changed to use the new,
11216         POSIX-compliant names.  The code will build and run just fine
11217         without these changes, but it's better to eat our own dog food
11218         and use the standard-conforming names.
11219
11220         * lib/regex.h: Fix a multitude of POSIX name space violations.
11221         These changes have an effect only for programs that define
11222         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11223         do not change anything for programs compiled in the normal way.
11224         Also, there is no effect on the ABI.
11225
11226         (_REGEX_SOURCE): New macro.
11227         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11228         defined and _GNU_SOURCE is not; this fixes a name space violation.
11229
11230         Rename the following macros to obey POSIX requirements.
11231         The old names are still visible as macros if _REGEX_SOURCE is defined.
11232         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11233         RE_BACKSLASH_ESCAPE_IN_LISTS.
11234         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11235         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11236         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11237         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11238         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11239         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11240         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11241         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11242         (REG_INTERVALS): renamed from RE_INTERVALS.
11243         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11244         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11245         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11246         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11247         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11248         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11249         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11250         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11251         RE_UNMATCHED_RIGHT_PAREN_ORD.
11252         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11253         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11254         (REG_DEBUG): renamed from RE_DEBUG.
11255         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11256         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11257         unusual, since we can't clash with the POSIX REG_ICASE.
11258         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11259         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11260         (REG_NO_SUB): renamed from RE_NO_SUB.
11261         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11262         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11263         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11264         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11265         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11266         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11267         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11268         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11269         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11270         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11271         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11272         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11273         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11274         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11275         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11276         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11277         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11278         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11279         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11280         (REG_FIXED): Renamed from REGS_FIXED.
11281         (REG_NREGS): Renamed from RE_NREGS.
11282
11283         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11284         of other REG_* macros, since POSIX says the user is allowed to
11285         #undef these macros selectively.
11286
11287         (reg_errcode_t): Update comment stating what other tables need
11288         to be consistent.
11289
11290         Rename the following enum values to obey POSIX requirements.
11291         The old names are still visible as macros.
11292         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11293         is not defined, since GNU is supposed to be a superset of POSIX as
11294         much as possible, and since we want reg_errcode_t to be a signed
11295         type for implementation consistency.
11296         (_REG_NOERROR): Renamed from REG_NOERROR.
11297         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11298         (_REG_BADPAT): Renamed from REG_BADPAT.
11299         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11300         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11301         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11302         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11303         (_REG_EBRACK): Renamed from REG_EBRACK.
11304         (_REG_EPAREN): Renamed from REG_EPAREN.
11305         (_REG_EBRACE): Renamed from REG_EBRACE.
11306         (_REG_BADBR): Renamed from REG_BADBR.
11307         (_REG_ERANGE): Renamed from REG_ERANGE.
11308         (_REG_ESPACE): Renamed from REG_ESPACE.
11309         (_REG_BADRPT): Renamed from REG_BADRPT.
11310         (_REG_EEND): Renamed from REG_EEND.
11311         (_REG_ESIZE): Renamed from REG_ESIZE.
11312         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11313         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11314         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11315         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11316         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11317
11318         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11319         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11320         changed.  But support the old name if the new one is not defined
11321         and if _REGEX_SOURCE.
11322
11323         Change the following member names in struct re_pattern_buffer.
11324         The old names are still supported if !_REGEX_SOURCE.
11325         The new names are always supported, regardless of _REGEX_SOURCE.
11326         (re_buffer): Renamed from buffer.
11327         (re_allocated): Renamed from allocated.
11328         (re_used): Renamed from used.
11329         (re_syntax): Renamed from syntax.
11330         (re_fastmap): Renamed from fastmap.
11331         (re_translate): Renamed from translate.
11332         (re_can_be_null): Renamed from can_be_null.
11333         (re_regs_allocated): Renamed from regs_allocated.
11334         (re_fastmap_accurate): Renamed from fastmap_accurate.
11335         (re_no_sub): Renamed from no_sub.
11336         (re_not_bol): Renamed from not_bol.
11337         (re_not_eol): Renamed from not_eol.
11338         (re_newline_anchor): Renamed from newline_anchor.
11339
11340         Change the following member names in struct re_registers.
11341         The old names are still supported if !_REGEX_SOURCE.
11342         The new names are always supported, regardless of _REGEX_SOURCE.
11343         (rm_num_regs): Renamed from num_regs.
11344         (rm_start): Renamed from start.
11345         (rm_end): Renamed from end.
11346
11347         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11348         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11349         Prepend __ to parameter names.
11350
11351         Undo yesterday's changes.
11352
11353 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11354
11355         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11356         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11357         lib/regex.c.
11358
11359 2005-08-24  Jim Meyering  <jim@meyering.net>
11360
11361         Sync from coreutils.
11362         * m4/fcntl-safer.m4: New file.
11363
11364         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11365         and object files for this module.
11366
11367 2005-08-24  Jim Meyering  <jim@meyering.net>
11368
11369         Sync from coreutils.
11370         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11371
11372 2005-08-24  Jim Meyering  <jim@meyering.net>
11373
11374         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11375         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11376
11377 2005-08-24  Jim Meyering  <jim@meyering.net>
11378
11379         * modules/fcntl-safer: New module.
11380         * modules/fts (Depends-on): Add fcntl-safer.
11381         * MODULES.html.sh (File descriptor based Input/Output):
11382         Add fcntl-safer.
11383
11384 2005-08-24  Bruno Haible  <bruno@clisp.org>
11385
11386         Support for unit test modules.
11387         * modules/README: Mention tests modules.
11388         * modules/TEMPLATE-TESTS: New file.
11389         * gnulib-tool: New options --extract-tests-module, --with-tests and
11390         --tests-base (unused for the moment).
11391         (testsbase, inctests): New variables.
11392         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11393         (func_verify_module): Exclude TEMPLATE-TESTS.
11394         (func_verify_nontests_module, func_verify_tests_module): New functions.
11395         (func_get_dependencies): Add implicit dependency for tests modules.
11396         (func_get_tests_module): New function.
11397         (func_modules_transitive_closure): When --with-tests was specified,
11398         include the unit tests as well, unless explicitly avoided.
11399         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11400         (func_emit_tests_Makefile_am): New function.
11401         (func_create_testdir): When --with-tests was specified, emit a
11402         tests/ directory.
11403         * MODULES.html.sh (Future developments): Update.
11404
11405 2005-08-24  Bruno Haible  <bruno@clisp.org>
11406
11407         * modules/tls-tests: New file.
11408         * tests/test-tls.c: New file, from GNU gettext.
11409
11410 2005-08-24  Bruno Haible  <bruno@clisp.org>
11411
11412         * modules/lock-tests: New file.
11413         * tests/test-lock.c: New file, from GNU gettext.
11414
11415 2005-08-24  Bruno Haible  <bruno@clisp.org>
11416
11417         * lib/lock.h: Add multiple inclusion guard.
11418         * lib/tls.h: Add multiple inclusion guard.
11419
11420 2005-08-24  Bruno Haible  <bruno@clisp.org>
11421
11422         * gnulib-tool: Add support for the --aux-dir option to
11423         --create-testdir, --create-megatestdir, --test, --megatest.
11424         (func_create_testdir, func_create_megatestdir): Optionally emit a
11425         AC_CONFIG_AUX_DIR directive.
11426         (create-testdir, create-megatestdir, test, megatest): Provide a
11427         default value for $auxdir.
11428
11429 2005-08-24  Bruno Haible  <bruno@clisp.org>
11430
11431         * gnulib-tool (import): Use compound statement instead of subshell
11432         where possible.
11433
11434 2005-08-24  Bruno Haible  <bruno@clisp.org>
11435
11436         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11437
11438 2005-08-24  Bruno Haible  <bruno@clisp.org>
11439
11440         * gnulib-tool (func_version): Update.
11441
11442 2005-08-24  Bruno Haible  <bruno@clisp.org>
11443
11444         * gnulib-tool (func_import, func_create_testdir,
11445         func_create_megatestdir): Quote all autoconf macro arguments.
11446
11447 2005-08-24  Bruno Haible  <bruno@clisp.org>
11448
11449         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11450         option --force, because --force causes the aclocal.m4 of each
11451         subdirectory to be newer than the corresponding config.h.in.
11452
11453 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11454
11455         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11456         All contents moved to gl_REGEX.
11457         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11458         assume that it does.
11459
11460 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11461
11462         * lib/regex.h (REG_NOSYS)
11463         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11464         Define, since POSIX requires it as of 2001.
11465         (_REG_ENOSYS)
11466         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11467         New private symbol, used to keep the enum signed in all cases.
11468         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11469         Youngman in
11470         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11471
11472         * lib/regex_internal.c (re_string_skip_chars, register_state):
11473         (calc_state_hash):
11474         Remove forward decls; no longer needed now that we use prototypes.
11475         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11476         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11477         (clean_state_log_if_needed): Likewise.
11478
11479 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11480
11481         * config/srclist.txt: Add glibc bugs 1231-1233.
11482
11483 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11484
11485         Fix problems reported by Sam Steingold in
11486         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11487         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11488         assumed that reg_errcode_t is a signed type, which is not
11489         necessarily true if _XOPEN_SOURCE is not defined.
11490         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11491         since some compilers warn about it otherwise.
11492
11493 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11494
11495         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11496         (init_word_char, create_initial_state, duplicate_node_closure):
11497         (fetch_token, peek_token_bracket, build_range_exp):
11498         (build_collating_symbol): Remove forward decls; no longer needed
11499         now that we use prototypes.
11500
11501         * lib/regcomp.c:
11502         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
11503         (re_compile_fastmap_iter, regcomp, regerror, regfree):
11504         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
11505         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
11506         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
11507         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
11508         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
11509         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
11510         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
11511         (build_range_exp, build_collating_symbol, parse_bracket_exp):
11512         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
11513         (build_charclass, build_charclass_op, fetch_number, create_tree):
11514         (create_token_tree, mark_opt_subexp, duplicate_tree):
11515         Use prototypes rather than old-style definitions.
11516
11517         * lib/regex_internal.c:
11518         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
11519         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
11520         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11521         (re_string_reconstruct, re_string_peek_byte_case):
11522         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
11523         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11524         (re_node_set_init_copy, re_node_set_add_intersect):
11525         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11526         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11527         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11528         (re_acquire_state, re_acquire_state_context, register_state):
11529         (create_ci_newstate, create_cd_newstate, free_state):
11530         Likewise.
11531         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
11532         re_search_2):
11533         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
11534         (re_search_internal, prune_impossible_nodes):
11535         (acquire_init_state_context, check_matching, static):
11536         (check_halt_node_context, check_halt_state_context, proceed_next_node):
11537         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
11538         (update_regs, sift_states_backward, build_sifted_states):
11539         (clean_state_log_if_needed, merge_state_array):
11540         (update_cur_sifted_state, add_epsilon_src_nodes):
11541         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
11542         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
11543         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
11544         (find_recover_state, check_subexp_matching_top, transit_state_mb):
11545         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
11546         (check_arrival, check_arrival_add_next_nodes):
11547         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11548         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11549         (check_node_accept_bytes, check_node_accept, extend_buffers):
11550         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
11551         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
11552         (sift_ctx_init):
11553         Likewise.
11554
11555         * lib/regex_internal.h:
11556         (re_string_allocate, re_string_construct, re_string_reconstruct):
11557         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
11558         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
11559         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
11560         (re_string_context_at, re_string_peek_byte_case):
11561         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
11562         is defined, since we now use prototypes always.
11563
11564         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
11565         C89 or better.  All uses removed.
11566
11567 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11568
11569         * config/srclist.txt: Add glibc bugs 1220-1227.
11570
11571 2005-08-20  Jim Meyering  <jim@meyering.net>
11572
11573         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
11574         of unused local, dfa.
11575
11576 2005-08-20  Bruno Haible  <bruno@clisp.org>
11577
11578         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
11579
11580 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11581
11582         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
11583         (re_node_set_insert_last, re_dfa_add_node):
11584         Rename local variables to avoid GCC shadowing warnings.
11585
11586 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11587
11588         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
11589         [defined lint]: Suppress bogus uninitialized-variable warnings.
11590
11591         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
11592         and let the caller return REG_ESPACE if out of space.  This
11593         removes an uninitialied-variable warning with GCC 4.0.1, and also
11594         avoids taking the address of a local variable.  All callers
11595         changed.
11596
11597 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11598
11599         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
11600         $LIBCSRC/posix/regexec.c.
11601         Add glibc bug 1217 for regcomp.c.
11602
11603 2005-08-19  Jim Meyering  <jim@meyering.net>
11604
11605         * lib/regexec.c (proceed_next_node): Redo local variables to
11606         avoid GCC shadowing warnings.
11607
11608 2005-08-18  Bruno Haible  <bruno@clisp.org>
11609
11610         * lib/strstr.c (strstr): Fix return value in multibyte case.
11611         * lib/strcasestr.c (strcasestr): Likewise.
11612
11613 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11614
11615         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
11616
11617 2005-08-17  Jim Meyering  <jim@meyering.net>
11618
11619         Make the %s format (seconds since the epoch) work for a negative
11620         number and when used with a zero-padded field width, e.g. %015s.
11621
11622         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
11623         label so that it precedes the code to set `digits'.  Otherwise,
11624         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
11625         print `00-22'.  Now, it prints `-0022', as it should.
11626
11627 2005-08-17  Bruno Haible  <bruno@clisp.org>
11628
11629         * modules/strstr (Files): Add m4/mbrtowc.m4.
11630         (Depends-on): Add mbuiter.
11631
11632 2005-08-17  Bruno Haible  <bruno@clisp.org>
11633
11634         * modules/strcasestr: New file.
11635         * MODULES.html.sh (String handling, based on ANSI C 89): Add
11636         strcasestr.
11637
11638 2005-08-17  Bruno Haible  <bruno@clisp.org>
11639
11640         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
11641
11642 2005-08-17  Bruno Haible  <bruno@clisp.org>
11643
11644         * modules/mbuiter: New file.
11645         * MODULES.html.sh (Extended multibyte and wide character utilities):
11646         Add mbuiter.
11647
11648 2005-08-17  Bruno Haible  <bruno@clisp.org>
11649
11650         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
11651         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
11652
11653 2005-08-17  Bruno Haible  <bruno@clisp.org>
11654
11655         * m4/strcasestr.m4: New file.
11656
11657 2005-08-17  Bruno Haible  <bruno@clisp.org>
11658
11659         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
11660         * lib/strstr.c: Completely rewritten, with multibyte locale support.
11661
11662 2005-08-17  Bruno Haible  <bruno@clisp.org>
11663
11664         * lib/strcasestr.h: New file.
11665         * lib/strcasestr.c: New file.
11666
11667 2005-08-17  Bruno Haible  <bruno@clisp.org>
11668
11669         * lib/strcasecmp.c: Use mbuiter.h.
11670
11671 2005-08-17  Bruno Haible  <bruno@clisp.org>
11672
11673         * lib/mbuiter.h: New file.
11674
11675 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11676
11677         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
11678         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
11679         and gl_GETOPT are both invoked via different paths (as happens
11680         with GNU tar CVS because it uses both argp and getopt), the former
11681         wins.
11682
11683 2005-08-16  Bruno Haible  <bruno@clisp.org>
11684
11685         * modules/tls: New file.
11686         * MODULES.html.sh (Multithreading): Add tls.
11687
11688 2005-08-16  Bruno Haible  <bruno@clisp.org>
11689
11690         * modules/strnlen1: New file.
11691         * MODULES.html.sh (String handling): Add strnlen1.
11692
11693 2005-08-16  Bruno Haible  <bruno@clisp.org>
11694
11695         * modules/strcase (Files): Add m4/mbrtowc.m4.
11696         (Depends-on): Add strnlen1, mbchar.
11697
11698 2005-08-16  Bruno Haible  <bruno@clisp.org>
11699
11700         * modules/mbiter: New file.
11701         * MODULES.html.sh (Extended multibyte and wide character utilities):
11702         Add mbiter.
11703
11704 2005-08-16  Bruno Haible  <bruno@clisp.org>
11705
11706         * modules/mbfile: New file.
11707         * MODULES.html.sh (Extended multibyte and wide character utilities):
11708         Add mbfile.
11709
11710 2005-08-16  Bruno Haible  <bruno@clisp.org>
11711
11712         * modules/mbchar: New file.
11713         * MODULES.html.sh (Extended multibyte and wide character utilities):
11714         New section.
11715
11716 2005-08-16  Bruno Haible  <bruno@clisp.org>
11717
11718         * m4/tls.m4: New file, from GNU gettext.
11719
11720 2005-08-16  Bruno Haible  <bruno@clisp.org>
11721
11722         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
11723         always.
11724         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
11725
11726 2005-08-16  Bruno Haible  <bruno@clisp.org>
11727
11728         * m4/mbiter.m4: New file.
11729
11730 2005-08-16  Bruno Haible  <bruno@clisp.org>
11731
11732         * m4/mbfile.m4: New file.
11733
11734 2005-08-16  Bruno Haible  <bruno@clisp.org>
11735
11736         * m4/mbchar.m4: New file.
11737
11738 2005-08-16  Bruno Haible  <bruno@clisp.org>
11739
11740         * lib/tls.h: New file, from GNU gettext.
11741         * lib/tls.c: New file, from GNU gettext.
11742
11743 2005-08-16  Bruno Haible  <bruno@clisp.org>
11744
11745         * lib/strnlen1.h: New file.
11746         * lib/strnlen1.c: New file.
11747
11748 2005-08-16  Bruno Haible  <bruno@clisp.org>
11749
11750         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
11751         (mbi_init): Update.
11752         (mbi_avail, mbi_advance): Let the iteration end before the terminating
11753         NUL byte, not after it.
11754
11755 2005-08-16  Bruno Haible  <bruno@clisp.org>
11756
11757         * lib/strcase.h (strcasecmp): Add note in comments.
11758         * lib/strncasecmp.c: Use code from strcasecmp.c.
11759         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
11760         (strcasecmp): Work correctly in multibyte locales.
11761
11762 2005-08-16  Bruno Haible  <bruno@clisp.org>
11763
11764         * lib/mbiter.h: New file.
11765
11766 2005-08-16  Bruno Haible  <bruno@clisp.org>
11767
11768         * lib/mbfile.h: New file.
11769
11770 2005-08-16  Bruno Haible  <bruno@clisp.org>
11771
11772         * lib/mbchar.h: New file.
11773         * lib/mbchar.c: New file.
11774
11775 2005-08-16  Bruno Haible  <bruno@clisp.org>
11776
11777         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
11778         the valid ones. Makes the comparison operations transitive:
11779         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
11780         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
11781
11782 2005-08-15  Simon Josefsson  <jas@extundo.com>
11783
11784         * modules/ssize_t (License): Change to 'unlimited'.
11785
11786         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
11787
11788 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11789
11790         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
11791         Add comments for each pending glibc patch.
11792
11793 2005-08-15  Bruno Haible  <bruno@clisp.org>
11794
11795         * lib/regex.h (__restrict_arr): Don't define to __restrict if
11796         __cplusplus is defined.
11797
11798 2005-08-14  Jim Meyering  <jim@meyering.net>
11799
11800         Sync from coreutils.
11801
11802         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
11803         Use the hash-table-based cycle-detection code not just when
11804         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
11805         Reported by James Youngman in
11806         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
11807         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
11808         FTS_TIGHT_CYCLE_CHECK.
11809         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
11810         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
11811         once again.
11812         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
11813         * lib/fts.c (fd_safer): Remove decl.
11814         Include fcntl--.h rather than unistd-safer.h
11815         (fts_safe_changedir): Don't call fd_safer; no longer needed
11816         now that we include fcntl--.h.
11817
11818 2005-08-12  Simon Josefsson  <jas@extundo.com>
11819
11820         * modules/getndelim2: Use ssize_t module.
11821         * modules/getnline: Likewise.
11822         * modules/safe-read: Likewise.
11823         * modules/xreadlink: Likewise.
11824
11825         * modules/ssize_t: New file.
11826
11827 2005-08-12  Simon Josefsson  <jas@extundo.com>
11828
11829         * m4/readline.m4: Look for termcap, curses or ncurses if required.
11830
11831 2005-08-12  Simon Josefsson  <jas@extundo.com>
11832
11833         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11834         ssize_t.
11835
11836 2005-08-12  Simon Josefsson  <jas@extundo.com>
11837
11838         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
11839         readline, getdelim and check_version.
11840         (Support for systems lacking ISO C 99: Sizes of integer types):
11841         Add size_max.
11842
11843 2005-08-12  Bruno Haible  <bruno@clisp.org>
11844
11845         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
11846
11847 2005-08-11  Simon Josefsson  <jas@extundo.com>
11848
11849         * modules/readline: New file.
11850
11851         * modules/strnlen (Files): Add strnlen.h.
11852
11853 2005-08-11  Simon Josefsson  <jas@extundo.com>
11854
11855         * m4/readline.m4: New file.
11856
11857 2005-08-11  Simon Josefsson  <jas@extundo.com>
11858
11859         * lib/readline.h, readline.c: New file.
11860
11861 2005-08-11  Simon Josefsson  <jas@extundo.com>
11862
11863         * doc/gnulib.texi (Initial import, Finishing touches): Mention
11864         gl_AVOID.
11865
11866 2005-08-11  Bruno Haible  <bruno@clisp.org>
11867
11868         * lib/strnlen.h (strnlen): Change parameter name to match comment.
11869
11870 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
11871
11872         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
11873
11874 2005-08-10  Simon Josefsson  <jas@extundo.com>
11875
11876         * tests/test-iconvme.c: New file.
11877
11878 2005-08-10  Simon Josefsson  <jas@extundo.com>
11879
11880         * m4/strnlen.m4: New file.
11881
11882         * m4/strndup.m4: Don't check for strnlen declaration, done in
11883         strnlen.m4.
11884
11885 2005-08-10  Simon Josefsson  <jas@extundo.com>
11886
11887         * lib/strndup.c: Use strnlen.h.
11888
11889         * lib/strnlen.h: New file.
11890
11891 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11892
11893         * README: Typos.
11894
11895 2005-08-02  Simon Josefsson  <jas@extundo.com>
11896
11897         * modules/readline: New file.
11898
11899 2005-08-02  Simon Josefsson  <jas@extundo.com>
11900
11901         * modules/getdelim: New file.
11902
11903         * modules/getline: Rewrite, don't use getndelim2.
11904
11905 2005-08-02  Simon Josefsson  <jas@extundo.com>
11906
11907         * m4/getline.m4: Separate out getdelim stuff into separate module.
11908
11909         * m4/getdelim.m4: New file.
11910
11911 2005-08-02  Simon Josefsson  <jas@extundo.com>
11912
11913         * lib/getline.h, getline.c: Rewrite.
11914
11915         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
11916
11917 2005-07-31  Bruno Haible  <bruno@clisp.org>
11918
11919         * lib/lock.h (gl_lock_initializer): New macro.
11920         (gl_lock_define_initialized): Use it.
11921         (gl_rwlock_initializer): New macro.
11922         (gl_rwlock_define_initialized): Use it.
11923         (gl_recursive_lock_initializer): New macro.
11924         (gl_recursive_lock_define_initialized): Use it.
11925
11926 2005-07-30  Karl Berry  <karl@gnu.org>
11927
11928         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
11929         Report from Ben Pfaff, regarding getopt.
11930
11931 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
11932
11933         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
11934         normal way.
11935         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
11936         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
11937         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
11938         (gl_GETOPT): Use the new macros.  Most of the implementation
11939         is moved to the new macros.  This is for programs like Emacs
11940         that don't want all the functionality of gl_GETOPT.
11941
11942 2005-07-26  Bruno Haible  <bruno@clisp.org>
11943
11944         * m4/lock.m4: Update from GNU gettext.
11945
11946 2005-07-26  Bruno Haible  <bruno@clisp.org>
11947
11948         * lib/lock.h: Update from GNU gettext.
11949         * lib/lock.c: Update from GNU gettext.
11950
11951 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
11952
11953         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
11954         obsolescent AC_TRY_RUN.  Include the default includes files, for
11955         'exit'.
11956
11957 2005-07-24  Bruno Haible  <bruno@clisp.org>
11958
11959         * modules/visibility: New file.
11960         * MODULES.html.sh (Misc): Add visibility.
11961
11962 2005-07-24  Bruno Haible  <bruno@clisp.org>
11963
11964         * m4/visibility.m4: New file.
11965
11966 2005-07-24  Bruno Haible  <bruno@clisp.org>
11967
11968         * doc/visibility.texi: New file.
11969
11970 2005-07-22  Bruno Haible  <bruno@clisp.org>
11971
11972         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
11973         $(ALLOCA_H), redundant through BUILT_SOURCES.
11974         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
11975         redundant through BUILT_SOURCES.
11976         * modules/byteswap (Makefile.am): Remove explicit dependency on
11977         $(BYTESWAP_H), redundant through BUILT_SOURCES.
11978         * modules/fnmatch (Makefile.am): Remove explicit dependency on
11979         $(FNMATCH_H), redundant through BUILT_SOURCES.
11980         * modules/getopt (Makefile.am): Remove explicit dependency on
11981         $(GETOPT_H), redundant through BUILT_SOURCES.
11982         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
11983         redundant through BUILT_SOURCES.
11984         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
11985         redundant through BUILT_SOURCES.
11986         * modules/stdbool (Makefile.am): Remove explicit dependency on
11987         $(STDBOOL_H), redundant through BUILT_SOURCES.
11988         * modules/stdint (Makefile.am): Remove explicit dependency on
11989         $(STDINT_H), redundant through BUILT_SOURCES.
11990         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
11991         Remove explicit dependency on $(SYSEXITS_H).
11992         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
11993
11994 2005-07-18  Simon Josefsson  <jas@extundo.com>
11995
11996         * lib/check-version.c (check_version): Accept identical versions too.
11997
11998 2005-07-18  Bruno Haible  <bruno@clisp.org>
11999
12000         * modules/lock: New file.
12001         * MODULES.html.sh (Multithreading): New section.
12002
12003 2005-07-18  Bruno Haible  <bruno@clisp.org>
12004
12005         * m4/lock.m4: New file, from GNU gettext.
12006
12007 2005-07-18  Bruno Haible  <bruno@clisp.org>
12008
12009         * lib/lock.h: New file, from GNU gettext.
12010         * lib/lock.c: New file, from GNU gettext.
12011
12012 2005-07-18  Bruno Haible  <bruno@clisp.org>
12013
12014         * lib/lock.h (gl_once_t): New type.
12015         (gl_once_define, gl_once): New macros.
12016         * lib/lock.c (fresh_once): New variable.
12017         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12018         functions.
12019
12020 2005-07-16  Simon Josefsson  <jas@extundo.com>
12021
12022         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12023         workaround, suggested by Bruno.
12024
12025 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12026
12027         * modules/xalloc (Depends-on): Add xalloc-die.
12028         * modules/xvasprintf (Depends-on): Add xalloc-die.
12029
12030 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12031
12032         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12033         with a minor change.
12034
12035 2005-07-15  Bruno Haible  <bruno@clisp.org>
12036
12037         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12038         When using lib/poll.c, define poll as rpl_poll.
12039
12040 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12041
12042         * modules/argp (Depends-on): Remove unlocked-io.
12043
12044 2005-07-14  Derek Price  <derek@ximbiot.com>
12045
12046         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12047         for glob symlink bug.
12048
12049 2005-07-14  Bruno Haible  <bruno@clisp.org>
12050
12051         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12052         Instead, test for *_unlocked function declarations directly.
12053
12054 2005-07-11  Simon Josefsson  <jas@extundo.com>
12055
12056         * modules/size_max: New file.
12057
12058         * modules/xsize: Depend on size_max module for size_max.m4.
12059
12060 2005-07-11  Simon Josefsson  <jas@extundo.com>
12061
12062         * lib/size_max.h: New file.
12063
12064 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12065
12066         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12067         copyright symbol and the year.
12068         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12069         (version_etc_va): Use parameterized copyright notice.
12070         Reword to conform to the current GNU coding standards.
12071
12072 2005-07-11  Karl Berry  <karl@gnu.org>
12073
12074         * doc/gnulib.texi (Quoting): new node.
12075         (Initial import): more info, from Patrice.
12076
12077 2005-07-11  Bruno Haible  <bruno@clisp.org>
12078
12079         * gnulib-tool (func_usage): Document option --avoid.
12080         (Command line options): Handle --avoid.
12081         (func_acceptable): New function.
12082         (func_modules_transitive_closure): Use it.
12083
12084 2005-07-11  Bruno Haible  <bruno@clisp.org>
12085
12086         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12087         Reported by Jim Meyering.
12088
12089 2005-07-10  Bruno Haible  <bruno@clisp.org>
12090
12091         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12092         Needed when size_t is smaller than 'unsigned int'.
12093         Reported by Paul Eggert.
12094
12095 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12096
12097         * modules/argp (Depends-on): Add unlocked-io
12098
12099 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12100
12101         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12102         block of defines.
12103
12104 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12105
12106         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12107         fix now.
12108
12109 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12110         and Paul Eggert  <eggert@cs.ucla.edu>
12111
12112         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12113         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12114
12115 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12116
12117         * modules/regex (Files): Add lib/regex_internal.c,
12118         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12119         (Depends-on): Add extensions.
12120         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12121
12122 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12123
12124         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12125         pathconf.
12126         * m4/same.m4 (gl_SAME): Likewise.
12127         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12128
12129         * m4/regex.m4: Adjust to new libc regex implementation.
12130         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12131         all the .c and .h parts of (the new) regex.
12132         Quote the m4 stuff better.
12133         Check for RE_ICASE bug of old gnulib.
12134         Check for REG_STARTEND of recent libc.
12135         Rename local variables from jm_* to gl_*.
12136         Quote operand of "test -f".
12137         Say "recent enough" version of libc, not "version 2".
12138         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12139         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12140         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12141         Remove check for btowc, isascii.
12142         Require AM_LANGINFO_CODESET.
12143
12144 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12145
12146         * lib/regex.c, regex.h: Sync from libc.
12147         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12148         * lib/regexec.c:
12149         New files, synced from libc, except that regex_internal.h
12150         currently has a small porting fix.
12151
12152 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12153
12154         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12155         regex_internal.c, regexec.c.
12156         Add regex_internal.h too, but as a comment, since the libc version
12157         is currently broken in gnulib mode.
12158
12159 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12160
12161         Support programs like Emacs that use gnulib but not gettext.
12162         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12163         * modules/gettext-h: New file.
12164         * modules/gettext (Files): Remove lib/gettext.h.
12165         (Depends-on): Add gettext-h.
12166         (Makefile.am): Remove lib_SOURCES.
12167         * modules/argmatch, modules/c-stack, modules/closeout:
12168         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12169         * modules/execute, modules/file-type, modules/getaddrinfo:
12170         * modules/getopt, modules/human, modules/javacomp:
12171         * modules/javaexec, modules/mkdir-p, modules/obstack:
12172         * modules/openat, modules/pagealign_alloc, modules/pipe:
12173         * modules/quotearg, modules/regex, modules/rpmatch:
12174         * modules/unicodeio, modules/userspec, modules/version-etc:
12175         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12176         * modules/xsetenv:
12177         Depend on gettext-h, not gettext.
12178
12179 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12180
12181         * gnulib-tool (func_import): Add support for 'public domain' license.
12182         * modules/alloca, modules/atexit, modules/memmove:
12183         Now public domain, not GPL.
12184         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12185         * modules/realloc, modules/strerror, modules/strtod:
12186         Now LGPL, not GPL.
12187
12188 2005-07-05  Bruno Haible  <bruno@clisp.org>
12189
12190         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12191         autoconf CVS. Needed for mingw.
12192
12193 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12194
12195         Remove the dependency of the strftime module on the tzset module.
12196         * modules/strftime (Depends-on): Remove dependency on tzset.
12197
12198 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12199
12200         Remove the dependency of the strftime module on the tzset module.
12201         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12202         gl_FUNC_TZSET_CLOBBER.
12203
12204 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12205
12206         Remove the dependency of the strftime module on the tzset module.
12207         * lib/strftime.c (my_strftime)
12208         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12209         Copy the input structure, to work around some of the bug with
12210         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12211         Solaris releases, you should also use the tzset module, but we won't
12212         require it as a dependency any more since we don't want LGPLed code
12213         to depend on GPLed code.
12214
12215 2005-07-02  Jim Meyering  <jim@meyering.net>
12216
12217         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12218         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12219         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12220         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12221
12222 2005-07-02  Jim Meyering  <jim@meyering.net>
12223
12224         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12225
12226 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12227
12228         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12229         declares only 'struct timespec;' (!).
12230
12231 2005-07-01  Jim Meyering  <jim@meyering.net>
12232
12233         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12234         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12235         * lib/save-cwd.c, tempname.c:
12236         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12237         and don't include <sys/file.h>).
12238
12239 2005-06-29  Jim Meyering  <jim@meyering.net>
12240
12241         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12242         type name.  Use the variable name instead.
12243         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12244         Likewise.
12245
12246 2005-06-28  Simon Josefsson  <jas@extundo.com>
12247
12248         * modules/check-version (Files): Add check-version.m4.
12249
12250 2005-06-28  Simon Josefsson  <jas@extundo.com>
12251
12252         * m4/check-version.m4: New file, suggested by Jim Meyering
12253         <jim@meyering.net>.
12254
12255 2005-06-28  Simon Josefsson  <jas@extundo.com>
12256
12257         * lib/check-version.h, lib/check-version.c: New files.
12258
12259 2005-06-28  Simon Josefsson  <jas@extundo.com>
12260
12261         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12262         collision with global variable.  Better indentation.  Don't
12263         increment buffer pointer beyond buffer end.  Based on comments
12264         from Paul Eggert <eggert@cs.ucla.edu>.
12265
12266         * lib/base64.h: Indent.
12267
12268 2005-06-28  Simon Josefsson  <jas@extundo.com>
12269
12270         * doc/gnulib.texi (Library version handling): New section.
12271
12272 2005-06-28  Jim Meyering  <jim@meyering.net>
12273
12274         * check-module (find_included_lib_files): Hard-code another
12275         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12276         but modules/fts-lgpl (correctly) does not list those files.
12277
12278         * modules/canonicalize (Files): Add lib/pathmax.h.
12279
12280 2005-06-25  Simon Josefsson  <jas@extundo.com>
12281
12282         * modules/check-version: New file.
12283
12284 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12285
12286         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12287         initializer of struct addrinfo, as an indication that we don't
12288         care how many members the structure has.
12289
12290 2005-06-24  Derek Price  <derek@ximbiot.com>
12291         and Bruno Haible  <bruno@clisp.org>
12292
12293         Remove stat module & update lstat.
12294         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12295         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12296         * m4/stat.m4: Remove this file.
12297
12298 2005-06-24  Derek Price  <derek@ximbiot.com>
12299         and Bruno Haible  <bruno@clisp.org>
12300
12301         Remove stat module & update lstat.
12302         * lib/stat.c: Remove this file...
12303         (slash_aware_lstat): ...moving this content and its support...
12304         * lib/lstat.c (rpl_lstat): ...into here.
12305         * lib/lstat.h: New file.
12306
12307 2005-06-24  Derek Price  <derek@ximbiot.com>
12308         and Bruno Haible  <bruno@clisp.org>
12309
12310         Remove stat module & update lstat.
12311         * config/srclist.txt (libc sources): Remove stat.
12312
12313 2005-06-24  Derek Price  <derek@ximbiot.com>
12314         and Bruno Haible  <bruno@clisp.org>
12315
12316         Remove stat module & update lstat.
12317         * MODULES.html.sh (stat): Remove.
12318         * MODULES.html: Regenerated.
12319         * modules/lstat (Description): Correct function name.
12320         (Files): Add "lstat.h".
12321         (Depends-on): Remove stat, add xalloc, stat-macros.
12322         * modules/stat: Remove this file.
12323         (Include): Add "lstat.h", remove <sys/stat.h>.
12324
12325 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12326
12327         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12328         (ranged_convert): Don't save conversion in a temporary struct.
12329         This causes a warning with GCC 4.0.0, and anyway in the typical
12330         case it's not worth the extra 100 bytes or so of code.
12331         (ranged_convert, __mktime_internal): When calling a function via a
12332         pointer P, use P () rather than (*P) (), as we now assume C89 or
12333         better.
12334
12335 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12336
12337         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12338         "who -r" failed to give output.  Problem reported by Tim Waugh.
12339
12340         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12341         (xcalloc): Use it to avoid needless tests.
12342         Problem reported by Jim Meyering.
12343
12344 2005-06-20  Derek Price  <derek@ximbiot.com>
12345
12346         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12347         unnecessary for Autoconfs > 2.59c.
12348
12349 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12350
12351         * lib/argp.h (__option_is_short): Check upper limit of
12352         __key. Isprint() requires its argument to have the value
12353         of an unsigned char or EOF.
12354
12355 2005-06-16  Jim Meyering  <jim@meyering.net>
12356
12357         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
12358         when either N or S is zero.
12359
12360 2005-06-16  Derek Price  <derek@ximbiot.com>
12361
12362         * m4/bison.m4: Declare YACC & YFLAGS precious.
12363
12364 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12365
12366         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12367         multibyte string or pattern, fall back on unibyte matching.
12368         Problem reported by James Youngman.
12369
12370 2005-06-08  Bruno Haible  <bruno@clisp.org>
12371
12372         * modules/csharpcomp: New file.
12373         * MODULES.html.sh (C#): Add csharpcomp.
12374
12375 2005-06-08  Bruno Haible  <bruno@clisp.org>
12376
12377         * m4/csharpcomp.m4: New file, from GNU gettext.
12378
12379 2005-06-08  Bruno Haible  <bruno@clisp.org>
12380
12381         * lib/csharpcomp.h: New file, from GNU gettext.
12382         * lib/csharpcomp.c: New file, from GNU gettext.
12383         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12384
12385 2005-06-08  Bruno Haible  <bruno@clisp.org>
12386
12387         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12388         warning on mingw.
12389
12390 2005-06-07  Derek Price  <derek@ximbiot.com>
12391
12392         Sync from CVS.
12393         * lib/glob_.h: Indent nested #ifdef.
12394
12395 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12396
12397         Sync from coreutils.
12398         Use "file name" when talking about file names, instead of "filename"
12399         or "path", as per the GNU coding standards.
12400         * lib/mkdir-p.c: Renamed from makepath.c.
12401         (make_dir_parents): Renamed from make_path.  All callers changed.
12402         * lib/mkdir-p.h: Likewise.  All includers changed.
12403         * lib/filenamecat.c: Renamed from path-concat.c.
12404         (file_name_concat): Renamed from path_concat.  All callers changed.
12405         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12406         * lib/filenamecat.h: Likewise.  All includers changed.
12407         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12408         in comments or local variable names.
12409         * lib/basename.c: Likewise.
12410         * lib/canonicalize.c, canonicalize.h: Likewise.
12411         * lib/dirname.c, dirname.h: Likewise.
12412         * lib/euidaccess.c: Likewise.
12413         * lib/exclude.c: Likewise
12414         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12415         * lib/fsusage.c, fsuage.h: Likewise.
12416         * lib/fts.c, fts_.h: Likewise.
12417         * lib/getcwd.c: Likewise.
12418         * lib/getloadavg.c: Likewise.
12419         * lib/mkstemp.c: Likewise.
12420         * lib/mountlist.c, mountlist.h: Likewise.
12421         * lib/openat.c, openat.h: Likewise.
12422         * lib/readlink-stub.c: Likewise.
12423         * lib/readutmp.c, readutmp.h: Likewise.
12424         * lib/rename.c: Likewise.
12425         * lib/rmdir.c: Likewise.
12426         * lib/same.c: Likewise.
12427         * lib/savedir.c: Likewise.
12428         * lib/stripslash.c: Likewise.
12429         * lib/tempname.c: Likewise.
12430         * lib/xreadlink.c: Likewise.
12431         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12432         All uses changed.
12433         * lib/exclude.h: Likewise.
12434
12435         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12436         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12437         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12438         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12439         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12440         files have been getting away with it for years (MORE/BSD 4.3
12441         is extinct now).
12442         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12443         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12444
12445         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12446         Define to 256, not 255, as per modern POSIX.
12447
12448 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12449
12450         Sync from coreutils.
12451         Use "file name" when talking about file names, instead of "filename"
12452         or "path", as per the GNU coding standards.
12453         * MODULES.html.sh: mkdir-p renamed from makepath.
12454         filenamecat renamed from path-concat.
12455         * modules/filenamecat: Renamed from modules/path-concat.
12456         (Files): filenamecat.h and filenamecat.c renamed from
12457         path-concat.h and path-concat.c.
12458         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12459         (Include): filenamecat.h, not path-concat.h.
12460         * modules/mkdir-p: Renamed from modules/makepath.
12461         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12462         makepath.c.
12463         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12464         (Include): mkdir-p.h, not makepath.h.
12465
12466 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12467
12468         Sync from coreutils.
12469         * m4/mkdir-p.m4: Renamed from makepath.m4.
12470         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12471         Rename files from makepath.c to mkdir-p.c, and from
12472         makepath.h to mkdir-p.h.
12473         * m4/filenamecat.m4: Renamed from path-concat.m4.
12474         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12475         Rename files from path-concat.c to filenamecat.c,
12476         and from path-concat.h to filenamecat.h.
12477         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12478         "file name" in local variables or comments.
12479         * m4/rename.m4: Likewise.
12480
12481 2005-06-01  Bruno Haible  <bruno@clisp.org>
12482
12483         * modules/csharpexec: New file.
12484         * MODULES.html.sh (C#): New section.
12485
12486 2005-06-01  Bruno Haible  <bruno@clisp.org>
12487
12488         * m4/csharp.m4: New file, from GNU gettext.
12489         * m4/csharpexec.m4: New file, from GNU gettext.
12490
12491 2005-06-01  Bruno Haible  <bruno@clisp.org>
12492
12493         * lib/csharpexec.h: New file, from GNU gettext.
12494         * lib/csharpexec.c: New file, from GNU gettext.
12495         * lib/csharpexec.sh.in: New file, from GNU gettext.
12496
12497 2005-05-31  Derek Price  <derek@ximbiot.com>
12498             Paul Eggert  <eggert@cs.ucla.edu>
12499
12500         Sync from cvs.
12501         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12502
12503 2005-05-31  Derek Price  <derek@ximbiot.com>
12504             Paul Eggert  <eggert@cs.ucla.edu>
12505
12506         Sync from cvs.
12507         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12508
12509 2005-05-29  Derek Price  <derek@ximbiot.com>
12510
12511         * config/srclist.txt (glob_.h, glob.c): Add these files.
12512
12513 2005-05-29  Derek Price  <derek@ximbiot.com>
12514
12515         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
12516         * modules/glob: New file.
12517         * modules/getlogin_r: Add link to POSIX spec in description.
12518
12519 2005-05-29  Derek Price  <derek@ximbiot.com>
12520             Paul Eggert  <eggert@cs.ucla.edu>
12521
12522         * m4/glob.m4: New file.
12523
12524 2005-05-29  Derek Price  <derek@ximbiot.com>
12525             Paul Eggert  <eggert@cs.ucla.edu>
12526
12527         * lib/glob_.h, lib/glob.c: New files.
12528
12529 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12530
12531         * modules/fts (Files): Remove m4/inttypes-pri.m4.
12532         * modules/fts-lgpl (Depends-on): Remove gettext.
12533
12534 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12535
12536         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
12537         and don't require gt_INTTYPES_PRI.
12538
12539 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12540
12541         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
12542
12543         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
12544         the configuration hassle isn't worth it.
12545         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
12546         (LONGEST_MODIFIER, PRIuMAX): Remove.
12547
12548 2005-05-27  Bruno Haible  <bruno@clisp.org>
12549
12550         * lib/getlogin_r.h: Remove second include of <stddef.h>.
12551
12552 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
12553
12554         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
12555         _POSIX_PTHREAD_SEMANTICS for Solaris.
12556
12557 2005-05-25  Derek Price  <derek@ximbiot.com>
12558
12559         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
12560
12561 2005-05-25  Derek Price  <derek@ximbiot.com>
12562             Paul Eggert  <eggert@cs.ucla.edu>
12563
12564         * modules/getlogin_r, m4/getlogin_r.m4: New files.
12565         * lib/getlogin_r.c, getlogin_r.h: New files.
12566
12567 2005-05-25  Bruno Haible  <bruno@clisp.org>
12568             Derek Price  <derek@ximbiot.com>
12569
12570         * lib/getlogin_r.h: Simplify API documentation.
12571
12572 2005-05-23  Derek Price  <derek@ximbiot.com>
12573
12574         * modules/minmax (Files): Add m4/minmax.m4.
12575         (configure.ac): Add gl_MINMAX.
12576
12577 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
12578
12579         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
12580         so that unistd-safer.h (GPL'ed code) need not be included.
12581
12582 2005-05-22  Bruno Haible  <bruno@clisp.org>
12583
12584         * m4/minmax.m4: New file.
12585         Based on a patch by Derek Price <derek@ximbiot.com>.
12586
12587 2005-05-22  Bruno Haible  <bruno@clisp.org>
12588
12589         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
12590         (INT64_MIN): Fix definition.
12591         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
12592
12593         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
12594         NEED_SIGNED_INT_TYPES.
12595
12596         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
12597         HAVE_SYSTEM_INTTYPES.
12598
12599 2005-05-22  Bruno Haible  <bruno@clisp.org>
12600
12601         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
12602         Also include <sys/param.h> if it defines MIN, MAX.
12603         Based on a patch by Derek Price <derek@ximbiot.com>.
12604
12605 2005-05-21  Jim Meyering  <jim@meyering.net>
12606
12607         * modules/fts (Files): Add m4/inttypes-pri.m4.
12608         (Depends-on): Add lstat and remove gettext.  Alphabetize.
12609
12610 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12611
12612         New fts module.
12613         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
12614         (setup_dir, free_dir): New functions.
12615         (enter_dir, leave_dir): Define trivial
12616         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
12617         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
12618         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
12619         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
12620         Move to fts-cycle.c.
12621         (fts_open): Use setup_dir.
12622         (fts_close): Use free_dir.
12623         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
12624         This adds a label and some gotos, but the alternatives were messier.
12625         Check for memory allocation failure when entering a dir.
12626         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
12627         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
12628         (FTS): New member fts_cycle, that is a union that contains the
12629         old active_dir_ht and cycle_state.  All uses changed to mention
12630         fts_cycle.ht and fts_cycle.state.
12631         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
12632         fts.c, with the following changes:
12633         (setup_dir, free_dir): New functions.
12634         (enter_dir): Now returns bool.  Return true if successful, false
12635         if memory exhausted.  All callers changed.
12636         Do not bother partly cleaning up on
12637         memory allocation failure; that is free_dir's job.
12638         However, free ad if hash_insert fails, to avoid memory leak.
12639         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
12640         fts->fts_options to see which union member to use.
12641
12642 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12643
12644         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
12645         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
12646
12647 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12648
12649         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
12650
12651 2005-05-20  Jim Meyering  <jim@meyering.net>
12652
12653         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
12654         Now a macro, to pacify GCC.
12655
12656 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12657
12658         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
12659         of -1.
12660
12661 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12662
12663         * lib/chown.c (rpl_chown): Return -1 on failure.
12664
12665 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12666
12667         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
12668         Don't check for stddef.h.
12669         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
12670         don't use its results.
12671         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
12672         since we include them unconditionally.  Don't require
12673         AM_STDBOOL_H, since stdbool is a prerequisite.
12674         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
12675         since we assume C89 or better.
12676         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
12677         as we don't use their results.
12678         Don't check for fchdir, memmove, memset, strrchr, as we use
12679         them unconditionally.
12680         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
12681         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
12682
12683 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12684
12685         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
12686         Include <stddef.h> unconditionally, since we assume C89 now.
12687         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
12688         * lib/fts.c: Include fts_.h first, to check interface.
12689         Do not include intprops.h; no longer needed.
12690         Include cycle-check.h and hash.h, since fts_.h no longer does.
12691         Remove unnecessary casts of closedir to void.
12692         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
12693         decide whether to decrement nlinks.
12694         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
12695         (FTS): Use struct hash_table * instead of Hash_table, so that
12696         we no longer need to include hash.h here.
12697
12698 2005-05-18  Jim Meyering  <jim@meyering.net>
12699
12700         * modules/dirfd (License): Change to LGPL.  Most of the code
12701         is already in the public domain.
12702
12703 2005-05-18  Jim Meyering  <jim@meyering.net>
12704
12705         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
12706         Reported by Yoann Vandoorselaere.
12707
12708 2005-05-17  Jim Meyering  <jim@meyering.net>
12709
12710         * m4/fts.m4: New file, from coreutils.
12711
12712 2005-05-17  Jim Meyering  <jim@meyering.net>
12713
12714         * lib/fts.c, lib/fts_.h: New files, from coreutils.
12715
12716 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12717
12718         Sync from coreutils.
12719         * m4/unlinkdir.m4: New file.
12720
12721 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12722
12723         Sync from coreutils.
12724         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
12725         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
12726         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
12727         White space changes only.
12728         * lib/makepath.c (make_path): Port to hosts where leading "//" is
12729         special.
12730         * lib/yesno.c: Include getline.h, not ctype.h.
12731         (yesno): Don't remove leading white space; POSIX doesn't allow it.
12732         Use getline to remove arbitrary restriction on response length.
12733
12734 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12735
12736         * config/srclist-update: Spell out "Street" in FSF postal
12737         mail address; this is the style the FSF seems to prefer.
12738
12739         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
12740         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
12741         this updates FSF postal mail address.
12742
12743         Sync from coreutils.
12744         * modules/unlinkdir: New file.
12745         * modules/yesno (Depends-on): Add getline.
12746         * MODULES.html.sh (File system functions): Add unlinkdir.
12747
12748 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12749
12750         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
12751         lib/strsep.h:
12752         Change the initial comment to refer to GPL, not LGPL.
12753         gnulib-tool will change it to LGPL as needed.
12754
12755         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
12756         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
12757         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
12758         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
12759         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
12760         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
12761         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
12762         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
12763         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
12764         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
12765         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
12766         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
12767         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
12768         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
12769         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
12770         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
12771         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
12772         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
12773         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
12774         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
12775         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
12776         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
12777         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
12778         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
12779         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
12780         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
12781         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
12782         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
12783         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
12784         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
12785         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
12786         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
12787         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
12788         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
12789         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
12790         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
12791         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
12792         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
12793         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
12794         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
12795         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
12796         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
12797         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
12798         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
12799         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
12800         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
12801         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
12802         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
12803         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
12804         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
12805         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
12806         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
12807         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
12808         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
12809         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
12810         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
12811         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
12812         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
12813         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
12814         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
12815         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
12816         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
12817         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
12818         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
12819         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
12820         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
12821         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
12822         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
12823         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
12824         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
12825         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
12826         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
12827         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
12828         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
12829         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
12830         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
12831         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
12832         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
12833         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
12834         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
12835         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
12836         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
12837         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
12838         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
12839         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
12840         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
12841         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
12842         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
12843         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
12844         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
12845         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
12846         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
12847         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
12848         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
12849         lib/yesno.c, lib/yesno.h:
12850         Update FSF postal mail address.
12851
12852 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12853
12854         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
12855         tests/test-memmem.c, tests/test-stpncpy.c:
12856         Update FSF postal mail address.
12857
12858 2005-05-13  Bruno Haible  <bruno@clisp.org>
12859
12860         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
12861         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
12862         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
12863         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
12864         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
12865         Add support for 64-bit integers in the MSVC compiler.
12866
12867 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12868
12869         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
12870
12871 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
12872
12873         * gnulib-tool (func_import): Sort and uniquify recommended includes.
12874
12875 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
12876
12877         * doc/getdate.texi (General date syntax): Don't say that date
12878         date --iso-8601=ns generates acceptable dates; it doesn't yet.
12879         Problem reported by Nic Ferrier.
12880
12881 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12882
12883         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
12884         specified in ai_socktype. Fix invalid ai_protocol
12885         check. ai_protocol is usually set to 0 or depending on
12886         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
12887         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
12888         ai_socktype / ai_protocol in the returned addrinfo structure.
12889
12890 2005-05-10  Simon Josefsson  <jas@extundo.com>
12891
12892         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
12893         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12894
12895 2005-05-10  Karl Berry  <karl@gnu.org>
12896
12897         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
12898         (from http://www.gnu.org/licenses).
12899         * doc/COPYING.LIB: also rename to COPYING.LESSER.
12900         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
12901         fdl.texi suffices.
12902
12903 2005-05-10  Karl Berry  <karl@gnu.org>
12904
12905         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
12906         (COPYING.DOC): remove.
12907
12908         * config/srclist-update: new FSF address.
12909
12910 2005-05-10  Derek Price  <derek@ximbiot.com>
12911
12912         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
12913         possible.
12914
12915 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12916             Bruno Haible  <bruno@clisp.org>
12917
12918         * modules/inet_ntop: New file.
12919         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12920         inet_ntop.
12921
12922 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12923             Bruno Haible  <bruno@clisp.org>
12924
12925         * m4/inet_ntop.m4: New file.
12926
12927 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
12928             Bruno Haible  <bruno@clisp.org>
12929
12930         * lib/inet_ntop.h: New file.
12931         * lib/inet_ntop.c: New file, from glibc with modifications.
12932
12933 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
12934
12935         * modules/time_r (License): Change to LGPL.
12936         * modules/extensions (License): Change to LGPL.  Actually,
12937         the license is more permissive than that, but currently gnulib-tool
12938         doesn't know how to handle more-permissive licenses.
12939
12940         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
12941         Problem reported by Dave Love.
12942
12943 2005-05-08  Jim Meyering  <jim@meyering.net>
12944
12945         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
12946         blank.
12947
12948 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
12949
12950         * modules/argmatch (Depends-on): Add stdbool.
12951         * modules/backupfile (Depends-on): Likewise.
12952         * modules/chdir-long (Depends-on): Likewise.
12953         * modules/closeout (Depends-on): Likewise.
12954         * modules/cycle-check (Depends-on): Likewise.
12955         * modules/dirname (Depends-on): Likewise.
12956         * modules/fnmatch (Depends-on): Likewise.
12957         * modules/fsusage (Depends-on): Likewise.
12958         * modules/fwriteerror (Depends-on): Likewise.
12959         * modules/getcwd (Depends-on): Likewise.
12960         * modules/getloadavg (Depends-on): Likewise.
12961         * modules/hard-locale (Depends-on): Likewise.
12962         * modules/makepath (Depends-on): Likewise.
12963         * modules/mountlist (Depends-on): Likewise.
12964         * modules/nanosleep (Depends-on): Likewise.
12965         * modules/posixtm (Depends-on): Likewise.
12966         * modules/quotearg (Depends-on): Likewise.
12967         * modules/readtokens (Depends-on): Likewise.
12968         * modules/readtokens0 (Depends-on): Likewise.
12969         * modules/readutmp (Depends-on): Likewise.
12970         * modules/save-cwd (Depends-on): Likewise.
12971         * modules/strftime (Depends-on): Likewise.
12972         * modules/userspec (Depends-on): Likewise.
12973         * modules/utimecmp (Depends-on): Likewise.
12974         * modules/xgetcwd (Depends-on): Likewise.
12975         * modules/xnanosleep (Depends-on): Likewise.
12976         * modules/xstrtod (Depends-on): Likewise.
12977         * modules/yesno (Depends-on): Likewise.
12978
12979 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
12980
12981         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
12982         needless checks.
12983
12984 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12985
12986         Merge from coreutils.  Among other things,
12987         add bulletproofing for cases where stdin, stdout, or stderr are closed.
12988         * lib/fd-safer.c: New file.
12989         * lib/fcntl-safer.h, open-safer.c: Remove.
12990         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
12991         * lib/dup-safer.c: Include unistd-safer.h first.
12992         Don't include errno.h.
12993         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
12994         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
12995         * lib/file-type.c: Rely on file-type.h change.
12996         * lib/getloadavg.c: Include unistd-safer.h.
12997         (getloadavg): Use safer open.
12998         * lib/getusershell.c: Include "stdio-safer.h".
12999         (getusershell): Use safer fopen.
13000         * lib/long-options.c (long_options): Use NULL rather than 0.
13001         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13002         'free'.
13003         * lib/modechange.c: Likewise.
13004         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13005         (MODE_DONE): New constant.
13006         (struct mode_change): Remove 'next' member.
13007         (make_node_op_equals): New function; like the old one of the
13008         same name, except it allocates an array.
13009         (mode_compile, mode_create_from_ref): Use it.
13010         (mode_compile): Allocate result as an array, not a linked list.
13011         Parse octal string ourself, so that we catch mistakes like "+0".
13012         (mode_adjust): Arg is an array, not a linked list.
13013         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13014         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13015         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13016         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13017         Remove.  This is now stat-macros.h's job.
13018         (talloc): Remove.  All callers replaced by xalloc, so that
13019         our invokers don't have to worry about reporting memory failures.
13020         (make_node_op_equals): Remove.
13021         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13022         New constants.
13023         (struct mode_change): Moved here from modechange.h.
13024         (mode_append_entry): Remove.
13025         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13026         apps to have incorrect behavior.  Use simpler algorithm for head
13027         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13028         Detect more invalid usages rather than having somewhat-random behavior.
13029         Don't insert an "a=" action, as that leads to incorrect behavior.
13030         (mode_compile, mode_create_from_ref): Return NULL on error instead
13031         of an enum, since now there's only one way to have an error.  All
13032         callers changed.
13033         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13034         at the correct time.  Simplify calculation of "+u" and its ilk.
13035         Don't mishandle "+X".
13036         (mode_free): Remove "register" and localize decls.
13037         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13038         (struct mode_change): Move to modechange.c; callers don't
13039         need to see this stuff.
13040         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13041         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13042         (mode_change, mode_adjust): Reflect the new signatures noted above.
13043         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13044         that might redefine system include files.
13045         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13046         (my_usleep): Use NULL rather than (void *) 0.
13047         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13048         Use siginterrupt to specify that system calls should be interrupted.
13049         (rpl_nanosleep): Move initialization of suspended closer to call of
13050         my_usleep.
13051         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13052         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13053         (desirable_utmp_entry): New function.
13054         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13055         using x2nrealloc, to simplify logic.
13056         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13057         size calculation.  Do not assume utmp file is a regular file.
13058         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13059         (READ_UTMP_CHECK_PIDS): New constant.
13060         * lib/save-cwd.c: Include unistd-safer.h.
13061         (save_cwd): Use fd_safer.
13062         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13063         [!_LIBC] Include "stat-macros.h" instead.
13064         * lib/unistd-safer.h (fd_safer): New decl.
13065
13066 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13067
13068         * modules/getloadavg (Depends-on): Add unistd-safer.
13069         * modules/getusershell (Depends-on): Add stdio-safer.
13070         * modules/lstat (Depends-on): Remove xalloc.
13071         * modules/mkstemp (Depends-on): Add stat-macros.
13072         * modules/modechange (Depends-on): Remove xstrtol.
13073         Add stat-macros, xalloc.
13074         * modules/save-cwd (Depends-on): Add unistd-safer.
13075         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13076         * modules/unistd-safer (Files): Add lib/fd-safer.c
13077         (Makefile.am): Remove lib_SOURCES.
13078
13079         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13080         Remove fcntl-safer; unistd-safer supersedes it.
13081
13082 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13083
13084         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13085         AC_HEADER_STAT.
13086         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13087         (gl_PREREQ_CHOWN): Remove.
13088         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13089         it.  Don't require AC_HEADER_STAT.
13090         (gl_PREREQ_LSTAT): Remove.
13091         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13092         Don't require AC_HEADER_STAT.
13093         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13094         (gl_PREREQ_RMDIR): Remove.
13095         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13096         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13097         the stat-macros module a prerequisite.
13098         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13099         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13100         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13101         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13102         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13103         variable names.
13104         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13105         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13106         variable prefixes.
13107         * m4/fcntl-safer.m4: Remove.
13108         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13109         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13110         Invoke gl_PREREQ_FD_SAFER.
13111         (gl_PREREQ_FD_SAFER): New macro.
13112         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13113         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13114         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13115         Remove duplicate call to AC_LIBOBJ(readutmp).
13116         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13117
13118         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13119         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13120
13121 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13122
13123         * MODULES.html.sh (Misc): Add byteswap.
13124
13125 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13126
13127         * modules/getcwd (Depends-on): Add extensions.
13128         * modules/openat (Depends-on): Likewise.
13129
13130 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13131
13132         * modules/byteswap: New file.
13133
13134 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13135
13136         * m4/byteswap.m4: New file.
13137
13138 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13139
13140         * lib/byteswap_.h: New file.
13141
13142 2005-04-25  Karl Berry  <karl@gnu.org>
13143
13144         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13145
13146 2005-04-25  Albert Chin  <china@thewrittenword.com>
13147
13148         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13149         Toolkit C bug.
13150
13151 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13152
13153         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13154         (func_ln_if_changed) Remove forcibly for no error message
13155         in case file does not exist.
13156
13157 2005-04-19  Simon Josefsson  <jas@extundo.com>
13158
13159         * gnulib-tool (Options): Make --symlink mean --symbolic.
13160
13161 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13162
13163         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13164
13165 2005-04-16  Simon Josefsson  <jas@extundo.com>
13166
13167         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13168
13169 2005-04-15  Simon Josefsson  <jas@extundo.com>
13170
13171         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13172
13173 2005-04-15  Simon Josefsson  <jas@extundo.com>
13174
13175         * gnulib-tool: Rename --symlink to --symbolic.
13176
13177 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13178
13179         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13180         symbolic links to files instead of copying/moving.  Add --aux-dir,
13181         specifying directory relative --dir where auxiliary build tools
13182         are placed.
13183
13184 2005-04-14  Bruno Haible  <bruno@clisp.org>
13185
13186         * modules/allocsa (License): Change to LGPL.
13187         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13188
13189 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13190
13191         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13192         that "UTC +1 second" continues to work.  Problem reported
13193         by Dmitry V. Levin.
13194         (relunit_snumber): New rule.
13195         (relunit): Use it.
13196
13197 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13198
13199         * lib/getdate.y (universal_time_zone_table): New constant.
13200         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13201         universal_time_zone_table.
13202         (lookup_zone): Prefer universal_time_zone_table to
13203         local_time_zone_table, so that "GMT" time stamps are allowed in
13204         London during the summer.  Problem reported by Ian Abbott.
13205
13206 2005-04-12  Jim Meyering  <jim@meyering.net>
13207
13208         * lib/human.c (humblock): Set *options even when returning due to
13209         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13210         warning from gcc-4.
13211
13212 2005-04-09  Jim Meyering  <jim@meyering.net>
13213
13214         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13215         -Wuninitialized: initialize tm0.tm_year.
13216
13217 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13218
13219         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13220         count, since there's no maximum.  All uses changed.
13221         Add member dsts_seen.
13222         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13223         not being INT_MAX.
13224         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13225         Use pc_rels_seen to decide whther a date is absolute.
13226
13227         * lib/getdate.y (number): Don't overwrite year.
13228         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13229         check.
13230
13231 2005-04-02  Simon Josefsson  <jas@extundo.com>
13232
13233         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13234         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13235
13236 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13237
13238         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13239         where no absolute path name can be longer than PATH_MAX.
13240
13241 2005-03-27  Jim Meyering  <jim@meyering.net>
13242
13243         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13244
13245 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13246
13247         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13248         "one's complement" -> "ones' complement" in comment, as per Knuth.
13249         "value of type" -> "type or expression" in comment.
13250         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13251
13252 2005-03-26  Jim Meyering  <jim@meyering.net>
13253
13254         Comment nits.
13255         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13256         Correct typos: s/or/of/.
13257
13258 2005-03-26  Jim Meyering  <jim@meyering.net>
13259
13260         * modules/check-include-files: Move to ../ and rename to...
13261         * check-module: ...this.
13262
13263 2005-03-25  Jim Meyering  <jim@meyering.net>
13264
13265         * modules/xvasprintf (Files): Add xalloc.h.
13266
13267 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13268
13269         * modules/gettext (Files): config/config.rpath ->
13270         build-aux/config.rpath
13271         * modules/iconv (Files): Likewise.
13272         Problem reported by Oskar Liljeblad.
13273
13274 2005-03-23  Jim Meyering  <jim@meyering.net>
13275
13276         * modules/check-include-files: New script to check for
13277         missing dependencies, multiple includes, etc.
13278
13279         * modules/c-strtold (Depends-on): Add xalloc.
13280         * modules/c-strtod (Depends-on): Add xalloc.
13281         * modules/hash (Depends-on): Add xalloc.
13282         (Files): Remove lib/xalloc.h.
13283
13284         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13285         * modules/userspec (Files): Add lib/inttostr.h.
13286
13287 2005-03-23  Jim Meyering  <jim@meyering.net>
13288
13289         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13290
13291 2005-03-22  Jim Meyering  <jim@meyering.net>
13292
13293         * modules/stat-macros: New module.
13294         * modules/canonicalize, modules/euidaccess, modules/file-type,
13295         * modules/filemode, modules/lchown, modules/makepath,
13296         * modules/rmdir, modules/stat: Depend on new stat-macros module
13297         rather than listing lib/stat-macros.h manually.
13298         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13299
13300 2005-03-22  Jim Meyering  <jim@meyering.net>
13301
13302         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13303
13304 2005-03-22  Bruno Haible  <bruno@clisp.org>
13305
13306         * config/srclist.txt: Replace target directory 'config' with
13307         'build-aux'.
13308         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13309         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13310         ../build-aux/.
13311
13312 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13313
13314         * modules/chdir-long (Depends-on): Add mempcpy.
13315
13316         * modules/acl, modules/backupfile, modules/c-strtod,
13317         modules/c-strtold, modules/canon-host, modules/canonicalize,
13318         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13319         modules/exclude, modules/exitfail, modules/file-type,
13320         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13321         modules/getdate, modules/getline, modules/getpagesize,
13322         modules/getpass, modules/getugroups, modules/group-member,
13323         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13324         modules/inttostr, modules/long-options, modules/makepath,
13325         modules/md5, modules/memcasecmp, modules/memcoll,
13326         modules/modechange, modules/mountlist, modules/path-concat,
13327         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13328         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13329         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13330         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13331         modules/strftime, modules/strndup, modules/strverscmp,
13332         modules/timespec, modules/unlocked-io, modules/userspec,
13333         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13334         modules/yesno:
13335         Remove lib_SOURCES line from Makefile.am section, as this is now
13336         done automatically by the corresponding Autoconf macro.
13337
13338 2005-03-21  Jim Meyering  <jim@meyering.net>
13339
13340         Changes imported from coreutils.
13341
13342         * lib/cycle-check.c: Don't include xalloc.h.
13343
13344         * lib/path-concat.c: Don't include assert.h.
13345         (path_concat): Remove assertion that would have triggered
13346         for ABASE starting with more than one slash.
13347         Reported by Andreas Schwab.
13348
13349         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13350         properly when ABASE is an absolute file name.
13351         Correct the description of this function.
13352         Include <assert.h>.
13353         Add an assertion and a test driver.
13354         This fixes a bug introduced on 2004-07-02.
13355         Andreas Schwab reported the resulting failure of cp --parents:
13356         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13357
13358 2005-03-21  Jim Meyering  <jim@meyering.net>
13359
13360         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13361         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13362
13363 2005-03-21  Jim Meyering  <jim@meyering.net>
13364         and  Paul Eggert  <eggert@cs.ucla.edu>
13365
13366         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13367         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13368         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13369         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13370         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13371         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13372         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13373         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13374         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13375         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13376         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13377         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13378         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13379         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13380         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13381         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13382         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13383         for these modules.
13384
13385 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13386
13387         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13388         (which shouldn't happen), generate nothing instead of returning 0
13389         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13390
13391 2005-03-16  Bruno Haible  <bruno@clisp.org>
13392
13393         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13394         HAVE_LONGLONG_64BIT.
13395
13396 2005-03-16  Bruno Haible  <bruno@clisp.org>
13397
13398         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13399         HAVE_LONGLONG_64BIT.
13400
13401 2005-03-16  Bruno Haible  <bruno@clisp.org>
13402
13403         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13404         HAVE_LONGLONG_64BIT.
13405
13406 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13407
13408         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13409         reliably distinguish strftime failure from empty output on POSIX
13410         hosts.
13411
13412 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13413
13414         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13415         (iconv_string): Don't guess a size-zero buffer, as that might cause
13416         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13417         result would be 'too large', where 'too large' is (heuristically)
13418         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13419         overflow concerns.  This will prevent some unwanted malloc failures
13420         when the inputs are very large.
13421
13422 2005-03-15  Karl Berry  <karl@gnu.org>
13423
13424         * config/srclist.txt (config.rpath): from gettext.
13425         * config/config.rpath: update.
13426
13427 2005-03-15  Bruno Haible  <bruno@clisp.org>
13428
13429         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13430         to 'negate'.
13431
13432         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13433         variable.
13434
13435         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13436         results.
13437
13438 2005-03-14  Simon Josefsson  <jas@extundo.com>
13439
13440         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13441         <fx@gnu.org>.
13442
13443 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13444
13445         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13446         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13447         intprops.h.
13448         * lib/strtol.c: Likewise.
13449
13450 2005-03-14  Jim Meyering  <jim@meyering.net>
13451
13452         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13453         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13454         to be nonzero so that we (and caller) can detect the difference
13455         between a valid zero-length expansion and an error return, even
13456         when the underlying strftime fails before writing anything into
13457         that location.
13458
13459 2005-03-14  Bruno Haible  <bruno@clisp.org>
13460
13461         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13462         Update from GNU gettext 0.14.3.
13463
13464 2005-03-10  Jim Meyering  <jim@meyering.net>
13465
13466         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13467
13468 2005-03-10  Jim Meyering  <jim@meyering.net>
13469
13470         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13471         so that this module works on systems without fchdir.
13472
13473 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13474
13475         Factor int-properties macros into a single file, except for
13476         glibc-related files.
13477         * lib/intprops.h: New file.
13478         * lib/getloadavg.c: Include it instead of limits.h.
13479         (INT_STRLEN_BOUND): Remove.
13480         * lib/human.c: Include intprops.h.
13481         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13482         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13483         302/1000.
13484         * lib/inttostr.h: Include intprops.h instead of limits.h.
13485         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13486         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13487         for consistency with intprops.h.
13488         (time_t_is_integer, twos_complement_arithmetic): Use them.
13489         * lib/sig2str.h: Include <signal.h>, intprops.h.
13490         (INT_STRLEN_BOUND): Remove.
13491         * lib/strftime.c (TYPE_SIGNED): Remove.
13492         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13493         * lib/strtol.c: Adjust comments to match intprops.h.
13494         * lib/userspec.c: Include intprops.h.
13495         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13496         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13497         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13498         instead of rolling our own expressions.
13499         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13500
13501         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
13502         instead of int.
13503         (my_strftime): Do not mishandle years close to INT_MAX, by doing
13504         the right thing even if adding 1900 would overflow.  Similarly
13505         for tm_mon + 1 and tm_yday + 1.
13506         Make %Y always equivalent to %C%y, and similarly for %G and %g.
13507         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
13508         (DO_SIGNED_NUMBER): New macro.
13509         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
13510
13511 2005-03-07  Bruno Haible  <bruno@clisp.org>
13512
13513         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
13514
13515 2005-03-07  Bruno Haible  <bruno@clisp.org>
13516
13517         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
13518
13519 2005-03-04  Derek R. Price  <derek@ximbiot.com>
13520
13521         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
13522         (func_import): Only replace files via --import when they have actually
13523         changed.
13524
13525 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13526
13527         * m4/mmap-anon.m4: New file.
13528         * m4/pagealign_alloc.m4: New file.
13529
13530 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13531             Bruno Haible  <bruno@clisp.org>
13532
13533         * modules/pagealign_alloc: New file.
13534         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
13535
13536 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13537             Bruno Haible  <bruno@clisp.org>
13538
13539         * lib/pagealign_alloc.h: New file.
13540         * lib/pagealign_alloc.c: New file.
13541
13542 2005-03-03  Bruno Haible  <bruno@clisp.org>
13543
13544         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
13545         Use an all-permissive copyright notice, recommended by RMS.
13546
13547 2005-03-02  Bruno Haible  <bruno@clisp.org>
13548
13549         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
13550         of AIX, the replacement has to be done only after <string.h> is
13551         included, therefore not in config.h. stpncpy.h does the replacement,
13552         and stpncpy.c uses it.
13553
13554 2005-03-02  Bruno Haible  <bruno@clisp.org>
13555
13556         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
13557         stpncpy.c uses it.
13558
13559 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13560
13561         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
13562         The workaround isn't strictly needed for POSIX conformance, and
13563         it's too much of a pain to configure and maintain.  We'll ask
13564         people to fix their kernels instead.
13565         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
13566         (NANOSLEEP_BUG_WORKAROUND): Remove.
13567         (xnanosleep): Remove the workaround.
13568
13569 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13570
13571         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
13572         Reported by Derek Price.
13573         (Include): Add "timespec.h".
13574
13575         * modules/xnanosleep (Depends-on): Remove gethrxtime.
13576
13577 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13578
13579         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
13580         to detect nanosleep bug.
13581
13582 2005-03-01  Bruno Haible  <bruno@clisp.org>
13583
13584         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
13585
13586 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
13587
13588         * modules/gethrxtime: New file.
13589         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
13590         (Depends-on): Add gethrxtime.
13591         (configure.ac): Add gl_XNANOSLEEP.
13592         (Makefile.am): Remove lib_SOURCES line.
13593
13594 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13595
13596         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
13597         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
13598
13599 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13600
13601         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
13602         * lib/timespec.h (gettime): Return void, since it always
13603         succeeds now.  All uses changed.
13604         * lib/gettime.c (gettime) Likewise.
13605         [HAVE_NANOTIME]: Prefer nanotime.
13606         Assume gettimeofday succeeds, as POSIX requires.
13607         Assime time () succeeds, since other code already does.
13608         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
13609         (timespec_subtract): Remove.
13610         (NANOSLEEP_BUG_WORKAROUND): New constant.
13611         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
13612         things considerably.  Use it only on GNU/Linux hosts, since the
13613         workaround shouldn't be needed elsewhere.
13614
13615 2005-02-24  Bruno Haible  <bruno@clisp.org>
13616
13617         * modules/gettext (Files): Add m4/glibc2.m4.
13618
13619 2005-02-24  Bruno Haible  <bruno@clisp.org>
13620
13621         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
13622         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
13623         * m4/progtest.m4:
13624         Update from GNU gettext 0.14.2.
13625         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
13626
13627 2005-02-24  Bruno Haible  <bruno@clisp.org>
13628
13629         * lib/localcharset.c: Update from GNU gettext 0.14.2.
13630         * lib/config.charset: Update from GNU gettext 0.14.2.
13631
13632 2005-02-24  Bruno Haible  <bruno@clisp.org>
13633
13634         * lib/gettext.h: Update from GNU gettext 0.14.2.
13635
13636 2005-02-23  Simon Josefsson  <jas@extundo.com>
13637
13638         * m4/iconvme.m4: New file.
13639
13640 2005-02-23  Jim Meyering  <jim@meyering.net>
13641
13642         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
13643         change.
13644         Thanks to Bruno Haible for catching it.
13645
13646 2005-02-22  Simon Josefsson  <jas@extundo.com>
13647
13648         * modules/iconvme: New file.
13649
13650         * MODULES.html.sh: Add iconvme.
13651
13652 2005-02-22  Simon Josefsson  <jas@extundo.com>
13653
13654         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
13655
13656 2005-02-22  Simon Josefsson  <jas@extundo.com>
13657
13658         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
13659
13660 2005-02-22  Jim Meyering  <jim@meyering.net>
13661
13662         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
13663         s/ifndef/ifdef/.
13664
13665 2005-02-20  Neil Conway  <neilc@samurai.com>
13666
13667         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
13668         returned by OSX/Darwin if the specified buffer is not large
13669         enough for the hostname.
13670
13671 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13672
13673         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
13674         pass it to _help, otherwise the latter coredumps trying to
13675         dereference state.root_argp.
13676
13677 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13678
13679         * modules/chdir-long (Depends-on): Add memrchr.
13680         * modules/memrchr (Files): Add lib/memrchr.h.
13681         (Include): "memrchr.h".
13682
13683 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13684
13685         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
13686
13687 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13688
13689         * lib/memrchr.h: New file.
13690         * lib/chdir-long.c: Include it.
13691         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
13692         Don't bother including stddef.h.
13693
13694 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
13695
13696         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
13697         inclusion.
13698         Include <sys/types.h>, for dev_t.
13699         (ME_DUMMY, ME_REMOTE): Move from here....
13700         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
13701         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
13702         Dmitry V. Levin.
13703         Include mountlist.h first, to test the interface.
13704
13705 2005-01-29  Bruno Haible  <bruno@clisp.org>
13706
13707         * lib/progname.c (program_name): Initialize.
13708         Needed when linking statically on MacOS X.
13709
13710 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13711
13712         Sync from coreutils.
13713         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
13714         (Depends-on): Add c-strtod.
13715         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
13716
13717 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13718
13719         Sync from coreutils.
13720         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
13721
13722         Remove files that are specific to coreutils.
13723         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
13724
13725 2005-01-28  Bruno Haible  <bruno@clisp.org>
13726
13727         * modules/javacomp: New file.
13728         * MODULES.html.sh (Java): Add javacomp.
13729
13730 2005-01-28  Bruno Haible  <bruno@clisp.org>
13731
13732         * m4/javacomp.m4: New file, from GNU gettext.
13733
13734 2005-01-28  Bruno Haible  <bruno@clisp.org>
13735
13736         * lib/javacomp.sh.in: New file, from GNU gettext.
13737         * lib/javacomp.h: New file, from GNU gettext.
13738         * lib/javacomp.c: New file, from GNU gettext.
13739
13740 2005-01-26  Simon Josefsson  <jas@extundo.com>
13741
13742         * lib/gai_strerror.c: Use GPL in header.
13743
13744 2005-01-26  Bruno Haible  <bruno@clisp.org>
13745
13746         * modules/javaexec: New file.
13747         * MODULES.html.sh (Java): Add javaexec.
13748
13749 2005-01-26  Bruno Haible  <bruno@clisp.org>
13750
13751         * m4/javaexec.m4: New file, from GNU gettext.
13752
13753 2005-01-26  Bruno Haible  <bruno@clisp.org>
13754
13755         * lib/javaexec.sh.in: New file, from GNU gettext.
13756         * lib/javaexec.h: New file, from GNU gettext.
13757         * lib/javaexec.c: New file, from GNU gettext.
13758
13759 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13760
13761         * modules/lchown (Depends-on): Remove lchown.h
13762
13763 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13764
13765         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
13766         must be defined if the header file was not found, in order
13767         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
13768
13769 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13770
13771         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
13772         initializers for struct pentry_state.
13773         (__argp_error): Check return value of __asprintf
13774         (__argp_failure): Translate error message
13775
13776         * lib/argp-parse.c: Removed braces around the expansion of N_()
13777
13778 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13779
13780         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
13781         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
13782         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
13783         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
13784         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
13785         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
13786         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
13787         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
13788         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
13789         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
13790         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
13791         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
13792         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
13793         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
13794         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
13795         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
13796         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
13797         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
13798         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
13799         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
13800         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
13801         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
13802         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
13803         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
13804         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
13805         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
13806         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
13807         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
13808         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
13809         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
13810         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
13811         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
13812         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
13813         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
13814         xstrtol.m4, xstrtoumax.m4, yesno.m4:
13815         Use an all-permissive copyright notice, recommended by RMS.
13816
13817 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
13818
13819         * modules/chdir-long (Depends-on): Remove mempcpy.
13820
13821 2005-01-21  Jim Meyering  <jim@meyering.net>
13822
13823         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
13824         same value as for Solaris 9.
13825
13826         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
13827         component length.  This included changing the parameter to be
13828         of type `char *' rather than `char const *'.
13829         * lib/chdir-long.h (chdir_long): Update prototype.
13830
13831         * lib/openat.c (fdopendir, fstatat): New functions.
13832         * lib/openat.h: Include headers required for use of DIR and struct
13833         stat.
13834         [AT_SYMLINK_NOFOLLOW]: Define.
13835         (fdopendir, fstatat): Add prototypes.
13836
13837 2005-01-21  Bruno Haible  <bruno@clisp.org>
13838
13839         * modules/classpath: New file.
13840         * MODULES.html.sh (Java): Add classpath.
13841
13842 2005-01-21  Bruno Haible  <bruno@clisp.org>
13843
13844         * lib/classpath.h: New file, from GNU gettext.
13845         * lib/classpath.c: New file, from GNU gettext.
13846
13847 2005-01-20  Simon Josefsson  <jas@extundo.com>
13848
13849         * modules/version-etc-fsf: New file.
13850
13851 2005-01-20  Simon Josefsson  <jas@extundo.com>
13852
13853         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
13854         * lib/version-etc.c: Remove version_etc_copyright.
13855         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
13856         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
13857
13858 2005-01-20  Simon Josefsson  <jas@extundo.com>
13859
13860         * lib/base64.h (isbase64): Add.
13861
13862         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
13863         using a unsigned prototype, don't inline.
13864         (base64_decode): Use it.
13865
13866 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13867
13868         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
13869         it.
13870
13871 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13872
13873         * lib/save-cwd.c (save_cwd): Remove code to support the case
13874         where fchdir is missing or flaky.
13875
13876 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
13877
13878         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
13879
13880 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
13881
13882         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
13883         AC_LIBSOURCES now does this.
13884         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
13885         with new ullong_max module.
13886
13887 2005-01-19  Bruno Haible  <bruno@clisp.org>
13888
13889         * modules/sh-quote: New file.
13890         * MODULES.html.sh (Executing programs): Add sh-quote.
13891
13892 2005-01-19  Bruno Haible  <bruno@clisp.org>
13893
13894         * lib/sh-quote.h: New file, from GNU gettext.
13895         * lib/sh-quote.c: New file, from GNU gettext.
13896
13897 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13898
13899         Merge from coreutils.
13900         * m4/ullong_max.m4: New file.
13901         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
13902         (gl_MACROS): Assume localeconv exists.
13903
13904 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13905
13906         Merge changes from coreutils, as described below in several
13907         changelogs dated today.
13908
13909         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
13910         (O_DIRECTORY): Remove; not needed here, since "." must be
13911         a directory.  All uses removed.
13912         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
13913         universal on Suns, and we also need to test for IRIX.
13914         Revamp code to use 'if' rather than '#if'.
13915         Avoid unnecessary comparison of cwd->desc to 0.
13916
13917         * lib/utimens.c (futimens): Robustify the previous patch, by checking
13918         for known valid error numbers rather than observed invalid ones.
13919
13920 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
13921
13922         * modules/ullong_max: New file.
13923
13924         * modules/chdir-long, modules/openat: New files.
13925         * modules/save-cwd (Depends-on): Depend on chdir-long.
13926         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
13927
13928 2005-01-18  Jim Meyering  <jim@meyering.net>
13929
13930         Merge from coreutils.
13931         * m4/chdir-long.m4, m4/openat.m4: New files.
13932         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
13933         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
13934         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
13935         is sane and DOES follow symlinks.  Besides, testing 20 different
13936         systems found no broken chown implementations.
13937         Prompted by a change in rsync's copy of this macro.
13938         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
13939
13940         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
13941
13942         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
13943         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
13944         NULL-means-set-to-current-time semantics.
13945         Remove temporary file immediately, rather than waiting
13946         for configure's at-exit trap code to do it.
13947
13948 2005-01-18  Jim Meyering  <jim@meyering.net>
13949
13950         * lib/version-etc.c (version_etc_copyright): Update copyright date.
13951
13952         * lib/utimens.c (futimens): Account for the fact that futimes
13953         can also fail with errno == ENOSYS or errno == ENOENT.
13954         Patch from Dmitry V. Levin.
13955
13956         Change the name of the robust chdir function from chdir to chdir_long.
13957         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
13958         (restore_cwd): Use chdir_long, not chdir.
13959         * lib/chdir-long.c: Renamed from chdir.c.
13960         * lib/chdir-long.h: Renamed from chdir.h.
13961         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
13962         Hurd.
13963
13964 2005-01-18  Bruno Haible  <bruno@clisp.org>
13965
13966         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
13967         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
13968         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
13969         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
13970         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
13971         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
13972         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
13973         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
13974         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
13975         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
13976         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
13977         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
13978         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
13979         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
13980         Use an all-permissive copyright notice, recommended by RMS.
13981
13982 2005-01-18  Bob Proulx  <bob@proulx.com>
13983
13984         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
13985         simplify offsetof() macro construct to avoid compile failure with
13986         native HP-UX 11.0 ANSI C compiler.
13987
13988 2005-01-17  Bruno Haible  <bruno@clisp.org>
13989
13990         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
13991         redundant because stpncpy.m4 takes care of it.
13992
13993 2005-01-17  Bruno Haible  <bruno@clisp.org>
13994
13995         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
13996
13997 2005-01-17  Bruno Haible  <bruno@clisp.org>
13998
13999         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14000         used.
14001
14002 2005-01-17  Bruno Haible  <bruno@clisp.org>
14003
14004         * lib/fwriteerror.h (fwriteerror): Change specification to include
14005         fclose.
14006         * lib/fwriteerror.c: Include <stdbool.h>.
14007         (fwriteerror): At the end, close the file stream. Record whether
14008         stdout was already closed.
14009
14010 2005-01-17  Bruno Haible  <bruno@clisp.org>
14011
14012         * lib/execute.c (environ): Declare if needed.
14013         * lib/pipe.c (environ): Likewise.
14014         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14015
14016 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14017
14018         * modules/argp: Depend on vsnprintf
14019
14020 2005-01-10  Jim Meyering  <jim@meyering.net>
14021
14022         * modules/closeout (Depends-on): Add atexit.
14023
14024 2005-01-06  Bruno Haible  <bruno@clisp.org>
14025
14026         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14027
14028 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14029
14030         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14031         definitions to be after all include files, to avoid collisions.
14032         Problem reported by Bob Proulx.
14033
14034 2005-01-04  Jim Meyering  <jim@meyering.net>
14035
14036         Changes imported from coreutils.
14037         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14038         as the mkstemp template, use a temporary directory and an
14039         8.3-friendly template to avoid trouble on systems like DJGPP.
14040         Reported by Juan M. Guerrero via Stepan Kasal.
14041         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14042         close. Remove the temporary directory right away, rather than waiting
14043         for configure's at-exit trap code to do it.
14044         Suggestion from Stepan Kasal.
14045
14046 2005-01-01  Simon Josefsson  <jas@extundo.com>
14047
14048         * gnulib-tool: Print #include directives when --import'ing.
14049
14050 2004-12-28  Simon Josefsson  <jas@extundo.com>
14051
14052         * tests/test-base64.c: Include required header files.  Remove
14053         unused variables.
14054
14055 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14056
14057         * modules/error (Depends-on): Remove gettext.
14058
14059 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14060
14061         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14062         not needed.  This removes a dependency on the gettext module.
14063         [defined _LIBC]: Do not include <libintl.h>; not needed.
14064
14065 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14066
14067         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14068         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14069
14070 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14071
14072         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14073         HAVE_DECL_STRTOLD.
14074
14075 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14076
14077         * modules/getdate (Depends-on): Remove alloca-opt.
14078
14079 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14080
14081         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14082
14083 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14084
14085         * lib/argp-parse.c: Include <stddef.h>.
14086         (alignof, alignto): New macros.
14087         (parser_init): Don't assume that void * is aligned sufficiently
14088         for struct option.
14089
14090         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14091         need to extend the stack.
14092         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14093         large.
14094
14095 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14096
14097         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14098
14099 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14100
14101         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14102         (2004-10-24) change.  Apparently this was a false alarm.
14103
14104         * modules/getdate: Depend on alloca-opt, not alloca.
14105
14106 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14107
14108         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14109         Remove now-obsolete comment about AIX.
14110         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14111         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14112         (YYMAXDEPTH): New macro.
14113
14114 2004-12-18  Simon Josefsson  <jas@extundo.com>
14115
14116         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14117
14118 2004-12-18  Bruno Haible  <bruno@clisp.org>
14119
14120         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14121
14122 2004-12-18  Bruno Haible  <bruno@clisp.org>
14123
14124         * lib/fatal-signal.c (fatal_signals): Make non-const.
14125         (init_fatal_signals): New function.
14126         (uninstall_handlers, install_handlers): Ignore signals that were set to
14127         SIG_IGN.
14128         (at_fatal_signal): Call init_fatal_signals.
14129         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14130         SIG_IGN.
14131         Reported by Paul Eggert.
14132
14133 2004-12-18  Bruno Haible  <bruno@clisp.org>
14134
14135         * doc/alloca.texi: New file.
14136         * doc/alloca-opt.texi: New file.
14137
14138 2004-12-17  Jim Meyering  <jim@meyering.net>
14139
14140         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14141         Otherwise, install-sh could exit with improper exit status when
14142         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14143
14144 2004-12-16  Simon Josefsson  <jas@extundo.com>
14145
14146         * tests/test-base64.c: Add license.
14147
14148 2004-12-15  Stepan Kasal  <address@hidden>
14149
14150         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14151
14152 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14153
14154         * modules/getcwd (Files): Add m4/d-ino.m4.
14155         Suggested by Mark D. Baushke.
14156
14157 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14158
14159         * lib/getdate.y (textint): New member "negative".
14160         (time_zone_hhmm): New function.
14161         Expect 14 shift-reduce conflicts, not 13.
14162         (o_colon_minutes): New rule.
14163         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14164         (yylex): Set the "negative" member of signed numbers.
14165
14166 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14167
14168         * doc/getdate.texi (Time of day items, Time zone items):
14169         Describe new formats +00:00, UTC+00:00.
14170
14171 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14172
14173         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14174         spurious "-l"s.  Problem reported by Stepan Kasal.
14175
14176 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14177
14178         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14179         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14180
14181 2004-12-04  Simon Josefsson  <jas@extundo.com>
14182
14183         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14184         Vandoorselaere <yoann@prelude-ids.org>.
14185
14186 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14187
14188         Changes imported from coreutils.
14189         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14190         exist.
14191         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14192
14193 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14194
14195         Changes imported from coreutils.
14196         * lib/hard-locale.c: Assume <locale.h> exists.
14197         Include "strdup.h".
14198         (GLIBC_VERSION): New macro.
14199         (hard_locale): Assume setlocale exists.
14200         Rewrite to avoid #ifdef.
14201         Use strdup rather than malloc + strcpy.
14202         * lib/human.c: Assume <locale.h> exists.
14203         (human_readable): Assume localeconv exists.
14204
14205 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14206
14207         * modules/hard-locale (Depends-on): Add strdup.
14208
14209 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14210
14211         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14212         convert T2, not T.  (Imported from libc.)
14213
14214 2004-11-30  Simon Josefsson  <jas@extundo.com>
14215
14216         * modules/restrict (License): Change to LGPL.
14217
14218 2004-11-30  Simon Josefsson  <jas@extundo.com>
14219
14220         * m4/restrict.m4: Add copyright and copying conditions.
14221
14222 2004-11-30  Simon Josefsson  <jas@extundo.com>
14223
14224         * m4/base64.m4: New file.
14225
14226 2004-11-30  Simon Josefsson  <jas@extundo.com>
14227
14228         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14229         base64.
14230
14231         * tests/test-base64.c: New file.
14232
14233         * modules/base64: New file.
14234
14235 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14236
14237         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14238         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14239
14240         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14241
14242 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14243
14244         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14245         (__getcwd.c): Don't restore errno; glibc doesn't.
14246         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14247         first, falling back to our code only if its results look suspicious.
14248         Ensure that the resulting buffer is only as large as necessary.
14249
14250         * lib/readutmp.c: Include readutmp.h first.
14251         Include <errno.h>, since readutmp.h no longer does that.
14252         * lib/readutmp.h: Don't include <errno.h>,
14253         <sys/param.h>, <time.h>; not needed to establish interface.
14254         (errno): Remove decl.
14255         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14256         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14257         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14258
14259 2004-11-28  Simon Josefsson  <jas@extundo.com>
14260
14261         * lib/base64.h, base64.c: New file.
14262
14263 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14264
14265         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14266
14267 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14268
14269         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14270         (Depends-on): Remove pathmax, same.  Add mempcpy.
14271         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14272         (Makefile.am): Append getcwd.h to lib_SOURCES.
14273         (Include): Add getcwd.h.
14274         (Maintainer): Change from Jim Meyering to "all, glibc",
14275         since getdate now uses intended-for-glibc code.
14276         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14277         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14278
14279 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14280
14281         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14282         HP's ANSI C compiler.
14283         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14284         Declaring int functions causes warnings on some modern systems and
14285         shouldn't be needed to compile on ancient ones.
14286         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14287         defined.
14288
14289         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14290         with the following changes.
14291         (__set_errno): Parenthesize properly.
14292         Include <stdbool.h>.
14293         (MIN, MAX, MATCHING_INO): New macros.
14294         (__getcwd): Define with prototype, not K&R form.
14295         Use heuristics to allocate default buffer on stack if possible.
14296         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14297         behavior, and to avoid the PATH_MAX limit when computing
14298         ../../../../...
14299         Use MATCHING_INO to compare inode number to file.
14300         Check for arithmetic overflow in size calculations.
14301         Fix bug in reallocation of dot array that caused getcwd to fail
14302         on directories nested deeper than 75.
14303         Be more careful about saving errno on error.
14304         Do not use realloc; use only free+malloc, as this is a bit
14305         more flexible and avoids a needless copy operation.
14306         Do not inspect st_dev and st_ino for symbolic links; POSIX
14307         doesn't specify the latter.
14308         Check for closedir errors.
14309         Avoid needless casts.
14310         Use "#ifdef weak_alias" around weak_alias, to be like other
14311         glibc code.
14312         The following changes to getcwd.c have effect only when used in
14313         gnulib; they have no effect inside glibc proper.
14314         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14315         as alloca isn't used.
14316         (alloca, __alloca): Likewise.
14317         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14318         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14319         unconditionally, as gnulib assumes C89 or better.
14320         Do not include <sys/param.h>.
14321         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14322         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14323         better.
14324         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14325         Include <dirent.h> in a way that is compatible with modern Autoconf.
14326         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14327         New macros, if not already defined.
14328         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14329         Use "_LIBC", not "defined _LIBC", for consistency.
14330         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14331         a mempcpy module.
14332         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14333         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14334         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14335         credit only to Jim Meyering and adjust the copyright dates.
14336         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14337         <stdlib.h>, <unistd.h>, "pathmax.h".
14338         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14339         (INITIAL_BUFFER_SIZE): Remove.
14340         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14341
14342 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14343
14344         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14345         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14346         Use the _ONCE methods, for efficiency.
14347         Check for fcntl.h.  In test program, include <errno.h>
14348         and <fcntl.h> if available.  Remove old K&R cruft from
14349         test program.  Check for common errors in GNU/Linux,
14350         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14351         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14352         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14353         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14354         name accordingly.
14355         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14356         accommodate new getcwd.c.
14357         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
14358         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
14359         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
14360         that's all we need now.
14361
14362 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14363
14364         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14365         argp-parse.c depends on getopt internals, that means we should
14366         always use our getopt, to be on the safe side.
14367         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14368         order not to spoil the result of an eventual previous invocation
14369         of gl_GETOPT_SUBSTITUTE.
14370
14371 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14372
14373         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14374         redefinition warnings. To avoid them, include the defines
14375         in `#if !defined __need_getopt ... #endif'. The only place
14376         where __getopt_argv_const is used is in definitions
14377         of getopt_long and getopt_long_only below, which are as well
14378         protected by `#ifndef __need_getopt'.
14379         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14380         __need_getopt after including <stdio.h> and <unistd.h> These
14381         headers might have defined it.
14382
14383 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14384
14385         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14386
14387 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14388
14389         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14390         (futimens): New function, which uses futimes if available.
14391         (futimens, utimens): Support timespec==NULL, with same semantics
14392         as utime and utimens.
14393         * lib/utimens.h (futimens): New decl.
14394
14395 2004-11-23  Jim Meyering  <jim@meyering.net>
14396
14397         * lib/getopt_.h: Remove trailing blanks.
14398
14399 2004-11-23  Jim Meyering  <jim@meyering.net>
14400
14401         * lib/__fpending.c: Add comment.
14402
14403 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14404
14405         * modules/canonicalize (Depends-on): Add xreadlink.
14406         Problem reported by James Youngman.
14407
14408 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14409
14410         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14411         New macros.
14412         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14413         optopt): Use them instead of invoking ## directly; otherwise, the
14414         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14415
14416 2004-11-19  Bruno Haible  <bruno@clisp.org>
14417
14418         * lib/strtok_r.c: Move comments from here...
14419         * lib/strtok_r.h: ... to here.
14420
14421 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14422
14423         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14424         implementations that mishandle size_t overflow.
14425
14426 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14427
14428         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14429         might fail.  Problem reported by Yoann Vandoorselaere.
14430         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14431         implementations that mishandle size_t overflow.
14432
14433 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14434
14435         * modules/canon-host (Depends-on): Add strdup.
14436
14437 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14438
14439         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14440
14441 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14442
14443         * lib/canon-host.c: Include "strdup.h".
14444         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14445         Use strdup instead of malloc/strcpy to duplicate strings.
14446
14447         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14448         (human_space_before_unit): New constant.
14449         * lib/human.c (human_readable): Support it.
14450
14451         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14452         (xgetcwd): Set errno correctly when failing.
14453         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14454         the failure is actually due to a PATH_MAX problem.
14455
14456         Further getopt changes to make it more likely that glibc will
14457         buy the changes back.
14458         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14459         (getopt): Use it, so to preserve glibc semantic
14460         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14461         when compiling for libc.
14462         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14463         (getopt_long, getopt_long_only): Use it.
14464
14465         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14466         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14467         (getopt): Argv is now char * const *, as per standard.
14468         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14469         not char *__getopt_argv_const *.
14470         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14471         _getopt_long_only_r): Likewise.
14472         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14473         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14474         _getopt_long_r, _getopt_long_only_r): Likewise.
14475         * lib/getopt_.h (__getopt_argv_const): Remove.
14476         (getopt): Argv is now char * const *, as per standard.
14477
14478         * lib/getdate.y (tORDINAL): New token.
14479         (day, relunit): Allow it for relative times.
14480         (relative_time_table): Use tORDINAL for ordinals.
14481
14482 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14483
14484         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14485         Document that "second" isn't allowed as an ordinal number.
14486
14487 2004-11-16  Jim Meyering  <jim@meyering.net>
14488
14489         * modules/closeout (Depends-on): Add fpending.
14490
14491 2004-11-15  Jim Meyering  <jim@meyering.net>
14492
14493         * lib/closeout.c: Include "__fpending.h" once again.
14494         Include <stdbool.h>.
14495         (close_stdout): Don't fail just because stdout was closed initially,
14496         since some programs don't write to stdout in the normal course of
14497         operation (other than --version and --help), and we don't want this
14498         function to make e.g. `touch file >&-' fail.
14499         But do fail if it was closed and someone has tried to write to it.
14500         E.g., `printf foo >&-' must fail.
14501
14502 2004-11-13  Jim Meyering  <jim@meyering.net>
14503
14504         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
14505
14506 2004-11-12  Simon Josefsson  <jas@extundo.com>
14507
14508         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
14509         small doc fix is still pending.
14510
14511 2004-11-11  Simon Josefsson  <jas@extundo.com>
14512
14513         * modules/strtok_r: New file.
14514
14515         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14516         strtok_r.
14517
14518 2004-11-11  Simon Josefsson  <jas@extundo.com>
14519
14520         * m4/strtok_r.m4: New file.
14521
14522         * m4/getopt.m4: Replace opterr.
14523
14524 2004-11-11  Simon Josefsson  <jas@extundo.com>
14525
14526         * lib/strtok_r.h, strtok_r.c: New file.
14527
14528 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14529
14530         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
14531         of replacing opterr, getopt, etc.  This should handle the
14532         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
14533
14534 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14535
14536         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
14537         we can stop lying to compilers about the constness of argv when we
14538         are compiled outside glibc.
14539         (getopt, getopt_long, getopt_long_only): Use it.
14540         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14541         _getopt_internal, getopt): Likewise.
14542         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14543         _getopt_long_only_r): Likewise.
14544         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14545         _getopt_long_r, _getopt_long_only_r): Likewise.
14546
14547         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
14548         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
14549         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
14550         the other external symbols.
14551         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
14552         declaration, since the above renaming now works around collisions.
14553
14554 2004-11-11  Jim Meyering  <jim@meyering.net>
14555
14556         * lib/linebreak.c: Remove trailing blanks.
14557         * lib/alloca_.h: Likewise.
14558         * lib/acosl.c: Likewise.
14559         * lib/euidaccess.c: Likewise.
14560         * lib/allocsa.h: Likewise.
14561
14562 2004-11-10  Simon Josefsson  <jas@extundo.com>
14563
14564         * m4/getaddrinfo.m4: New file.
14565
14566 2004-11-10  Simon Josefsson  <jas@extundo.com>
14567
14568         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
14569
14570 2004-11-10  Simon Josefsson  <jas@extundo.com>
14571
14572         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14573         getaddrinfo.
14574
14575         * modules/getaddrinfo: New file.
14576
14577 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14578
14579         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
14580
14581 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14582
14583         * lib/mktime.c (SHR): New macro, which is a portable
14584         substitute for >> that should work even on Crays.
14585         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
14586         Problem reported by Mark D. Baushke in
14587         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
14588         * lib/getdate.y (SHR): Likewise.
14589         (tm_diff): Use it.
14590         * lib/strftime.c (SHR): Likewise.
14591         (tm_diff): Use it.
14592         * lib/quotearg.c (struct quoting_options): Use unsigned int for
14593         quote_these_too, so that right shifts are well defined.  All uses
14594         changed.
14595
14596 2004-11-10  Jim Meyering  <jim@meyering.net>
14597
14598         Ensure that no close failure goes unreported.
14599         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
14600         return early when it seems there's nothing to flush.
14601         Don't include __fpending.h.
14602
14603 2004-11-10  Jim Meyering  <jim@meyering.net>
14604
14605         * modules/closeout (Depends-on): Remove fpending.
14606
14607 2004-11-10  Jim Meyering  <jim@meyering.net>
14608
14609         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
14610
14611 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14612
14613         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
14614         gl_FUNC_STRFTIME.
14615         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
14616         and AC_REQUIRE when possible, to avoid duplicate checks.
14617         Check for <wchar.h>.
14618
14619 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14620
14621         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
14622
14623 2004-11-09  Bruno Haible  <bruno@clisp.org>
14624
14625         * m4/sockpfaf.m4: New file.
14626
14627 2004-11-05  Bruno Haible  <bruno@clisp.org>
14628
14629         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
14630         Reported by Mark D. Baushke <mdb@cvshome.org>.
14631
14632 2004-11-04  Bruno Haible  <bruno@clisp.org>
14633
14634         2004-09-11  Bruno Haible  <bruno@clisp.org>
14635                 * allocsa.valgrind: New file.
14636         2004-02-06  Bruno Haible  <bruno@clisp.org>
14637                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
14638                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
14639                 Reported by Christopher Seip <chris.seip@hp.com>.
14640
14641 2004-11-04  Bruno Haible  <bruno@clisp.org>
14642
14643         * modules/allocsa (Files): Add lib/allocsa.valgrind.
14644         (Makefile.am): Distribute it.
14645
14646 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
14647
14648         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
14649         with errno == ERANGE if the buffer is too small.
14650         Problem reported by Mark D. Baushke.
14651
14652 2004-11-03  Albert Chin  <china@thewrittenword.com>
14653             Paul Eggert  <eggert@cs.ucla.edu>
14654
14655         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
14656         equivalent, substitute $ac_type for equivalent type rather than
14657         blindly using uint32_t *always* which won't work if uint32_t is not
14658         available.  Define _UINT32_T to work around typedef of uint32_t if
14659         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
14660         2.5.1.
14661
14662 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14663
14664         * m4/jm-macros.m4: Sync from coreutils.
14665         (gl_MACROS): Check for mbrlen, for pathchk.
14666         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
14667
14668 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14669
14670         * lib/xreadlink.c (MAXSIZE): New macro.
14671         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
14672         size does not exceed MAXSIZE.  Avoid cast.
14673         As suggested by Mark D. Baushke in
14674         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
14675         if readlink fails with buffer size just under MAXSIZE, try again
14676         with MAXSIZE.
14677
14678 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14679
14680         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
14681
14682 2004-11-02  Derek R. Price  <derek@ximbiot.com>
14683         and  Paul Eggert  <eggert@cs.ucla.edu>
14684
14685         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
14686         (get_date): Overparenthesize to avoid GCC warning.
14687
14688 2004-11-02  Bruno Haible  <bruno@clisp.org>
14689
14690         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
14691         returns void.
14692
14693 2004-11-02  Bruno Haible  <bruno@clisp.org>
14694
14695         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
14696         function returns void.
14697
14698 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14699
14700         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
14701         fflush_unlocked, flockfile, funlockfile, funlockfile,
14702         fputs_unlocked, putc_unlocked.
14703
14704 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14705
14706         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14707         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
14708         already declared.
14709
14710 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14711
14712         * modules/getdate (Files): Add doc/getdate.texi.
14713         (Depends-on): Add setenv, xalloc.
14714
14715 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14716
14717         * lib/getdate.y: Add support for TZ="foo" within a date string.
14718         Fix some bugs near time_t boundaries.  Reject dates with
14719         out-of-range components, e.g., "Sept 31".
14720         Include <stdlib.h>, "setenv.h", "xalloc.h".
14721         (ISDIGIT_LOCALE): Remove; unused.
14722         Note that the TZ and time functions used here are not reentrant.
14723         (mktime_ok, get_tz): New functions.
14724         (TZBUFSIZE): New constant.
14725         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
14726         This requires that we sometimes generate our own TZ="XXX..." setting.
14727
14728 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14729
14730         * doc/getdate.texi: New file, from coreutils with modifications for
14731         the new TZ parsing.
14732
14733 2004-10-27  Derek R. Price  <derek@ximbiot.com>
14734
14735         * lib/mktime.c (not_equal_tm): Remove redundant check.
14736
14737 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14738
14739         * modules/regex (lib_SOURCES): Add regex.c.
14740         Reported by James Youngman in
14741         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
14742
14743 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14744
14745         * lib/getdate.y: Use Bison 1.875 features, and some minor
14746         code cleanups.  This change does not affect semantics.
14747         Don't include <stdlib.h>; no longer needed.
14748         Don't include unlocked-io.h; only the "#if TEST" code uses
14749         stdio, and performance isn't crucial there.
14750         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
14751         Bison 1.875 features as described below.
14752         All uses of "PC." replaced by "pc->".
14753         (YYSTYPE): Add a forward declaration.
14754         (yylex, yyerror): Use full prototypes in forward decls.
14755         Use "%pure-parser" rather than obsolescent "%pure_parser".
14756         Use %parse-param and %lex-param instead of obsolescent
14757         YYPARSE_PARAM and YYLEX_PARAM.
14758         (meridian_table, month_and_day_table, time_units_table,
14759         relative_time_table, time_zone_table, military_table,
14760         lookup_zone, lookup_word, get_date):
14761         Use NULL instead of 0 where appropriate.
14762         (to_hour): Avoid abort (), to avoid a dependency on
14763         stdlib.h.
14764         (yyerror, yylex): Now accepts parser_control * arg.
14765         (main) [TEST]: Use '\0' rather than 0 for char.
14766
14767 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14768
14769         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
14770
14771 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14772
14773         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
14774         It's now the caller's responsibility to handle the case where
14775         !HAVE_GETPAGESIZE && !defined getpagesize.
14776
14777         * lib/mktime.c (leapyear): Arg is long int, not int.
14778
14779 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
14780
14781         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
14782
14783 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
14784
14785         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
14786         missing.  Problem reported by James Youngman.
14787
14788 2004-10-16  Simon Josefsson  <jas@extundo.com>
14789
14790         * gnulib-tool: Fix comments.  Fix parse problem.
14791         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
14792
14793 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
14794
14795         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
14796         implementation of getopt_long.  Problem reported by Alexander Taler in:
14797         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
14798
14799 2004-10-15  Bruno Haible  <bruno@clisp.org>
14800
14801         * gnulib-tool: Untabify. Initialize supplied_libname.
14802         (func_usage): More homogenous output.
14803         (func_modules_transitive_closure, func_modules_to_filelist,
14804         func_emit_lib_Makefile_am): New functions.
14805         (func_import): New function, extracted from big case statement. Use
14806         func_get_license, func_modules_transitive_closure,
14807         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
14808         opt_lgpl. Don't use test -a, as it's not portable.
14809         (func_create_testdir): Use func_modules_transitive_closure,
14810         func_modules_to_filelist, func_emit_lib_Makefile_am.
14811
14812 2004-10-15  Bruno Haible  <bruno@clisp.org>
14813
14814         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
14815
14816 2004-10-15  Bruno Haible  <bruno@clisp.org>
14817
14818         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
14819         the portions belonging to each module.
14820         Suggested by Derek Robert Price <derek@ximbiot.com>.
14821
14822 2004-10-12  Simon Josefsson  <jas@extundo.com>
14823
14824         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14825         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
14826         to real functions.
14827
14828 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14829
14830         * modules/vsnprintf: New file.
14831
14832 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14833
14834         * m4/vsnprintf.m4: New file.
14835
14836 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14837
14838         * lib/vsnprintf.h: New file.
14839         * lib/vsnprintf.c: New file.
14840
14841 2004-10-11  Bruno Haible  <bruno@clisp.org>
14842
14843         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
14844         vsnprintf.
14845
14846 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14847
14848         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
14849
14850 2004-10-07  Bruno Haible  <bruno@clisp.org>
14851
14852         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
14853         fits into the provided buffer.
14854
14855 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
14856
14857         * lib/diacrit.c, diacrit.h: Add GPL notice.
14858
14859         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
14860         notice.
14861         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
14862         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
14863         This avoids a potential constant-folding bug.
14864
14865 2004-10-05  Bruno Haible  <bruno@clisp.org>
14866
14867         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
14868         for the declaration of strsep.
14869
14870 2004-10-05  Bruno Haible  <bruno@clisp.org>
14871
14872         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
14873
14874 2004-10-04  Simon Josefsson  <jas@extundo.com>
14875
14876         * modules/memmem: New file.
14877         * tests/test-memmem.c: New file.
14878         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
14879
14880 2004-10-04  Simon Josefsson  <jas@extundo.com>
14881
14882         * m4/memmem.m4: New file.
14883
14884 2004-10-04  Simon Josefsson  <jas@extundo.com>
14885
14886         * lib/memmem.h: New file.
14887         * lib/memmem.c: New file, taken from glibc.
14888
14889 2004-10-04  Simon Josefsson  <jas@extundo.com>
14890
14891         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
14892         '#ifdef USE_UNLOCKED_IO'.
14893
14894 2004-10-04  Simon Josefsson  <jas@extundo.com>
14895
14896         * config/srclist.txt: Add memmem from glibc.
14897
14898 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14899
14900         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
14901
14902         * modules/argmatch, modules/argp, modules/closeout, modules/error,
14903         modules/exclude, modules/getdate, modules/getline,
14904         modules/getndelim2, modules/getpass, modules/getpass-gnu,
14905         modules/getusershell, modules/linebuffer, modules/md5,
14906         modules/mountlist, modules/posixtm, modules/readtokens,
14907         modules/readutmp, modules/regex, modules/sha1,
14908         modules/version-etc, modules/yesno:
14909         Remove dependency on unlocked-io.
14910
14911 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14912
14913         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
14914
14915         * m4/unlocked-io.m4: Add copyright notice.
14916         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
14917
14918 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14919
14920         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
14921         * lib/xmalloc.c (xmemdup): Likewise.
14922         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
14923         XFREE): Remove these long-obsolescent macros.
14924         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
14925         * lib/xstrdup.c: Remove.
14926
14927         * lib/regex.c (re_comp): Cast gettext return value to char *,
14928         Problem reported by Martin Neitzel via Mark D. Baushke.
14929
14930 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
14931
14932         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
14933         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
14934         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
14935         regex.c, sha1.c, version-etc.c, yesno.c:
14936         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
14937         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
14938         the includer's responsibility.
14939
14940         Sync from coreutils.
14941
14942         * lib/modechange.c (mode_compile): Don't decrement a pointer that
14943         points to the start of a string, as the C Standard says the
14944         resulting behavior is undefined.
14945
14946         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
14947         simple -> simple_backups, numbered_existing ->
14948         numbered_existing_backups, numbered -> numbered_backups
14949         to avoid shadowing problems.  All uses changed.
14950         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
14951         * lib/backupfile.c (check_extension, numbered_backup):
14952         Rename locals to avoid shadowing 'basename'.
14953         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
14954         once.
14955
14956         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
14957         * lib/.cvsignore: Add getopt.h.
14958
14959 2004-10-04  Bruno Haible  <bruno@clisp.org>
14960
14961         * modules/README: New file.
14962         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
14963         not a module.
14964
14965 2004-10-02  Jim Meyering  <jim@meyering.net>
14966
14967         * lib/dirfd.h, getpagesize.h: Add copyright notice.
14968
14969 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14970
14971         * modules/strsep: New file.
14972
14973 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14974
14975         * m4/strsep.m4: New file.
14976
14977 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14978
14979         * lib/strsep.h: New file.
14980         * lib/strsep.c: New file.
14981
14982 2004-10-01  Simon Josefsson  <jas@extundo.com>
14983
14984         * lib/snprintf.c (snprintf): Handle size==0.
14985
14986 2004-10-01  Simon Josefsson  <jas@extundo.com>
14987             Bruno Haible  <bruno@clisp.org>
14988
14989         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
14990         (snprintf): Declare 'args'.
14991
14992 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
14993
14994         * lib/snprintf.c: Remove comments as to why each header is needed.
14995
14996 2004-10-01  Bruno Haible  <bruno@clisp.org>
14997
14998         * MODULES.html.sh: Add strsep.
14999
15000 2004-09-30  Simon Josefsson  <jas@extundo.com>
15001
15002         * modules/snprintf: New file.
15003
15004 2004-09-30  Simon Josefsson  <jas@extundo.com>
15005
15006         * m4/snprintf.m4: New file.
15007
15008 2004-09-30  Simon Josefsson  <jas@extundo.com>
15009
15010         * lib/snprintf.h, lib/snprintf.c: New files.
15011
15012 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15013
15014         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15015         (hol_entry_help): Never translate an empty string.
15016         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15017         * lib/argp.h (OPTION_NO_TRANS): New option.
15018
15019 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15020
15021         * modules/argp (Maintainer): Replace Simon Josefsson
15022         by Sergey Poznyakoff.
15023
15024 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15025
15026         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15027         changes merged back into glibc.
15028
15029 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15030
15031         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15032
15033 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15034
15035         * lib/xvasprintf.c: Include xalloc.h.
15036         (xvasprintf): Use xalloc_die, not xmalloc_die.
15037
15038 2004-09-29  Bruno Haible  <bruno@clisp.org>
15039
15040         * modules/alloca-opt: New file, derived from modules/alloca.
15041         * modules/allocsa: Depend on alloca-opt instead of alloca.
15042         * modules/setenv: Likewise.
15043         * modules/vasnprintf: Likewise.
15044         * MODULES.html.sh: Add alloca-opt.
15045
15046 2004-09-28  Simon Josefsson  <jas@extundo.com>
15047
15048         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15049         LGPL, and to replace license template from GPL to LGPL.
15050
15051 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15052
15053         * modules/dummy: Change license to LGPL.
15054
15055 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15056
15057         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15058
15059 2004-09-24  Simon Josefsson  <jas@extundo.com>
15060
15061         * modules/minmax (License): Change from GPL to LGPL.
15062
15063 2004-09-23  Simon Josefsson  <jas@extundo.com>
15064
15065         * gnulib-tool (--import): Typo.
15066
15067 2004-09-23  Simon Josefsson  <jas@extundo.com>
15068
15069         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15070
15071 2004-09-22  Bruno Haible  <bruno@clisp.org>
15072
15073         * modules/*: Add 'License' field.
15074         * gnulib-tool: Accept --extract-license option.
15075         (func_get_license): New function.
15076
15077 2004-09-21  Bruno Haible  <bruno@clisp.org>
15078
15079         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15080         Reported by Simon Josefsson.
15081
15082 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15083
15084         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15085         gl_AC_TYPE_LONG_LONG.
15086
15087 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15088
15089         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15090
15091 2004-09-18  Simon Josefsson  <jas@extundo.com>
15092         and  Paul Eggert  <eggert@cs.ucla.edu>
15093
15094         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15095         calls with autoreconf.  Define GL_LIB.
15096
15097 2004-09-14  Karl Berry  <karl@gnu.org>
15098
15099         * config/srclist.txt: unsync setenv.c, sigh.
15100
15101 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15102
15103         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15104         Problem reported by Bruno Haible in:
15105         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15106
15107 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15108
15109         * config/srclist.txt: Comment out argp-pvh.c.
15110
15111 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15112
15113         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15114         in case some system header has #define'd it.  Problem reported by
15115         Soeren D. Schulze in
15116         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15117
15118 2004-09-09  Karl Berry  <karl@gnu.org>
15119
15120         * regex.[ch]: delete from the root.  These were supposed to be
15121                 synced with emacs cvs, but this has not happened for about
15122                 a year, and anyway nothing else uses emacs regex.[ch].
15123                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15124                 lib/regex[.ch] is untouched.
15125
15126 2004-09-09  Bruno Haible  <bruno@clisp.org>
15127
15128         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15129
15130 2004-09-09  Bruno Haible  <bruno@clisp.org>
15131
15132         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15133         modifications.
15134         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15135
15136 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15137
15138         * modules/xvasprintf: New file.
15139         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15140
15141 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15142
15143         * lib/xvasprintf.h: New file.
15144         * lib/xvasprintf.c: New file.
15145         * lib/xasprintf.c: New file.
15146
15147 2004-09-08  Bruno Haible  <bruno@clisp.org>
15148
15149         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15150
15151 2004-09-08  Bruno Haible  <bruno@clisp.org>
15152
15153         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15154         length is > INT_MAX.
15155         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15156         more.
15157
15158 2004-09-08  Bruno Haible  <bruno@clisp.org>
15159
15160         * lib/stdint_.h: New file, taken from GNU clisp.
15161
15162 2004-09-08  Bruno Haible  <bruno@clisp.org>
15163             Oskar Liljeblad  <oskar@osk.mine.nu>
15164
15165         * modules/stdint: New file.
15166         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15167
15168 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15169
15170         Import from coreutils.
15171         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15172         strings on unbounded length.  alloca's performance benefits aren't
15173         that important here.
15174         (V_STRDUP): Remove.
15175         (parse_with_separator): New function, with most of the internals
15176         of the old parse_user_spec.  Allow user to omit both user and group,
15177         for compatibility with FreeBSD.
15178         Clone only the user name, not the entire spec.
15179         Do not set *uid, *gid unless entirely successful.
15180         Avoid memory leak in some failing cases.
15181         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15182         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15183         (parse_user_spec): Rewrite to use parse_with_separator.
15184
15185 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15186
15187         * modules/userspec: Don't depend on alloca.
15188
15189 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15190
15191         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15192
15193 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15194
15195         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15196         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15197         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15198
15199 2004-08-16  Simon Josefsson  <jas@extundo.com>
15200
15201         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15202         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15203         Add --dry-run for --import.
15204         Let user provided command line parameters override configure.ac
15205         settings.
15206
15207 2004-08-12  Simon Josefsson  <jas@extundo.com>
15208
15209         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15210         as discussed with Paul Eggert in threads rooted at
15211         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15212         and
15213         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15214         Before, the test was empty, and relied on ELIDE_CODE in source
15215         code.)
15216         (gl_PREREQ_GETOPT): New macro.
15217         (gl_GETOPT): Use them.
15218
15219 2004-08-12  Simon Josefsson  <jas@extundo.com>
15220
15221         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15222         * lib/getopt_.h: Renamed from getopt.h.
15223
15224 2004-08-12  Simon Josefsson  <jas@extundo.com>
15225
15226         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15227         Change default library name from libfoo to libgnu.
15228         Now, if you have a configure.ac that says:
15229                 gl_SOURCE_BASE(gl)
15230                 gl_M4_BASE(gl/m4)
15231                 gl_MODULES(error getopt etcetera)
15232                 gl_INIT
15233         you can import all you need by running:
15234                 ../gnulib/gnulib-tool --import
15235
15236         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15237         (Makefile.am): Rewrite, use logic from argz.
15238         (Include): Use <getopt.h> instead of "getopt.h".
15239
15240 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15241
15242         * modules/argp (Files): Add m4/unlocked-io.m4.
15243         (Depends-on): Add extensions.
15244
15245 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15246
15247         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15248         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15249         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15250         Check for program_invocation_name, program_invocation_short_name,
15251         flockfile, funlockfile, features.h, _getopt_long_only_r.
15252
15253 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15254
15255         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15256         its complicated substitute.
15257         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15258         and program_invocation_name.
15259         (__argp_basename) [!_LIBC]: Remove; the only use was
15260         replaced by its body.
15261         (__argp_short_program_name): Change condition from
15262         !defined __argp_short_program_name to
15263         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15264         to match argp-namefrob.h.
15265         (__argp_failure): Don't assume strerror_r returns char *.
15266         * lib/argp-parse.c (N_): Define unconditionally.
15267         (argp_default_options): Fill out initializers with 0 to avoid
15268         gcc warnings.
15269
15270 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15271
15272         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15273         getopt1.c.
15274
15275 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15276
15277         Merge from coreutils.
15278
15279         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15280
15281         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15282         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15283
15284 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15285
15286         Merge from coreutils.
15287
15288         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15289         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15290         for Reliant Unix 5.43.
15291
15292         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15293         (union fooround): Use uintmax_t, not long int.
15294         The rest is a merge from libc:
15295         [defined _LIBC]: Include <shlib-compat.h>.
15296         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15297
15298         * lib/settime.c (settime): Recode to avoid warning with
15299         Sun Forte C 6U2.
15300
15301         * lib/strverscmp.c: Convert to UTF-8.
15302
15303 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15304
15305         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15306         m4/uintmax_t.m4.
15307
15308 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15309
15310         * modules/xalloc-die: New file.
15311         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15312
15313         * modules/md5 (Files): Add m4/uint32_t.m4.
15314         * modules/sha1: Renamed from modules/sha.
15315         (Files):
15316         Rename lib/sha.h to lib/sha1.h.
15317         Rename lib/sha.c to lib/sha1.c.
15318         Rename m4/sha.m4 to m4/sha1.m4.
15319         (lib_SOURCES): Likewise.
15320         (configure.ac): Rename gl_SHA to gl_SHA1.
15321         (Include): sha.h -> sha1.h.
15322
15323 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15324
15325         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15326         * m4/sha1.m4: Renamed from sha.m4.
15327         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15328
15329 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15330
15331         * lib/obstack.h (obstack_empty_p):
15332         Don't assume that chunk->contents is suitably aligned.
15333         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15334         Likewise. Problem reported by Benno in
15335         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15336
15337         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15338         readable.  This could be improved further but it'd take some work.
15339
15340 2004-08-08  Simon Josefsson  <jas@extundo.com>
15341
15342         * modules/xgethostname (Depends-on): Remove exit and error (not
15343         used).
15344
15345         * modules/getpass-gnu: Add getpass.h.
15346         (Depends-on): Add stdbool.
15347         * modules/getpass: Add getpass.h.
15348
15349 2004-08-08  Simon Josefsson  <jas@extundo.com>
15350
15351         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15352         Check getpass declaration.
15353
15354 2004-08-08  Simon Josefsson  <jas@extundo.com>
15355
15356         * lib/xgethostname.c: Don't include error.h (not used).
15357
15358         * lib/getpass.h: Add.
15359         * lib/getpass.c: Include getpass.h first.
15360
15361 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15362
15363         * lib/xalloc-die.c: New file.
15364         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15365         All uses removed.
15366         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15367         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15368         xalloc-die.c.
15369         (_, N_, xalloc_die): Move to xalloc-die.c.
15370         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15371         so that we needn't mess with xalloc_msg_memory_exhausted.
15372
15373         * lib/sha1.h: Renamed from sha.h.
15374         (SHA1_H): Renamed from _SHA_H.
15375         (sha1_ctx): Renamed from sha_ctx.
15376         (sha1_init_ctx): Renamed from sha_init_ctx.
15377         (sha1_process_block): Renamed from sha_process_block.
15378         (sha1_process_bytes): Renamed from sha_process_bytes.
15379         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15380         (sha1_read_ctx): Renamed from sha_read_ctx.
15381         (sha1_stream): Renamed from sha_stream.
15382         (sha1_buffer): Renamed from sha_buffer.
15383         * lib/sha1.c: Likewise; renamed from sha.c.
15384         Do not include <sys/types.h>.
15385         Include <stddef.h> rather than <stdlib.h>.
15386
15387 2004-08-08  Bruno Haible  <bruno@clisp.org>
15388
15389         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15390         FILESYSTEM_PREFIX_LEN.
15391         * lib/progreloc.c: Likewise.
15392         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15393
15394 2004-08-06  Simon Josefsson  <jas@extundo.com>
15395
15396         * modules/progname (Depends-on): Don't depend on stdbool.
15397
15398 2004-08-06  Simon Josefsson  <jas@extundo.com>
15399
15400         * modules/getsubopt: New file.
15401         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15402         getsubopt.
15403
15404 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15405
15406         More merge from coreutils.
15407
15408         * m4/utimens.m4, m4/utimecmp.m4: New files.
15409         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15410         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15411         prereq.m4, sha.m4: Import changes from coreutils.
15412
15413 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15414
15415         More merge from coreutils.
15416         * modules/raise, modules/readtokens0, modules/utimens:
15417         * modules/utimecmp, module/xnanosleep: New files.
15418         * modules/strftime: Add lib/strftime.h.
15419         Change include from <time.h> to "strftime.h".
15420         * modules/yesno: Add lib/yesno.h.
15421         * modules/backupfile: Remove lib/addext.c.
15422         * modules/euidaccess: Add stat-macros.h.
15423         * modules/canonicalize, modules/euidaccess,
15424         modules/filemode, modules/lchown, modules/makepath,
15425         modules/rmdir, modules/stat: Likewise.
15426
15427 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15428
15429         Merge from tar.
15430         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15431         SIZE_MAX is a valid preprocessor constant.
15432         (__argp_basename): Change from "#ifndef _LIBC"
15433         to "#ifndef __argp_short_program_name", so that
15434         we don't compile these functions for tar.
15435
15436         More merges from coreutils.
15437         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15438         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15439         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15440         * lib/addext.c: Remove; no longer needed.
15441         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15442         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15443         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15444         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15445         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15446         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15447         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15448         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15449         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15450         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15451         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15452         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15453         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15454         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15455         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15456         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15457         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15458         Import changes from coreutils.
15459
15460 2004-08-05  Simon Josefsson  <jas@extundo.com>
15461
15462         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15463
15464 2004-08-05  Simon Josefsson  <jas@extundo.com>
15465
15466         * m4/getsubopt.m4: New file.
15467
15468 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15469
15470         Merge from coreutils.
15471
15472         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15473         * m4/getcwd-path-max.m4: New files.
15474
15475         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15476         FILESYSTEM_PREFIX_LEN ->
15477         FILE_SYSTEM_PREFIX_LEN.
15478         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15479         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15480         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15481         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15482
15483         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15484         prerequisite modules now handle the DOS stuff.
15485         Don't check for unistd.h.
15486
15487 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15488
15489         Merge from coreutils.
15490
15491         * lib/.gdb-history: Remove; this doesn't belong here.
15492
15493         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15494         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15495         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15496         * lib/getcwd.c: New files.
15497
15498         * lib/dirname.h: Include <stdbool.h>.
15499         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15500         for consistency with POSIX terminology.  All uses changed.
15501         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
15502         (strip_trailing_slashes): Use bool for booleans.
15503         * lib/stripslash.c (strip_trailing_slashes): Likewise.
15504
15505         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
15506         sometimes returns a positive errno value even when it succeeds.
15507         (print_errno_message) [!LIBC]: Fall back on strerror if
15508         __strerror_r fails.
15509
15510         * lib/path-concat.c (mempcpy): Don't define if a system header defines
15511         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
15512         (longest_relative_suffix): New function.
15513         (path_concat): Use it.  Assume first argument is not NULL.
15514         Port to DOS.  Omit redundant separators.
15515         Report an error instead of returning NULL.
15516         Use mempcpy instead of memcpy.
15517         (xpath_concat): Remove: not declared or used.
15518
15519         * lib/same.h: Include <stdbool.h>
15520         (same_name): Return bool, not int.
15521         * lib/same.c (same_name): Likewise.
15522         (errno): Don't declare; we assume C89 or better now.
15523
15524         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
15525         if not already defined.
15526
15527         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
15528         * lib/dup-safer.c (errno): Likewise.
15529
15530 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15531
15532         Merge from coreutils.
15533         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
15534         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
15535         * modules/path-concat: Don't depend on strdup.
15536
15537 2004-08-03  Simon Josefsson  <jas@extundo.com>
15538
15539         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
15540         * lib/progname.h: Don't include stdbool.h.
15541
15542 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15543
15544         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
15545         * MODULES.html.sh (func_all_modules): Remove fatal.
15546
15547 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15548
15549         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
15550
15551 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15552
15553         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
15554         working.
15555
15556 2004-08-02  Simon Josefsson  <jas@extundo.com>
15557
15558         * lib/getsubopt.h: New file, with comments from Bruno Haible.
15559         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
15560         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
15561
15562 2004-08-01  Simon Josefsson  <jas@extundo.com>
15563
15564         * lib/xgetdomainname.c: Include stdlib.h, for free().
15565
15566 2004-07-19  Bruno Haible  <bruno@clisp.org>
15567
15568         * MODULES.html.sh (func_all_modules): Add dummy.
15569
15570 2004-07-16  Simon Josefsson  <jas@extundo.com>
15571
15572         * modules/dummy: New file.
15573
15574 2004-07-16  Simon Josefsson  <jas@extundo.com>
15575
15576         * lib/dummy.c: New file.
15577
15578 2004-07-16  Bruno Haible  <bruno@clisp.org>
15579
15580         * lib/backupfile.h: Add extern "C" for C++.
15581         * lib/closeout.h: Likewise.
15582         * lib/copy-file.h: Likewise.
15583         * lib/findprog.h: Likewise.
15584         * lib/full-write.h: Likewise.
15585         * lib/pathname.h: Likewise.
15586         * lib/progname.h: Likewise.
15587         * lib/stpcpy.h: Likewise.
15588         * lib/stpncpy.h: Likewise.
15589         * lib/strcase.h: Likewise.
15590         * lib/strstr.h: Likewise.
15591         * lib/xalloc.h: Likewise.
15592
15593         * lib/mbswidth.h: Add extern "C" for C++.
15594         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
15595
15596 2004-07-13  Robert Millan  <robertmh@gnu.org>
15597
15598         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
15599
15600 2004-07-09  Simon Josefsson  <jas@extundo.com>
15601
15602         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
15603         failed without this.)
15604
15605 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15606
15607         * modules/chown (Files): Add lib/fchown-stub.c, since
15608         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
15609
15610 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15611
15612         * lib/fchown-stub.c: New file.
15613
15614 2004-06-24  Jim Meyering  <jim@meyering.net>
15615
15616         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
15617
15618 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15619
15620         * modules/argz: Omit "#include".
15621
15622         * MODULES.html.sh (func_all_modules): Add calloc, to match
15623         2004-06-01 addition of calloc module.
15624
15625 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15626
15627         * m4/argz.m4: New file, which is autoupdated from libtool.
15628
15629 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15630
15631         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
15632         libtool.
15633
15634 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15635
15636         * config/srclist-update: Don't insist on "USA." before the
15637         close-comment, as libtool omits the period and puts the */ on a
15638         separate line.
15639         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
15640         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
15641
15642 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
15643
15644         * modules/argz: New file.
15645         * MODULES.html.sh (func_all_modules): Add argz.
15646
15647 2004-06-12  Jim Meyering  <jim@meyering.net>
15648         and  Paul Eggert  <eggert@cs.ucla.edu>
15649
15650         * modules/hash (Files): Add lib/xalloc.h.
15651         * modules/pipe (Depends-on): Add wait-process.
15652         * modules/stat (Depends-on): Add xalloc.
15653         * modules/userspec (Files): Add lib/userspec.h.
15654         * modules/xstrto
15655
15656         Upgrade from gettext-0.13.
15657         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
15658         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
15659         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
15660
15661 2004-06-10  Jim Meyering  <jim@meyering.net>
15662
15663         * lib/calloc.c: New file.
15664
15665 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
15666
15667         * lib/getdate.y (yylex): Allow space between sign and number.
15668         Problem reported by Dan Jacobson.
15669
15670 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15671
15672         Merge from coreutils CVS.
15673
15674         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
15675         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
15676         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
15677         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
15678         xstrtol.m4: Fix copyright date and/or serial number.
15679
15680         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
15681         See if we need an fchown replacement.
15682         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
15683         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
15684         and use the replacement function if we detect either defect.
15685
15686         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
15687         gl_UTIMECMP.
15688
15689 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15690         and  Jim Meyering  <jim@meyering.net>
15691
15692         Merge from coreutils CVS.
15693
15694         * lib/stat-macros.h: New file, with contents from file-type.h
15695         and coreutils' system.h.
15696         * lib/file-type.c: Include "stat-macros.h".
15697         * lib/file-type.h (file_type): Move all macro definitions to new file,
15698         stat-macros.h.
15699
15700         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
15701         Wrap old code with this conditional.
15702         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
15703         function that does not dereference symlinks.
15704         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
15705
15706         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
15707         dependency problems.
15708         (xreadlink): Accept new arg SIZE, for efficiency.
15709         All decls and uses changed.
15710         * lib/xreadlink.h: Include <stddef.h>, for size_t.
15711
15712         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
15713         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
15714
15715         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
15716         sysexits.h.
15717
15718 2004-06-01  Jim Meyering  <jim@meyering.net>
15719
15720         * m4/calloc.m4: New file.
15721
15722 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
15723
15724         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
15725         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
15726         Also, fix a typo in a diagnostic.
15727
15728 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15729
15730         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
15731         or AC_FUNC_REALLOC.
15732
15733 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15734
15735         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
15736         macros to be defined.
15737         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
15738         the allocator returns NULL because the requested size is zero.
15739
15740 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15741
15742         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
15743         var.  Add comment explaining why libc still defines it.  This
15744         merges the following patch from glibc:
15745         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
15746
15747 2004-05-20  Andreas Schwab  <schwab@suse.de>
15748
15749         * m4/free.m4: Replace free if it not known to work, not the other
15750         way round.
15751
15752 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15753
15754         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
15755         present in glibc since revision 1.1 of this file.
15756         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
15757         obstack_alignment_mask, obstack_alloc, obstack_base,
15758         obstack_blank, obstack_blank_fast, obstack_chunk_size,
15759         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
15760         obstack_grow0, obstack_init, obstack_int_grow,
15761         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
15762         obstack_next_free, obstack_object_size, obstack_ptr_grow,
15763         obstack_ptr_grow_fast, obstack_room): Remove declarations of
15764         nonexistent functions.
15765
15766 2004-05-18  Karl Berry  <karl@gnu.org>
15767
15768         * config/srclist.txt: break link for vasnprintf.c.
15769
15770 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15771
15772         Port obstack to the AS/400, where pointers are 16 bytes wide and
15773         you cannot cast an integer to a valid pointer.  This patch is
15774         currently waiting to be integrated into glibc; see
15775         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
15776
15777         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
15778         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
15779         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
15780         (struct obstack): temp member is now a union of a pointer and
15781         an integer, instead of an integer.  All integer uses changed.
15782         This does not affect the physical layout of struct obstack,
15783         except on hosts (like the AS/400) where the size or alignment of
15784         void * is greater than that of ptrdiff_t.
15785         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
15786         __STDC__)]: Store temporary in pointer member of union, not
15787         integer member.
15788         * lib/obstack.c: Include <stddef.h>, for offsetof.
15789         (struct fooalign): Remove; it doesn't need a name.
15790         (union fooround): Change double to long double, and add void *.
15791         (DEFAULT_ALIGNMENT): Use offsetof to compute.
15792         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
15793         not a macro.  Hence the values are always int; so remove all
15794         casts-to-int in uses.
15795
15796 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15797
15798         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
15799         we can get this patch merged into glibc.
15800
15801 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15802             Paul Eggert  <eggert@cs.ucla.edu>
15803
15804         * m4/argp: Depend on alloca.
15805
15806 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15807             Paul Eggert  <eggert@cs.ucla.edu>
15808
15809         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
15810         freecoding.
15811
15812 2004-05-17  Bruno Haible  <bruno@clisp.org>
15813
15814         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
15815         precision that consists of a '.' followed by an empty digit string.
15816         Patch by Tor Lillqvist <tml@iki.fi>.
15817
15818 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15819
15820         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
15821         for backward compatibility with older code.  We need our own
15822         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
15823         it under some other name, and our alloca.h will define it.
15824
15825 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15826             Derek Price  <derek@ximbiot.com>
15827
15828         * lib/alloca.c: Include <alloca.h>, to get our interface.
15829         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
15830         include <alloca.h> first.  Use C89 prototype for alloca; this
15831         requires including <stddef.h> for size_t.  Use extern "C" if C++.
15832         Use #elif for simplicity, since we can assume C89 now.
15833         Don't try to source the system alloca.h since it will not be found
15834         and to prevent recursively including its replacement.
15835         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
15836         * lib/regex.c: Likewise.
15837
15838 2004-05-16  Derek Price  <derek@ximbiot.com>
15839             Paul Eggert  <eggert@cs.ucla.edu>
15840
15841         getline cleanup.  This changes the getndelim2 API: both order of
15842         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
15843         no delimiter).
15844
15845         * lib/getline.c: Don't include stddef.h or stdio.h, since our
15846         interface does that.
15847         (getline): Always use getdelim, so that we don't have two
15848         copies of this code.
15849         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
15850         if available.
15851         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
15852         (GETNDELIM2_MAXIMUM): New macro.
15853         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
15854         instead of the old practice of delim2==0.  All callers changed.
15855         Return -1 on overflow, instead of returning junk.
15856         Do not set *linesize unless allocation succeeds.
15857         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
15858         that we include sys/types.h.
15859         * lib/getnline.h: Likewise.
15860         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
15861         (getndelim2): Reorder arguments.
15862         * lib/getnline.c (getnline, getndelim):
15863         Don't discard the NMAX argument.
15864         (getnline): Invoke getndelim, to avoid code duplication.
15865         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
15866         of (size_t) -1 by callers of the getnline family.
15867
15868 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15869
15870         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
15871         Check for gettimeofday.
15872         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
15873         Check for settimeofday, stime.
15874
15875 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15876
15877         * lib/nanosleep.c (suspended): Change its type from int to
15878         sig_atomic_t volatile.
15879         (first_call): Make it private to rpl_nanosleep, and have it
15880         be zero initially as that's a bit faster.
15881         (my_usleep): Round up fractional times instead of truncating them,
15882         as this is the usual meaning for 'sleep'.
15883
15884         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
15885         doesn't work.
15886         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
15887         (ENOSYS): Define if not defined.
15888         (settime): Fall back on stime if it exists and settimeofday fails.
15889         But don't bother with fallbacks if a method fails with errno == EPERM.
15890
15891 2004-05-11  Jim Meyering  <jim@meyering.net>
15892
15893         Prior to this change, the save_cwd caller required read access to the
15894         current directory on most systems (ones with the fchdir function).
15895
15896         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
15897         fails, try write-only, and finally, resort to using xgetcwd.
15898
15899 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15900
15901         * lib/obstack.c, obstack.h: Import changes from libc.
15902
15903 2004-04-28  Bruno Haible  <bruno@clisp.org>
15904
15905         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
15906         also implicitly appends .exe to executables.
15907         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
15908         accepts Windows pathnames.
15909         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15910         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15911         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
15912         Treat Cygwin like Windows, since it now accepts Windows pathnames.
15913         Reported by Derek Robert Price <derek@ximbiot.com>.
15914
15915 2004-04-21  Karl Berry  <karl@gnu.org>
15916
15917         * config/srclist.txt (localcharset.c): break sync.
15918
15919 2004-04-20  Paul Eggert  <eggert@twinsun.com>
15920
15921         * m4/host-os.m4: Add a copyright notice.
15922
15923 2004-04-20  Jim Meyering  <jim@meyering.net>
15924
15925         Change UTILS_ to gl_ in AC_DEFINE'd names.
15926         Change utils_- and jm_-prefixed variables, too.
15927         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
15928         UTILS_FUNC_MKDIR_TRAILING_SLASH.
15929         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
15930
15931         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
15932         Don't emit trailing blanks.
15933         Also rename jm_-prefixed variables to have gl_ prefix.
15934
15935         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
15936         Also rename jm_-prefixed variables to have gl_ prefix.
15937
15938         * m4/jm-macros.m4: Reflect the renamings.
15939         * m4/prereq.m4: Likewise.
15940
15941 2004-04-20  Jim Meyering  <jim@meyering.net>
15942
15943         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
15944         memory.
15945
15946 2004-04-20  Jim Meyering  <jim@meyering.net>
15947             Bruno Haible  <bruno@clisp.org>
15948
15949         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
15950         memory when realloc fails.
15951
15952 2004-04-19  Jim Meyering  <jim@meyering.net>
15953
15954         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
15955         now that readutmp.c may call `free (0)'.
15956
15957 2004-04-19  Bruno Haible  <bruno@clisp.org>
15958
15959         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
15960         * m4/inttypes_h.m4: Likewise.
15961         * m4/stdint_h.m4: Likewise.
15962         * m4/intmax_t.m4: Likewise.
15963         * m4/uintmax_t.m4: Likewise.
15964
15965 2004-04-18  Jim Meyering  <jim@meyering.net>
15966
15967         * m4/prereq.m4: Don't forbid jm_ prefix.
15968
15969         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
15970         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
15971         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
15972         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
15973         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
15974         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
15975         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
15976         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
15977         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
15978         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
15979         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
15980         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
15981         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
15982         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
15983         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
15984         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
15985         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
15986         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
15987         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
15988
15989 2004-04-18  Jim Meyering  <jim@meyering.net>
15990
15991         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
15992         failure, don't leak memory and do call END_UTMP_ENT.
15993
15994 2004-04-16  Jim Meyering  <jim@meyering.net>
15995
15996         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
15997         coreutils' stat program.
15998         (gl_PREREQ): Don't require jm_PREREQ_STAT.
15999
16000 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16001
16002         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16003         C89.
16004         (CHAR_BIT): Remove, since we assume C89.
16005         Include <stdint.h> if available, as per current Autoconf CVS advice.
16006
16007 2004-03-31  Jim Meyering  <jim@meyering.net>
16008
16009         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16010         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16011         * m4/xalloc.m4: Likewise.
16012
16013 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16014
16015         Merge from coreutils.
16016
16017         * m4/inttostr.m4: New file.
16018         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16019         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16020         Require gl_CLOCK_TIME.
16021         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16022
16023 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16024
16025         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16026         not bool, to be more consistent with Unix conventions.
16027         Suggested by Bruno Haible.
16028
16029         Merge from coreutils.
16030
16031         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16032         * lib/umaxtostr.c: New files.
16033
16034         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16035         the usual <time.h> dance.
16036         (get_date): Change signature to support fractional time stamps.
16037         All callers changed.
16038         * lib/getdate.y: Include "getdate.h" first, as we can now
16039         assume C89 and don't need to worry about 'const'.
16040         Similarly, include "unlocked-io.h" near start, not in middle.
16041         Include <limits.h>.
16042         (textint.value): Use long int rather than int.
16043         (textint.digits): Use size_t rather than int.
16044         (BILLION, LOG10_BILLION): New constants.
16045         (parser_control): New member rel_ns.  Members day_ordinal,
16046         time_zone, month, day, hour, minutes, rel_year, rel_month,
16047         rel_day, rel_hour, rel_minutes, rel_seconds
16048         are now long int, not int.  Member seconds is now struct timespec,
16049         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16050         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16051         not int.
16052         (%union.intval): Now long int, not int.
16053         New member timespec.
16054         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16055         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16056         (spec): Now is a timespec or an item list.
16057         (timespec, items): New nonterminals.
16058         (time, rel, relunit, number, get_date):
16059         Add support for fractional seconds.
16060         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16061         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16062         (to_hour): First arg is now long int, not int.
16063         (to_year): Returns long int, not int.
16064         Don't treat year -70 like 70.
16065         (tm_diff): Returns long int, not int.
16066         (lookup_word): Use bool instead of int when appropriate.
16067         (yylex): Use size_t for count, not int.
16068         Detect overflow when parsing large integer constants.
16069         Add support for fractions.
16070         (get_date): Make pointers 'const' if possible.
16071         Use more-portable code to detect integer overflow.
16072         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16073         Don't use ctime; it's not reliable if the year has >4 digits.
16074
16075         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16076         This is for compatibility with BSD.
16077
16078         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16079         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16080         From coreutils' system.h.
16081
16082         * lib/userspec.c: Don't include "posixver.h".
16083         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16084         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16085         compatible extension.  Simplify code by removing a boolean int
16086         that was always nonzero if a string was nonnull.
16087
16088 2004-03-30  Jim Meyering  <jim@meyering.net>
16089
16090         Merge from coreutils.
16091
16092         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16093         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16094         on some systems one must include <grp.h> before it.
16095         Reported by Christian Krackowizer.
16096
16097 2004-03-30  Jim Meyering  <jim@meyering.net>
16098
16099         Merge from coreutils.
16100
16101         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16102
16103         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16104         an empty input stream.
16105
16106         * lib/readtokens.c: Include <stdbool.h>.
16107         (readtoken): Use `size_t' rather than int/long.
16108         All callers adjusted.
16109         Use `bool' rather than `int' where appropriate.
16110         Use memset rather than an explicit loop.
16111         Use x2nrealloc rather than xrealloc.
16112         Allow the use of `\0' as a delimiter.
16113         (readtokens): Likewise.
16114         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16115
16116 2004-03-30  Jim Meyering  <jim@meyering.net>
16117
16118         * m4/realloc.m4: Remove file, since now it does no more than
16119         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16120         the `configure.ac' section of module/realloc.
16121         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16122
16123 2004-03-30  Bruno Haible  <bruno@clisp.org>
16124
16125         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16126         nonnull.
16127
16128 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16129
16130         Merge changes to getloadavg.c from coreutils and Emacs.
16131
16132         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16133         Define to an expression, not to the empty string.
16134         Include cloexec.h and xalloc.h.
16135         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16136         Use set_cloexec_flag rather than rolling our own.
16137         * lib/cloexec.c, lib/cloexec.h: New files.
16138
16139 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16140
16141         * m4/cloexec.m4: New file.
16142
16143 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16144
16145         * lib/getopt.h: Sync with libc CVS.
16146
16147 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16148             Bruno Haible  <bruno@clisp.org>
16149
16150         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16151         mbswidth.
16152
16153 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16154             Bruno Haible  <bruno@clisp.org>
16155
16156         * lib/mbswidth.h: Include <wchar.h> only if
16157         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16158         <wchar.h>.
16159         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16160
16161 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16162
16163         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16164         Sync with libc CVS.
16165         * lib/getopt_int.h: New file, also synced from libc.
16166
16167 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16168
16169         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16170         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16171         Bring back getopt.c, getopt.h, getopt1.c.
16172
16173 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16174
16175         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16176         All uses changed.  Check for sa_sigaction member; this fixes
16177         a bug first reported by Jason Andrade in
16178         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16179
16180 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16181
16182         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16183         '#if' expressions.  Unlike the code it replaces, it does not
16184         depend on (defined _SC_PAGESIZE).  However, it does depend on
16185         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16186         first reported by Jason Andrade in
16187         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16188
16189 2004-02-25  Simon Josefsson  <jas@extundo.com>
16190
16191         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16192
16193 2004-02-25  Simon Josefsson  <jas@extundo.com>
16194
16195         * lib/strdup.h: New file.
16196         * lib/strdup.c: Include it.
16197         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16198         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16199
16200 2004-02-23  Karl Berry  <karl@gnu.org>
16201
16202         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16203         (from fencepost.gnu.org:/gd/gnuorg).
16204
16205 2004-02-23  Karl Berry  <karl@gnu.org>
16206
16207         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16208         * config/srclist.txt: add maintain/standards documents.
16209
16210 2004-02-18  Bruno Haible  <bruno@clisp.org>
16211
16212         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16213         Reported by Derek Robert Price <derek@ximbiot.com>.
16214
16215 2004-02-16  Karl Berry  <karl@gnu.org>
16216
16217         * config/mkinstalldirs, install-sh: update from automake.
16218
16219 2004-02-06  Karl Berry  <karl@gnu.org>
16220
16221         * m4/po.m4: update from gettext 0.14.1.
16222
16223 2004-02-06  Karl Berry  <karl@gnu.org>
16224
16225         * lib/config.charset: update from gettext 0.14.1.
16226
16227 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16228
16229         Add comments and code, prompted by suggestions from Bruno Haible
16230         for sh-quote.
16231         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16232         describing the enum quoting_style values.
16233         * lib/quotearg.c (quotearg_alloc): New function.
16234         (quotearg_buffer_restyled): Treat lone { and } as special.
16235         Treat = as special.  Work around bug with older shells
16236         that "see" a '\' that is really the 2nd byte of a multibyte char.
16237         Quote empty string with shell_quoting_style.
16238
16239 2004-02-03  Bruno Haible  <bruno@clisp.org>
16240
16241         * m4/pipe.m4: New file, from GNU gettext.
16242
16243 2004-02-03  Bruno Haible  <bruno@clisp.org>
16244
16245         * lib/pipe.h: New file, from GNU gettext.
16246         * lib/pipe.c: New file, from GNU gettext.
16247
16248 2004-01-27  Bruno Haible  <bruno@clisp.org>
16249
16250         * m4/execute.m4: New file, from GNU gettext.
16251
16252 2004-01-27  Bruno Haible  <bruno@clisp.org>
16253
16254         * lib/execute.h: New file, from GNU gettext.
16255         * lib/execute.c: New file, from GNU gettext.
16256         * lib/w32spawn.h: New file, from GNU gettext.
16257
16258 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16259
16260         Merge from diffutils.
16261
16262         * lib/file-type.c (file_type): Add typed memory objects.
16263         * lib/file-type.h (S_TYPEISTMO): New macro.
16264
16265         * lib/c-stack.h (c_stack_action): Remove argv argument.
16266         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16267         (die): Don't calculate message unless segv_action returns.
16268         (get_stack_location, min_address_from_argv, max_address_from_argv,
16269         volatile stack_base, volatile_stack_size): Remove.
16270         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16271         that every segmentation violation is a stack overflow.  (Ouch!)
16272         See Debian bug 136249 (still outstanding) for more info about why
16273         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16274
16275 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16276
16277         Exit-status fix from coreutils.
16278
16279         Use exit_failure consistently in place of EXIT_FAILURE,
16280         so that program exit statuses are consistent on failure.
16281
16282         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16283         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16284         * lib/argmatch.h: Comment fix to match the above.
16285         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16286         Now a macro referring to exit_failure, instead of a separate
16287         variable.  Include "exitfail.h" to get it.
16288         * lib/xstrtol.h: Include "exitfail.h".
16289         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16290
16291         * lib/long-options.c (parse_long_options): Use prototype
16292         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16293         for clarity.
16294
16295 2004-01-21  Jim Meyering  <jim@meyering.net>
16296
16297         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16298         so as not to conflict with a different-sized __mktime_internal
16299         function in GNU libc.
16300         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16301         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16302
16303 2004-01-20  Karl Berry  <karl@gnu.org>
16304
16305         * config/config.guess: update from config.
16306
16307         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16308
16309 2004-01-20  Bruno Haible  <bruno@clisp.org>
16310
16311         Safer stack allocation.
16312         * lib/setenv.c: Include allocsa.h.
16313         (alloca): Remove fallback definition.
16314         (freea): Remove macro.
16315         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16316         instead of freea.
16317
16318 2004-01-20  Bruno Haible  <bruno@clisp.org>
16319
16320         * m4/eealloc.m4: New file, from GNU gettext.
16321
16322 2004-01-20  Bruno Haible  <bruno@clisp.org>
16323
16324         * m4/allocsa.m4: New file, from GNU gettext.
16325
16326 2004-01-20  Bruno Haible  <bruno@clisp.org>
16327
16328         * lib/xallocsa.h: New file, from GNU gettext.
16329         * lib/xallocsa.c: New file, from GNU gettext.
16330
16331 2004-01-20  Bruno Haible  <bruno@clisp.org>
16332
16333         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16334
16335 2004-01-20  Bruno Haible  <bruno@clisp.org>
16336
16337         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16338         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16339         specially.
16340
16341 2004-01-20  Bruno Haible  <bruno@clisp.org>
16342
16343         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16344         patch.
16345
16346 2004-01-20  Bruno Haible  <bruno@clisp.org>
16347
16348         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16349
16350 2004-01-20  Bruno Haible  <bruno@clisp.org>
16351
16352         * lib/eealloc.h: New file.
16353
16354 2004-01-20  Bruno Haible  <bruno@clisp.org>
16355
16356         * lib/binary-io.h: Avoid warnings on Cygwin.
16357
16358 2004-01-20  Bruno Haible  <bruno@clisp.org>
16359
16360         * lib/allocsa.h: New file, from GNU gettext.
16361         * lib/allocsa.c: New file, from GNU gettext.
16362
16363 2004-01-18  Karl Berry  <karl@gnu.org>
16364
16365         * doc/gpl.texi, doc/lgpl.texi: new files.
16366
16367 2004-01-18  Karl Berry  <karl@gnu.org>
16368
16369         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16370         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16371
16372 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16373
16374         Merge from coreutils.
16375
16376         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16377         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16378         (gl_DEFAULT_POSIX2_VERSION): Move
16379         the documentation from 'configure' into 'config.hin',
16380         so that 'configure --help' isn't burdened by it and
16381         we don't have to worry about its formatting there.
16382         Reword the documentation so that it's more succinct
16383         and can be run together into a single paragraph.
16384         * m4/same.m4 (gl_SAME): Check for pathconf.
16385
16386 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16387
16388         Merge from coreutils.
16389
16390         * lib/posixver.c: Include posixver.h.
16391
16392         * lib/same.c: Include <stdbool.h>, <limits.h>.
16393         (_POSIX_NAME_MAX): Define if not defined.
16394         (MIN): New macro.
16395         (same_name): If file names are silently truncated, report
16396         that the file names are the same if they are the same after
16397         the silent truncation.
16398
16399         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16400         conversion function.
16401         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16402         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16403         longer needed.
16404
16405 2004-01-15  Jim Meyering  <jim@meyering.net>
16406
16407         Merge from coreutils.
16408
16409         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16410         if no library is required.
16411         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16412         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16413         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16414         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16415         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16416         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16417         value, $ac_cv_search_crypt, if it's "none required".
16418         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16419         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16420         not gl_FUNC_GETLOADAVG.
16421         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16422         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16423
16424 2004-01-15  Jim Meyering  <jim@meyering.net>
16425
16426         Merge from coreutils.
16427
16428         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16429         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16430         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16431
16432         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16433         optional configure-time default.
16434
16435         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16436
16437         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16438
16439 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16440
16441         Merge from coreutils.
16442
16443         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16444         value, $ac_cv_search_nanosleep, if it's "none required".
16445
16446 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16447
16448         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16449         with like-named macro in fnmatch.c.
16450         (EXT): Use an internal constant instead.
16451
16452         Merge fnmatch patches from glibc.
16453         * lib/fnmatch.c (mbsinit): Remove define.
16454         Add libc_hidden_ver (__fnmatch, fnmatch).
16455         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16456         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16457
16458 2004-01-14  Karl Berry  <karl@gnu.org>
16459
16460         * config/install-sh: update from automake.
16461
16462 2004-01-13  Karl Berry  <karl@gnu.org>
16463
16464         * config/install-sh: update from automake.
16465
16466 2004-01-09  Karl Berry  <karl@gnu.org>
16467
16468         * config/install-sh: update from automake.
16469
16470 2004-01-05  Karl Berry  <karl@gnu.org>
16471
16472         * config/config.{sub,guess}: update from config.
16473
16474 2003-12-31  Karl Berry  <karl@gnu.org>
16475
16476         * config/depcomp: update from automake.
16477
16478 2003-12-14  Karl Berry  <karl@gnu.org>
16479
16480         * lib/config.charset: update from gettext-runtime.
16481
16482 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16483
16484         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16485         Bug reported by Alfred M. Szmidt.
16486
16487 2003-12-03  Bruno Haible  <bruno@clisp.org>
16488
16489         * m4/gettext.m4: Upgrade from gettext-0.13.
16490         * m4/po.m4: Upgrade from gettext-0.13.
16491         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16492         * m4/intmax.m4: New file, from gettext-0.13.
16493         * m4/printf-posix.m4: New file, from gettext-0.13.
16494
16495 2003-11-29  Karl Berry  <karl@gnu.org>
16496
16497         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16498
16499 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16500             Bruno Haible  <bruno@clisp.org>
16501
16502         * lib/printf-parse.h: Don't include sys/types.h.
16503         (ARG_NONE): New macro.
16504         (char_directive): Change type of *arg_index fields to size_t.
16505         * lib/printf-parse.c: Don't include sys/types.h.
16506         (SSIZE_MAX): Remove macro.
16507         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
16508         Remove unnecessary overflow check.
16509         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
16510         fields.
16511
16512 2003-11-25  Bruno Haible  <bruno@clisp.org>
16513
16514         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
16515
16516 2003-11-25  Bruno Haible  <bruno@clisp.org>
16517
16518         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
16519         gt_TYPE_SSIZE_T.
16520
16521 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16522
16523         * modules/alloca: Remove dependency on xalloc.
16524
16525 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16526
16527         * lib/alloca.c: Remove dependency on xalloc module.
16528         (xalloc_die): Remove.
16529         (memory_full) [!defined emacs]: New macro.
16530         [!defined emacs]: Don't include xalloc.h.
16531         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
16532         address arithmetic overflows.  Change datatypes a bit to avoid
16533         unnecessary casts.
16534
16535 2003-11-22  Jim Meyering  <jim@meyering.net>
16536
16537         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
16538         s/size/size_t/.
16539
16540 2003-11-21  Karl Berry  <karl@gnu.org>
16541
16542         * config/config.{sub,guess}: update from config.
16543
16544 2003-11-18  Karl Berry  <karl@gnu.org>
16545
16546         * config/config.{sub,guess}: update from config.
16547
16548         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
16549
16550 2003-11-17  Paul Eggert  <eggert@twinsun.com>
16551
16552         * README: Mention that S+T cannot overflow if S is the size of
16553         an existing object and T is sufficiently small.
16554
16555 2003-11-17  Jim Meyering  <jim@meyering.net>
16556
16557         On systems without utime and without a utimes function capable of
16558         dealing with a NULL struct utimbuf* argument, this utime replacement
16559         could -- in unusual circumstances -- leak a file descriptor.
16560         * lib/utime.c: Include <unistd.h> and <errno.h>.
16561         (utime_null): Be sure to close `fd' and to preserve errno.
16562         Reported by Geoff Collyer via Arnold Robbins.
16563
16564 2003-11-17  Bruno Haible  <bruno@clisp.org>
16565
16566         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
16567         (Depends-on): Add xsize.
16568
16569 2003-11-17  Bruno Haible  <bruno@clisp.org>
16570
16571         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
16572
16573 2003-11-17  Bruno Haible  <bruno@clisp.org>
16574
16575         * lib/vasnprintf.c (alloca): Remove fallback definition.
16576         (freea): Remove definition.
16577         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
16578         Reported by Paul Eggert.
16579
16580 2003-11-16  Paul Eggert  <eggert@twinsun.com>
16581             Bruno Haible  <bruno@clisp.org>
16582
16583         Protect against address arithmetic overflow.
16584         * lib/printf-args.h: Include stddef.h.
16585         (arguments): Change type of field 'count' to size_t.
16586         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
16587         'unsigned int' where appropriate.
16588         * lib/printf-parse.h: Include sys/types.h.
16589         (char_directive): Change type of *arg_index fields to ssize_t.
16590         (char_directives): Change type of fields 'count', max_*_length to
16591         size_t.
16592         * lib/printf-parse.c: Include sys/types.h and xsize.h.
16593         (SSIZE_MAX): Define fallback value.
16594         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
16595         instead of 'int' where appropriate. Check a_allocated, d_allocated
16596         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
16597         * lib/vasnprintf.c: Include xsize.h.
16598         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
16599         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
16600         overflow. Avoid wraparound when converting a width or precision from
16601         decimal to binary.
16602
16603 2003-11-16  Bruno Haible  <bruno@clisp.org>
16604
16605         Update from GNU gettext.
16606         * lib/printf-parse.c: Generalize to it can be compiled for wide
16607         strings.
16608         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
16609         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
16610         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
16611         SNPRINTF): New macros.
16612         Don't include <alloca.h> if the file is used inside libintl.
16613         (local_wcslen): New function, for Solaris 2.5.1.
16614         (VASNPRINTF): Use it instead of wcslen.
16615
16616 2003-11-16  Bruno Haible  <bruno@clisp.org>
16617
16618         * lib/xsize.h (xmax): New function.
16619         (xsum, xsum3, xsum4): Declare as "pure" functions.
16620
16621 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16622
16623         * modules/xalloc (Files): Undo latest change, since xalloc.h
16624         no longer needs SIZE_MAX or PTRDIFF_MAX.
16625
16626 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16627
16628         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
16629         gl_PTRDIFF_MAX.
16630
16631 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16632
16633         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
16634         "return", to pacify some unknown compiler.  Problem reported
16635         by Joerg Schilling.
16636
16637 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16638
16639         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
16640         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
16641         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
16642         heuristic is just as accurate as far as we know, and it removes a
16643         dependency on size_max.m4 and ptrdiff_max.m4.
16644
16645 2003-11-11  Bruno Haible  <bruno@clisp.org>
16646
16647         * modules/xsize (Files): Add m4/size_max.m4.
16648         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
16649
16650 2003-11-11  Bruno Haible  <bruno@clisp.org>
16651
16652         * m4/size_max.m4: New file.
16653         * m4/ptrdiff_max.m4: New file.
16654         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
16655         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
16656         (gl_XALLOC): Invoke it.
16657
16658 2003-11-11  Bruno Haible  <bruno@clisp.org>
16659
16660         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
16661         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
16662         defined.
16663
16664 2003-11-10  Paul Eggert  <eggert@twinsun.com>
16665
16666         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
16667         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
16668         rejected some allocations of exactly SIZE_MAX - 2 bytes.
16669         From Bruno Haible.
16670         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
16671         not (size_t) -1, since it's defined here.
16672
16673 2003-11-09  Karl Berry  <karl@gnu.org>
16674
16675         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
16676
16677 2003-11-06  Paul Eggert  <eggert@twinsun.com>
16678
16679         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
16680         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
16681         Reject sizes of exactly SIZE_MAX bytes.
16682         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
16683         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
16684
16685 2003-11-05  Bruno Haible  <bruno@clisp.org>
16686
16687         * lib/xsize.h: Include limits.h, to avoid a possible collision with
16688         SIZE_MAX defined in <limits.h> on Solaris.
16689
16690 2003-11-04  Jim Meyering  <jim@meyering.net>
16691
16692         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
16693         variable names, rather than @VAR@.
16694         * modules/poll: Likewise.
16695
16696 2003-11-04  Bruno Haible  <bruno@clisp.org>
16697
16698         * modules/xsize: New file.
16699         * modules/linebreak: Depend on xsize.
16700         * MODULES.html.sh (func_all_modules): Add xsize.
16701
16702 2003-11-04  Bruno Haible  <bruno@clisp.org>
16703
16704         * m4/xsize.m4: New file.
16705
16706 2003-11-04  Bruno Haible  <bruno@clisp.org>
16707
16708         * lib/xsize.h: New file.
16709         * lib/linebreak.c: Include xsize.h.
16710         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
16711         argument for overflow.
16712         Suggested by Paul Eggert.
16713
16714 2003-11-03  Karl Berry  <karl@gnu.org>
16715
16716         * config/config.{guess,sub}: update from config.
16717
16718 2003-11-03  Jim Meyering  <jim@meyering.net>
16719
16720         * modules/userspec (lib_SOURCES): Add userspec.h.
16721         (Include): Add "userspec.h".
16722         Improve description.
16723
16724 2003-11-03  Jim Meyering  <jim@meyering.net>
16725
16726         * lib/userspec.c: Include "userspec.h".
16727         * lib/userspec.h: New file.
16728
16729 2003-11-03  Bruno Haible  <bruno@clisp.org>
16730
16731         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
16732
16733 2003-11-03  Bruno Haible  <bruno@clisp.org>
16734
16735         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
16736         available, to avoid (extremely rare) race condition.
16737         Suggested by Paul Eggert.
16738
16739 2003-11-02  Karl Berry  <karl@gnu.org>
16740
16741         * config/srclist.txt (vasprintf.c): sync broken, sigh.
16742
16743 2003-10-31  Paul Eggert  <eggert@twinsun.com>
16744
16745         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
16746         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
16747         (read_filesystem_list): Set and use me_type_malloced.
16748         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
16749         whatever the type happens to be), for brevity and consistency.
16750         Check for size calculation overflow on Alphas running OSF/1.
16751
16752 2003-10-31  Jim Meyering  <jim@meyering.net>
16753
16754         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
16755
16756         * lib/linebuffer.c: Include <string.h> for declaration of memset.
16757
16758 2003-10-30  Paul Eggert  <eggert@twinsun.com>
16759             Bruno Haible  <bruno@clisp.org>
16760
16761         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
16762         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
16763
16764 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16765
16766         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
16767         netbsd*-gnu*.  Suggested by Robert Millan.
16768
16769 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16770
16771         * modules/group-member: Depend on stdbool.
16772
16773 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16774
16775         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
16776
16777 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16778
16779         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
16780         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
16781         after the 'gnu' in these cases.  This fixes some bugs in the
16782         previous change, and is based on suggestions by Robert Millan.
16783
16784 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16785
16786         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
16787         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
16788         no longer needed.
16789         * lib/quotearg.c (quotearg_n_options): Use it.
16790         * lib/group-member.c: Include <stdbool.h>.
16791         (free_group_info): Arg is now const *; don't free arg.
16792         (get_group_info): Now returns bool and accepts struct group_info *,
16793         rather than returning a malloc'ed struct group_info *.
16794         All uses changed.  Check for overflow in internal size calculation.
16795
16796         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
16797         rather than xmalloc/xrealloc.
16798         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
16799         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
16800         conformance bug: the old code used a pointer after freeing the
16801         storage that it addressed.
16802         * lib/hash.c (hash_initialize): Simplify the code by using
16803         xalloc_oversized rather than doing it by hand.
16804         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
16805         the buffer preserved.  Use free and xmalloc instead.
16806         * lib/quotearg.c (quotearg_n_options): Likewise.
16807         Use a simpler test for size overflow.  Don't use xalloc_oversized
16808         because unsigned int might be wider than size_t (!); this suggests
16809         that we should switch from unsigned int to size_t for slot numbers.
16810
16811 2003-10-28  Paul Eggert  <eggert@twinsun.com>
16812
16813         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
16814         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
16815         NetBSD kernels.  Requested by Richard Stallman.
16816
16817 2003-10-27  Paul Eggert  <eggert@twinsun.com>
16818
16819         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
16820         to allocate the returned structure.  Do not allocate a subarray,
16821         as x2nrealloc will do that.
16822         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
16823         instead of xnrealloc.
16824         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
16825
16826 2003-10-27  Bruno Haible  <bruno@clisp.org>
16827
16828         * lib/stdbool_.h: Better support for BeOS.
16829
16830 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16831
16832         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
16833         now uses inline.
16834
16835 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16836
16837         * lib/xalloc.h (xalloc_oversized): New static inline function, for
16838         callers that want to do their own size-overflow checking.  Include
16839         <stdbool.h>, since xalloc_oversized returns bool.
16840         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
16841         to use xalloc_oversized.
16842
16843         Add two functions x2realloc, x2nrealloc, for programs that grow
16844         arrays dynamically by doubling their sizes.
16845         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
16846         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
16847         New functions.
16848
16849         Port to C99 semantics for 'inline' of external functions.
16850         Bug reported by Bruno Haible.
16851         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
16852         with the old contents of xnmalloc.
16853         (xnmalloc, xmalloc): Use it.
16854         (xnrealloc_inline): New static inline function,
16855         with the old contents of xnrealloc.
16856         (xnrealloc, xrealloc): Use it.
16857
16858         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
16859         that.
16860
16861 2003-10-26  Karl Berry  <karl@gnu.org>
16862
16863         * config/srclist.txt (COPYING.DOC): no longer available from
16864         /gd/gnuorg; don't know where the ultimate source is.
16865
16866 2003-10-25  Paul Eggert  <eggert@twinsun.com>
16867
16868         Fix several address-calculation bugs in the hash modules,
16869         plus some minor code cleanup.
16870
16871         * lib/hash.h: Include <stdbool.h>, for bool.
16872         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
16873         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
16874         hash_get_n_entries, hash_get_max_bucket_length,
16875         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
16876         hash_rehash): Use size_t rather than unsigned.
16877         * lib/hash.c (struct hash_table, hash_get_n_buckets,
16878         hash_get_n_buckets_used, hash_get_n_entries,
16879         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
16880         hash_get_entries, hash_do_for_each, hash_string, is_prime,
16881         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
16882         Likewise.
16883         (SIZE_MAX): Define if not defined.
16884         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
16885         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
16886         hash_print):
16887         Use const * when possible.
16888         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
16889         (check_tuning): Fix bug: if tuning parameters were very close to
16890         0 or 1, rounding errors could have caused subscript violations.
16891         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
16892         (hash_initialize): Add 'fail:' label
16893         to free table and return NULL, and use it to simplify code.
16894         Use calloc rather than clearing the storage ourself.
16895         (hash_initialize, hash_rehash): Check for arithmetic overflow in
16896         buffer size calculations.
16897         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
16898         Include <stddef.h>, for size_t.
16899         * lib/hash-pjw.c (hash_pjw): Likewise.
16900         Switch to method described by Bruno Haible.
16901         Include <limits.h>, for CHAR_BIT.
16902         (SIZE_BITS): New macro.
16903
16904 2003-10-23  Paul Eggert  <eggert@twinsun.com>
16905
16906         * m4/getline.m4 (AM_FUNC_GETLINE):
16907         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
16908         hosts.  Problem reported by Derek Robert Price in
16909         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
16910         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
16911         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
16912
16913 2003-10-21  Paul Eggert  <eggert@twinsun.com>
16914
16915         * lib/getndelim2.c (getndelim2): When size calculation overflows,
16916         ceiling the allocation at NMAX bytes rather than silently
16917         discarding input bytes before NMAX is reached.  This makes
16918         a difference only if NMAX exceeds SIZE_MAX / 2.
16919
16920         * lib/obstack.c: Merge from glibc.
16921         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
16922         Add libc_hidden_def (_obstack_newchunk).
16923         (_obstack_free) [! defined _LIBC]: Remove.
16924         [defined _LIBC]: Make a strong alias from obstack_free, rather than
16925         a clone of the function body.
16926         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
16927         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
16928
16929         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
16930         glibc.
16931         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
16932         arg to memcpy.
16933
16934         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
16935         (obstack_ptr_grow_fast, obstack_int_grow_fast):
16936         Don't use lvalue casts, as GCC plans to remove support for them
16937         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
16938         was also present in the non-GCC version, indicating that this
16939         code had always been buggy and had never been widely used.
16940         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
16941         Use the fast variant of each macro, rather than copying the
16942         definiens of the fast variant; that way, we'll be more likely to
16943         catch future bugs in the fast variants.
16944
16945 2003-10-20  Bruno Haible  <bruno@clisp.org>
16946
16947         * modules/wait-process: New file.
16948         * MODULES.html.sh (func_all_modules): Add wait-process.
16949
16950 2003-10-20  Bruno Haible  <bruno@clisp.org>
16951
16952         * m4/wait-process.m4: New file.
16953
16954 2003-10-20  Bruno Haible  <bruno@clisp.org>
16955
16956         * lib/wait-process.h: New file, from GNU gettext.
16957         * lib/wait-process.c: New file, from GNU gettext.
16958
16959 2003-10-19  Jim Meyering  <jim@meyering.net>
16960
16961         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
16962         HPUX 10.20.
16963
16964 2003-10-18  Karl Berry  <karl@gnu.org>
16965
16966         * config/config.guess: update from config.
16967
16968 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16969
16970         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
16971         (getgroups): First arg is int, not size_t.
16972         Don't let 'free' mangle errno.
16973
16974 2003-10-16  Paul Eggert  <eggert@twinsun.com>
16975
16976         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
16977
16978 2003-10-16  Karl Berry  <karl@gnu.org>
16979
16980         * config/config.{guess,sub}: update from config.
16981
16982 2003-10-16  Jim Meyering  <jim@meyering.net>
16983
16984         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
16985         memcpy.
16986
16987 2003-10-15  Paul Eggert  <eggert@twinsun.com>
16988
16989         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
16990         (SIZE_MAX): Remove.
16991         (new_exclude, add_exclude_file): Initial size no longer needs to
16992         be a power of 2.
16993         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
16994         our own address arithmetic overflow checking.
16995
16996         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
16997         (fnmatch): Do not alloca more than 2000 wide characters;
16998         instead, use malloc for large buffers.
16999         Check for address arithmetic overflow, and return -1
17000         with errno set to ENOMEM in that case.
17001         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17002         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17003         instead, return -1.  Check for address arithmetic overflow.
17004
17005 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17006
17007         Handle invalid suffixes and overflow independently, so that
17008         callers can treat them independently as needed.  Fix some bugs in
17009         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17010         suffix for a human-readable blocksize.  The major caller-visible
17011         change is the addition of a new
17012         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17013         that both overflow and suffix chars were found.
17014
17015         * lib/human.c (humblock): Don't check separately for invalid suffix
17016         char; that is xstrtoumax's job (now that its bug is fixed).
17017         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17018         INTMAX_MAX]: New macros.
17019         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17020         TYPE_MAXIMUM): New macros.
17021         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17022         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17023         if overflow occurs, as it's what __strtol does and it's more useful
17024         in practice.
17025         (__xstrtol): If __strtol reports some error other than ERANGE,
17026         reflect it to the caller as LONGINT_INVALID.  If it reports
17027         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17028         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17029         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17030         value.
17031         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17032         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17033         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17034         [defined UINTMAX_MAX]: New macros.
17035
17036 2003-10-14  Bruno Haible  <bruno@clisp.org>
17037
17038         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17039
17040 2003-10-14  Bruno Haible  <bruno@clisp.org>
17041
17042         * m4/sig_atomic_t: New file, from GNU gettext.
17043         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17044
17045 2003-10-14  Bruno Haible  <bruno@clisp.org>
17046
17047         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17048         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17049         Also use volatile where needed.
17050
17051 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17052
17053         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17054         Change maintainer from Bruno Haible to 'all'.
17055
17056 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17057
17058         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17059
17060 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17061
17062         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17063         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17064         and define in terms of the other primitives.
17065         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17066         (SIZE_MAX): Define if not already defined.
17067         (array_size_overflow): New function.
17068         (xalloc_die): Abort instead of exiting if 'error' returns.
17069         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17070         (xmalloc, xrealloc): Use them.
17071         (xcalloc): Check for address arithmetic overflow.
17072         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17073         a bit faster than strcpy.
17074
17075 2003-10-10  Simon Josefsson  <jas@extundo.com>
17076
17077         * modules/argp (Depends-on): Add restrict and strcase.
17078
17079 2003-10-10  Simon Josefsson  <jas@extundo.com>
17080
17081         * m4/argp.m4: Add AC_C_INLINE.
17082
17083 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17084
17085         Merge getpass from libc, plus a few fixes.
17086
17087         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17088         Include <stdbool.h>.
17089         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17090         __fsetlocking to empty.
17091         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17092         do include <bits/libc-lock.h>.
17093         Do not include <fcntl.h>; not needed.
17094         [_LIBC]: Include <wchar.h>.
17095         (NOTCANCEL_MODE): New macro.
17096         (flockfile, funlockfile) [_LIBC]: New macros.
17097         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17098         [!_LIBC]: New macros.
17099         (call_fclose): New function.
17100         (getpass): Use it.  Save tty stream separately; this simplifies the
17101         code and makes it more reliable if stdin happens to equal stdout.
17102         Invoke __fsetlocking on tty.
17103         Handle thread cancellation if needed.
17104         Namespace cleanup (use __tcgetattr, __getline).
17105         Use bool for Booleans.
17106         [USE_IN_LIBIO]: Handle wide streams.
17107         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17108         stream might go where.
17109
17110         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17111         doesn't have to include <stdio.h> before us.
17112         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17113         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17114         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17115         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17116         if not declared, so that we can use getpass.c code from libc without
17117         rewriting it.
17118         (flockfile, ftrylockfile, funlockfile): New macros.
17119
17120 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17121
17122         * modules/getpass: Depend on stdbool.
17123
17124 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17125
17126         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17127
17128 2003-10-07  Karl Berry  <karl@gnu.org>
17129
17130         * config/config.{guess,sub}: update from config.
17131
17132 2003-10-06  Jim Meyering  <jim@meyering.net>
17133             Bruno Haible  <bruno@clisp.org>
17134
17135         This lets translators provide better translations for the
17136         "Written by ..." part of --version output.
17137         * lib/version-etc.h: Include stdarg.h.
17138         (version_etc_copyright): Declare as readonly.
17139         (version_etc): Make this function variadic with a NULL-terminated list
17140         of author name strings.
17141         (version_etc_va): New declaration.
17142         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17143         (version_etc_copyright): Declare as readonly.
17144         (version_etc_va): New function. Provide a different translatable string
17145         for each possible number of authors < 10. Abbreviate when there are 10
17146         authors or more.
17147         (version_etc): Make this function variadic. Call version_etc_va.
17148         Suggestion from Gary V. Vaughan.
17149
17150         * lib/long-options.h (parse_long_options): Change prototype: the
17151         authors string is moved to the end and becomes variadic.
17152         * lib/long-options.c: Include stdarg.h.
17153         (parse_long_options): Make this function variadic, too.
17154         Call version_etc_va, not version_etc.
17155
17156 2003-10-06  Bruno Haible  <bruno@clisp.org>
17157
17158         * modules/version-etc-2: Remove file.
17159         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17160
17161 2003-10-06  Bruno Haible  <bruno@clisp.org>
17162
17163         * modules/fatal-signal: New file.
17164         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17165
17166 2003-10-06  Bruno Haible  <bruno@clisp.org>
17167
17168         * m4/fatal-signal.m4: New file.
17169         * m4/signalblocking.m4: New file, from GNU gettext.
17170
17171 2003-10-06  Bruno Haible  <bruno@clisp.org>
17172
17173         * lib/version-etc-2.h: Remove file.
17174         * lib/version-etc-2.c: Remove file.
17175
17176 2003-10-06  Bruno Haible  <bruno@clisp.org>
17177
17178         * lib/fatal-signal.h: New file, from GNU gettext.
17179         * lib/fatal-signal.c: New file, from GNU gettext.
17180
17181 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17182
17183         * README: Rework advice for preventing empty .o files.
17184         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17185         not <sys/types.h>.
17186
17187 2003-10-04  Karl Berry  <karl@gnu.org>
17188
17189         * lib/argp*: update from libc.
17190
17191 2003-10-04  Karl Berry  <karl@gnu.org>
17192
17193         * config/config.{guess,sub}: update from config.
17194
17195 2003-10-02  Bruno Haible  <bruno@clisp.org>
17196
17197         * modules/lchown (Include): Add lchown.h.
17198         * modules/time_r (Include): Use "..." syntax.
17199         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17200
17201 2003-10-01  Simon Josefsson  <jas@extundo.com>
17202
17203         * MODULES.html.sh (func_all_modules): Move gethostname from section
17204         'based on' to section 'lacking' POSIX:2001.
17205
17206 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17207
17208         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17209         to output mode on the same stream.
17210
17211 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17212
17213         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17214         Fix arg typo in previous patch.
17215
17216 2003-09-28  Jim Meyering  <jim@meyering.net>
17217
17218         * lib/error.c: Correct cpp indentation.
17219
17220 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17221
17222         * modules/free: New file.
17223
17224 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17225
17226         * m4/free.m4: New file.
17227
17228 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17229
17230         * lib/minmax.h (MIN, MAX)
17231         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17232         Omit the special code that used __typeof__, since we worry that
17233         it could be more trouble than it's worth.  See:
17234         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17235         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17236
17237         * lib/free.c: New file.
17238
17239 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17240
17241         Trivial fixes to Makefile.am parts of module listings.
17242         * modules/strstr: Append strstr.h to lib_SOURCES.
17243         * modules/strcase: Likewise, for strcase.h.
17244
17245 2003-09-27  Karl Berry  <karl@gnu.org>
17246
17247         * config/mkinstalldirs: update from automake.
17248
17249 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17250
17251         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17252         (error_tail): Do not loop, reallocating temporary buffer, since
17253         the output cannot contain more wide characters than the input
17254         contains bytes, the size must be big enough already.  This avoids
17255         one potential size overflow calculation.  Check for size overflow
17256         when calculating temporary buffer size.  Free temporary buffer
17257         when done, if it was allocated with malloc; this plugs a memory
17258         leak.  Remove casts from void * to pointers, that are no longer
17259         needed now that we're assuming C89 or better.
17260
17261         Merge error changes from glibc.
17262
17263         * lib/error.c, error.h: Update copyright notice header to match glibc.
17264         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17265         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17266         Disable cancellation while printing error.
17267         * lib/error.h: Prepend __ to parameter names.
17268
17269 2003-09-26  Jim Meyering  <jim@meyering.net>
17270
17271         * lib/error.c (error_tail): Move some declarations
17272         into inner scope where the local variables are used.
17273
17274 2003-09-26  Bruno Haible  <bruno@clisp.org>
17275
17276         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17277         stpncpy().
17278         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17279
17280 2003-09-26  Bruno Haible  <bruno@clisp.org>
17281
17282         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17283         (stpncpy): Define as alias for gnu_stpncpy.
17284         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17285
17286 2003-09-25  Simon Josefsson  <jas@extundo.com>
17287
17288         * lib/xgetdomainname.h: New file.
17289         * lib/xgetdomainname.c: New file.
17290
17291 2003-09-25  Simon Josefsson  <jas@extundo.com>
17292             Bruno Haible  <bruno@clisp.org>
17293
17294         * modules/getdomainname: New file.
17295         * modules/xgetdomainname: New file.
17296         * MODULES.html.sh (func_all_modules): Add getdomainname,
17297         xgetdomainname.
17298
17299 2003-09-25  Simon Josefsson  <jas@extundo.com>
17300             Bruno Haible  <bruno@clisp.org>
17301
17302         * m4/getdomainname.m4: New file.
17303
17304 2003-09-25  Simon Josefsson  <jas@extundo.com>
17305             Bruno Haible  <bruno@clisp.org>
17306
17307         * lib/getdomainname.h: New file.
17308         * lib/getdomainname.c: New file.
17309
17310 2003-09-25  Karl Berry  <karl@gnu.org>
17311
17312         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17313
17314 2003-09-25  Karl Berry  <karl@gnu.org>
17315
17316         * config/install-sh: update from automake.
17317
17318 2003-09-25  Bruno Haible  <bruno@clisp.org>
17319
17320         * modules/version-etc-2: New file, from modules/version-etc with
17321         modifications.
17322         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17323
17324 2003-09-25  Bruno Haible  <bruno@clisp.org>
17325
17326         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17327         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17328
17329 2003-09-24  Simon Josefsson  <jas@extundo.com>
17330
17331         * modules/xgethostname: Add xgethostname.h.
17332
17333 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17334
17335         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17336         the buffer associated with the argument.  Bug reported by
17337         Simon Josefsson.
17338
17339 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17340
17341         * README: Document assumptions that 'int' is at least 32 bits
17342         wide, that integer arithmetic is 2's complement without overflow,
17343         that there are no holes in integer values, that adding sizes of
17344         two nonoverlapping objects can't overflow, and that all-bits-zero
17345         yields scalar zero.  Fix spelling and capitalization typos.
17346
17347 2003-09-19  Karl Berry  <karl@gnu.org>
17348
17349         * lib/argp.h: update from libc.
17350
17351 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17352
17353         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17354         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17355         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17356
17357 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17358
17359         * gnulib-tool: Use "test -h", not "test -L", for portability
17360         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17361         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17362         (sed_extract_prog): Issue s commands one-by-one, rather than
17363         using \| in one s command.
17364
17365 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17366
17367         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17368         input error, instead of returning NULL the next time we are called
17369         (and therefore losing track of errno).
17370
17371 2003-09-16  Bruno Haible  <bruno@clisp.org>
17372
17373         * gnulib-tool (func_create_testdir): Warn about duplicated
17374         dependencies.
17375
17376 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17377
17378         * modules/argmatch, modules/fatal, modules/obstack,
17379         modules/xalloc, modules/xgethostname: Sort dependencies by
17380         importance, not alphabetically.
17381
17382 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17383
17384         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17385         fails, so that the caller gets the proper errno.
17386
17387         * lib/readutmp.c (read_utmp): Likewise.
17388         Check for fstat error.  Close stream and free storage
17389         when failing.
17390
17391 2003-09-14  Karl Berry  <karl@gnu.org>
17392
17393         * config/srclist.txt (strdup.c): disable for c89 changes.
17394
17395 2003-09-14  Jim Meyering  <jim@meyering.net>
17396
17397         * lib/getloadavg.c: Correct cpp indentation.
17398         * lib/strdup.c: Likewise.
17399         * lib/vasnprintf.c: Likewise.
17400
17401 2003-09-14  Bruno Haible  <bruno@clisp.org>
17402
17403         * modules/fwriteerror: New file.
17404         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17405
17406 2003-09-14  Bruno Haible  <bruno@clisp.org>
17407
17408         * lib/fwriteerror.h: New file.
17409         * lib/fwriteerror.c: New file.
17410
17411 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17412
17413         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17414         modules/xgethostname, modules/xalloc: Depend on exit.
17415
17416 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17417
17418         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17419
17420         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17421         and AC_MINIX, too, so that their extensions are available.
17422
17423         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17424         This macro has been superseded by gl_BACKUPFILE.
17425
17426         More patches to assume C89 or better.
17427
17428         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17429
17430         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17431         unconditionally.
17432         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17433         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17434         Include <string.h>, <stdlib.h> unconditionally.
17435         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17436         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17437         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17438         headers or for string.h.
17439         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17440         or strtoul.
17441
17442         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17443         headers.
17444         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17445         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17446         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17447         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17448         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17449         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17450         memcpy, memset.
17451         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17452         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17453         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17454         strtol.
17455         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17456         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17457         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17458         strtoul.
17459
17460 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17461
17462         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17463         * lib/obstack.c [!defined _LIBC]: Likewise.
17464         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17465         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17466         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17467
17468         More changes to assume C89 or better.
17469
17470         * lib/error.c (error_tail): Assume vprintf.
17471
17472         * lib/argmatch.c (getenv): Remove decl.
17473         * lib/progreloc.c (get_full_program_name): Define via prototype.
17474         * lib/setenv.c (clearenv): Likewise.
17475         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17476         needed.
17477         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17478         (malloc, memcpy): Remove decls.
17479         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17480         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17481         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17482         (memcpy): Remove macro.
17483         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17484         (__P): Remove.  All uses removed.
17485         (PTR): Remove.  All uses changed to void *.
17486         (CHAR_BIT, NULL): Remove.
17487         (spaces, zeros, memset_space, memset_zero)
17488         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17489         Remove.
17490         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17491         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17492         Define with prototype.
17493         Remove now-unnecessary prototype decl.
17494         (extra_args_spec): Assume ANSI C.  All uses changed.
17495         (extra_args_spec_iso): Remove.
17496         (my_strftime, emacs_strftimeu): Define via prototype.
17497         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17498         unconditionally.
17499         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17500         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17501         (strtoul, strtol): Remove decls.
17502         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
17503         LONG_MAX): Remove.
17504         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17505         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
17506         (LOCALE_PARAM_PROTO): New macro.
17507         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
17508         (INTERNAL (strtol), strtol): Define with a prototype.
17509         (PARAMS): Remove.  All uses removed.
17510         * lib/tempname.c: Include <string.h> unconditionally.
17511         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
17512         * lib/xgethostname.c (main): Define with a prototype.
17513         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
17514         Include <stdlib.h> unconditionally.
17515         (calloc, malloc, realloc, free): Remove decls.
17516         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
17517         Include <stdlib.h> unconditionally.  Sort include file names.
17518         (strtod): Remove.
17519         (xstrtod): Define with a prototype.
17520         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
17521         (strtol, strtoul): Remove decls.
17522
17523 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17524
17525         More patches to assume C89 or better.
17526         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
17527         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
17528         string.h, memchr, STDC_HEADERS.
17529
17530 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17531
17532         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
17533         Include <stdlib.h>, <string.h> unconditionally.
17534         Remove now-unnecessary cast to char *.
17535         * lib/strnlen.c: Include <string.h> unconditionally.
17536         * lib/yesno.c (yesno): Define with a prototype.
17537
17538 2003-09-11  Bruno Haible  <bruno@clisp.org>
17539
17540         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
17541
17542 2003-09-10  Jim Meyering  <jim@meyering.net>
17543
17544         * lib/error.c: Correct indentation of cpp directives.
17545
17546 2003-09-10  Bruno Haible  <bruno@clisp.org>
17547
17548         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
17549         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
17550         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
17551         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
17552         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
17553         <stdlib.h> and <string.h> checks.
17554         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
17555         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
17556
17557 2003-09-10  Bruno Haible  <bruno@clisp.org>
17558
17559         * lib/strcspn.c: Include <string.h> unconditionally.
17560         * lib/strpbrk.c: Include <string.h> unconditionally.
17561         * lib/strstr.c: Include <string.h> unconditionally.
17562         * lib/unicodeio.c: Include <string.h> unconditionally.
17563         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
17564         * lib/unsetenv.c: Likewise.
17565         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
17566         * lib/yesno.c: Include <stdlib.h> unconditionally.
17567         (rpmatch): Add prototype.
17568
17569 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17570
17571         More patches to assume C89 or better.
17572         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
17573         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
17574         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
17575         or for string.h.
17576         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
17577         stdlib.h.
17578         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
17579         C headers.
17580         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
17581         string.h.
17582         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
17583         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
17584         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
17585         or for string.h.
17586         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
17587         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
17588         C headers.
17589         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
17590         memcpy.
17591         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
17592         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
17593         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
17594         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
17595         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
17596         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
17597         string.h, free.
17598         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
17599         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
17600         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
17601         C headers, or for string.h.
17602         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
17603         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
17604         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
17605         headers, memory.h, stdlib.h, string.h, strings.h.
17606         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
17607         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
17608         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
17609         strchr.
17610         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
17611         headers, memory.h, string.h.
17612         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
17613         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
17614         free.
17615         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
17616         headers.
17617         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
17618         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
17619         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
17620         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
17621         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
17622
17623 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17624
17625         More K&R removal.
17626
17627         * lib/acosl.c (main): Use a prototype.
17628         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
17629         tanl.c: Likewise.
17630
17631         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
17632
17633         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
17634         (getopt, etopt_long, getopt_long_only, _getopt_internal)
17635         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
17636         with a prototype.
17637         * lib/getopt.c (const): Remove macro.
17638         Include <string.h> unconditionally.
17639         (my_index): Remove; all uses changed to strchr.
17640         (strlen): Remove decl.
17641         (exchange): Remove forward decl; no longer needed.
17642         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
17643         Define with prototype.
17644         * lib/getopt1.c (const): Remove macro.
17645         (getopt_long, getopt_long_only, main): Define with prototype.
17646
17647         * lib/getugroups.c: Include <string.h> unconditionally.
17648
17649         * lib/getusershell.c: Include <stdlib.h> unconditionally.
17650         (getusershell, setusershell, endusershell, readname, main):
17651         Define with prototypes.
17652
17653         * lib/group-member.c: Include group-member.h first.
17654         Include <stdlib.h> unconditionally.
17655
17656         * lib/hard-locale.c: Include hard-locale.h first.
17657         Include <stdlib.h>, <string.h> unconditionally.
17658
17659         * lib/hash.c (free, malloc): Remove decls.
17660         Include <stdlib.h> unconditionally.
17661
17662         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
17663         (getenv): Do not declare.
17664
17665         * lib/idcache.c: Include <string.h> unconditionally.
17666
17667         * lib/long-options.c: Include long-options.h first, to test interface.
17668         Include <stdlib.h> unconditionally.
17669
17670         * lib/makepath.c: Include makepath.h first, to test interface.
17671         Include <stdlib.h> and <string.h> unconditionally.
17672
17673         * lib/linebuffer.c: Include <stdlib.h>.
17674         (free): Remove decl.
17675
17676         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
17677         stddef.h. rpl_malloc returns void *, not char *.
17678         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
17679         prototype.
17680
17681         * lib/md5.h: Include <limits.h> unconditionally.
17682         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
17683         (__P): Remove; all uses removed.
17684         * lib/md5.c: Include "md5.h" first.
17685         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
17686         md5_buffer, md5_process_bytes, md5_process_block):
17687         Define with prototypes.
17688         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
17689         * lib/sha.c: Include "sha.h" first.
17690         Include <stdlib.h>, <string.h> unconditionally.
17691
17692         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
17693         * lib/memcmp.c (__ptr_t): Likewise.
17694         * lib/memrchr.c (__ptr_t): Likewise.
17695         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
17696         Include <string.h> unconditionally.
17697         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
17698         * lib/memchr.c: Include <stdlib.h> unconditionally.
17699         * lib/memchr.c (LONG_MAX): Remove.
17700         * lib/memrchr.c (LONG_MAX): Likewise.
17701         * lib/memchr.c (__memchr): Define via a prototype.
17702         * lib/memrchr.c (__memrchr): Likewise.
17703         * lib/memcmp.c (__P): Remove, and remove all uses.
17704         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
17705         Remove forward decls; no longer needed.
17706         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
17707         Use types required by C89 in prototype.
17708
17709         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
17710         * lib/savedir.c: Likewise.
17711         * lib/mkdir.c (free): Remove decl.
17712         * lib/rmdir.c (rmdir): Define with a prototype.
17713         * lib/savedir.c: Include savedir.h first, to test interface.
17714
17715         * lib/mktime.c (STDC_HEADERS): Remove.
17716         Include <stdlib.h>, <string.h> unconditionally.
17717
17718         * lib/modechange.c: Include <stdlib.h> unconditionally.
17719         (malloc): Remove decl.
17720
17721         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
17722         (free): Remove decl.
17723
17724         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
17725         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
17726         (This type really should be intptr_t, but that's a C99ism.)
17727         (_obstack_memcpy): Remove: all uses changed to memcpy.
17728         Include <string.h> unconditionally.
17729         (struct obstack): Assume __STDC__ for types of members
17730         chunkfun, freefun, extra_arg.
17731         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
17732         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
17733         obstack_begin, obstack_specify_allocation,
17734         obstack_specify_allocation_with_arg, obstack_chunkfun,
17735         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
17736         Remove unprototyped decls and the macros that use them.
17737         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
17738         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
17739         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
17740         (defined __STDC__ && __STDC__)]:
17741         Remove nonprototyped code.
17742         Include <stdlib.h> unconditionally.
17743         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
17744         _obstack_allocated_p, _obstack_free, obstack_free,
17745         _obstack_memory_used, print_and_abort):
17746         Define using prototypes.
17747         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
17748         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
17749         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
17750         obstack_next_free, obstack_object_size, obstack_room) [0]:
17751         Remove unused, unprototyped code.
17752
17753         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
17754
17755         * lib/physmem.c (physmem_total, physmem_available, main): Define
17756         with prototypes.
17757
17758         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
17759         (main): Define with a prototype.
17760
17761         * lib/posixver.c (getenv): Remove decl.
17762
17763         * lib/putenv.c (malloc): Returns void *, not char *.
17764         Include <string.h> unconditionally.
17765         (strchr, memcpy, NULL): Do not define.
17766
17767         * lib/readtokens.c: Include readtokens.h first, to test interface.
17768         Include <stdlib.h>, <string.h> unconditionally.
17769         (init_tokenbuffer): Define with a prototype.
17770
17771         * lib/regex.c (PARAMS): Remove.  All uses removed.
17772         All uses of _RE_ARGS removed, too.
17773         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17774         unconditionally.
17775         (bzero): Assume memset exists.
17776         (memcmp, memcpy, NULL): Remove.
17777         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
17778         char, or assignments to local vars of type signed char.
17779         (init_syntax_once, PREFIX(extract_number_and_incr),
17780         PREFIX(print_partial_compiled_pattern),
17781         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
17782         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
17783         PREFIX(regex_grow_registers), PREFIX(regex_compile),
17784         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
17785         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
17786         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
17787         wcs_compile_range, byte_compile_range, truncate_wchar,
17788         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
17789         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
17790         count_mbs_length, wcs_re_match_2_internal,
17791         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
17792         PREFIX(alt_match_null_string_p),
17793         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
17794         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
17795         regfree, PREFIX(extract_number)): Define with prototype.  Remove
17796         now-unnecessary declaration, if any.
17797         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
17798         regcomp, regexec):
17799         Remove now-unnecessary casts among pointer types.
17800         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
17801
17802         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
17803         (free): Remove decl.
17804
17805         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
17806
17807         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
17808         (free): Remove decl.
17809
17810         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
17811         * lib/xgetcwd.c: Likewise.
17812
17813         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
17814         (free): Remove decl.
17815
17816         * lib/strchrnul.c (strchrnul): Define with a prototype.
17817         Fix bug: c_in was not converted to char before searching.
17818
17819         The following changes are not K&R related:
17820
17821         * lib/group-member.h: Include <sys/types.h>, so that this file is
17822         self-contained.
17823         * lib/makepath.h: Likewise.
17824
17825         * lib/getusershell.c (readname, default_index, line_size, readname):
17826         Use size_t, not int, for sizes.
17827         (readname): If the size overflows, report an error instead of
17828         looping forever.
17829
17830 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17831
17832         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
17833         libc.
17834
17835 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17836
17837         * README: New section: portability guidelines.
17838
17839 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17840
17841         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
17842         C89 spec.
17843
17844 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17845
17846         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
17847
17848 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17849
17850         Assume C89 or better; remove K&R cruft.
17851         A few of these changes were first proposed by Derek Robert Price
17852         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
17853
17854         * lib/addext.c: Include <string.h> unconditionally.
17855         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
17856         Don't declare getenv or malloc.
17857
17858         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
17859         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
17860         (NULL): Remove.
17861         (find_stack_direction, alloca): Use prototypes.
17862
17863         * lib/atexit.c (atexit): Define using a prototype.
17864
17865         * lib/basename.c, dirname.c, stripslash.c:
17866         Include <string.h> unconditionally.
17867
17868         * lib/bcopy.c: Include <stddef.h>.
17869         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
17870
17871         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
17872
17873         * lib/error.h (error, error_at_line, error_print_progname)
17874         [! (defined (__STDC__) && __STDC__)]: Remove decls.
17875         * lib/error.c: Include error.h first, to check interface.
17876         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17877         (VA_START): Remove; all uses changeed to va_start.
17878         (exit, strerror): Remove decls.
17879         (error_print_progname): Prototype uncondionally.
17880         Don't include <errno.h>; no longer needed.
17881         (private_strerror): Remove.
17882         (error_tail): Always define.
17883         (error, error_at_line): Assume C89 or better; always use prototypes.
17884         * lib/fatal.c: Include "fatal.h" first, to test interface.
17885         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
17886         (VA_START): Remove; all uses changed to va_start.
17887         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
17888         this case.
17889         (exit): Remove decl.
17890         (fatal): Prototype unconditionally.  Assume va_start works.
17891         Abort at end, to pacify gcc.
17892
17893         * lib/euidaccess.c (main): Define with a prototype.
17894
17895         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
17896
17897         * lib/exitfail.c: Include <stdlib.h> unconditionally.
17898
17899         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
17900         prototypes.
17901         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
17902         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
17903         (getenv): Remove decl.
17904         (fnmatch): Define using a prototype.
17905         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
17906         (FCT): Define using a prototype.
17907
17908         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
17909
17910         * lib/gethostname.c: Include <stddef.h>.
17911         (gethostname): Define with prototype.  Length is size_t, not int.
17912
17913 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17914
17915         Assume C89 or better; remove K&R cruft.
17916         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
17917         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
17918         string.h, getenv, malloc.
17919         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
17920         headers.
17921         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
17922         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
17923         do not check for strerror.
17924         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
17925         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
17926         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
17927         do not check for doprnt or vprintf.
17928         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
17929         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
17930
17931 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17932
17933         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
17934         getversion.c should have been removed then, but was accidentally
17935         preserved.
17936
17937         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
17938         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
17939
17940 2003-09-08  Karl Berry  <karl@gnu.org>
17941
17942         * config/config.sub, config.guess, srclistvars.sh: update from savannah
17943                 config, forget about prep.
17944
17945         * config/depcomp, missing: update from automake.
17946
17947 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17948
17949         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
17950         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17951
17952 2003-09-07  Paul Eggert  <eggert@twinsun.com>
17953
17954         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
17955         copy_tm_result.  Bug reported by Simon Josefsson in
17956         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
17957
17958 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17959
17960         * m4/time_r.m4: New file.
17961         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
17962         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
17963         is. Check for timegm declaration.
17964         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
17965         Do not check for gmtime_r.
17966         Replace mktime if __mktime_internal does not exist and if mktime
17967         hasn't been replaced already.
17968
17969 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17970
17971         * lib/time_r.c, lib/time_r.h: New files.
17972
17973         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
17974         __localtime_r.
17975         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
17976         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
17977
17978         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
17979         __gmtime_r.
17980         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
17981         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
17982         Include <time_r.h>.
17983
17984         * lib/timegm.c: Switch to glibc implementation, with the following
17985         changes:
17986         [defined HAVE_CONFIG_H]: Include <config.h>.
17987         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
17988         (__mktime_internal) [!defined _LIBC]: New decl.
17989         (__gmtime_r) [!defined _LIBC]: New macro and function.
17990         (timegm): Use a prototype, since gnulib assumes C89.
17991         Do not bother declaring tmp to be const, as it's not really usefu.
17992         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
17993         (timegm): Declare only if HAVE_DECL_TIMEGM.
17994
17995 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17996
17997         * MODULES.html.sh (func_all_modules): Add time_r.
17998         * modules/time_r: New file.
17999         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18000         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18001
18002 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18003
18004         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18005         Bug reported by Lute Kamstra in
18006         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18007
18008         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18009         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18010         course with correspondingly smaller numbers for tomorrow and
18011         yesterday.  From Tadayoshi Funaba.  Originally installed into
18012         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18013         coreutils merge?).
18014
18015 2003-08-31  Simon Josefsson  <jas@extundo.com>
18016
18017         * modules/timegm: New file.
18018         * MODULES.html.sh (func_all_modules): Add timegm.
18019
18020 2003-08-31  Simon Josefsson  <jas@extundo.com>
18021
18022         * m4/timegm.m4: New file.
18023
18024 2003-08-31  Simon Josefsson  <jas@extundo.com>
18025
18026         * lib/timegm.h: New file.
18027         * lib/timegm.c: New file.  Based on
18028         wget-1.8.2/src/http.c:mktime_from_utc.
18029
18030 2003-08-31  Karl Berry  <karl@gnu.org>
18031
18032         * lib/argp.h: update from libc.
18033
18034 2003-08-28  Bruno Haible  <bruno@clisp.org>
18035
18036         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18037         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18038         followed by '#define fnmatch fnmatch_posix' gives an error.
18039
18040 2003-08-28  Bruno Haible  <bruno@clisp.org>
18041
18042         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18043         warning on QNX, which defines O_BINARY to 000000.
18044
18045 2003-08-27  Jim Meyering  <jim@meyering.net>
18046
18047         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18048         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18049         would fail after 32.  Reported by Danny Levinson.  Details here:
18050         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18051
18052 2003-08-24  Bruno Haible  <bruno@clisp.org>
18053
18054         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18055         MSVC7 <stdio.h> is included later.
18056
18057 2003-08-22  Simon Josefsson  <jas@extundo.com>
18058
18059         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18060
18061 2003-08-20  Karl Berry  <karl@gnu.org>
18062
18063         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18064
18065 2003-08-20  Bruno Haible  <bruno@clisp.org>
18066
18067         * modules/progname: New file.
18068         * MODULES.html.sh (func_all_modules): Add progname.
18069
18070 2003-08-20  Bruno Haible  <bruno@clisp.org>
18071
18072         * lib/progname.h: New file, from GNU gettext.
18073         * lib/progname.c: New file, from GNU gettext.
18074         * lib/progreloc.c: New file, from GNU gettext.
18075
18076 2003-08-19  Jim Meyering  <jim@meyering.net>
18077
18078         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18079         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18080
18081 2003-08-19  Bruno Haible  <bruno@clisp.org>
18082
18083         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18084         more.
18085
18086 2003-08-19  Bruno Haible  <bruno@clisp.org>
18087
18088         * lib/xstrdup.c: Assume <string.h> exists.
18089
18090 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18091
18092         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18093         in makefile rules.
18094
18095 2003-08-18  Jim Meyering  <jim@meyering.net>
18096
18097         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18098         * m4/lib-ld.m4: Likewise.
18099
18100 2003-08-18  Jim Meyering  <jim@meyering.net>
18101
18102         * lib/setenv.h: Indent nested cpp directive.
18103         * lib/vasnprintf.c: Remove trailing blanks.
18104
18105 2003-08-17  Simon Josefsson  <jas@extundo.com>
18106
18107         * modules/xstrndup: New file.
18108         * MODULES.html.sh (func_all_modules): Add xstrndup.
18109
18110 2003-08-17  Simon Josefsson  <jas@extundo.com>
18111
18112         * modules/argp: Fix autoconf macro name. Add more dependencies.
18113
18114 2003-08-17  Simon Josefsson  <jas@extundo.com>
18115
18116         * m4/xstrndup.m4: New file.
18117
18118 2003-08-17  Simon Josefsson  <jas@extundo.com>
18119
18120         * m4/argp.m4: New file.
18121
18122 2003-08-17  Simon Josefsson  <jas@extundo.com>
18123             Bruno Haible  <bruno@clisp.org>
18124
18125         * lib/xstrndup.h: New file.
18126         * lib/xstrndup.c: New file.
18127
18128 2003-08-17  Bruno Haible  <bruno@clisp.org>
18129
18130         * modules/strndup (Files, Include): Add lib/strndup.h.
18131
18132 2003-08-17  Bruno Haible  <bruno@clisp.org>
18133
18134         * modules/euidaccess (Files): Add lib/euidaccess.h.
18135
18136 2003-08-17  Bruno Haible  <bruno@clisp.org>
18137
18138         * lib/strndup.h: New file.
18139
18140 2003-08-17  Bruno Haible  <bruno@clisp.org>
18141
18142         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18143         like AC_GNU_SOURCE.
18144         * modules/extensions (configure.ac): Comment out the invocation of
18145         gl_USE_SYSTEM_EXTENSIONS.
18146
18147 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18148
18149         Merges from coreutils, etc.
18150         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18151         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18152         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18153         fixing a typo.
18154         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18155         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18156
18157 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18158
18159         Document merge from coreutils.
18160         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18161         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18162         * modules/utime: Add m4/utimes-null.m4.
18163
18164 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18165
18166         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18167         space, undoing this 2003-08-12 change:
18168         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18169
18170 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18171
18172         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18173         strtoul.c from libc, undoing this 2003-08-12 change:
18174         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18175
18176 2003-08-16  Jim Meyering  <jim@meyering.net>
18177
18178         Merges from coreutils.
18179         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18180         prefix.  Adjust cache variables similarly.  Create 500 rather than
18181         just 300 files, to exercise bug on Darwin6.5, too.
18182         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18183         $missing_dir.
18184         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18185         AM_SYS_POSIX_TERMIOS.
18186         Reported by mkc@mathdogs.com.
18187         Also change use of $am_cv_sys_posix_termios
18188         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18189         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18190         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18191         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18192         in /proc/mounts until it finds one with matching device number.  This
18193         is unnecessary when the FILE argument *is* a mount point.  No stat call
18194         is necessary in that case.  So, disable the statvfs-testing code on
18195         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18196         as RedHat bug# 84846.
18197         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18198         to 1MB, so as not to render systems with no stack size limit (e.g.,
18199         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18200         Include <unistd.h>.  On some systems,
18201         it is required for the definition of _SC_PAGESIZE.
18202
18203 2003-08-16  Jim Meyering  <jim@meyering.net>
18204
18205         Merge from coreutils.
18206         * lib/xstrtoimax.c: #else #if -> #elif.
18207         * lib/xstrtoumax.c: Likewise.
18208
18209 2003-08-16  Jim Meyering  <jim@meyering.net>
18210
18211         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18212         * m4/utimes.m4: Removed.
18213         * m4/utimes-null.m4: Renamed from utimes.m4.
18214
18215         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18216         to 1MB, so as not to render systems with no stack size limit (e.g.,
18217         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18218         Include <unistd.h>.  On some systems,
18219         it is required for the definition of _SC_PAGESIZE.
18220
18221 2003-08-16  Jim Meyering  <jim@meyering.net>
18222         and Paul Eggert  <eggert@cs.ucla.edu>
18223
18224         Merges from coreutils, etc.
18225
18226         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18227         using the latest version from cvs.  This avoids problems with #line
18228         directives using a vendor (Sun) compiler.
18229         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18230         Don't set GETGROUPS_LIB here; now it's
18231         done via getgroups.m4's wrapper function.
18232         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18233         rather than just in sh-util/configure.in, so that the
18234         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18235         same.
18236         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18237         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18238         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18239         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18240         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18241         Remove code that is now done by the newly-required macros.
18242         Append $(EXEEXT) to DF_PROG.
18243         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18244         Do not invoke or require the following here,
18245         since prereq.m4 or some gnulib .m4 now does this for us:
18246         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18247         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18248         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18249         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18250         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18251         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18252         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18253         AC_FUNC_OBSTACK.
18254         Do not replace the following functions, as this is now the job
18255         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18256         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18257         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18258         atexit getpass, strdup, getpagesize.
18259         Replace 'raise'.
18260         Do not check for the following functions, as this is now the job
18261         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18262         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18263         setregid.
18264         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18265         Check for sys/sysctl.h.
18266         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18267         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18268         of checking for ssize_t ourselves.
18269
18270         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18271         Require every macro that gnulib/modules/* suggests for us.
18272         (jm_PREREQ_ADDEXT): New macro.
18273         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18274         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18275
18276         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18277         (gl_PHYSMEM): Use it.
18278         Also check for `table' function.
18279         Check for new headers and functions.
18280         Add check for sys/sysmp.h.
18281         With suggestions from Kaveh Ghazi.
18282         Ignore headers that are present but cannot be compiled.  This
18283         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18284         C 5.4.
18285
18286 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18287
18288         Document merge from coreutils.
18289         * modules/userspec: Depend on posixver.
18290         * modules/strftime: Depend on tzset.
18291
18292 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18293
18294         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18295         rather than tab, after '#' in shell-script copyright notices.
18296         Suggested by Bruno Haible.
18297
18298 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18299
18300         * config/srclist-update: Use three spaces, rather than tab, after '#'
18301         in shell-script copyright notices.  Suggested by Bruno Haible.
18302         Remove unnecessary parenthesization in regular expression.
18303
18304 2003-08-15  Jim Meyering  <jim@meyering.net>
18305
18306         Merge from coreutils.
18307         * lib/xgethostname.c: Include <stdlib.h>.
18308         (xghostname): Don't exit for anything other than memory-related
18309         failure; just return NULL.
18310         * lib/userspec.c: Include "posixver.h".
18311         (parse_user_spec): Accept `.' as a separator only
18312         in pre-POSIX-200112 mode.
18313         * lib/strtoimax.c: Use #elif rather than #else #if.
18314         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18315         Remove function, now that we can rely on a working tzset function.
18316         [!_LIBC]: Ensure that the required autoconf test has been run.
18317         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18318         Use underlying_strftime for %r.
18319         * lib/sha.c: Merge in some clean-up and optimization changes from
18320         glibc.
18321         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18322         Ensure that it is a multiple of 64.
18323         Rearrange loop exit tests so as to avoid performing an
18324         additional fread after encountering an error or EOF.
18325         * lib/realloc.c: Update copyright date.
18326
18327 2003-08-15  Jim Meyering  <jim@meyering.net>
18328         and Paul Eggert  <eggert@twinsun.com>
18329
18330         Merge from coreutils.
18331         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18332         member but strut utmpx does not.  Needed for AIX 4.3.3.
18333         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18334
18335 2003-08-15  Jim Meyering  <jim@meyering.net>
18336         and Paul Eggert  <eggert@cs.ucla.edu>
18337
18338         Merges from coreutils, etc.
18339         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18340         Require gl_FUNC_TZSET_CLOBBER.
18341         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18342         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18343         members.
18344
18345 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18346
18347         Help the merge from coreutils.
18348         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18349         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18350         * m4/tzset.m4: Use it too.
18351
18352 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18353
18354         * modules/tzset: New file.
18355
18356 2003-08-14  Jim Meyering  <jim@meyering.net>
18357
18358         Merges from coreutils.
18359         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
18360         variable names, rather than @FNMATCH_H@.
18361         * modules/alloca: Likewise for $(ALLOCA_H).
18362
18363         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18364         the three copies of the literal target, `fnmatch.h'.
18365         * modules/alloca (alloca.h): Likewise.
18366
18367 2003-08-14  Jim Meyering  <jim@meyering.net>
18368
18369         Merge from coreutils.
18370         * m4/tzset.m4: New file.
18371         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18372         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18373         otherwise, AIX 5.1 systems would end up using the latter.
18374         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18375         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18376         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18377         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18378
18379 2003-08-14  Jim Meyering  <jim@meyering.net>
18380
18381         Merge from coreutils.
18382         * lib/obstack.h: Whitespace changes.
18383         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18384         and xcalloc return values.
18385         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18386         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18387         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18388         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18389         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18390         error from mntctl.
18391         Use mntctl's return value to drive the entry-processing loop, since
18392         we can't rely on the value of the vmt_length member in the last
18393         entry.  On some systems doing so could result in exhausting
18394         virtual memory.  Based in part on a patch from Mike Jetzer.
18395
18396 2003-08-14  Jim Meyering  <jim@meyering.net>
18397         and Paul Eggert  <eggert@twinsun.com>
18398
18399         Merges from coreutils, plus other fixes.
18400         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18401         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18402         for credits and details.  Thanks to Kaveh Ghazi for helping
18403         to keep these files in sync.
18404         (ARRAY_SIZE): Define it.
18405         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18406         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18407         (memcasecmp): Don't assume size_t fits in unsigned int.
18408         Remove casts and duplicate code.
18409         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18410         (memcpy): Remove definition.
18411         Merge in some clean-up and optimization changes from glibc.
18412         [BLOCKSIZE]: Move definition to top of file.
18413         Ensure that it is a multiple of 64.
18414         Rearrange loop exit tests so as to avoid performing an
18415         additional fread after encountering an error or EOF.
18416         * lib/md5.h (md5_uintptr): Define.
18417         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18418         return to the initial working directory.  Preserve errno
18419         for caller.
18420         * lib/idcache.c: Include "xalloc.h".
18421         (xmalloc, xrealloc): Remove decls.
18422         (getuser): Remove casts no longer required in C89.
18423         * lib/human.c: Include stdio.h, for sprintf.
18424         * lib/group-member.c: Include "xalloc.h".
18425         (xmalloc, xrealloc): Remove decls.
18426         (get_group_info): Remove casts no longer required in C89.
18427         * lib/getusershell.c (readname): Remove casts no longer required in
18428         C89.
18429         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18430         * lib/getline.c: Whitespace fix, from coreutils.
18431
18432 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18433
18434         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18435         Check for isascii.
18436
18437         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18438         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18439         Undo previous (whitespace-only) change.
18440
18441 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18442
18443         * lib/exclude.c: Include <ctype.h>
18444         (IN_CTYPE_DOMAIN): New macro.
18445         (is_space): New fn.
18446         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18447         and empty lines.
18448
18449         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18450         Undo previous (whitespace-only) change.
18451
18452 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18453
18454         * config/srclist-update: Change update back to the old behavior,
18455         leaving whitespace alone.  Use one 'sed' command rather than a
18456         pipeline.
18457         (fixlicense): Now a variable, not a function.
18458         (remove_trailing_blanks): Remove.
18459         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18460         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18461         Undo previous (whitespace-only) change.
18462
18463 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18464
18465         Merge from coreutils.
18466         * modules/euidaccess: Add lib_SOURCES, include for new
18467         file euidaccess.h
18468
18469 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18470
18471         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18472         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18473         Normalize leading white space and remove trailing white space.
18474
18475         Merge from coreutils
18476         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18477
18478         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18479         0.12.1.  These files are now being upgraded automatically by
18480         ../config/srclist-update.
18481
18482 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18483
18484         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18485         Normalize leading white space and remove trailing white space.
18486         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18487         notice, as per ../config/srclist-update.
18488
18489         Merge from coreutils.
18490         * lib/euidaccess.h: New file.
18491         * lib/euidaccess.c: Include it.
18492         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18493         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18494         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18495
18496 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18497
18498         * config/srclist-update: Add copyright notice.
18499         (remove_id_lines, remove_trailing_blanks): New constants.
18500         (fixfile): Use them to normalize spacing a bit in copied files.
18501         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18502         Normalize leading white space and remove trailing white space.
18503
18504         * config/texinfo.tex: Sync with texinfo.
18505
18506         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
18507         strtoul.c from libc, to merge coreutils whitespace changes.
18508
18509         * config/srclist.txt: Get the following m4 files from gettext:
18510         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
18511         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
18512         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
18513         wint_t.m4.
18514
18515 2003-08-12  Karl Berry  <karl@gnu.org>
18516
18517         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
18518         been made.
18519
18520 2003-08-11  Paul Eggert  <eggert@twinsun.com>
18521
18522         * modules/gnu-source, m4/gnu-source.m4:
18523         Remove; we're assuming Autoconf 2.54 or later now.
18524         Suggested by Bruno Haible.
18525         * MODULES.html.sh (func_all_modules): Remove gnu-source.
18526
18527 2003-08-11  Bruno Haible  <bruno@clisp.org>
18528
18529         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
18530
18531 2003-08-11  Bruno Haible  <bruno@clisp.org>
18532
18533         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
18534         (vasnprintf): Use it instead of wcslen.
18535
18536 2003-08-11  Bruno Haible  <bruno@clisp.org>
18537
18538         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
18539         value to ensure that _Bool promotes to int. Use #define for _Bool when
18540         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
18541
18542 2003-08-10  Karl Berry  <karl@gnu.org>
18543
18544         * lib/regex.h: update from libc (whitespace fix).
18545
18546 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18547
18548         Merge some files from coreutils.  These changes were
18549         originally made by Jim Meyering.
18550         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
18551         many older Unixes require this.
18552         * lib/alloca.c (alloca): Remove cast to argument of free;
18553         no longer needed in C89.
18554         * lib/alloca_.h, regex.h: Fix white space to match
18555         what GNU indent does.
18556
18557 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18558
18559         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
18560         apparently Emacs's Unicode mode got confused before my 2003-08-05
18561         checkin.
18562
18563 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18564
18565         * m4/extensions.m4: New file.
18566         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
18567         Require gl_USE_SYSTEM_EXTENSIONS.
18568         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
18569         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
18570
18571 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18572
18573         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
18574         * modules/extensions, modules/gnu-source: New files.
18575         * modules/timespec, modules/unlocked-io: Depend on extensions.
18576
18577 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18578
18579         * modules/restrict: New file.
18580         * MODULES.html.sh (func_all_modules): Add restrict.
18581         * modules/regex: Depend on restrict.
18582
18583 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18584
18585         * m4/restrict.m4: New file.
18586         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
18587
18588 2003-08-07  Bruno Haible  <bruno@clisp.org>
18589
18590         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
18591         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
18592
18593 2003-08-07  Bruno Haible  <bruno@clisp.org>
18594
18595         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
18596         makes the module 'getndelim2' compatible with the module 'getline'.
18597
18598 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18599
18600         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
18601         byte with "\201" to avoid glitches when editing that source file
18602         with multi-gnome-terminal.
18603
18604 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18605
18606         * lib/bumpalloc.h: Remove.
18607
18608 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18609
18610         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
18611         * modules/bumpalloc: Remove.
18612
18613 2003-08-04  Paul Eggert  <eggert@twinsun.com>
18614
18615         * lib/getloadavg.c: Change copyright notice and spacing to conform to
18616         GNU coding style.
18617
18618         Merge from coreutils.
18619         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
18620         1. From glibc.
18621         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
18622         from Karl Berry, implemented by Jim Meyering.
18623         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
18624         from Dmitry V. Levin.
18625         Remove anachronistic cast of xrealloc.
18626         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
18627         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
18628         type. Otherwise, it wouldn't compile with at least /bin/cc on
18629         ymp-cray-unicos9.0.2.X.
18630         Combine two mostly-identical uses of alloca into one.
18631         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
18632
18633 2003-08-04  Dave Love  <d.love@dl.ac.uk>
18634
18635         [From Emacs.]
18636
18637         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
18638         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
18639         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
18640         obsolete NLIST_NAME_UNION.
18641         [__GNU__]: Undef BSD and FSCALE.
18642         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
18643
18644 2003-08-03  Paul Eggert  <eggert@twinsun.com>
18645
18646         * lib/stdbool_.h (_Bool): Make it signed char, instead of
18647         an enum type, so that it's guaranteed to promote to int.  See:
18648         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
18649
18650 2003-08-03  Karl Berry  <karl@gnu.org>
18651
18652         * config/depcomp: update from automake.
18653
18654 2003-07-31  Paul Eggert  <eggert@twinsun.com>
18655
18656         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
18657         (strerror): Don't assume that a printable int fits in 14 bytes.
18658
18659 2003-07-31  Bruno Haible  <bruno@clisp.org>
18660
18661         * modules/getpass-gnu: New file.
18662         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
18663
18664 2003-07-31  Bruno Haible  <bruno@clisp.org>
18665
18666         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
18667
18668 2003-07-24  Karl Berry  <karl@gnu.org>
18669
18670         * config/missing: update from automake.
18671
18672 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
18673             Bruno Haible  <bruno@clisp.org>
18674
18675         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
18676         * lib/getline.c (getline, getdelim): Likewise.
18677         Remove _GNU_SOURCE define; now it's defined in config.h through
18678         m4/getline.m4.
18679
18680 2003-07-23  Karl Berry  <karl@gnu.org>
18681
18682         * config/config.sub: update from prep.
18683
18684 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18685
18686         * modules/xalloc (Depends-on): Add exitfail.
18687         * modules/xmemcoll: Likewise.
18688
18689 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18690
18691         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
18692         over-parenthesization in macros.
18693
18694         Sync with coreutils.
18695
18696         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
18697         required by C99.
18698
18699         Use `exit_failure' for xalloc and xmemcoll instead of their own
18700         private exit-failure variables.
18701         * lib/xalloc.h (xalloc_exit_failure): Remove.
18702         * lib/xmalloc.c: Likewise.  Include exitfail.h.
18703         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
18704         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
18705         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
18706         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
18707
18708 2003-07-20  Jim Meyering  <jim@meyering.net>
18709
18710         * modules/closeout (Depends-on): Add exitfail.
18711         Suggestion from Bruno Haible.
18712
18713 2003-07-19  Karl Berry  <karl@gnu.org>
18714
18715         * config/config.sub: update from prep.
18716
18717 2003-07-18  Paul Eggert  <eggert@twinsun.com>
18718
18719         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
18720         Remove.
18721         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
18722         to test that it can stand by itself.  Include "exitfail.h".
18723         Clients should set exit_failure instead.
18724         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
18725
18726 2003-07-18  Bruno Haible  <bruno@clisp.org>
18727
18728         * modules/getndelim2: New file.
18729         * modules/getline: Share files with module getndelim2.
18730         * modules/getnline: Depend on getndelim2 instead of sharing files with
18731         it. Add getnline.c to lib_SOURCES.
18732         * MODULES.html.sh (func_all_modules): Add getndelim2.
18733
18734 2003-07-18  Bruno Haible  <bruno@clisp.org>
18735
18736         * m4/getndelim2.m4: New file.
18737         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
18738         invoke gl_PREREQ_GETNDELIM2.
18739         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
18740         gl_PREREQ_GETNDELIM2.
18741         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
18742         gl_GETNDELIM2.
18743
18744 2003-07-18  Bruno Haible  <bruno@clisp.org>
18745
18746         * lib/getndelim2.h: New file.
18747         * lib/getndelim2.c: Make into a module of its own. Include config.h,
18748         getndelim2.h.
18749         (getndelim2): Make non-static. Change return type to ssize_t.
18750         * lib/getline.h: Change argument names.
18751         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
18752         * lib/getnline.c: Include getndelim2.h.
18753
18754 2003-07-18  Andreas Schwab  <schwab@suse.de>
18755
18756         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
18757
18758 2003-07-17  Karl Berry  <karl@gnu.org>
18759
18760         * config/config.sub: update from prep.
18761
18762 2003-07-17  Bruno Haible  <bruno@clisp.org>
18763
18764         * modules/getnline: New file.
18765         * modules/getline: Add lib/getndelim2.c to source file list.
18766         * MODULES.html.sh (func_all_modules): Add getnline.
18767
18768 2003-07-17  Bruno Haible  <bruno@clisp.org>
18769
18770         * m4/getnline.m4: New file.
18771
18772 2003-07-17  Bruno Haible  <bruno@clisp.org>
18773
18774         * m4/Makefile.am.in: Remove file.
18775         * m4/Makefile.am: Remove file.
18776         * m4/Makefile.in: Remove file.
18777
18778 2003-07-17  Bruno Haible  <bruno@clisp.org>
18779
18780         * lib/getnline.h: New file.
18781         * lib/getnline.c: New file.
18782         * lib/getndelim2.c: New file, extracted from getline.c.
18783         (getndelim2): Renamed from getdelim2, with added nmax argument.
18784         * lib/getline.c: Include getndelim2.c.
18785         (getdelim2): Moved out to getndelim2.c.
18786         (getline, getdelim): Update.
18787
18788 2003-07-17  Bruno Haible  <bruno@clisp.org>
18789
18790         * lib/Makefile.am: Remove file.
18791         * lib/Makefile.in: Remove file.
18792
18793 2003-07-17  Bruno Haible  <bruno@clisp.org>
18794
18795         * configure.in: Remove file.
18796         * Makefile.in: Remove file.
18797
18798 2003-07-17  Bruno Haible  <bruno@clisp.org>
18799
18800         * MODULES.html.sh: Put the </BODY> right before </HTML>.
18801
18802 2003-07-16  Karl Berry  <karl@gnu.org>
18803
18804         * config/srclist-update: was running fixlicense twice, which caused
18805                 texinfo.tex to be nullified for some reason.  Simplify,
18806                 $gplsrc is no longer needed as far as I can see?
18807
18808 2003-07-16  Jim Meyering  <jim@meyering.net>
18809
18810         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
18811
18812 2003-07-15  Paul Eggert  <eggert@twinsun.com>
18813
18814         * config/srclist.txt: Get the following files from gettext-runtime/intl
18815         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
18816         ref-del.sin.  From Bruno Haible.
18817         * config/srclist-update (fixfile): Change grep pattern again, since the
18818         previous fix didn't work (there was another trailing $).  Use
18819         '[$]' to escape the $s.
18820
18821 2003-07-15  Karl Berry  <karl@gnu.org>
18822
18823         * lib/vasnprintf.c: update from gettext.
18824
18825 2003-07-15  Karl Berry  <karl@gnu.org>
18826
18827         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
18828         gets expanded when surrounded by '$'.
18829
18830 2003-07-15  Jim Meyering  <jim@meyering.net>
18831
18832         * modules/save-cwd: Don't depend on error.  From Derek Price.
18833
18834 2003-07-15  Jim Meyering  <jim@meyering.net>
18835
18836         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
18837
18838 2003-07-14  Simon Josefsson  <jas@extundo.com>
18839
18840         * modules/mempcpy: New file.
18841         * MODULES.html.sh (func_all_modules): Add mempcpy.
18842
18843 2003-07-14  Simon Josefsson  <jas@extundo.com>
18844
18845         * m4/mempcpy.m4: New file.
18846
18847 2003-07-14  Simon Josefsson  <jas@extundo.com>
18848
18849         * lib/mempcpy.h: New file.
18850         * lib/mempcpy.c: New file.
18851
18852 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18853
18854         * modules/getdate, modules/posixtm: Depend on mktime.
18855
18856 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18857
18858         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
18859         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
18860         unicodeio.c, unicodeio.h, unlocked-io.h:
18861         Switch from LGPL to GPL.
18862
18863 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18864
18865         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
18866         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
18867         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
18868         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
18869         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
18870         updated automatically by ../config/srclist-update.  This changes
18871         their license from LPGL to GPL.
18872
18873 2003-07-14  Paul Eggert  <eggert@twinsun.com>
18874
18875         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
18876         assumed to refer to the root of the most recent stable gettext version.
18877         * config/srclistvars.sh: Add defaults for eggert.
18878         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
18879         Match "This program" as well as "The program".  This is needed
18880         for gettext.
18881
18882 2003-07-14  Jim Meyering  <jim@meyering.net>
18883
18884         Don't emit diagnostics.  Let callers do that.
18885         * lib/save-cwd.c: Don't include "error.h".
18886         (save_cwd): Don't call error.  Ensure that errno is valid
18887         when returning nonzero.
18888
18889         * lib/save-cwd.h (restore_cwd): Update prototype.
18890         * lib/save-cwd.c (restore_cwd): Remove two parameters.
18891         Simplify.  Don't call error upon failure.  Let callers do that.
18892         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
18893         when auditing is enabled.  But don't bother updating the #if.
18894
18895 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
18896
18897         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
18898         it breaks C++ compilation.
18899         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
18900
18901 2003-07-10  Simon Josefsson  <jas@extundo.com>
18902
18903         * modules/strchrnul (Makefile.am): Add strchrnul.h.
18904
18905 2003-07-10  Jim Meyering  <jim@meyering.net>
18906
18907         * m4/clock_time.m4: Remove trailing blank.
18908         * m4/intmax_t.m4: Likewise.
18909
18910 2003-07-10  Jim Meyering  <jim@meyering.net>
18911
18912         * lib/vasnprintf.c: Remove trailing blanks.
18913         Make cpp indentation consistent.
18914
18915 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18916
18917         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
18918         posixver.c, strftime.c, strnlen.c, strverscmp.c:
18919         Switch from LGPL to GPL.
18920
18921 2003-07-09  Paul Eggert  <eggert@twinsun.com>
18922
18923         * config/srclist.txt: Sort sublists.  Add
18924         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
18925         that differ from gnulib for one reason or another; we'd like this list
18926         to be smaller but for now let's document what we have.
18927
18928 2003-07-08  Paul Eggert  <eggert@twinsun.com>
18929
18930         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
18931         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
18932         and sweeter "eval x=$x".
18933         * config/srclist.txt: Get lib/argp* from glibc.
18934
18935 2003-07-07  Paul Eggert  <eggert@twinsun.com>
18936
18937         * lib/mktime.c: Fix some boundary cases and remove need for floating
18938         point.
18939
18940         Issue a compile-time diagnostic if time_t is floating point, or if
18941         two's complement arithmetic is not in effect, or if arithmetic
18942         right shift does not propagate the sign.  These assumptions were
18943         all in the original code but they weren't checked.
18944
18945         (TIME_T_MIDPOINT, verify): New macros.
18946         (__isleap): Remove; it has integer overflow problems.
18947         (leapyear): New function, without those problems.
18948         (ydhms_tm_diff): Remove; splitting into two parts.
18949         (ydhms_diff): New function, containing the arithmetic part of
18950         the old ydhms_tm_diff function.  Issue a compile-time
18951         diagnostic if we are not using C99 integer division.
18952         Avoid casts when possible.
18953         (guess_time_tm): New function, containing the checking part of
18954         the old ydhms_tm_diff function.  Return the new value, rather than
18955         the difference between it and the old.  Accept a new argument T
18956         so that *T specifies the old value.  Check for overflow in the result.
18957
18958         (__mktime_internal): Use a time_t offset, not a long int offset.
18959         This undoes the 2003-06-04 change, which is no longer needed now
18960         that we have better overflow checking.
18961         (localtime_offset): Likewise.
18962
18963         (__mktime_internal): Avoid harmful overflow on hosts where time_t
18964         and long are 64-bit but int is only 32-bit.
18965         (ydhms_diff): Use long int to store year1 and yday1.
18966         Issue a compile-time diagnostic if long int is not wide enough.
18967
18968         (__mktime_internal): Use long int to store adjusted year and yday.
18969         Use plain C rather than preprocessor commands, if that doesn't
18970         affect efficiency.
18971         Check for overflow (and try to repair) after each probe
18972         rather than checking only at the very end.  This avoids some bugs
18973         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
18974         does not equal GMT offset at maximum time).
18975         Use integer to check for overflow rather than floating point; this
18976         is more portable to non-IEEE hosts, and is a tad faster.
18977         When we detect that we are oscillating between two values,
18978         don't check whether tm_isdst has the requested value, since
18979         we already know the answer.  When tm_isdst has the wrong value,
18980         use a different heuristic to find the right one, based on the
18981         extreme values actually observed in practice in tz2003a,
18982         rather than the (overly optimistic) "previous 3 calendar quarters".
18983
18984         (not_equal_tm, print_tm, check_result): Use "const T" rather than
18985         "T const" to accommodate glibc style.
18986         (check_result): Use less-confusing report format.  "long" -> "long int.
18987         (main): Likewise.
18988         Don't loop if the iteration overflows time_t.
18989         Allow a negative step in the iteration.
18990
18991 2003-07-06  Karl Berry  <karl@gnu.org>
18992
18993         * config/depcomp: update from automake.
18994         * config/config.sub: update from prep.
18995
18996 2003-07-03  Karl Berry  <karl@gnu.org>
18997
18998         * config/config.guess: update from prep.
18999
19000 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19001
19002         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19003         xreadlink.c now includes it unconditionally.
19004
19005 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19006
19007         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19008         having it depend on HAVE_SYS_TYPES_H.
19009
19010 2003-07-01  Bruno Haible  <bruno@clisp.org>
19011
19012         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19013         <sys/types.h> should be sufficient.
19014         Reported by Paul Eggert.
19015
19016 2003-06-26  Karl Berry  <karl@gnu.org>
19017
19018         * config/depcomp: update from automake.
19019
19020 2003-06-26  Bruno Haible  <bruno@clisp.org>
19021
19022         * modules/human: Depend on module stdbool.
19023
19024 2003-06-25  Bruno Haible  <bruno@clisp.org>
19025
19026         * modules/readlink: New file.
19027         * modules/xreadlink: Depend on it.
19028         * MODULES.html.sh (func_all_modules): Add readlink.
19029
19030 2003-06-25  Bruno Haible  <bruno@clisp.org>
19031
19032         * m4/readlink.m4: New file.
19033
19034 2003-06-25  Bruno Haible  <bruno@clisp.org>
19035
19036         * lib/readlink.c: New file.
19037
19038 2003-06-22  Karl Berry  <karl@gnu.org>
19039
19040         * config/srclist.txt: update mkinstalldirs from automake.
19041         * config/mkinstalldirs: update.
19042
19043 2003-06-22  Bruno Haible  <bruno@clisp.org>
19044
19045         Portability to mingw32.
19046         * m4/ssize_t.m4: New file, from GNU gettext.
19047         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19048         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19049
19050 2003-06-22  Bruno Haible  <bruno@clisp.org>
19051
19052         * modules/safe-read: Add m4/ssize_t.m4.
19053         * modules/xreadlink: Add m4/ssize_t.m4.
19054
19055 2003-06-20  Bruno Haible  <bruno@clisp.org>
19056
19057         Assume C89, so PARAMS isn't needed.
19058         * lib/unicodeio.h (PARAMS): Remove.
19059         * lib/unicodeio.c: Don't use PARAMS.
19060
19061 2003-06-18  Karl Berry  <karl@gnu.org>
19062
19063         * config/config.{guess,sub}: update from prep.
19064
19065 2003-06-18  Jim Meyering  <jim@meyering.net>
19066
19067         Merge changes from coreutils.
19068         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19069         Remove explicit declarations of xmalloc and realloc.
19070         Include xalloc.h.
19071         (read_utmp): Remove anachronistic cast of xmalloc.
19072
19073 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19074
19075         Assume C89, so PARAMS isn't needed.
19076         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19077         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19078         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19079         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19080         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19081         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19082         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19083         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19084         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19085         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19086         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19087         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19088         no longer needed. Anyway, config.h should always be included before any
19089         other file.
19090
19091 2003-06-11  Simon Josefsson  <jas@extundo.com>
19092
19093         * modules/sysexits: New file.
19094         * MODULES.html.sh (func_all_modules): Add sysexits.
19095
19096 2003-06-11  Simon Josefsson  <jas@extundo.com>
19097
19098         * lib/sysexit_.h: New file.
19099
19100 2003-06-11  Derek Price  <derek@ximbiot.com>
19101
19102         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19103         necessary.
19104
19105 2003-06-11  Bruno Haible  <bruno@clisp.org>
19106
19107         * m4/sysexits.m4: New file.
19108
19109 2003-06-10  Simon Josefsson  <jas@extundo.com>
19110
19111         * lib/argp.h: New file, from glibc.
19112         * lib/argp-ba.c: New file, from glibc.
19113         * lib/argp-eexst.c: New file, from glibc.
19114         * lib/argp-fmtstream.c: New file, from glibc.
19115         * lib/argp-fmtstream.h: New file, from glibc.
19116         * lib/argp-fs-xinl.c: New file, from glibc.
19117         * lib/argp-help.c: New file, from glibc.
19118         * lib/argp-namefrob.h: New file, from glibc.
19119         * lib/argp-parse.c: New file, from glibc.
19120         * lib/argp-pv.c: New file, from glibc.
19121         * lib/argp-pvh.c: New file, from glibc.
19122         * lib/argp-xinl.c: New file, from glibc.
19123
19124 2003-06-10  Simon Josefsson  <jas@extundo.com>
19125
19126         * modules/strchrnul: New file.
19127
19128 2003-06-10  Simon Josefsson  <jas@extundo.com>
19129
19130         * modules/argp: New file.
19131
19132 2003-06-10  Simon Josefsson  <jas@extundo.com>
19133
19134         * m4/strchrnul.m4: New file.
19135
19136 2003-06-10  Simon Josefsson  <jas@extundo.com>
19137
19138         * lib/strchrnul.h: New file.
19139         * lib/strchrnul.c: New file.
19140
19141 2003-06-10  Bruno Haible  <bruno@clisp.org>
19142
19143         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19144
19145 2003-06-07  Karl Berry  <karl@gnu.org>
19146
19147         * config/config.{guess,sub}: update from prep.
19148
19149 2003-06-07  Jim Meyering  <jim@meyering.net>
19150
19151         * modules/strtod: Use $(...) notation, not @...@ for
19152         AC_REPLACE'd variables.
19153         * modules/localcharset: Likewise.
19154
19155 2003-06-07  Jim Meyering  <jim@meyering.net>
19156
19157         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19158         in place of my name in the copyright comment.
19159         Remove definition and uses of __P.
19160
19161         From coreutils.
19162         * lib/stat.c: Don't declare xmalloc explicitly.
19163         Instead, include "xalloc.h".
19164         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19165         xrealloc, and xcalloc return values.
19166         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19167         Improve comment.
19168         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19169
19170 2003-06-07  Bruno Haible  <bruno@clisp.org>
19171
19172         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19173         avoid AC_CONFIG_LINKS.
19174         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19175         fnmatch.h, to avoid AC_CONFIG_LINKS.
19176         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19177
19178 2003-06-07  Bruno Haible  <bruno@clisp.org>
19179
19180         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19181         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19182         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19183         directory.
19184         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19185         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19186         directory.
19187
19188 2003-06-06  Jim Meyering  <jim@meyering.net>
19189
19190         Merge from coreutils.
19191         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19192         Consolidate declarations and initializations of *_base* locals.
19193
19194         Merge from coreutils.
19195         This avoids a core dump on systems without GNU putenv,
19196         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19197         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19198         (unsetenv): New static function, from GNU libc.
19199         (rpl_putenv): Use it.
19200
19201         * lib/modechange.c: Remove trailing blanks.
19202
19203         Merge from coreutils.
19204         * lib/fsusage.c: Remove declaration of statfs.
19205         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19206
19207         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19208
19209 2003-06-06  Jim Meyering  <jim@meyering.net>
19210
19211         * lib/stdbool_.h: Renamed from stdbool.h.in.
19212
19213 2003-06-06  Jim Meyering  <jim@meyering.net>
19214             Bruno Haible  <bruno@clisp.org>
19215
19216         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19217         Adjust Makefile.am snippet not to redirect directly to target.
19218         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19219
19220 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19221
19222         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19223         mismatch, look in future quarters as well as past.  This fixes a
19224         bug when processing fall-backwards gaps immediately after a long
19225         period of daylight-saving time.
19226
19227         * lib/mktime.c: Assume freestanding C89 or better.
19228         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19229         (__P): Remove; not used.
19230         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19231         (mktime, not_equal_tm, print_tm, check_result,
19232         main): Use prototypes.  Use const * where appropriate.
19233         (main): Fix typo in testing code that uncovered by above changes.
19234         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19235
19236 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19237
19238         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19239         locale.h, localeconv.  This merges changes from coreutils.
19240
19241         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19242         It can be removed after the next Autoconf is released.
19243         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19244         needed.
19245
19246 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19247
19248         * lib/mktime.c: Fix Debian bug 177940
19249         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19250         (localtime_offset): Now long int, not time_t, because we want it
19251         to be guaranteed to be signed.  All uses changed.
19252         (__mktime_internal): If overflow would occur when adding offset,
19253         don't add it.
19254
19255         Merge 'human' changes from coreutils.  Rewrite to support
19256         locale-specific notations like thousands separators.
19257         * lib/human.c: Simplify authorship notice.
19258         Include human.h immediately after config.h.
19259         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19260         <limits.h>: Do not include, since human.h does.
19261         (SIZE_MAX, UINTMAX_MAX): New macros.
19262         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19263         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19264         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19265         (power_letter): Renamed from suffixes.
19266         (generate_suffix_backwards): Remove.
19267         (adjust_value): Now takes int style (because of human.h changes)
19268         and long double value (for greater precision on some platforms).
19269         (group_number): New function.
19270         (human_readable): Use it.  Use integer options, not enum.
19271         Put the options before the sizes in the arg list.
19272         Support all the new options.
19273         The old human_readable function has been removed;
19274         use inttostr.h instead.
19275         (human_readable, default_block_size, humblock):
19276         Use uintmax_t, not int, for block sizes.
19277         (human_readable_inexact, block_size_types): Remove.
19278         (block_size_opts): New constant.
19279         (human_options): Renamed from human_block_size, with new signature
19280         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19281         * lib/human.h: Add copyright and authorship notice.
19282         Include <limits.h> and <stdbool.h> unconditionally.
19283         (PARAMS): Remove.  All uses removed.
19284         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19285         (enum human_inexact_style): Remove tag; now a nameless enum.
19286         (human_floor, human_ceiling, human_round_to_even): Now have
19287         values 2, 0, 1 rather than -1, 1, 0.
19288         (human_group_digits, human_suppress_point_zero, human_autoscale,
19289         human_base_1024, human_SI, human_B): New constants.
19290         (human_readable_inexact, human_block_size): Remove.
19291         (human_readable): Size args are now uintmax_t, not int.
19292         (human_options): New decl.
19293
19294         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19295         unnecessary now that we assume C89 or better.  This change
19296         imported from coreutils.
19297
19298         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19299         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19300         in the 2003-05-30 sync from glibc.
19301
19302         .h files should stand alone, but we shouldn't include <sys/types.h>
19303         if we can get away with just <stddef.h>.
19304
19305         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19306         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19307         rather than <sys/types.h>, as we merely need size_t.
19308         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19309         to get size_t.
19310         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19311         Include <stdio.h>, to get FILE.
19312         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19313         memcasecmp.h has included <stddef.h> and all we need is size_t.
19314         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19315         our interface, instead of including <sys/types.h>
19316
19317 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19318
19319         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19320         now, as glibc mktime is buggy on non-glibc systems.
19321
19322 2003-06-03  Karl Berry  <karl@gnu.org>
19323
19324         * config/config.sub: update from prep.
19325
19326 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19327
19328         [from coreutils]
19329         Fix some minor time-related bugs with POSIX time arguments.
19330         Some valid time stamps were being rejected (notably -1, and
19331         time stamps before 1900 on 64-bit hosts).  And some invalid
19332         time stamps were being accepted, e.g. September 31.
19333
19334         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19335         that we can return (time_t) -1 successfully.
19336         * lib/posixtm.c: Likewise.
19337         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19338         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19339         (t): Remove static var.
19340         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19341         of static var.  All uses changed.
19342         (year): Do not reject years before 1900; they can occur with
19343         64-bit time_t.
19344         (posix_time_parse): Do not check for out-of-range components;
19345         that is now the caller's responsibility, since our checks were
19346         only approximations.
19347         (posixtime): Use mktime to check for out-of-range components,
19348         since it knows them exactly.
19349         If mktime returns (time_t) -1, check whether an error actually occurred
19350         by invoking localtime on -1.
19351         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19352         posixtime failures better.
19353         Improve the test data (in comments only).
19354
19355 2003-06-02  Karl Berry  <karl@gnu.org>
19356
19357         * config/mkinstalldirs (version): new variable.
19358         (--version): new option.
19359         (usage): improve message.
19360
19361 2003-05-30  Karl Berry  <karl@gnu.org>
19362
19363         * lib/mktime.c: update from libc.
19364
19365 2003-05-30  Bruno Haible  <bruno@clisp.org>
19366
19367         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19368         * config/config.rpath: Upgrade to gettext-0.12.1.
19369
19370 2003-05-30  Bruno Haible  <bruno@clisp.org>
19371
19372         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19373         * m4/nls.m4: New file, from gettext-0.12.1.
19374         * m4/po.m4: New file, from gettext-0.12.1.
19375         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19376
19377 2003-05-30  Bruno Haible  <bruno@clisp.org>
19378
19379         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19380         * lib/localcharset.h: Likewise.
19381         * lib/localcharset.c: Likewise.
19382
19383 2003-05-29  Karl Berry  <karl@gnu.org>
19384
19385         * config/config.rpath: update from gettext.
19386
19387 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19388
19389         Assume the headers required for C89 freestanding compilers.
19390         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19391         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19392         * m4/human.m4 (gl_HUMAN): Likewise.
19393         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19394         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19395         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19396         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19397         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19398         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19399
19400 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19401
19402         Assume the headers required for C89 freestanding compilers.
19403         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19404         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19405         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19406         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19407         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19408         define, since <limits.h> is guaranteed to do that.
19409         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19410         * lib/exclude.c: Include <stdbool.h> unconditionally.
19411         * lib/tempname.c: Include <stddef.h> unconditionally.
19412         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19413         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19414         <stddef.h> does that.
19415         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19416         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19417         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19418         needed.
19419         * lib/xstrtol.c: Likewise.
19420         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19421         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19422
19423         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19424         warnings on some platforms.
19425
19426         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19427         arbitrarily.
19428
19429 2003-05-26  Jim Meyering  <jim@meyering.net>
19430
19431         Merge in a change from coreutils:
19432         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19433         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19434         that condition, rather than `-1' which is slightly misleading.
19435         Change the name of the cache variable to have the gl_ prefix.
19436         Prompted by a patch from Richard Dawe for DJGPP.
19437
19438 2003-05-24  Karl Berry  <karl@gnu.org>
19439
19440         * config/config.guess: update from prep.
19441
19442 2003-05-22  Karl Berry  <karl@gnu.org>
19443
19444         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19445
19446 2003-05-20  Karl Berry  <karl@gnu.org>
19447
19448         * config/config.guess: update from prep.
19449
19450 2003-05-18  Karl Berry  <karl@gnu.org>
19451
19452         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19453         might actually be set by the user.
19454
19455         * config/depcomp, install-sh, mdate-sh: update from automake.
19456
19457 2003-05-17  Bruno Haible  <bruno@clisp.org>
19458
19459         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19460         invalid expansion for AC_EGREP_CPP.
19461         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19462         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19463         Suggested by Akim Demaille <akim@epita.fr> in
19464         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19465
19466 2003-05-12  Jim Meyering  <jim@meyering.net>
19467
19468         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19469         the space-padded-by-default conversion specifiers, %e, %k, %l.
19470
19471 2003-05-12  Bruno Haible  <bruno@clisp.org>
19472
19473         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19474         the string is longer than 4 KB.
19475
19476 2003-05-11  Karl Berry  <karl@gnu.org>
19477
19478         * config/config.{guess,sub}: update from prep.
19479
19480 2003-05-09  Bruno Haible  <bruno@clisp.org>
19481
19482         * modules/error: Add m4/strerror_r.m4 to file list.
19483
19484 2003-05-03  Bruno Haible  <bruno@clisp.org>
19485
19486         Upgrade to Unicode-4.0.
19487         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19488         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19489         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19490         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19491         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19492         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19493         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19494         Change width of U+E0100..U+E01EF from 1 to 0.
19495
19496 2003-04-25  Jim Meyering  <jim@meyering.net>
19497
19498         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19499         of type size_t, not int.
19500
19501 2003-04-25  Bruno Haible  <bruno@clisp.org>
19502
19503         * lib/copy-file.c: Include <stddef.h>, for size_t.
19504
19505 2003-04-21  Paul Eggert  <eggert@twinsun.com>
19506
19507         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
19508         code which expansion is under static control.  Patch imported from
19509         Akim Demaille's patch to Bison; see
19510         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
19511
19512 2003-04-14  Bruno Haible  <bruno@clisp.org>
19513
19514         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
19515
19516 2003-04-11  Jim Meyering  <jim@meyering.net>
19517
19518         Merge changes from Coreutils.
19519
19520         2003-03-22  Jim Meyering  <jim@meyering.net>
19521
19522         * lib/strftime.c (widen): Cast alloca return value to proper type.
19523
19524         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
19525
19526         From GNU libc.
19527         * lib/strftime.c (my_strftime): Handle very large width
19528         specifications for numeric values correctly.  Improve checks for
19529         overflow.
19530
19531         2003-01-19  Jim Meyering  <jim@meyering.net>
19532
19533         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
19534         definitions.
19535         (nl_get_alt_digit) [! defined my_strftime]: Define.
19536         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
19537         _nl_get_alt_digit and _nl_get_walt_digit.
19538
19539         * lib/strftime.c (my_strftime): Merge in locale-related changes from
19540         libc. These changes have no effect outside of _LIBC.
19541
19542 2003-04-10  Bruno Haible  <bruno@clisp.org>
19543
19544         * modules/findprog: New file.
19545         * MODULES.html.sh (func_all_modules): Add it.
19546
19547 2003-04-10  Bruno Haible  <bruno@clisp.org>
19548
19549         * m4/findprog.m4: New file.
19550         * m4/eaccess.m4: New file.
19551
19552 2003-04-10  Bruno Haible  <bruno@clisp.org>
19553
19554         * lib/findprog.h: New file, from GNU gettext.
19555         * lib/findprog.c: New file, from GNU gettext.
19556
19557 2003-04-05  Jim Meyering  <jim@meyering.net>
19558
19559         Merge changes from Coreutils.
19560
19561         * lib/exclude.h (PARAMS): Remove definition and uses.
19562         * lib/exclude.c: Remove uses of `PARAMS'.
19563
19564         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
19565         Add test-cases for DOS filenames. Declare program_name.
19566         (main): Set up program_name.  Patch by Rich Dawe.
19567
19568         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19569         error from mntctl.
19570         Use mntctl's return value to drive the entry-processing loop, since
19571         we can't rely on the value of the vmt_length member in the last
19572         entry.  On some systems doing so could result in exhausting
19573         virtual memory.  Based in part on a patch from Mike Jetzer.
19574
19575 2003-04-04  Bruno Haible  <bruno@clisp.org>
19576
19577         * modules/linebreak: New file.
19578         * MODULES.html.sh (func_all_modules): Add it.
19579
19580 2003-04-04  Bruno Haible  <bruno@clisp.org>
19581
19582         * m4/linebreak.m4: New file.
19583
19584 2003-04-04  Bruno Haible  <bruno@clisp.org>
19585
19586         * lib/linebreak.h: New file, from GNU gettext.
19587         * lib/linebreak.c: New file, from GNU gettext with slight
19588         modifications.
19589         * lib/lbrkprop.h: New file, from GNU gettext.
19590
19591 2003-04-03  Bruno Haible  <bruno@clisp.org>
19592
19593         * modules/utf8-ucs4: New file.
19594         * modules/utf16-ucs4: New file.
19595         * modules/ucs4-utf8: New file.
19596         * modules/ucs4-utf16: New file.
19597         * MODULES.html.sh (func_all_modules): Add them.
19598
19599 2003-04-03  Bruno Haible  <bruno@clisp.org>
19600
19601         * m4/utf-ucs4.m4: New file.
19602         * m4/ucs4-utf.m4: New file.
19603
19604 2003-04-03  Bruno Haible  <bruno@clisp.org>
19605
19606         * lib/utf8-ucs4.h: New file, from GNU gettext.
19607         * lib/utf16-ucs4.h: New file, from GNU gettext.
19608         * lib/ucs4-utf8.h: New file, from GNU gettext.
19609         * lib/ucs4-utf16.h: New file, from GNU gettext.
19610
19611 2003-04-02  Bruno Haible  <bruno@clisp.org>
19612
19613         * modules/binary-io: New file.
19614         * MODULES.html.sh (func_all_modules): Add it.
19615
19616 2003-04-02  Bruno Haible  <bruno@clisp.org>
19617
19618         * lib/binary-io.h: New file, from GNU gettext.
19619
19620 2003-04-01  Bruno Haible  <bruno@clisp.org>
19621
19622         * modules/pathname: New file.
19623         * MODULES.html.sh (func_all_modules): Add it.
19624
19625 2003-04-01  Bruno Haible  <bruno@clisp.org>
19626
19627         * lib/pathname.h: New file, from GNU gettext.
19628         * lib/concatpath.c: New file, from GNU gettext.
19629
19630 2003-03-30  Bruno Haible  <bruno@clisp.org>
19631
19632         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
19633
19634 2003-03-30  Bruno Haible  <bruno@clisp.org>
19635
19636         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
19637         function chown() doesn't exist.
19638
19639 2003-03-28  Bruno Haible  <bruno@clisp.org>
19640
19641         * modules/copy-file: New file.
19642         * MODULES.html.sh (func_all_modules): Add it.
19643
19644 2003-03-28  Bruno Haible  <bruno@clisp.org>
19645
19646         * m4/copy-file.m4: New file.
19647
19648 2003-03-28  Bruno Haible  <bruno@clisp.org>
19649
19650         * lib/copy-file.h: New file, from GNU gettext.
19651         * lib/copy-file.c: New file, from GNU gettext.
19652
19653 2003-03-18  Jim Meyering  <jim@meyering.net>
19654
19655         * lib/quote.c (quote_n): Fix typo in comment.
19656
19657 2003-03-18  Bruno Haible  <bruno@clisp.org>
19658
19659         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
19660         checking.
19661         * m4/onceonly_2_57.m4: Likewise.
19662
19663 2003-03-17  Bruno Haible  <bruno@clisp.org>
19664
19665         * m4/onceonly.m4: Require autoconf 2.54 or newer.
19666         (m4_quote): Remove macro.
19667         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
19668
19669 2003-03-14  Jim Meyering  <jim@meyering.net>
19670
19671         Merge changes from Coreutils.
19672         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
19673         to be const, in order to avoid warnings.
19674         (obstack_room): Likewise.
19675         (obstack_empty_p): Likewise.
19676
19677 2003-03-14  Bruno Haible  <bruno@clisp.org>
19678
19679         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
19680         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
19681
19682 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19683
19684         Merge changes from Bison.
19685         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
19686         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
19687         when compiling Bison 1.875's `bitset bset = obstack_alloc
19688         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
19689         * lib/hash.c: Include <stdbool.h> unconditionally.
19690
19691 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19692
19693         * m4/onceonly.m4 (m4_quote): New macro.
19694         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
19695         Quote AC_FOREACH variable-expansions properly.
19696
19697 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19698
19699         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
19700
19701 2003-03-09  Paul Eggert  <eggert@twinsun.com>
19702
19703         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
19704         Reported by Bruce Becker; see:
19705         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
19706
19707 2003-03-03  Paul Eggert  <eggert@twinsun.com>
19708             Bruno Haible  <bruno@clisp.org>
19709
19710         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
19711         Reported by John Hughes, see
19712         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
19713
19714 2003-02-20  Bruno Haible  <bruno@clisp.org>
19715
19716         * MODULES.html.sh (func_all_modules): Add poll.
19717
19718 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19719
19720         * modules/poll: New file.
19721
19722 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19723
19724         * lib/poll_.h: New file.
19725         * lib/poll.c: New file.
19726
19727 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19728
19729         * m4/poll.m4: New file.
19730
19731 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19732
19733         * modules/mathl: New file.
19734
19735 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19736
19737         * lib/mathl.h: New file.
19738         * lib/acosl.c: New file.
19739         * lib/asinl.c: New file.
19740         * lib/atanl.c: New file.
19741         * lib/ceill.c: New file.
19742         * lib/cosl.c: New file.
19743         * lib/expl.c: New file.
19744         * lib/floorl.c: New file.
19745         * lib/frexpl.c: New file.
19746         * lib/ldexpl.c: New file.
19747         * lib/logl.c: New file.
19748         * lib/sincosl.c: New file.
19749         * lib/sinl.c: New file.
19750         * lib/sqrtl.c: New file.
19751         * lib/tanl.c: New file.
19752         * lib/trigl.c: New file.
19753         * lib/trigl.h: New file.
19754
19755 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19756
19757         * m4/mathl.m4: New file.
19758
19759 2003-02-18  Bruno Haible  <bruno@clisp.org>
19760
19761         * MODULES.html.sh (func_all_modules): Add mathl.
19762
19763 2003-02-17  Bruno Haible  <bruno@clisp.org>
19764
19765         * modules/mkdtemp: New module.
19766         * MODULES.html.sh (func_all_modules): Add it.
19767
19768 2003-02-17  Bruno Haible  <bruno@clisp.org>
19769
19770         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
19771
19772 2003-02-17  Bruno Haible  <bruno@clisp.org>
19773
19774         * lib/mkdtemp.h: New file, from GNU gettext.
19775         * lib/mkdtemp.c: New file, from GNU gettext.
19776
19777 2003-02-02  Jim Meyering  <jim@meyering.net>
19778
19779         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
19780         e.g. glibc-2.2.93.
19781
19782 2003-01-31  Bruno Haible  <bruno@clisp.org>
19783
19784         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
19785         'rpl_rename'.
19786         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
19787         'rpl_strnlen'.
19788         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
19789         'rpl_strtod'.
19790         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
19791         'rpl_utime'.
19792
19793 2003-01-31  Bruno Haible  <bruno@clisp.org>
19794
19795         * lib/rename.c: #undef rename before defining rpl_rename.
19796         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
19797
19798 2003-01-30  Bruno Haible  <bruno@clisp.org>
19799
19800         * modules/vasnprintf, modules/vasprintf: New modules.
19801         * MODULES.html.sh (func_all_modules): Add them.
19802
19803 2003-01-30  Bruno Haible  <bruno@clisp.org>
19804
19805         * m4/signed.m4: New file, from GNU gettext.
19806         * m4/longdouble.m4: New file, from GNU gettext.
19807         * m4/wchar_t.m4: New file, from GNU gettext.
19808         * m4/wint_t.m4: New file, from GNU gettext.
19809         * m4/vasnprintf.m4: New file.
19810         * m4/vasprintf.m4: New file.
19811
19812 2003-01-30  Bruno Haible  <bruno@clisp.org>
19813
19814         * lib/printf-args.h: New file, from GNU gettext.
19815         * lib/printf-args.c: New file, from GNU gettext.
19816         * lib/printf-parse.h: New file, from GNU gettext.
19817         * lib/printf-parse.c: New file, from GNU gettext.
19818         * lib/vasnprintf.h: New file, from GNU gettext.
19819         * lib/vasnprintf.c: New file, from GNU gettext.
19820         * lib/asnprintf.c: New file, from GNU gettext.
19821         * lib/vasprintf.h: New file, from GNU gettext with modifications.
19822         * lib/vasprintf.c: New file, from GNU gettext.
19823         * lib/asprintf.c: New file, from GNU gettext.
19824
19825 2003-01-29  Bruno Haible  <bruno@clisp.org>
19826
19827         * modules/stpncpy: New module.
19828         * MODULES.html.sh (func_all_modules): Add it.
19829
19830 2003-01-29  Bruno Haible  <bruno@clisp.org>
19831
19832         * m4/stpncpy.m4: New file.
19833
19834 2003-01-29  Bruno Haible  <bruno@clisp.org>
19835
19836         * lib/stpncpy.h: New file, from GNU gettext with modifications.
19837         * lib/stpncpy.c: New file, from GNU gettext with modifications.
19838
19839 2003-01-28  Bruno Haible  <bruno@clisp.org>
19840
19841         * modules/c-ctype: New module.
19842         * MODULES.html.sh (func_all_modules): Add it.
19843
19844 2003-01-28  Bruno Haible  <bruno@clisp.org>
19845
19846         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
19847         Paul Eggert.
19848         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
19849         Paul Eggert.
19850
19851 2003-01-27  Bruno Haible  <bruno@clisp.org>
19852
19853         * modules/xsetenv: New module.
19854         * MODULES.html.sh (func_all_modules): Add it.
19855
19856 2003-01-27  Bruno Haible  <bruno@clisp.org>
19857
19858         * lib/xsetenv.h: New file, from GNU gettext.
19859         * lib/xsetenv.c: New file, from GNU gettext.
19860
19861 2003-01-23  Jim Meyering  <jim@meyering.net>
19862
19863         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
19864         from working on systems without dirfd (at least Irix and OSF1/Tru64).
19865
19866 2003-01-23  Bruno Haible  <bruno@clisp.org>
19867
19868         * modules/minmax: New module.
19869         * MODULES.html.sh (func_all_modules): Add it.
19870
19871 2003-01-23  Bruno Haible  <bruno@clisp.org>
19872
19873         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
19874         Eggert.
19875
19876 2003-01-22  Bruno Haible  <bruno@clisp.org>
19877
19878         * modules/exit: New module.
19879         * MODULES.html.sh (func_all_modules): Add it.
19880
19881 2003-01-22  Bruno Haible  <bruno@clisp.org>
19882
19883         * lib/exit.h: New file, from GNU gettext.
19884
19885 2003-01-19  Bruno Haible  <bruno@clisp.org>
19886
19887         * gnulib-tool: Recognize option --extract-maintainer.
19888         (func_get_maintainer): New function.
19889         * modules/*: Add Maintainer entry.
19890
19891 2003-01-16  Jim Meyering  <jim@meyering.net>
19892
19893         * m4/regex.m4: The `regex' struct is both input and output.
19894         Initialize it before each use.  Patch by Tim Waugh.
19895
19896 2003-01-16  Bruno Haible  <bruno@clisp.org>
19897
19898         * MODULES.html.sh: Add a table of contents. Add the module name as
19899         leftmost column. Add hyperlinks.
19900
19901 2003-01-15  Bruno Haible  <bruno@clisp.org>
19902
19903         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
19904
19905 2003-01-15  Bruno Haible  <bruno@clisp.org>
19906
19907         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
19908         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
19909         suffix.
19910
19911 2003-01-15  Bruno Haible  <bruno@clisp.org>
19912
19913         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
19914
19915 2003-01-15  Bruno Haible  <bruno@clisp.org>
19916
19917         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
19918         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
19919
19920 2003-01-14  Jim Meyering  <jim@meyering.net>
19921
19922         * lib/same.c (same_name): Tweak a comment.
19923
19924 2003-01-14  Bruno Haible  <bruno@clisp.org>
19925
19926         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
19927         when a string comparison is sufficient.
19928
19929 2003-01-14  Bruno Haible  <bruno@clisp.org>
19930
19931         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
19932         'unsigned int'.
19933
19934 2003-01-14  Bruno Haible  <bruno@clisp.org>
19935
19936         * lib/hash-pjw.c: Add comment about low quality of this function.
19937
19938 2003-01-13  Bruno Haible  <bruno@clisp.org>
19939
19940         * modules/stpcpy: Distribute lib/stpcpy.h.
19941         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
19942
19943 2003-01-13  Bruno Haible  <bruno@clisp.org>
19944
19945         * modules/*: Add a description.
19946         * modules/strpbrk: Fix Makefile.am snippet.
19947         * modules/strtoimax: Fix dependencies.
19948         * modules/strtoumax: Likewise.
19949
19950 2003-01-13  Bruno Haible  <bruno@clisp.org>
19951
19952         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
19953         * modules/alloca (Makefile.am): All object files depend on alloca.h.
19954         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
19955
19956 2003-01-13  Bruno Haible  <bruno@clisp.org>
19957
19958         * gnulib-tool (func_create_testdir): Store config/* files in the main
19959         directory.
19960         * config.rpath: Move to ...
19961         * config/config.rpath: ... here.
19962         * modules/gettext: Contains config/config.rpath, not config.rpath.
19963         * modules/iconv: Likewise.
19964
19965 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19966
19967         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19968         to avoid collisions with libcurses and libreadline.
19969
19970         * m4/getstr.m4: Remove.
19971         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
19972
19973 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19974
19975         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19976         to avoid collisions with libcurses and libreadline.
19977
19978         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
19979         * lib/getstr.h, getstr.c: Remove.
19980         * lib/getline.c: Include "getline.h", to check interface.
19981         Move body of old getstr.c here: this defines MIN_CHUNK and
19982         declares getdelim2, which is renamed from getstr.
19983         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
19984
19985         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
19986         All uses changed.
19987         * lib/linebuffer.h: Likewise.
19988         (readline): Remove backward-compatibility macro.
19989
19990 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19991
19992         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19993         to avoid collisions with libcurses and libreadline.
19994         * getstr: Remove.
19995         * MODULES.html.sh: Remove getstr.
19996         * modules/getline: Depend on unlocked-io, not getstr.
19997
19998 2003-01-12  Jim Meyering  <jim@meyering.net>
19999
20000         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20001
20002 2003-01-10  Bruno Haible  <bruno@clisp.org>
20003
20004         * modules/alloca: Change Makefile.am requirements. Simplify Include
20005         requirements. Add lib/alloca_.h to file list.
20006
20007 2003-01-10  Bruno Haible  <bruno@clisp.org>
20008
20009         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20010
20011 2003-01-10  Bruno Haible  <bruno@clisp.org>
20012
20013         * lib/alloca_.h: New file.
20014         * lib/getdate.y: Unconditionally include alloca.h.
20015         * lib/makepath.c: Likewise.
20016         * lib/setenv.c: Likewise.
20017         * lib/userspec.c: Likewise.
20018
20019 2003-01-09  Karl Berry  <karl@gnu.org>
20020
20021         * MODULES.html.sh: include `dirname $0` in PATH, to find
20022         gnulib-tool.
20023
20024 2003-01-09  Bruno Haible  <bruno@clisp.org>
20025
20026         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20027         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20028
20029 2003-01-09  Bruno Haible  <bruno@clisp.org>
20030
20031         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20032
20033 2003-01-09  Bruno Haible  <bruno@clisp.org>
20034
20035         * lib/stdbool.h.in: New file.
20036
20037 2003-01-09  Bruno Haible  <bruno@clisp.org>
20038
20039         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20040         * MODULES.html.sh: Likewise.
20041
20042 2003-01-08  Jim Meyering  <jim@meyering.net>
20043
20044         * lib/full-write.c: Undefine and define-away `const' after inclusion
20045         of errno.h, not before.  Suggestion from Bruno Haible.
20046
20047 2003-01-08  Bruno Haible  <bruno@clisp.org>
20048
20049         * modules/full-read: Depend on full-write.
20050
20051 2003-01-08  Bruno Haible  <bruno@clisp.org>
20052
20053         * lib/safe-read.c: Include specification header first, to ensure its
20054         selfcontainedness.
20055         * lib/full-write.c: Likewise.
20056
20057 2003-01-07  Jim Meyering  <jim@meyering.net>
20058
20059         * lib/full-write.c: Rework so that it may serve to define full_read,
20060         too.
20061         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20062
20063 2003-01-07  Bruno Haible  <bruno@clisp.org>
20064
20065         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20066         <inttypes.h>.
20067         * lib/xstrtol.h: Likewise.
20068         * lib/xstrtoimax.c: Likewise.
20069         * lib/xstrtoumax.c: Likewise.
20070         * lib/human.h: Likewise.
20071
20072         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20073         on systems that have <inttypes.h> but not <stdint.h>.
20074
20075 2003-01-07  Bruno Haible  <bruno@clisp.org>
20076
20077         * MODULES.html.sh: Add copyright notice.
20078         (missed_files): Omit CVS directory entries.
20079         (func_module): Make it work with sed-3.02.
20080         * MODULES.txt: Remove file.
20081
20082 2003-01-06  Jim Meyering  <jim@meyering.net>
20083
20084         * lib/version-etc.c: Update year in translatable copyright string.
20085
20086 2003-01-03  Karl Berry  <karl@gnu.org>
20087
20088         * config/config.{guess,sub}: update from prep.
20089
20090 2003-01-02  Karl Berry  <karl@gnu.org>
20091
20092         * doc/COPYING.DOC: belatedly updated to 1.2.
20093
20094 2003-01-01  Karl Berry  <karl@gnu.org>
20095
20096         * gnulib-tool (func_verify_module): report module name $module in
20097         error message, not $1.
20098         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20099         be created, only if it doesn't exist.
20100         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20101
20102 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20103
20104         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20105
20106 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20107
20108         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20109         memcmp if strcoll doesn't work.
20110
20111 2002-12-31  Bruno Haible  <bruno@clisp.org>
20112
20113         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20114         nonempty.
20115
20116 2002-12-31  Bruno Haible  <bruno@clisp.org>
20117
20118         * lib/memcoll.c (STRCOLL): New macro.
20119         (memcoll): Use it.
20120
20121 2002-12-31  Bruno Haible  <bruno@clisp.org>
20122
20123         * lib/localcharset.h: New file.
20124         * lib/localcharset.c: Include it.
20125         * lib/unicodeio.c: Likewise.
20126
20127 2002-12-31  Bruno Haible  <bruno@clisp.org>
20128
20129         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20130         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20131
20132 2002-12-31  Bruno Haible  <bruno@clisp.org>
20133
20134         * lib/getline.h: Include <stddef.h>, for size_t.
20135
20136         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20137         * lib/unicodeio.c: Don't include <stddef.h>.
20138
20139 2002-12-31  Bruno Haible  <bruno@clisp.org>
20140
20141         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20142         HAVE_TM_ZONE.
20143
20144 2002-12-24  Karl Berry  <karl@gnu.org>
20145
20146         * config/config.guess: update from prep.
20147
20148 2002-12-24  Bruno Haible  <bruno@clisp.org>
20149
20150         General infrasructure.
20151         * m4/README: Rewritten.
20152         * m4/onceonly.m4: New file.
20153         * m4/onceonly_2_57.m4: New file.
20154
20155         Module atexit.
20156         * m4/atexit.m4: New file.
20157
20158         Module strtod.
20159         * m4/strtod.m4: New file.
20160
20161         Module strtol.
20162         * m4/strtol.m4: New file.
20163
20164         Module strtoul.
20165         * m4/strtoul.m4: New file.
20166
20167         Module memchr.
20168         * m4/memchr.m4: New file.
20169
20170         Module memcmp.
20171         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20172         (jm_FUNC_MEMCMP): Invoke it.
20173
20174         Module memcpy.
20175         * m4/memcpy.m4: New file.
20176
20177         Module memmove.
20178         * m4/memmove.m4: New file.
20179
20180         Module memset.
20181         * m4/memset.m4: New file.
20182
20183         Module strcspn.
20184         * m4/strcspn.m4: New file.
20185
20186         Module strpbrk.
20187         * m4/strpbrk.m4: New file.
20188
20189         Module strstr.
20190         * m4/strstr.m4: New file.
20191
20192         Module strerror.
20193         * m4/strerror.m4: New file.
20194
20195         Module mktime.
20196         * m4/mktime.m4: Renamed from jm-mktime.m4.
20197         (gl_PREREQ_MKTIME): New macro.
20198         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20199
20200         Module malloc.
20201         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20202         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20203         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20204
20205         Module realloc.
20206         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20207         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20208         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20209
20210         Module strftime.
20211         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20212         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20213         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20214         gl_TM_GMTOFF.
20215         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20216
20217         Module xalloc.
20218         * m4/xalloc.m4: New file.
20219
20220         Module alloca.
20221         * m4/alloca.m4: New file.
20222
20223         Module putenv.
20224         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20225         (jm_FUNC_PUTENV): Invoke it.
20226
20227         Module setenv.
20228         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20229         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20230         when invoked twice.
20231         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20232         gt_FUNC_SETENV.
20233
20234         Module memrchr.
20235         * m4/memrchr.m4: New file.
20236
20237         Module stpcpy.
20238         * m4/stpcpy.m4: New file.
20239
20240         Module strcase.
20241         * m4/strcase.m4: New file.
20242
20243         Module strdup.
20244         * m4/strdup.m4: New file.
20245
20246         Module strnlen.
20247         * m4/strnlen.m4: New file.
20248
20249         Module strndup.
20250         * m4/strndup.m4: New file.
20251
20252         Module xstrtod.
20253         * m4/xstrtod.m4: New file.
20254
20255         Module xstrtol.
20256         * m4/xstrtol.m4: New file.
20257
20258         Module getdate.
20259         * m4/getdate.m4: New file.
20260
20261         Module unlocked-io.
20262         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20263         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20264         * m4/jm-glibc-io.m4n: Remove file.
20265
20266         Module long-options.
20267         * m4/long-options.m4: New file.
20268
20269         Module md5.
20270         * m4/md5.m4: New file.
20271
20272         Module sha.
20273         * m4/sha.m4: New file.
20274
20275         Module getstr.
20276         * m4/getstr.m4: New file.
20277
20278         Module getline.
20279         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20280         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20281         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20282         simply getline. Infoke gl_PREREQ_GETLINE.
20283
20284         Module obstack.
20285         * m4/obstack.m4: New file.
20286
20287         Module hash.
20288         * m4/hash.m4: New file.
20289
20290         Module readtokens.
20291         * m4/readtokens.m4: New file.
20292
20293         Module strverscmp.
20294         * m4/strverscmp.m4: New file.
20295
20296         Module stdbool.
20297         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20298         OSF/1.
20299
20300         Module strtoll.
20301         * m4/strtoll.m4: New file.
20302
20303         Module strtoull.
20304         * m4/strtoull.m4: New file.
20305
20306         Module strtoimax.
20307         * m4/strtoimax.m4: New file.
20308
20309         Module strtoumax.
20310         * m4/strtoumax.m4: New file.
20311
20312         Module xstrtoimax.
20313         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20314         jm_AC_PREREQ_XSTRTOIMAX.
20315         Moved the strtol prerequisites to strtol.m4.
20316         Moved the strtoll prerequisites to strtoll.m4.
20317         Moved the strtoimax prerequisites to strtoimax.m4.
20318
20319         Module xstrtoumax.
20320         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20321         jm_AC_PREREQ_XSTRTOUMAX.
20322         Moved the strtoul prerequisites to strtoul.m4.
20323         Moved the strtoull prerequisites to strtoull.m4.
20324         Moved the strtoumax prerequisites to strtoumax.m4.
20325
20326         Module chown.
20327         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20328         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20329
20330         Module dup2.
20331         * m4/dup2.m4: New file.
20332
20333         Module ftruncate.
20334         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20335         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20336
20337         Module getgroups.
20338         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20339         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20340
20341         Module gettimeofday.
20342         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20343         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20344         gl_PREREQ_GETTIMEOFDAY.
20345
20346         Module mkdir.
20347         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20348         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20349
20350         Module mkstemp.
20351         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20352         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20353         jm_AC_TYPE_UINTMAX_T.
20354         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20355
20356         Module stat.
20357         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
20358         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
20359
20360         Module lstat.
20361         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20362         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20363
20364         Module timespec.
20365         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20366         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20367         * m4/st_mtim.m4: Indentation.
20368
20369         Module nanosleep.
20370         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20371         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20372         gl_PREREQ_NANOSLEEP.
20373
20374         Module regex.
20375         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20376         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20377         (gl_REGEX): New macro.
20378
20379         Module rename.
20380         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20381         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20382
20383         Module rmdir.
20384         * m4/rmdir.m4: New file.
20385
20386         Module utime.
20387         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20388         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20389         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20390
20391         Module dirname.
20392         * m4/dirname.m4: New file.
20393
20394         Module getopt.
20395         * m4/getopt.m4: New file.
20396
20397         Module unistd-safer.
20398         * m4/unistd-safer.m4: New file.
20399
20400         Module fnmatch.
20401         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20402         declaration.
20403         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20404         (gl_FUNC_FNMATCH_POSIX): New macro.
20405         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20406         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20407         simply fnmatch.
20408
20409         Module exclude.
20410         * m4/exclude.m4: New file.
20411
20412         Module human.
20413         * m4/human.m4: New file.
20414
20415         Module acl.
20416         * m4/acl.m4: Nop.
20417
20418         Module backupfile.
20419         * m4/backupfile.m4: New file.
20420         * m4/d-ino.m4: Indentation.
20421
20422         Module fsusage.
20423         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20424         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20425         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20426
20427         Module dirfd.
20428         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20429         requirements.
20430
20431         Module euidaccess.
20432         * m4/euidaccess.m4: New file.
20433
20434         Module file-type.
20435         * m4/file-type.m4: New file.
20436
20437         Module fileblocks.
20438         * m4/fileblocks.m4: New file.
20439
20440         Module filemode.
20441         * m4/filemode.m4: New file.
20442
20443         Module isdir.
20444         * m4/isdir.m4: New file.
20445
20446         Module lchown.
20447         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20448         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20449
20450         Module makepath.
20451         * m4/makepath.m4: New file.
20452
20453         Module modechange.
20454         * m4/modechange.m4: New file.
20455
20456         Module mountlist.
20457         * m4/mountlist.m4: New file.
20458         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20459         Indentation.
20460
20461         Module path-concat.
20462         * m4/path-concat.m4: New file.
20463
20464         Module pathmax.
20465         * m4/pathmax.m4: New file.
20466
20467         Module same.
20468         * m4/same.m4: New file.
20469
20470         Module save-cwd.
20471         * m4/save-cwd.m4: New file.
20472
20473         Module savedir.
20474         * m4/savedir.m4: New file.
20475
20476         Module xgetcwd.
20477         * m4/xgetcwd.m4: New file.
20478         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20479
20480         Module xreadlink.
20481         * m4/xreadlink.m4: New file.
20482
20483         Module safe-read.
20484         * m4/safe-read.m4: New file.
20485
20486         Module safe-write.
20487         * m4/safe-write.m4: New file.
20488
20489         Module closeout.
20490         * m4/closeout.m4: New file.
20491
20492         Module stdio-safer.
20493         * m4/stdio-safer.m4: New file.
20494
20495         Module getpass.
20496         * m4/getpass.m4: New file.
20497
20498         Module getugroups.
20499         * m4/getugroups.m4: New file.
20500
20501         Module group-member.
20502         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
20503         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
20504
20505         Module idcache.
20506         * m4/idcache.m4: New file.
20507
20508         Module userspec.
20509         * m4/userspec.m4: New file.
20510
20511         Module gettime.
20512         * m4/clock_time.m4: New file.
20513         * m4/gettime.m4: New file.
20514
20515         Module settime.
20516         * m4/settime.m4: New file.
20517
20518         Module posixtm.
20519         * m4/posixtm.m4: New file.
20520
20521         Module gethostname.
20522         * m4/gethostname.m4: New file.
20523
20524         Module canon-host.
20525         * m4/canon-host.m4: New file.
20526
20527         Module gettext.
20528         * m4/codeset.m4: New file, from gettext-0.11.5.
20529         * m4/gettext.m4: New file, from gettext-0.11.5.
20530         * m4/glibc21.m4: New file, from gettext-0.11.5.
20531         * m4/iconv.m4: New file, from gettext-0.11.5.
20532         * m4/intdiv0.m4: New file, from gettext-0.11.5.
20533         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
20534         * m4/inttypes.m4: New file, from gettext-0.11.5.
20535         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
20536         * m4/isc-posix.m4: New file, from gettext-0.11.5.
20537         * m4/lcmessage.m4: New file, from gettext-0.11.5.
20538         * m4/lib-ld.m4: New file, from gettext-0.11.5.
20539         * m4/lib-link.m4: New file, from gettext-0.11.5.
20540         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
20541         * m4/progtest.m4: New file, from gettext-0.11.5.
20542         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
20543         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
20544         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
20545
20546         Module localcharset.
20547         * m4/localcharset.m4: New file.
20548
20549         Module hard-locale.
20550         * m4/hard-locale.m4: New file.
20551
20552         Module mbswidth.
20553         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
20554         onceonly macros.
20555         * m4/mbrtowc.m4: Add comment.
20556
20557         Module memcasecmp.
20558         * m4/memcasecmp.m4: New file.
20559
20560         Module memcoll.
20561         * m4/memcoll.m4: New file.
20562
20563         Module unicodeio.
20564         * m4/unicodeio.m4: New file.
20565
20566         Module rpmatch.
20567         * m4/rpmatch.m4: New file.
20568
20569         Module yesno.
20570         * m4/yesno.m4: New file.
20571
20572         Module exitfail.
20573         * m4/exitfail.m4: New file.
20574
20575         Module c-stack.
20576         * m4/c-stack.m4 (gl_C_STACK): New macro.
20577         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
20578
20579         Module error.
20580         * m4/error.m4 (gl_ERROR): New macro.
20581         (jm_PREREQ_ERROR): Use onceonly macros.
20582
20583         Module fatal.
20584         * m4/fatal.m4: New file.
20585
20586         Module getloadavg.
20587         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
20588         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
20589
20590         Module getpagesize.
20591         * m4/getpagesize.m4: New file.
20592
20593         Module getusershell.
20594         * m4/getusershell.m4: New file.
20595
20596         Module physmem.
20597         * m4/physmem.m4: New file.
20598
20599         Module posixver.
20600         * m4/posixver.m4: New file.
20601
20602         Module quotearg.
20603         * m4/quotearg.m4: New file.
20604
20605         Module quote.
20606         * m4/quote.m4: New file.
20607
20608         Module readutmp.
20609         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
20610
20611         Module sig2str.
20612         * m4/sig2str.m4: New file.
20613
20614         Other.
20615         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
20616         ulonglong.m4.
20617         * m4/intmax_t.m4: New file.
20618         * m4/d-type.m4: Indentation.
20619         * m4/jm-macros.m4: Update.
20620         * m4/prereq.m4 (jm_PREREQ): Update.
20621         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
20622         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
20623         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
20624         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
20625         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
20626         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
20627         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
20628         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
20629         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
20630         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
20631         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
20632         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
20633         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
20634         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
20635         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
20636         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
20637         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
20638         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
20639         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
20640
20641 2002-12-24  Bruno Haible  <bruno@clisp.org>
20642
20643         * MODULES.txt: Update according to m4/ changes.
20644
20645         Module gettext.
20646         * config.rpath: New file, from gettext-0.11.5.
20647
20648         * modules/*: New module descriptions.
20649         * gnulib-tool: New file.
20650         * MODULES.html.sh: New file.
20651
20652 2002-12-21  Karl Berry  <karl@gnu.org>
20653
20654         * doc/fdl.texi: update to version 1.2.
20655
20656 2002-12-19  Karl Berry  <karl@gnu.org>
20657
20658         * config/config.guess: update from prep.
20659
20660 2002-12-18  Bruno Haible  <bruno@clisp.org>
20661
20662         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
20663         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
20664
20665 2002-12-17  Bruno Haible  <bruno@clisp.org>
20666
20667         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
20668         stdlib.h, string.h.
20669
20670 2002-12-17  Bruno Haible  <bruno@clisp.org>
20671
20672         * lib/canon-host.c (strdup): Remove unused declaration.
20673
20674         * lib/fsusage.c: Include full_read.h.
20675         (get_fs_usage): Use full_read instead of safe_read.
20676
20677         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
20678
20679 2002-12-12  Karl Berry  <karl@gnu.org>
20680
20681         * config/config.guess: update from prep.
20682
20683 2002-12-11  Bruno Haible  <bruno@clisp.org>
20684
20685         * m4/setenv.m4: New file, from gettext-0.11.5.
20686
20687 2002-12-11  Bruno Haible  <bruno@clisp.org>
20688
20689         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
20690         not unsetenv().
20691         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
20692         modifications:
20693
20694         2002-12-11  Bruno Haible  <bruno@clisp.org>
20695
20696                 * setenv.c (alloca): Fall back to malloc.
20697                 (freea): New macro.
20698                 (setenv): Use freea() to free memory allocated with alloca().
20699
20700         2002-11-13  Bruno Haible  <bruno@clisp.org>
20701
20702                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
20703                 function declarations.
20704                 * unsetenv.c (unsetenv): Likewise.
20705
20706         2002-03-04  Bruno Haible  <bruno@clisp.org>
20707
20708                 Portability to AIX 4.3.3.
20709                 * unsetenv.c: New file, extracted from setenv.c.
20710                 * setenv.c: Move the unsetenv() function to unsetenv.c.
20711
20712         2001-12-20  Bruno Haible  <bruno@clisp.org>
20713
20714                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
20715                 use malloc instead. For SunOS 4.
20716
20717         2001-12-11  Bruno Haible  <bruno@clisp.org>
20718
20719                 * setenv.c: Declare alloca.
20720                 (compar_fn_t): New typedef.
20721                 (KNOWN_VALUE, STORE_VALUE): Use it.
20722
20723         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
20724         setenv.h.
20725
20726 2002-12-10  Paul Eggert  <eggert@twinsun.com>
20727
20728         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
20729         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
20730         Choose values that are less likely to collide with system fnmatch
20731         options.
20732         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
20733         defined (e.g., a pure POSIX system).
20734         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
20735         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
20736
20737 2002-12-06  Paul Eggert  <eggert@twinsun.com>
20738
20739         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
20740         a pain in practice to deal with generated m4 files.  This change
20741         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
20742
20743         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
20744         and jm-glibc-io.m4, as they are no longer a special case.
20745         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
20746         kludge and the auto-generation stuff.  Check only whether the
20747         functions are declared, not whether they exist, since older hosts
20748         that don't declare the functions can't use the optimization anyway.
20749
20750 2002-12-06  Jim Meyering  <jim@meyering.net>
20751
20752         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
20753
20754         Merge in changes from libc's misc/error.c, in preparation
20755         for the merge of gnulib's changes back into libc.
20756
20757         * lib/error.c (_): Define only if not already defined.
20758         Move definition to follow all #include directives.
20759         Include unlocked-io.h only if !_LIBC.
20760         [_LIBC]: Include <libio/libioP.h>.
20761         [USE_IN_LIBIO]: Include <libio/iolibio.h>
20762         (fflush): Tweak definition to use INTUSE.
20763         (putc): Define.
20764
20765 2002-12-05  Paul Eggert  <eggert@twinsun.com>
20766
20767         * lib/alloca.c [defined emacs]: Include "lisp.h".
20768         (xalloc_die) [defined emacs]: New macro.
20769         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
20770         [! defined emacs]: Include <xalloc.h>.
20771         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
20772         (pointer): Typedef to POINTER_TYPE *.
20773         (malloc): Remove decl; we now always use xmalloc.
20774         (alloca): Use old-style definition, since Emacs needs this.
20775         Check for arithmetic overflow when computing combined size.
20776
20777 2002-12-04  Paul Eggert  <eggert@twinsun.com>
20778
20779         Do not generate unlocked-io.h automatically, since it's easier to
20780         maintain it by hand.
20781
20782         * lib/unlocked-io.h: New file, from GNU diffutils,
20783         but with proper copyright notice and attribution.
20784         * lib/gen-uio: Remove.
20785         * lib/Makefile.am: Add copyright notice.
20786         (libfetish_a_SOURCES): Add unlocked-io.h.
20787         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
20788         (DISTCLEANFILES, io_functions): Remove macros.
20789         (EXTRA_DIST): Remove gen_uio.
20790         (unlocked-io.h): Remove rule.
20791
20792 2002-12-04  Jim Meyering  <jim@meyering.net>
20793
20794         Reflect the fact that stat.c and lstat.c are no longer generated.
20795         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
20796         (DISTCLEANFILES): Likewise.
20797         (EXTRA_DIST): Likewise.
20798         (all_local): Don't depend on stat.c or lstat.c.
20799         (stat.c, lstat.c): Remove rules.
20800         (EXTRA_DIST): Remove xstat.in.
20801
20802         * lib/xstat.in: Remove file.  Contents moved into stat.c.
20803         * lib/stat.c: New file.  Contents mostly from xstat.in.
20804         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
20805         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
20806
20807         * lib/safe-read.c: Rework so that it may serve to define safe_write,
20808         too.
20809         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
20810
20811 2002-12-03  Jim Meyering  <jim@meyering.net>
20812
20813         * lib/safe-read.c, safe-write.c: Change variable names and comments,
20814         but not semantics, to minimize the differences between these two files.
20815         (safe_read): Change comment to mention SAFE_READ_ERROR.
20816
20817         * lib/safe-read.c (IS_EINTR): Define.
20818         (safe_read): Use IS_EINTR in place of in-function cpp directives.
20819
20820 2002-12-02  Jim Meyering  <jim@meyering.net>
20821
20822         * lib/safe-read.c (EINTR): Define.
20823         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
20824         (INT_MAX): Provide fallback.
20825         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
20826
20827         * lib/safe-read.h (SAFE_READ_ERROR): Define.
20828
20829 2002-12-02  Bruno Haible  <bruno@clisp.org>
20830
20831         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
20832         Define, taken from safe-read.c.
20833         (INT_MAX): Provide fallback.
20834         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
20835         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
20836
20837         * lib/safe-read.c (EINTR): Remove definition.
20838         (safe_read): Don't use EINTR if it is absent.
20839
20840 2002-12-01  Jim Meyering  <jim@meyering.net>
20841
20842         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
20843         zero.
20844         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
20845
20846 2002-11-27  Paul Eggert  <eggert@twinsun.com>
20847
20848         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
20849         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
20850         with `if (! (value < limit)) abort ();', for readability.
20851
20852 2002-11-26  Karl Berry  <karl@gnu.org>
20853
20854         * lib/strdup.c: copy from libc again, with jim's ok.
20855         * lib/.cppi-disable: re-add strdup.c
20856
20857 2002-11-25  Karl Berry  <karl@gnu.org>
20858
20859         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
20860         instead of "strtol.c".
20861
20862 2002-11-25  Karl Berry  <karl@gnu.org>
20863
20864         * config/install-sh: update from automake for variable quoting, $0 in
20865         error msgs, etc.
20866
20867         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
20868         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
20869         entry.
20870
20871 2002-11-25  Jim Meyering  <jim@meyering.net>
20872
20873         * lib/mktime.c: Sync from libc, now that it has the latest fix.
20874
20875 2002-11-24  Karl Berry  <karl@gnu.org>
20876
20877         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
20878         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
20879
20880 2002-11-24  Jim Meyering  <jim@meyering.net>
20881
20882         Update from coreutils:
20883
20884         * lib/mktime.c: Merge in changes from libc.
20885
20886         Avoid a link-time failure on some Linux systems.
20887         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
20888         (otherwise).
20889         (__mon_yday): Declare with the STATIC attribute.
20890         (__mktime_internal): Likewise.
20891         Based on a report from Greg Schafer.
20892
20893 2002-11-23  Jim Meyering  <jim@meyering.net>
20894
20895         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
20896         Use `unsigned', not `int', as type of index.
20897
20898         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
20899
20900         * lib/fsusage.c: Remove unneeded parentheses around operands of
20901         `defined'.
20902
20903 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20904
20905         * lib/quotearg.h: Allow multiple inclusion by surrounding with
20906         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
20907         so that we can be included first.
20908         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
20909         * lib/quotearg.c: Include quotearg.h immediately after config.h.
20910         No need to include stddef.h or sys/types.h any more.
20911         Surround local include files with "", not "<>".
20912         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
20913         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
20914         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
20915         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20916         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20917         (ISPRINT): Remove; no longer needed now that we assume C89.
20918
20919         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
20920         Preserve errno.
20921
20922         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
20923         quotearg_char): Use SIZE_MAX rather than
20924         (size_t) -1 when we are talking about "infinity".
20925
20926         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
20927
20928 2002-11-22  Paul Eggert  <eggert@twinsun.com>
20929
20930         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
20931         hint that one should use `if (! x) abort ();' rather than `assert
20932         (x);', and anyway it's one less thing to worry about configuring.
20933         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
20934         hash_rehash, hash_insert): Use abort rather than assert.
20935
20936 2002-11-22  Bruno Haible  <bruno@clisp.org>
20937
20938         * lib/safe-read.h: Assume C89. Add comments.
20939         (safe_read): Change return type to size_t.
20940         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
20941         byte counts > SSIZE_MAX correctly.
20942         * lib/safe-write.h: New file.
20943         * lib/safe-write.c: New file.
20944         * lib/full-read.h: New file.
20945         * lib/full-read.c: New file.
20946         * lib/full-write.h: Assume C89. Add comments.
20947         * lib/full-write.c: Include safe-write.h.
20948         (full_write): Rewritten to use safe_write.
20949         Suggested by Jim Meyering and Paul Eggert.
20950
20951 2002-11-21  Jim Meyering  <jim@meyering.net>
20952
20953         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
20954
20955         Merge in changes from the coreutils.
20956
20957         2002-09-25  Paul Eggert  <eggert@twinsun.com>
20958         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
20959         <stdint.h>.
20960         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
20961         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
20962         int.  Work more efficiently if X is the same width as uintmax_t.
20963         Do not compare X to -1, to avoid bogus compiler warning.
20964         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
20965         Don't assume that f_frsize and f_bsize are the same type.
20966
20967         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
20968         warning on FreeBSD.
20969
20970         * lib/makepath.c (make_path): Restore umask *before* creating the final
20971         component.
20972         (make_path): Minor reformatting.
20973
20974         * lib/xmalloc.c: Adjust to work with new autoconf macros,
20975         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
20976         HAVE_MALLOC/HAVE_REALLOC.
20977
20978         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
20979         dummy ones.  At least on GNU/Linux systems, `auto' means something
20980         else.
20981         From Michael Stone.
20982
20983 2002-11-21  Bruno Haible  <bruno@clisp.org>
20984
20985         Remove case insensitive option matching.
20986         * lib/argmatch.h (argcasematch): Remove declaration.
20987         (ARGCASEMATCH): Remove macro.
20988         (__xargmatch_internal): Remove case_sensitive argument.
20989         (XARGMATCH): Update.
20990         (XARGCASEMATCH): Remove macro.
20991         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
20992         case_sensitive argument.
20993         (argcasematch): Remove function.
20994         (__xargmatch_internal): Remove case_sensitive argument.
20995         (main): Use XARGMATCH instead of XARGCASEMATCH.
20996
20997         * lib/xmalloc.c: Change compile-time error message. Add comment about
20998         required autoconf version.
20999
21000 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21001
21002         Merge argmatch cleanups from Bison.  Assume C89.
21003
21004         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21005         Include stdlib.h, for EXIT_FAILURE.
21006         Always include <string.h>, since we assume C89.
21007         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21008         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21009         Include <stddef.h> instead, since it's all we need for size_t.
21010         (PARAMS): Remove.  All uses removed.
21011         (ARRAY_CARDINALITY): Do not bother to #undef.
21012         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21013         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21014         Remove unnecessary parentheses.
21015         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21016         Insert necessary parentheses.
21017         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21018         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21019
21020 2002-11-19  Bruno Haible  <bruno@clisp.org>
21021
21022         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21023         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21024
21025         * lib/mbswidth.h (PARAMS): Remove macro.
21026         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21027         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21028
21029         * lib/gcd.h (PARAMS): Remove macro.
21030         (gcd): Use ANSI C function declarations.
21031         * lib/gcd.c (gcd): Likewise.
21032
21033 2002-11-15  Bruno Haible  <bruno@clisp.org>
21034
21035         * lib/strcspn.c: Include <stddef.h>.
21036         (strcspn): Use ANSI C function declaration. Change return type to
21037         size_t. Use NULL.
21038         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21039         (strpbrk): Use NULL.
21040         * lib/strpbrk.h (PARAMS): Remove macro.
21041         (strpbrk): Use ANSI C function declaration.
21042         * lib/strstr.c: Don't include <sys/types.h>.
21043         * lib/strstr.h (PARAMS): Remove macro.
21044         (strstr): Use ANSI C function declarations.
21045
21046 2002-11-14  Karl Berry  <karl@gnu.org>
21047
21048         * config/mkinstalldirs: `do' on separate line, instead of
21049         `for var; do'.
21050
21051 2002-11-06  Bruno Haible  <bruno@clisp.org>
21052
21053         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21054         * lib/gcd.c (gcd): Likewise.
21055
21056 2002-11-05  Bruno Haible  <bruno@clisp.org>
21057
21058         * lib/gcd.h: New file, from gettext-0.11.5.
21059         * lib/gcd.c: New file, from gettext-0.11.5.
21060
21061 2002-11-05  Bruno Haible  <bruno@clisp.org>
21062
21063         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21064         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21065         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21066         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21067
21068         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21069         <libintl.h>.
21070         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21071         <libintl.h>.
21072
21073         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21074         * lib/human.c: Include gettext.h instead of <libintl.h>.
21075         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21076         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21077         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21078         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21079         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21080         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21081         (textdomain): Remove definition.
21082         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21083
21084         * lib/long-options.c: Remove include of <libintl.h> and definition of
21085         _.
21086         * lib/same.c: Remove include of <libintl.h> and definition of _.
21087
21088 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21089
21090         * lib/config.charset: A few additions for Solaris.
21091
21092 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21093
21094         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21095         * lib/localcharset.c (locale_charset): Declare as extern "C".
21096
21097 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21098
21099         * lib/config.charset: msdos in uk_UA uses CP1125.
21100
21101 2002-11-04  Bruno Haible  <bruno@clisp.org>
21102
21103         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21104         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21105         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21106         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21107         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21108
21109 2002-11-04  Bruno Haible  <bruno@clisp.org>
21110
21111         * lib/localcharset.c (locale_charset): Don't return an empty string.
21112
21113 2002-11-04  Bruno Haible  <bruno@clisp.org>
21114
21115         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21116         aliases.
21117
21118 2002-11-04  Bruno Haible  <bruno@clisp.org>
21119
21120         * lib/config.charset: Update for newest glibc. Add canonical names
21121         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21122
21123 2002-11-04  Bruno Haible  <bruno@clisp.org>
21124
21125         * lib/config.charset: Add support for NetBSD.
21126
21127 2002-11-04  Bruno Haible  <bruno@clisp.org>
21128
21129         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21130
21131 2002-11-01  Bruno Haible  <bruno@clisp.org>
21132
21133         * configure.in: Add AC_CONFIG_AUX_DIR call.
21134         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21135         test/Makefile.
21136         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21137
21138 2002-09-28  Karl Berry  <karl@gnu.org>
21139
21140         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21141         installed automake until the next release, since changes have been
21142         made.
21143
21144 2002-09-25  Karl Berry  <karl@gnu.org>
21145
21146         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21147         * lib/getopt*: copy from libc/posix.
21148         * lib/gettext.h: copy from gettext.
21149         * lib/.cppi-disable: add strdup.c, gettext.h.
21150
21151 2002-09-25  Karl Berry  <karl@gnu.org>
21152
21153         * config/srclist.txt: enable gettext.h check.
21154         * config/config.{guess,sub}: update from prep.
21155         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21156                 from automake 1.6.3.
21157         See srclist*.
21158
21159 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21160
21161         * regex.c (PATFETCH): Remove the translating fetch.
21162         (PATFETCH_RAW): Rename to PATFETCH.
21163         (set_image_of_range): New fun.
21164         (SET_RANGE_TABLE_WORK_AREA): Use it.
21165         (regex_compile): Don't translate the pattern chars so eagerly.
21166         Only do it when inserting an `exactn' bytecode or when handling
21167         a char-range.
21168         (mutually_exclusive_p): Avoid empty statement.
21169
21170 2002-07-06  Jim Meyering  <meyering@lucent.com>
21171
21172         * m4/README: Don't mention Makefile.am.in.
21173         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21174
21175 2002-07-01  Jim Meyering  <meyering@lucent.com>
21176
21177         * lib/c-stack.c: Include sys/time.h.
21178         From Volker Borchert.
21179
21180 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21181
21182         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21183
21184 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21185
21186         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21187         New macro.  Use it uniformly instead of
21188         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21189         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21190         reported by Vin Shelton.
21191
21192 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21193
21194         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21195         Do not assume SA_SIGINFO behavior.
21196         Bug reported by Jim Meyering on NetBSD 1.5.2.
21197
21198 2002-06-22  Jim Meyering  <meyering@lucent.com>
21199
21200         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21201         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21202
21203         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21204         now that configure.ac uses AC_GNU_SOURCE.
21205         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21206         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21207
21208         Update to latest tools.  Suggestions from Paul Eggert.
21209         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21210         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21211         * m4/fnmatch.m4: Likewise.
21212         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21213         to AC_HEADER_STDBOOL
21214
21215 2002-06-22  Jim Meyering  <meyering@lucent.com>
21216
21217         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21218         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21219
21220 2002-06-22  Jim Meyering  <meyering@lucent.com>
21221
21222         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21223
21224         * lib/exitfail.c, exitfail.h: Likewise.
21225         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21226
21227         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21228         of fnmatch.h.
21229         (EXTRA_DIST): Add fnmatch_loop.c.
21230         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21231
21232         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21233         * lib/fnmatch.c: Update from diffutils-2.8.2.
21234         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21235         * lib/fnmatch.h: Remove file.
21236
21237 2002-06-21  Jim Meyering  <meyering@lucent.com>
21238
21239         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21240         * m4/mbrtowc.m4: Likewise.
21241
21242         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21243         * m4/mbswidth.m4: Reflect name change:
21244         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21245         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21246
21247         * m4/lib-link.m4: Update from gettext-0.11.2.
21248         * m4/gettext.m4: Likewise.
21249
21250         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21251         From Alfred M. Szmidt.
21252
21253 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21254
21255         * lib/file-type.h: Report an error if neither S_ISREG nor
21256         S_IFREG is defined, instead of using a test specific to glibc
21257         2.2.  This should be safe, since POSIX requires S_ISREG and
21258         Unix Version 7 had S_IFREG.  We don't need to check for
21259         <sys/types.h> since we don't use any symbols that it defines.
21260
21261 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21262
21263         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21264         $@-t, so that each temporary file name is unique and valid in the first
21265         8 characters, for operation under DOS.
21266
21267 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21268
21269         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21270
21271 2002-06-15  Jim Meyering  <meyering@lucent.com>
21272
21273         Work even with DJGPP 2.03, which lacks support for symlinks.
21274         From Richard Dawe.
21275         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21276         is defined.
21277         * lib/lchown.c (S_ISLNK): Likewise.
21278
21279 2002-06-15  Jim Meyering  <meyering@lucent.com>
21280
21281         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21282         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21283         have been included before this file.
21284
21285 2002-06-14  Jim Meyering  <meyering@lucent.com>
21286
21287         * lib/file-type.h: Use the version from diffutils-2.8.2.
21288         * lib/file-type.c: Likewise.
21289
21290 2002-06-07  Jim Meyering  <meyering@lucent.com>
21291
21292         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21293         They're needed at least for NetBSD 1.5.2.
21294         ($statxfs_includes): Include those same headers.
21295         ($statxfs_includes): Include sys/vfs.h if available.
21296         ($statxfs_includes): Likewise for sys/statvfs.h.
21297         Check for the following members in both structs statfs and statvfs:
21298         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21299
21300 2002-06-01  Jim Meyering  <meyering@lucent.com>
21301
21302         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21303         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21304
21305 2002-05-28  Jim Meyering  <meyering@lucent.com>
21306
21307         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21308         Reported by Volker Borchert.
21309
21310 2002-05-27  Jim Meyering  <meyering@lucent.com>
21311
21312         Fix a problem seen only on nonconforming systems whereby ls.c's
21313         use of localtime, and then of gettimeofday would cause trouble:
21314         the localtime call used to initialize rpl_gettimeofday's save
21315         mechanism would clobber ls's current local time information so
21316         that in any long listing the first file would always be listed
21317         with date 1970-01-01.  Analysis by Volker Borchert.
21318
21319         * lib/gettimeofday.c (localtime): Undefine.
21320         (rpl_localtime): New function.
21321
21322 2002-05-27  Jim Meyering  <meyering@lucent.com>
21323
21324         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21325         localtime.
21326
21327         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21328         use the replacement function; it wouldn't resolve at link time.
21329         Reported by Volker Borchert.
21330
21331 2002-05-22  Jim Meyering  <meyering@lucent.com>
21332
21333         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21334         file-type.h.
21335         * lib/file-type.h: New file.
21336         * lib/file-type.c (file_type): New file/function.  Extracted from
21337         diffutils.
21338
21339 2002-04-30  Jim Meyering  <meyering@lucent.com>
21340
21341         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21342
21343 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21344
21345         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21346
21347 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21348
21349         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21350         Do not check for alloca.h (no longer used) or stdbool.h (was never
21351         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21352
21353 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21354
21355         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21356
21357 2002-04-29  Jim Meyering  <meyering@lucent.com>
21358
21359         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
21360         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21361         Use AC_FUNC_STRNLEN here instead.
21362
21363         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21364         With autoconf-2.53a, it's part of AC_PROG_CC.
21365
21366 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21367
21368         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21369         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21370
21371 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21372
21373         * lib/sig2str.h, lib/sig2str.c: New files.
21374         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21375
21376 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21377
21378         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21379         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21380         of 127, since 64 is the largest conceivable number for ancient
21381         nonstandard hosts.
21382         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21383
21384 2002-04-28  Jim Meyering  <meyering@lucent.com>
21385
21386         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21387
21388 2002-04-24  Jim Meyering  <meyering@lucent.com>
21389
21390         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21391         (jm_PREREQ): Use it.
21392
21393         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21394         mach/mach.h fcntl.h.
21395         Check for this function: setlocale.
21396
21397 2002-04-24  Jim Meyering  <meyering@lucent.com>
21398
21399         * lib/gettext.h: New file, from Gettext.
21400         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21401         (libfetish_a_SOURCES): Add gettext.h.
21402
21403 2002-04-16  Jim Meyering  <meyering@lucent.com>
21404
21405         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21406         ut_pid, ut_id, ut_exit.
21407
21408 2002-04-16  Jim Meyering  <meyering@lucent.com>
21409
21410         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21411         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21412         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21413
21414 2002-04-12  Jim Meyering  <meyering@lucent.com>
21415
21416         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21417         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21418         existence of the getmntinfo function.  Needed for Darwin 5.3.
21419
21420         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21421         This is necessary at least on Darwin 5.3.
21422
21423         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21424         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21425         strnlen.o in the library, and that makes some versions of ranlib
21426         object.
21427
21428 2002-04-12  Jim Meyering  <meyering@lucent.com>
21429
21430         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21431
21432 2002-04-09  Jim Meyering  <meyering@lucent.com>
21433
21434         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21435         to be more precise.  Rather than saying we're checking whether the
21436         function `works', say what we're testing.
21437         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21438         Reported by Bruno Haible.
21439
21440 2002-03-10  Jim Meyering  <meyering@lucent.com>
21441
21442         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21443         Suggestion from Santiago Vila.
21444
21445 2002-03-08  Jim Meyering  <meyering@lucent.com>
21446
21447         * lib/rename.c: Mention that this wrapper is needed also on
21448         mips-dec-ultrix4.4 systems.
21449
21450 2002-03-02  Jim Meyering  <meyering@lucent.com>
21451
21452         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21453         not HAVE_CLOCK_SETTIME.
21454
21455 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21456
21457         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21458         Check for clock_settime.
21459
21460 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21461
21462         * lib/nanosleep.h: Rename to....
21463         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21464
21465         * lib/gettime.c: New file.
21466         * lib/settime.c: New file.
21467         * lib/stime.c: Remove.
21468
21469         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21470         timespec.h.  Remove nanosleep.h.
21471
21472 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21473
21474         * m4/acl.m4: New file.
21475         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21476         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21477
21478 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21479
21480         * lib/acl.c, lib/acl.h: New files.
21481         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21482
21483 2002-02-24  Jim Meyering  <meyering@lucent.com>
21484
21485         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21486         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21487         cause trouble.  Reported by Nelson Beebe.
21488
21489 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21490
21491         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21492         compilers that don't know that xalloc_die never returns.
21493
21494 2002-02-20  Jim Meyering  <meyering@lucent.com>
21495
21496         * lib/getdate.c: Regenerate using bison-1.33.
21497
21498 2002-02-17  Jim Meyering  <meyering@lucent.com>
21499
21500         * config/config.guess (main): Don't use `head -1'; it's no longer
21501         portable. Use `sed 1q' instead.
21502
21503 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
21504
21505         * m4/codeset.m4: Upgrade to gettext-0.11.
21506         * m4/gettext.m4: Upgrade to gettext-0.11.
21507         * m4/glibc21.m4: Upgrade to gettext-0.11.
21508         * m4/iconv.m4: Upgrade to gettext-0.11.
21509         * m4/isc-posix.m4: Upgrade to gettext-0.11.
21510         * m4/lcmessage.m4: Upgrade to gettext-0.11.
21511         * m4/lib-ld.m4: New file, from gettext-0.11.
21512         * m4/lib-link.m4: New file, from gettext-0.11.
21513         * m4/lib-prefix.m4: New file, from gettext-0.11.
21514         * m4/progtest.m4: Upgrade to gettext-0.11.
21515
21516 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21517
21518         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
21519         (jm_PREREQ): Use it.
21520
21521 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21522
21523         * lib/posixver.c, lib/posixver.h: New files.
21524         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21525
21526 2002-02-02  Paul Eggert  <eggert@twinsun.com>
21527             Bruno Haible  <bruno@clisp.org>
21528
21529         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
21530         (fwrite_success_callback): New declaration.
21531         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
21532         print_unicode_char. Call failure callback instead of error.
21533         (fwrite_success_callback): New function.
21534         (exit_failure_callback): New function.
21535         (fallback_failure_callback): New function.
21536         (print_unicode_char): Call unicode_to_mb.
21537
21538 2002-01-26  Jim Meyering  <meyering@lucent.com>
21539
21540         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
21541         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
21542
21543 2002-01-26  Jim Meyering  <meyering@lucent.com>
21544
21545         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
21546
21547 2002-01-22  Paul Eggert  <eggert@twinsun.com>
21548
21549         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
21550
21551 2002-01-22  Jim Meyering  <meyering@lucent.com>
21552
21553         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
21554         Otherwise, some versions of automake would omit the rule that makes
21555         Makefile from Makefile.in.
21556
21557 2002-01-21  Paul Eggert  <eggert@twinsun.com>
21558
21559         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
21560         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21561         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
21562         (memcoll): Set errno to zero if there is no error.
21563
21564         * lib/quotearg.c (quotearg_buffer_restyled):
21565         Fix bug with quoting buffers containing NUL when backslashing escapes.
21566         This bug was exposed by the other changes in this patch.
21567         (quotearg_n_options): New arg ARGSIZE.
21568         All callers changed.
21569         (quoting_options_from_style): New function.
21570         (quotearg_n_style): Use it.
21571         (quotearg_n_style_mem): New function.
21572
21573         * lib/quotearg.h (quotearg_n_style_mem): New function.
21574
21575 2002-01-19  Jim Meyering  <meyering@lucent.com>
21576
21577         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
21578         Remove useless quotes: DF_PROG="df".
21579         * m4/strnlen.m4: New file.
21580
21581 2002-01-16  Paul Eggert  <eggert@twinsun.com>
21582
21583         * lib/backupfile.c (ISDIGIT): Comment fix.
21584         * lib/getdate.y (ISDIGIT): Likewise.
21585         * lib/posixtm.c (ISDIGIT, year): Likewise.
21586         * lib/strverscmp.c (ISDIGIT): Likewise.
21587         * lib/userspec.c (ISDIGIT): Likewise.
21588
21589 2002-01-16  Jim Meyering  <meyering@lucent.com>
21590
21591         * lib/getdate.y: Add three semicolons, each just before a closing
21592         brace. Bison (as of version 1.31) no longer papers over that mistake.
21593
21594 2002-01-05  Jim Meyering  <meyering@lucent.com>
21595
21596         * lib/version-etc.c (version_etc_copyright): Update copyright year.
21597
21598 2001-12-19  Paul Eggert  <eggert@twinsun.com>
21599
21600         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
21601         not silently exit merely because the output buffer happens to
21602         have nothing pending.
21603
21604 2001-12-18  Paul Eggert  <eggert@twinsun.com>
21605
21606         See the big note in ../ChangeLog.
21607         * lib/human.c (suffixes): Prefer K to k for 1024.
21608         (generate_suffix_backwards): New function.
21609         (human_readable_inexact): Use it.
21610         * lib/xstrtol.c (__xstrtol): If there is no number but there
21611         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
21612         Accept 'K' as well as 'k'.
21613
21614 2001-12-15  Jim Meyering  <meyering@lucent.com>
21615
21616         * lib/regex.h (__restrict_arr): Update from libc.
21617
21618         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
21619         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
21620         (STREQ): Define.
21621
21622 2001-12-14  Jim Meyering  <meyering@lucent.com>
21623
21624         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
21625         Suggestion from Bruno Haible.
21626
21627 2001-12-10  Jim Meyering  <meyering@lucent.com>
21628
21629         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
21630         xrealloc, Instead, include "xalloc.h".
21631         (initbuffer): Don't cast xmalloc return value to char*.
21632         (readline): Reword comment.
21633         Don't cast xrealloc return value to char*
21634         Return NULL, not 0.
21635
21636 2001-12-09  Jim Meyering  <meyering@lucent.com>
21637
21638         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
21639         about `signed and unsigned type in conditional expression'.
21640         * lib/posixtm.c (posix_time_parse): Likewise.
21641
21642         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
21643
21644         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
21645         to avoid a pedantic warning.
21646
21647         * lib/getstr.c: Don't include assert.h.
21648         (getstr): Remove warning-evoking assertions.
21649         Return -1 if offset parameter is out of bounds.
21650         Change the type of a local from int to size_t.
21651
21652         * lib/strftime.c (my_strftime_localtime_r): Include this function
21653         definition in the `#if ! HAVE_TM_GMTOFF' block.
21654
21655         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
21656         Include xalloc.h instead.
21657
21658 2001-12-02  Jim Meyering  <meyering@lucent.com>
21659
21660         * lib/tempname.c: Don't declare getenv, thus reverting the change of
21661         2001-11-18.  It's no longer necessary, now that stdlib.h is always
21662         included.
21663
21664         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
21665         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
21666
21667 2001-11-30  Akim Demaille  <akim@epita.fr>
21668
21669         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
21670         before being defined.
21671
21672 2001-11-27  Paul Eggert  <eggert@twinsun.com>
21673
21674         * lib/quotearg.h (quotearg_n, quotearg_n_style):
21675         First arg is int, not unsigned.
21676         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21677         (SIZE_MAX, UINT_MAX): New macros.
21678         (quotearg_n_options): Abort if N is negative.
21679         Avoid overflow check on hosts where size_t is 64 bits and int
21680         is 32 bits, as overflow is impossible there.
21681         Fix off-by-one typo that caused unnecessary reallocation.
21682
21683 2001-11-27  Jim Meyering  <meyering@lucent.com>
21684
21685         * lib/tempname.c: Merge with version from libc.
21686         * lib/regex.c: Likewise.
21687
21688         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
21689         systems for which STDC_HEADERS is 0, it was not included, resulting in
21690         a warning about an integer-to-pointer conversion problem with getenv.
21691         Reported by Volker Borchert.
21692
21693 2001-11-26  Jim Meyering  <meyering@lucent.com>
21694
21695         * lib/gtod.h: Remove file.
21696         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
21697         * lib/gettimeofday.c: Don't include gtod.h.
21698         (GTOD_init): Remove function.
21699         (rpl_gettimeofday): Do its job here instead, rather than aborting.
21700         Suggestion from Volker Borchert.
21701
21702 2001-11-23  Jim Meyering  <meyering@lucent.com>
21703
21704         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
21705         it.
21706         * lib/hash.c (struct hash_table): Define it here instead.
21707
21708 2001-11-22  Jim Meyering  <meyering@lucent.com>
21709
21710         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
21711
21712 2001-11-20  Jim Meyering  <meyering@lucent.com>
21713
21714         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
21715         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
21716
21717 2001-11-19  Jim Meyering  <meyering@lucent.com>
21718
21719         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
21720         directory.  Use "conftestXXXXXX" as the template.
21721         Suggestion from Paul Eggert.
21722
21723         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
21724         immediately, so the test doesn't mistakenly hit the max-open-files
21725         limit.
21726
21727 2001-11-18  Paul Eggert  <eggert@twinsun.com>
21728
21729         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
21730         (TEMPORARIES): New macro.
21731         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
21732         removes an artificial limitation (e.g. HP-UX 10.20, where
21733         TMP_MAX is 17576).
21734
21735 2001-11-18  Jim Meyering  <meyering@lucent.com>
21736
21737         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
21738
21739 2001-11-18  Jim Meyering  <meyering@lucent.com>
21740
21741         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
21742         on SunOS 4.
21743
21744         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
21745         files will be created before anything else.
21746
21747 2001-11-17  Paul Eggert  <eggert@twinsun.com>
21748
21749         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
21750         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
21751
21752 2001-11-17  Jim Meyering  <meyering@lucent.com>
21753
21754         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
21755         Prompted by a report from Bob Proulx.
21756
21757         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
21758         Instead, require UTILS_FUNC_MKSTEMP.
21759
21760 2001-11-17  Jim Meyering  <meyering@lucent.com>
21761
21762         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
21763         Now, that's done as part of AC_FUNC_STRTOD.
21764
21765 2001-11-17  Jim Meyering  <meyering@lucent.com>
21766
21767         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
21768         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
21769         rather than group writable.  Patch by Juan F. Codagnone.
21770
21771         * lib/readtokens.c: Remove explicit declarations of xmalloc and
21772         xrealloc, Instead, include "xalloc.h".
21773
21774         * lib/mountlist.c: Include unlocked-io.h after all system headers.
21775         Remove explicit declarations of xmalloc, xrealloc,
21776         and xstrdup.  Instead, include "xalloc.h".
21777
21778         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
21779         unlocked-io.h.
21780         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
21781         Likewise.
21782         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
21783
21784         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
21785         Reported by Padraig Brady.
21786
21787         * lib/mkstemp.c: #undef mkstemp.
21788         Include config.h.
21789         (rpl_mkstemp): Rename from mkstemp.
21790         Protoize.
21791
21792 2001-11-16  Jim Meyering  <meyering@lucent.com>
21793
21794         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
21795         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
21796         determine the amount of total physical memory, use pstat_getstatic.
21797         HPUX-11 doesn't define _SC_PHYS_PAGES.
21798         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
21799         If sysconf couldn't be used to determine the amount of available
21800         physical memory, use both pstat_getstatic and pstat_getdynamic.
21801         Based on a patch from Bob Proulx.
21802
21803 2001-11-10  Jim Meyering  <meyering@lucent.com>
21804
21805         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
21806         (jm_PREREQ): Use it.
21807
21808 2001-11-09  Jim Meyering  <meyering@lucent.com>
21809
21810         * m4/jm-macros.m4: Require autoconf-2.52f.
21811         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
21812         Use these AC_-prefixed names, not the AM_-prefixed ones.
21813
21814         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
21815
21816 2001-11-05  Jim Meyering  <meyering@lucent.com>
21817
21818         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
21819
21820 2001-11-04  Jim Meyering  <meyering@lucent.com>
21821
21822         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
21823         $DEFS.
21824
21825 2001-11-03  Jim Meyering  <meyering@lucent.com>
21826
21827         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
21828         of AC_DEFUN.
21829
21830         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
21831         know the name of the variable in the macro definition.
21832
21833 2001-11-03  Jim Meyering  <meyering@lucent.com>
21834
21835         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
21836         in argmatch_to_argument call.
21837
21838         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
21839         argument.
21840
21841         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
21842         e.g., a fault due to an attempt to free a NULL pointer.
21843
21844 2001-11-01  Jim Meyering  <meyering@lucent.com>
21845
21846         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
21847         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
21848
21849 2001-11-01  Jim Meyering  <meyering@lucent.com>
21850
21851         * lib/dirfd.c, lib/dirfd.h: New files.
21852         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
21853
21854         * lib/hash.c (hash_print) [TESTING]: Clean up.
21855
21856 2001-10-22  Paul Eggert  <eggert@twinsun.com>
21857
21858         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
21859         to avoid a warning if -Wall.
21860
21861 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
21862
21863         * README: New file
21864         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
21865         (per RMS's instructions, this is now the canonical source)
21866         * lgpl/, gpl/: New directories.
21867
21868 2001-10-21  Paul Eggert  <eggert@twinsun.com>
21869
21870         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
21871
21872 2001-10-21  Jim Meyering  <meyering@lucent.com>
21873
21874         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
21875         this code would end up calling gettext even in packages built
21876         with --disable-nls.
21877         * lib/getopt.c (_): Likewise.
21878         * lib/regex.c (_): Likewise.
21879
21880 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21881
21882         * m4/error.m4 (jm_PREREQ_ERROR):
21883         Do not invoke AC_CHECK_FUNCS with strerror_r, as
21884         AC_FUNC_STRERROR_R does that.
21885         Check for strerror declaration.
21886
21887         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
21888         are supposed to have them these days.
21889         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
21890         Merge changes from latest Autoconf CVS.
21891         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
21892         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
21893         POSIX decided to standardize on the int flavor of strerror_r.
21894
21895 2001-10-20  Paul Eggert  <eggert@twinsun.com>
21896
21897         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
21898         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
21899         Use strerror_r that is only a macro, even if it is not a function.
21900         (strerror): Check for HAVE_DECL_STRERROR before declaring.
21901         (private_strerror): Use prototypes, not old-style function definition.
21902         (print_errno_message): New function.
21903         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
21904         char*-flavored one.
21905         (error_tail, error, error_at_line): Use it.
21906
21907 2001-10-11  Jim Meyering  <meyering@lucent.com>
21908
21909         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
21910         and quote_n (1, ... to avoid clobbering a buffer.
21911
21912 2001-10-05  Jim Meyering  <meyering@lucent.com>
21913
21914         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
21915         hash-pjw.h.
21916         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
21917         * lib/hash-pjw.h: New file.
21918
21919 2001-09-30  Jim Meyering  <meyering@lucent.com>
21920
21921         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
21922         `struct fsstat' has the `f_fstypename' member.
21923         Use that to define FS_TYPE, which is now used to make
21924         the getfsstat link test tighter.
21925
21926 2001-09-30  Jim Meyering  <meyering@lucent.com>
21927
21928         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
21929         Include <sys/ucred.h>, for Apple Darwin.
21930         Include sys/mount.h and sys/fs_types.h only if available.
21931         (FS_TYPE): Define.
21932         (read_filesystem_list): Use FS_TYPE.
21933
21934 2001-09-29  Paul Eggert  <eggert@twinsun.com>
21935
21936         * lib/exclude.c (excluded_filename): 0 -> false, since it's
21937         a boolean context.
21938
21939 2001-09-29  Jim Meyering  <meyering@lucent.com>
21940
21941         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21942         [one-argument getmntent function]): Include stdio.h before mntent.h.
21943         SunOS 4.1.x needs it for the declaration of `FILE'.
21944         Patch by Volker Borchert.
21945
21946         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
21947         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
21948         sys/fs_types.h, and make the link-test for getfsstat guard #include
21949         directives with appropriate #if HAVE_*_H tests so that we can
21950         detect getfsstat on Apple Darwin1.3.7 systems.
21951         Reported by Nelson Beebe.
21952         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
21953
21954 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21955
21956         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21957         #defines strtoimax.  Also treat the other strto* functions
21958         like strtoimax.
21959
21960         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21961         Check for strtoul and strtoumax,
21962         as those declarations are made even in the signed case.
21963         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
21964         Likewise, for strtol and strtoimax.
21965
21966 2001-09-28  Paul Eggert  <eggert@twinsun.com>
21967
21968         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
21969         #defines strtoimax.  Also treat the other strto* functions
21970         like strtoimax.
21971
21972         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
21973         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
21974         (strtoimax, strtoumax): Do not declare if already defined as a macro.
21975
21976 2001-09-26  Jim Meyering  <meyering@lucent.com>
21977
21978         Most macros in unlocked-io.h had the wrong number of arguments.
21979         * lib/gen-uio: New script.
21980         (USE_UNLOCKED_IO): Define to 1 if not already defined.
21981         * lib/unlocked-io.hin: Remove file.
21982         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
21983         rather than trying to embed it here.
21984         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
21985         Reported by Padraig Brady.
21986
21987 2001-09-25  Volker Borchert  <bt@teknon.de>
21988
21989         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
21990         `result'.
21991
21992 2001-09-24  Jim Meyering  <meyering@lucent.com>
21993
21994         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
21995
21996 2001-09-23  Jim Meyering  <meyering@lucent.com>
21997
21998         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
21999         instead of the mere test for existence of mntent.h.  The latter
22000         would get a false-positive on AIX 3.4 systems.
22001         In the outer getmntent if-block, don't die if neither of the getmntent
22002         tests succeeds.  Instead, just fall through and continue with the
22003         remaining tests.
22004
22005 2001-09-23  Jim Meyering  <meyering@lucent.com>
22006
22007         * lib/mountlist.c: Remove useless parentheses in #if directives.
22008         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22009         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22010
22011 2001-09-22  Jim Meyering  <meyering@lucent.com>
22012
22013         * m4/gettext.m4: New file.  From gettext.
22014         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22015         * m4/progtest.m4: Likewise
22016         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22017         * m4/glibc21.m4: Likewise.
22018
22019         * m4/libintl.m4: Remove.  No longer used.
22020
22021 2001-09-22  Jim Meyering  <meyering@lucent.com>
22022
22023         * lib/localcharset.c: Update from latest gettext.
22024         * lib/config.charset: Likewise.
22025
22026 2001-09-20  Jim Meyering  <meyering@lucent.com>
22027
22028         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22029         strtoimax.
22030         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22031         strtoumax.
22032
22033 2001-09-20  Jim Meyering  <meyering@lucent.com>
22034
22035         * lib/xstrtol.c (strtoimax): Guard declaration with
22036         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22037         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22038         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22039         (strtoumax): Likewise, for completeness (it wasn't necessary).
22040
22041 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22042
22043         * lib/strtoimax.c (HAVE_LONG_LONG):
22044         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22045         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22046         to work around bug in IBM C compiler.
22047
22048 2001-09-17  Jim Meyering  <meyering@lucent.com>
22049
22050         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22051         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22052         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22053         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22054         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22055         whenever the right hand side need not be expanded by the shell.
22056
22057 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22058
22059         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22060         library.  It's not correct, as some older glibcs are buggy.
22061         fnmatch wasn't fixed until glibc 2.2.
22062
22063         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22064         special shell magic here.
22065
22066 2001-09-16  Jim Meyering  <meyering@lucent.com>
22067
22068         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22069         * m4/jm-macros.m4: Require it.
22070
22071 2001-09-16  Jim Meyering  <meyering@lucent.com>
22072
22073         * lib/mkdir.c: New file.
22074
22075 2001-09-15  Jim Meyering  <meyering@lucent.com>
22076
22077         * m4/jm-macros.m4: Check for help2man.
22078
22079 2001-09-11  Jim Meyering  <meyering@lucent.com>
22080
22081         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22082         The body, by Paul Eggert, was moved here from configure.in.
22083         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22084
22085 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22086
22087         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22088         (jm_PREREQ): Use it.
22089
22090 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22091
22092         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22093         Use ssize_t, not int, to store result of readlink.
22094         Check for ssize_t overflow as well as size_t overflow,
22095         as POSIX says the result of readlink is implementation-defined
22096         when ssize_t overflows.
22097         Remove unnecessary cast to char*.
22098         Use free+malloc instead of realloc, as the storage doesn't need
22099         to be preserved and it's clearer and can be more efficient that way.
22100         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22101         * lib/xreadlink.h (xreadlink): Update prototype.
22102
22103 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22104
22105         * lib/xgetcwd.c: Revert some of the previous change; intead,
22106         fix the HAVE_GETCWD_NULL code to behave more like the
22107         !HAVE_GETCWD_NULL code used to.
22108
22109         Include "xalloc.h".
22110         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22111         invoke xalloc_die.
22112
22113 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22114
22115         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22116         sys/param.h, as pathmax.h includes them.
22117
22118 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22119
22120         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22121         (jm_PREREQ_XGETCWD): New macro.
22122
22123         * m4/getcwd.m4: New file.
22124
22125 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22126
22127         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22128         like the HAVE_GETCWD_NULL code.
22129         Include pathmax.h if not HAVE_GETCWD.
22130         Do not include xalloc.h.
22131         (INITIAL_BUFFER_SIZE): New symbol.
22132         Do not use xmalloc / xrealloc, since the caller is responsible for
22133         handling errors.  Preserve errno around `free' during failure.
22134         Do not overrun buffer when using getwd.
22135
22136 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22137
22138         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22139         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22140         getcwd (NULL, 0).
22141
22142 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22143
22144         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22145         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22146         spotted by Jim Meyering.
22147
22148 2001-09-03  Jim Meyering  <meyering@lucent.com>
22149
22150         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22151         failure.
22152
22153 2001-09-02  Jim Meyering  <meyering@lucent.com>
22154
22155         * lib/error.c: Update from GNU libc.
22156
22157 2001-09-01  Jim Meyering  <meyering@lucent.com>
22158
22159         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22160         Used by df.
22161
22162 2001-09-01  Jim Meyering  <meyering@lucent.com>
22163
22164         * lib/xreadlink.c: New file.
22165         * lib/xreadlink.h: New file.
22166         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22167         xreadlink.h.
22168
22169         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22170         doesn't conflict with sparc Solaris 7's definition in
22171         /usr/include/sys/int_types.h.
22172
22173         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22174         files.
22175         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22176         and strncasecmp as r-values.  Unixware didn't have declarations.
22177
22178 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22179
22180         * lib/xstrtol.h: Add copyright notice.
22181         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22182         LONGINT_INVALID_SUFFIX_CHAR.
22183
22184 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22185
22186         * lib/xstrtol.c (strtoimax): New decl.
22187
22188 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22189
22190         * lib/xgetcwd.c: Don't include pathmax.h.
22191         Include stdlib.h and unistd.h if available.
22192         Include xalloc.h.
22193         (xmalloc, xstrdup, free): Remove decls.
22194         (xgetcwd): Don't assume sizes fit in unsigned.
22195         Check for overflow when computing sizes.
22196         Simplify reallocation code.
22197
22198 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22199
22200         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22201         a directory's st_size can have an arbitrary value, so the old
22202         usage could waste an arbitrary amount of memory.  All uses
22203         changed.
22204         * lib/savedir.h: Update prototype.
22205
22206 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22207
22208         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22209
22210         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22211         old strtoimax.c.
22212
22213         Also, make the following further changes to make this file's
22214         configuration more similar to that of strtol.c:
22215         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22216         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22217         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22218         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22219         changed to signed values.
22220
22221         And make the following changes as well:
22222         Fix copyright notice, as 1999 was missing.
22223         (verify): New macro.
22224         (strtoimax): Check sizes at compile-time, not run-time.
22225         Prefer strtol to strtoll if both work.
22226         (main): Remove; it was not that useful and was a pain to maintain.
22227
22228         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22229
22230 2001-08-31  Jim Meyering  <meyering@lucent.com>
22231
22232         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22233         Use an initial, malloc'd, buffer of length 128 rather than
22234         a statically allocated one of length 1024.
22235
22236 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22237
22238         Simplify code, partly by assuming autoconf 2.52 semantics.
22239
22240         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22241
22242         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22243         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22244         All uses removed.
22245         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22246         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22247         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22248         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22249         jm_AC_HEADER_INTTYPES_H.
22250         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22251
22252         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22253
22254         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22255         Quote first arg of AC_DEFUN.
22256         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22257         since they are needed to parse the include file even if we need
22258         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22259         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22260         but with opposite signedness.
22261
22262 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22263
22264         Merge 'exclude' changes from tar 1.13.22.
22265         This fixes one or two unlikely storage allocation overflow bugs,
22266         but doesn't change user-visible behavior otherwise.
22267
22268 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22269
22270         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22271         (jm_PREREQ_EXCLUDE): New macro.
22272
22273 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22274
22275         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22276         tm to be declared.
22277
22278 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22279
22280         * lib/hash.c: Remove '2001' from copyright notice.
22281
22282 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22283
22284         * lib/full-write.h: New file.
22285         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22286         * lib/full-write.c: Correct credits, as cccp.c no longer
22287         exists and anyway it was so heavily changed from the old cccp
22288         code as to be unrecognizable.  Include full-write.h.
22289         (full_write) Return size_t, with short writes meaning failure.
22290         All callers changed.  This fixes a bug with large buffers
22291         on 64-bit hosts.
22292         * lib/utime.c: Include full-write.h.
22293
22294 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22295
22296         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22297         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22298         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22299         Include if available.
22300         (<xalloc.h>): Include
22301         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22302         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22303         collide with FNM macros.
22304         (struct patopts): New struct.
22305         (struct exclude): Use it, as exclude patterns now come with options.
22306         (new_exclude): Support above changes.
22307         (new_exclude, add_exclude_file):
22308         Initial size must now be a power of two to simplify overflow checking.
22309         (free_exclude, fnmatch_no_wildcards): New function.
22310         (excluded_filename): No longer requires options arg, as the options
22311         are determined by add_exclude.  Now returns bool, not int.
22312         (excluded_filename, add_exclude):
22313         Add support for the fancy new exclusion options.
22314         (add_exclude, add_exclude_file): Now takes int options arg.
22315         Check for arithmetic overflow when computing sizes.
22316         (add_exclude_file): xrealloc might modify errno, so don't
22317         realloc until after errno might be used.
22318
22319         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22320         New macros.
22321         (free_exclude): New decl.
22322         (add_exclude, add_exclude_file): Now takes int options arg.
22323         (excluded_filename): No longer requires options arg, as the options
22324         are determined by add_exclude.  Now returns bool, not int.
22325
22326 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22327
22328         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22329
22330 2001-08-27  Jim Meyering  <meyering@lucent.com>
22331
22332         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22333
22334         * lib/version-etc.c (N_): Remove definition.
22335         Revert most of last change.
22336         Instead, simply don't mark the `Copyright...' string for translation.
22337         Based on advice from Paul Eggert.
22338
22339         * lib/strtoxmax.c: Tweak comment.
22340
22341 2001-08-26  Jim Meyering  <meyering@lucent.com>
22342
22343         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22344
22345         * m4/xstrtoimax.m4: New file.
22346         * m4/xstrtoumax.m4: Add comments explaining why we
22347         AC_REPLACE_FUNCS(strtol).
22348
22349 2001-08-26  Jim Meyering  <meyering@lucent.com>
22350
22351         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22352         of copyright with `%s' so translators don't get an untranslated
22353         message in 2002.
22354         (COPYRIGHT_YEAR): Define.
22355         (version_etc): Use fprintf rather than fputs.
22356         Suggestion from Ulrich Drepper.
22357
22358         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
22359
22360         * lib/strtoll.c: New file, from GNU libc.
22361         * lib/xstrtoimax.c: New file.
22362
22363         * lib/xstrtol.h: Add xstrtoimax.
22364         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22365         * lib/strtoimax.c: New file.  Likewise, but first define
22366         STRTOUXMAX_SIGNED.
22367
22368         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22369         ...
22370         * lib/strtoxmax.c: ... then renamed to this.
22371
22372 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22373
22374         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22375         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22376         (jm_AC_TYPE_INTMAX_T): New macro.
22377         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22378
22379         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22380
22381         * m4/longlong.m4: Renamed from ulonglong.m4.
22382         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22383         * m4/uintmax_t.m4: Removed.
22384
22385 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22386
22387         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22388         Port to Solaris 8, where 'sed' requires a space after the 'r'
22389         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22390         Redirect output to $tmp just once.
22391
22392 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22393
22394         * lib/addext.c (<errno.h>): Include.
22395         (errno): Declare if not defined.
22396         (addext): Work correctly when pathconf returns -1 and leaves
22397         errno alone because there is no limit.  Also, work even if
22398         pathconf returns a value greater than SIZE_MAX.
22399
22400 2001-08-12  Jim Meyering  <meyering@lucent.com>
22401
22402         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22403         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22404         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22405         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22406         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22407         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22408         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22409         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22410         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22411         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22412         utime.m4, utimes.m4, xstrtoumax.m4:
22413         Quote the first argument in each use of AC_DEFUN.
22414
22415 2001-08-12  Jim Meyering  <meyering@lucent.com>
22416
22417         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22418         Simply `return getcwd (NULL, 0);'.
22419         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22420         Use 1300 as initial value for length, not PATH_MAX.
22421
22422         * lib/pathmax.h: Clean up cpp syntax.
22423
22424 2001-08-12  Jim Meyering  <meyering@lucent.com>
22425
22426         * lib/gettimeofday.c: New file.
22427         * lib/gtod.h: New file.
22428         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22429
22430 2001-08-05  Jim Meyering  <meyering@lucent.com>
22431
22432         * m4/jm-macros.m4: Require autoconf-2.52.
22433
22434 2001-08-04  Jim Meyering  <meyering@lucent.com>
22435
22436         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22437         stmt, to get in sync with glibc.
22438
22439 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22440
22441         The following changes are from gettext 0.10.39 as maintained by
22442         Bruno Haible.
22443
22444         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22445         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22446         with inverted sense.  All uses changed.
22447
22448         * lib/mbswidth.c: Don't include <limits.h>.
22449         Include <stdlib.h> and <string.h> unconditionally.
22450         (iswcntrl, mbsinit, ISCNTRL): New macros.
22451         (mbsnwidth): Use K&R style function declarations.
22452         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22453         can optimize it when MB_CUR_MAX == 1.
22454         The width of control characters is zero, not 1.
22455
22456 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22457
22458         The following changes are from gettext 0.10.39 as maintained by
22459         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22460
22461         * m4/codeset.m4: Upgrade to serial AM1.
22462         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22463         all uses changed.  Quote first arg of AC_DEFUN.
22464         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22465
22466         * m4/iconv.m4: Upgrade to serial AM2.
22467         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22468         Add --with-libconv-prefix.
22469         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22470         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22471         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22472         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22473         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22474
22475         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22476         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22477         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22478         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22479         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22480         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22481         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22482         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22483         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22484
22485         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22486         string.h any more.
22487
22488         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22489         not the default value.
22490
22491         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22492         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22493         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22494         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22495         Also check for iswcntrl, used for wcwidth fallback.
22496         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22497         to Autoconf 2.13.
22498
22499 2001-08-03  Jim Meyering  <meyering@lucent.com>
22500
22501         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
22502         as it was in the original.  Reported by Paul Eggert.
22503
22504 2001-07-16  Jim Meyering  <meyering@lucent.com>
22505
22506         * m4/gettimeofday.m4: New file.
22507         Prompted by a report from Bernhard Baehr.
22508
22509 2001-07-15  Jim Meyering  <meyering@lucent.com>
22510
22511         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
22512         stuff. Now it's in ../Makefile.cfg.
22513
22514 2001-07-15  Jim Meyering  <meyering@lucent.com>
22515
22516         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
22517         (BUILT_SOURCES): Add unlocked-io.h.
22518         (io_functions): Define.
22519         (unlocked-io.h): New rule.
22520         (DISTCLEANFILES): Add unlocked-io.h.
22521         (all-local): Depend on unlocked-io.h, to ensure it is created.
22522
22523         * lib/unlocked-io.hin: New file
22524
22525         * lib/regex.c: Update from glibc.
22526
22527 2001-07-05  Jim Meyering  <meyering@lucent.com>
22528
22529         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
22530         recommendation.
22531         (libfetish_a_SOURCES): Put all .h files here instead.
22532         Remove a thus-exposed (better checks in automake) duplicate and
22533         two unnecessary .h files.
22534
22535 2001-07-04  Jim Meyering  <meyering@lucent.com>
22536
22537         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
22538         that generates jm-glibc-io.m4 so that it doesn't trigger any make
22539         distcheck failure.
22540
22541 2001-07-02  Jim Meyering  <meyering@lucent.com>
22542
22543         The following changes were prompted by suggestions from Bruno Haible.
22544
22545         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
22546         is now generated.
22547         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
22548         definition of EXTRA_DIST.
22549         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
22550         ensure that the generated file is created/updated whenever the list
22551         of $(unlocked_functions) is changed.
22552         (jm-glibc-io.m4): New rule.
22553         (unlocked-io.h): New rule -- currently unused.
22554
22555 2001-06-24  Jim Meyering  <meyering@lucent.com>
22556
22557         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
22558         unmatched right bracket, rather than kludging it with an extra,
22559         falsely-matching quote in a comment.  Patch by Akim Demaille.
22560
22561 2001-06-11  Jim Meyering  <meyering@lucent.com>
22562
22563         * lib/regex.c: Update from GNU libc.
22564
22565 2001-05-27  Jim Meyering  <meyering@lucent.com>
22566
22567         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
22568         Check for ut_type in struct utmp.
22569
22570 2001-05-27  Jim Meyering  <meyering@lucent.com>
22571
22572         * lib/readutmp.h (UT_TYPE): Define.
22573
22574 2001-05-24  Jim Meyering  <meyering@lucent.com>
22575
22576         * lib/argmatch.c: Include "quote.h".
22577         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
22578         quote function.  Reported by Göran Uddeborg.
22579
22580 2001-05-22  Jim Meyering  <meyering@lucent.com>
22581
22582         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
22583         now that we use the package-supplied version unconditionally.
22584         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
22585
22586 2001-05-21  Jim Meyering  <meyering@lucent.com>
22587
22588         * m4/regex.m4: Change a couple backticks to single quotes to avoid
22589         shell syntax errors.
22590
22591 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22592
22593         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
22594
22595 2001-05-20  Paul Eggert  <eggert@twinsun.com>
22596
22597         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
22598         Don't bother to check library strftime, since
22599         we'll be using our own my_strftime function anyway.
22600         Define my_strftime instead of strftime.
22601
22602 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
22603
22604         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
22605         which is not yet declared.
22606
22607 2001-05-15  Jim Meyering  <meyering@lucent.com>
22608
22609         * m4/regex.m4: Use proper quoting so brackets appear in the test
22610         program.
22611         Reported by, and with help from, Bruno Haible.
22612
22613 2001-05-13  Jim Meyering  <meyering@lucent.com>
22614
22615         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
22616         undefined.
22617
22618 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22619
22620         dirname code cleanup.  base_name now behaves more compatibly
22621         with POSIX basename when given file names that have trailing
22622         slashes, and similarly for dir_name.  Add new primitives
22623         base_len and dir_len.  Put the directory-name-related decls
22624         into dirname.h.
22625
22626         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
22627         * lib/backupfile.c (base_name): Likewise.
22628         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
22629         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
22630         * lib/makepath.c (strip_trailing_slashes): Likewise.
22631         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
22632         ISSLASH): Likewise.
22633         * lib/rename.c (strip_trailing_slashes): Likewise.
22634         * lib/same.c (base_name): Likewise.
22635         * lib/stripslash.c (ISSLASH): Likewise.
22636
22637         * lib/addext.c: Include <dirname.h> after size_t is defined.
22638         * lib/backupfile.c: Likewise.
22639
22640         * lib/addext.c (addext): Use base_len to trim redundant
22641         trailing slashes instead of doing it ourselves.
22642         But do not trim the last slash if it is not redundant.
22643
22644         * lib/backupfile.c (find_backup_file_name,
22645         max_backup_version): Use base_len instead of rolling it ourselves.
22646         Handle the case of "" and (on DOS) "C:" correctly.
22647
22648         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
22649         needed. Include <string.h>, <dirname.h>.
22650         (base_name): Allow file names ending in slashes, other than names
22651         that are all slashes.  In this case, return the basename followed
22652         by the slashes.  This is more general, and can be used in places
22653         where the original base_name purposely had an assertion failure.
22654         (base_len): New function.
22655
22656         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
22657         Do not include <assert.h>; no longer needed.
22658         Include xalloc.h.
22659         (memrchr): Remove decl.
22660         (dir_name_r): Remove.
22661         (dir_len): Renamed from dirlen.  All callers changed.
22662         Rewrite in terms of base_name, for simplicity and consistency.
22663         (dir_name): Never return NULL.  All callers changed.
22664         Do not include <stdlib.h> in test program; no longer needed.
22665         return 0; is fine for test program.
22666
22667         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
22668         New macros.
22669         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
22670
22671         * lib/path-concat.c (path_concat): Use base_len to compute
22672         base length, not strlen; this means we cannot rely on memcpy
22673         to null-terminate.
22674
22675         * lib/same.c (STREQ): Remove.
22676         (same_name): Handle the case where the basename ends in trailing '/'.
22677
22678         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
22679         a slash was stripped.  Do not strip the last slash after a
22680         file system prefix.
22681
22682 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22683
22684         * lib/Makefile.am (libfetish_a_SOURCES):
22685         Add strftime.c, since we now compile it on all hosts.
22686
22687         * lib/strftime.c (my_strftime):
22688         Define to nstrftime if emacs, but only if my_strftime is not defined.
22689         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
22690         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
22691         Add one more extra argument: a nanoseconds value.
22692         All uses changed.
22693         (ns): New macro.
22694         (my_strftime function): Add %N format.
22695         (emacs_strftimeu): Renamed from emacs_strftime,
22696         with extra ut argument.
22697
22698 2001-05-09  Paul Eggert  <eggert@twinsun.com>
22699
22700         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
22701
22702 2001-04-21  Jim Meyering  <meyering@lucent.com>
22703
22704         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
22705         doesn't interfere.
22706
22707 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22708
22709         * m4/ftruncate.m4: Check for chsize.
22710         Link with ftruncate.o unconditionally if ftruncate is missing.
22711         This was required when cross-compiling to i586-mingw32msvc.
22712
22713 2001-04-08  Jim Meyering  <meyering@lucent.com>
22714
22715         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
22716         recomputed; that's necessary when the offset spans a DST transition.
22717         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
22718
22719 2001-04-02  Jim Meyering  <meyering@lucent.com>
22720
22721         * lib/regex.h, regex.c: Update from GNU libc.
22722
22723 2001-03-24  Jim Meyering  <meyering@lucent.com>
22724
22725         * m4/jm-macros.m4: Require autoconf-2.49d.
22726
22727 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
22728
22729         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
22730
22731 2001-03-19  Paul Eggert  <eggert@twinsun.com>
22732
22733         * lib/version-etc.c (version_etc_copyright): Update to 2001.
22734
22735 2001-03-17  Jim Meyering  <meyering@lucent.com>
22736
22737         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
22738         now that the version in autoconf is equivalent.
22739         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
22740
22741         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
22742         Suggestion from Akim Demaille.
22743
22744         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
22745         (jm_PREREQ_TEMPNAME): New function.
22746
22747 2001-03-16  Paul Eggert  <eggert@twinsun.com>
22748
22749         * lib/tempname.c (uint64_t): Define to uintmax_t if
22750         not defined, and if UINT64_MAX is not defined.
22751         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
22752         Reported by John David Anglin.
22753
22754 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
22755
22756         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
22757         resolve alias if codeset is empty.
22758         * lib/config.charset (BeOS): Use wildcard syntax.
22759
22760 2001-03-13  Jim Meyering  <meyering@lucent.com>
22761
22762         * lib/path-concat.c (path_concat)
22763         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
22764         concatenating e.g., `C:' and `foo'.
22765         From Bruno Haible.
22766
22767 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22768
22769         * lib/localcharset.c (locale_charset): Don't use
22770         setlocale(LC_CTYPE,NULL). Don't return NULL.
22771         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
22772
22773 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22774
22775         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
22776         support for DOS/DJGPP.
22777
22778 2001-03-01  Paul Eggert  <eggert@twinsun.com>
22779
22780         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
22781         lacks mkstemp.  Compile our own tempname.c if we compile our own
22782         mkstemp.c, as mkstemp relies on tempname.
22783
22784 2001-03-01  Jim Meyering  <meyering@lucent.com>
22785
22786         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
22787         AH_VERBATIM really does output its argument verbatim.
22788
22789 2001-02-28  Paul Eggert  <eggert@twinsun.com>
22790
22791         * lib/Makefile.am (libfetish_a_SOURCES):
22792         Add dup-safer.c, fopen-safer.c.
22793         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
22794
22795         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
22796         * lib/unistd-safer.h: New files.
22797
22798 2001-02-25  Paul Eggert  <eggert@twinsun.com>
22799
22800         The mkstemp replacement is taken from glibc 2.2.2, with some
22801         portability fixes for use outside glibc, as follows:
22802
22803         * lib/tempname.c (struct_stat64): New macro.
22804         (direxists, __gen_tempname): Use it.
22805         This avoids a portability problem with Solaris 8.
22806
22807         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
22808         (<stddef.h>, <stdint.h>, <string.h>):
22809         Include only if STDC_HEADERS || _LIBC.
22810         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
22811         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
22812         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
22813         (__set_errno): Define this macro if <errno.h> doesn't.
22814         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
22815         Define these macros if <stdio.h> doesn't.
22816         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
22817         Define these macros if <sys/stat.h>
22818         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
22819         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
22820         __xstat64): Define if not _LIBC.
22821         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
22822         (__gen_tempname): Invoke gettimeofday only if
22823         HAVE_GETTIMEOFDAY || _LIBC;
22824         otherwise, fall back on plain "time".
22825         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
22826
22827         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
22828
22829         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
22830
22831 2001-02-18  Paul Eggert  <eggert@twinsun.com>
22832
22833         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
22834
22835 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22836
22837         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
22838         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
22839         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
22840         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22841
22842 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22843
22844         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
22845         Remove workaround macros for hosts that have mbrtowc but not
22846         mbstate_t, as we now insist on proper declarations for both
22847         before using mbrtowc.
22848
22849 2001-02-17  Jim Meyering  <meyering@lucent.com>
22850
22851         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
22852         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
22853         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
22854         UnixWare 7.1.1.
22855
22856         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
22857         rather than AC_CACHE_VAL.
22858
22859 2001-02-17  Jim Meyering  <meyering@lucent.com>
22860
22861         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
22862         around included file name.
22863
22864         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
22865
22866         * lib/strftime.c: Update from GNU libc (the only changes were to
22867         comments).
22868
22869 2001-02-17  Jim Meyering  <meyering@lucent.com>
22870
22871         * lib/regex.c: Update from libc.
22872
22873 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
22874
22875         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
22876         clash.
22877
22878 2001-02-16  Paul Eggert  <eggert@twinsun.com>
22879
22880         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
22881         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
22882         Reported by Mark Hounschell via Paul Eggert.
22883
22884 2001-02-07  Jim Meyering  <meyering@lucent.com>
22885
22886         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
22887
22888 2001-02-05  Jim Meyering  <meyering@lucent.com>
22889
22890         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
22891         it includes the patch required for `large file' support with at least
22892         HP-UX's 10.20 /bin/cc.
22893
22894 2001-02-03  Jim Meyering  <meyering@lucent.com>
22895
22896         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
22897         AS_IF, now that it works once again (mysteriously).
22898         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22899
22900 2001-01-30  Jim Meyering  <meyering@lucent.com>
22901
22902         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
22903         * m4/chown.m4: Rename conftestchown to conftest.chown.
22904         * m4/rename.m4: s/conftestdir/conftest.d1/ and
22905         s/conftestdir2/conftest.d2/.
22906         * m4/utimes.m4: s/conftestdata/conftest.data/
22907         Inspired by Pavel Roskin's change in autoconf.
22908
22909 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
22910
22911         * lib/config.charset: Update for FreeBSD 4.2.
22912
22913 2001-01-27  Jim Meyering  <meyering@lucent.com>
22914
22915         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
22916         a use of AS_IF.
22917         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
22918
22919 2001-01-26  Jim Meyering  <meyering@lucent.com>
22920
22921         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
22922         quotearg.c includes it.
22923
22924 2001-01-26  Jim Meyering  <meyering@lucent.com>
22925
22926         * lib/quotearg.c: Include stddef.h.
22927         * lib/quote.c: Include stddef.h.
22928         Reported by Axel Kittenberger.
22929
22930         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
22931         line in double quotes so that it evokes a better diagnostic.
22932         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
22933         Reported by Axel Kittenberger.
22934
22935 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
22936
22937         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
22938         as if it was a `charset'.
22939
22940 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22941
22942         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
22943         has const.
22944
22945 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
22946
22947         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
22948         to avoid a warning.  Add back 'const' to inptr.
22949
22950 2001-01-20  Jim Meyering  <meyering@lucent.com>
22951
22952         Be sure that headers are checked before used in code compiled
22953         for the type checks.
22954         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
22955         In place of that, invoke jm_CHECK_ALL_TYPES.
22956         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
22957         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
22958         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
22959         The check for ssize_t was mistakenly run before the test for unistd.h.
22960
22961         The configure-time check for stdbool.h was missing.
22962         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
22963         (jm_PREREQ_HASH): New function.
22964
22965 2001-01-17  Jim Meyering  <meyering@lucent.com>
22966
22967         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
22968         for autoconf-2.49c.
22969         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
22970
22971 2001-01-16  Jim Meyering  <meyering@lucent.com>
22972
22973         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
22974         From Bruno Haible.
22975
22976 2001-01-14  Jim Meyering  <meyering@lucent.com>
22977
22978         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
22979         foo and bar.  Create conftestdir/ in the script, not in the C code.
22980         Remove directories in the script, not in the C code.
22981         Remove conftestdir{,2} before trying to create the directory.
22982         Make the entire configure script fail if the mkdir fails.
22983
22984 2001-01-14  Jim Meyering  <meyering@lucent.com>
22985
22986         * lib/rename.c: New file.  From Volker Borchert.
22987         Include stdlib.h, string.h or strings.h, and xalloc.h.
22988         Use strip_trailing_slashes rather than open-coding it.
22989
22990 2001-01-03  Paul Eggert  <eggert@twinsun.com>
22991
22992         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
22993
22994 2001-01-03  Jim Meyering  <meyering@lucent.com>
22995
22996         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
22997         of local `inptr' to avoid warning with some system declarations of
22998         iconv.
22999
23000 2001-01-02  Volker Borchert  <bt@teknon.de>
23001
23002         * m4/rename.m4: New file.
23003         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23004
23005 2001-01-01  Jim Meyering  <meyering@lucent.com>
23006
23007         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23008         even on systems with utmpx.h.  It's necessary for the declaration of
23009         utmp's ut_user member.  Reported by Andreas Jaeger.
23010
23011         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23012         available. They are required for the declarations of getgrgid and
23013         getpwuid resp.
23014         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23015         Reported by Andreas Jaeger.
23016
23017 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23018
23019         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23020         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23021         so `make install' also works in VPATH builds.
23022
23023 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23024
23025         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23026         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23027         can be used in subdirectories.
23028
23029 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23030
23031         * lib/modechange.c: Do not assume that mode_t uses the
23032         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23033         the other-execute bit of FOO even if S_IXOTH != 1.
23034
23035         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23036         WOTH, XOTH, ALLM): New macros.
23037         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23038          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23039         Use them.
23040         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23041         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23042         (mode_compile):
23043         No need to use uintmax_t; unsigned long is long enough.
23044         Don't bother to get suffix since we don't use it.
23045
23046 2000-12-26  Jim Meyering  <meyering@lucent.com>
23047
23048         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23049         better with autoheader.
23050
23051 2000-12-24  Jim Meyering  <meyering@lucent.com>
23052
23053         * lib/hash.c (is_prime): Return explicit boolean values.
23054         (hash_get_first): Return NULL to appease Irix5.6's 89.
23055         Reported by Nelson Beebe.
23056
23057 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23058
23059         * lib/localcharset.c (locale_charset): Add support for Win32.
23060
23061 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23062
23063         * lib/physmem.h, lib/physmem.c: New files.
23064
23065         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23066         (noinst_HEADERS): Add physmem.h.
23067
23068         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23069         't' for compatibility with Solaris 8 sort.
23070
23071 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23072
23073         * lib/config.charset: Add support for BeOS.
23074
23075 2000-12-17  Jim Meyering  <meyering@lucent.com>
23076
23077         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23078         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23079
23080 2000-12-16  Jim Meyering  <meyering@lucent.com>
23081
23082         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23083         N and M) would have treated it like `chown N:N FILE'.
23084
23085         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23086
23087 2000-12-16  Jim Meyering  <meyering@lucent.com>
23088
23089         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23090         SHELLS_FILE to a file name that's useful on djgpp systems.
23091         Include stdlib.h.
23092         (ADDITIONAL_DEFAULT_SHELLS): Define.
23093         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23094         Based mostly on a patch from Prashant TR.
23095
23096 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23097
23098         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23099         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23100         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23101
23102 2000-12-08  Andreas Schwab  <schwab@suse.de>
23103
23104         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23105         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23106
23107 2000-12-07  Jim Meyering  <meyering@lucent.com>
23108
23109         * lib/stripslash.c (ISSLASH): Define.
23110         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23111         `/'.
23112         From Prashant TR.
23113
23114         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23115         (dir_name_r): Declare this function as static.
23116         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23117         manifest itself on a name containing a mix of slashes and
23118         backslashes.
23119         Make this function work with names starting with a DOS-style
23120         drive letter and colon prefix.
23121         (dir_name): Append `.' if necessary.
23122         Based mostly on patches from Prashant TR and Eli Zaretskii.
23123
23124         * lib/dirname.h (dir_name_r): Remove prototype.
23125
23126 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23127
23128         * m4/off_t-format.m4: Remove this file.
23129         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23130
23131 2000-12-06  Jim Meyering  <meyering@lucent.com>
23132
23133         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23134         replacement strtoull, we may well need the replacement strtoul, too.
23135         Check for declarations of strtoul and strtoull.
23136         Check for strtol.  Mainly as a cue to cause automake to include
23137         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23138         Check for limits.h -- strtol.c needs it.
23139
23140 2000-12-05  Jim Meyering  <meyering@lucent.com>
23141
23142         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23143
23144 2000-12-04  Jim Meyering  <meyering@lucent.com>
23145
23146         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23147         Also include memory.h, stdlib.h, unistd.h if appropriate.
23148         Reported by Andreas Jaeger (conflicting declaration of malloc).
23149
23150 2000-12-02  Jim Meyering  <meyering@lucent.com>
23151
23152         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23153         * m4/jm-macros.m4 (jm_MACROS): require it.
23154
23155 2000-12-02  Jim Meyering  <meyering@lucent.com>
23156
23157         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23158
23159 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23160
23161         * lib/memrchr.c: Include <config.h> before any system include file.
23162
23163 2000-11-30  Jim Meyering  <meyering@lucent.com>
23164
23165         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23166
23167 2000-11-30  Jim Meyering  <meyering@lucent.com>
23168
23169         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23170
23171 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23172
23173         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23174
23175 2000-11-26  Jim Meyering  <meyering@lucent.com>
23176
23177         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23178
23179 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23180
23181         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23182         size of (size_t) -1; it's not portable.
23183
23184 2000-11-17  Jim Meyering  <meyering@lucent.com>
23185
23186         * lib/strstr.c: Update from GNU libc.
23187
23188 2000-11-17  Akim Demaille  <akim@epita.fr>
23189
23190         * lib/obstack.h: Formatting changes.
23191         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23192         prevent type checking.
23193         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23194         cast the value to (void *): assigning a `foo *' to a `void *'
23195         variable is valid.
23196         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23197
23198 2000-11-16  Jim Meyering  <meyering@lucent.com>
23199
23200         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23201
23202 2000-11-11  Jim Meyering  <meyering@lucent.com>
23203
23204         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23205
23206 2000-11-10  Jim Meyering  <meyering@lucent.com>
23207
23208         * lib/obstack.h: Update from GNU libc.
23209         * lib/obstack.c: Likewise.
23210
23211 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23212
23213         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23214
23215 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23216
23217         * lib/getusershell.c (setusershell): Use rewind rather than
23218         fseek/fseeko, to avoid configuration hassles with fseeko.
23219         Don't bother opening SHELLS_FILE if shellstream is NULL;
23220         it's not necessary.
23221
23222 2000-11-05  Jim Meyering  <meyering@lucent.com>
23223
23224         * lib/makepath.h (make_dir): Declare.
23225         * lib/makepath.c (make_dir): Remove `static' attribute.
23226         Tweak a comment.
23227
23228 2000-11-04  Jim Meyering  <meyering@lucent.com>
23229
23230         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23231
23232 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23233
23234         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23235         last one in a bucket, advance to the next bucket.
23236
23237 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23238
23239         * lib/fnmatch.c: Do not comment out all the code if we are using
23240         the GNU C library, because in some cases we are replacing buggy
23241         code in the GNU C library itself.
23242
23243 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23244
23245         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23246         (regex_compile): Catch bogus \(\1\).
23247
23248 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23249
23250         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23251         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23252         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23253
23254 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23255
23256         * lib/error.h, getline.h, modechange.h:
23257         Remove "2000" from Copyright line, as the file hasn't been
23258         changed this year other than in the copyright notice.
23259
23260         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23261         was changed this year.
23262
23263 2000-10-29  Jim Meyering  <meyering@lucent.com>
23264
23265         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23266         renaming.
23267         * m4/ls-mntd-fs.m4: Likewise
23268
23269 2000-10-29  Jim Meyering  <meyering@lucent.com>
23270
23271         * lib/xstat.in: Fix grammar in comment.
23272
23273 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23274
23275         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23276         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23277         doesn't define __restrict_arr.
23278
23279 2000-10-28  Jim Meyering  <meyering@lucent.com>
23280
23281         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23282         (jm_PREREQ_MEMCHR): New function.
23283
23284 2000-10-28  Jim Meyering  <meyering@lucent.com>
23285
23286         * lib/memchr.c: Update from libc.
23287         Adjust for portability:
23288         [HAVE_STDLIB_H]: Include stdlib.h.
23289         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23290         Undef __memchr, too.
23291         [!weak_alias]: Define __memchr to memchr.
23292
23293         * lib/regex.c: Update from libc.
23294         * lib/regex.h: Likewise.
23295         * lib/getopt1.c: Likewise.
23296         * lib/memcmp.c: Likewise.
23297
23298         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23299         Avoid using fseek, when possible -- it's broken by design.
23300         Patch by Ulrich Drepper.
23301
23302 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23303
23304         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23305         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23306         Giving in to popular pressure to shut up the compiler with casts.
23307
23308 2000-10-26  Jim Meyering  <meyering@lucent.com>
23309
23310         * lib/strftime.c: Update from libc.
23311
23312 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23313
23314         * regex.c: More `unsigned char' -> `re_char' changes.
23315         Also change several `int' into `re_wchar_t'.
23316         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23317         (PUSH_FAILURE_POINTER): Don't cast any more.
23318         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23319         We want GCC to complain, since this piece of code makes
23320         re_match non-reentrant, which *should* be fixed.
23321         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23322         (EXTEND_BUFFER): Use RETALLOC.
23323         (SET_LIST_BIT): Don't cast.
23324         (re_wchar_t): New type.
23325         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23326         that those two functions will always properly return.
23327         (IMMEDIATE_QUIT_CHECK): Cast to void.
23328         (analyse_first): Use recursion rather than an explicit stack.
23329         (re_compile_fastmap): Can't fail anymore.
23330         (re_search_2): Don't check re_compile_fastmap for failure.
23331         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23332         Now also sets the new value (passed in a new argument).
23333         (re_match_2_internal): Use it.
23334         Also, use a new var `reg' of type size_t when looping through regs
23335         rather than reuse the inappropriate `mcnt'.
23336
23337 2000-10-25  Jim Meyering  <meyering@lucent.com>
23338
23339         * lib/obstack.c: Update from libc.
23340
23341 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23342
23343         * regex.c (regex_compile): Change the way of handling a range from
23344         a char less than 256 to a char not less than 256.
23345
23346 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23347
23348         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23349         NT-Emacs only.
23350         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23351         so that re_search functions only quit when callers expect them to.
23352
23353 2000-10-23  Jim Meyering  <meyering@lucent.com>
23354
23355         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23356         wrong.  That set_locale call must not have any side effects.
23357         From Paul Eggert.
23358
23359 2000-10-22  Jim Meyering  <meyering@lucent.com>
23360
23361         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23362         [CYCLIC]: Remove now-unused definition.
23363
23364         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23365         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23366         Suggestion from Ulrich Drepper.
23367
23368 2000-10-21  Jim Meyering  <meyering@lucent.com>
23369
23370         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23371         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23372         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23373
23374 2000-10-21  Jim Meyering  <meyering@lucent.com>
23375
23376         * lib/dirname.c (memrchr): Declare if necessary.
23377         (dir_name): Remove the restriction that there be no
23378         trailing slashes.  Now, this code skips past them, effectively
23379         ignoring them.
23380         [TEST_DIRNAME] (main): New unit tests.
23381
23382         * lib/memrchr.c: New file from GNU libc.
23383         Undef __memrchr, too.
23384         [!weak_alias]: Define __memrchr to memrchr.
23385         Guard weak_alias use with `#ifdef weak_alias'.
23386
23387 2000-10-21  Jim Meyering  <meyering@lucent.com>
23388
23389         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23390         (dir_name): Use dir_name_r.
23391         * lib/dirname.h (dir_name_r): Declare it.
23392
23393 2000-10-17  Jim Meyering  <meyering@lucent.com>
23394
23395         * lib/quote.h (PARAMS): Define and use.
23396         Reported by Akim Demaille.
23397
23398         * lib/getopt.c: Update from libc.
23399
23400 2000-10-16  Jim Meyering  <meyering@lucent.com>
23401
23402         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23403         setlocale.
23404         From Jan Fedak.
23405
23406 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23407
23408         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23409
23410 2000-09-25  Jim Meyering  <meyering@lucent.com>
23411
23412         * lib/md5.h (rol): Define (from GnuPG).
23413
23414         * lib/sha.c: Give credit (GnuPG) where due.
23415         (M): Use rol rather than open-coding it.
23416         Add a FIXME comment.
23417
23418 2000-09-21  Jim Meyering  <meyering@lucent.com>
23419
23420         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23421         Reported by Michael Stone.
23422
23423 2000-09-20  Jim Meyering  <meyering@lucent.com>
23424
23425         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23426         (noinst_HEADERS): Add sha.h.
23427         Based on code from Scott G. Miller and from GnuPG.
23428
23429 2000-09-18  Jim Meyering  <meyering@lucent.com>
23430
23431         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23432         LIBS. Otherwise, everyone ends up linking with -lelf for some
23433         configurations.
23434         Reported by Mike Stone.
23435
23436 2000-09-15  Jim Meyering  <meyering@lucent.com>
23437
23438         * lib/regex.c: Update from libc.
23439
23440 2000-09-10  Jim Meyering  <meyering@lucent.com>
23441
23442         * lib/getopt.c (_getopt_internal): Update from glibc.
23443
23444 2000-09-09  Jim Meyering  <meyering@lucent.com>
23445
23446         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23447         think it should be used as a general replacement for isascii.
23448         * lib/fnmatch.c: Likewise.
23449         * lib/mbswidth.c: Likewise
23450         * lib/regex.c: Likewise.
23451
23452         Don't use atoi.
23453         * lib/userspec.c: Include sys/param.h and limits.h.
23454         Include xstrtol.h.
23455         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23456         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23457         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23458         UID, GID.  Check range.
23459
23460 2000-09-06  Jim Meyering  <meyering@lucent.com>
23461
23462         * lib/getopt.c (_getopt_internal): Update from glibc.
23463
23464 2000-08-30  Jim Meyering  <meyering@lucent.com>
23465
23466         * lib/strftime.c: Merge in changes from GNU libc.
23467
23468 2000-08-26  Jim Meyering  <meyering@lucent.com>
23469
23470         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23471         * m4/fpending.m4: New file.
23472
23473 2000-08-26  Jim Meyering  <meyering@lucent.com>
23474
23475         * lib/closeout.c: Include "__fpending.h".
23476         (close_stdout_status): Return right away if there's nothing to flush.
23477
23478         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23479         * lib/__fpending.c: New file.
23480         * lib/__fpending.h: New file.
23481
23482 2000-08-20  Jim Meyering  <meyering@lucent.com>
23483
23484         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23485         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23486         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23487
23488 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23489
23490         Improve fileutils installation on systems where running
23491         programs (like install) can't be unlinked.
23492         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23493         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23494
23495 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23496
23497         Standardize on "memory exhausted" instead of "Memory exhausted"
23498         or "virtual memory exhausted".
23499         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23500         "virtual memory exhausted".
23501         * lib/same.c (same_name): Invoke xalloc_die instead of printing
23502         our own message.
23503         * lib/userspec.c (parse_user_spec): Likewise.
23504         * lib/bumpalloc.h: comment fix
23505         * lib/same.c, userspec.c: Include xalloc.h.
23506
23507         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
23508         not char *const and pointing to a constant array.
23509         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
23510         (xrealloc): Comment fix.
23511
23512         * lib/userspec.c (parse_user_spec):
23513         Don't translate a message until just before returning,
23514         to avoid unnecessary translation.
23515
23516 2000-08-07  Jim Meyering  <meyering@lucent.com>
23517
23518         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
23519         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
23520         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
23521         getgroups.c, gethostname.c, getopt.h, group-member.c,
23522         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
23523         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
23524         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
23525         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
23526         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
23527         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
23528         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
23529         yesno.c: Back out Copyright date changes for each file with no change
23530         this year.  This eases coordination with other programs using the same
23531         source code modules.  From Paul Eggert.
23532
23533 2000-08-06  Paul Eggert  <eggert@twinsun.com>
23534
23535         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
23536         not char, for compatibility with glibc 2.1.3 strftime.c.
23537
23538 2000-08-03  Greg McGary  <greg@mcgary.org>
23539
23540         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
23541         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
23542         (EXTEND_BUFFER): Use them.
23543
23544 2000-08-01  Jim Meyering  <meyering@lucent.com>
23545
23546         * lib/dirname.c (ISSLASH): Define.
23547         (BACKSLASH_IS_PATH_SEPARATOR): Define.
23548         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
23549         both `\' and `/' may be use as path separators.
23550         Based on a patch from Prashant TR.
23551
23552 2000-07-31  Paul Eggert  <eggert@twinsun.com>
23553
23554         * lib/quotearg.c (quotearg_n_options): Don't make the initial
23555         slot vector a constant, since it might get modified.
23556
23557 2000-07-31  Jim Meyering  <meyering@lucent.com>
23558
23559         * lib/xmalloc.c: Use `virtual memory exhausted', not
23560         `Memory exhausted'.
23561         * lib/obstack.c (print_and_abort): Likewise.
23562
23563 2000-07-30  Paul Eggert  <eggert@twinsun.com>
23564
23565         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
23566         buffer, so that the caller can always quote one small
23567         component of a "memory exhausted" message in slot 0.
23568         From a suggestion by Jim Meyering.
23569
23570 2000-07-30  Jim Meyering  <meyering@lucent.com>
23571
23572         * lib/makepath.c (make_path): Quote the other instance, too.
23573
23574         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
23575         (STATIC_BUF_SIZE): Define.
23576         (quotearg_n_options): Use only statically allocated storage when
23577         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
23578         than STATIC_BUF_SIZE.
23579
23580 2000-07-29  Jim Meyering  <meyering@lucent.com>
23581
23582         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
23583         * lib/dirname.c (dir_name): Likewise.
23584
23585         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
23586         `/'.
23587
23588         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
23589         (dir_name): Assert that there are no trailing slashes.
23590
23591 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
23592
23593         * lib/mbswidth.h (mbswidth): Add a flags argument.
23594         (mbswidth): New declaration.
23595         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
23596         * lib/mbswidth.c (mbswidth): Add a flags argument.
23597         (mbsnwidth): New function.
23598
23599 2000-07-24  Jim Meyering  <meyering@lucent.com>
23600
23601         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
23602
23603 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23604
23605         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
23606
23607 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23608
23609         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
23610         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
23611         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
23612         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
23613         invoke multibyte primitives.
23614
23615 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23616
23617         * lib/quotearg.c:
23618         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
23619         so that mbstate_t is always defined.
23620
23621         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
23622         be 1 in at least one GCC installation, and this configuration
23623         error is likely to be common.  Ignoring MB_LEN_MAX hurts
23624         performance on hosts that have mbrtowc but have only unibyte
23625         locales, but I assume these hosts are rare.
23626
23627 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23628
23629         * lib/mbswidth.c (_XOPEN_SOURCE):
23630         Don't define; this causes problems on Solaris 7.
23631         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
23632
23633 2000-07-23  Jim Meyering  <meyering@lucent.com>
23634
23635         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
23636         too: getgrgid, getpwuid, getuid.
23637
23638 2000-07-23  Jim Meyering  <meyering@lucent.com>
23639
23640         * lib/basename.c (base_name): Add an assertion.
23641
23642 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
23643
23644         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
23645         shadow its mbsinit function.
23646
23647 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23648
23649         * lib/mbswidth.h: New file.
23650         * lib/mbswidth.c: New file.
23651         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
23652         (noinst_HEADERS): Add mbswidth.h.
23653
23654 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23655
23656         * lib/config.charset: Add support for FreeBSD. Improve support for
23657         HP-UX and IRIX 6.
23658
23659 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
23660
23661         * m4/mbswidth.m4: New file.
23662         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
23663
23664 2000-07-15  Jim Meyering  <meyering@lucent.com>
23665
23666         * lib/makepath.c: Include quote.h.
23667         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
23668         corresponding argument in a `quote (...)' call.
23669         Give better diagnostics.
23670
23671         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
23672         (noinst_HEADERS): Add quote.h.
23673
23674         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
23675         from tar's src/misc.c.
23676         * lib/quote.h: New file.  Prototypes for same.
23677
23678 2000-07-14  Paul Eggert  <eggert@twinsun.com>
23679
23680         From a suggestion by Bruno Haible.
23681         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
23682         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
23683         to decide whether to define the BeOS workaround macro;
23684         this adjusts to the change to AC_MBSTATE_T.
23685
23686 2000-07-14  Jim Meyering  <meyering@lucent.com>
23687
23688         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
23689         jm_AC_TYPE_UINTMAX_T.
23690
23691 2000-07-13  Paul Eggert  <eggert@twinsun.com>
23692
23693         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
23694
23695         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
23696         quotearg_buffer_restyled): Add support for
23697         clocale_quoting_style.  Undo previous change to
23698         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
23699         and "{RIGHT QUOTATION MARK}" msgids.
23700
23701 2000-07-10  Paul Eggert  <eggert@twinsun.com>
23702
23703         From a suggestion by Bruno Haible.
23704         * m4/mbstate_t.m4 (AC_MBSTATE_T):
23705         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
23706         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
23707         and mbstate_t, to a single-part test that simply defines mbstate_t.
23708         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
23709         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
23710
23711 2000-07-10  Jim Meyering  <meyering@lucent.com>
23712
23713         * m4/strerror_r.m4: Mirror the correction made in autoconf.
23714
23715         * m4/gnu-source.m4: Output to confdefs.h directly.
23716         Suggestion from Akim Demaille.
23717
23718 2000-07-09  Paul Eggert  <eggert@twinsun.com>
23719
23720         The old behavior of quoting `like this' doesn't look good with
23721         newer, ISO-style fonts.  See:
23722         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
23723
23724         Instead, quote "like this" by default.  Let the translator
23725         tailor the locale-specific quoting behavior by providing
23726         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
23727
23728         * lib/quotearg.c (N_): New macro.
23729         (gettext_default): New function.
23730         (quotearg_buffer_restyled): Use
23731         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
23732         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
23733
23734 2000-07-09  Jim Meyering  <meyering@lucent.com>
23735
23736         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
23737         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
23738
23739         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
23740         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
23741
23742 2000-07-09  Jim Meyering  <meyering@lucent.com>
23743
23744         * lib/Most files: Update copyright dates to include 2000.
23745
23746 2000-07-08  Jim Meyering  <meyering@lucent.com>
23747
23748         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
23749         if not defined.
23750         (xgethostname): Remove now-unnecessary #ifdef.
23751         Move declaration of `err' into loop where it's used.
23752
23753 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23754         and Bruno Haible  <haible@clisp.cons.org>
23755
23756         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
23757         only if the test for an object-type mbstate_t fails.  This
23758         prevents us from mistakenly reporting that mbstate_t is a
23759         system object type after we "#define mbstate_t int" to work
23760         around its lack.
23761
23762 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23763         and Bruno Haible  <haible@clisp.cons.org>
23764
23765         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
23766
23767 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23768
23769         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
23770         to strerror_r.
23771         Include <ctype.h> for use of isalpha.
23772
23773 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23774
23775         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
23776         by allocating a larger buffer. Test the gethostname return value for
23777         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
23778         returns an error and ENAMETOOLONG isn't defined.
23779
23780 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23781
23782         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
23783         dimension.
23784
23785 2000-07-04  Jim Meyering  <meyering@lucent.com>
23786
23787         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
23788         of the deprecated AC_CHECKING.
23789
23790 2000-07-04  Jim Meyering  <meyering@lucent.com>
23791
23792         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
23793         Reported by Bruno Haible.
23794
23795 2000-07-04  Jim Meyering  <meyering@lucent.com>
23796
23797         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
23798         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
23799         lacks mbrtowc.
23800
23801 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23802
23803         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
23804         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
23805
23806 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23807         and Bruno Haible  <haible@clisp.cons.org>
23808
23809         * lib/quotearg.c (mbrtowc):
23810         Assign to *pwc, and return 1 only if result is nonzero.
23811         (iswprint): Use ISPRINT when substituting our own mbrtowc.
23812
23813 2000-07-03  Jim Meyering  <meyering@lucent.com>
23814
23815         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
23816
23817 2000-07-03  Jim Meyering  <meyering@lucent.com>
23818
23819         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
23820         This is necessary to get a definition of e.g., UTMP_FILE on
23821         HP-UX 10.20.
23822         From Bob Proulx.
23823
23824 2000-07-02  Jim Meyering  <meyering@lucent.com>
23825
23826         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
23827
23828         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
23829         AC_LIBOBJ(function_name).
23830         * m4/chown.m4: Likewise.
23831         * m4/fnmatch.m4: Likewise.
23832         * m4/ftruncate.m4: Likewise.
23833         * m4/getgroups.m4: Likewise.
23834         * m4/getline.m4: Likewise.
23835         * m4/group-member.m4: Likewise.
23836         * m4/jm-macros.m4: Likewise.
23837         * m4/lstat.m4: Likewise.
23838         * m4/malloc.m4: Likewise.
23839         * m4/memcmp.m4: Likewise.
23840         * m4/nanosleep.m4: Likewise.
23841         * m4/putenv.m4: Likewise.
23842         * m4/realloc.m4: Likewise.
23843         * m4/regex.m4: Likewise.
23844         * m4/stat.m4: Likewise.
23845         * m4/strftime.m4: Likewise.
23846
23847 2000-07-02  Jim Meyering  <meyering@lucent.com>
23848
23849         * lib/quotearg.c (mbstate_t): Don't define here.
23850
23851 2000-07-02  Jim Meyering  <meyering@lucent.com>
23852
23853         * lib/nanosleep.c (SIGCONT): Define if not already defined.
23854
23855 2000-07-01  Jim Meyering  <meyering@lucent.com>
23856
23857         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
23858
23859 2000-07-01  Jim Meyering  <meyering@lucent.com>
23860
23861         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
23862         problem.
23863
23864 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23865
23866         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
23867         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
23868
23869 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
23870
23871         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
23872         per change in ../m4/ls-mntd-fs.m4.
23873         (read_filesystem_list): Ignore symbolic links.
23874
23875 2000-06-29  Jim Meyering  <meyering@lucent.com>
23876
23877         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
23878         for declaration of strcmp.
23879
23880         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
23881
23882         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
23883         Avoid warning by casting result to `char *' to remove `const'.
23884
23885 2000-06-28  Jim Meyering  <meyering@lucent.com>
23886
23887         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
23888         included by quotearg.c, for which we perform this test.  From
23889         Bruno Haible.
23890
23891 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23892
23893         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
23894         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
23895         <utmpx.h> exists, put readutmp.o into LIBOBJS.
23896
23897 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
23898
23899         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
23900
23901 2000-06-26  Paul Eggert  <eggert@twinsun.com>
23902
23903         savedir now sets errno on failure and invokes xmalloc to get memory.
23904         Fix a couple of other minor bugs while we're at it.
23905
23906         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
23907         (NAMLEN): Remove macro.
23908         (malloc, realloc): Remove decls.
23909         (stpcpy): Likewise.
23910         ("xalloc.h"): Include.
23911         (NAME_SIZE_DEFAULT): New macro.
23912         (savedir): Use xmalloc / xrealloc to allocate memory.
23913         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
23914         Skip "" directory entries.
23915         Use strlen to calculate directory entry length, since the old method
23916         is rarely used these days and isn't worth supporting.
23917         Don't use a pointer after freeing it.
23918         Check for integer overflow when calculating allocation size.
23919         Use memcpy to copy entries, instead of stpcpy.
23920         Set errno properly when returning NULL.
23921         Check for readdir error.
23922
23923 2000-06-26  Jim Meyering  <meyering@lucent.com>
23924
23925         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
23926
23927 2000-06-25  Jim Meyering  <meyering@lucent.com>
23928
23929         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
23930         Linux header bug when _XOPEN_SOURCE is defined to 500.
23931
23932 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23933
23934         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
23935         deficiency.
23936
23937 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
23938
23939         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
23940         Include xalloc.h.
23941         Don't include <stdlib.h>.  Don't declare malloc, realloc.
23942
23943 2000-06-24  Jim Meyering  <meyering@lucent.com>
23944
23945         * m4/strerror_r.m4: Revive this file -- to try out an experimental
23946         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
23947         for which strerror does return char*, but which lacks a conveniently
23948         accessible declaration of the function.  If the compile-test says
23949         strerror_r doesn't work, then resort to a `run'-test that works on
23950         BeOS and segfaults on DEC Unix.
23951
23952 2000-06-24  Jim Meyering  <meyering@lucent.com>
23953
23954         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
23955
23956 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23957
23958         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
23959         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
23960
23961 2000-06-23  Paul Eggert  <eggert@twinsun.com>
23962
23963         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
23964         (mbrtowc, mbstate_t): Define substitutes if
23965         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
23966         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
23967         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
23968
23969 2000-06-23  Jim Meyering  <meyering@lucent.com>
23970
23971         * m4/afs.m4: Add missing AC_MSG_RESULT.
23972         Reported by Bruno Haible.
23973
23974         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
23975         Suggestion from Bruno Haible.
23976
23977 2000-06-23  Jim Meyering  <meyering@lucent.com>
23978
23979         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
23980
23981 2000-06-21  Jim Meyering  <meyering@lucent.com>
23982
23983         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
23984
23985 2000-06-21  Jim Meyering  <meyering@lucent.com>
23986
23987         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
23988         (noinst_HEADERS): Add getstr.h.
23989
23990         * lib/getline.c (getstr): Move into a separate file.
23991         * lib/getstr.c (getstr): New file, extracted from getline.c, with
23992         the following changes: new parameter, delim2; both delim[12]
23993         parameters have type `int', not `char'.  The latter would lose
23994         with 8-bit delimiters.
23995         * lib/getstr.h: New file.
23996
23997 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23998
23999         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24000         than 1024, return a memory chunk of least possible size, instead
24001         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24002         Use free/xmalloc instead of xrealloc to avoid copying for very long
24003         paths.
24004
24005 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24006
24007         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24008         the empty string.
24009
24010 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24011
24012         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24013         address, not strdup.  Include <stdlib.h> and don't declare free().
24014
24015 2000-06-19  Jim Meyering  <meyering@lucent.com>
24016
24017         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24018
24019 2000-06-18  Jim Meyering  <meyering@lucent.com>
24020
24021         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24022
24023         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24024         `checking whether...' message to be consistent with that of the
24025         lstat test.
24026
24027 2000-06-18  Jim Meyering  <meyering@lucent.com>
24028
24029         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24030         Besides, these days every porting target provides a mkdir function.
24031
24032         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24033         needed. (this snippet comes from src/system.h).
24034
24035 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24036
24037         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24038
24039 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24040
24041         * lib/human.c (adjust_value): New function.
24042         (human_readable_inexact): Apply rounding style even when
24043         printing approximate values.
24044
24045 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24046
24047         * lib/human.c (human_readable_inexact): Allow an input block
24048         size that is not a multiple of the output block size, and vice versa.
24049         Reported by Piergiorgio Sartor.
24050
24051 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24052
24053         * lib/getdate.y (get_date): Apply relative times after time
24054         zone indicator, not before.  Reported by Todd A. Jacobs.
24055
24056 2000-06-13  Jim Meyering  <meyering@lucent.com>
24057
24058         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24059
24060         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24061
24062 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24063
24064         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24065
24066 2000-06-12  Jim Meyering  <meyering@lucent.com>
24067
24068         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24069         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24070         optional argument.
24071         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24072         the optional argument, `lib'.
24073
24074 2000-06-08  Jim Meyering  <meyering@lucent.com>
24075
24076         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24077
24078 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24079
24080         Rewrite largefile configuration so that we don't need to run
24081         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24082         AC_CANONICAL_HOST in configure.in -- jmm]
24083
24084         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24085         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24086         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24087         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24088         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24089         All uses changed.
24090         Instead of inspecting the output of getconf, try to compile the
24091         test program without and with the macro definition.
24092         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24093         for getconf.  Instead, check for the needed flags by compiling
24094         test programs.
24095
24096 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24097
24098         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24099
24100 2000-06-04  Jim Meyering  <meyering@lucent.com>
24101
24102         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24103         SunOS 4.1.4 for which gid_t is an unsigned type.
24104
24105 2000-06-03  Jim Meyering  <meyering@lucent.com>
24106
24107         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24108         now that autoconf requires that.
24109
24110         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24111         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24112         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24113
24114 2000-06-03  Jim Meyering  <meyering@lucent.com>
24115
24116         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24117
24118 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24119
24120         * m4/glibc21.m4: New file.
24121         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24122
24123 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24124
24125         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24126         newer, don't install charset.alias.
24127         * lib/config.charset: Change the Linux/glibc rules so they become empty
24128         on glibc-2.1 or newer.
24129
24130 2000-06-02  Jim Meyering  <meyering@lucent.com>
24131
24132         * lib/mountlist.c: Back out last change.  Instead, do this...
24133         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24134         me_dummy member using the same `ignore'-testing code.
24135         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24136         fs_type strings.
24137         From Mark D. Roth.
24138
24139 2000-05-29  Jim Meyering  <meyering@lucent.com>
24140
24141         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24142         mounts with the `ignore' attribute.  Based on a patch from
24143         Mark D. Roth.
24144
24145 2000-05-28  Jim Meyering  <meyering@lucent.com>
24146
24147         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24148         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24149         * m4/stat.m4: Likewise.
24150         * m4/lstat.m4: Likewise.
24151         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24152
24153         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24154         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24155
24156 2000-05-26  Jim Meyering  <meyering@lucent.com>
24157
24158         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24159
24160 2000-05-24  Jim Meyering  <meyering@lucent.com>
24161
24162         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24163         autoconf requires that.
24164         * m4/lib-check.m4: Likewise.
24165         * m4/jm-macros.m4: Likewise.
24166         * m4/strftime.m4: Likewise.
24167
24168         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24169         AC_CHECK_DECLS, now that autoconf requires that.
24170
24171 2000-05-22  Jim Meyering  <meyering@lucent.com>
24172
24173         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24174         * m4/lstat.m4: Likewise.
24175
24176 2000-05-22  Jim Meyering  <meyering@lucent.com>
24177
24178         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24179
24180 2000-05-20  Jim Meyering  <meyering@lucent.com>
24181
24182         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24183         (jm_PREREQ): Use it.
24184
24185 2000-05-18  Jim Meyering  <meyering@lucent.com>
24186
24187         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24188         back, too, since it may have been modified by allocate_entry.
24189         (hash_delete): Rewrite to use neither the assignment operator
24190         nor the comma operator in an if-expression.
24191
24192 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24193
24194         * lib/closeout.c:
24195         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24196         Remove; no longer needed.
24197         "quotearg.h": Add include.
24198         (file_name): Do not bother to explicitly initialize to NULL; it's less
24199         efficient on some hosts.
24200         (close_stdout_status): Remove test as to whether stdout was already
24201         closed; it breaks for the case "echo x | sort >&-".
24202         Quote file name colons.
24203         Do not assume that _("write error") lacks format strings.
24204
24205 2000-05-15  Jim Meyering  <meyering@lucent.com>
24206
24207         * lib/version-etc.c (version_etc_copyright): Update the copyright
24208         string used in all --version output.
24209
24210 2000-05-14  Jim Meyering  <meyering@lucent.com>
24211
24212         * lib/closeout.c (close_stdout_set_file_name): New function.
24213         (close_stdout_status): Use new file-scoped global.
24214         Return right away if fstat says the stdout file descriptor is invalid.
24215         * lib/closeout.h (close_stdout_set_file_name): Declare.
24216
24217 2000-05-10  Jim Meyering  <meyering@lucent.com>
24218
24219         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24220         (close_stdout_set_status): New function.
24221         * lib/closeout.h (close_stdout_set_status): Declare.
24222
24223 2000-05-09  Jim Meyering  <meyering@lucent.com>
24224
24225         * m4/gettext.m4: Rename this...
24226         * m4/libintl.m4: ...to this.
24227
24228 2000-05-08  Jim Meyering  <meyering@lucent.com>
24229
24230         * lib/long-options.c: Don't include closeout.h.
24231         (parse_long_options): Don't call close_stdout for --version.
24232
24233 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24234
24235         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24236         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24237         2.1.3 bug.  This avoids a clash when files like regex.c define
24238         _GNU_SOURCE.
24239
24240 2000-05-06  Jim Meyering  <meyering@lucent.com>
24241
24242         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24243         (AC_REPLACE_FUNCS): Add strnlen.
24244
24245         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24246         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24247
24248         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24249         AC_SEARCH_LIBS call for nanosleep.
24250         (LIB_NANOSLEEP): Set and AC_SUBST.
24251
24252 2000-05-06  Jim Meyering  <meyering@lucent.com>
24253
24254         * lib/strnlen.c: Undefine __strnlen and strnlen.
24255         [!weak_alias]: Define __strnlen to strnlen.
24256
24257         * lib/atexit.c: New file, from libiberty.
24258
24259 2000-05-06  Jim Meyering  <meyering@lucent.com>
24260
24261         * lib/closeout.c (close_stdout_status): Also check for errors on the
24262         stderr stream.
24263
24264 2000-05-05  Jim Meyering  <meyering@lucent.com>
24265
24266         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24267         AC_SEARCH_LIBS call for clock_gettime.
24268         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24269
24270         * m4/search-libs.m4: Update from autoconf.
24271
24272         su doesn't work on Solaris 2.6.
24273         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24274         <shadow.h>.  Reported by Dragos Harabor.
24275
24276 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24277
24278         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24279         memcpy instead of xmalloc, xrealloc, path_concat.
24280         (locale_charset): Treat empty environment variables as absent.
24281         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24282
24283 2000-05-04  Jim Meyering  <meyering@lucent.com>
24284
24285         * lib/getopt.c: Update from glibc.
24286         * lib/obstack.c: Likewise.
24287         * lib/obstack.h: Likewise.
24288         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24289         file
24290
24291         * lib/regex.h: Likewise.
24292         * lib/strndup.c: Likewise.
24293         * lib/strnlen.c: New file, from glibc.
24294
24295 2000-05-03  Jim Meyering  <meyering@lucent.com>
24296
24297         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24298
24299 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24300
24301         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24302         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24303         compile-time test, rather than inspecting host and OS, to
24304         decide whether to define _LARGEFILE_SOURCE.
24305
24306 2000-05-01  Jim Meyering  <meyering@lucent.com>
24307
24308         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24309
24310         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24311         Based on a patch from Bruno Haible.
24312
24313 2000-05-01  Jim Meyering  <meyering@lucent.com>
24314
24315         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24316
24317 2000-04-29  Jim Meyering  <meyering@lucent.com>
24318
24319         * lib/path-concat.c: Declare strdup only if it's not defined.
24320         * lib/canon-host.c: Likewise.
24321
24322 2000-04-28  Jim Meyering  <meyering@lucent.com>
24323
24324         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24325         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24326         is included first, then limits.h is included by locale.h by libintl.h.
24327         From John David Anglin.
24328
24329 2000-04-25  Jim Meyering  <meyering@lucent.com>
24330
24331         * lib/makepath.c (S_IRWXUGO): Define.
24332         (make_path): Always perform explicit chmod if MODE specifies any
24333         of the `special' permission bits.  Prompted by a bug report against
24334         install from Mate Wierdl and Joost van Baal.
24335
24336 2000-04-18  Jim Meyering  <meyering@lucent.com>
24337
24338         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24339         (jm_PREREQ): Use it.
24340
24341 2000-04-18  Jim Meyering  <meyering@lucent.com>
24342
24343         * lib/README: New file.
24344
24345         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24346         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24347
24348 2000-04-17  Jim Meyering  <meyering@lucent.com>
24349
24350         Get it right :-)
24351         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24352         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24353         Suggestion from Akim Demaille.
24354
24355 2000-04-17  Jim Meyering  <meyering@lucent.com>
24356
24357         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
24358         the definition of it to rpl_strftime also defined-away the system's
24359         declaration.
24360
24361 2000-04-15  Jim Meyering  <meyering@lucent.com>
24362
24363         Use `C' to denote so-called `contiguous' files, the same way
24364         that tar does.
24365         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24366         (ftypelet): Use S_ISCTG.
24367         From Michael Deutschmann.
24368
24369 2000-04-14  Jim Meyering  <meyering@lucent.com>
24370
24371         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24372         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24373         clobbered.
24374
24375 2000-04-14  Jim Meyering  <meyering@lucent.com>
24376
24377         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24378
24379 2000-04-13  Jim Meyering  <meyering@lucent.com>
24380
24381         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24382         AH_VERBATIM to insert required #ifndef into config.h.in.
24383         Suggestion from Akim Demaille.
24384
24385 2000-04-12  Jim Meyering  <meyering@lucent.com>
24386
24387         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24388         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24389         Christian Krackowizer.
24390
24391         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24392         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24393         (AC_SYS_LARGEFILE): Require.
24394         (AM_C_PROTOTYPES): Require.
24395
24396 2000-04-08  Jim Meyering  <meyering@lucent.com>
24397
24398         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24399         names don't conflict.  Reported by Eli Zaretskii.
24400
24401 2000-04-07  Jim Meyering  <meyering@lucent.com>
24402
24403         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24404         sys/types.h, to work around system header problems on AIX 3.2.5.
24405         From Bruno Haible.
24406
24407 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24408
24409         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24410         bug.  Deal with the different error behavior of Irix iconv.
24411
24412 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24413
24414         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24415         IRIX if the installer said otherwise.
24416
24417 2000-04-05  Jim Meyering  <meyering@lucent.com>
24418
24419         Portability tweaks required for ultrix4.3.
24420         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24421         (jm_CHECK_DECLS): Add getutent to the list of functions.
24422         (_jm_DECL_HEADERS): Add utmpx.h.
24423         From John David Anglin.
24424
24425         * m4/strftime.m4: Back out the 2000-04-02 change.
24426         Instead of that change, simply undefine putenv in the test program.
24427
24428 2000-04-05  Jim Meyering  <meyering@lucent.com>
24429
24430         Portability tweaks required for ultrix4.3.
24431         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24432         getutent.
24433         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24434         * lib/canon-host.c: Declare strdup.
24435         * lib/path-concat.c: Likewise.
24436         From John David Anglin.
24437
24438 2000-04-04  Jim Meyering  <meyering@lucent.com>
24439
24440         Be more DOS 8.3-friendly.
24441         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24442         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24443         * lib/Makefile.am: Reflect renaming.
24444         Reported by Eli Zaretskii.
24445
24446         Use a temporary file name that won't clash with `charset.alias'
24447         in the DOS 8.3 name space.
24448         * lib/Makefile.am (charset_tmp): Define.
24449         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24450         (uninstall-local): Likewise.
24451         Reported by Eli Zaretskii.
24452
24453 2000-04-03  Jim Meyering  <meyering@lucent.com>
24454
24455         * m4/gettext.m4: Fix typo in comment.
24456
24457         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24458         textutils/configure.in).  Suggestion from Paul Eggert.
24459         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24460
24461 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24462
24463         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24464         variable in the shell rather than using putenv, which isn't
24465         portable.  This avoids the configure-time inter-test dependency
24466         on the potentially-renamed putenv function.
24467
24468 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24469
24470         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24471         before checking struct stat.st_blksize, so that
24472         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24473
24474 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24475
24476         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24477         since strftime.c uses HAVE_STRFTIME to decide whether to use
24478         the underlying strftime.
24479
24480 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24481
24482         * lib/time/strftime.c (my_strftime): Make sure we call the system
24483         strftime, not ourselves, when invoking the underlying strftime.
24484
24485 2000-03-24  Jim Meyering  <meyering@lucent.com>
24486
24487         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24488         (charset_alias): Define.
24489         (install-exec-local): Factor out common code.
24490         (uninstall-local): Split lines longer than 80.
24491         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24492         (SUFFIXES): Define.
24493         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24494         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24495
24496 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24497
24498         * lib/config.charset: Output a line containing "Packages using this
24499         file".
24500         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24501         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
24502         ref-del.sed): New rules.
24503
24504 2000-03-17  Jim Meyering  <meyering@lucent.com>
24505
24506         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
24507         Otherwise, include <strings.h>
24508
24509 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
24510
24511         * lib/unicodeio.c (utf8_wctomb): New function.
24512         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
24513         format instead of in UCS-4 with platform dependent endianness.
24514
24515 2000-03-10  Jim Meyering  <meyering@lucent.com>
24516
24517         * m4/lib-check.m4: Look for getspnam in -lgen, too.
24518         From Marco Franzen.
24519
24520 2000-03-07  Paul Eggert  <eggert@twinsun.com>
24521
24522         * lib/savedir.c (savedir): Work even if directory size is
24523         negative; this can happen with some screwy NFS configurations.
24524
24525 2000-03-06  Jim Meyering  <meyering@lucent.com>
24526
24527         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
24528         if it's NULL (because we ran out of memory).  From Bruno Haible.
24529
24530 2000-03-05  Jim Meyering  <meyering@lucent.com>
24531
24532         * lib/localcharset.c ("path-concat.h"): Include.
24533         (get_charset_aliases): Use path_concat instead of ANSI string
24534         concatenation.
24535
24536         * lib/unicodeio.h (PARAMS): Define.
24537         Use it to guard prototype.
24538
24539 2000-03-04  Jim Meyering  <meyering@lucent.com>
24540
24541         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
24542         for lib/localcharset.c.
24543
24544 2000-03-04  Jim Meyering  <meyering@lucent.com>
24545
24546         * lib/Makefile.am (install-exec-local): Create $(libdir) before
24547         installing into it.
24548         (uninstall-local): Uncomment this rule so `make distcheck' works
24549         once again.
24550
24551         * lib/unicodeio.c (<errno.h>): Include it.
24552         (errno): Declare if not defined.
24553
24554         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
24555
24556         * lib/config.charset: New version, incorporating remarks from a linux
24557         i18n mailing list.  From Bruno Haible.
24558
24559 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
24560
24561         * m4/codeset.m4: New file.
24562         * m4/iconv.m4: New file.
24563         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
24564
24565 2000-03-03  Jim Meyering  <meyering@lucent.com>
24566
24567         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
24568
24569 2000-03-02  Jim Meyering  <meyering@lucent.com>
24570
24571         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
24572         the messages come out on separate lines.
24573
24574         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
24575         rather than jm_CHECK_DECLARATIONS.
24576         * m4/decl.m4: Remove now-unused file.
24577
24578         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
24579         geteuid.
24580
24581 2000-03-02  Jim Meyering  <meyering@lucent.com>
24582
24583         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
24584
24585 2000-03-01  Jim Meyering  <meyering@lucent.com>
24586
24587         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
24588         * lib/unicodeio.c: Likewise.
24589
24590 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
24591
24592         * lib/config.charset: New file.
24593         * lib/localcharset.c: New file.
24594         * lib/unicodeio.h, lib/unicodeio.c: New files.
24595         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
24596         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
24597         (noinst_HEADERS): Add unicodeio.h.
24598         (all-local, install-exec-local, charset.alias): New targets.
24599
24600 2000-02-28  Paul Eggert  <eggert@twinsun.com>
24601
24602         * lib/quotearg.c (ALERT_CHAR): New macro.
24603         (quotearg_buffer_restyled): Use it.
24604
24605 2000-02-27  Jim Meyering  <meyering@lucent.com>
24606
24607         * m4/check-decl.m4: Add getenv to the list.
24608
24609 2000-02-27  Jim Meyering  <meyering@lucent.com>
24610
24611         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
24612         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
24613
24614         * lib/backupfile.c: Guard inclusion of stdlib.h with
24615         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
24616         Declare malloc if needed.
24617
24618         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
24619         `#ifndef HAVE_DECL..'
24620         now that autoconf always defines the HAVE_DECL_ symbols.
24621         * lib/human.c: Likewise.
24622         * lib/same.c: Likewise.
24623         * lib/strtoumax.c: Likewise.
24624
24625         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
24626         declaration check was not run.
24627         * lib/hash.c: Likewise.
24628         * lib/human.c: Likewise.
24629         * lib/same.c: Likewise.
24630         * lib/strtoumax.c: Likewise.
24631
24632         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
24633         `.', then first look up the entire `.'-containing string as a login
24634         name.
24635
24636 2000-02-23  Jim Meyering  <meyering@lucent.com>
24637
24638         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
24639         in place of my hack.
24640
24641 2000-02-18  Paul Eggert  <eggert@twinsun.com>
24642
24643         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
24644         (textint): New typedef.
24645         (parser_control): Member year changed from int to textint.
24646         All uses changed.
24647         (YYSTYPE): Removed; replaced by %union with int and textint members.
24648         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
24649         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
24650         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
24651         (tSNUMBER, tUNUMBER): Now of type <textintval>.
24652         (date, number, to_year): Use width of number in digits, not its value,
24653         to determine whether it's a 2-digit year, or a 2-digit time.
24654         (yylex): Store number of digits of numeric tokens.
24655         Reported by John Kendall.
24656
24657         (parser_control): Changed from struct parser_control to typedef (for
24658         consistency).  All uses changed.
24659
24660         (tID): Removed; not used.
24661         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
24662
24663 2000-02-14  Paul Eggert  <eggert@twinsun.com>
24664
24665         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
24666         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
24667
24668 2000-02-12  Jim Meyering  <meyering@lucent.com>
24669
24670         * lib/userspec.c (ISDIGIT): Define it.
24671         (isdigit): Remove definition.
24672         (is_number): Use ISDIGIT, not isdigit.
24673         <libintl.h>: Include.
24674         (_ and N_): Define.
24675         (parse_user_spec): Mark translatable strings.
24676
24677 2000-02-10  Jim Meyering  <meyering@lucent.com>
24678
24679         With these changes, nanosleep.[ch] are finally enough like the other
24680         lib/* replacement files to compile on a few more losing systems.
24681
24682         * lib/nanosleep.h: Don't include config.h.
24683         Remove prototype from declaration of nanosleep.
24684         (PARAMS): Remove now-unneeded definition.
24685         * lib/nanosleep.c: #undef nanosleep.
24686         (rpl_nanosleep): Rename from nanosleep.
24687
24688 2000-02-10  Jim Meyering  <meyering@lucent.com>
24689
24690         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
24691         gnu_nanosleep to rpl_nanosleep.
24692
24693 2000-02-09  Jim Meyering  <meyering@lucent.com>
24694
24695         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
24696         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
24697
24698 2000-02-08  Akim Demaille  <akim@epita.fr>
24699
24700         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
24701         `[' and `]' and remove uses of `changequote'.
24702         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
24703         (AC_SYS_LARGEFILE): Likewise.
24704         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
24705         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
24706         of changequote.
24707         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
24708         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
24709         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
24710         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
24711
24712 2000-02-05  Jim Meyering  <meyering@lucent.com>
24713
24714         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
24715         Remove explicit use of AC_HEADER_TIME.  It is required by
24716         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
24717         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
24718         in autoconf whereby the expansion of the latter ended up preceding
24719         the expansion of its prerequisite, AC_HEADER_TIME.
24720         Reported by Volker Borchert.
24721
24722 2000-02-03  Jim Meyering  <meyering@lucent.com>
24723
24724         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
24725
24726 2000-02-03  Jim Meyering  <meyering@lucent.com>
24727
24728         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
24729         rather than with `#if HAVE_UTMPNAME'.
24730
24731 2000-02-02  Jim Meyering  <meyering@lucent.com>
24732
24733         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
24734         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
24735         Reported by Eli Zaretskii.
24736
24737 2000-02-01  Jim Meyering  <meyering@lucent.com>
24738
24739         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
24740
24741 2000-01-31  Jim Meyering  <meyering@lucent.com>
24742
24743         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
24744         functions.  Add the time.h and sys/time.h headers along with the
24745         AC_REQUIRE'ment of AC_HEADER_TIME.
24746
24747 2000-01-31  Jim Meyering  <meyering@lucent.com>
24748
24749         * lib/nanosleep.h (nanosleep): Guard declaration with
24750         `#if ! HAVE_DECL_NANOSLEEP'.
24751         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
24752         the declaration in that vendor's sys/timers.h.
24753         Reported by Christian Krackowizer.
24754
24755         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
24756         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
24757         (ISPRINT): Likewise.
24758         Reported by Tom Tromey.
24759
24760 2000-01-30  Jim Meyering  <meyering@lucent.com>
24761
24762         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
24763
24764         * m4/prereq.m4 (utmp_includes): Define.
24765         Check for ut_user and ut_name members in both struct utmpx
24766         and struct utmp.
24767
24768 2000-01-30  Jim Meyering  <meyering@lucent.com>
24769
24770         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
24771         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
24772         header files where only utmpx.ut_user is declared.
24773
24774         * lib/readutmp.h (UT_USER): Define.
24775
24776 2000-01-29  Jim Meyering  <meyering@lucent.com>
24777
24778         * m4/lib-check.m4: New file containing library-related checks from
24779         fileutils and sh-utils (textutils had none).
24780
24781 2000-01-28  Jim Meyering  <meyering@lucent.com>
24782
24783         * m4/perl.m4: Change format of warning message to look more like that
24784         from the missing script.  Suggestion from François Pinard.
24785
24786 2000-01-25  Jim Meyering  <meyering@lucent.com>
24787
24788         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
24789         well as time.h in the compile check.
24790         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
24791         Fix typo in cross-compiling case: s/yes/no/.
24792
24793 2000-01-23  Jim Meyering  <meyering@lucent.com>
24794
24795         * m4/jm-macros.m4: Move df-related tests here from
24796         fileutils/configure.in
24797
24798         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
24799         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
24800
24801         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
24802         s/space/ac_fsusage_space/.
24803         (jm_FILE_SYSTEM_USAGE): Take two parameters.
24804
24805         * m4/ftruncate.m4: New file (derived from part of
24806         fileutils/configure.in).
24807         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
24808         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
24809
24810         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
24811         AC_SUBST these here, rather than just in sh-util/configure.in, so
24812         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
24813         all the same.
24814         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
24815         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
24816         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
24817         (AC_SUBST(POW_LIBM)): Likewise.
24818         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
24819
24820 2000-01-23  Jim Meyering  <meyering@lucent.com>
24821
24822         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
24823         obstack.c.
24824
24825 2000-01-22  Jim Meyering  <meyering@lucent.com>
24826
24827         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
24828
24829         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
24830
24831         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
24832         configure.in
24833         (AC_CHECK_HEADERS): Likewise for sh-utils.
24834         (AC_CHECK_HEADERS): Likewise for textutils.
24835         Merge the three lists of headers.
24836
24837         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
24838         from fileutils' configure.in.
24839
24840         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
24841         code. Moved tests into their own function (_jm_DECL_HEADERS) in
24842         check-decl.m4.
24843
24844         * m4/check-decl.m4: Use #if rather than #ifdef.
24845         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
24846         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
24847         (_jm_DECL_HEADERS): Define new function.
24848         (jm_CHECK_DECLARATIONS): Require it.
24849
24850 2000-01-22  Jim Meyering  <meyering@lucent.com>
24851
24852         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
24853         [! HAVE_DECL_STRTOULL]: Declare strtoull.
24854         Required for some AIX systems.  Reported by Christian Krackowizer.
24855         [TESTING] (main): New function.
24856
24857         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
24858         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
24859         letters.
24860
24861         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
24862         iswprint.
24863
24864         * lib/strverscmp.c (ISDIGIT): Define.
24865         (strverscmp): Use ISDIGIT, not isdigit.
24866
24867 2000-01-19  Jim Meyering  <meyering@lucent.com>
24868
24869         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
24870         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
24871         defines `struct timespec' in <sys/time.h>
24872
24873         * m4/c-bs-a.m4: Remove uses of changequote altogether.
24874         Thanks to Akim for explaining.
24875
24876 2000-01-17  Paul Eggert  <eggert@twinsun.com>
24877
24878         * lib/nanosleep.c (nanosleep):
24879         Don't use SA_INTERRUPT to decide whether to call sigaction, as
24880         POSIX.1 doesn't require SA_INTERRUPT and some systems
24881         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
24882         it's been part of POSIX.1 since day 1 (in 1988).
24883
24884 2000-01-17  Jim Meyering  <meyering@lucent.com>
24885
24886         * lib/interlock: Remove unused file.  Reported by François Pinard.
24887
24888 2000-01-16  Paul Eggert  <eggert@twinsun.com>
24889
24890         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
24891         alert, backslash, formfeed, and vertical tab unnecessarily in
24892         shell quoting style.
24893
24894 2000-01-16  Jim Meyering  <meyering@lucent.com>
24895
24896         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
24897         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
24898         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
24899         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
24900
24901 2000-01-16  Jim Meyering  <meyering@lucent.com>
24902
24903         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
24904         because the latter didn't work.
24905
24906 2000-01-15  Jim Meyering  <meyering@lucent.com>
24907
24908         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
24909         (AC_REPLACE_FUNCS): Add memcpy and memset.
24910         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
24911         Add strpbrk.
24912         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
24913
24914 2000-01-12  Jim Meyering  <meyering@lucent.com>
24915
24916         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
24917         (jm_PREREQ): Use it.
24918         (jm_PREREQ_READUTMP): New macro.
24919         (jm_PREREQ): Use it.
24920
24921 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24922
24923         Quote multibyte characters correctly.
24924         * m4/c-bs-a.m4: New file.
24925         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
24926         (jm_PREREQ): Use it.
24927
24928 2000-01-11  Paul Eggert  <eggert@twinsun.com>
24929
24930         * m4/uintmax_t.m4: Port to autoconf 2.13.
24931
24932 2000-01-08  Jim Meyering  <meyering@ascend.com>
24933
24934         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
24935         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
24936
24937 2000-01-04  Jim Meyering  <meyering@ascend.com>
24938
24939         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
24940         jm_STRUCT_DIRENT_D_TYPE.
24941         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
24942         jm_STRUCT_DIRENT_D_INO.
24943         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
24944         jm_STRUCT_UTIMBUF.
24945         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
24946         renamings.
24947         * m4/utime.m4: Likewise.
24948
24949         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
24950         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
24951
24952 2000-01-03  Paul Eggert  <eggert@twinsun.com>
24953
24954         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
24955         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
24956
24957 2000-01-02  Jim Meyering  <meyering@ascend.com>
24958
24959         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
24960         remember if this is necessary.
24961
24962 1999-12-26  Jim Meyering  <meyering@ascend.com>
24963
24964         * m4/jm-macros.m4: Use it here.
24965         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
24966
24967 1999-12-23  Jim Meyering  <meyering@ascend.com>
24968
24969         * m4/jm-macros.m4: Check for clock_gettime (moved from
24970         fileutils/configure.in)
24971         Check for gettimeofday.
24972
24973 1999-12-20  Jim Meyering  <meyering@ascend.com>
24974
24975         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
24976         autoconf-2.14a-1999-12-20.
24977
24978 1999-12-19  Jim Meyering  <meyering@ascend.com>
24979
24980         * m4/lstat-slash.m4: New file.
24981         * m4/jm-macros.m4: Use the new macro:
24982         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24983
24984 1999-12-07  Jim Meyering  <meyering@ascend.com>
24985
24986         * m4/perl.m4: Require that File::Compare be available, too.
24987         Too many systems seem to lack it.
24988
24989         * m4/strftime.m4: Add checks for most of the cpp macros tested in
24990         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
24991
24992 1999-11-18  Paul Eggert  <eggert@twinsun.com>
24993
24994         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
24995         problem with the QNX 4.25 shell, which doesn't propagate exit
24996         status of failed commands inside shell assignments.
24997
24998 1999-11-17  Jim Meyering  <meyering@ascend.com>
24999
25000         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25001
25002 1999-11-07  Jim Meyering  <meyering@ascend.com>
25003
25004         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25005
25006 1999-11-06  Jim Meyering  <meyering@ascend.com>
25007
25008         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25009         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25010
25011 1999-11-05  Jim Meyering  <meyering@ascend.com>
25012
25013         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25014         configure.in of textutils, fileutils, and sh-utils into this one
25015         (shared between those packages) file.
25016         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25017         AC_STRUCT_ST_BLKSIZE.
25018
25019 1999-11-03  Jim Meyering  <meyering@ascend.com>
25020
25021         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25022         of AC_CHECK_TYPE checks includes unistd.h.
25023         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25024         Suggestion from Akim Demaille.
25025
25026 1999-10-30  Jim Meyering  <meyering@ascend.com>
25027
25028         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25029         m4-quoted string.
25030         * m4/ls-mntd-fs.m4: Likewise.
25031         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25032         * m4/jm-winsz1.m4: Likewise.
25033
25034         * m4/const.m4: Remove file, since the fix made it into the experimental
25035         version of autoconf.
25036         * m4/mktime.m4: Likewise.
25037
25038         * m4/check-type.m4: Remove file, now that the latest version of
25039         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25040
25041         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25042         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25043         AC_CHECK_TYPE.
25044
25045 1999-10-04  Jim Meyering  <meyering@ascend.com>
25046
25047         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25048
25049 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25050
25051         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25052         2.95.1 bug with HP-UX 10.20.
25053
25054 1999-09-17  Jim Meyering  <meyering@ascend.com>
25055
25056         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25057         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25058         due to missing strdup (against sh-utils-2.0).
25059
25060 1999-08-29  Jim Meyering  <meyering@ascend.com>
25061
25062         * m4/jm-macros.m4: Require jm_BISON.
25063         * m4/bison.m4: New file.
25064
25065 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25066
25067         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25068         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25069
25070 1999-08-05  Jim Meyering  <meyering@ascend.com>
25071
25072         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25073         to avoid conflicts with `conftest' on 8+3 filesystems.
25074         Suggestion from Eli Zaretskii.
25075
25076 1999-08-04  Jim Meyering  <meyering@ascend.com>
25077
25078         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25079         fileutils and sh-utils (textutils's getline test was inadequate).
25080         (AM_FUNC_GETLINE): Run this test.
25081         (AC_CHECK_FUNCS): Check for getdelim.
25082         Reported by Bob Proulx.
25083
25084 1999-08-02  Jim Meyering  <meyering@ascend.com>
25085
25086         * m4/jm-macros.m4: Add a comment.
25087
25088 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25089
25090         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25091         <inttypes.h> defines strtoumax as a macro (and not as a
25092         function).
25093
25094 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25095
25096         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25097         that we can shift, multiply and divide unsigned long long
25098         values; Ultrix cc can't do it.
25099
25100 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25101
25102         * m4/mktime.m4: New file, which is a preview of what should appear
25103         in the next public autoconf release.
25104
25105 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25106
25107         * m4/lfs.m4: Remove this file.
25108         * m4/largefile.m4: New file.  It contains the old contents of
25109         lfs.m4, except that all names with prefix AC_LFS have been
25110         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25111         compatible with future autoconf versions.  Also, some minor m4
25112         quoting problems have been fixed.
25113
25114 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25115
25116         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25117         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25118         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25119         and simplify the shell code.
25120
25121 1999-08-01  Jim Meyering  <meyering@ascend.com>
25122
25123         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25124         m4.
25125
25126 1999-07-20  Jim Meyering  <meyering@ascend.com>
25127
25128         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25129
25130 1999-07-15  Jim Meyering  <meyering@ascend.com>
25131
25132         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25133
25134 1999-05-22  Jim Meyering  <meyering@ascend.com>
25135
25136         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25137
25138 1999-05-20  Jim Meyering  <meyering@ascend.com>
25139
25140         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25141         Add a colon after each `then' in case $4 is empty.
25142
25143 1999-05-16  Jim Meyering  <meyering@ascend.com>
25144
25145         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25146
25147 1999-05-10  Jim Meyering  <meyering@ascend.com>
25148
25149         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25150
25151         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25152         AC_FUNC_MKTIME.
25153
25154 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25155
25156         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25157
25158 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25159
25160         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25161         not CPPFLAGS, so that linking works correctly in IRIX.
25162
25163 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25164
25165         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25166
25167 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25168
25169         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25170         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25171         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25172         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25173         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25174
25175         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25176
25177 1999-04-20  Jim Meyering  <meyering@ascend.com>
25178
25179         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25180         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25181         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25182
25183 1999-04-18  Jim Meyering  <meyering@ascend.com>
25184
25185         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25186         * m4/jm-macros.m4: Use it.
25187
25188 1999-04-06  Jim Meyering  <meyering@ascend.com>
25189
25190         * m4/strftime.m4: Remove test for %f.
25191
25192 1999-03-29  Jim Meyering  <meyering@ascend.com>
25193
25194         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25195         superset of the AC_TYPE_* checks in the textutils, fileutils,
25196         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25197         AC_TYPE_PID_T.
25198
25199 1999-03-28  Jim Meyering  <meyering@ascend.com>
25200
25201         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25202         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25203         replaced e.g., in the *.sh files of the sh-utils.
25204
25205 1999-03-20  Jim Meyering  <meyering@ascend.com>
25206
25207         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25208         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25209         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25210
25211 1999-03-19  Jim Meyering  <meyering@ascend.com>
25212
25213         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25214
25215 1999-03-12  Jim Meyering  <meyering@ascend.com>
25216
25217         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25218
25219 1999-03-07  Jim Meyering  <meyering@ascend.com>
25220
25221         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25222         declared.
25223
25224 1999-02-17  Jim Meyering  <meyering@ascend.com>
25225
25226         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25227         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25228
25229 1999-02-07  Jim Meyering  <meyering@ascend.com>
25230
25231         * m4/group-member.m4: New file -- extracted from sh-utils'
25232         configure.in.
25233
25234         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25235         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25236
25237 1999-02-06  Jim Meyering  <meyering@ascend.com>
25238
25239         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25240         * m4/fnmatch.m4: Likewise.
25241         * m4/getgroups.m4: Likewise.
25242         * m4/lstat.m4: Likewise.
25243         * m4/malloc.m4: Likewise.
25244         * m4/putenv.m4: Likewise.
25245         * m4/realloc.m4: Likewise.
25246         * m4/regex.m4: Likewise.
25247         * m4/stat.m4: Likewise.
25248         * m4/strftime.m4: Likewise.
25249         Suggestion from Alain Magloire.
25250
25251         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25252         * m4/fnmatch.m4: Likewise.
25253         * m4/getgroups.m4: Likewise.
25254         * m4/getline.m4: Likewise.
25255         * m4/lstat.m4: Likewise.
25256         * m4/malloc.m4: Likewise.
25257         * m4/memcmp.m4: Likewise.
25258         * m4/putenv.m4: Likewise.
25259         * m4/realloc.m4: Likewise.
25260         * m4/regex.m4: Likewise.
25261         * m4/stat.m4: Likewise.
25262         * m4/strftime.m4: Likewise.
25263         Suggestion from Alain Magloire.
25264
25265         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25266         an argument.
25267
25268         * m4/regex.m4: Add a run-time Test for proper operation of
25269         re_compile_pattern.
25270
25271 1999-01-31  Jim Meyering  <meyering@ascend.com>
25272
25273         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25274
25275 1999-01-30  Jim Meyering  <meyering@ascend.com>
25276
25277         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25278
25279         * m4/jm-mktime.m4: Make this a wrapper around the official
25280         AM_FUNC_MKTIME rather than my private copy, now that the official one
25281         is up to date.
25282         * m4/mktime.m4: Remove file.
25283
25284         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25285         * m4/uptime.m4: Likewise.
25286         * m4/uintmax_t.m4: Likewise.
25287
25288 1999-01-28  Jim Meyering  <meyering@ascend.com>
25289
25290         * m4/jm-macros.m4: Use jm_AFS.
25291         * m4/afs.m4: New file (from fileutils' configure.in).
25292
25293         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25294         * m4/chown.m4: Likewise.
25295         * m4/d-ino.m4: Likewise.
25296         * m4/d-type.m4: Likewise.
25297         * m4/fnmatch.m4: Likewise.
25298         * m4/getgroups.m4: Likewise.
25299         * m4/gettext.m4: Likewise.
25300         * m4/jm-mktime.m4: Likewise.
25301         * m4/jm-winsz2.m4: Likewise.
25302         * m4/lcmessage.m4: Likewise.
25303         * m4/ls-mntd-fs.m4: Likewise.
25304         * m4/malloc.m4: Likewise.
25305         * m4/memcmp.m4: Likewise.
25306         * m4/putenv.m4: Likewise.
25307         * m4/realloc.m4: Likewise.
25308         * m4/st_mtim.m4: Likewise.
25309         * m4/strftime.m4: Likewise.
25310
25311 1999-01-16  Jim Meyering  <meyering@ascend.com>
25312
25313         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25314         (ARGMATCH_DIE_DECL): Define.
25315
25316 1999-01-12  Jim Meyering  <meyering@ascend.com>
25317
25318         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25319         Reported by Lars Hecking.
25320
25321 1999-01-10  Jim Meyering  <meyering@ascend.com>
25322
25323         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25324         gross kludge.
25325         * m4/inttypes_h.m4: Likewise.
25326         * m4/lstat.m4: Likewise.
25327         * m4/malloc.m4: Likewise.
25328         * m4/readdir.m4: Likewise.
25329         * m4/realloc.m4: Likewise.
25330         * m4/st_dm_mode.m4: Likewise.
25331         * m4/stat.m4: Likewise.
25332         * m4/utimbuf.m4: Likewise.
25333         * m4/utimes.m4: Likewise.
25334
25335         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25336         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25337         comments in config.h.in are meaningful.
25338
25339         * m4/jm-macros.m4: Require autoconf-2.13 here.
25340
25341         * m4/regex.m4: By default, don't use the included regex.c on systems
25342         with glibc 2.  Suggestion from Uli Drepper.
25343
25344 1999-01-02  Jim Meyering  <meyering@ascend.com>
25345
25346         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25347
25348 1998-12-18  Jim Meyering  <meyering@ascend.com>
25349
25350         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25351         Based on a suggestion from Lars Hecking.
25352
25353 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25354
25355         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25356
25357 1998-11-16  Jim Meyering  <meyering@ascend.com>
25358
25359         * m4/lfs.m4: Double-quote the `uname...` expression.
25360
25361 1998-11-14  Jim Meyering  <meyering@ascend.com>
25362
25363         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25364         * m4/stat.m4: Likewise.
25365
25366 1998-11-03  Jim Meyering  <meyering@ascend.com>
25367
25368         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25369         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25370
25371 1998-10-18  Jim Meyering  <meyering@ascend.com>
25372
25373         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25374
25375 1998-10-17  Jim Meyering  <meyering@ascend.com>
25376
25377         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25378         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25379         calls for those previously hard-coded headers.  Instead, take a new
25380         parameter.
25381         (jm_CHECK_DECLARATIONS): Reflect interface change.
25382         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25383         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25384
25385         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25386
25387 1998-10-14  Jim Meyering  <meyering@ascend.com>
25388
25389         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25390         instead of "TZ=America/Vancouver".  From Paul Eggert.
25391
25392 1998-10-11  Jim Meyering  <meyering@ascend.com>
25393
25394         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25395         This adds a test for a recently added compatibility fix for mktime.c.
25396         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25397
25398 1998-09-27  Jim Meyering  <meyering@ascend.com>
25399
25400         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25401
25402         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25403         ../configure.in, including a change from Gordon Matzigkeit to allow
25404         cross-compiling for the Hurd.
25405
25406         * m4/glibc.m4: New file/macro to test for the GNU C Library
25407         versions 1 and 2.  From Gordon Matzigkeit.
25408         Indent.
25409
25410 1998-09-21  Jim Meyering  <meyering@ascend.com>
25411
25412         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25413
25414 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25415
25416         Port nanosecond-resolution times to UnixWare 2.1.2 and
25417         pedantic Solaris 2.6.
25418
25419         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25420         AC_STRUCT_ST_MTIM.
25421         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25422         Generate name of ns member, instead of just 1 or undef.
25423         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25424
25425 1998-08-15  Jim Meyering  <meyering@ascend.com>
25426
25427         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25428         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25429         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25430         instead of jm_TYPE_SSIZE_T.
25431
25432 1998-08-12  Jim Meyering  <meyering@ascend.com>
25433
25434         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25435
25436 1998-08-02  Jim Meyering  <meyering@ascend.com>
25437
25438         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25439         in acconfig.h manually.
25440
25441 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25442
25443         * m4/st_mtim.m4: New file.
25444
25445 1998-07-28  Jim Meyering  <meyering@ascend.com>
25446
25447         * m4/utimes.m4: Undef stat.
25448
25449 1998-07-25  Jim Meyering  <meyering@ascend.com>
25450
25451         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25452         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25453
25454 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25455
25456         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25457         uid and gid actually remain unchanged.
25458
25459 1998-07-07  Jim Meyering  <meyering@ascend.com>
25460
25461         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25462
25463 1998-07-04  Jim Meyering  <meyering@ascend.com>
25464
25465         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25466         to prove that this macro can be used in packages without regex.c.
25467
25468 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25469
25470         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25471         is to be used.
25472
25473 1998-07-03  Jim Meyering  <meyering@ascend.com>
25474
25475         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25476
25477         * m4/gettext.m4: New file -- from gettext-0.10.35.
25478         * m4/lcmessage.m4: Likewise.
25479         * m4/progtest.m4: Likewise.
25480
25481         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25482         * m4/jm-macros.m4: Require the new macro.
25483
25484 1998-06-29  Jim Meyering  <meyering@ascend.com>
25485
25486         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25487         for the definition of NGROUPS (used in a system header included
25488         by sys/mount.h).
25489
25490 1998-06-28  Jim Meyering  <meyering@ascend.com>
25491
25492         * m4/ls-mntd-fs.m4: New file.
25493         * m4/fstypename.m4: New file.
25494
25495         * m4/jm-macros.m4: Require the new macro.
25496         * m4/jm-glibc-io.m4: New file.
25497
25498 1998-05-19  Jim Meyering  <meyering@ascend.com>
25499
25500         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25501         * m4/lchown.m4: New file.
25502
25503         * m4/Makefile.am.in: New file.
25504         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
25505
25506 1998-05-14  Jim Meyering  <meyering@ascend.com>
25507
25508         * m4/Makefile.am (EXTRA_DIST): Add them.
25509         * m4/jm-macros.m4: New file.
25510         * m4/utimbuf.m4: New file.
25511
25512 1998-05-12  Jim Meyering  <meyering@ascend.com>
25513
25514         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
25515
25516 1998-05-11  Jim Meyering  <meyering@ascend.com>
25517
25518         * m4/isc-posix.m4: New file.
25519
25520 1998-05-10  Jim Meyering  <meyering@ascend.com>
25521
25522         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
25523
25524 1998-05-09  Jim Meyering  <meyering@ascend.com>
25525
25526         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
25527         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
25528         with automake.
25529
25530         * m4/ssize_t.m4: New file.
25531         * m4/mktime.m4: Remove file -- the new automake has this now.
25532
25533 1998-04-26  Jim Meyering  <meyering@ascend.com>
25534
25535         * m4/assert.m4: New file.
25536         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
25537
25538 1998-04-05  Jim Meyering  <meyering@ascend.com>
25539
25540         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
25541         (jm_PREREQ): Use it here.
25542
25543 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
25544
25545         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
25546         in acconfig.h.
25547
25548 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
25549
25550         * m4/prereq.m4: New file.
25551         * m4/error.m4: New file.
25552         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
25553
25554 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
25555
25556         * m4/getline.m4: Don't set am_cv_func_working_getline before the
25557         cache-check for the same variable -- that defeated the purpose of
25558         the test; the test program was never run.  This was a problem only
25559         on systems with losing getline functions -- HP-UX 10.20 is one.
25560         Reported by Bjorn Helgaas.
25561
25562 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
25563
25564         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
25565
25566 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
25567
25568         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
25569
25570         * m4/const.m4: New file.  Use an initializer in this declaration
25571         typedef int charset[2]; const charset x;
25572         Reported by Bob Glickstein.
25573
25574 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
25575
25576         * m4/chown.m4: Fix reversed types on -1 args to chown.
25577         From Kaveh Ghazi.
25578
25579 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
25580
25581         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
25582         Add lseek and memchr.
25583
25584         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
25585         T.E.Dickey <dickey@clark.net> said that some older preprocessors
25586         have a 20-character limit on names.
25587
25588 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
25589
25590         * m4/inttypes_h.m4: New file.
25591         * m4/uintmax_t.m4: New file.
25592         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
25593
25594 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
25595   Free Software Foundation, Inc.
25596 Copying and distribution of this file, with or without modification,
25597 are permitted provided the copyright notice and this notice are preserved.