Various fixes.
[gnulib.git] / ChangeLog
1 2007-01-25  Bruno Haible  <bruno@clisp.org>
2
3         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
4         *resultp is 0.
5
6         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
7         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
8         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
9         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
10
11         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
12         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
13         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
14         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
15         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
16         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
17
18 2007-01-24  Bruno Haible  <bruno@clisp.org>
19
20         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
21         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
22         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
23         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
24         gl_FUNC_FTS_CORE.
25         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
26         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
27         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
29         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
30         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
31         gl_FUNC_FCHOWNAT.
32         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
33         gl_FUNC_STRFTIME.
34         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
35         Reported by Ralf Wildenhues.
36
37 2007-01-24  Bruno Haible  <bruno@clisp.org>
38
39         Drop AC_REQUIRE calls that are redundant with the module dependencies.
40         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
41         gl_GETADDRINFO.
42         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
43         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
44         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
45
46 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
47
48         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
49         Don't use 'exit'; just return from 'main'.
50         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
51
52         * lib/fnmatch_.h: Readjust white space and comments to match
53         glibc, to avoid spurious diffs.
54
55 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
56
57         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
58         2004-12-01 change by Jakub Jelinek, since this code won't compile
59         if !LIBC.  Problem reported by Bob Proulx.
60
61 2007-01-23  Bruno Haible  <bruno@clisp.org>
62
63         * lib/striconveh.c: Include c-strcaseeq.h.
64         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
65         * modules/striconveh (Depends-on): Add c-strcaseeq.
66
67 2007-01-23  Bruno Haible  <bruno@clisp.org>
68
69         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
70
71         * modules/c-strcaseeq: New file.
72         * lib/c-strcaseeq.h: New file.
73
74         * modules/streq: New file.
75         * lib/streq.h: New file.
76
77 2007-01-23  Bruno Haible  <bruno@clisp.org>
78
79         * modules/striconveha-tests: New file.
80         * tests/test-striconveha.c: New file.
81
82         * lib/striconveha.h: Include <stdbool.h>.
83         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
84         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
85         (mem_iconveha_notranslit): Renamed from mem_iconveha.
86         (mem_iconveha): New function.
87         (str_iconveha_notranslit): Renamed from str_iconveha.
88         (str_iconveha): New function.
89         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
90         c-strcase.
91
92 2007-01-23  Bruno Haible  <bruno@clisp.org>
93
94         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
95         encodings without forgiving before trying any encoding with handler.
96         (str_iconveha): Try all encodings without forgiving before trying any
97         encoding with handler.
98
99 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
100
101         Import the following changes from libc.
102
103         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
104
105         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
106
107         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
108
109         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
110         normal_bracket label.
111
112         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
113
114         [BZ #361]
115         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
116         to normal_bracket after fetching the next character.
117
118 2007-01-22  Bruno Haible  <bruno@clisp.org>
119
120         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
121         argument.
122         * lib/striconveh.c (iconv_carefully_1): New function.
123         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
124         argument.
125         (str_cd_iconveh): Update.
126         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
127         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
128         * tests/test-striconveh.c (MAGIC): New macro.
129         (new_offsets): New function.
130         (main): Test call with and without offsets.
131
132 2007-01-22  Bruno Haible  <bruno@clisp.org>
133
134         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
135         * modules/sys_select (Makefile.am): Likewise.
136         * modules/sys_socket (Makefile.am): Likewise.
137         * modules/sys_time (Makefile.am): Likewise.
138
139 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
140
141         * modules/gettimeofday (License): Change from GPL to LGPL, since
142         gettimeofday is a library function.
143
144 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
145
146         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
147
148 2007-01-21  Bruno Haible  <bruno@clisp.org>
149
150         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
151
152 2007-01-21  Bruno Haible  <bruno@clisp.org>
153
154         * modules/striconveha: New file.
155         * lib/striconveha.h: New file.
156         * lib/striconveha.c: New file.
157         * MODULES.html.sh (Internationalization functions): Add striconveha.
158         * lib/striconv.c (str_iconv): Optimize the case of an empty input
159         string.
160         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
161
162 2007-01-21  Bruno Haible  <bruno@clisp.org>
163
164         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
165         * lib/striconveh.c (str_iconveh): Likewise.
166
167 2007-01-21  Bruno Haible  <bruno@clisp.org>
168
169         * lib/striconveh.h (mem_iconveh): New declaration.
170         * lib/striconveh.c (mem_iconveh): New function.
171         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
172
173 2007-01-21  Bruno Haible  <bruno@clisp.org>
174
175         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
176
177         * lib/striconveh.h (mem_cd_iconveh): Change specification.
178         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
179         original result buffer.
180         (str_cd_iconveh): Update.
181         * tests/test-striconveh.c (main): Update.
182
183         * lib/striconv.h (mem_cd_iconv): Change specification.
184         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
185         result buffer.
186         (str_cd_iconv): Update.
187         * tests/test-striconv.c (main): Update.
188
189 2007-01-21  Bruno Haible  <bruno@clisp.org>
190
191         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
192
193 2007-01-20  Jim Meyering  <jim@meyering.net>
194
195         * lib/userspec.c (parse_with_separator): If a user or group string
196         starts with "+", skip the corresponding name-to-ID look-up, since
197         such a look-up must fail: user and group names may not include "+".
198
199 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
200
201         * lib/poll.c: Include sys/time.h and time.h unconditionally,
202         since we now assume the sys_time module.
203         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
204         check for sys/time.h; no longer needed.
205         * modules/poll (Depends-on): Depend on sys_time.
206
207 2007-01-18  Bruno Haible  <bruno@clisp.org>
208
209         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
210         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
211
212         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
213         gettimeofday.
214
215         * tests/test-gettimeofday.c: Include <time.h>.
216         (dummy): Remove variable.
217
218         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
219         gl_HEADER_SYS_TIME_H.
220         (gl_HEADER_SYS_TIME_H): New macro.
221
222         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
223         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
224         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
225         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
226         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
227         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
228         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
229         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
230         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
231         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
232         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
233
234         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
235         last change; it caused a compilation error when cross-compiling to
236         Cygwin.
237
238 2007-01-18  Jim Meyering  <jim@meyering.net>
239
240         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
241         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
242         than the race-prone "test -d sys || mkdir sys".
243         (configure.ac): Use AC_PROG_MKDIR_P.
244         * modules/sys_select: Likewise.
245         * modules/sys_socket: Likewise.
246         * modules/sys_time: Likewise.
247
248 2007-01-18  Eric Blake  <ebb9@byu.net>
249
250         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
251         replace gettimeofday.
252         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
253         name, to avoid infinite recursion.
254
255 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
256
257         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
258         module sys_time.
259         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
260         assume timespec.h defines struct timeval.
261         * lib/settime.c: Likewise.
262         * lib/utimens.c: Likewise.
263         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
264         since we now assume the gettimeofday module.
265         * lib/tempname.c (__gen_tempname): Likewise.
266         * lib/gettimeofday.h: Remove.
267         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
268         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
269         Include <time.h>, for 'time()'.
270         (localtime_buffer_addr): Also use this workaround if
271         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
272         to simplify the uses.  All uses changed.
273         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
274         that #undef is inside {}, and 'const' follows type name consistently.
275         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
276         (gettimeofday): Do not use the maximum possible value for
277         tv->tv_usec, since that might break usages other than ls.c.
278         Instead, we'll leave ls.c alone.  This undoes today's patch
279         by Bruno.  Add a compile-time warning for 1s-clock resolution;
280         we've never observed the problem but might as well keep the
281         canary.
282         * lib/nanosleep.c: Include timespec.h first, for interface check.
283         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
284         now assume the sys_time module.
285         * lib/tempname.c: Likewise.
286         * lib/timespec.h: Likewise.
287         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
288         needed.
289         * lib/strftime.c: Likewise.
290         * lib/timespec.h: Likewise.
291         * lib/posixtm.c: Include posixtm.h first, for interface check.
292         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
293         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
294         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
295         * lib/sys_time_.h: New file.
296         * lib/timespec.h (struct timespec): Use long int, not long.
297         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
298         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
299         Remove obsolescent call to AC_HEADER_TIME.
300         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
301         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
302         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
303         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
304         Likewise.
305         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
306         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
307         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
308         into the sys_time module.  Check for gettimeofday just once.
309         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
310         for gettimeofday signature to just check the signature.  Merely
311         compile it, since linking doesn't test signature.  Improve test for
312         whether gettimeofday.o is actually needed.
313         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
314         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
315         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
316         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
317         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
318         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
319         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
320         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
321         than worrying about sys/time.h.
322         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
323         Don't bother worrying about TIME_WITH_SYS_TIME.
324         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
325         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
326         * m4/sys_time_h.m4: New file.
327         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
328         Don't include sys/time.h.  Return from main rather than exiting.
329         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
330         all uses changed.
331         * modules/gethrxtime (Depends-on): Add sys_time.
332         * modules/gettime (Depends-on): Likewise.
333         * modules/gettimeofday (Depends-on): Likewise.
334         * modules/nanosleep (Depends-on): Likewise.
335         * modules/settime (Depends-on): Likewise.
336         * modules/tempname (Depends-on): Likewise.
337         * modules/utimens (Depends-on): Likewise.
338         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
339         (Include:) Change back to <sys/time.h>.
340         (Maintainer:) Add self.
341         * modules/sys_time: New file.
342         * modules/tempname (Depends-on): Add gettimeofday.
343         * tests/test-gettimeofday.c: Include <sys/time.h>
344         rather than gettimeofday.h.
345
346 2007-01-17  Bruno Haible  <bruno@clisp.org>
347
348         * gnulib-tool (func_get_license): Revert last patch. Instead, let
349         the license default to GPL.
350         (func_create_testdir): Don't complain if a module is LGPL and its
351         tests module depends on GPLed modules.
352
353 2007-01-17  Bruno Haible  <bruno@clisp.org>
354
355         * lib/gettimeofday.c (gettimeofday): Add code for the case
356         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
357         maximum possible value for tv->tv_usec, rather than the minimum one.
358
359 2005-10-08  Martin Lambers  <marlam@marlam.de>
360 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
361 2007-01-16  Bruno Haible  <bruno@clisp.org>
362
363         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
364         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
365         gl_FUNC_GETTIMEOFDAY.
366         (Include): Add gettimeofday.h.
367         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
368         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
369         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
370         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
371         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
372         * lib/gettimeofday.h: New file.
373         * lib/gettimeofday.c: Include <sys/timeb.h>.
374         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
375         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
376         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
377         fall back on time().
378
379         * tests/test-gettimeofday.c: New file.
380         * modules/gettimeofday-tests: New file.
381
382 2007-01-16  Eric Blake  <ebb9@byu.net>
383
384         * modules/fnmatch (Depends-on): Depend on wchar.
385         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
386         * m4/fnmatch.m4: Likewise.
387         * modules/mbchar (Makefile.am): Assume <wchar.h>.
388         * m4/mbchar.m4: Likewise.
389         * modules/mbswidth (Depends-on): Depend on wchar.
390         * lib/mbswidth.c: Assume <wchar.h>.
391         * m4/mbswidth.m4: Likewise.
392         * modules/quotearg (Depends-on): Depend on wchar.
393         * lib/quotearg.c: Assume <wchar.h>.
394         * m4/quotearg.m4: Likewise.
395         * modules/regex (Depends-on): Depend on wchar.
396         * lib/regex_internal.h: Assume <wchar.h>.
397         * m4/regex.m4: Likewise.
398         * modules/stdint (Depends-on): Depend on wchar.
399         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
400         * m4/stdint.m4: Likewise.
401         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
402         * modules/strftime (Depends-on): Depend on wchar.
403         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
404         * modules/strtol (Depends-on): Depend on wchar.
405         * lib/strtol.c: Assume <wchar.h>.
406         * modules/wcwidth (Depends-on): Depend on wchar.
407         * lib/wcwidth.h: Assume <wchar.h>.
408         * m4/wcwidth.m4: Likewise.
409
410 2007-01-16  Bruno Haible  <bruno@clisp.org>
411
412         * modules/csharpexec-script: New, created from...
413         * modules/csharpexec: ... this.
414
415 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
416
417         * modules/javaexec-script: New, created from...
418         * modules/javaexec: ... this.
419
420 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
421
422         * modules/poll (Dependencies): Add sys_select.
423
424 2007-01-15  Jim Meyering  <jim@meyering.net>
425
426         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
427         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
428         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
429         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
430
431 2007-01-15  Bruno Haible  <bruno@clisp.org>
432
433         * modules/striconveh: New file.
434         * lib/striconveh.h: New file.
435         * lib/striconveh.c: New file.
436         * MODULES.html.sh (Internationalization functions): Add striconveh.
437
438         * modules/striconveh-tests: New file.
439         * tests/test-striconveh.c: New file.
440
441 2007-01-15  Bruno Haible  <bruno@clisp.org>
442
443         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
444         not from GNU libiconv or GNU libc.
445
446 2007-01-15  Bruno Haible  <bruno@clisp.org>
447
448         * doc/gnulib-intro.texi (Copyright): Explain the different license
449         terms for module descriptions, autoconf macros, tests, documentation.
450
451 2007-01-14  Bruno Haible  <bruno@clisp.org>
452
453         * modules/striconv-tests: New file.
454         * tests/test-striconv.c: New file.
455
456 2007-01-14  Bruno Haible  <bruno@clisp.org>
457
458         * modules/iconv-tests: New file.
459         * tests/test-iconv.c: New file.
460
461 2007-01-14  Bruno Haible  <bruno@clisp.org>
462
463         * gnulib-tool (func_get_license): For test modules, use the license of
464         the main module.
465
466 2007-01-14  Bruno Haible  <bruno@clisp.org>
467
468         * modules/iconv (Include): Clarify that <iconv.h> can only be included
469         if iconv is found to exist.
470
471 2007-01-14  Bruno Haible  <bruno@clisp.org>
472
473         * modules/c-ctype-tests: New file.
474         * tests/test-c-ctype.c: New file.
475
476 2007-01-14  Bruno Haible  <bruno@clisp.org>
477
478         * modules/binary-io-tests: New file.
479         * tests/test-binary-io.sh: New file.
480         * tests/test-binary-io.c: New file.
481
482 2007-01-14  Bruno Haible  <bruno@clisp.org>
483
484         * modules/array-oset-tests: New file.
485         * tests/test-array_oset.c: New file.
486
487 2007-01-14  Bruno Haible  <bruno@clisp.org>
488
489         * modules/array-list-tests: New file.
490         * tests/test-array_list.c: New file.
491
492 2007-01-14  Bruno Haible  <bruno@clisp.org>
493
494         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
495         and make.
496         Reported by Simon Josefsson in
497         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
498
499 2007-01-14  Bruno Haible  <bruno@clisp.org>
500
501         * modules/allocsa-tests: New file.
502         * tests/test-allocsa.c: New file.
503
504 2007-01-14  Bruno Haible  <bruno@clisp.org>
505
506         * modules/fchdir (Depends-on): Add absolute-header.
507         * modules/unistd (Depends-on): Likewise.
508
509 2006-12-30  Bruno Haible  <bruno@clisp.org>
510
511         * modules/fchdir: New file.
512         * modules/unistd (Files): Add lib/unistd_.h.
513         (Makefile.am): Generate unistd.h from unistd_.h.
514         * lib/fchdir.c: New file.
515         * lib/dirent_.h: New file.
516         * lib/unistd_.h: New file.
517         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
518         * m4/fchdir.m4: New file.
519         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
520         (gl_HEADER_UNISTD): Invoke it.
521         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
522         function.
523         * lib/backupfile.c (opendir, closedir): Undefine.
524         * lib/chown.c (open, close): Undefine.
525         * lib/clean-temp.c (open, close): Undefine.
526         * lib/copy-file.c (open, close): Undefine.
527         * lib/execute.c (open, close): Undefine.
528         * lib/fsusage.c (open, close): Undefine.
529         * lib/gc-gnulib.c (open, close): Undefine.
530         * lib/getcwd.c (opendir, closedir): Undefine.
531         * lib/glob.c (opendir, closedir): Undefine.
532         * lib/javacomp.c (open, close): Undefine.
533         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
534         * lib/openat-proc.c (open, close): Undefine.
535         * lib/pagealign_alloc.c (open, close): Undefine.
536         * lib/pipe.c (open, close): Undefine.
537         * lib/progreloc.c (open, close): Undefine.
538         * lib/savedir.c (opendir, closedir): Undefine.
539         * lib/utime.c (open, close): Undefine.
540         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
541
542 2007-01-10  Bruno Haible  <bruno@clisp.org>
543
544         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
545
546 2007-01-12  Eric Blake  <ebb9@byu.net>
547
548         Provide a robust <wchar.h>.  Further simplifications are now
549         possible in other modules, but not included here.
550         * modules/wchar: New module.
551         * m4/wchar.m4: New file.
552         * lib/wchar_.h: Likewise.
553         * modules/mbchar (Depends-on): Depend on wchar, as the first use
554         of the new module.
555         * MODULES.html.sh (Extended multibyte and wide character utilities):
556         New section.
557
558 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
559
560         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
561         to a reasonable default for memory allocation.
562         (xreadlink): Don't allocate a huge buffer, to work around a buggy
563         file system that reports garbage st_size values for symlinks.
564         Problem reported by Liyang Hu.
565
566 2007-01-11  Simon Josefsson  <simon@josefsson.org>
567
568         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
569         Emacs .#* auto-save files).
570
571 2007-01-11  Bruno Haible  <bruno@clisp.org>
572
573         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
574         directory.
575
576 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
577
578         Use @...@ consistently in lib/wctype_.h.
579         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
580         on it being set to 1 or 0.
581         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
582         go back to AC_SUBSTing it.
583         * modules/wctype (Makefile.am): Undo previous change.
584
585 2007-01-10  Eric Blake  <ebb9@byu.net>
586
587         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
588         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
589         * modules/wctype (Makefile.am): Likewise.
590         Reported by Chris McGuire.
591
592 2007-01-10  Jim Meyering  <jim@meyering.net>
593
594         fts.c: a small readability/maintainability improvement
595         * lib/fts.c (fts_read): Make this code slightly more readable and
596         maintainable by hoisting the "sp->fts_cur = p" assignments to
597         immediately follow the statements that set P.  Derived from
598         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
599
600 2007-01-10  Eric Blake  <ebb9@byu.net>
601
602         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
603         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
604         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
605         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
606         Reported by Chris McGuire.
607
608 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
609
610         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
611         in sed script.
612
613 2007-01-09  Bruno Haible  <bruno@clisp.org>
614
615         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
616         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
617         variables.
618         (func_module): Use them.
619
620 2007-01-09  Bruno Haible  <bruno@clisp.org>
621
622         * modules/unistr/base: New file.
623         * lib/unistr.h: New file.
624
625         * modules/unistr/u8-to-u16: New file.
626         * lib/unistr/u8-to-u16.c: New file.
627
628         * modules/unistr/u8-to-u32: New file.
629         * lib/unistr/u8-to-u32.c: New file.
630
631         * modules/unistr/u16-to-u8: New file.
632         * lib/unistr/u16-to-u8.c: New file.
633
634         * modules/unistr/u16-to-u32: New file.
635         * lib/unistr/u16-to-u32.c: New file.
636
637         * modules/unistr/u32-to-u8: New file.
638         * lib/unistr/u32-to-u8.c: New file.
639
640         * modules/unistr/u32-to-u16: New file.
641         * lib/unistr/u32-to-u16.c: New file.
642
643         * modules/unistr/u8-check: New file.
644         * modules/unistr/u16-check: New file.
645         * modules/unistr/u32-check: New file.
646         * lib/unistr/u8-check.c: New file.
647         * lib/unistr/u16-check.c: New file.
648         * lib/unistr/u32-check.c: New file.
649
650         * modules/unistr/u8-chr: New file.
651         * modules/unistr/u16-chr: New file.
652         * modules/unistr/u32-chr: New file.
653         * lib/unistr/u8-chr.c: New file.
654         * lib/unistr/u16-chr.c: New file.
655         * lib/unistr/u32-chr.c: New file.
656
657         * modules/unistr/u8-cmp: New file.
658         * modules/unistr/u16-cmp: New file.
659         * modules/unistr/u32-cmp: New file.
660         * lib/unistr/u8-cmp.c: New file.
661         * lib/unistr/u16-cmp.c: New file.
662         * lib/unistr/u32-cmp.c: New file.
663
664         * modules/unistr/u8-cpy: New file.
665         * modules/unistr/u16-cpy: New file.
666         * modules/unistr/u32-cpy: New file.
667         * lib/unistr/u8-cpy.c: New file.
668         * lib/unistr/u16-cpy.c: New file.
669         * lib/unistr/u32-cpy.c: New file.
670         * lib/unistr/u-cpy.h: New file.
671
672         * modules/unistr/u8-cpy-alloc: New file.
673         * modules/unistr/u16-cpy-alloc: New file.
674         * modules/unistr/u32-cpy-alloc: New file.
675         * lib/unistr/u8-cpy-alloc.c: New file.
676         * lib/unistr/u16-cpy-alloc.c: New file.
677         * lib/unistr/u32-cpy-alloc.c: New file.
678         * lib/unistr/u-cpy-alloc.h: New file.
679
680         * modules/unistr/u8-endswith: New file.
681         * modules/unistr/u16-endswith: New file.
682         * modules/unistr/u32-endswith: New file.
683         * lib/unistr/u8-endswith.c: New file.
684         * lib/unistr/u16-endswith.c: New file.
685         * lib/unistr/u32-endswith.c: New file.
686         * lib/unistr/u-endswith.h: New file.
687
688         * modules/unistr/u8-mblen: New file.
689         * modules/unistr/u16-mblen: New file.
690         * modules/unistr/u32-mblen: New file.
691         * lib/unistr/u8-mblen.c: New file.
692         * lib/unistr/u16-mblen.c: New file.
693         * lib/unistr/u32-mblen.c: New file.
694
695         * modules/unistr/u8-mbtouc: New file.
696         * modules/unistr/u16-mbtouc: New file.
697         * modules/unistr/u32-mbtouc: New file.
698         * lib/unistr/u8-mbtouc.c: New file.
699         * lib/unistr/u16-mbtouc.c: New file.
700         * lib/unistr/u32-mbtouc.c: New file.
701
702         * modules/unistr/u8-mbtouc-safe: New file.
703         * modules/unistr/u16-mbtouc-safe: New file.
704         * modules/unistr/u32-mbtouc-safe: New file.
705         * lib/unistr/u8-mbtouc-safe.c: New file.
706         * lib/unistr/u16-mbtouc-safe.c: New file.
707         * lib/unistr/u32-mbtouc-safe.c: New file.
708
709         * modules/unistr/u8-move: New file.
710         * modules/unistr/u16-move: New file.
711         * modules/unistr/u32-move: New file.
712         * lib/unistr/u8-move.c: New file.
713         * lib/unistr/u16-move.c: New file.
714         * lib/unistr/u32-move.c: New file.
715         * lib/unistr/u-move.h: New file.
716
717         * modules/unistr/u8-next: New file.
718         * modules/unistr/u16-next: New file.
719         * modules/unistr/u32-next: New file.
720         * lib/unistr/u8-next.c: New file.
721         * lib/unistr/u16-next.c: New file.
722         * lib/unistr/u32-next.c: New file.
723
724         * modules/unistr/u8-prev: New file.
725         * modules/unistr/u16-prev: New file.
726         * modules/unistr/u32-prev: New file.
727         * lib/unistr/u8-prev.c: New file.
728         * lib/unistr/u16-prev.c: New file.
729         * lib/unistr/u32-prev.c: New file.
730
731         * modules/unistr/u8-set: New file.
732         * modules/unistr/u16-set: New file.
733         * modules/unistr/u32-set: New file.
734         * lib/unistr/u8-set.c: New file.
735         * lib/unistr/u16-set.c: New file.
736         * lib/unistr/u32-set.c: New file.
737         * lib/unistr/u-set.h: New file.
738
739         * modules/unistr/u8-startswith: New file.
740         * modules/unistr/u16-startswith: New file.
741         * modules/unistr/u32-startswith: New file.
742         * lib/unistr/u8-startswith.c: New file.
743         * lib/unistr/u16-startswith.c: New file.
744         * lib/unistr/u32-startswith.c: New file.
745         * lib/unistr/u-startswith.h: New file.
746
747         * modules/unistr/u8-stpcpy: New file.
748         * modules/unistr/u16-stpcpy: New file.
749         * modules/unistr/u32-stpcpy: New file.
750         * lib/unistr/u8-stpcpy.c: New file.
751         * lib/unistr/u16-stpcpy.c: New file.
752         * lib/unistr/u32-stpcpy.c: New file.
753         * lib/unistr/u-stpcpy.h: New file.
754
755         * modules/unistr/u8-stpncpy: New file.
756         * modules/unistr/u16-stpncpy: New file.
757         * modules/unistr/u32-stpncpy: New file.
758         * lib/unistr/u8-stpncpy.c: New file.
759         * lib/unistr/u16-stpncpy.c: New file.
760         * lib/unistr/u32-stpncpy.c: New file.
761         * lib/unistr/u-stpncpy.h: New file.
762
763         * modules/unistr/u8-strcat: New file.
764         * modules/unistr/u16-strcat: New file.
765         * modules/unistr/u32-strcat: New file.
766         * lib/unistr/u8-strcat.c: New file.
767         * lib/unistr/u16-strcat.c: New file.
768         * lib/unistr/u32-strcat.c: New file.
769         * lib/unistr/u-strcat.h: New file.
770
771         * modules/unistr/u8-strchr: New file.
772         * modules/unistr/u16-strchr: New file.
773         * modules/unistr/u32-strchr: New file.
774         * lib/unistr/u8-strchr.c: New file.
775         * lib/unistr/u16-strchr.c: New file.
776         * lib/unistr/u32-strchr.c: New file.
777
778         * modules/unistr/u8-strcmp: New file.
779         * modules/unistr/u16-strcmp: New file.
780         * modules/unistr/u32-strcmp: New file.
781         * lib/unistr/u8-strcmp.c: New file.
782         * lib/unistr/u16-strcmp.c: New file.
783         * lib/unistr/u32-strcmp.c: New file.
784
785         * modules/unistr/u8-strcpy: New file.
786         * modules/unistr/u16-strcpy: New file.
787         * modules/unistr/u32-strcpy: New file.
788         * lib/unistr/u8-strcpy.c: New file.
789         * lib/unistr/u16-strcpy.c: New file.
790         * lib/unistr/u32-strcpy.c: New file.
791         * lib/unistr/u-strcpy.h: New file.
792
793         * modules/unistr/u8-strcspn: New file.
794         * modules/unistr/u16-strcspn: New file.
795         * modules/unistr/u32-strcspn: New file.
796         * lib/unistr/u8-strcspn.c: New file.
797         * lib/unistr/u16-strcspn.c: New file.
798         * lib/unistr/u32-strcspn.c: New file.
799         * lib/unistr/u-strcspn.h: New file.
800
801         * modules/unistr/u8-strdup: New file.
802         * modules/unistr/u16-strdup: New file.
803         * modules/unistr/u32-strdup: New file.
804         * lib/unistr/u8-strdup.c: New file.
805         * lib/unistr/u16-strdup.c: New file.
806         * lib/unistr/u32-strdup.c: New file.
807         * lib/unistr/u-strdup.h: New file.
808
809         * modules/unistr/u8-strlen: New file.
810         * modules/unistr/u16-strlen: New file.
811         * modules/unistr/u32-strlen: New file.
812         * lib/unistr/u8-strlen.c: New file.
813         * lib/unistr/u16-strlen.c: New file.
814         * lib/unistr/u32-strlen.c: New file.
815         * lib/unistr/u-strlen.h: New file.
816
817         * modules/unistr/u8-strmblen: New file.
818         * modules/unistr/u16-strmblen: New file.
819         * modules/unistr/u32-strmblen: New file.
820         * lib/unistr/u8-strmblen.c: New file.
821         * lib/unistr/u16-strmblen.c: New file.
822         * lib/unistr/u32-strmblen.c: New file.
823
824         * modules/unistr/u8-strmbtouc: New file.
825         * modules/unistr/u16-strmbtouc: New file.
826         * modules/unistr/u32-strmbtouc: New file.
827         * lib/unistr/u8-strmbtouc.c: New file.
828         * lib/unistr/u16-strmbtouc.c: New file.
829         * lib/unistr/u32-strmbtouc.c: New file.
830
831         * modules/unistr/u8-strncat: New file.
832         * modules/unistr/u16-strncat: New file.
833         * modules/unistr/u32-strncat: New file.
834         * lib/unistr/u8-strncat.c: New file.
835         * lib/unistr/u16-strncat.c: New file.
836         * lib/unistr/u32-strncat.c: New file.
837         * lib/unistr/u-strncat.h: New file.
838
839         * modules/unistr/u8-strncmp: New file.
840         * modules/unistr/u16-strncmp: New file.
841         * modules/unistr/u32-strncmp: New file.
842         * lib/unistr/u8-strncmp.c: New file.
843         * lib/unistr/u16-strncmp.c: New file.
844         * lib/unistr/u32-strncmp.c: New file.
845
846         * modules/unistr/u8-strncpy: New file.
847         * modules/unistr/u16-strncpy: New file.
848         * modules/unistr/u32-strncpy: New file.
849         * lib/unistr/u8-strncpy.c: New file.
850         * lib/unistr/u16-strncpy.c: New file.
851         * lib/unistr/u32-strncpy.c: New file.
852         * lib/unistr/u-strncpy.h: New file.
853
854         * modules/unistr/u8-strnlen: New file.
855         * modules/unistr/u16-strnlen: New file.
856         * modules/unistr/u32-strnlen: New file.
857         * lib/unistr/u8-strnlen.c: New file.
858         * lib/unistr/u16-strnlen.c: New file.
859         * lib/unistr/u32-strnlen.c: New file.
860         * lib/unistr/u-strnlen.h: New file.
861
862         * modules/unistr/u8-strpbrk: New file.
863         * modules/unistr/u16-strpbrk: New file.
864         * modules/unistr/u32-strpbrk: New file.
865         * lib/unistr/u8-strpbrk.c: New file.
866         * lib/unistr/u16-strpbrk.c: New file.
867         * lib/unistr/u32-strpbrk.c: New file.
868         * lib/unistr/u-strpbrk.h: New file.
869
870         * modules/unistr/u8-strrchr: New file.
871         * modules/unistr/u16-strrchr: New file.
872         * modules/unistr/u32-strrchr: New file.
873         * lib/unistr/u8-strrchr.c: New file.
874         * lib/unistr/u16-strrchr.c: New file.
875         * lib/unistr/u32-strrchr.c: New file.
876
877         * modules/unistr/u8-strspn: New file.
878         * modules/unistr/u16-strspn: New file.
879         * modules/unistr/u32-strspn: New file.
880         * lib/unistr/u8-strspn.c: New file.
881         * lib/unistr/u16-strspn.c: New file.
882         * lib/unistr/u32-strspn.c: New file.
883         * lib/unistr/u-strspn.h: New file.
884
885         * modules/unistr/u8-strstr: New file.
886         * modules/unistr/u16-strstr: New file.
887         * modules/unistr/u32-strstr: New file.
888         * lib/unistr/u8-strstr.c: New file.
889         * lib/unistr/u16-strstr.c: New file.
890         * lib/unistr/u32-strstr.c: New file.
891         * lib/unistr/u-strstr.h: New file.
892
893         * modules/unistr/u8-strtok: New file.
894         * modules/unistr/u16-strtok: New file.
895         * modules/unistr/u32-strtok: New file.
896         * lib/unistr/u8-strtok.c: New file.
897         * lib/unistr/u16-strtok.c: New file.
898         * lib/unistr/u32-strtok.c: New file.
899         * lib/unistr/u-strtok.h: New file.
900
901         * modules/unistr/u8-uctomb: New file.
902         * modules/unistr/u16-uctomb: New file.
903         * modules/unistr/u32-uctomb: New file.
904         * lib/unistr/u8-uctomb.c: New file.
905         * lib/unistr/u16-uctomb.c: New file.
906         * lib/unistr/u32-uctomb.c: New file.
907
908         * MODULES.html.sh (Unicode string functions): Add the new modules.
909
910 2007-01-08  Bruno Haible  <bruno@clisp.org>
911
912         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
913         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
914         subdirectories.
915
916 2007-01-08  Karl Berry  <karl@gnu.org>
917
918         * doc/error.texi: mention that main() fns must set program_name
919         when progname is used.
920
921 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
922
923         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
924         WCTYPE_H is empty, for the benefit of builds from non-distclean
925         directories.  Problem reported by Eric Blake in
926         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
927
928 2007-01-08  Bruno Haible  <bruno@clisp.org>
929
930         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
931         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
932         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
933         PROVIDE_CANONICALIZE_FILENAME_MODE.
934         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
935
936 2007-01-08  Bruno Haible  <bruno@clisp.org>
937
938         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
939         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
940         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
941         * lib/fts.c: Likewise.
942         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
943
944 2006-12-25  Bruno Haible  <bruno@clisp.org>
945
946         * modules/utf8-ucs4-safe: New file.
947         * lib/utf8-ucs4-safe.h: New file.
948         * lib/unistr/utf8-ucs4-safe.c: New file.
949
950         * modules/utf16-ucs4-safe: New file.
951         * lib/utf16-ucs4-safe.h: New file.
952         * lib/unistr/utf16-ucs4-safe.c: New file.
953
954         * MODULES.html.sh (Unicode string functions): Add the new modules.
955
956 2007-01-08  Bruno Haible  <bruno@clisp.org>
957
958         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
959         (Depends-on): Add unitypes.
960         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
961         (u8_mbtouc_aux): Move out to separate file.
962         (u8_mbtouc): Use ucs4_t, uint8_t types.
963         * lib/unistr/utf8-ucs4.c: New file.
964
965         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
966         (Depends-on): Add unitypes.
967         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
968         (u16_mbtouc_aux): Move out to separate file.
969         (u16_mbtouc): Use ucs4_t, uint16_t types.
970         * lib/unistr/utf16-ucs4.c: New file.
971
972         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
973         (Depends-on): Add unitypes.
974         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
975         (u8_uctomb_aux): Move out to separate file.
976         (u8_uctomb): Use ucs4_t, uint8_t types.
977         * lib/unistr/ucs4-utf8.c: New file.
978
979         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
980         (Depends-on): Add unitypes.
981         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
982         (u16_uctomb_aux): Move out to separate file.
983         (u16_uctomb): Use ucs4_t, uint16_t types.
984         * lib/unistr/ucs4-utf16.c: New file.
985
986 2006-12-25  Bruno Haible  <bruno@clisp.org>
987
988         * modules/unitypes: New file.
989         * lib/unitypes.h: New file.
990         * MODULES.html.sh (func_all_modules): New section "Unicode string
991         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
992         this section. Add unitypes.
993
994 2007-01-08  Bruno Haible  <bruno@clisp.org>
995
996         Avoid variable names that conflict with those from libtool.
997         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
998         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
999         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1000         library_names_spec to acl_library_names_spec, hardcode_* to
1001         acl_hardcode_*.
1002         Reported by Ralf Wildenhues.
1003
1004 2007-01-08  Bruno Haible  <bruno@clisp.org>
1005
1006         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1007         definition.
1008         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1009         definition.
1010         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1011         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1012         definition.
1013         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1014         definition.
1015         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1016         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1017         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1018         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1019         definition.
1020         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1021         definition.
1022         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1023         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1024         GC_USE_<algorithm>.
1025         * lib/gc-libgcrypt.c: Likewise.
1026         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1027         * modules/gc-arctwo (configure.ac): Likewise.
1028         * modules/gc-des (configure.ac): Likewise.
1029         * modules/gc-hmac-md5 (configure.ac): Likewise.
1030         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1031         * modules/gc-md2 (configure.ac): Likewise.
1032         * modules/gc-md4 (configure.ac): Likewise.
1033         * modules/gc-md5 (configure.ac): Likewise.
1034         * modules/gc-random (configure.ac): Likewise.
1035         * modules/gc-rijndael (configure.ac): Likewise.
1036         * modules/gc-sha1 (configure.ac): Likewise.
1037
1038 2007-01-08  Bruno Haible  <bruno@clisp.org>
1039
1040         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1041         macro definition.
1042         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1043         definition.
1044         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1045         definition.
1046         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1047         * modules/fcntl-safer (configure.ac): Likewise.
1048         * modules/fopen-safer (configure.ac): Likewise.
1049         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1050         GNULIB_FWRITEERROR macro definition.
1051
1052 2007-01-08  Bruno Haible  <bruno@clisp.org>
1053
1054         * m4/gnulib-common.m4: New file.
1055         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1056         (func_get_filelist): Add m4/gnulib-common.m4.
1057
1058 2007-01-08  Bruno Haible  <bruno@clisp.org>
1059
1060         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1061         command.
1062
1063 2007-01-08  Jim Meyering  <jim@meyering.net>
1064
1065         Use a more robust test for a "can't happen" condition.
1066         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1067         narrowed the st_size value.  Presuming the "can't happen" condition
1068         is true, that narrowing could conceivably convert an invalid st_size
1069         value into a valid one.  Instead, use a change based on Matthew
1070         Woehlke's original patch.
1071
1072         Slight readability improvement: use an assert-like macro
1073         in place of literal "abort ()" uses.
1074         * lib/fts.c (fts_assert): Define.
1075         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1076         Use this macro instead of a bare 'abort'.
1077
1078 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1079
1080         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1081         simply work around them.
1082         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1083         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1084         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1085         Don't bother to define as macros, since the standard doesn't require it.
1086         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1087         longer worry about IRIX 5.3.
1088         (HAVE_WCTYPE_CTMP_BUG): Remove.
1089
1090 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1091
1092         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1093         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1094         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1095         Problems reported by Georg Schwarz for IRIX 5.3.
1096
1097         * gnulib-tool (autoconf_minversion): Take the maximum version number
1098         found, not the minimum.  Problem reported by James Youngman.
1099
1100 2007-01-03  Karl Berry  <karl@gnu.org>
1101
1102         * doc/error.texi: new file, explaining interaction with progname.
1103         * doc/gnulib.texi: include it.  Update copyright.
1104
1105 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1106
1107         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1108         AC_CANONICAL_HOST, to improve autobuild outputs.
1109
1110 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1111             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1112
1113         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1114         sockets, server sockets, and other file descriptors.  Count errors
1115         to compute the return value.  Reorder the code a bit to be easier
1116         to follow.  Don't set event bits that were not requested (except
1117         POLLERR and POLLHUP).
1118
1119 2007-01-01  Bruno Haible  <bruno@clisp.org>
1120
1121         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1122
1123 2007-01-03  Jim Meyering  <jim@meyering.net>
1124
1125         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1126
1127 2007-01-02  Bruno Haible  <bruno@clisp.org>
1128
1129         * modules/settime (Include): Require timespec.h.
1130         * modules/nanosleep (Include): Likewise.
1131
1132 2007-01-01  Bruno Haible  <bruno@clisp.org>
1133
1134         * gnulib-tool (func_emit_copyright_notice): Bump year.
1135         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1136
1137 2007-01-01  Bruno Haible  <bruno@clisp.org>
1138
1139         Improve support for OpenBSD.
1140         * build-aux/config.rpath (libname_spec): Export.
1141         (library_names_spec): New variable. Export.
1142         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1143         library_names_spec from the config.rpath output. Locate shared library
1144         through the name pattern in library_names_spec.
1145
1146 2007-01-01  Eric Blake  <ebb9@byu.net>
1147
1148         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1149
1150 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1151
1152         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1153         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1154         assume the C locale, and avoid an "eval" that could cause trouble.
1155         Problem with SORT reported by Bob Proulx.
1156
1157         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1158         Define.  Trivial patch from Henning Nielsen Lund, originally
1159         sent to bug-grep@gnu.org today.
1160
1161 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1162
1163         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1164         struct stat.  Problem reported by Henning Nielsen Lund.
1165         * lib/acl.c: Include acl.h first, to check interface.  Don't
1166         bother to include sys/types.h and sys/stat.h again.
1167
1168 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1169
1170         Import the following change from libc; problem reported by
1171         Sven Verdoolaege.
1172
1173         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1174
1175         [BZ #1373]
1176         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1177
1178 2006-12-28  Jim Meyering  <jim@meyering.net>
1179
1180         * build-aux/announce-gen: Do not assume that the package
1181         builds any of tar.gz, tar.bz2, and .xdelta files.
1182         Suggestion from Simon Josefsson.
1183
1184 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1185
1186         * modules/announce-gen: New file.
1187
1188 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1189
1190         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1191         handles its gotchas now.
1192         * lib/mbswidth.c: Likewise.
1193         * lib/wcwidth.h: Likewise.
1194         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1195         and iswcntrl; the wctype module does this stuff now.
1196         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1197         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1198         * modules/mbchar (Depends-on): Add wctype.
1199         * modules/mbswidth (Depends-on): Likewise.
1200         * modules/wcwidth (Depends-on): Likewise.
1201
1202 2006-12-27  Eric Blake  <ebb9@byu.net>
1203
1204         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1205         module uses more than what <wctype.h> is required to provide.
1206
1207 2006-12-26  Eric Blake  <ebb9@byu.net>
1208
1209         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1210
1211 2006-12-26  Eric Blake  <ebb9@byu.net>
1212
1213         * modules/absolute-header: New module.
1214         * modules/fcntl (Depends-on): Depend on it.
1215         * modules/inttypes (Depends-on): Likewise.
1216         * modules/stdint (Depends-on): Likewise.
1217         * modules/sys_stat (Depends-on): Likewise.
1218         * modules/wctype (Depends-on): Likewise.
1219         * MODULES.html.sh (Support for building libraries and
1220         executables): Document it.
1221
1222 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1223
1224         * gnulib-tool (SED): Remove, undoing previous change.
1225         The problem was that it broke coreutils on Solaris, because
1226         "sed --posix" leaked into a makefile.
1227         (sed): New alias, if 'alias' and GNU sed.
1228
1229 2006-12-24  Jim Meyering  <jim@meyering.net>
1230
1231         Work around an fchownat bug in glibc-2.4:
1232         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1233         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1234         in spite of the -P option.
1235         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1236         New macros.
1237         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1238         * modules/openat (Files): Add lib/fchownat.c.
1239         * lib/openat.c (fchownat): Don't define here.  Move to...
1240         * lib/fchownat.c: ...this new file.
1241
1242 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1243
1244         Fix bug reported by Bruno Haible in
1245         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1246         where quotearg.c didn't compile on Mac OS X 10.2 because it
1247         lacks <wchar.h> and wint_t.
1248         * lib/wctype_.h (__wctype_wint_t): New type.
1249         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1250         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1251         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1252         Arg is now of type __wctype_wint_t, not wint_t.
1253         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1254         substitute HAVE_WINT_T.
1255         * modules/wctype (Files): Add m4/wint_t.m4.
1256         (wctype.h): Substitute HAVE_WINT_T.
1257
1258 2006-12-23  Bruno Haible  <bruno@clisp.org>
1259
1260         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1261
1262 2006-12-23  Bruno Haible  <bruno@clisp.org>
1263
1264         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1265         S_ISLNK.
1266         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1267         mingw.
1268
1269 2006-12-22  Bruno Haible  <bruno@clisp.org>
1270
1271         * lib/copy-file.c: Include acl.h.
1272         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1273         Close the file descriptors only after being done with copy_acl.
1274         * modules/copy-file (Depends-on): Add acl.
1275
1276 2006-12-22  Bruno Haible  <bruno@clisp.org>
1277
1278         * gnulib-tool (SED): New variable.
1279         Use $SED instead of sed everywhere.
1280
1281 2006-12-22  Bruno Haible  <bruno@clisp.org>
1282
1283         * modules/no-c++: New file.
1284         * m4/no-c++.m4: New file.
1285         * MODULES.html.sh (Support for building libraries and executables):
1286         Add no-c++.
1287
1288 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1289
1290         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1291         Include <limits.h>, and use its INT_MAX to rewrite the
1292         j loop so that it does not overflow 'int'.  Problem reported by
1293         Ralf Wildenhues in
1294         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1295         Play it safe by shifting left by 1 rather than multiplying by 2,
1296         as GCC is less likely to optimize this away when the value
1297         is signed (when it assumes overflow leads to undefined behavior).
1298         Also, don't assume time_t uses two's complement.
1299
1300 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1301
1302         * MODULES.html.sh: New module wctype.
1303         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1304         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1305         <wctype.h>, since the new wctype module should fix this.
1306         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1307         the wctype module should arrange for it.
1308         * lib/regex_internal.h: Likewise.
1309         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1310         since the wctype module should handle this now.
1311         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1312         * modules/fnmatch (Depends-on): Add wctype.
1313         * modules/quotearg (Depends-on): Likewise.
1314         * modules/regex (Depends-on): Likewise.
1315
1316 2006-12-19  Bruno Haible  <bruno@clisp.org>
1317
1318         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1319         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1320
1321 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1322
1323         * modules/savewd (Depends-on): Fix dependency on fcntl.
1324
1325 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1326
1327         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1328         conforms to C99, rather than relying on the user's environment
1329         setting of STDINT_H.
1330
1331 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1332         and Eric Blake  <ebb9@byu.net>
1333
1334         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1335         This is more consistent with the other defines here.
1336         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1337         Port to z/OS.  Problem reported by Paul Gilmartin.
1338         Change local vars to use gl_ prefix rather than ac_.
1339         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1340         with other defines.
1341         * modules/double-slash-root: New module.
1342         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1343         (Depends-on): Add double-slash-root.
1344         * MODULES.html.sh (File system functions): Mention new module.
1345
1346 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1347
1348         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1349         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1350         This is for the benefit of gzip, which doesn't do i18n.
1351
1352 2006-12-12  Jim Meyering  <jim@meyering.net>
1353
1354         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1355         Reported by Andreas Schwab <schwab@suse.de>.
1356
1357 2006-12-12  Bruno Haible  <bruno@clisp.org>
1358
1359         Merge these changes.
1360         2006-09-05  Bruno Haible  <bruno@clisp.org>
1361         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1362         iconv_alloc succeeded.
1363         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1364         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1365         test for " && dest " at the end - dest is always != NULL there. Call
1366         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1367         with 2xNULL arguments, also to flush the state storage. Handle the
1368         IRIX iconv behaviour. Realloc the final result, to throw away unused
1369         memory.
1370
1371 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1372
1373         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1374         and fchmodat unconditionally, since glibc 2.4 has them.
1375         Problem reported by Arkadiusz Miskiewicz.
1376
1377 2006-12-10  Bruno Haible  <bruno@clisp.org>
1378
1379         * gnulib-tool (func_import): Show the include files only for those
1380         modules that are copied and specified.
1381         Reported by Karl Berry.
1382
1383 2006-12-08  Jim Meyering  <jim@meyering.net>
1384
1385         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1386         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1387
1388         * build-aux/announce-gen: Add two new options, both optional:
1389         --bootstrap-tools=TOOL_LIST
1390               a comma-separated list of tools, e.g.,
1391               autoconf,automake,bison,gnulib
1392         --gnulib-snapshot-date=DATE
1393               if gnulib is in the bootstrap tool list,
1394               then report this as the snapshot date.
1395               If not specified, use the current date/time.
1396               If you specify a date here, be sure it's UTC.
1397
1398 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1399
1400         * tests/test-argp-2.sh: Fix test to match actual output.
1401         (func_compare): Fix sed script to be portable.
1402
1403 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1404
1405         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1406         workaround for this case.  It is not autoconfigured now; offhand
1407         it's hard to see how to autoconfigure it.
1408
1409 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1410
1411         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1412         a directory that is about to be chowned.  Such a directory's
1413         initial file permissions should permit the owner only and this
1414         should not be changed until after the chown, since the group and
1415         other bits would be incorrect if they granted permission before
1416         the chown.
1417
1418         Fix porting problem for iswctype reported by Georg Schwarz in:
1419         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1420         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1421         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1422         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1423         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1424
1425 2006-12-03  Jim Meyering  <jim@meyering.net>
1426
1427         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1428         p->fts_statp may not yet be defined.
1429         (fts_read): Instead, set it in the caller, once p->fts_statp is
1430         sure to be defined, and corresponds to a top-level directory.
1431         This bug made du -x fail.  Here's the coreutils test case:
1432         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1433         Reported by Mike Frysinger.
1434
1435 2006-12-01  Jim Meyering  <jim@meyering.net>
1436
1437         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1438         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1439         Reported by Simon Josefsson.
1440
1441 2006-11-30  Jim Meyering  <jim@meyering.net>
1442
1443         * m4/warning.m4: Use the all-permissive copyright notice
1444         recommended by RMS (rather than LGPL).
1445         * m4/vararrays.m4: Likewise.
1446         * m4/flexmember.m4: Likewise.
1447
1448 2006-11-29  Bruno Haible  <bruno@clisp.org>
1449
1450         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1451         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1452         using +=.
1453         Reported by Simon Josefsson <simon@josefsson.org>.
1454
1455 2006-11-28  James Youngman <jay@gnu.org>
1456
1457         * README: Advise users that they might find the bug-gnulib@gnu.org
1458         and autotools-announce@gnu.org mailing lists useful.
1459
1460 2006-11-28  Bruno Haible  <bruno@clisp.org>
1461
1462         * m4/ptrdiff_max.m4: Remove file.
1463
1464 2006-11-21  Bruno Haible  <bruno@clisp.org>
1465
1466         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1467         _AC_COMPUTE_INT.
1468         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1469         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1470         _AC_COMPUTE_INT.
1471         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1472         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1473         _AC_COMPUTE_INT.
1474         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1475
1476 2006-11-28  Jim Meyering  <jim@meyering.net>
1477
1478         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1479         warning from "gcc -Wshadow" about shadowing the builtin.
1480
1481 2006-11-27  Bruno Haible  <bruno@clisp.org>
1482
1483         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1484         _AC_COMPUTE_INT.
1485         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1486
1487 2006-11-27  Bruno Haible  <bruno@clisp.org>
1488             Paul Eggert  <eggert@cs.ucla.edu>
1489
1490         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1491
1492 2006-11-26  Bruno Haible  <bruno@clisp.org>
1493
1494         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1495         noinst_LTLIBRARIES.
1496
1497 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1498             Bruno Haible  <bruno@clisp.org>
1499
1500         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1501         if compiling with "gcc -ansi".
1502
1503 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1504
1505         Fix some incompatibilities with gcc -ansi -pedantic.
1506         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
1507         if compiling pedantically with GCC, unless it's C99 or later.
1508         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
1509         it mishandles gcc -ansi -pedantic as well.
1510         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
1511         if gcc -pedantic.
1512         * lib/regexec.c (check_node_accept_bytes): Don't use auto
1513         initializers for struct if -pedantic, unless it's C99 or later.
1514
1515 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
1516
1517         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
1518         Don't close an fd more than once. Identical atimes indicate
1519         success, not failure.
1520
1521 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
1522
1523         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
1524
1525 2006-11-23  Jim Meyering  <jim@meyering.net>
1526
1527         * build-aux/announce-gen: New file.  From coreutils.
1528
1529 2006-11-22  Jim Meyering  <jim@meyering.net>
1530
1531         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
1532         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
1533         (fts_read): Use a temporary to narrow the overused st_size member
1534         before using it in a switch statement.  Reported by Matthew Woehlke.
1535
1536         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
1537         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
1538
1539 2006-11-20  Bruno Haible  <bruno@clisp.org>
1540
1541         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
1542         changequote instead of pairs of brackets.
1543         Reported by Andreas Schwab <schwab@suse.de>.
1544
1545 2006-11-21  Jim Meyering  <jim@meyering.net>
1546
1547         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
1548         so as to remain compatible with older compilers.
1549         Patch from Michael Deutschmann.
1550
1551 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1552
1553         * MODULES.html.sh (File system functions): Add openat.
1554
1555         * lib/openat.h (rpl_fstatat): New macro, if
1556         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
1557         (fstatat): Define to rpl_fstatat under the same conditions,
1558         unless COMPILING_FSTATAT.
1559         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
1560         seems to have the bug.
1561         * lib/fstatat.c: New file.
1562         * modules/openat (Files): Add it.
1563
1564 2006-11-20  Bruno Haible  <bruno@clisp.org>
1565
1566         * Makefile: New file.
1567
1568 2006-11-20  Jim Meyering  <jim@meyering.net>
1569
1570         The beginnings of syntax-related checks for gnulib.
1571         * lib/Makefile: New file.
1572         * lib/t-idcache: New script.  Ensure that the two halves of
1573         idcache.c stay in sync.
1574
1575         * lib/idcache.c: Adjust comments in user- and group- portions to
1576         be more accurate, and to be consistent with one another.
1577
1578 2006-11-20  Jim Meyering  <jim@meyering.net>
1579
1580         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
1581         continue using the flexible array member (thus, this module performs
1582         half as many malloc calls), with the addition that...
1583         (getgroup, getuser): Consistently record a non-match via an empty
1584         "name" string, and map an empty string match to a NULL return value.
1585         * modules/idcache (Depends-on): Re-add flexmember.
1586
1587         * lib/idcache.c (getuser): Remove all uses of the register keyword.
1588         (getuidbyname, getgroup, getgidbyname): Likewise.
1589
1590         Use cleaner syntax: NULL rather than 0.
1591         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
1592
1593 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
1594
1595         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
1596         It mishandled the case where the group was missing.
1597         Problem reported by Greg Schafer.
1598         * modules/idcache: Likewise.
1599
1600 2006-11-18  Jim Meyering  <jim@meyering.net>
1601
1602         * check-module (%exempt_header): Add exception for some
1603         conditionally-included headers.
1604
1605         * modules/i-ring (Depends-on): Add verify.
1606         (License): Change to LGPL.
1607
1608 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
1609
1610         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
1611         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
1612         and inttostr.h.  Use snprintf rather than uinttostr, so that
1613         LGPLed code doesn't depend on GPLed.
1614
1615 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
1616
1617         * modules/inline (License): Change from GPL to LGPL.
1618
1619 2006-11-17  Jim Meyering  <jim@meyering.net>
1620
1621         * modules/d-type (License): Switch to LGPL.
1622
1623 2006-11-15  Bruno Haible  <bruno@clisp.org>
1624
1625         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
1626
1627 2006-11-15  Eric Blake  <ebb9@byu.net>
1628
1629         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
1630         the module dependency.
1631
1632 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1633             Bruno Haible  <bruno@clisp.org>
1634
1635         * gnulib-tool (func_create_testdir): Add license consistency check.
1636
1637 2006-11-15  Eric Blake  <ebb9@byu.net>
1638
1639         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
1640         random "(cached)" in configure output.
1641
1642 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1643
1644         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
1645         test for conforming inttypes.h is both announced and cached.
1646
1647         * MODULES.html.sh (seen_modules, seen_files): New variables.
1648         (func_module): Rewrite to use a few less gnulib-tool and sed
1649         invocations.  Avoid a couple of quadratic algorithms for ...
1650         (missed_modules, missed_files): ... these, with ...
1651         (func_append, func_tmpdir): ... these new functions, from
1652         gnulib-tool.  Analogously, install traps for cleanup.
1653
1654         * tests/test-gc.c (main): Remove unused variables.
1655         * tests/test-read-file.c: Include stdlib.h, for 'free'.
1656
1657 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
1658
1659         * modules/inttostr (License): Change to LGPL.
1660
1661 2006-11-14  Eric Blake  <ebb9@byu.net>
1662
1663         * modules/tempname (License): Change to LGPL.
1664
1665 2006-11-14  Eric Blake  <ebb9@byu.net>
1666
1667         * doc/functions.texi (Function Portability): *printf functions on
1668         Cygwin now understand all POSIX size specifiers.
1669
1670 2006-11-14  Bruno Haible  <bruno@clisp.org>
1671
1672         * modules/c-ctype (License): Change to LGPL.
1673
1674 2006-11-12  Bruno Haible  <bruno@clisp.org>
1675
1676         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
1677         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
1678         for GNOME libraries, for which the include files are installed in
1679         subdirectories of $prefix/include.
1680
1681 2006-11-12  Bruno Haible  <bruno@clisp.org>
1682
1683         * m4/lib-link.m4: Require at least autoconf-2.54.
1684         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
1685         name to underscores for the --with option.
1686
1687 2006-11-13  Bruno Haible  <bruno@clisp.org>
1688
1689         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
1690         the tests directory.
1691         Reported by Ralf Wildenhues.
1692
1693 2006-11-13  Bruno Haible  <bruno@clisp.org>
1694
1695         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
1696         (func_emit_initmacro_end): Undo the override here.
1697         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
1698         Works around the famous automake error in coreutils.
1699
1700 2006-11-13  Eric Blake  <ebb9@byu.net>
1701
1702         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
1703         element, not its node.
1704
1705 2006-11-12  Bruno Haible  <bruno@clisp.org>
1706
1707         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
1708         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
1709
1710 2006-11-12  Bruno Haible  <bruno@clisp.org>
1711
1712         * gnulib-tool: New option --local-symlink.
1713         (func_usage): Document it.
1714         (lsymbolic): New variable.
1715         (func_import, func_create_testdir): If --symlink was not specified,
1716         test whether --local-symlink was specified and the file comes from
1717         the local_gnulib_dir.
1718
1719 2006-11-12  Bruno Haible  <bruno@clisp.org>
1720
1721         * gnulib-tool (func_ln): New function.
1722         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
1723
1724 2006-11-12  Bruno Haible  <bruno@clisp.org>
1725
1726         Finish support for source files in subdirectories.
1727         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
1728         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
1729         AUTOMAKE_OPTIONS.
1730         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
1731
1732 2006-11-12  Bruno Haible  <bruno@clisp.org>
1733
1734         * gnulib-tool (func_get_automake_snippet): Synthesize also an
1735         EXTRA_lib_SOURCES augmentation.
1736         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
1737
1738 2006-11-12  Jim Meyering  <jim@meyering.net>
1739
1740         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
1741         file descriptors.  This also averts a failure on systems with
1742         native openat support when a traversed directory lacks "x" access.
1743         * lib/fts_.h: Include "i-ring.h"
1744         (struct FTS) [fts_fd_ring]: New member.
1745         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
1746         (FCHDIR): Add parentheses.
1747         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
1748         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
1749         When descending, rather than simply closing the previous
1750         fts_cwd_fd value, push that file descriptor onto the ring.
1751         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
1752         (fts_open): Initialize the new fd_ring member.
1753         (fts_close): Clear the ring.
1754         (fts_safe_changedir): When possible, use our new fd_ring to skip
1755         the diropen and fstat and dev/ino comparison that would normally
1756         accompany a virtual `chdir ("..")'.
1757
1758         * modules/fts (Depends-on): Add i-ring.
1759         * modules/i-ring: New module.
1760         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
1761         * m4/i-ring.m4: New file.
1762
1763 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1764
1765         * gnulib-tool (func_create_testdir): Fix replacement of
1766         `build-aux' in configure.ac.  Run autotools in gltests
1767         subdirectory.
1768         (func_create_testdir, func_create_megatestdir, test): There is
1769         no need for '--force' in most autotool invocations in a new
1770         tree.  Actually fail the whole test if any of the tools, or the
1771         configure or make stages fail.
1772
1773         Sync from Automake.
1774         * build-aux/gnupload: Revert last change.  Add pointer to upload
1775         instructions of the GNU Maintenance Instructions.
1776         Suggestion by Karl Berry.
1777
1778 2006-11-10  Jim Meyering  <jim@meyering.net>
1779
1780         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
1781
1782 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1783
1784         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
1785         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
1786         (bind_textdomain_codeset) [! ENABLE_NLS]:
1787         Evaluate all the arguments.  That way, callers get compatible behavior
1788         if the arguments have side effects.  Also, it avoids some GCC
1789         diagnostics in some cases; Joel E. Denny reported problems when Bison
1790         was configured with --enable-gcc-warnigs.
1791
1792 2006-11-10  Jim Meyering  <jim@meyering.net>
1793
1794         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
1795         relevant options in CFLAGS (like -O, -fno-inline) are taken into
1796         account.
1797
1798 2006-11-10  Jim Meyering  <jim@meyering.net>
1799
1800         * modules/inline: New file/module.
1801         * modules/xalloc (Files): Remove m4/inline.m4.
1802         (Depends-on): Add inline, instead.
1803         * modules/oset: Likewise.
1804         * modules/list: Likewise.
1805
1806 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1807
1808         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
1809         Problem reported by Matthew Woehlke.
1810
1811 2006-11-09  Bruno Haible  <bruno@clisp.org>
1812
1813         * lib/tempname.c (gen_tempname): Remove variant that invokes
1814         __gen_tempname.
1815         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
1816         __gen_tempname.
1817
1818 2006-11-08  Bruno Haible  <bruno@clisp.org>
1819
1820         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
1821         to 'yes' instead of 'cross-compiling'.
1822
1823 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
1824
1825         * lib/quotearg.h (quotearg_free): New decl.
1826         * lib/quotearg.c (quotearg_free): New function.
1827         (slot0, nslots, slotvec0, slotvec):
1828         Now file-scope so that quotearg_free can get at them.
1829
1830 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1831
1832         Sync from Automake.
1833         * build-aux/gnupload: Add missing 'gnu' to example URL.
1834         Report by Karl Berry.
1835
1836 2006-11-08  Bruno Haible  <bruno@clisp.org>
1837
1838         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
1839         Suggested by Paul Eggert.
1840
1841 2006-11-08  Jim Meyering  <jim@meyering.net>
1842
1843         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
1844         It's already included if !_LIBC.
1845         (fts_safe_changedir): Add a comment.
1846
1847 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1848
1849         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
1850         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
1851         Matthew Woehlke.
1852
1853         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
1854         definitions up, to avoid colliding with change below.
1855         (static_inline) [HAVE_INLINE]: New macro.
1856         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
1857         Provide extern decls when !HAVE_INLINE.  Do not define unless
1858         static_inline is defined, either by us or by xmalloc.c.  Use
1859         static_inline rather than static inline.
1860         (XCALLOC): Optimize sizeof(T) = 1 case.
1861         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
1862
1863 2006-11-07  Bruno Haible  <bruno@clisp.org>
1864
1865         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
1866         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
1867         AC_C_INLINE.
1868         * modules/xalloc (Files): Add m4/inline.m4.
1869
1870 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1871
1872         * README: Fix typo.
1873         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
1874         (Miscellanous Notes): ...from this.
1875
1876 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
1877
1878         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
1879         Mention that offsetof should be used instead of sizeof.
1880         From Bruno Haible.
1881
1882 2006-11-07  Bruno Haible  <bruno@clisp.org>
1883
1884         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
1885
1886 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1887
1888         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1889         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
1890         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1891         (gl_tree_add_before, gl_tree_add_after):
1892         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
1893         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
1894         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1895         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
1896         (gl_linked_add_after, gl_linked_add_at): Likewise.
1897         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
1898         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
1899         (gl_tree_add_before, gl_tree_add_after): Likewise.
1900         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
1901         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
1902         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
1903
1904 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1905
1906         * lib/gl_oset.h: Use C comment style, not C++ comment style.
1907
1908 2006-11-06  Bruno Haible  <bruno@clisp.org>
1909
1910         * m4/inline.m4: New file.
1911         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
1912         * modules/list (Files): Add m4/inline.m4.
1913         * modules/oset (Files): Likewise.
1914
1915 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
1916
1917         * lib/idcache.c: Include <stddef.h>, for offsetof.
1918         (struct userid.name): Change from char * to a flexible array member.
1919         All uses changed.
1920         * modules/idcache (Depends-on): Add flexmember.
1921
1922         * MODULES.html.sh (Core language properties): New module flexmember.
1923         * modules/flexmember, m4/flexmember.m4: New files.
1924
1925         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
1926         inline functions that are identical with the old xnmalloc_inline,
1927         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
1928         that we can avoid some unnecessary integer multiplications and
1929         divisions in the common case where the element size is known at
1930         compile time.
1931         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
1932         needed.
1933         (xnboundedmalloc): Remove.
1934         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
1935         arguments, for consistency with rest of this header.
1936         (xcharalloc): Rewrite using XNMALLOC.
1937         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
1938         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
1939         versions have been moved to lib/xalloc.h and renamed to be the
1940         non-*_inline versions.
1941         (xmalloc, xrealloc): Implement without reference to the xnmalloc
1942         and xnrealloc functions, since those functions are now inline and
1943         now call us.
1944         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
1945         renaming described above.
1946         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
1947         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
1948         captures the dependency in AC_C_INLINE.
1949
1950         New module canonicalize-lgpl, proposed by Charles Wilson in
1951         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
1952         with a few small changes afterwards.
1953         * MODULES.html.sh (File system functions): New module
1954         canonicalize-lgpl.
1955         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
1956         and canonicalize_file_name.
1957         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
1958         * modules/canonicalize-lgpl: New files.
1959
1960 2006-11-05  Bruno Haible  <bruno@clisp.org>
1961
1962         * gnulib-tool (func_import, func_create_testdir): Create directories
1963         also for files in subdirectories of lib/.
1964
1965 2006-11-05  Bruno Haible  <bruno@clisp.org>
1966
1967         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
1968         ANSI C compliant.
1969
1970 2006-11-03  Bruno Haible  <bruno@clisp.org>
1971
1972         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
1973         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
1974         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
1975         (xnboundedmalloc): New inline function.
1976         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
1977         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
1978         xmalloc.
1979         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
1980         xmalloc.
1981         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
1982         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
1983         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
1984         xmalloc.
1985         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1986         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
1987         xmalloc.
1988         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
1989         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1990         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
1991         xmalloc.
1992         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
1993         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
1994         gl_tree_add_after): Use XMALLOC instead of xmalloc.
1995         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
1996         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
1997         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
1998         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
1999
2000 2006-11-03  Bruno Haible  <bruno@clisp.org>
2001
2002         * lib/c-ctype.h [C++]: Define functions without name mangling.
2003         * lib/fwriteerror.h [C++]: Likewise.
2004         * lib/gcd.h [C++]: Likewise.
2005         * lib/linebreak.h [C++]: Likewise.
2006
2007 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2008
2009         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2010         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2011         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2012         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2013         Check for functions and headers just once.
2014         Check for declaration of canonicalize_file_name.
2015         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2016
2017 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2018
2019         * gnulib-tool (func_import): Fix typo in actioncmd.
2020
2021 2006-11-02  Bruno Haible  <bruno@clisp.org>
2022
2023         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2024         newline sequence in the Makefile.am snippet as a space, like "make"
2025         does.
2026         Reported by Roger Persson <perrog@gmail.com>.
2027
2028 2006-11-01  Bruno Haible  <bruno@clisp.org>
2029
2030         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2031         already declared in <string.h>.
2032         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2033
2034 2006-11-01  Bruno Haible  <bruno@clisp.org>
2035
2036         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2037         * lib/strcase.h: Include <string.h>.
2038         (strcasecmp): Define to rpl_strcasecmp here.
2039
2040 2006-11-01  Bruno Haible  <bruno@clisp.org>
2041
2042         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2043
2044 2006-11-01  Eric Blake  <ebb9@byu.net>
2045
2046         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2047
2048         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2049
2050 2006-10-29  Bruno Haible  <bruno@clisp.org>
2051
2052         Make it compile in C++ mode.
2053         * lib/full-write.c (full_rw): Add a cast.
2054
2055 2006-11-01  Bruno Haible  <bruno@clisp.org>
2056
2057         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2058         be POSIX compliant.
2059         Reported by Roger Persson <perrog@gmail.com>.
2060
2061 2006-11-01  Eric Blake  <ebb9@byu.net>
2062
2063         * lib/getopt_.h: Fix comments.
2064
2065 2006-10-31  Eric Blake  <ebb9@byu.net>
2066
2067         * modules/tmpdir (Depends-on): Add sys_stat.
2068         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2069         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2070         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2071         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2072         tempname.
2073
2074 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2075
2076         Avoid some C++ diagnostics reported by Bruno Haible.
2077         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2078         xmalloc.
2079         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2080         (struct slotvec): Move to top level.
2081         (quotearg_n_options): Rewrite to avoid xmalloc.
2082         * lib/xalloc.h (xcharalloc): New function.
2083         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2084         [defined __cplusplus]: Add function template that provides result
2085         type propagation.  This part of the change is from Bruno Haible.
2086
2087 2006-10-29  Bruno Haible  <bruno@clisp.org>
2088
2089         Make it compile in C++ mode.
2090         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2091         * lib/strnlen1.c (strnlen1): Cast memchr result.
2092         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2093         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2094         (create_temp_dir): Rename local variable 'template'.
2095         (compile_csharp_using_sscli): Add cast.
2096         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2097         * lib/findprog.c (find_in_path): Likewise.
2098         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2099         * lib/wait-process.c (register_slave_subprocess): Likewise.
2100
2101 2006-10-22  Bruno Haible  <bruno@clisp.org>
2102
2103         * modules/tsearch: New file.
2104         * lib/tsearch.h: New file.
2105         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2106         * m4/tsearch.m4: New file.
2107         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2108
2109 2006-10-29  Eric Blake  <ebb9@byu.net>
2110
2111         * lib/arcfour.c: Assume config.h.
2112         * lib/arctwo.c: Likewise.
2113         * lib/base64.c: Likewise.
2114         * lib/check-version.c: Likewise.
2115         * lib/crc.c: Likewise.
2116         * lib/des.c: Likewise.
2117         * lib/gc-gnulib.c: Likewise.
2118         * lib/gc-libgcrypt.c: Likewise.
2119         * lib/gc-pbkdf2-sha1.c: Likewise.
2120         * lib/getaddrinfo.c: Likewise.
2121         * lib/getdelim.c: Likewise.
2122         * lib/getline.c: Likewise.
2123         * lib/hmac-md5.c: Likewise.
2124         * lib/hmac-sha1.c: Likewise.
2125         * lib/iconvme.c: Likewise.
2126         * lib/md2.c: Likewise.
2127         * lib/md4.c: Likewise.
2128         * lib/memxor.c: Likewise.
2129         * lib/read-file.c: Likewise.
2130         * lib/readline.c: Likewise.
2131         * lib/rijndael-alg-fst.c: Likewise.
2132         * lib/rijndael-api-fst.c: Likewise.
2133         * lib/xgetdomainname.c: Likewise.
2134
2135 2006-10-28  Eric Blake  <ebb9@byu.net>
2136
2137         * lib/xstrndup.c: Assume config.h.
2138
2139 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2140
2141         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2142         stat-macros.h is now for our own macros, whereas stat_h is for
2143         macros in the <sys/stat.h> name space.
2144         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2145         (STAT_MACROS_H): Remove.
2146         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2147         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2148         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2149         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2150         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2151         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2152         Move these macros to ...
2153         * lib/stat_.h: here.  Don't include stat-macros.h.
2154         * lib/canonicalize.c: Don't include stat-macros.h.
2155         * lib/chown.c: Likewise.
2156         * lib/euidaccess.c: Likewise.
2157         * lib/file-type.c: Likewise.
2158         * lib/filemode.c: Likewise.
2159         * lib/glob.c: Likewise.
2160         * lib/isapipe.c: Likewise.
2161         * lib/lchown.c: Likewise.
2162         * lib/lstat.c: Likewise.
2163         * lib/mkdir-p.c: Likewise.
2164         * lib/rmdir.c: Likewise.
2165         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2166         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2167         unless mkdir isn't declared, to speed up 'configure'.
2168         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2169         would define all the S_* symbols.
2170         * modules/canonicalize (Depends-on):
2171         Depend on sys_stat, not stat-macros.
2172         * modules/chown: Likewise.
2173         * modules/euidaccess: Likewise.
2174         * modules/filemode: Likewise.
2175         * modules/file-type: Likewise.
2176         * modules/glob: Likewise.
2177         * modules/isapipe: Likewise.
2178         * modules/lchown: Likewise.
2179         * modules/lstat: Likewise.
2180         * modules/mkancesdirs: Likewise.
2181         * modules/rmdir: Likewise.
2182         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2183         * modules/modechange: Likewise.
2184         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2185         (configure.ac): Remove gl_STAT_MACROS.
2186         * modules/sys_stat (Depends-on): Remove stat-macros.
2187
2188 2006-10-27  Bruno Haible  <bruno@clisp.org>
2189
2190         * m4/signed.m4: Remove file.
2191         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2192         invocation.
2193         * modules/vasnprintf (Files): Remove m4/signed.m4.
2194
2195 2006-10-27  Bruno Haible  <bruno@clisp.org>
2196
2197         Update to GNU gettext 0.16.
2198         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2199         m4/inttypes-h.m4, m4/signed.m4.
2200         * m4/gettext.m4: Update to GNU gettext 0.16.
2201         * m4/intl.m4: New file, from GNU gettext.
2202         * m4/intldir.m4: New file, from GNU gettext.
2203         * config/srclist.txt: Update
2204
2205 2006-10-27  Eric Blake  <ebb9@byu.net>
2206
2207         * MODULES.html.sh: Document tempname.
2208         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2209         dependencies.
2210         (Files): Move lib/tempname.c...
2211         * modules/tempname: ...to this new module.
2212         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2213         (gl_PREREQ_TEMPNAME): Move...
2214         * m4/tempname.m4: ...to this new file.
2215         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2216         * modules/sys_stat (Depends-on): Add stat-macros.
2217         * lib/stat_.h (includes): Pick up stat macros.
2218         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2219         if stat macros are broken.
2220         * lib/tempname.c (includes): No need to include "stat-macros.h".
2221         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2222         (direxists, __path_search) [!_LIBC]: Don't compile these in
2223         gnulib; the tmpdir module covers that.
2224         * lib/tempname.h: New file.
2225
2226 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2227
2228         * COPYING: Explain how gnulib-tool converts licence headers.
2229         Almost all wording by Eric Blake.
2230
2231 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2232
2233         * lib/mbchar.h (is_basic_table): Make read-only.
2234         * lib/mbchar.c (is_basic_table): Likewise.
2235         Reported by John Darrington.
2236
2237 2006-10-25  Bruno Haible  <bruno@clisp.org>
2238
2239         * lib/progname.h (set_program_name): Undefine before defining.
2240
2241 2006-10-25  Bruno Haible  <bruno@clisp.org>
2242
2243         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2244         false for non-gcc C++ compilers.
2245         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2246
2247 2006-10-24  Bruno Haible  <bruno@clisp.org>
2248
2249         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2250         iconv implementations like Irix iconv.
2251
2252 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2253
2254         * modules/vararrays: New file.
2255         * m4/vararrays.m4: New file, taken from diffutils.
2256         * MODULES.html.sh: New module vararrays.
2257
2258 2006-10-24  Karl Berry  <karl@gnu.org>
2259
2260         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2261         Don't call GNU Unix.
2262
2263 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2264
2265         * users.txt: Add Libtool.
2266
2267         Sync from Libtool:
2268
2269         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2270
2271         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2272         to gnulib's policy of including config.h unconditionally.
2273
2274 2006-10-24  Bruno Haible  <bruno@clisp.org>
2275
2276         * modules/wcwidth (Files): Add m4/wint_t.m4.
2277         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2278         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2279
2280 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2281
2282         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2283         to pacify GCC with some -W flags enabled.  Problem reported by
2284         Bruno Haible.
2285
2286 2006-10-24  Jim Meyering  <jim@meyering.net>
2287
2288         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2289         Reported by Karl Berry.
2290
2291 2006-10-23  Bruno Haible  <bruno@clisp.org>
2292
2293         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2294
2295 2006-10-24  Bruno Haible  <bruno@clisp.org>
2296
2297         * lib/gl_list.h: Use C comment style, not C++ comment style.
2298
2299 2006-10-23  Eric Blake  <ebb9@byu.net>
2300
2301         * lib/getaddrinfo.c (includes): Add missing include.
2302
2303 2006-10-23  Bruno Haible  <bruno@clisp.org>
2304             Paul Eggert  <eggert@cs.ucla.edu>
2305
2306         Ability to rename obstack_free.
2307         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2308         obstack_free.
2309         (obstack_free): Invoke the __obstack_free macro.
2310         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2311
2312 2006-10-23  Bruno Haible  <bruno@clisp.org>
2313             Paul Eggert  <eggert@cs.ucla.edu>
2314
2315         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2316         __argc, __argv from the declaration. (They are defined as macros on
2317         mingw.)
2318
2319 2006-10-22  Bruno Haible  <bruno@clisp.org>
2320
2321         * doc/gnulib-intro.texi: New file.
2322         * doc/gnulib.texi: Include it.
2323
2324 2006-10-21  Bruno Haible  <bruno@clisp.org>
2325
2326         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2327         "Introduction", "Miscellanous Notes", "Particular Modules".
2328
2329 2006-10-21  Bruno Haible  <bruno@clisp.org>
2330
2331         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2332         Change mostlyclean-local rule to avoid sh syntax error from bash
2333         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2334
2335 2006-10-23  Jim Meyering  <jim@meyering.net>
2336
2337         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2338         in place of snprintf.
2339
2340         * modules/inttostr (Files): Add lib/uinttostr.c.
2341         * lib/uinttostr.c (inttostr): New file/function.
2342         * lib/inttostr.h (uinttostr): Declare.
2343         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2344         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2345         Add uinttostr.
2346         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2347
2348 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2349
2350         * lib/canonicalize.c (ELOOP): Define if not already defined.
2351         Problem reported by Bruno Haible in
2352         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2353
2354 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2355
2356         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2357         Problem reported by Perry Smith and Ville Laurikari.
2358
2359         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2360         uses.
2361
2362 2006-10-19  Bruno Haible  <bruno@clisp.org>
2363
2364         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2365         for mingw.
2366
2367 2006-10-19  Bruno Haible  <bruno@clisp.org>
2368
2369         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2370         Needed for mingw.
2371
2372 2006-10-19  Bruno Haible  <bruno@clisp.org>
2373
2374         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2375
2376 2006-10-19  Bruno Haible  <bruno@clisp.org>
2377
2378         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2379         it.
2380
2381 2006-10-19  Bruno Haible  <bruno@clisp.org>
2382
2383         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2384         invocation.
2385
2386 2006-10-19  Bruno Haible  <bruno@clisp.org>
2387
2388         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2389         mountlist by default.
2390
2391 2006-10-16  Bruno Haible  <bruno@clisp.org>
2392
2393         * lib/c-strstr.c: Include c-strstr.h.
2394
2395 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2396
2397         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2398         in a slash.
2399
2400 2006-10-18  Bruno Haible  <bruno@clisp.org>
2401
2402         * lib/lock.h [C++]: Wrap definitions in extern "C".
2403
2404 2006-10-18  Bruno Haible  <bruno@clisp.org>
2405
2406         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2407         gl_LIBOBJS list.
2408
2409 2006-10-18  Bruno Haible  <bruno@clisp.org>
2410
2411         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2412
2413 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2414
2415         * lib/xstrtol.h: Include gettext.h.
2416         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2417         Problem reported by Eric Blake.
2418         * modules/xstrtol (Depends-on): Add gettext-h.
2419
2420 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2421
2422         * lib/strftime.c (advance): New macro.
2423         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2424         incomplete type, so you can't add 0 to it.  Problem and patch
2425         reported by Eelco Dolstra for dietlibc.
2426
2427 2006-10-18  Jim Meyering  <jim@meyering.net>
2428
2429         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2430         type for a local, and rename it: s/up/user_proc/.
2431
2432 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2433
2434         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2435         READ_UTMP_USER_PROCESS.
2436         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2437
2438 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2439
2440         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2441         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2442
2443 2006-10-17  Eric Blake  <ebb9@byu.net>
2444
2445         * lib/sigprocmask.c (sigprocmask): Fix typo.
2446
2447         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2448
2449         * modules/clean-temp (Makefile.am): Don't add to make output...
2450         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2451         config.h.
2452
2453 2006-10-17  Bruno Haible  <bruno@clisp.org>
2454
2455         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2456         differently if DEFAULT_TEXT_DOMAIN is set.
2457
2458 2006-10-16  Bruno Haible  <bruno@clisp.org>
2459
2460         * lib/clean-temp.c: Include fwriteerror.h.
2461
2462 2006-10-16  Bruno Haible  <bruno@clisp.org>
2463
2464         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2465
2466 2006-10-16  Bruno Haible  <bruno@clisp.org>
2467
2468         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2469         * lib/sigprocmask.h: Include <sys/types.h>.
2470         (sigset_t): Use the system's definition if present.
2471
2472 2006-10-17  Eric Blake  <ebb9@byu.net>
2473
2474         * lib/xvasprintf.c (includes): Assume config.h.
2475         * lib/xasprintf.c (includes): Likewise.
2476
2477 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2478
2479         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2480         at least as wide as intmax_t.
2481
2482 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2483
2484         (Imported from Automake.)
2485         * build-aux/gnupload: Update to version 1.1 of directive file.
2486
2487 2006-10-16  Eric Blake  <ebb9@byu.net>
2488
2489         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2490         match Automake 1.10a.
2491
2492 2006-10-14  Bruno Haible  <bruno@clisp.org>
2493
2494         * modules/sigprocmask: New file.
2495         * lib/sigprocmask.h: New file.
2496         * lib/sigprocmask.c: New file.
2497         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2498         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2499         request sigprocmask.o.
2500         (gl_PREREQ_SIGPROCMASK): New macro.
2501         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2502         (Depends-on): Add sigprocmask.
2503         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2504         gt_SIGNALBLOCKING. Test for 'raise' only once.
2505         * lib/fatal-signal.c: Include sigprocmask.h.
2506         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
2507         unblock_fatal_signals): Define always.
2508         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2509         sigprocmask.
2510
2511 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
2512
2513         Sync from Automake.
2514         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
2515         which incorrectly sets the mode of an existing destination
2516         directory.  In some cases the unpatched install-sh could do the
2517         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
2518         system.  We hope this is rare in practice, but it's clearly worth
2519         fixing.  Problem reported by Alex Unleashed in
2520         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
2521         Also, don't bother to check for -m bugs unless we're using -m;
2522         suggested by Stepan Kasal.
2523
2524 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2525
2526         Sync from Automake.
2527         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
2528         `-c' flag, so they appear at the same position as in %FASTDEP%
2529         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
2530         which ignores unknown options only after the first non-option.
2531         Bug report against M4 by Nelson H. F. Beebe.
2532
2533 2006-10-13  Jim Meyering  <jim@meyering.net>
2534
2535         Fix a bug in yesterday's change.
2536         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
2537         p->fts_statp->st_dev would be used uninitialized.
2538         Ensures that we always call fts_stat on the very first entry.
2539         Miklos Szeredi reported that find -xdev stopped working.
2540
2541 2006-10-12  Bruno Haible  <bruno@clisp.org>
2542
2543         * gnulib-tool (func_get_automake_snippet): Append an automatically
2544         computed EXTRA_DIST augmentation.
2545         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
2546         * modules/alloca-opt (Makefile.am): Likewise.
2547         * modules/allocsa (Makefile.am): Likewise.
2548         * modules/arcfour (Makefile.am): Likewise.
2549         * modules/arctwo (Makefile.am): Likewise.
2550         * modules/argmatch (Makefile.am): Likewise.
2551         * modules/argz (Makefile.am): Likewise.
2552         * modules/atexit (Makefile.am): Likewise.
2553         * modules/backupfile (Makefile.am): Likewise.
2554         * modules/byteswap (Makefile.am): Likewise.
2555         * modules/c-strtod (Makefile.am): Likewise.
2556         * modules/c-strtold (Makefile.am): Likewise.
2557         * modules/calloc (Makefile.am): Likewise.
2558         * modules/canon-host (Makefile.am): Likewise.
2559         * modules/canonicalize (Makefile.am): Likewise.
2560         * modules/chdir-long (Makefile.am): Likewise.
2561         * modules/chdir-safer (Makefile.am): Likewise.
2562         * modules/check-version (Makefile.am): Likewise.
2563         * modules/chown (Makefile.am): Likewise.
2564         * modules/cloexec (Makefile.am): Likewise.
2565         * modules/close-stream (Makefile.am): Likewise.
2566         * modules/closeout (Makefile.am): Likewise.
2567         * modules/crc (Makefile.am): Likewise.
2568         * modules/csharpexec (Makefile.am): Likewise.
2569         * modules/cycle-check (Makefile.am): Likewise.
2570         * modules/des (Makefile.am): Likewise.
2571         * modules/dev-ino (Makefile.am): Likewise.
2572         * modules/dirfd (Makefile.am): Likewise.
2573         * modules/dirname (Makefile.am): Likewise.
2574         * modules/dup2 (Makefile.am): Likewise.
2575         * modules/eealloc (Makefile.am): Likewise.
2576         * modules/error (Makefile.am): Likewise.
2577         * modules/euidaccess (Makefile.am): Likewise.
2578         * modules/exclude (Makefile.am): Likewise.
2579         * modules/exitfail (Makefile.am): Likewise.
2580         * modules/fcntl-safer (Makefile.am): Likewise.
2581         * modules/fcntl (Makefile.am): Likewise.
2582         * modules/file-type (Makefile.am): Likewise.
2583         * modules/fileblocks (Makefile.am): Likewise.
2584         * modules/filemode (Makefile.am): Likewise.
2585         * modules/filenamecat (Makefile.am): Likewise.
2586         * modules/fnmatch (Makefile.am): Likewise.
2587         * modules/fopen-safer (Makefile.am): Likewise.
2588         * modules/fpending (Makefile.am): Likewise.
2589         * modules/fprintftime (Makefile.am): Likewise.
2590         * modules/free (Makefile.am): Likewise.
2591         * modules/fsusage (Makefile.am): Likewise.
2592         * modules/ftruncate (Makefile.am): Likewise.
2593         * modules/fts (Makefile.am): Likewise.
2594         * modules/gc-arcfour (Makefile.am): Likewise.
2595         * modules/gc-des (Makefile.am): Likewise.
2596         * modules/gc-hmac-md5 (Makefile.am): Likewise.
2597         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
2598         * modules/gc-md4 (Makefile.am): Likewise.
2599         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2600         * modules/gc-sha1 (Makefile.am): Likewise.
2601         * modules/gc (Makefile.am): Likewise.
2602         * modules/getaddrinfo (Makefile.am): Likewise.
2603         * modules/getcwd (Makefile.am): Likewise.
2604         * modules/getdelim (Makefile.am): Likewise.
2605         * modules/getdomainname (Makefile.am): Likewise.
2606         * modules/getgroups (Makefile.am): Likewise.
2607         * modules/gethostname (Makefile.am): Likewise.
2608         * modules/gethrxtime (Makefile.am): Likewise.
2609         * modules/getline (Makefile.am): Likewise.
2610         * modules/getloadavg (Makefile.am): Likewise.
2611         * modules/getlogin_r (Makefile.am): Likewise.
2612         * modules/getndelim2 (Makefile.am): Likewise.
2613         * modules/getopt (Makefile.am): Likewise.
2614         * modules/getpagesize (Makefile.am): Likewise.
2615         * modules/getpass-gnu (Makefile.am): Likewise.
2616         * modules/getpass (Makefile.am): Likewise.
2617         * modules/getsubopt (Makefile.am): Likewise.
2618         * modules/gettime (Makefile.am): Likewise.
2619         * modules/gettimeofday (Makefile.am): Likewise.
2620         * modules/getugroups (Makefile.am): Likewise.
2621         * modules/getusershell (Makefile.am): Likewise.
2622         * modules/glob (Makefile.am): Likewise.
2623         * modules/group-member (Makefile.am): Likewise.
2624         * modules/hard-locale (Makefile.am): Likewise.
2625         * modules/hash (Makefile.am): Likewise.
2626         * modules/hmac-md5 (Makefile.am): Likewise.
2627         * modules/hmac-sha1 (Makefile.am): Likewise.
2628         * modules/human (Makefile.am): Likewise.
2629         * modules/idcache (Makefile.am): Likewise.
2630         * modules/imaxabs (Makefile.am): Likewise.
2631         * modules/imaxdiv (Makefile.am): Likewise.
2632         * modules/inet_ntop (Makefile.am): Likewise.
2633         * modules/inet_pton (Makefile.am): Likewise.
2634         * modules/intprops (Makefile.am): Likewise.
2635         * modules/inttostr (Makefile.am): Likewise.
2636         * modules/inttypes (Makefile.am): Likewise.
2637         * modules/isapipe (Makefile.am): Likewise.
2638         * modules/javaversion (Makefile.am): Likewise.
2639         * modules/lchmod (Makefile.am): Likewise.
2640         * modules/lchown (Makefile.am): Likewise.
2641         * modules/localcharset (Makefile.am): Likewise.
2642         * modules/long-options (Makefile.am): Likewise.
2643         * modules/lstat (Makefile.am): Likewise.
2644         * modules/malloc (Makefile.am): Likewise.
2645         * modules/mathl (Makefile.am): Likewise.
2646         * modules/mbchar (Makefile.am): Likewise.
2647         * modules/md2 (Makefile.am): Likewise.
2648         * modules/md4 (Makefile.am): Likewise.
2649         * modules/md5 (Makefile.am): Likewise.
2650         * modules/memcasecmp (Makefile.am): Likewise.
2651         * modules/memchr (Makefile.am): Likewise.
2652         * modules/memcmp (Makefile.am): Likewise.
2653         * modules/memcoll (Makefile.am): Likewise.
2654         * modules/memcpy (Makefile.am): Likewise.
2655         * modules/memmem (Makefile.am): Likewise.
2656         * modules/memmove (Makefile.am): Likewise.
2657         * modules/mempcpy (Makefile.am): Likewise.
2658         * modules/memrchr (Makefile.am): Likewise.
2659         * modules/memset (Makefile.am): Likewise.
2660         * modules/memxor (Makefile.am): Likewise.
2661         * modules/mkancesdirs (Makefile.am): Likewise.
2662         * modules/mkdir-p (Makefile.am): Likewise.
2663         * modules/mkdir (Makefile.am): Likewise.
2664         * modules/mkdtemp (Makefile.am): Likewise.
2665         * modules/mkstemp (Makefile.am): Likewise.
2666         * modules/mktime (Makefile.am): Likewise.
2667         * modules/modechange (Makefile.am): Likewise.
2668         * modules/mountlist (Makefile.am): Likewise.
2669         * modules/nanosleep (Makefile.am): Likewise.
2670         * modules/obstack (Makefile.am): Likewise.
2671         * modules/openat (Makefile.am): Likewise.
2672         * modules/pagealign_alloc (Makefile.am): Likewise.
2673         * modules/pathmax (Makefile.am): Likewise.
2674         * modules/physmem (Makefile.am): Likewise.
2675         * modules/poll (Makefile.am): Likewise.
2676         * modules/posixtm (Makefile.am): Likewise.
2677         * modules/posixver (Makefile.am): Likewise.
2678         * modules/putenv (Makefile.am): Likewise.
2679         * modules/quote (Makefile.am): Likewise.
2680         * modules/quotearg (Makefile.am): Likewise.
2681         * modules/raise (Makefile.am): Likewise.
2682         * modules/read-file (Makefile.am): Likewise.
2683         * modules/readline (Makefile.am): Likewise.
2684         * modules/readlink (Makefile.am): Likewise.
2685         * modules/readtokens (Makefile.am): Likewise.
2686         * modules/readutmp (Makefile.am): Likewise.
2687         * modules/realloc (Makefile.am): Likewise.
2688         * modules/regex (Makefile.am): Likewise.
2689         * modules/rename-dest-slash (Makefile.am): Likewise.
2690         * modules/rename (Makefile.am): Likewise.
2691         * modules/rijndael (Makefile.am): Likewise.
2692         * modules/rmdir (Makefile.am): Likewise.
2693         * modules/rpmatch (Makefile.am): Likewise.
2694         * modules/safe-read (Makefile.am): Likewise.
2695         * modules/safe-write (Makefile.am): Likewise.
2696         * modules/same-inode (Makefile.am): Likewise.
2697         * modules/same (Makefile.am): Likewise.
2698         * modules/save-cwd (Makefile.am): Likewise.
2699         * modules/savedir (Makefile.am): Likewise.
2700         * modules/setenv (Makefile.am): Likewise.
2701         * modules/settime (Makefile.am): Likewise.
2702         * modules/sha1 (Makefile.am): Likewise.
2703         * modules/sig2str (Makefile.am): Likewise.
2704         * modules/snprintf (Makefile.am): Likewise.
2705         * modules/stat-macros (Makefile.am): Likewise.
2706         * modules/stat-time (Makefile.am): Likewise.
2707         * modules/stdbool (Makefile.am): Likewise.
2708         * modules/stdint (Makefile.am): Likewise.
2709         * modules/stdlib-safer (Makefile.am): Likewise.
2710         * modules/stpcpy (Makefile.am): Likewise.
2711         * modules/stpncpy (Makefile.am): Likewise.
2712         * modules/strcase (Makefile.am): Likewise.
2713         * modules/strcasestr (Makefile.am): Likewise.
2714         * modules/strchrnul (Makefile.am): Likewise.
2715         * modules/strcspn (Makefile.am): Likewise.
2716         * modules/strdup (Makefile.am): Likewise.
2717         * modules/strerror (Makefile.am): Likewise.
2718         * modules/strftime (Makefile.am): Likewise.
2719         * modules/strndup (Makefile.am): Likewise.
2720         * modules/strnlen (Makefile.am): Likewise.
2721         * modules/strpbrk (Makefile.am): Likewise.
2722         * modules/strsep (Makefile.am): Likewise.
2723         * modules/strstr (Makefile.am): Likewise.
2724         * modules/strtod (Makefile.am): Likewise.
2725         * modules/strtoimax (Makefile.am): Likewise.
2726         * modules/strtok_r (Makefile.am): Likewise.
2727         * modules/strtol (Makefile.am): Likewise.
2728         * modules/strtoll (Makefile.am): Likewise.
2729         * modules/strtoul (Makefile.am): Likewise.
2730         * modules/strtoull (Makefile.am): Likewise.
2731         * modules/strtoumax (Makefile.am): Likewise.
2732         * modules/strverscmp (Makefile.am): Likewise.
2733         * modules/sys_socket (Makefile.am): Likewise.
2734         * modules/sys_stat (Makefile.am): Likewise.
2735         * modules/sysexits (Makefile.am): Likewise.
2736         * modules/time_r (Makefile.am): Likewise.
2737         * modules/timegm (Makefile.am): Likewise.
2738         * modules/timespec (Makefile.am): Likewise.
2739         * modules/tmpfile-safer (Makefile.am): Likewise.
2740         * modules/trim (Makefile.am): Likewise.
2741         * modules/unistd-safer (Makefile.am): Likewise.
2742         * modules/unlinkdir (Makefile.am): Likewise.
2743         * modules/unlocked-io (Makefile.am): Likewise.
2744         * modules/userspec (Makefile.am): Likewise.
2745         * modules/utime (Makefile.am): Likewise.
2746         * modules/utimecmp (Makefile.am): Likewise.
2747         * modules/utimens (Makefile.am): Likewise.
2748         * modules/vasnprintf (Makefile.am): Likewise.
2749         * modules/vasprintf (Makefile.am): Likewise.
2750         * modules/vsnprintf (Makefile.am): Likewise.
2751         * modules/xalloc (Makefile.am): Likewise.
2752         * modules/xgetcwd (Makefile.am): Likewise.
2753         * modules/xnanosleep (Makefile.am): Likewise.
2754         * modules/xreadlink (Makefile.am): Likewise.
2755         * modules/xstrtod (Makefile.am): Likewise.
2756         * modules/xstrtol (Makefile.am): Likewise.
2757         * modules/xstrtold (Makefile.am): Likewise.
2758         * modules/yesno (Makefile.am): Likewise.
2759         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
2760
2761 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
2762
2763         * modules/error (Makefile.am): Distribute files through
2764         EXTRA_DIST, not lib_SOURCES.
2765
2766 2006-10-12  Eric Blake  <ebb9@byu.net>
2767
2768         * modules/error (Makefile.am): Distribute files in /lib.
2769         * modules/obstack (Makefile.am): Likewise.
2770
2771 2006-10-12  Bruno Haible  <bruno@clisp.org>
2772
2773         * modules/acl (Makefile.am): Distribute all files in lib/ through
2774         EXTRA_DIST.
2775         * modules/arcfour (Makefile.am): Likewise.
2776         * modules/arctwo (Makefile.am): Likewise.
2777         * modules/argmatch (Makefile.am): Likewise.
2778         * modules/argz (Makefile.am): Likewise.
2779         * modules/atexit (Makefile.am): Likewise.
2780         * modules/backupfile (Makefile.am): Likewise.
2781         * modules/c-strtod (Makefile.am): Likewise.
2782         * modules/c-strtold (Makefile.am): Likewise.
2783         * modules/calloc (Makefile.am): Likewise.
2784         * modules/canon-host (Makefile.am): Likewise.
2785         * modules/canonicalize (Makefile.am): Likewise.
2786         * modules/chdir-long (Makefile.am): Likewise.
2787         * modules/chdir-safer (Makefile.am): Likewise.
2788         * modules/check-version (Makefile.am): Likewise.
2789         * modules/chown (Makefile.am): Likewise.
2790         * modules/cloexec (Makefile.am): Likewise.
2791         * modules/close-stream (Makefile.am): Likewise.
2792         * modules/closeout (Makefile.am): Likewise.
2793         * modules/crc (Makefile.am): Likewise.
2794         * modules/cycle-check (Makefile.am): Likewise.
2795         * modules/des (Makefile.am): Likewise.
2796         * modules/dirfd (Makefile.am): Likewise.
2797         * modules/dirname (Makefile.am): Likewise.
2798         * modules/dup2 (Makefile.am): Likewise.
2799         * modules/euidaccess (Makefile.am): Likewise.
2800         * modules/exclude (Makefile.am): Likewise.
2801         * modules/exitfail (Makefile.am): Likewise.
2802         * modules/fcntl-safer (Makefile.am): Likewise.
2803         * modules/file-type (Makefile.am): Likewise.
2804         * modules/fileblocks (Makefile.am): Likewise.
2805         * modules/filemode (Makefile.am): Likewise.
2806         * modules/filenamecat (Makefile.am): Likewise.
2807         * modules/fnmatch (Makefile.am): Likewise.
2808         * modules/fopen-safer (Makefile.am): Likewise.
2809         * modules/fpending (Makefile.am): Likewise.
2810         * modules/fprintftime (Makefile.am): Likewise.
2811         * modules/free (Makefile.am): Likewise.
2812         * modules/fsusage (Makefile.am): Likewise.
2813         * modules/ftruncate (Makefile.am): Likewise.
2814         * modules/fts (Makefile.am): Likewise.
2815         * modules/gc (Makefile.am): Likewise.
2816         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
2817         * modules/getaddrinfo (Makefile.am): Likewise.
2818         * modules/getcwd (Makefile.am): Likewise.
2819         * modules/getdelim (Makefile.am): Likewise.
2820         * modules/getdomainname (Makefile.am): Likewise.
2821         * modules/getgroups (Makefile.am): Likewise.
2822         * modules/gethostname (Makefile.am): Likewise.
2823         * modules/gethrxtime (Makefile.am): Likewise.
2824         * modules/getline (Makefile.am): Likewise.
2825         * modules/getloadavg (Makefile.am): Likewise.
2826         * modules/getlogin_r (Makefile.am): Likewise.
2827         * modules/getopt (Makefile.am): Likewise.
2828         * modules/getpass (Makefile.am): Likewise.
2829         * modules/getpass-gnu (Makefile.am): Likewise.
2830         * modules/getsubopt (Makefile.am): Likewise.
2831         * modules/gettime (Makefile.am): Likewise.
2832         * modules/gettimeofday (Makefile.am): Likewise.
2833         * modules/getugroups (Makefile.am): Likewise.
2834         * modules/getusershell (Makefile.am): Likewise.
2835         * modules/glob (Makefile.am): Likewise.
2836         * modules/group-member (Makefile.am): Likewise.
2837         * modules/hard-locale (Makefile.am): Likewise.
2838         * modules/hash (Makefile.am): Likewise.
2839         * modules/hmac-md5 (Makefile.am): Likewise.
2840         * modules/hmac-sha1 (Makefile.am): Likewise.
2841         * modules/human (Makefile.am): Likewise.
2842         * modules/idcache (Makefile.am): Likewise.
2843         * modules/imaxabs (Makefile.am): Likewise.
2844         * modules/imaxdiv (Makefile.am): Likewise.
2845         * modules/inet_ntop (Makefile.am): Likewise.
2846         * modules/inet_pton (Makefile.am): Likewise.
2847         * modules/inttostr (Makefile.am): Likewise.
2848         * modules/isapipe (Makefile.am): Likewise.
2849         * modules/lchown (Makefile.am): Likewise.
2850         * modules/long-options (Makefile.am): Likewise.
2851         * modules/lstat (Makefile.am): Likewise.
2852         * modules/malloc (Makefile.am): Likewise.
2853         * modules/mathl (Makefile.am): Likewise.
2854         * modules/mbchar (Makefile.am): Likewise.
2855         * modules/md2 (Makefile.am): Likewise.
2856         * modules/md4 (Makefile.am): Likewise.
2857         * modules/md5 (Makefile.am): Likewise.
2858         * modules/memcasecmp (Makefile.am): Likewise.
2859         * modules/memchr (Makefile.am): Likewise.
2860         * modules/memcmp (Makefile.am): Likewise.
2861         * modules/memcoll (Makefile.am): Likewise.
2862         * modules/memcpy (Makefile.am): Likewise.
2863         * modules/memmem (Makefile.am): Likewise.
2864         * modules/memmove (Makefile.am): Likewise.
2865         * modules/mempcpy (Makefile.am): Likewise.
2866         * modules/memrchr (Makefile.am): Likewise.
2867         * modules/memset (Makefile.am): Likewise.
2868         * modules/memxor (Makefile.am): Likewise.
2869         * modules/mkancesdirs (Makefile.am): Likewise.
2870         * modules/mkdir (Makefile.am): Likewise.
2871         * modules/mkdir-p (Makefile.am): Likewise.
2872         * modules/mkdtemp (Makefile.am): Likewise.
2873         * modules/mkstemp (Makefile.am): Likewise.
2874         * modules/mktime (Makefile.am): Likewise.
2875         * modules/modechange (Makefile.am): Likewise.
2876         * modules/mountlist (Makefile.am): Likewise.
2877         * modules/nanosleep (Makefile.am): Likewise.
2878         * modules/openat (Makefile.am): Likewise.
2879         * modules/pagealign_alloc (Makefile.am): Likewise.
2880         * modules/physmem (Makefile.am): Likewise.
2881         * modules/poll (Makefile.am): Likewise.
2882         * modules/posixtm (Makefile.am): Likewise.
2883         * modules/posixver (Makefile.am): Likewise.
2884         * modules/putenv (Makefile.am): Likewise.
2885         * modules/quote (Makefile.am): Likewise.
2886         * modules/quotearg (Makefile.am): Likewise.
2887         * modules/raise (Makefile.am): Likewise.
2888         * modules/read-file (Makefile.am): Likewise.
2889         * modules/readline (Makefile.am): Likewise.
2890         * modules/readlink (Makefile.am): Likewise.
2891         * modules/readtokens (Makefile.am): Likewise.
2892         * modules/readutmp (Makefile.am): Likewise.
2893         * modules/realloc (Makefile.am): Likewise.
2894         * modules/regex (Makefile.am): Likewise.
2895         * modules/rename (Makefile.am): Likewise.
2896         * modules/rename-dest-slash (Makefile.am): Likewise.
2897         * modules/rijndael (Makefile.am): Likewise.
2898         * modules/rmdir (Makefile.am): Likewise.
2899         * modules/rpmatch (Makefile.am): Likewise.
2900         * modules/safe-read (Makefile.am): Likewise.
2901         * modules/safe-write (Makefile.am): Likewise.
2902         * modules/same (Makefile.am): Likewise.
2903         * modules/save-cwd (Makefile.am): Likewise.
2904         * modules/savedir (Makefile.am): Likewise.
2905         * modules/setenv (Makefile.am): Likewise.
2906         * modules/settime (Makefile.am): Likewise.
2907         * modules/sha1 (Makefile.am): Likewise.
2908         * modules/sig2str (Makefile.am): Likewise.
2909         * modules/snprintf (Makefile.am): Likewise.
2910         * modules/stdlib-safer (Makefile.am): Likewise.
2911         * modules/stpcpy (Makefile.am): Likewise.
2912         * modules/stpncpy (Makefile.am): Likewise.
2913         * modules/strcase (Makefile.am): Likewise.
2914         * modules/strcasestr (Makefile.am): Likewise.
2915         * modules/strchrnul (Makefile.am): Likewise.
2916         * modules/strcspn (Makefile.am): Likewise.
2917         * modules/strdup (Makefile.am): Likewise.
2918         * modules/strerror (Makefile.am): Likewise.
2919         * modules/strftime (Makefile.am): Likewise.
2920         * modules/strndup (Makefile.am): Likewise.
2921         * modules/strnlen (Makefile.am): Likewise.
2922         * modules/strpbrk (Makefile.am): Likewise.
2923         * modules/strsep (Makefile.am): Likewise.
2924         * modules/strstr (Makefile.am): Likewise.
2925         * modules/strtod (Makefile.am): Likewise.
2926         * modules/strtoimax (Makefile.am): Likewise.
2927         * modules/strtok_r (Makefile.am): Likewise.
2928         * modules/strtol (Makefile.am): Likewise.
2929         * modules/strtoll (Makefile.am): Likewise.
2930         * modules/strtoul (Makefile.am): Likewise.
2931         * modules/strtoull (Makefile.am): Likewise.
2932         * modules/strtoumax (Makefile.am): Likewise.
2933         * modules/strverscmp (Makefile.am): Likewise.
2934         * modules/time_r (Makefile.am): Likewise.
2935         * modules/timegm (Makefile.am): Likewise.
2936         * modules/tmpfile-safer (Makefile.am): Likewise.
2937         * modules/unistd-safer (Makefile.am): Likewise.
2938         * modules/unlinkdir (Makefile.am): Likewise.
2939         * modules/userspec (Makefile.am): Likewise.
2940         * modules/utime (Makefile.am): Likewise.
2941         * modules/utimecmp (Makefile.am): Likewise.
2942         * modules/utimens (Makefile.am): Likewise.
2943         * modules/vasnprintf (Makefile.am): Likewise.
2944         * modules/vasprintf (Makefile.am): Likewise.
2945         * modules/vsnprintf (Makefile.am): Likewise.
2946         * modules/xalloc (Makefile.am): Likewise.
2947         * modules/xgetcwd (Makefile.am): Likewise.
2948         * modules/xnanosleep (Makefile.am): Likewise.
2949         * modules/xreadlink (Makefile.am): Likewise.
2950         * modules/xstrtod (Makefile.am): Likewise.
2951         * modules/xstrtol (Makefile.am): Likewise.
2952         * modules/xstrtold (Makefile.am): Likewise.
2953         * modules/yesno (Makefile.am): Likewise.
2954
2955 2006-10-12  Jim Meyering  <jim@meyering.net>
2956
2957         * m4/getloadavg.m4: Revert the change below.
2958
2959         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
2960         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
2961         fail with a symlink, which is what coreutils' ./bootstrap now
2962         creates by default.
2963
2964 2006-10-12  Bruno Haible  <bruno@clisp.org>
2965
2966         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
2967         mingw.
2968         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
2969         MSVC and mingw explicitly.
2970
2971 2006-10-11  Simon Josefsson  <jas@extundo.com>
2972             Bruno Haible  <bruno@clisp.org>
2973
2974         Add support for multiple gnulib-tool invocations in the scope of a
2975         single configure.ac file.
2976         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
2977         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
2978         with the same contents as the _LIBADD variable.
2979         (func_emit_initmacro_start, func_emit_initmacro_end,
2980         func_emit_initmacro_done): New functions.
2981         (func_import, func_create_testdir): Invoke them. Allow the identifiers
2982         gl_LIBOBJS and gl_LTLIBOBJS.
2983
2984 2006-10-11  Bruno Haible  <bruno@clisp.org>
2985
2986         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
2987         (func_create_testdir): Don't create po/Makefile.am, don't invoke
2988         autoreconf. Instead, invoke autopoint explicitly but move back the
2989         *.m4 files from gnulib.
2990
2991 2006-10-11  Bruno Haible  <bruno@clisp.org>
2992
2993         * gnulib-tool (func_usage): Make module names after --create-testdir
2994         optional.
2995         (func_create_testdir): If no module was specified, use nearly all
2996         modules.
2997
2998 2006-10-12  Jim Meyering  <jim@meyering.net>
2999
3000         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3001         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3002         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3003         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3004         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3005         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3006         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3007         (fts_set_stat_required): New function.
3008         (fts_open): Defer the calls to fts_stat, if possible or requested.
3009         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3010         into fts_stat itself.
3011         (fts_read): Perform any required (deferred) fts_stat call.
3012         (fts_build): Likewise, for the directory we're about to open and read.
3013         In the readdir loop, carefully decide whether each entry will require
3014         an eventual call to fts_stat, using dirent.d_type info if available.
3015         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3016         a command line argument into this function.  Update all callers.
3017         Map a return value of FTS_DOT to FTS_D for a command line argument.
3018         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3019         Thanks to Miklos Szeredi for his tenacity and for the initial
3020         bug report about "find" failing on a FUSE-based file system.
3021
3022         * lib/fts.c (fts_open): Use consistent indentation.
3023
3024 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3025
3026         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3027         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3028         reported by Jim Meyering.  All uses of cache variables renamed
3029         to match Autoconf's.
3030         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3031         the other one.
3032
3033         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3034         Fix misspelling in diagnostic.
3035
3036 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3037
3038         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3039         defined.  Problem reported by Matthew Woehlke.
3040
3041         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3042         Add support for Tandem NonStop R series.
3043         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3044         Use new macro.
3045
3046         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3047         (has_trailing_slash): Omit size arg; all callers changed.
3048         Omit 'inline', since it doesn't help performance and we'd
3049         need to configure it.
3050         Don't count //, ///, etc. as having a trailing slash.
3051         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3052         (rpl_rename_dest_slash): On failure, use rename's errno rather
3053         than (in some cases) an incorrect or junk errno.
3054         Simplify code by removing need to compute length; this does
3055         cause it to make two passes instead of one over the file name,
3056         but it's worth it.
3057
3058         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3059         change, since Autoconf's version may no longer be appropriate now
3060         that we are using CVS Autoconf's version.  Add support for Tandem.
3061
3062 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3063             Bruno Haible  <bruno@clisp.org>
3064
3065         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3066         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3067         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3068         gl_AC_TYPE_LONG_LONG.
3069
3070         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3071         instead of HAVE_LONG_LONG.
3072         * lib/printf-args.c (printf_fetchargs): Likewise.
3073         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3074         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3075         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3076         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3077         gl_AC_TYPE_LONG_LONG.
3078
3079 2006-10-11  Bruno Haible  <bruno@clisp.org>
3080
3081         * m4/longlong.m4: Add comments.
3082         * m4/ulonglong.m4: Likewise.
3083
3084 2006-10-10  Bruno Haible  <bruno@clisp.org>
3085
3086         Make it possible to #define stpcpy, strdup to aliases.
3087         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3088         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3089
3090 2006-10-10  Bruno Haible  <bruno@clisp.org>
3091
3092         Make it possible to #define gcd to an alias.
3093         * lib/gcd.c: Include config.h.
3094
3095 2006-10-10  Bruno Haible  <bruno@clisp.org>
3096
3097         Make it possible to #define c_isascii to an alias.
3098         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3099         defined. Undefine the macros before defining them, to avoid gcc
3100         warnings.
3101         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3102         define NO_C_CTYPE_MACROS early.
3103
3104 2006-10-10  Bruno Haible  <bruno@clisp.org>
3105
3106         Make it possible to #define set_program_name to an alias.
3107         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3108         ENABLE_RELOCATABLE early.
3109
3110 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3111
3112         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3113         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3114         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3115         More generally, don't assume that 64-bit signed int is available
3116         if unsigned int is, and vice versa.
3117         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3118         unsigned symbols, not on their signed counterparts.
3119         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3120         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3121         (UINT64_C, UINTMAX_C):
3122         Likewise.
3123         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3124         unsigned counterparts.
3125         (Have_long_long, Unsigned): New macros.
3126         (Int): Renamed from INT.
3127         (strtoimax): Use the new macros.
3128         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3129         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3130         * modules/inttypes (inttypes.h): Substitute
3131         HAVE_UNSIGNED_LONG_LONG_INT.
3132         * modules/stdint (stdint.h): Likewise.
3133         (Files): Add m4/ulonglong.m4.
3134
3135 2006-10-10  Bruno Haible  <bruno@clisp.org>
3136
3137         Fix a gcc -Wshadow warning.
3138         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3139         to 'bucket'.
3140         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3141         gl_linked_indexof_from_to): Likewise.
3142         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3143         Likewise.
3144         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3145         Likewise.
3146         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3147         Reported by Eric Blake.
3148
3149 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3150
3151         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3152         for NetBSD.  Problem reported by Bruno Haible.
3153
3154 2006-10-09  Jim Meyering  <jim@meyering.net>
3155
3156         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3157         Patch from Bruno Haible.
3158
3159 2006-10-09  Jim Meyering  <jim@meyering.net>
3160
3161         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3162         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3163         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3164
3165 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3166
3167         Don't include <config.h> twice; this doesn't work in some cases,
3168         e.g., when config.h has "#define intmax_t long long int" and
3169         we include <config.h>, <inttypes.h>, <config.h> in that order.
3170         Problem reported by Matthew Woehlke in:
3171         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3172         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3173         * lib/fts-cycle.c: Don't include config.h.
3174         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3175         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3176         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3177         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3178         inttypes.h.
3179         * lib/xstrtoumax.c: Likewise.
3180         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3181         __strtol and the like, so that this module is more like its siblings.
3182         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3183         Remove; no longer needed now that we assume gnulib inttypes.h.
3184
3185 2006-10-08  Bruno Haible  <bruno@clisp.org>
3186
3187         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3188         option.
3189
3190 2006-10-07  Jim Meyering  <jim@meyering.net>
3191
3192         * modules/inttypes (inttypes.h): Revert what seems to have been
3193         an inadvertent part of today's change: use "|", not "/" in the
3194         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3195
3196 2006-10-07  Bruno Haible  <bruno@clisp.org>
3197
3198         * modules/sublist: New file.
3199
3200 2006-10-07  Bruno Haible  <bruno@clisp.org>
3201
3202         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3203         * modules/argz (argz.h): Likewise.
3204         * modules/arpa_inet (arpa/inet.h): Likewise.
3205         * modules/byteswap (byteswap.h): Likewise.
3206         * modules/configmake (configmake.h): Likewise.
3207         * modules/fcntl (fcntl.h): Likewise.
3208         * modules/fnmatch (fnmatch.h): Likewise.
3209         * modules/getopt (getopt.h): Likewise.
3210         * modules/glob (glob.h): Likewise.
3211         * modules/inttypes (inttypes.h): Likewise.
3212         * modules/netinet_in (netinet/in.h): Likewise.
3213         * modules/poll (poll.h): Likewise.
3214         * modules/stdbool (stdbool.h): Likewise.
3215         * modules/stdint (stdint.h): Likewise.
3216         * modules/sys_select (sys/select.h): Likewise.
3217         * modules/sys_socket (sys/socket.h): Likewise.
3218         * modules/sys_stat (sys/stat.h): Likewise.
3219         * modules/sysexits (sysexits.h): Likewise.
3220         * modules/unistd (unistd.h): Likewise.
3221         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3222         Add a "DO NOT EDIT" comment to the generated file.
3223         (func_import): Likewise for gnulib-comp.m4.
3224
3225 2006-10-07  Bruno Haible  <bruno@clisp.org>
3226
3227         * lib/gl_sublist.h: New file.
3228         * lib/gl_sublist.c: New file.
3229
3230 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3231
3232         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3233         name (relative to the original working directory) and the file
3234         name component (relative to the temporary working directory).  All
3235         callers changed.
3236         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3237         * lib/mkdir-p.c (make_dir_parents): Likewise.
3238         * lib/mkdir-p.h (make_dir_parents): Likewise.
3239
3240 2006-10-06  Eric Blake  <ebb9@byu.net>
3241
3242         Define several macros for use by the clean-temp module.
3243         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3244         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3245         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3246
3247         * lib/clean-temp.h (close_stream_temp): New declaration.
3248         * lib/clean-temp.c (includes): Pull in headers according to what
3249         other modules are in use.
3250         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3251
3252 2006-10-06  Bruno Haible  <bruno@clisp.org>
3253
3254         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3255         instead of fopen, fwriteerror.
3256
3257 2006-10-06  Bruno Haible  <bruno@clisp.org>
3258
3259         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3260         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3261         int.
3262         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3263         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3264         Return an error indicator.
3265         Suggested by Eric Blake.
3266
3267 2006-10-06  Bruno Haible  <bruno@clisp.org>
3268
3269         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3270         Reported by Eric Blake.
3271
3272 2006-10-06  Bruno Haible  <bruno@clisp.org>
3273
3274         * modules/closeout (Description): Mention stderr too.
3275
3276 2006-10-06  Bruno Haible  <bruno@clisp.org>
3277         and Paul Eggert  <eggert@cs.ucla.edu>
3278
3279         * lib/closeout.c (close_stdout): Also close stderr.
3280         * lib/closeout.h: Update comment.
3281
3282 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3283
3284         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3285         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3286         * lib/dirchownmod.c: Include lchown.h.
3287         * lib/lchown.c: Don't include files that lchown.h now includes.
3288         Don't declare chown, since lchown.h now does that.
3289         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3290         (lchown): Define to rpl_chown if lchown is declared but
3291         does not exist.  Declare using a prototype if lchown is not
3292         declared.  Add a copyright notice.
3293         * lib/mkstemp.h: Include <unistd.h>.
3294         * lib/openat.c: Include lchown.h.
3295
3296         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3297         we now test for that separately.
3298         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3299         rather than O_NOFOLLOW, when testing whether it's possible to
3300         avoid a race condition reliably.
3301         * lib/savewd.c (savewd_chdir): Likewise.
3302
3303         Remove macros that are no longer needed now that stdint.h is
3304         reliable.
3305         * lib/fsusage.c (UINTMAX_MAX): Remove.
3306         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3307         * lib/utimecmp.c (SIZE_MAX): Remove.
3308
3309         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3310
3311         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3312         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3313         O_NOATIME works.
3314
3315 2006-10-05  Bruno Haible  <bruno@clisp.org>
3316
3317         * lib/gl_list.h (gl_sortedlist_search_from_to,
3318         gl_sortedlist_indexof_from_to): New declarations.
3319         (gl_list_implementation): New fields sortedlist_search_from_to,
3320         sortedlist_indexof_from_to.
3321         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3322         inline functions.
3323         * lib/gl_list.c (gl_sortedlist_search_from_to,
3324         gl_sortedlist_indexof_from_to): New functions.
3325         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3326         function.
3327         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3328         (gl_array_sortedlist_search_from_to): New function.
3329         (gl_array_list_implementation): Update.
3330         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3331         function.
3332         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3333         (gl_carray_sortedlist_search_from_to): New function.
3334         (gl_carray_list_implementation): Update.
3335         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3336         gl_linked_sortedlist_indexof_from_to): New functions.
3337         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3338         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3339         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3340         gl_tree_sortedlist_indexof_from_to): New functions.
3341         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3342         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3343         Update.
3344         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3345         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3346         Update.
3347
3348 2006-10-05  Bruno Haible  <bruno@clisp.org>
3349
3350         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3351         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3352         (struct gl_list_implementation): Add fields search_from_to,
3353         indexof_from_to. Remove fields search, indexof.
3354         (gl_list_search): Use the search_from_to method.
3355         (gl_list_search_from, gl_list_search_from_to): New functions.
3356         (gl_list_indexof): Use the indexof_from_to method.
3357         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3358         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3359         (gl_list_search_from, gl_list_search_from_to): New functions.
3360         (gl_list_indexof): Use the indexof_from_to method.
3361         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3362         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3363         gl_array_indexof. Add start_index, end_index arguments.
3364         (gl_array_search_from_to): Renamed from gl_array_search. Add
3365         start_index, end_index arguments.
3366         (gl_array_remove, gl_array_list_implementation): Update.
3367         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3368         gl_carray_indexof. Add start_index, end_index arguments.
3369         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3370         start_index, end_index arguments.
3371         (gl_carray_remove, gl_carray_list_implementation): Update.
3372         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3373         gl_linked_search. Add start_index, end_index arguments.
3374         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3375         start_index, end_index arguments.
3376         (gl_linked_remove): Update.
3377         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3378         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3379         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3380         field to 'size_t'.
3381         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3382         gl_tree_search. Add start_index, end_index arguments.
3383         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3384         start_index, end_index arguments.
3385         (gl_tree_remove): Update.
3386         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3387         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3388         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3389         function.
3390         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3391         gl_tree_search. Add start_index, end_index arguments.
3392         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3393         start_index, end_index arguments.
3394         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3395         Update.
3396         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3397
3398 2006-10-05  Bruno Haible  <bruno@clisp.org>
3399
3400         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3401
3402         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3403         fwriteerror_temp): New declarations.
3404         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3405         (descriptors): New variable.
3406         (cleanup): First, close the descriptors.
3407         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3408         fclose_temp, fwriteerror_temp): New functions.
3409
3410 2006-10-04  Jim Meyering  <jim@meyering.net>
3411
3412         * lib/fts.c (fts_open): Tiny comment change.
3413
3414 2006-10-04  Bruno Haible  <bruno@clisp.org>
3415
3416         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3417         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3418         gl_LOCK_BODY.
3419         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3420         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3421         gl_LOCK_EARLY_BODY.
3422         (gl_LOCK): Require gl_LOCK_BODY.
3423
3424 2006-10-04  Bruno Haible  <bruno@clisp.org>
3425
3426         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3427         (gl_oset_search_atleast): New declaration.
3428         (struct gl_oset_implementation): Add field 'search_atleast'.
3429         (gl_oset_search_atleast): New inline function.
3430         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3431         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3432         (gl_array_oset_implementation): Update.
3433         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3434         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3435         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3436
3437 2006-10-04  Bruno Haible  <bruno@clisp.org>
3438
3439         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3440
3441 2006-10-03  Bruno Haible  <bruno@clisp.org>
3442
3443         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3444         from gl_avltreehash_list_implementation.
3445
3446 2006-10-03  Bruno Haible  <bruno@clisp.org>
3447
3448         * lib/gl_oset.c (gl_oset_add): Fix return type.
3449
3450 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3451
3452         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3453
3454 2006-10-02  Eric Blake  <ebb9@byu.net>
3455
3456         * modules/strnlen (Depends-on): Add extensions.
3457
3458 2006-10-02  Eric Blake  <ebb9@byu.net>
3459
3460         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3461         definition in 2.60+.
3462
3463 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3464
3465         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3466         checks.
3467
3468 2006-10-02  Bruno Haible  <bruno@clisp.org>
3469
3470         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3471         to the AUTOMAKE_OPTIONS.
3472         Reported by Jim Meyering.
3473
3474 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3475
3476         Work around bug in Solaris 10 /proc file system:
3477         /proc/self/fd/NNN/.. isn't the parent directory of
3478         the directory whose file descriptor is NNN.  This needs to
3479         be worked around at run time, not compile time, since a
3480         program might be built on Solaris 8, where things work, and
3481         run on Solaris 10.
3482         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3483         to use the following interface instead:
3484         (OPENAT_BUFFER_SIZE): New macro.
3485         (openat_proc_name): New function.
3486         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3487         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3488         Likewise.
3489         * lib/openat-proc.c: New file.
3490         * modules/openat (Files): Add lib/openat-proc.c.
3491         (Depends-on): Add same-inode, stdbool.
3492         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3493
3494 2006-09-29  Bruno Haible  <bruno@clisp.org>
3495
3496         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3497         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3498         argument. Set stdout_closed before testing for ferror, not after.
3499         (fwriteerror, fwriteerror_no_ebadf): New functions.
3500
3501 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3502
3503         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3504
3505 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
3506
3507         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
3508         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
3509
3510 2006-09-28  Jim Meyering  <jim@meyering.net>
3511
3512         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
3513         Include <unistd.h>.
3514
3515 2006-09-28  Bruno Haible  <bruno@clisp.org>
3516
3517         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
3518         * modules/linkedhash-list (Depends-on): Likewise.
3519         * modules/rbtreehash-list (Depends-on): Likewise.
3520
3521 2006-09-28  Bruno Haible  <bruno@clisp.org>
3522
3523         * lib/strndup.h: Simplify the redefinition of strndup.
3524         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
3525         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
3526
3527 2006-09-28  Bruno Haible  <bruno@clisp.org>
3528
3529         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
3530         * lib/gl_linkedhash_list.c: Likewise.
3531         * lib/gl_rbtreehash_list.c: Likewise.
3532
3533 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
3534
3535         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
3536         getaddrinfo.
3537
3538         * lib/__fpending.h: Don't include <stdio_ext.h> unless
3539         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
3540         it causes <stdio_ext.h> to cause a compile-time error.
3541         Problem reported by Nelson H. F. Beebe.
3542         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
3543         of HAVE_DECL___PENDING.
3544
3545         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
3546         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
3547         declaration.
3548
3549 2006-09-27  Jim Meyering  <jim@meyering.net>
3550
3551         This file could end up with a definition for a function
3552         named __strndup, rather than rpl_strndup on a system with
3553         incomplete weak_alias support.
3554         * lib/strndup.c (strndup): Rename from __strndup.
3555         Remove #defines that used to map __strndup to strndup.
3556         Don't use K&R prototypes.
3557         Remove LIBC-related code, since this file is not sync'd with glibc.
3558         * lib/strndup.h: Revamp, accordingly.
3559         * m4/strndup.m4: Modernize.
3560
3561 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
3562
3563         * modules/savewd (Depends-on): Add 'raise'.
3564         * lib/savewd.c: Include <signal.h>, for 'raise'.
3565
3566 2006-09-26  Jim Meyering  <jim@meyering.net>
3567
3568         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
3569         when we detect Darwin 8.7.0's acl_get_file bug.
3570         Rearrange to perform the new (below) run-test while $LIBS
3571         contains any acl-related library.  Set USE_ACL at the end.
3572         (gl_ACL_GET_FILE): New function.
3573
3574 2006-09-26  Eric Blake  <ebb9@byu.net>
3575
3576         * lib/verror.c: Include <config.h> unconditionally.
3577
3578 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
3579
3580         * modules/clock-time (Maintainer): Add self.
3581         * modules/getlogin_r (Depends-on): Add extensions.
3582
3583 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3584
3585         * modules/clock-time: New module.
3586         * modules/nanosleep (Depends-on): Add clock-time.
3587         * modules/gethrxtime (Depends-on): Likewise.
3588         * modules/gettime (Depends-on): Likewise.
3589         * modules/settime (Depends-on): Likewise.
3590
3591         * modules/fts-lgpl: Depend on openat.
3592         * modules/mkancesdirs: Depend on savewd.
3593         * modules/mkdir-p: Likewise.
3594
3595 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3596
3597         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
3598
3599         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
3600         `gl_have_arbitrary_file_name_length_limit' to
3601         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
3602         actually works between configure runs.
3603
3604 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3605             Bruno Haible  <bruno@clisp.org>
3606
3607         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
3608
3609 2006-09-25  Jim Meyering  <jim@meyering.net>
3610
3611         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
3612         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
3613
3614 2006-09-25  Eric Blake  <ebb9@byu.net>
3615
3616         * gnulib-tool (func_import, func_create_testdir): Fix typos in
3617         exec's in 2006-09-18 patch when shuffling fds.
3618
3619 2006-09-25  Bruno Haible  <bruno@clisp.org>
3620
3621         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
3622         Reported by Jim Meyering.
3623
3624 2006-09-24  Jim Meyering  <jim@meyering.net>
3625
3626         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
3627         compare a pointer against a literal "0".  That caused failures with
3628         at least HP-UX's hpcc.
3629
3630 2006-09-22  Simon Josefsson  <jas@extundo.com>
3631
3632         * modules/gc-sha1:
3633         * modules/gc-md4:
3634         * modules/gc-hmac-sha1:
3635         * modules/gc-hmac-md5:
3636         * modules/gc-des:
3637         * modules/gc-arcfour: Distribute more files.
3638
3639 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3640
3641         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
3642         (gl_linked_iterator_from_to): Initialize struct completely.
3643         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
3644         (gl_tree_iterator_from_to): Likewise
3645         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
3646         * lib/gl_array_list.c [lint] (gl_array_iterator)
3647         (gl_array_iterator_from_to): Likewise.
3648         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
3649         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
3650         (gl_carray_iterator_from_to): Likewise.
3651
3652         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
3653         * lib/md4.c (md4_process_block): Remove unused variable.
3654         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
3655         parentheses for clarity.
3656
3657 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3658
3659         * modules/bison-i18n (Depends-on): Add gettext.
3660
3661 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3662
3663         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
3664         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
3665         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
3666         also add missing comma that caused broken test.
3667         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
3668         stdlib.h, for `abort'.
3669         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
3670         variables.
3671         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
3672         include unistd.h if present, for `rmdir'.
3673         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
3674         variables.
3675         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
3676         in the process include standard headers for prototypes.
3677         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
3678         gets declared on GNU/Linux.
3679         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
3680         unistd.h, for `rmdir'.
3681         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
3682
3683         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
3684         always true.
3685         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
3686
3687         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
3688
3689 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3690
3691         * gnulib-tool (func_version): Create output all at once.  This
3692         may help avoid triggering unnecessary SIGPIPEs, and at any
3693         rate it doesn't hurt.
3694
3695 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3696             Bruno Haible  <bruno@clisp.org>
3697
3698         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
3699         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3700         * m4/signed.m4 (bh_C_SIGNED): Likewise.
3701
3702         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
3703         (gl_FUNC_VASPRINTF): Invoke it.
3704
3705 2006-09-22  Bruno Haible  <bruno@clisp.org>
3706
3707         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
3708         getloadavg.c as first argument.
3709
3710 2006-09-22  Bruno Haible  <bruno@clisp.org>
3711
3712         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
3713         at the beginning of the gl_INIT macro.
3714         * modules/getloadavg (configure.ac): Pass $gl_source_base to
3715         gl_GETLOADAVG.
3716
3717 2006-09-22  Bruno Haible  <bruno@clisp.org>
3718
3719         * gnulib-tool (func_create_megatestdir): Don't include the config-h
3720         module.
3721         Suggested by Ralf Wildenhues.
3722
3723 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
3724
3725         Import this patch from libc:
3726
3727         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
3728
3729         * lib/regex_internal.c (re_string_reconstruct): Handle
3730         offset < pstr->valid_raw_len && pstr->offsets_needed case.
3731         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
3732         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
3733         re_string_context_at.
3734
3735         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
3736         now requires it.
3737         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
3738         gl_REGEX now does it for us.
3739         (gl_REGEX): Add test taken from
3740         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
3741
3742         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
3743         Check that large offsets work.  Modernize Autoconf usages.
3744         Prefer "yes" to mean a good thing rather than a bad.
3745         Don't put "#define mkstemp" in config.h, as this might interfere
3746         with standard system headers that "#define mkstemp mkstemp64".
3747
3748         * modules/mkstemp (Depends-on): Add extensions, so that
3749         mkstemp is visible on some platforms.
3750         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
3751         (Include): Change to "mkstemp.h" from <stdlib.h>.
3752         (Files): Add mkstemp.h.
3753
3754         * lib/mkstemp.h: New file, since some standard headers
3755         #define mkstemp.
3756         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
3757         Include "mkstemp.h".
3758         Make the _LIBC code resemble glibc original more,
3759         e.g., use K&R style.
3760         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
3761         (mkstemp): Remove, since mkstemp.h does this for us.
3762         * lib/stdlib--.h: Include mkstemp.h.
3763
3764         Import this patch from libc:
3765
3766         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3767
3768         * lib/tempname.c (__gen_tempname): Change attempts_min
3769         into a macro.  Use preprocessor to decide how to initialize
3770         attempts [Coverity CID 67].
3771
3772 2006-09-20  Bruno Haible  <bruno@clisp.org>
3773
3774         * lib/mkdtemp.c: Import from libc.
3775         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
3776                 * sysdeps/posix/tempname.c (__gen_tempname): Change
3777                 attempts_min into a macro.  Use preprocessor to decide how to
3778                 initialize attempts [Coverity CID 67].
3779         2001-11-27  Paul Eggert  <eggert@twinsun.com>
3780                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
3781                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
3782
3783 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3784
3785         * gnulib-tool (func_exit): New function, to allow to pass the
3786         exit status portably through the trap.  Use everywhere.
3787         (--help, --version): Signal a write error.
3788         (trap): catch SIGPIPE, for write errors.
3789         Exit at the end of the trap, with the correct exit status.
3790
3791 2006-09-19  Karl Berry  <karl@gnu.org>
3792
3793         * doc/gnulib.texi: note about the license texinfo files.
3794
3795 2006-09-19  Eric Blake  <ebb9@byu.net>
3796
3797         * gnulib-tool: Avoid space-tab.
3798
3799 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3800
3801         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
3802         that prevented coreutils 6.1 from building.  Problem reported
3803         by Petter Reinholdtsen.
3804
3805 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
3806
3807         * gnulib-tool (avoidlist): Fix typo that broke options like
3808         --avoid=lock that are used by coreutils bootstrap.
3809
3810 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
3811
3812         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
3813         more systematically.
3814
3815 2006-09-18  Jim Meyering  <jim@meyering.net>
3816
3817         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
3818
3819 2006-09-18  Bruno Haible  <bruno@clisp.org>
3820
3821         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
3822
3823 2006-09-18  Bruno Haible  <bruno@clisp.org>
3824
3825         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
3826         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
3827         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
3828         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
3829         * m4/gettext.m4: Require autoconf >= 2.52.
3830         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
3831         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
3832         of gl_cv_header_inttypes_h.
3833
3834 2006-09-18  Bruno Haible  <bruno@clisp.org>
3835
3836         * lib/javaversion.c: Include configmake.h.
3837
3838 2006-09-18  Bruno Haible  <bruno@clisp.org>
3839
3840         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
3841         avoid that the while loops be executed in a subshell.
3842
3843 2006-09-18  Bruno Haible  <bruno@clisp.org>
3844
3845         * MODULES.html.sh (func_module): Break long lines.
3846         Suggested by Bruce Korb <bkorb@gnu.org>.
3847
3848 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3849
3850         Speed up by a factor of 1.12.
3851         * gnulib-tool (nl): New variable.
3852         (func_import): Rewrite include directive extraction to only read each
3853         directive once.
3854
3855 2006-09-17  Bruno Haible  <bruno@clisp.org>
3856
3857         * modules/javaversion (Makefile.am): Remove DEFS setting.
3858         (Depends-on): Add configmake, for PKGDATADIR definition.
3859
3860 2006-09-17  Bruno Haible  <bruno@clisp.org>
3861
3862         * gnulib-tool (func_create_testdir): Rewrite all files at once.
3863
3864 2006-09-17  Bruno Haible  <bruno@clisp.org>
3865
3866         * gnulib-tool (func_append): New function, stolen from libtool.m4.
3867         (func_modules_transitive_closure, func_modules_add_dummy,
3868         func_modules_to_filelist, func_import, func_create_testdir,
3869         func_create_megatestdir, ...): Use it wherever possible.
3870         Suggested by Ralf Wildenhues.
3871
3872 2006-09-16  Karl Berry  <karl@gnu.org>
3873
3874         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
3875         to avoid sectioning errors.
3876         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
3877         [ifinfo]: blank line after @center-ed titles.
3878         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
3879         Spell FSF address consistently with others.
3880         (These changes approved by rms.)
3881
3882 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3883
3884         Speed up by a factor of 1.61.
3885         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
3886         already checked module names again.
3887
3888 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3889
3890         Speed up by a factor of 1.13.
3891         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
3892         for new_files, and the input to func_add_or_update.
3893
3894 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3895
3896         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
3897         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
3898
3899 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3900
3901         * modules/mkancesdirs (Depends-on): Add fcntl.
3902         * modules/savewd: New file.
3903         * MODULES.html.sh (File system functions): Add savewd.
3904
3905         * modules/configmake (Makefile.am): Add support for the
3906         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
3907
3908 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3909
3910         * m4/savewd.m4: New file.
3911
3912 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
3913
3914         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
3915         (dirchownmod): New arg FD.  All callers changed.
3916         Use FD rather than opening the directory ourself, as opening is
3917         now the caller's responsibility.
3918         * lib/dirchownmod.h: Likewise.
3919         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
3920         hosts that require <sys/types.h> before <sys/stat.h>.  Include
3921         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
3922         (test_dir): Remove.
3923         (mkancesdirs): Return length of prefix of FILE that has already
3924         been made, or -2 if there is a child doing the work.  Redo
3925         algorithm so that it is O(N) rather than O(N**2).  Optimize away
3926         ".", and treat ".." specially since it might stray back into
3927         already-created areas.  Use a subprocess if necessary.  New arg
3928         WD; all users changed.  MAKE_DIR function should now return 1
3929         if it creates a directory that is not readable.  Return -2 if
3930         a child process is spun off.
3931         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
3932         Adjust signature to match code.
3933         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
3934         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
3935         all users changed.
3936         * lib/savewd.c, lib/savewd.h: New files.
3937
3938 2006-09-15  Jim Meyering  <jim@meyering.net>
3939
3940         * modules/rename-dest-slash: New module.
3941         * MODULES.html.sh (posix_compat): Add it here.
3942
3943         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
3944
3945 2006-09-15  Jim Meyering  <jim@meyering.net>
3946
3947         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
3948         file.
3949
3950         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
3951
3952 2006-09-15  Jim Meyering  <jim@meyering.net>
3953
3954         * lib/rename-dest-slash.c (has_trailing_slash): Use
3955         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
3956         (rpl_rename_dest_slash): Perform the cheaper trailing slash
3957         test before testing whether SRC is a directory.
3958         Suggestions from Bruno Haible.
3959
3960         Avoid a warning about an unused variable.
3961         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
3962         into the #ifdef block where it's used.
3963
3964         * lib/rename-dest-slash.c: New file.
3965
3966 2006-09-14  Bruno Haible  <bruno@clisp.org>
3967
3968         * lib/allocsa.c: Include <config.h> unconditionally.
3969         * lib/asnprintf.c: Likewise.
3970         * lib/asprintf.c: Likewise.
3971         * lib/c-strcasecmp.c: Likewise.
3972         * lib/c-strcasestr.c: Likewise.
3973         * lib/c-strncasecmp.c: Likewise.
3974         * lib/c-strstr.c: Likewise.
3975         * lib/classpath.c: Likewise.
3976         * lib/clean-temp.c: Likewise.
3977         * lib/concatpath.c: Likewise.
3978         * lib/copy-file.c: Likewise.
3979         * lib/csharpcomp.c: Likewise.
3980         * lib/csharpexec.c: Likewise.
3981         * lib/execute.c: Likewise.
3982         * lib/fatal-signal.c: Likewise.
3983         * lib/findprog.c: Likewise.
3984         * lib/fwriteerror.c: Likewise.
3985         * lib/gl_array_list.c: Likewise.
3986         * lib/gl_array_oset.c: Likewise.
3987         * lib/gl_avltree_list.c: Likewise.
3988         * lib/gl_avltree_oset.c: Likewise.
3989         * lib/gl_avltreehash_list.c: Likewise.
3990         * lib/gl_carray_list.c: Likewise.
3991         * lib/gl_linked_list.c: Likewise.
3992         * lib/gl_linkedhash_list.c: Likewise.
3993         * lib/gl_list.c: Likewise.
3994         * lib/gl_oset.c: Likewise.
3995         * lib/gl_rbtree_list.c: Likewise.
3996         * lib/gl_rbtree_oset.c: Likewise.
3997         * lib/gl_rbtreehash_list.c: Likewise.
3998         * lib/imaxabs.c: Likewise.
3999         * lib/imaxdiv.c: Likewise.
4000         * lib/javacomp.c: Likewise.
4001         * lib/javaexec.c: Likewise.
4002         * lib/javaversion.c: Likewise.
4003         * lib/linebreak.c: Likewise.
4004         * lib/localcharset.c: Likewise.
4005         * lib/lock.c: Likewise.
4006         * lib/mbchar.c: Likewise.
4007         * lib/mbswidth.c: Likewise.
4008         * lib/mkdtemp.c: Likewise.
4009         * lib/pipe.c: Likewise.
4010         * lib/printf-args.c: Likewise.
4011         * lib/printf-parse.c: Likewise.
4012         * lib/progname.c: Likewise.
4013         * lib/progreloc.c: Likewise.
4014         * lib/readlink.c: Likewise.
4015         * lib/sh-quote.c: Likewise.
4016         * lib/stpcpy.c: Likewise.
4017         * lib/stpncpy.c: Likewise.
4018         * lib/strcasecmp.c: Likewise.
4019         * lib/strcasestr.c: Likewise.
4020         * lib/strcspn.c: Likewise.
4021         * lib/striconv.c: Likewise.
4022         * lib/strncasecmp.c: Likewise.
4023         * lib/strnlen1.c: Likewise.
4024         * lib/strstr.c: Likewise.
4025         * lib/strtok_r.c: Likewise.
4026         * lib/tls.c: Likewise.
4027         * lib/tmpdir.c: Likewise.
4028         * lib/unicodeio.c: Likewise.
4029         * lib/unsetenv.c: Likewise.
4030         * lib/vasnprintf.c: Likewise.
4031         * lib/vasprintf.c: Likewise.
4032         * lib/wait-process.c: Likewise.
4033         * lib/xallocsa.c: Likewise.
4034         * lib/xsetenv.c: Likewise.
4035         * lib/xstriconv.c: Likewise.
4036
4037 2006-09-13  Simon Josefsson  <jas@extundo.com>
4038
4039         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4040         that internally, suggested by Ralf Wildenhues
4041         <Ralf.Wildenhues@gmx.de>.
4042
4043 2006-09-13  Simon Josefsson  <jas@extundo.com>
4044
4045         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4046         @LIBOBJS@.
4047         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4048
4049 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4050
4051         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4052         longer worry about uses that don't define HAVE_CONFIG_H.
4053         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4054         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4055         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4056         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4057         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4058         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4059         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4060         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4061         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4062         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4063         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4064         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4065         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4066         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4067         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4068         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4069         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4070         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4071         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4072         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4073         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4074         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4075         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4076         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4077         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4078         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4079         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4080         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4081         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4082         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4083         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4084         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4085         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4086         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4087         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4088         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4089         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4090         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4091         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4092         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4093         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4094         Likewise.
4095
4096 2006-09-13  Eric Blake  <ebb9@byu.net>
4097
4098         * lib/getopt.c: Fix typo in last commit.
4099
4100 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4101
4102         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4103         dgettext.
4104
4105 2006-09-12  Jim Meyering  <jim@meyering.net>
4106
4107         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4108         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4109         Reported by Nelson H. F. Beebe.
4110
4111 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4112
4113         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4114         program_invocation_name and program_invocation_short_name are
4115         initialized.
4116         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4117         and program_invocation_short_name to argp.h, so they are visible
4118         to user programs.
4119         * lib/argp.h: Likewise
4120
4121 2006-09-10  Bruno Haible  <bruno@clisp.org>
4122
4123         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4124         m4/inttypes_h.m4, m4/uintmax_t.m4.
4125
4126 2006-09-10  Bruno Haible  <bruno@clisp.org>
4127
4128         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4129         gl_AC_TYPE_UINTMAX_T.
4130
4131 2006-09-10  Bruno Haible  <bruno@clisp.org>
4132
4133         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4134
4135 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4136
4137         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4138         convention.  Text proposed by Bruno Haible.
4139         (struct argp_option): Document the use of N_() wrappers.
4140
4141         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4142         '\v', and translate the two parts separately, instead of feeding
4143         the whole string to gettext.  This allows to exclude
4144         '\v' from the strings visible to the translator by writing doc
4145         strings as N_("..") "\v" N_("..").
4146
4147 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4148
4149         * config/srclist.txt: Undo latest change; the bug was fixed.
4150
4151 2006-09-09  Bruno Haible  <bruno@clisp.org>
4152
4153         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4154         assignments if building a library without libtool.
4155         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4156         in func_emit_lib_Makefile_am.
4157         (func_import): When building a static library libfoo.a, arrange to
4158         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4159         (func_create_testdir): Likewise.
4160         * modules/gc (configure.ac, Makefile.am): If building statically,
4161         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4162         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4163         * modules/striconv (configure.ac, Makefile.am): Likewise.
4164         Based on a suggestion by Ralf Wildenhues.
4165
4166 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4167
4168         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4169         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4170         Also:
4171
4172         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4173         Add year_2050_test to catch glibc bug 2821
4174         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4175
4176         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4177         Prefer #ifdef to #if.
4178
4179         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4180         Return from 'main' instead of calling 'exit'.
4181
4182 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4183
4184         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4185         returned the maximum time_t value rather than (time_t) -1.
4186         Problem originally reported by William Bardwell
4187         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4188
4189         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4190         Moved to here ...
4191         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4192         ... from here.
4193
4194 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4195
4196         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4197         2821 is fixed.
4198
4199 2006-09-08  Jim Meyering  <jim@meyering.net>
4200
4201         Don't make generated files read-only.  That would bother too many
4202         people.  However, do retain the ability to work when targets are
4203         read-only: remove the destination and temporary files before writing
4204         them (when generated via sed or echo), or by using the -f option for
4205         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4206         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4207         * modules/byteswap, modules/configmake, modules/fcntl:
4208         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4209         * modules/localcharset, modules/netinet_in, modules/poll:
4210         * modules/stdbool, modules/stdint, modules/sys_select:
4211         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4212
4213 2006-09-08  Jim Meyering  <jim@meyering.net>
4214
4215         Avoid new build failure on FreeBSD 6.0.
4216         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4217         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4218         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4219
4220 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4221
4222         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4223
4224 2006-09-07  Jim Meyering  <jim@meyering.net>
4225
4226         Fix global typo in last change: use chmod u-w, not chmod u-x.
4227         Spotted by Paul Eggert and Bruce Korb.
4228         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4229         * modules/byteswap, modules/configmake, modules/fcntl:
4230         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4231         * modules/localcharset, modules/netinet_in, modules/poll:
4232         * modules/stdbool, modules/stdint, modules/sys_select:
4233         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4234
4235 2006-09-06  Jim Meyering  <jim@meyering.net>
4236
4237         Make generated files be read-only.
4238         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4239         Ensure that each generated file is now read-only.
4240         * modules/argz: Likewise.
4241         * modules/arpa_inet: Likewise.
4242         * modules/byteswap: Likewise.
4243         * modules/configmake: Likewise.
4244         * modules/fcntl: Likewise.
4245         * modules/fnmatch: Likewise.
4246         * modules/getopt: Likewise.
4247         * modules/glob: Likewise.
4248         * modules/inttypes: Likewise.
4249         * modules/netinet_in: Likewise.
4250         * modules/poll: Likewise.
4251         * modules/stdbool: Likewise.
4252         * modules/stdint: Likewise.
4253         * modules/sys_select: Likewise.
4254         * modules/sys_socket: Likewise.
4255         * modules/sys_stat: Likewise.
4256         * modules/sysexits: Likewise.
4257         * modules/localcharset: Same as above, but continue using temporary
4258         file named "t-$@" (why different?) rather than the "$@-t" used
4259         everywhere else.
4260
4261         * modules/sysexits (Makefile.am): Replace literal occurrences
4262         of "sysexit.h" more readable, and more consistent, "$@".
4263
4264 2006-09-06  Bruno Haible  <bruno@clisp.org>
4265
4266         * modules/striconv: New file.
4267         * modules/xstriconv: New file.
4268         * MODULES.html.sh (Internationalization functions): Add striconv,
4269         xstriconv.
4270
4271 2006-09-06  Bruno Haible  <bruno@clisp.org>
4272
4273         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4274         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4275         not using libtool correctly.
4276
4277 2006-09-06  Bruno Haible  <bruno@clisp.org>
4278
4279         * lib/striconv.h: New file.
4280         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4281         iconvstring.c.
4282         * lib/xstriconv.h: New file.
4283         * lib/xstriconv.c: New file.
4284
4285 2006-09-06  Bruno Haible  <bruno@clisp.org>
4286
4287         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4288         lib_..._LDFLAGS.
4289
4290 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4291
4292         * lib/argz_.h: Sync from Libtool.
4293
4294         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4295                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4296
4297         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4298
4299 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4300
4301         * modules/trim: New file.
4302
4303 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4304
4305         * lib/trim.h: New file.
4306         * lib/trim.c: New file.
4307
4308 2006-09-05  Bruno Haible  <bruno@clisp.org>
4309
4310         * MODULES.html.sh (String handling): Add trim.
4311
4312 2006-09-04  Karl Berry  <karl@gnu.org>
4313
4314         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4315         until next release.
4316
4317 2006-09-03  Bruno Haible  <bruno@clisp.org>
4318
4319         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4320         correctly.
4321
4322 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4323
4324         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4325         not gl_GETLOADAVG.  Omit unneeded semicolons.
4326         Problems reported by Ralf Wildenhues in
4327         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4328         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4329         at the end, which is the usual gnulib style.
4330
4331         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4332         of doing all the work ourselves.
4333         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4334         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4335
4336 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4337
4338         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4339         Problem reported by Ralf Wildenhues in
4340         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4341
4342         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4343         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4344
4345 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4346
4347         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4348         yesterday's patch by changing test -n to test -z.
4349
4350 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4351
4352         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4353         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4354         the former is now obsolescent.
4355
4356         * modules/chdir-long (Depends-on): Add fcntl.
4357
4358 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4359
4360         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4361         obsolescent, and programs should use gnulib instead.
4362         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4363         but with prefixes changed.
4364
4365 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4366
4367         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4368         or stdbool.h, because they might not exist while configuring.
4369
4370         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4371         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4372         does that for us.
4373         (O_DIRECTORY): Remove.
4374
4375 2006-08-31  Eric Blake  <ebb9@byu.net>
4376
4377         * gnulib-tool: Don't let emacs change spaces to TAB.
4378
4379 2006-08-31  Bruno Haible  <bruno@clisp.org>
4380
4381         * gnulib-tool: When calling func_import more than once, do it in a
4382         subshell.
4383         Reported by Eric Blake <ebb9@byu.net>.
4384
4385 2006-08-31  Bruno Haible  <bruno@clisp.org>
4386
4387         * gnulib-tool (nl): Remove variable.
4388         (sed_transform_lib_file): Use more robust test for config-h module.
4389         (func_import): Fix typo in 2006-08-25 patch.
4390
4391 2006-08-31  Bruno Haible  <bruno@clisp.org>
4392
4393         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4394         specified, augment Makefile.am variables instead of assigning them.
4395
4396 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4397
4398         Work around a bug in both the Linux and SunOS 64-bit kernels:
4399         nanosleep mishandles sleeps for longer than 2**31 seconds.
4400         Problem reported by Frank v Waveren in
4401         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4402         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4403         Check for nanosleep bug.
4404         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4405
4406 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4407
4408         Work around a bug in both the Linux and SunOS 64-bit kernels:
4409         nanosleep mishandles sleeps for longer than 2**31 seconds.
4410         Problem reported by Frank v Waveren in
4411         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4412         * lib/nanosleep.c (BILLION): New constant.
4413         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4414         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4415         implementation.
4416
4417 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4418
4419         * modules/nanosleep (Depends-on): Add gettime.
4420
4421 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4422         and Simon Josefsson  <jas@extundo.com>
4423         and Oskar Liljeblad  <oskar@osk.mine.nu>
4424
4425         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4426         * gnulib-tool (func_import): New license type 'unmodifiable license
4427         text'.
4428         * modules/fdl: Use it.  Longer description.
4429         * module/gpl, module/lgpl: New files.
4430
4431 2006-08-30  Jim Meyering  <jim@meyering.net>
4432
4433         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4434         shadowing the parameter.
4435
4436 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4437
4438         Sync from Libtool:
4439
4440         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4441
4442         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4443         sharing with gnulib.  Report by Eric Blake.
4444
4445 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4446
4447         * modules/isapipe: New file.
4448         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4449
4450 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4451
4452         * modules/configmake (Makefile.am): Add a comment, and omit
4453         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4454         by Bruno Haible.
4455
4456 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4457
4458         * m4/isapipe.m4: New file.
4459
4460 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4461
4462         * lib/isapipe.c, lib/isapipe.h: New files.
4463
4464 2006-08-29  Jim Meyering  <jim@meyering.net>
4465
4466         * modules/configmake (Makefile.am): Make configmake.h depend on
4467         Makefile.  Otherwise, a stale configmake.h could hang around.
4468
4469 2006-08-29  Eric Blake  <ebb9@byu.net>
4470
4471         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4472         resolution of upstream bug 3044.
4473
4474 2006-08-29  Bruno Haible  <bruno@clisp.org>
4475
4476         * modules/localcharset (Depends-on): Add configmake.
4477         (Makefile.am): Remove setting of LIBDIR through DEFS.
4478
4479 2006-08-29  Bruno Haible  <bruno@clisp.org>
4480
4481         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4482         defined.
4483
4484 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4485
4486         * modules/fcntl: New file.
4487         * modules/chdir-safer (Depends-on): Add fcntl.
4488         * modules/fts: Likewise.
4489         * modules/mkdir-p: Likewise.
4490
4491         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4492         This undoes the most recent change, since we're now addressing the
4493         problem in a different way.
4494
4495         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4496         into output, since the output might be called Makefile.am even
4497         if $makefile_name is something different.
4498         (func_import): Use $makefile_am rather than
4499         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4500         empty.
4501
4502         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4503
4504 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4505
4506         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
4507         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
4508         recent change to stdint.m4, since we're now addressing the problem in a
4509         different way.
4510
4511 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4512
4513         * m4/fcntl_h.m4: New file.
4514
4515 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4516
4517         * lib/fcntl_.h: New file.
4518         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
4519         the fcntl module.
4520         * lib/dirchownmod.c: Likewise.
4521         * lib/fts.c: Likewise.
4522
4523         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
4524         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
4525         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
4526         just before including <inttypes.h>, to avoid circular inclusion.
4527
4528 2006-08-28  Jim Meyering  <jim@meyering.net>
4529
4530         * doc/visibility.texi: Actually read and correct the grammar of the
4531         sentence affected by yesterday's change.
4532
4533 2006-08-28  Eric Blake  <ebb9@byu.net>
4534
4535         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
4536         needs wrapper.
4537
4538 2006-08-28  Eric Blake  <ebb9@byu.net>
4539
4540         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
4541
4542 2006-08-28  Eric Blake  <ebb9@byu.net>
4543
4544         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
4545
4546 2006-08-28  Bruno Haible  <bruno@clisp.org>
4547
4548         * modules/c-strstr: New file, from GNU gettext.
4549         * MODULES.html.sh (String handling): Add c-strstr.
4550
4551 2006-08-28  Bruno Haible  <bruno@clisp.org>
4552
4553         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
4554         macros.
4555         Reported by Eric Blake.
4556
4557 2006-08-28  Bruno Haible  <bruno@clisp.org>
4558
4559         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
4560         (VASNPRINTF): Return a string of length > INT_MAX without failing.
4561         * lib/vasprintf.c: Include errno.h, limits.h.
4562         (EOVERFLOW): New fallback definition.
4563         (vasprintf): Test here whether the string length is > INT_MAX.
4564         * lib/vsnprintf.c: Include errno.h, limits.h.
4565         (EOVERFLOW): New fallback definition.
4566         (vsnprintf): Fix bug when generated string was too long for the buffer.
4567         Test here whether the string length is > INT_MAX.
4568
4569 2006-08-28  Bruno Haible  <bruno@clisp.org>
4570
4571         * lib/inttypes_.h (SCNX*): Remove definitions.
4572         Reported by Eric Blake.
4573
4574 2006-08-28  Bruno Haible  <bruno@clisp.org>
4575
4576         * lib/c-strstr.h: New file, from GNU gettext.
4577         * lib/c-strstr.c: New file, from GNU gettext.
4578
4579 2006-08-28  Bruno Haible  <bruno@clisp.org>
4580
4581         * gnulib-tool: Reorder some statements.
4582
4583 2006-08-28  Bruno Haible  <bruno@clisp.org>
4584
4585         * gnulib-tool: New option --makefile-name.
4586         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
4587         $makefile_name.
4588         (func_import): Write $makefile_name to the cache file, and read it from
4589         there unless explicitly specified. Use $makefile_name as file name
4590         instead of Makefile.am. Adjust the recommendations accordingly.
4591
4592 2006-08-28  Bruno Haible  <bruno@clisp.org>
4593
4594         * gnulib-tool (func_verify_module): Check against misapplying patch.
4595
4596 2006-08-28  Bruno Haible  <bruno@clisp.org>
4597
4598         * gnulib-tool (func_relativize, func_relconcat): New functions.
4599         Give an error if --local-dir is given with --update.
4600         Remove trailing slashes from $local_gnulib_dir.
4601         (func_import): Store the relativized $local_gnulib_dir in
4602         gnulib-cache.m4, and read it from there if not specified explicitly.
4603
4604 2006-08-28  Bruno Haible  <bruno@clisp.org>
4605
4606         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
4607         is the current directory. Respect also $local_gnulib_dir.
4608
4609 2006-08-28  Bruno Haible  <bruno@clisp.org>
4610             Simon Josefsson  <jas@extundo.com>
4611
4612         BeOS portability.
4613         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
4614
4615 2006-08-27  Jim Meyering  <jim@meyering.net>
4616
4617         * doc/visibility.texi: Remove duplicate word: "pointer".
4618
4619 2006-08-26  Bruno Haible  <bruno@clisp.org>
4620
4621         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
4622         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
4623         (Makefile.am): Create inttypes.h from inttypes_.h.
4624         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
4625
4626         * modules/imaxabs: New file.
4627
4628         * modules/imaxdiv: New file.
4629
4630 2006-08-26  Bruno Haible  <bruno@clisp.org>
4631
4632         * m4/inttypes.m4: New file.
4633         * m4/_inttypes_h.m4: Remove file.
4634         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
4635         PRI_MACROS_BROKEN.
4636         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
4637
4638         * m4/imaxabs.m4: New file.
4639
4640         * m4/imaxdiv.m4: New file.
4641
4642 2006-08-26  Bruno Haible  <bruno@clisp.org>
4643
4644         * lib/inttypes_.h: New file.
4645         * lib/inttypes.h: Remove file.
4646         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
4647
4648         * lib/imaxabs.c: New file.
4649
4650         * lib/imaxdiv.c: New file.
4651
4652 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4653
4654         New config-h module, so that "make" output needn't be cluttered
4655         by -DHAVE_CONFIG_H.
4656         * MODULES.html.sh (Support for building libraries and executables):
4657         Add config-h.
4658         * modules/config-h: New file.
4659         * gnulib-tool (nl, sed_transform_lib_file): New vars.
4660         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
4661         the config-h module is used.
4662
4663         New configmake module, so that "make" output needn't be cluttered
4664         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
4665         * MODULES.html.sh (Support for building libraries and executables):
4666         Add configmake.
4667         * modules/configmake: New file.
4668
4669 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
4670
4671         * m4/config-h.m4: New file.
4672
4673 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4674
4675         * config/srclist.txt: Add elisp-comp.
4676
4677 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
4678
4679         * MODULES.html.sh (Support for building libraries and executables):
4680         Add elisp-comp.
4681         * build-aux/elisp-comp: New file.
4682         * modules/elisp-comp: New file.
4683
4684 2006-08-24  Bruno Haible  <bruno@clisp.org>
4685
4686         * gnulib-tool (func_create_testdir): Use non-default values of
4687         sourcebase and m4base.
4688
4689 2006-08-24  Bruno Haible  <bruno@clisp.org>
4690
4691         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
4692         HTML structure.
4693
4694 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
4695
4696         * modules/openat (Depends-on): Add lchown.
4697
4698 2006-08-23  Bruno Haible  <bruno@clisp.org>
4699
4700         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
4701         of gl_LOCK_EARLY instead of gl_LOCK.
4702
4703 2006-08-23  Bruno Haible  <bruno@clisp.org>
4704
4705         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
4706         on OSF/1 to no.
4707         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
4708
4709 2006-08-23  Bruno Haible  <bruno@clisp.org>
4710
4711         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
4712         as unusable.
4713
4714         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
4715         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
4716         (gl_LOCK): New macro.
4717
4718 2006-08-22  Simon Josefsson  <jas@extundo.com>
4719
4720         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
4721         to md5 module.
4722
4723 2006-08-22  Simon Josefsson  <jas@extundo.com>
4724
4725         * MODULES.html.sh: Add "Support for maintaining and release
4726         projects".
4727
4728         * build-aux/gnupload: New file, from coreutils.
4729
4730 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4731
4732         Avoid the need for AC_LIBSOURCES in m4 macros.
4733         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
4734         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
4735         * modules/check-version (EXTRA_DIST): Add check-version.h.
4736         * modules/crc (EXTRA_DIST): Add crc.h.
4737         * modules/des (EXTRA_DIST): Add des.h.
4738         * modules/gc (EXTRA_DIST): Add gc.h.
4739         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
4740         * modules/getline (EXTRA_DIST): Add getline.h.
4741         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
4742         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
4743         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
4744         * modules/md2 (EXTRA_DIST): Add md2.h.
4745         * modules/md4 (EXTRA_DIST): Add md4.h.
4746         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
4747         * modules/read-file (EXTRA_DIST): Add read-file.h.
4748         * modules/readline (EXTRA_DIST): Add readline.h.
4749         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
4750         rijndael-api-fst.h.
4751
4752 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4753
4754         * m4/rijndael.m4 (gl_ARCFOUR):
4755         * m4/arctwo.m4 (gl_ARCTWO):
4756         * m4/check-version.m4 (gl_CHECK_VERSION):
4757         * m4/crc.m4 (gl_CRC):
4758         * m4/des.m4 (gl_DES):
4759         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
4760         * m4/gc.m4 (gl_GC):
4761         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
4762         * m4/getline.m4 (gl_FUNC_GETLINE):
4763         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
4764         * m4/hmac-md5.m4 (gl_HMAC_MD5):
4765         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
4766         * m4/md2.m4 (gl_MD2):
4767         * m4/md4.m4 (gl_MD4):
4768         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
4769         * m4/read-file.m4 (gl_FUNC_READ_FILE):
4770         * m4/readline.m4 (gl_FUNC_READLINE):
4771         * m4/rijndael.m4 (gl_RIJNDAEL):
4772         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
4773         to get the necessary .h files and whatnot.
4774
4775 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
4776
4777         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
4778         gnulib rather than the other way around.
4779         * config/srclistvars.sh (COREUTILS): Remove.
4780
4781 2006-08-22  Jim Meyering  <jim@meyering.net>
4782
4783         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
4784
4785         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
4786
4787 2006-08-22  Eric Blake  <ebb9@byu.net>
4788
4789         * modules/regexprops-generic: New file.
4790         * MODULES.html.sh (Support for building documentation): List it.
4791
4792 2006-08-22  Eric Blake  <ebb9@byu.net>
4793
4794         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
4795         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
4796         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
4797         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
4798
4799 2006-08-22  Bruno Haible  <bruno@clisp.org>
4800
4801         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
4802         and lib_LTLIBRARIES like the other lib_* variables.
4803
4804 2006-08-22  Bruno Haible  <bruno@clisp.org>
4805
4806         * build-aux/x-to-1.in: New file, from GNU gettext.
4807
4808 2006-08-22  Bruno Haible  <bruno@clisp.org>
4809
4810         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
4811         <utmpx.h> exists.
4812
4813 2006-08-22  Bruno Haible  <bruno@clisp.org>
4814
4815         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
4816         <utmpx.h> exists.
4817
4818 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4819
4820         BeOS portability.
4821         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
4822         exist.
4823         Problem reported by Bruno Haible.
4824
4825 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4826
4827         Avoid the need for AC_LIBSOURCES in m4 macros.
4828         * modules/acl (EXTRA_DIST): Add acl.h.
4829         * modules/argmatch (Files): Add m4/argmatch.m4.
4830         (configure.ac): Add gl_ARGMATCH.
4831         (EXTRA_DIST): Renamed from lib_SOURCES, for
4832         consistency with the other modules.  Remove argmatch.c.
4833         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
4834         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
4835         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
4836         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
4837         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
4838         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
4839         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
4840         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
4841         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
4842         * modules/closeout (EXTRA_DIST): Add closeout.h.
4843         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
4844         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
4845         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
4846         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
4847         dirname.h; remove basename.c and stripslash.c.
4848         * modules/exclude (EXTRA_DIST): Add exclude.h.
4849         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
4850         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
4851         * modules/file-type (EXTRA_DIST): Add file-type.h.
4852         * modules/filemode (EXTRA_DIST): Add filemode.h.
4853         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
4854         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4855         * modules/fpending (EXTRA_DIST): Add __fpending.h.
4856         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
4857         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
4858         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
4859         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
4860         * modules/getdate (EXTRA_DIST): Add getdate.c.
4861         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
4862         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
4863         * modules/getpass (EXTRA_DIST): Add getpass.h.
4864         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
4865         * modules/group-member (EXTRA_DIST): Add group-member.h.
4866         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
4867         * modules/hash (EXTRA_DIST): Add hash.h.
4868         * modules/human (EXTRA_DIST): Add human.h.
4869         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
4870         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
4871         * modules/lchown (EXTRA_DIST): Add lchown.h.
4872         * modules/long-options (EXTRA_DIST): Add long-options.h.
4873         * modules/lstat (EXTRA_DIST): Add lstat.h.
4874         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
4875         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
4876         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
4877         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
4878         * modules/memxor (EXTRA_DIST): Add memxor.h.
4879         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
4880         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
4881         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
4882         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
4883         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
4884         * modules/physmem (EXTRA_DIST): Add physmem.h.
4885         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
4886         * modules/posixver (EXTRA_DIST): Add posixver.h.
4887         * modules/quote (EXTRA_DIST): Add quote.h.
4888         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
4889         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
4890         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
4891         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
4892         regex_internal.h regexec.c.
4893         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
4894         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
4895         * modules/same (EXTRA_DIST): Add same.h.
4896         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
4897         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
4898         * modules/savedir (EXTRA_DIST): Add savedir.h.
4899         * modules/sha1 (EXTRA_DIST): Add sha1.h.
4900         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
4901         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
4902         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
4903         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
4904         * modules/strdup (EXTRA_DIST): Add strdup.h.
4905         * modules/strftime (EXTRA_DIST): Add strftime.h.
4906         * modules/strndup (EXTRA_DIST): Add strndup.h.
4907         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
4908         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
4909         * modules/time_r (EXTRA_DIST): Add time_r.h.
4910         * modules/timespec (EXTRA_DIST): Add timespec.h.
4911         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
4912         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
4913         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
4914         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
4915         * modules/userspec (EXTRA_DIST): Add userspec.h.
4916         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
4917         * modules/utimens (EXTRA_DIST): Add utimens.h.
4918         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
4919         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
4920         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
4921         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
4922         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
4923         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
4924         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
4925         * modules/yesno (EXTRA_DIST): Add yesno.h.
4926
4927 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
4928
4929         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
4930
4931         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
4932         * m4/dev-ino.m4, same-inode.m4: Remove.
4933
4934         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
4935         * m4/acl.m4 (AC_FUNC_ACL):
4936         * m4/backupfile.m4 (gl_BACKUPFILE):
4937         * m4/c-strtod.m4 (gl_C99_STRTOLD):
4938         * m4/canon-host.m4 (gl_CANON_HOST):
4939         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4940         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
4941         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
4942         * m4/cloexec.m4 (gl_CLOEXEC):
4943         * m4/close-stream.m4 (gl_CLOSE_STREAM):
4944         * m4/closeout.m4 (gl_CLOSEOUT):
4945         * m4/dirfd.m4 (gl_FUNC_DIRFD):
4946         * m4/dirname.m4 (gl_DIRNAME):
4947         * m4/exclude.m4 (gl_EXCLUDE):
4948         * m4/exitfail.m4 (gl_EXITFAIL):
4949         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
4950         * m4/file-type.m4 (gl_FILE_TYPE):
4951         * m4/filemode.m4 (gl_FILEMODE):
4952         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
4953         * m4/fpending.m4 (gl_FUNC_FPENDING):
4954         * m4/fprintftime.m4 (gl_FPRINTFTIME):
4955         * m4/fts.m4 (gl_FUNC_FTS):
4956         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
4957         * m4/getdate.m4 (gl_GETDATE):
4958         * m4/gethrxtime.m4 (gl_GETHRXTIME):
4959         * m4/getpagesize.m4 (gl_GETPAGESIZE):
4960         * m4/getpass.m4 (gl_FUNC_GETPASS):
4961         * m4/gettime.m4 (gl_GETTIME):
4962         * m4/getugroups.m4 (gl_GETUGROUPS):
4963         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
4964         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
4965         * m4/hard-locale.m4 (gl_HARD_LOCALE):
4966         * m4/hash.m4 (gl_HASH):
4967         * m4/idcache.m4 (gl_IDCACHE):
4968         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
4969         * m4/lchown.m4 (gl_FUNC_LCHOWN):
4970         * m4/long-options.m4 (gl_LONG_OPTIONS):
4971         * m4/lstat.m4 (gl_FUNC_LSTAT):
4972         * m4/md5.m4 (gl_MD5):
4973         * m4/memcasecmp.m4 (gl_MEMCASECMP):
4974         * m4/memcoll.m4 (gl_MEMCOLL):
4975         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
4976         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
4977         * m4/memxor.m4 (gl_MEMXOR):
4978         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
4979         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
4980         * m4/modechange.m4 (gl_MODECHANGE):
4981         * m4/mountlist.m4 (gl_MOUNTLIST):
4982         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4983         * m4/openat.m4 (gl_FUNC_OPENAT):
4984         * m4/pathmax.m4 (gl_PATHMAX):
4985         * m4/physmem.m4 (gl_PHYSMEM):
4986         * m4/posixtm.m4 (gl_POSIXTM):
4987         * m4/posixver.m4 (gl_POSIXVER):
4988         * m4/quote.m4 (gl_QUOTE):
4989         * m4/quotearg.m4 (gl_QUOTEARG):
4990         * m4/readtokens.m4 (gl_READTOKENS):
4991         * m4/readutmp.m4 (gl_READUTMP):
4992         * m4/regex.m4 (gl_REGEX):
4993         * m4/safe-read.m4 (gl_SAFE_READ):
4994         * m4/safe-write.m4 (gl_SAFE_WRITE):
4995         * m4/same.m4 (gl_SAME):
4996         * m4/save-cwd.m4 (gl_SAVE_CWD):
4997         * m4/savedir.m4 (gl_SAVEDIR):
4998         * m4/settime.m4 (gl_SETTIME):
4999         * m4/sha1.m4 (gl_SHA1):
5000         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5001         * m4/stat-macros.m4 (gl_STAT_MACROS):
5002         * m4/stat-time.m4 (gl_STAT_TIME):
5003         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5004         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5005         * m4/strdup.m4 (gl_FUNC_STRDUP):
5006         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5007         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5008         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5009         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5010         * m4/time_r.m4 (gl_TIME_R):
5011         * m4/timespec.m4 (gl_TIMESPEC):
5012         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5013         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5014         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5015         * m4/userspec.m4 (gl_USERSPEC):
5016         * m4/utimecmp.m4 (gl_UTIMECMP):
5017         * m4/utimens.m4 (gl_UTIMENS):
5018         * m4/xalloc.m4 (gl_XALLOC):
5019         * m4/xgetcwd.m4 (gl_XGETCWD):
5020         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5021         * m4/xreadlink.m4 (gl_XREADLINK):
5022         * m4/xstrtod.m4 (gl_XSTRTOD):
5023         * m4/yesno.m4 (gl_YESNO):
5024         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5025         to get the necessary .h files and whatnot.
5026
5027 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5028             Bruno Haible  <bruno@clisp.org>
5029
5030         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5031         /bin/sh understanding of '!' conditional negation.
5032
5033 2006-08-21  Jim Meyering  <jim@meyering.net>
5034
5035         * modules/openat (Depends-on): Really alphabetize.
5036
5037         * modules/acl (Depends-on): Add error and quote.
5038
5039         * check-module (find_included_lib_files): Add at-func.c to the
5040         ok-to-include-more-than-once white list.
5041
5042         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5043
5044 2006-08-21  Bruno Haible  <bruno@clisp.org>
5045
5046         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5047         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5048         Reported by Martin Lambers <marlam@marlam.de>.
5049
5050 2006-08-21  Bruno Haible  <bruno@clisp.org>
5051
5052         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5053         specify an installation location, don't emit a noinst_LIBRARIES or
5054         noinst_LTLIBRARIES assignment.
5055
5056 2006-08-21  Bruno Haible  <bruno@clisp.org>
5057
5058         BeOS portability.
5059         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5060         BeOS has mbrtowc() but no <wctype.h>.
5061
5062 2006-08-21  Bruno Haible  <bruno@clisp.org>
5063
5064         BeOS portability.
5065         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5066         exist.
5067
5068 2006-08-21  Bruno Haible  <bruno@clisp.org>
5069
5070         BeOS portability.
5071         * lib/mbchar.h: Include <wctype.h> only if it exists.
5072
5073 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5074
5075         Remove files that are no longer needed by their respective modules.
5076         * m4/obstack.m4: Remove.
5077         * m4/strerror_r.m4: Remove.
5078         * m4/uint32_t.m4: Remove.
5079         * m4/uintptr_t.m4: Remove.
5080         * m4/ullong_max.m4: Remove.
5081         * m4/xstrtoimax.m4: Remove.
5082         * m4/xstrtoumax.m4: Remove.
5083
5084         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5085         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5086         dependencies now capture this.
5087
5088         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5089         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5090         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5091         * m4/human.m4 (gl_HUMAN): Likewise.
5092         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5093         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5094
5095         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5096
5097         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5098         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5099         stdint.
5100         * m4/human.m4 (gl_HUMAN): Likewise.
5101         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5102         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5103         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5104         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5105         * m4/xstrtol (gl_XSTRTOL): Likewise.
5106
5107         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5108         AC_TYPE_LONG_LONG_INT.
5109         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5110         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5111         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5112         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5113
5114         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5115         on stdbool.
5116
5117         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5118         (gl_PREREQ_XSTRTOUL): Remove.
5119
5120         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5121
5122         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5123         mode.
5124
5125 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5126
5127         Add and change modules to make it easier for coreutils to use
5128         gnulib-tool.
5129         * modules/backupfile (Files): Remove m4/d-ino.m4.
5130         (Depends-on): Add d-ino.
5131         * modules/cycle-check (Depends-on): Add stdint.
5132         (lib_SOURCES): Add cycle-check.h.
5133         * modules/d-ino: New module.
5134         * modules/d-type: New module.
5135         * modules/error (Files): Remove m4/strerror_r.m4.
5136         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5137         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5138         m4/inttypes_h.m4, m4/uintmax_t.m4.
5139         (Depends-on): Add stdint.
5140         (lib_SOURCES): Add fsusage.h.
5141         * modules/getcwd (Files): Remove d-ino.m4.
5142         (Depends-on): Add d-ino.
5143         * modules/getndelim2 (Depends-on): Add stdint.
5144         * modules/glob (Files): Remove m4/d-type.m4.
5145         (Depends-on): Add d-type.
5146         * modules/host-os: New module.
5147         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5148         m4/inttypes_h.m4, m4/uintmax_t.m4.
5149         * Depends-on: Add stdint.
5150         (lib_SOURCES): Add human.h.
5151         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5152         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5153         m4/uintmax_t.m4, m4/ulonglong.m4.
5154         (Depends-on): Add stdint.
5155         (EXTRA_DIST): Add inttostr.h.
5156         * modules/lchmod: New module.
5157         * modules/link-follow: New module.
5158         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5159         (Depends-on): Add lchmod.
5160         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5161         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5162         (Depends-on): Add stdint.
5163         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5164         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5165         (Depends-on): Add stdint.
5166         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5167         * modules/perl: New module.
5168         * modules/regex (Depends-on): Add stdint.
5169         * modules/rmdir-errno: New module.
5170         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5171         m4/intmax_t.m4.
5172         (Depends-on): Add stdint.
5173         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5174         m4/uintmax_t.m4.
5175         (Depends-on): Add stdint.
5176         * modules/unlink-busy: New module.
5177         * modules/utimecmp (Depends-on): Add stdint.
5178         * modules/uptime: New module.
5179         * modules/winsz-ioctl: New module.
5180         * modules/winsz-termios: New module.
5181         * modules/xnanosleep (Depends-on): Add nanosleep.
5182         * modules/ullong_max: Remove.
5183         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5184         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5185         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5186         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5187         (Depends-on): Add inttypes.
5188         (lib_SOURCES): Add xstrtol.h.
5189         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5190         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5191         * MODULES.html.sh: Move 'assert' into the assert section.
5192         Move 'dummy' into the linking section.
5193         Remove ullong_max.
5194         Add section for compatibility checks for POSIX:2001 functions,
5195         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5196         winsz-ioctl, and winsz-termios into it.
5197         Add lchmod.
5198         Add top-level Misc section and put host-os, perl, and uptime
5199         into it.
5200
5201 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5202
5203         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5204         now assume the stdint module.  Do not include inttypes.h.
5205         * lib/fsusage.h: Likewise.
5206         * lib/getndelim2.c: Likewise.
5207         * lib/human.h: Likewise.
5208         * lib/inttostr.h: Likewise.
5209         * lib/obstack.c: Likewise.
5210         * lib/regex_internal.h: Likewise.
5211         * lib/tempname.c: Likewise.
5212         * lib/utimecmp.c: Likewise.
5213         * lib/xstrtol.h: Likewise.
5214
5215         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5216
5217         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5218         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5219         * lib/xtime.h: Likewise.
5220
5221 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5222
5223         * modules/openat (Files): Add lib/fchmodat.c.
5224         Fixes problem reported by Jay Youngman.
5225
5226 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5227
5228         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5229         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5230
5231 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5232             Bruno Haible  <bruno@clisp.org>
5233
5234         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5235         and is a script that invokes bison. Tighten the code. Add comments.
5236
5237 2006-08-18  Jim Meyering  <jim@meyering.net>
5238
5239         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5240         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5241         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5242         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5243
5244 2006-08-18  Bruno Haible  <bruno@clisp.org>
5245
5246         * modules/bison-i18n: New file.
5247         * MODULES.html.sh (Internationalization functions): Add it.
5248
5249 2006-08-18  Bruno Haible  <bruno@clisp.org>
5250
5251         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5252         sys/statvfs.h. When getmntinfo was found, check its declaration and
5253         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5254
5255 2006-08-18  Bruno Haible  <bruno@clisp.org>
5256
5257         * m4/bison-i18n.m4: New file, from bison.
5258
5259 2006-08-18  Bruno Haible  <bruno@clisp.org>
5260
5261         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5262         (ME_DUMMY): Treat "kernfs" as a dummy.
5263         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5264
5265 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5266
5267         Update from coreutils.
5268
5269         2006-08-15  Jim Meyering  <jim@meyering.net>
5270
5271         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5272
5273         2006-01-17  Jim Meyering  <jim@meyering.net>
5274
5275         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5276
5277         2006-01-11  Jim Meyering  <jim@meyering.net>
5278
5279         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5280         Check for the lchmod function.
5281
5282 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5283
5284         Update from coreutils.
5285
5286         * lib/__fpending.h: Add copyright notice.
5287         * lib/fprintftime.h: Likewise.
5288         * lib/savedir.c: Use (C) in copyright notice.
5289         * lib/savedir.h: Likewise.
5290
5291         2006-08-15  Jim Meyering  <jim@meyering.net>
5292
5293         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5294         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5295         in support of the EXPECTED_ERRNO macro.
5296         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5297         definitions.  Instead, define the appropriate symbols and include
5298         "at-func.c".
5299         * lib/mkdirat.c (mkdirat): Likewise.
5300         * lib/fchmodat.c (fchmodat): Likewise.
5301         (ENOSYS): Remove definition.
5302         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5303         it.  Don't include "unistd--.h" -- it wasn't ever used.
5304
5305         2006-01-17  Jim Meyering  <jim@meyering.net>
5306
5307         Rewrite fts.c not to change the current working directory,
5308         by using openat, fstatat, fdopendir, etc..
5309
5310         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5311         (HAVE_OPENAT_SUPPORT): Define.
5312         [_LIBC] (fchdir): Don't undef or define; no longer used.
5313         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5314         Now, this `function' always succeeds, and consumes its file descriptor
5315         parameter -- so callers must not close such FDs.  Update callers.
5316         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5317         (diropen): Add parameter, SP.  Adjust all callers.
5318         Implement using diropen_fd, rather than open.
5319         (fts_open): Initialize new member, fts_cwd_fd.
5320         Remove fts_rft-setting code.
5321         (fts_close): Close fts_cwd_fd, if necessary.
5322         (__opendir2): Define in terms of opendir or opendirat,
5323         depending on whether the FST_NOCHDIR flag is set.
5324         (fts_build): Since fts_safe_changedir consumes its FD, and since
5325         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5326         and close the dup'd file descriptor upon failure.
5327         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5328         (fts_safe_changedir): Tweak semantics to reflect that this function
5329         now calls cwd_advance_fd and hence consumes its FD argument.
5330         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5331         [struct FTS] (fts_rft): Remove now-unused member.
5332         [struct FTS] (fts_cycle.state): Improve comment.
5333
5334         * lib/openat.c (openat_needs_fchdir): New function.
5335         * lib/openat.h (openat_needs_fchdir): Declare it.
5336
5337 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5338
5339         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5340         Problem and fix reported by Pádraig Brady in
5341         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5342
5343 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5344
5345         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5346
5347 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5348
5349         * lib/memcoll.c (memcoll): Optimize for the common case where the
5350         arguments are bytewise equal.
5351
5352 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5353
5354         * doc/regexprops-generic.texi: Add a copyright notice.
5355
5356 2006-08-15  Bruno Haible  <bruno@clisp.org>
5357
5358         * modules/tmpdir (License): Change to LGPL.
5359
5360 2006-08-15  Bruno Haible  <bruno@clisp.org>
5361
5362         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5363         module.
5364
5365 2006-08-14  Simon Josefsson  <jas@extundo.com>
5366
5367         * config/srclist.txt: Add gnupload.
5368
5369 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5370
5371         Change copyright notice from LGPL 2 to GPL 2, since that's the
5372         standard form used in the gnulib repository.
5373         * tests/test-lock.c: Likewise.
5374         * tests/test-stdint.c: Likewise.
5375         * tests/test-tls.c: Likewise.
5376
5377         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5378         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5379         Add copyright notice.
5380
5381         * check-module: Add copyright notice.  Output a copyright
5382         notice if "--version" is specified.
5383         * modules/COPYING: New file.
5384         * tests/test-getaddrinfo.c: Add copyright notice.
5385         * tests/test-verify.c: Likewise.
5386
5387 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5388
5389         Change copyright notice from LGPL 2 to GPL 2, since that's the
5390         standard form used in the gnulib repository.
5391         * lib/lock.c: LGPL -> GPL.
5392         * lib/lock.h: Likewise.
5393         * lib/strnlen1.c: Likewise.
5394         * lib/strnlen1.h: Likewise.
5395         * lib/tls.c: Likewise.
5396         * lib/tls.h: Likewise.
5397         * lib/tmpdir.c: Likewise.
5398
5399         * lib/TODO: Remove; this belongs only in coreutils.
5400
5401 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5402
5403         Add copyright notices to long-enough files that lack them, since
5404         otherwise the files aren't clearly free.  Use the same notice that
5405         getdate.texi already uses.
5406         * doc/alloca-opt.texi: Add copyright notice.
5407         * doc/alloca.texi: Likewise.
5408         * doc/ctime.texi: Likewise.
5409         * doc/functions.texi: Likewise.
5410         * doc/gcd.texi: Likewise.
5411         * doc/gnulib-tool.texi: Likewise.
5412         * doc/inet_ntoa.texi: Likewise.
5413         * doc/visibility.texi: Likewise.
5414
5415         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5416         * doc/quote.texi: Add copyright notice.
5417
5418         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5419         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5420         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5421         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5422         is now obsolete, and give a pointer to the Sun list.
5423         Add copyright notice.
5424
5425 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5426
5427         * config/srclistvars.sh: Add copyright notice.
5428
5429 2006-08-14  Eric Blake  <ebb9@byu.net>
5430
5431         Import the following change from libc:
5432
5433         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5434
5435         Upstream bug 2997.
5436         * lib/misc/error.c: Add space between program name and message if file
5437         name is missing.
5438
5439 2006-08-12  Karl Berry  <karl@gnu.org>
5440
5441         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5442         remove, these originate in gnulib now.
5443
5444 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5445
5446         * doc/Makefile (standards.info standards.html standards.dvi):
5447         Also depend on make-stds.texi.
5448
5449 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5450
5451         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5452         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5453
5454         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5455         in wchar_t.  Problem reported by Eric Blake.
5456
5457         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5458         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5459         Also, help the compiler to keep LEN in a register.
5460
5461 2006-08-11  Eric Blake  <ebb9@byu.net>
5462
5463         * users.txt: Sort.  Add tar.
5464
5465 2006-08-11  Bruno Haible  <bruno@clisp.org>
5466
5467         * users.txt: New file.
5468
5469 2006-08-11  Bruno Haible  <bruno@clisp.org>
5470
5471         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5472         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5473
5474 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5475
5476         * modules/snprintf (Depends-on): Remove minmax.
5477         (Maintainer): Add self and Bruno.
5478
5479 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5480
5481         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5482         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5483         (EOVERFLOW): Define if the system does not.
5484         Do not include "minmax.h"; it wasn't used.
5485         (snprintf): Don't assume size_t promotes to an unsigned type.
5486         Fix bug when generated string was too long for the buffer: the
5487         buffer's contents are supposed to be the initial prefix of the
5488         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5489         exceeds INT_MAX; do the check ourselves.
5490
5491         Import the following changes from libc:
5492
5493         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5494
5495         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5496         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5497         set wc to the byte which couldn't be converted.
5498         (re_string_reconstruct): Don't clear valid_raw_len before calling
5499         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5500         tip_context using re_string_context_at.
5501
5502         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5503
5504         * lib/posix/regex.h: g++ still cannot handled [restrict].
5505
5506         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
5507
5508         * lib/posix/regex.h: Remove special handling for VMS.
5509
5510 2006-08-10  Jim Meyering  <jim@meyering.net>
5511
5512         * modules/same-inode: New module.
5513         * modules/dev-ino: New module.
5514         * modules/cycle-check: Depend on these modules, rather than simply
5515         including their .h files.
5516         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
5517         required via m4/cycle-check.m4.
5518         * modules/same: Depend on new same-inode module, rather than
5519         including same-inode.h.
5520         * modules/chdir-safer: New file.
5521
5522         * modules/chown (Depends-on): Add stat-macros.
5523
5524 2006-08-10  Jim Meyering  <jim@meyering.net>
5525
5526         * m4/cycle-check.m4: New file.
5527         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
5528         * m4/dev-ino.m4, m4/same-inode.m4: New files.
5529
5530 2006-08-10  Eric Blake  <ebb9@byu.net>
5531
5532         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
5533         in from original proposal.
5534
5535 2006-08-10  Eric Blake  <ebb9@byu.net>
5536         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5537
5538         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
5539         namespace.
5540
5541 2006-08-10  Bruno Haible  <bruno@clisp.org>
5542
5543         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
5544         as well.
5545
5546 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5547
5548         Sync from coreutils.
5549
5550         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
5551
5552         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
5553         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
5554
5555 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5556
5557         * modules/restrict: Remove; no longer needed now that we assume
5558         Autoconf 2.59 or later.
5559         * MODULES.html.sh: Remove 'restrict'.
5560         * modules/argp (Depends-on): Remove 'restrict'.
5561         * modules/base64 (Depends-on): Likewise.
5562         * modules/gc (Depends-on): Likewise.
5563         * modules/getaddrinfo (Depends-on): Likewise.
5564         * modules/glob (Depends-on): Likewise.
5565         * modules/inet_ntop (Depends-on): Likewise.
5566         * modules/inet_pton (Depends-on): Likewise.
5567         * modules/memxor (Depends-on): Likewise.
5568         * modules/regex (Depends-on): Likewise.
5569         * modules/strtok_r (Depends-on): Likewise.
5570         * modules/time_r (Depends-on): Likewise.
5571
5572 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
5573
5574         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
5575         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
5576         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5577         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
5578         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
5579         * m4/memxor.m4 (gl_MEMXOR): Likewise.
5580         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
5581         gl_C_RESTRICT replaced by AC_C_RESTRICT.
5582
5583         Merge from coreutils.
5584         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
5585         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
5586         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5587         * m4/time_r.m4 (gl_TIME_R): Likewise.
5588
5589 2006-08-09  Karl Berry  <karl@gnu.org>
5590
5591         * config/srclist.txt: no more gettext-tools, per Bruno.
5592
5593 2006-08-08  Eric Blake  <ebb9@byu.net>
5594
5595         * modules/verror: New module.
5596         * MODULES.html.sh: Document it.
5597
5598 2006-08-08  Eric Blake  <ebb9@byu.net>
5599
5600         * lib/verror.h, lib/verror.c: New files.
5601
5602 2006-08-08  Eric Blake  <ebb9@byu.net>
5603
5604         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
5605         verror_at_line output complies with GNU Coding Standards even when
5606         file is NULL.
5607
5608 2006-08-07  Bruno Haible  <bruno@clisp.org>
5609
5610         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
5611         versions of AIX.
5612         Reported by Ralf Wildenhues.
5613
5614 2006-08-07  Bruno Haible  <bruno@clisp.org>
5615
5616         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
5617         in an AC_DEFUN. Needed so that the autoconf snippets can use
5618         AC_REQUIRE.
5619
5620 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5621
5622         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5623         Initialize pkgdata_DATA.
5624         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
5625         overriding it.
5626
5627 2006-08-06  Eric Blake  <ebb9@byu.net>
5628
5629         * lib/error.h: Fold in some upstream changes from glibc.
5630         * lib/error.c: Likewise.
5631
5632 2006-08-04  Bruno Haible  <bruno@clisp.org>
5633
5634         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5635         Make the mostlyclean-local rule depend on mostlyclean-generic.
5636         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
5637
5638 2006-07-31  Bruno Haible  <bruno@clisp.org>
5639
5640         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
5641         <stdlib.h>, <string.h>.
5642
5643 2006-07-30  Bruno Haible  <bruno@clisp.org>
5644
5645         * modules/readlink (License): Change to LGPL.
5646
5647 2006-07-30  Bruno Haible  <bruno@clisp.org>
5648
5649         * modules/javaversion (Makefile.am): Distribute javaversion.java and
5650         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
5651         set PKGDATADIR to point to it.
5652
5653 2006-07-30  Bruno Haible  <bruno@clisp.org>
5654
5655         * modules/csharpexec (configure.ac): Comment out macro invocation.
5656         * modules/javaexec (configure.ac): Likewise.
5657         * modules/javacomp-script (configure.ac): Likewise.
5658
5659         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
5660
5661 2006-07-30  Bruno Haible  <bruno@clisp.org>
5662
5663         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
5664         linked-list.
5665
5666 2006-07-30  Bruno Haible  <bruno@clisp.org>
5667
5668         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
5669
5670 2006-07-30  Bruno Haible  <bruno@clisp.org>
5671
5672         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5673         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
5674         get removed.
5675
5676 2006-07-29  Bruno Haible  <bruno@clisp.org>
5677
5678         Make it possible for gnulib-tool to work with locally modified or
5679         augmented gnulib repositories.
5680         * gnulib-tool (func_usage): Document --local-dir option.
5681         (local_gnulib_dir): New variable.
5682         Handle --local-dir option.
5683         (func_lookup_file): New function.
5684         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
5685         (func_get_description, func_get_filelist, func_get_description,
5686         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
5687         func_get_automake_snippet, func_get_include_directive,
5688         func_get_license, func_get_maintainer): Use func_lookup_file.
5689         (func_import, func_create_testdir): Use func_lookup_file.
5690
5691 2006-07-29  Bruno Haible  <bruno@clisp.org>
5692
5693         * modules/setenv (Depends-on): Add unistd.
5694
5695 2006-07-29  Bruno Haible  <bruno@clisp.org>
5696
5697         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
5698
5699 2006-07-29  Bruno Haible  <bruno@clisp.org>
5700
5701         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
5702
5703 2006-07-29  Bruno Haible  <bruno@clisp.org>
5704
5705         * gnulib-tool (import, update): If there is no Makefile.am, look at
5706         aclocal.m4, instead of bailing out.
5707
5708 2006-07-29  Bruno Haible  <bruno@clisp.org>
5709
5710         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
5711         Categorize the options by when they are useful.
5712
5713 2006-07-29  Bruno Haible  <bruno@clisp.org>
5714
5715         * gnulib-tool (func_usage): Document option --no-libtool.
5716         Handle option --no-libtool.
5717         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
5718         for changed semantics of $libtool variable.
5719         (func_import): Likewise. If libtool is not used, show this through
5720         an option --no-libtool.
5721         (func_create_testdir): Update.
5722
5723 2006-07-29  Bruno Haible  <bruno@clisp.org>
5724
5725         * gnulib-tool (func_import): Extend error message about missing
5726         --doc-base.
5727
5728 2006-07-29  Bruno Haible  <bruno@clisp.org>
5729
5730         * gnulib-tool (func_import): Don't create the $docbase directory if
5731         there is no file to store there.
5732
5733 2006-07-29  Bruno Haible  <bruno@clisp.org>
5734
5735         * gnulib-tool (autoconf_minversion): If a --dir option is given and
5736         relevant, look for configure.ac there, not in the current directory.
5737         Also use a simple search for AC_PREREQ, not "autoconf --trace".
5738
5739 2006-07-29  Bruno Haible  <bruno@clisp.org>
5740
5741         * gnulib-tool (SORT): New variable.
5742         (func_usage): Undocument --assume-autoconf option.
5743         Remove --assume-autoconf option handling.
5744         (autoconf_minversion): Determine from the contents of configure.ac.
5745         (func_import): Remove autoconf_minversion handling.
5746         Suggested by Eric Blake.
5747
5748 2006-07-29  Bruno Haible  <bruno@clisp.org>
5749
5750         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
5751
5752 2006-07-29  Bruno Haible  <bruno@clisp.org>
5753
5754         * config/srclist.txt (*setenv.[ch]): Remove rules.
5755
5756 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5757
5758         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
5759
5760 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5761
5762         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
5763         arpa/inet.h.
5764
5765 2006-07-28  Simon Josefsson  <jas@extundo.com>
5766
5767         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
5768         * modules/inet_pton (Depends-on): Likewise.
5769
5770 2006-07-28  Simon Josefsson  <jas@extundo.com>
5771
5772         * m4/netinet_in_h.m4: New file.
5773
5774 2006-07-28  Simon Josefsson  <jas@extundo.com>
5775
5776         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
5777         #include's.
5778
5779 2006-07-28  Simon Josefsson  <jas@extundo.com>
5780
5781         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
5782         #include's.
5783
5784 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
5785
5786         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
5787         setgid on directories only if they set these bits.
5788         * lib/modechange.h: Remove obsolete comment about masks.
5789
5790 2006-07-28  Eric Blake  <ebb9@byu.net>
5791
5792         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
5793         macro expansion.
5794
5795 2006-07-28  Bruno Haible  <bruno@clisp.org>
5796
5797         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
5798
5799 2006-07-28  Bruno Haible  <bruno@clisp.org>
5800
5801         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
5802
5803 2006-07-28  Bruno Haible  <bruno@clisp.org>
5804
5805         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
5806         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
5807         Define fallbacks.
5808         Avoids link error on FreeBSD 4.x.
5809         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
5810
5811         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
5812         encoding.
5813         * lib/mbswidth.c (iswcntrl): Likewise.
5814
5815 2006-07-27  Bruno Haible  <bruno@clisp.org>
5816
5817         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
5818         test.
5819
5820 2006-07-27  Bruno Haible  <bruno@clisp.org>
5821
5822         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
5823         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
5824         defined.
5825
5826 2006-07-26  Eric Blake  <ebb9@byu.net>
5827
5828         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
5829
5830 2006-07-26  Eric Blake  <ebb9@byu.net>
5831
5832         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
5833         like mingw that lack mkstemp.
5834         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
5835         avoid compilation warning on mingw.
5836
5837 2006-07-26  Bruno Haible  <bruno@clisp.org>
5838
5839         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
5840         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
5841         INT_FAST*_MIN, INTPTR_MIN.
5842
5843 2006-07-25  Bruno Haible  <bruno@clisp.org>
5844
5845         * modules/version-etc (Depends-on): Add stdarg.
5846
5847 2006-07-25  Bruno Haible  <bruno@clisp.org>
5848
5849         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
5850         complex commands.
5851
5852 2006-07-25  Bruno Haible  <bruno@clisp.org>
5853
5854         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
5855         defined in <stdarg.h> or config.h.
5856
5857 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5858
5859         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
5860         (gl_STDIO_SAFER): Remove.
5861
5862 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
5863
5864         * MODULES.html.sh (File stream based Input/Output):
5865         Add fopen-safer, tmpfile-safer; remove stdio-safer.
5866         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
5867         * modules/fopen-safer, modules/tmpfile-safer: New files.
5868         * modules/stdio-safer: Remove.
5869
5870 2006-07-24  Bruno Haible  <bruno@clisp.org>
5871
5872         * modules/tmpdir: New file.
5873         * MODULES.html.sh (File system functions): Add it.
5874
5875 2006-07-24  Bruno Haible  <bruno@clisp.org>
5876
5877         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
5878         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
5879
5880 2006-07-24  Bruno Haible  <bruno@clisp.org>
5881
5882         * modules/clean-temp: New file.
5883
5884 2006-07-24  Bruno Haible  <bruno@clisp.org>
5885
5886         * m4/tmpdir.m4: New file, from GNU gettext.
5887
5888 2006-07-24  Bruno Haible  <bruno@clisp.org>
5889
5890         * lib/tmpdir.h: New file, from GNU gettext.
5891         * lib/tmpdir.c: New file, from GNU gettext.
5892
5893 2006-07-24  Bruno Haible  <bruno@clisp.org>
5894
5895         * lib/clean-temp.h: New file, from GNU gettext.
5896         * lib/clean-temp.c: New file, from GNU gettext.
5897
5898 2006-07-23  Eric Blake  <ebb9@byu.net>
5899
5900         * modules/stdio-safer (Files): Add tmpfile-safer.c.
5901         (Depends-on): Add binary-io.
5902
5903 2006-07-23  Eric Blake  <ebb9@byu.net>
5904
5905         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
5906
5907 2006-07-23  Eric Blake  <ebb9@byu.net>
5908
5909         * lib/tmpfile-safer.c: New file.
5910         * lib/stdio-safer.h (fopen_safer): Add prototype.
5911         * lib/stdio--.h (tmpfile): Make safer.
5912
5913 2006-07-23  Bruno Haible  <bruno@clisp.org>
5914
5915         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
5916         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
5917         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
5918         gl_linked_remove_at): Use it.
5919
5920 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5921         and Simon Josefsson <jas@extundo.com>
5922
5923         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
5924
5925         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
5926
5927 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5928
5929         * modules/close-stream: New file.
5930         * modules/closeout (Description): Make it clear that it exits
5931         with a diagnostic on error.
5932         (Depends-on): Add close-stream.  Remove fpending, stdbool.
5933         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
5934
5935 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5936
5937         * m4/close-stream.m4: New file.
5938
5939 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
5940
5941         * lib/close-stream.c, lib/close-stream.h: New files.
5942
5943 2006-07-22  Bruno Haible  <bruno@clisp.org>
5944
5945         Merge from GNU gettext 0.15.
5946
5947         2006-05-01  Bruno Haible  <bruno@clisp.org>
5948
5949                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
5950
5951         2006-07-22  Bruno Haible  <bruno@clisp.org>
5952
5953                 * modules/javaversion: New file.
5954                 * MODULES.html.sh (Java): Add javaversion.
5955
5956         2006-03-12  Bruno Haible  <bruno@clisp.org>
5957
5958                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
5959
5960         2005-12-04  Bruno Haible  <bruno@clisp.org>
5961
5962                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
5963                 (untested).
5964
5965         2006-06-21  Bruno Haible  <bruno@clisp.org>
5966
5967                 Avoid warnings from recent versions of mcs.
5968                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
5969                 -o, -L, -r any more. Use options documented since mcs-1.0
5970                 instead. Similarly for -g.
5971
5972         2005-12-04  Bruno Haible  <bruno@clisp.org>
5973
5974                 * build-aux/csharpcomp.sh.in: Suffix for resources is
5975                 .resources, not .resource.
5976
5977         2005-07-09  Bruno Haible  <bruno@clisp.org>
5978
5979                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
5980                 add a .dll suffix.
5981                 Reported by Mark Junker <mjscod@gmx.de>.
5982
5983         2006-07-22  Bruno Haible  <bruno@clisp.org>
5984
5985                 * modules/gettext: Upgrade to gettext-0.15.
5986                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
5987                 m4/visibility.m4.
5988                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
5989
5990 2006-07-22  Bruno Haible  <bruno@clisp.org>
5991
5992         Merge from GNU gettext 0.15.
5993
5994         2006-03-25  Bruno Haible  <bruno@clisp.org>
5995
5996                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
5997
5998         2006-07-21  Bruno Haible  <bruno@clisp.org>
5999
6000                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6001                 "1.1".
6002
6003         2006-05-09  Bruno Haible  <bruno@clisp.org>
6004
6005                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6006                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6007                 for the conftestver execution.
6008
6009         2006-05-01  Bruno Haible  <bruno@clisp.org>
6010
6011                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6012                 optional target-version argument. Verify that the compiler
6013                 groks source of the specified source-version, or add -source
6014                 option as necessary. Verify that the compiler produces
6015                 bytecode in the specified target-version, or add -target and
6016                 -source options as necessary. Make the result of the test
6017                 available as variable CONF_JAVAC. Also log error output in
6018                 config.log.
6019
6020         2006-03-11  Bruno Haible  <bruno@clisp.org>
6021
6022                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6023
6024         2006-05-09  Bruno Haible  <bruno@clisp.org>
6025
6026                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6027                 CLASSPATH_SEPARATOR to a semicolon.
6028
6029         2006-03-12  Bruno Haible  <bruno@clisp.org>
6030
6031                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6032                 available as variable CONF_JAVA, for subsequent autoconf
6033                 tests. Also log error output in config.log.
6034
6035         2006-07-19  Bruno Haible  <bruno@clisp.org>
6036
6037                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6038                 that getline works on glibc2 systems. Needed to avoid trouble
6039                 in relocatable.c.
6040                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6041
6042         2005-12-04  Bruno Haible  <bruno@clisp.org>
6043
6044                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6045                 launcher (untested).
6046
6047         2005-12-04  Bruno Haible  <bruno@clisp.org>
6048
6049                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6050
6051         2006-07-22  Bruno Haible  <bruno@clisp.org>
6052
6053                 * gettext.m4: Update from GNU gettext-0.15.
6054                 * nls.m4: Likewise.
6055                 * po.m4: Likewise.
6056                 * inttypes-pri.m4: Likewise.
6057                 * inttypes-h.m4: Renamed from inttypes.m4.
6058                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6059
6060 2006-07-22  Bruno Haible  <bruno@clisp.org>
6061
6062         Merge from GNU gettext 0.15.
6063
6064         2005-07-05  Bruno Haible  <bruno@clisp.org>
6065
6066                 * printf-args.c (printf_fetchargs): Work around broken
6067                 definition of wint_t on mingw.
6068
6069         2005-02-12  Bruno Haible  <bruno@clisp.org>
6070
6071                 * xallocsa.h: Add extern "C" for C++.
6072
6073         2006-05-17  Bruno Haible  <bruno@clisp.org>
6074
6075                 Cygwin portability.
6076                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6077
6078         2006-04-30  Bruno Haible  <bruno@clisp.org>
6079
6080                 * progreloc.c: Include <mach-o/dyld.h> if available.
6081                 (find_executable): Use _NSGetExecutablePath when possible.
6082
6083         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6084
6085                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6086                 function.
6087
6088         2005-12-29  Bruno Haible  <bruno@clisp.org>
6089
6090                 * progreloc.c (set_program_name_and_installdir): Fix
6091                 compilation error.
6092
6093         2005-12-04  Bruno Haible  <bruno@clisp.org>
6094
6095                 Cygwin portability.
6096                 * progreloc.c: Include <windows.h> also on Cygwin.
6097                 (find_executable): Add support for Cygwin.
6098                 (set_program_name_and_installdir): Handle also platforms with
6099                 nonempty EXEEXT.
6100
6101         2006-07-11  Bruno Haible  <bruno@clisp.org>
6102
6103                 * javacomp.c: Fix a comment.
6104                 Reported by Jim Meyering.
6105
6106         2006-04-30  Bruno Haible  <bruno@clisp.org>
6107
6108                 * javacomp.h (compile_java_class): Add source_version,
6109                 target_version arguments.
6110                 * javacomp.c: Rewritten to choose only a compiler that
6111                 respects the specified source_version and target_version.
6112
6113         2006-06-27  Bruno Haible  <bruno@clisp.org>
6114
6115                 Assume correct S_ISDIR macro.
6116                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6117
6118         2006-07-22  Bruno Haible  <bruno@clisp.org>
6119
6120                 * javaversion.h: New file, from GNU gettext.
6121                 * javaversion.c: New file, from GNU gettext.
6122                 * javaversion.java: New file, from GNU gettext.
6123                 * javaversion.class: New file, from GNU gettext.
6124
6125         2006-05-17  Bruno Haible  <bruno@clisp.org>
6126
6127                 Cygwin portability.
6128                 * javaexec.c (execute_java_class): Test for jview program
6129                 also on Cygwin.
6130
6131         2006-04-09  Bruno Haible  <bruno@clisp.org>
6132
6133                 * fatal-signal.c: Don't include string.h.
6134                 (at_fatal_signal): Use a copying loop instead of memcpy.
6135
6136         2005-12-04  Bruno Haible  <bruno@clisp.org>
6137
6138                 * csharpexec.c: Add support for 'clix' launcher (untested).
6139                 (execute_csharp_using_sscli): New function.
6140                 (execute_csharp_program): Call it.
6141
6142         2006-06-21  Bruno Haible  <bruno@clisp.org>
6143
6144                 Avoid warnings from recent versions of mcs.
6145                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6146                 -o, -L, -r any more. Use options documented since mcs-1.0
6147                 instead. Similarly for -g.
6148
6149         2005-07-09  Bruno Haible  <bruno@clisp.org>
6150
6151                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6152                 add a .dll suffix.
6153                 Reported by Mark Junker <mjscod@gmx.de>.
6154
6155         2006-06-17  Bruno Haible  <bruno@clisp.org>
6156
6157                 * config.charset: Update for NetBSD 3.0.
6158
6159         2006-05-17  Bruno Haible  <bruno@clisp.org>
6160
6161                 Cygwin portability.
6162                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6163
6164         2006-05-16  Bruno Haible  <bruno@clisp.org>
6165
6166                 * localcharset.c [CYGWIN]: Include <windows.h>.
6167                 (get_charset_aliases): For Cygwin, return the same CPxxx
6168                 aliases list as under WIN32.
6169                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6170                 the environment variables. Fall back to GetACP().
6171
6172         2006-04-05  Bruno Haible  <bruno@clisp.org>
6173
6174                 * config.charset: Update Juan Manuel Guerrero's address.
6175
6176         2005-02-12  Bruno Haible  <bruno@clisp.org>
6177
6178                 * allocsa.h: Add extern "C" for C++.
6179
6180         2005-02-10  Bruno Haible  <bruno@clisp.org>
6181
6182                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6183                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6184
6185         2006-07-22  Bruno Haible  <bruno@clisp.org>
6186
6187                 * gettext.h: Update to GNU gettext-0.15.
6188
6189 2006-07-22  Bruno Haible  <bruno@clisp.org>
6190
6191         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6192         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6193         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6194
6195 2006-07-21  Eric Blake  <ebb9@byu.net>
6196
6197         * modules/stdlib-safer: New file.
6198         * MODULES.html.sh (File stream based Input/Output): Add
6199         stdlib-safer.
6200
6201 2006-07-21  Eric Blake  <ebb9@byu.net>
6202
6203         * lib/stdlib-safer.h: New file from coreutils, required by
6204         stdlib--.h.
6205
6206 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6207
6208         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6209
6210 2006-07-20  Bruno Haible  <bruno@clisp.org>
6211
6212         * gnulib-tool: Recognize new option --assume-autoconf.
6213         (autoconf_minversion): New variable.
6214         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6215
6216 2006-07-20  Bruno Haible  <bruno@clisp.org>
6217
6218         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6219
6220 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6221
6222         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6223         Reindent and repaginate.
6224
6225 2006-07-19  Derek Price  <derek@ximbiot.com>
6226
6227         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6228         Correct grammar.
6229
6230 2006-07-17  Bruno Haible  <bruno@clisp.org>
6231
6232         * modules/list: New file.
6233         * modules/array-list: New file.
6234         * modules/carray-list, modules/carray-list-tests: New files.
6235         * modules/linked-list, modules/linked-list-tests: New files.
6236         * modules/avltree-list, modules/avltree-list-tests: New files.
6237         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6238         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6239         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6240         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6241         * modules/oset: New file.
6242         * modules/array-oset: New file.
6243         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6244         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6245         * tests/test-carray_list.c: New file.
6246         * tests/test-linked_list.c: New file.
6247         * tests/test-avltree_list.c: New file.
6248         * tests/test-rbtree_list.c: New file.
6249         * tests/test-linkedhash_list.c: New file.
6250         * tests/test-avltreehash_list.c: New file.
6251         * tests/test-rbtreehash_list.c: New file.
6252         * tests/test-avltree_oset.c: New file.
6253         * tests/test-rbtree_oset.c: New file.
6254         * MODULES.html.sh (Container data structures): New section.
6255
6256 2006-07-17  Bruno Haible  <bruno@clisp.org>
6257
6258         * m4/gl_list.m4: New file.
6259
6260 2006-07-17  Bruno Haible  <bruno@clisp.org>
6261
6262         * lib/gl_list.h: New file.
6263         * lib/gl_list.c: New file.
6264         * lib/gl_array_list.h: New file.
6265         * lib/gl_array_list.c: New file.
6266         * lib/gl_carray_list.h: New file.
6267         * lib/gl_carray_list.c: New file.
6268         * lib/gl_linked_list.h: New file.
6269         * lib/gl_linked_list.c: New file.
6270         * lib/gl_anylinked_list1.h: New file.
6271         * lib/gl_anylinked_list2.h: New file.
6272         * lib/gl_avltree_list.h: New file.
6273         * lib/gl_avltree_list.c: New file.
6274         * lib/gl_anyavltree_list1.h: New file.
6275         * lib/gl_anyavltree_list2.h: New file.
6276         * lib/gl_rbtree_list.h: New file.
6277         * lib/gl_rbtree_list.c: New file.
6278         * lib/gl_anyrbtree_list1.h: New file.
6279         * lib/gl_anyrbtree_list2.h: New file.
6280         * lib/gl_anytree_list1.h: New file.
6281         * lib/gl_anytree_list2.h: New file.
6282         * lib/gl_linkedhash_list.h: New file.
6283         * lib/gl_linkedhash_list.c: New file.
6284         * lib/gl_anyhash_list1.h: New file.
6285         * lib/gl_anyhash_list2.h: New file.
6286         * lib/gl_avltreehash_list.h: New file.
6287         * lib/gl_avltreehash_list.c: New file.
6288         * lib/gl_rbtreehash_list.h: New file.
6289         * lib/gl_rbtreehash_list.c: New file.
6290         * lib/gl_anytreehash_list1.h: New file.
6291         * lib/gl_anytreehash_list2.h: New file.
6292
6293         * lib/gl_oset.h: New file.
6294         * lib/gl_oset.c: New file.
6295         * lib/gl_array_oset.h: New file.
6296         * lib/gl_array_oset.c: New file.
6297         * lib/gl_avltree_oset.h: New file.
6298         * lib/gl_avltree_oset.c: New file.
6299         * lib/gl_rbtree_oset.h: New file.
6300         * lib/gl_rbtree_oset.c: New file.
6301         * lib/gl_anytree_oset.h: New file.
6302
6303 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6304
6305         * m4/mkancesdirs.m4: New file.
6306         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6307         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6308         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6309         it.
6310
6311 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6312
6313         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6314         * lib/mkancesdirs.h: New files.
6315         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6316         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6317         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6318         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6319         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6320         callers changed.  Revamp internals significantly, by not
6321         attempting to create directories that are temporarily more
6322         permissive than the final results.  Do not attempt to use
6323         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6324         This removes some race conditions, fixes some bugs, and simplifies
6325         things.  Use new dirchownmod function to do owner and mode changes.
6326         * lib/mkdir-p.h: Likewise.
6327         * lib/modechange.c (octal_to_mode): New function.
6328         (struct mode_change): New member mentioned.
6329         (make_node_op_equals): New arg mentioned.  All callers changed.
6330         (mode_compile): Keep track of which mode bits the user has explicitly
6331         mentioned.
6332         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6333         New arg PMODE_BITS, to keep track of which mode bits the user
6334         mentioned; it treats S_ISUID and S_ISGID speciall.
6335         All callers changed.
6336         * lib/modechange.h: Likewise.
6337
6338 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6339
6340         * MODULES.html.sh: Add mkancestors.
6341         * modules/mkancesdirs: New module.
6342         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6343         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6344         The chdir-safer and afs files are now orphans; I'll remove them
6345         unless someone speaks up.
6346         Add lib/dirchownmod.c, lib/dirchownmod.h.
6347         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6348         Add lchown, mkancesdirs.
6349         (Maintainer): Add self.
6350
6351 2006-07-15  Karl Berry  <karl@gnu.org>
6352
6353         * gnulib-tool: help message wording/arrangement.
6354
6355 2006-07-14  Simon Josefsson  <jas@extundo.com>
6356
6357         * doc/gnulib.texi (Libtool and Windows): New section.
6358
6359 2006-07-12  Simon Josefsson  <jas@extundo.com>
6360
6361         * modules/gendocs (License): Fix license, approved by Karl.
6362
6363 2006-07-12  Eric Blake  <ebb9@byu.net>
6364
6365         * MODULES.html.sh: Add gendocs.
6366
6367 2006-07-11  Eric Blake  <ebb9@byu.net>
6368
6369         * modules/fdl: New module, to install doc/fdl.texi.
6370         * MODULES.html.sh: Add new section for documentation modules.
6371         * gnulib-tool: Avoid space-tab.
6372         (--doc-base): New option, to manage files from doc.
6373
6374 2006-07-11  Eric Blake  <ebb9@byu.net>
6375
6376         * m4/absolute-header.m4: Fix comments to match recent change.
6377
6378 2006-07-11  Eric Blake  <ebb9@byu.net>
6379
6380         * gnulib-tool: List --doc-base before --tests-base.
6381
6382 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6383
6384         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6385
6386 2006-07-11  Bruno Haible  <bruno@clisp.org>
6387
6388         * README: Mention where to put documentation.
6389
6390 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6391
6392         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6393
6394 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6395
6396         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6397         to stdint.m4.
6398
6399 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6400
6401         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6402         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6403         "no/such/file/stdint.h" when there is no such file, so that
6404         the resulting C code can be parsed by dodgy compilers.
6405         Problems reported by Bob Proulx.
6406
6407 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6408
6409         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6410         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6411         macros into the GNU _D_EXACT_NAMLEN.
6412         * lib/savedir.c:  Likewise.
6413         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6414
6415 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6416         and Paul Eggert  <eggert@cs.ucla.edu>
6417
6418         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6419         * m4/savedir.m4:
6420         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6421         macros into the GNU _D_EXACT_NAMLEN.
6422
6423 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6424
6425         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6426         around the absolute name, to work around a problem with the HP-UX
6427         11.23 native C compiler, reported by Bob Proulx.
6428
6429 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6430
6431         * doc/maintain.texi, make-stds.texi: Sync from
6432         <http://savannah.gnu.org/projects/gnustandards>.
6433
6434 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6435
6436         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6437
6438 2006-07-09  Jim Meyering  <jim@meyering.net>
6439
6440         * m4/glob.m4: Remove a doubled word in a comment.
6441
6442 2006-07-09  Jim Meyering  <jim@meyering.net>
6443
6444         * lib/argp-pv.c: Remove a doubled word in a comment.
6445         * lib/check-version.c (check_version): Likewise.
6446         * lib/javacomp.c (compile_java_class): Likewise.
6447
6448 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6449
6450         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6451         for the benefit of people using Autoconf 2.60.  If you want to
6452         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6453         (or m4/onceonly.m4, if pre-2.57) manually.
6454
6455 2006-07-08  Jim Meyering  <jim@meyering.net>
6456
6457         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6458         comment.
6459         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6460         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6461         comment.
6462
6463 2006-07-08  Jim Meyering  <jim@meyering.net>
6464
6465         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6466
6467 2006-07-07  Simon Josefsson  <jas@extundo.com>
6468
6469         * tests/test-crc.c: Change expected crc value, the test vector
6470         were probably computed using the old broken crc.c?
6471
6472 2006-07-06  Simon Josefsson  <jas@extundo.com>
6473
6474         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6475         now the canonical place for the M4 file).
6476
6477         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6478         from the sys_socket dependency now.
6479
6480         * modules/inet_pton (Files): Ditto.
6481
6482         * modules/inet_ntop (Files): Ditto.
6483
6484 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6485
6486         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6487         not gl_PREREQ_GETUSERSHELL.
6488
6489 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6490
6491         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6492         with only one argument, for Autoconf 2.60.
6493         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6494         expand to nothing, so add a shell command to avoid syntax error.
6495         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6496
6497 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6498
6499         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6500
6501 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6502
6503         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6504         no longer needed.  Check for isblank decl.
6505         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
6506         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
6507         of existence.
6508
6509 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6510
6511         * lib/getloadavg.c: Use __VMS, not VMS.
6512         * lib/getopt.c: Likewise.
6513         * lib/getpagesize.h: Likewise.
6514         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
6515         and probably does not work.
6516
6517 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6518
6519         * lib/.cppi-disable: Add wcwidth.
6520         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
6521         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
6522         (ISGRAPH): Remove.  All uses changed to isgraph.
6523         (FOLD) [!defined _LIBC]: Remove special case.
6524         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
6525         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
6526         HAVE_ISBLANK.
6527         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
6528         case.
6529
6530 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
6531
6532         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
6533         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
6534         brackets.  Other minor changes to suppress some compiler
6535         warnings.
6536
6537 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6538         and Paul Eggert  <eggert@cs.ucla.edu>
6539
6540         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
6541         of invoking obsolescent AC_HEADER_DIRENT macro.
6542         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
6543         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
6544         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
6545         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
6546         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
6547         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6548         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
6549         * m4/readdir.m4: Remove; no longer needed.
6550
6551 2006-07-06  Derek R. Price  <derek@ximbiot.com>
6552         and Paul Eggert  <eggert@cs.ucla.edu>
6553
6554         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
6555         Don't worry about this obsolete case any more.
6556         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
6557         directories.
6558         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
6559         worry about this obsolete case any more.
6560         * lib/fts.c: Likewise.
6561         * lib/getcwd.c: Likewise.
6562         * lib/glob.h: Likewise.
6563         * lib/savedir.c: Likewise.
6564
6565 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6566
6567         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
6568         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
6569         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
6570         needed.
6571         All uses removed.
6572         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6573         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6574         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
6575         needed.
6576         * m4/getdate.m4 (gl_GETDATE): Likewise.
6577         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6578         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6579         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6580         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6581         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
6582         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6583         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
6584         needed.
6585
6586 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
6587
6588         * lib/memcasecmp.c: Include <limits.h>.
6589         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
6590         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
6591         Don't assume isdigit succeeds only on '0' through '9'.
6592
6593 2006-07-05  Eric Blake  <ebb9@byu.net>
6594
6595         * modules/getaddrinfo (Depends-on): Add snprintf.
6596
6597 2006-07-05  Eric Blake  <ebb9@byu.net>
6598
6599         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
6600         to avoid 'header present but could not be compiled' on cygwin.
6601
6602 2006-07-05  Eric Blake  <ebb9@byu.net>
6603
6604         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
6605         missing from netdb.h.
6606         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
6607
6608 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6609
6610         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
6611         no longer needed.
6612         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
6613         * m4/getdate.m4 (gl_GETDATE): Likewise.
6614         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
6615         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
6616         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
6617         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
6618         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
6619
6620 2006-07-05  Derek R. Price  <derek@ximbiot.com>
6621
6622         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
6623         All uses of is_space replaced by isspace.
6624         * lib/exit.h: Don't talk about STDC_HEADERS.
6625         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
6626         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
6627         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
6628         replaced by isprint etc.
6629         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
6630         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6631         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
6632         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
6633         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
6634         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
6635
6636 2006-07-05  Bruno Haible  <bruno@clisp.org>
6637
6638         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
6639         the function exists, before testing against AIX.
6640         Reported by Martin Lambers <marlam@marlam.de>.
6641
6642 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6643
6644         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
6645         From Mark D. Baushke.
6646
6647 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
6648
6649         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
6650         to the absolute name, not just one, to bypass Sun C 5.8's
6651         "warning: #include of /usr/include/... may be non-portable".
6652
6653 2006-07-04  Eric Blake  <ebb9@byu.net>
6654
6655         * modules/dirname-tests: New test module.
6656         * tests/test-dirname.c: New file, replacing dirname.c
6657         TEST_DIRNAME section that was recently deleted.
6658
6659 2006-07-04  Bruno Haible  <bruno@clisp.org>
6660
6661         Assume ANSI C header files and <ctype.h> functions.
6662         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
6663         (mbsnwidth): Use isprint, iscntrl instead.
6664
6665 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6666
6667         Merge from coreutils.
6668         * MODULES.html.sh: Add xstrtold.
6669         * modules/xstrtold: New file.
6670         * modules/cycle-check (Files): Add lib/same-inode.h.
6671         * modules/dirname (Files): Add m4/double-slash-root.m4.
6672         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
6673         * modules/mkdir-p (Files): Add lib/same-inode.h.
6674         * modules/same (Files): Add lib/same-inode.h.
6675
6676 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6677
6678         * m4/absolute-header.m4: Renamed from full-header-path.m4.
6679         This is to keep the terminology clean; POSIX talks about
6680         "absolute pathnames", not "full pathnames", but the GNU
6681         Coding Standards say to use "path" for something else;
6682         so use "absolute" to keep both sides happy.
6683         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
6684         Set gl_absolute_header, not gl_full_header_path.
6685         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
6686         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
6687         All uses changed.
6688
6689         Merge from coreutils.
6690
6691         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6692
6693         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
6694         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
6695         want to require the building of c-strtod.o.
6696         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
6697         needs -lm directly.
6698         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
6699
6700         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6701
6702         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
6703         --as-needed option if available.  Problem reported by Albert Chin in
6704         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
6705         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
6706         cc merely issues a bunch of annoying warnings for --as-needed
6707         (this problem was reported by Bob Proulx).  Also, try linking with
6708         -lm to detect a bug in binutils 2.16 (this problem was reported
6709         by Ralf Wildenhues).
6710
6711         2006-06-18  Jim Meyering  <jim@meyering.net>
6712
6713         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
6714         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
6715         macro.
6716         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
6717         also check for glibc-2.4's abort-inducing bug.
6718
6719         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
6720         Low-probability clean-up should be to use rmdir to get rid of
6721         the just-created directory, not unlink.
6722
6723         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
6724         configure fail, and request a bug report to inform us about it.
6725         Add a comment that, barring reports to the contrary, in 2007 we'll
6726         assume ftruncate is universally available.
6727
6728         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6729
6730         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
6731
6732         2006-03-12  Jim Meyering  <jim@meyering.net>
6733
6734         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
6735         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
6736         * m4/same.m4 (gl_SAME): Likewise.
6737         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
6738
6739         2006-03-11  Eric Blake  <ebb9@byu.net>
6740
6741         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
6742         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
6743         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
6744         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
6745
6746 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
6747
6748         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
6749         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
6750         reported by Mark D. Baushke, one in
6751         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
6752
6753         Merge from coreutils.
6754
6755         * lib/.cppi-disable: Add stdint_.h.
6756         * lib/.cvsignore: Add stdint.h.
6757
6758         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
6759
6760         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
6761         both double and long double versions.
6762         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
6763         * lib/xstrtold.c: New file.
6764         * lib/xstrtod.h (xstrtold): New decl.
6765
6766         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
6767
6768         * lib/filemode.c (setst): Remove.
6769         (strmode): Rewrite to avoid setst.  This makes the code shorter,
6770         (arguably) clearer, and the generated code is a bit smaller on my
6771         Debian GNU/Linux stable x86 host.
6772
6773         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
6774
6775         * lib/filemode.c: Include "filemode.h" first, to test the interface.
6776         Assume that filemode.h includes sys/types.h and sys/stat.h.
6777         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
6778         (ftypelet): Reorder to put common cases first, for efficiency.
6779         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
6780         to do 'M'.
6781         (strmode): Renamed from mode_string, and now stores 12 bytes instead
6782         of 10, for compatibility with FreeBSD.  All callers changed.
6783         (filemodestring): Now stores 12 bytes instead of 10, and sets file
6784         types that can't be deduced solely from st_mode.  First arg is now a
6785         const pointer.
6786         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
6787         (strmode): Renamed from mode_string.
6788         (filemodestring): New decl.
6789         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
6790         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
6791         needed.
6792         (S_ISPORT, S_ISWHT): New macros, if not already defined.
6793
6794         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
6795
6796         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
6797         fsusage.h now does that.  Include fsusage.h first, to test interface.
6798         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
6799         at most one method (the old code could have generated decls that
6800         didn't conform to C89, not that this was ever exercised).
6801         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
6802
6803         2006-03-19  Jim Meyering  <jim@meyering.net>
6804
6805         Work even in a chroot where d_ino values for entries in "/"
6806         don't match the stat.st_ino values for the same names.
6807         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
6808         number, iterate through all entries again, using lstat instead.
6809         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
6810         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
6811
6812         * lib/getcwd.c (__getcwd): Clarify a comment.
6813         Use memcpy in place of a call to strcpy.
6814
6815         2006-03-12  Jim Meyering  <jim@meyering.net>
6816
6817         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
6818         matches that of the current directory (which we're about to chdir ".."
6819         out of), then save the dev-ino of the parent, instead.
6820
6821         * lib/same-inode.h (SAME_INODE): New file/macro.
6822         * lib/chdir-safer.c (SAME_INODE): Remove definition.
6823         Include "same-inode.h", instead.
6824         * lib/same.c: Likewise.
6825         * lib/cycle-check.h: Include "same-inode.h".
6826         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
6827         * lib/cycle-check.c (SAME_INODE): Remove definition.
6828         * lib/root-dev-ino.h: Include "same-inode.h".
6829
6830         2006-03-11  Eric Blake  <ebb9@byu.net>
6831
6832         * lib/same.c (same_name): s/base_name/last_component/
6833         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
6834         * lib/filenamecat.c (file_name_concat): Likewise.
6835
6836         2006-03-11  Eric Blake  <ebb9@byu.net>,
6837                     Paul Eggert  <eggert@cs.ucla.edu>
6838
6839         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
6840         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
6841         drive prefix.
6842         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
6843         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
6844         (last_component): New method.
6845         * lib/dirname.c (dir_len): Determine when drive letters need a
6846         subsequent slash.  Preserve // when it is special.
6847         (dir_name): Don't append dot when drive letter is absolute.
6848         [TEST_DIRNAME]: Move into a full-blown gnulib test.
6849         * lib/basename.c (base_name): New semantics - malloc the result.
6850         Preserve // when it is special.  Preserve relative files that look
6851         like drive letters.
6852         (base_len): Preserve // when it is special.
6853         (last_component): New method, similar to old base_name semantics.
6854         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
6855         base_name.  Strip redundant slashes from ///.
6856
6857 2006-07-03  Jim Meyering  <jim@meyering.net>
6858
6859         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
6860         macro is used before the first cycle_check call.
6861
6862 2006-07-03  Eric Blake  <ebb9@byu.net>
6863
6864         * modules/dirname (Depends-on): Add xstrndup.
6865
6866 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6867
6868         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
6869         test cases, so that config.log is a bit easier to follow.
6870
6871 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
6872
6873         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
6874         both are 64 bits, since this seems to be the tradition, and this
6875         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
6876         we ever run into a host that prefers long long to long in this
6877         case, we'll need another configure-time test.  Problem reported by
6878         Jim Meyering.
6879
6880 2006-07-02  Eric Blake  <ebb9@byu.net>
6881
6882         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
6883
6884 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6885
6886         * modules/inttypes (Depends-on): No longer depends on stdint.
6887         * modules/stdint (Description): Say more about assumptions.
6888         Say that the fast types might differ.  Say macros are used.
6889         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
6890         (Makefile.am): Revise list of substituted symbols to match
6891         new stdint.m4.
6892         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
6893         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
6894         * tests/test-stdint.c (verify_same_types)
6895         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
6896         the code conforms to C99/C89.
6897         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
6898         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
6899
6900 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6901
6902         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
6903         but fix a bug, by requiring at least 64 bits.
6904         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
6905         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
6906         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
6907         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
6908
6909         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
6910         changes.  Make 2.59 a prerequisite.  Check and substitute for
6911         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
6912         inttypes.h.  Do not use special include files; just use the
6913         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
6914         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
6915         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
6916         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
6917         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
6918         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
6919         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
6920         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
6921         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
6922         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
6923         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
6924         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
6925         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
6926         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
6927         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
6928         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
6929         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
6930         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
6931         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
6932         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
6933         WINT_MAX.  Check for C99 conformance more strictly, by detecting
6934         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
6935         not check for things that C99 does not require, e.g., int8_t.  If
6936         a test isn't needed unless <stdint.h> isn't working, and is
6937         unlikely to be needed for any other reason, then don't do it
6938         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
6939         size_t, since we assume C89 freestanding at least.  Do not check
6940         for sig_atomic_t, wchar_t, or wint_t, since the code now does
6941         the right thing even if the types are not defined.  Instead use:
6942         (gl_STDINT_TYPE_PROPERTIES): New macro.
6943         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
6944         testing whether <sys/types.h> clashes, as Autoconf does this for
6945         us now.  All uses removed.
6946         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
6947         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
6948         (gl_CHECK_TYPE_SAME):
6949         Remove; no longer needed.
6950         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
6951         exists, since we'll return 0 anyway in that case.
6952         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
6953
6954 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
6955
6956         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
6957         possible collision with system files.
6958         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
6959         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
6960         WCHAR_MIN and WCHAR_MAX in this case.
6961         (<stddef.h>): Do not include; no longer needed.
6962         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
6963         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
6964         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
6965         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
6966         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
6967         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
6968         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
6969         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
6970         !defined(__c99))]: Include in this case too, since it's harmless
6971         now.
6972         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
6973         dangerous to do so.
6974         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
6975         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
6976         (_STDINT_MIN, _STDINT_MAX): New macros.
6977         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
6978         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
6979         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
6980         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
6981         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
6982         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
6983         macros, not typedefs; this simplifies things quite a bit.
6984         Use long int for all types narrower than int64_t.
6985         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
6986         Define in terms of long long int or int64_t or long int,
6987         not int64_t or int32_t.  This saves some compile-time testing.
6988         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
6989         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
6990         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
6991         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
6992         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
6993         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
6994         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
6995         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
6996         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
6997         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
6998         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
6999         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7000         undef any previous version and define our own version, for
7001         simplicity and consistency with the new macros for types.
7002         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7003         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7004         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7005         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7006         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7007         @WINT_T_SUFFIX@ to keep things simple here.
7008         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7009         Simplify by assuming typical 8/16/32/64 host, since we're
7010         already doing that elsewhere anyway.
7011         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7012         and assume long long int is 64 bits if available.  This
7013         speeds up 'configure'.
7014
7015 2006-07-01  Eric Blake  <ebb9@byu.net>
7016
7017         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7018         Reported by Andreas Buening.
7019
7020 2006-07-01  Eric Blake  <ebb9@byu.net>
7021
7022         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7023
7024 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7025
7026         * lib/getaddrinfo.c: fixed typo
7027
7028 2006-06-29  Jim Meyering  <jim@meyering.net>
7029
7030         * modules/strftime (Maintainer): Add my name, since with the
7031         FPRINTFTIME changes strftime.c has forked from glibc.
7032
7033 2006-06-29  Eric Blake  <ebb9@byu.net>
7034
7035         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7036
7037 2006-06-29  Eric Blake  <ebb9@byu.net>
7038
7039         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7040
7041 2006-06-29  Eric Blake  <ebb9@byu.net>
7042
7043         * lib/stat_.h: New file.
7044
7045 2006-06-29  Eric Blake  <ebb9@byu.net>
7046
7047         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7048         unused static function.
7049
7050 2006-06-29  Eric Blake  <ebb9@byu.net>
7051
7052         * doc/functions.texi (Function Portability): Document missing lstat
7053         on mingw.
7054
7055 2006-06-29  Eric Blake  <ebb9@byu.net>
7056
7057         * MODULES.html.sh: Add sys_stat.
7058         * modules/sys_stat: New module.
7059         * modules/mkstemp (Depends-on): Add sys_stat.
7060
7061 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7062
7063         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7064
7065 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7066
7067         * m4/c-bs-a.m4: Removed.
7068
7069 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7070
7071         * lib/strftime.c: Assume strftime() exists.
7072
7073 2006-06-29  Derek Price  <derek@ximbiot.com>
7074
7075         * modules/c-bs-a: Removed - \a is C89.
7076         * MODULES.html.sh: Remove c-bs-a.
7077
7078 2006-06-29  Bruno Haible  <bruno@clisp.org>
7079
7080         * modules/wcwidth (License): Change to LGPL.
7081
7082 2006-06-28  Simon Josefsson  <jas@extundo.com>
7083
7084         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7085         on _WIN32.
7086
7087         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7088         getnameinfo.
7089
7090 2006-06-28  Simon Josefsson  <jas@extundo.com>
7091
7092         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7093
7094 2006-06-28  Simon Josefsson  <jas@extundo.com>
7095
7096         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7097         functions there.  It will succeed on Windows XP, but on Windows
7098         2000 and (presumably) earlier, it will fail, and use the internal
7099         re-implementation.
7100         (use_win32_p): New function.
7101         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7102         Support AI_NUMERICSERV to disable getservbyname.
7103         (getnameinfo): New function, only supports
7104         NI_NUMERICHOST|NI_NUMERICSERV for now.
7105
7106         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7107         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7108         getnameinfo.
7109
7110 2006-06-28  Eric Blake  <ebb9@byu.net>
7111
7112         * modules/wcwidth: New file.
7113         * modules/mbchar (Depends-on): Add wcwidth.
7114         * modules/mbswidth (Depends-on): Add wcwidth.
7115         * MODULES.html.sh: Add wcwidth.
7116
7117 2006-06-28  Eric Blake  <ebb9@byu.net>
7118
7119         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7120         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7121
7122 2006-06-28  Eric Blake  <ebb9@byu.net>
7123
7124         * lib/xvasprintf.h: Fix comments.
7125
7126 2006-06-28  Eric Blake  <ebb9@byu.net>
7127
7128         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7129         * lib/mbswidth.c (wcwidth): Move from here...
7130         * lib/wcwidth.h: ...to this new file.
7131
7132 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7133
7134         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7135
7136         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7137         it's obsolete.
7138         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7139
7140 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7141
7142         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7143         Autoconf 2.60 says this stuff was obsolete.
7144
7145 2006-06-28  Bruno Haible  <bruno@clisp.org>
7146
7147         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7148
7149 2006-06-28  Bruno Haible  <bruno@clisp.org>
7150
7151         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7152         gt_TYPE_WCHAR_T.
7153
7154 2006-06-28  Bruno Haible  <bruno@clisp.org>
7155
7156         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7157         declaration for wcwidth.
7158         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7159
7160 2006-06-28  Bruno Haible  <bruno@clisp.org>
7161
7162         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7163         (mkdir): Define using _mkdir.
7164
7165 2006-06-28  Bruno Haible  <bruno@clisp.org>
7166
7167         * lib/getaddrinfo.h: Fix POSIX URL.
7168         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7169         _WIN32.
7170         (use_win32_p): Make static.
7171         (getaddrinfo): Reject service name if it is empty or does not consist
7172         solely of decimal digits, or if its value is > 65535.
7173         (getnameinfo): Remove useless casts.
7174
7175 2006-06-27  Simon Josefsson  <jas@extundo.com>
7176
7177         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7178         Eggert and Martin Lambers.
7179
7180 2006-06-27  Simon Josefsson  <jas@extundo.com>
7181
7182         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7183         Eggert and Martin Lambers.
7184
7185 2006-06-27  Bruno Haible  <bruno@clisp.org>
7186
7187         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7188         result to 0, not to empty.
7189         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7190
7191 2006-06-27  Bruno Haible  <bruno@clisp.org>
7192
7193         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7194
7195 2006-06-26  Simon Josefsson  <jas@extundo.com>
7196
7197         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7198         present.
7199
7200 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7201
7202         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7203         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7204         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7205
7206 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7207
7208         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7209
7210 2006-06-26  Bruno Haible  <bruno@clisp.org>
7211
7212         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7213
7214 2006-06-26  Bruno Haible  <bruno@clisp.org>
7215
7216         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7217
7218 2006-06-26  Bruno Haible  <bruno@clisp.org>
7219
7220         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7221         SGI C compiler in pre-C99 mode.
7222         Suggested by Mark D. Baushke and Larry Jones.
7223
7224 2006-06-26  Bruno Haible  <bruno@clisp.org>
7225
7226         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7227         WCHAR_MAX.
7228         Reported by Mark D. Baushke and Larry Jones.
7229
7230 2006-06-26  Bruno Haible  <bruno@clisp.org>
7231
7232         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7233         in pre-C99 mode.
7234         Suggested by Mark D. Baushke and Larry Jones.
7235
7236 2006-06-23  Simon Josefsson  <jas@extundo.com>
7237             Bruno Haible  <bruno@clisp.org>
7238
7239         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7240         Emit mostlyclean-local rule.
7241         (func_emit_tests_Makefile_am): Likewise.
7242         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7243
7244 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7245
7246         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7247
7248 2006-06-23  Bruno Haible  <bruno@clisp.org>
7249
7250         * tests/test-stdint.c: Update to match ISO C 99 Technical
7251         Corrigendum 1.
7252
7253 2006-06-23  Bruno Haible  <bruno@clisp.org>
7254
7255         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7256
7257 2006-06-23  Bruno Haible  <bruno@clisp.org>
7258
7259         * lib/stdint_.h: Treat IRIX like OpenBSD.
7260
7261 2006-06-23  Bruno Haible  <bruno@clisp.org>
7262
7263         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7264         ISO C 99 Technical Corrigendum 1.
7265
7266 2006-06-22  Simon Josefsson  <jas@extundo.com>
7267
7268         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7269         MinGW.
7270
7271 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7272
7273         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7274         needed.  Some compiler complained about some of them.  Problem reported
7275         by Larry Jones in
7276         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7277
7278 2006-06-21  Simon Josefsson  <jas@extundo.com>
7279
7280         * tests/test-getaddrinfo.c: New file.
7281
7282         * modules/getaddrinfo-tests: New file.
7283
7284         * MODULES.html.sh: Add inet_pton.
7285
7286         * modules/inet_pton: New file.
7287
7288 2006-06-21  Simon Josefsson  <jas@extundo.com>
7289
7290         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7291         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7292         of using the (limited) gnulib implementation on Windows XP.
7293
7294         * m4/inet_pton.m4: New file.
7295
7296 2006-06-21  Simon Josefsson  <jas@extundo.com>
7297
7298         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7299         variable.
7300
7301         * lib/socket_.h: Don't define WINVER.
7302
7303         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7304         slightly modified to work in gnulib.
7305
7306 2006-06-21  Simon Josefsson  <jas@extundo.com>
7307
7308         * doc/gnulib.texi (Windows sockets): Add.
7309
7310 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7311
7312         * lib/read-file.c (fread_file): Start with buffer allocation of
7313         0 bytes rather than 1 byte; this simplifies the code.
7314         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7315         code to free buffer and save/restore errno.
7316         (internal_read_file): Remove unused local.
7317
7318 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7319
7320         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7321         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7322         Problem reported by Denis Excoffier in
7323         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7324
7325 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7326
7327         * modules/sys_socket, modules/socklen: Include sys/types since
7328         FreeBSD 4.x's sys/socket.h needs it.
7329
7330 2006-06-19  Simon Josefsson  <jas@extundo.com>
7331
7332         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7333
7334 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7335
7336         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7337
7338 2006-06-19  Bruno Haible  <bruno@clisp.org>
7339
7340         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7341         and FULL_PATH_INTTYPES_H in angle brackets.
7342         Reported by Mark D. Baushke <mdb@gnu.org>.
7343
7344 2006-06-17  Eric Blake  <ebb9@byu.net>
7345
7346         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7347         errno.
7348
7349 2006-06-17  Bruno Haible  <bruno@clisp.org>
7350
7351         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7352         <sys/inttypes.h>.
7353
7354 2006-06-17  Bruno Haible  <bruno@clisp.org>
7355
7356         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7357         whether errno is declared. Assume <errno.h> declares errno.
7358
7359 2006-06-17  Bruno Haible  <bruno@clisp.org>
7360
7361         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7362
7363 2006-06-17  Bruno Haible  <bruno@clisp.org>
7364
7365         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7366         problem on Solaris 2.5.1.
7367
7368 2006-06-16  Eric Blake  <ebb9@byu.net>
7369
7370         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7371         * lib/unicodeio.c [!defined errno]: Likewise.
7372         * lib/strtol.c [!defined errno]: Likewise.
7373         * lib/strtod.c [!defined errno]: Likewise.
7374
7375 2006-06-15  Eric Blake  <ebb9@byu.net>
7376
7377         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7378
7379 2006-06-15  Eric Blake  <ebb9@byu.net>
7380
7381         * config/srclist.txt (ssize_t.m4): Lose sync.
7382
7383 2006-06-15  Bruno Haible  <bruno@clisp.org>
7384
7385         * modules/stdint (Files): Include m4/full-header-path.m4,
7386         m4/size_max.m4, m4/wchar_t.m4.
7387         (Makefile.am): Many more substitutions.
7388         * modules/stdint-tests: New file.
7389         * tests/test-stdint.c: New file.
7390
7391 2006-06-15  Bruno Haible  <bruno@clisp.org>
7392
7393         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7394         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7395         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7396         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7397         gl_CHECK_TYPE_SAME): New macros.
7398
7399 2006-06-15  Bruno Haible  <bruno@clisp.org>
7400
7401         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7402
7403 2006-06-15  Bruno Haible  <bruno@clisp.org>
7404
7405         * lib/stdint_.h: Rewritten to be fully auto-configured.
7406         Fixes bug on HP-UX/IA64.
7407
7408 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7409
7410         * lib/getdate.y (__attribute__): Don't define if already defined.
7411         Problem reported by Larry Jones.
7412         * lib/utimens.c (__attribute__): Likewise.
7413
7414 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7415
7416         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7417         reported by Andreas Schwab.
7418
7419 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7420             Bruno Haible  <bruno@clisp.org>
7421
7422         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7423         check for the declaration of strnlen and a run test that exposes the
7424         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7425         rpl_strndup.
7426
7427 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7428             Bruno Haible  <bruno@clisp.org>
7429
7430         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7431
7432 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7433
7434         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7435         compile test, for Tru64 4.0D.
7436
7437 2006-05-28  Karl Berry  <karl@gnu.org>
7438
7439         * config/srclist.txt (printf-args.c): lose sync.
7440
7441 2006-05-26  Martin Lambers  <marlam@marlam.de>
7442
7443         * lib/getpass.c: Updates the test for the native W32 API, and adds
7444         missing includes, thus fixing compilation warnings.
7445
7446 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7447
7448         * lib/exclude.c (exclude_fnmatch): New function.
7449         (excluded_file_name): Call exclude_fnmatch.
7450         * lib/exclude.h (excluded_file_name): New prototype
7451
7452 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7453
7454         * lib/tempname.c (small_open, large_open): New macros.
7455         (__open, __open64) [!_LIBC]: Remove.
7456         (__gen_tempname): Use small_open and large_open instead of __open
7457         and __open64.  This fixes a portability bug on HP-UX 11.11i
7458         reported by Simon Wing-Tang in
7459         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7460
7461 2006-05-24  Bruno Haible  <bruno@clisp.org>
7462
7463         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7464         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7465         Reported by Thorsten Maerz <torte@netztorte.de> via
7466         Aaron Stone <aaron@serendipity.cx>.
7467
7468 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7469
7470         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7471         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7472         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7473         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7474         not really conditional on the cache.
7475         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7476
7477 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7478
7479         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7480         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7481         (my_usleep): Don't mishandle maximum value.
7482
7483 2006-05-19  Jim Meyering  <jim@meyering.net>
7484
7485         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7486
7487 2006-05-17  Bruno Haible  <bruno@clisp.org>
7488
7489         Cygwin portability.
7490         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7491
7492 2006-05-17  Bruno Haible  <bruno@clisp.org>
7493
7494         * lib/stdint_.h: Fix recognition of Cygwin.
7495
7496 2006-05-15  Bruno Haible  <bruno@clisp.org>
7497
7498         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7499         on libtool patch by Ralf Wildenhues.
7500
7501 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7502
7503         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7504         test for C99 conformance; (bool) 0.5 is an integer constant
7505         expression, but (bool) -0.5 is not.  Problem reported by Fedor
7506         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
7507
7508 2006-05-11  Simon Josefsson  <jas@extundo.com>
7509
7510         * m4/xvasprintf.m4: Fix obvious typo.
7511
7512 2006-05-11  Jim Meyering  <jim@meyering.net>
7513
7514         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
7515         James Lemley.
7516
7517 2006-05-10  Simon Josefsson  <jas@extundo.com>
7518
7519         * lib/md4.c: Typo fix, update copyright years.
7520         (K1, K2): Don't use L because it turn computations into 64-bit on
7521         64-bit platforms.
7522
7523 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
7524
7525         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
7526         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
7527         unwanted sign propagation, e.g., on hosts with 64-bit int.
7528         There still are some problems with reeelly weird theoretical hosts
7529         (e.g., 33-bit int) but it's not worth worrying about now.
7530         * lib/sha1.c (rol): Likewise.
7531         (K1, K2, K3, K4): Remove unnecessary L suffix.
7532
7533 2006-05-10  Bruno Haible  <bruno@clisp.org>
7534
7535         * lib/des.c: Cast to avoid warnings.
7536
7537 2006-05-09  Bruno Haible  <bruno@clisp.org>
7538
7539         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
7540         (Depends-on): Depend also on xsize, stdarg.
7541         (configure.ac): Add gl_XVASPRINTF.
7542
7543 2006-05-09  Bruno Haible  <bruno@clisp.org>
7544
7545         * m4/xvasprintf.m4: New file.
7546
7547 2006-05-09  Bruno Haible  <bruno@clisp.org>
7548
7549         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
7550         (EOVERFLOW): Define fallback value.
7551         (xstrcat): New function.
7552         (xvasprintf): Recognize the special case of a string concatenation.
7553
7554 2006-05-08  Eric Blake  <ebb9@byu.net>
7555
7556         * gnulib-tool (func_version): Base copyright year on CVS date.
7557         (func_emit_copyright_notice): New function.
7558         (func_emit_lib_Makefile_am): Use it.
7559         (func_emit_tests_Makefile_am): Likewise.
7560         (func_import): Likewise.
7561
7562 2006-05-08  Bruno Haible  <bruno@clisp.org>
7563
7564         * modules/stdarg: New file.
7565         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
7566
7567 2006-05-08  Bruno Haible  <bruno@clisp.org>
7568
7569         * m4/stdarg.m4: New file, from GNU gettext.
7570
7571 2006-05-08  Bruno Haible  <bruno@clisp.org>
7572
7573         * config/srclist.txt (build-aux/config.rpath): different from latest
7574         release.
7575
7576 2006-05-08  Bruno Haible  <bruno@clisp.org>
7577
7578         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
7579
7580 2006-05-05  Jim Meyering  <jim@meyering.net>
7581
7582         * m4/warning.m4: New file, derived from bison's file by the same name.
7583
7584 2006-05-03  Bruno Haible  <bruno@clisp.org>
7585
7586         * lib/stdint_.h: Shorter URL.
7587         * lib/inttypes.h: Likewise.
7588
7589 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7590
7591         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
7592
7593 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7594
7595         * lib/verify.h: Document the internals better.  Most of this change
7596         was written by Bruno Haible.
7597
7598 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
7599
7600         * doc/verify.texi: New file, partly based on a proposal by
7601         Bruno Haible.
7602
7603 2006-05-02  Bruno Haible  <bruno@clisp.org>
7604
7605         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
7606         test from here...
7607         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
7608
7609 2006-04-29  Bruno Haible  <bruno@clisp.org>
7610
7611         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
7612         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
7613
7614 2006-04-29  Bruno Haible  <bruno@clisp.org>
7615
7616         * gnulib-tool: Make --update option actually work.
7617
7618 2006-04-29  Bruno Haible  <bruno@clisp.org>
7619
7620         * doc/gcd.texi: New file.
7621         * doc/gnulib.texi: Include it.
7622
7623 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
7624
7625         * lib/getdate.y (get_date): When adding relative date, start with the
7626         initial time, not with the result of the first mktime call.
7627
7628 2006-04-25  Bruno Haible  <bruno@clisp.org>
7629
7630         * gnulib-tool (func_import): Output the include directives in three
7631         blocks, sorted separately.
7632         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7633
7634 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7635
7636         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
7637         to define main with arguments, for C++.  Reported by Eric Blake.
7638         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
7639         Prefer 'int main ()' to 'int main (void)', for C++.
7640         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
7641         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
7642         for 'main', for C99 and C++.
7643
7644 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
7645
7646         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
7647         Don't assume that exit status -1 is valid.
7648         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7649         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
7650         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
7651         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
7652         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
7653         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
7654         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
7655         functions can be used without declaring them, or that you can
7656         exit with status -1.
7657         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
7658
7659 2006-04-24  Karl Berry  <karl@gnu.org>
7660
7661         * config/srclist.txt (longdouble.m4): sync lost.
7662
7663 2006-04-24  Eric Blake  <ebb9@byu.net>
7664
7665         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
7666
7667 2006-04-24  Bruno Haible  <bruno@clisp.org>
7668
7669         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
7670         poll() implementation in AIX.
7671         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7672
7673 2006-04-24  Bruno Haible  <bruno@clisp.org>
7674
7675         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
7676         assigned exactly once.
7677
7678 2006-04-23  Claudio Fontana  <claudio@gnu.org>
7679             Bruno Haible  <bruno@clisp.org>
7680
7681         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
7682         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
7683         for AM_CPPFLAGS.
7684
7685 2006-04-23  Bruno Haible  <bruno@clisp.org>
7686
7687         * modules/copy-file: Depend on unistd.
7688         * modules/execute: Likewise.
7689         * modules/fatal-signal: Likewise.
7690         * modules/findprog: Likewise.
7691         * modules/mkdtemp : Likewise.
7692         * modules/pipe: Likewise.
7693         * modules/wait-process: Likewise.
7694
7695 2006-04-23  Bruno Haible  <bruno@clisp.org>
7696
7697         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
7698         condition was already detected.
7699         Reported by Ben Pfaff <blp@cs.stanford.edu>.
7700
7701 2006-04-23  Bruno Haible  <bruno@clisp.org>
7702
7703         * lib/copy-file.c: Include <unistd.h> unconditionally.
7704         * lib/execute.c: Likewise.
7705         * lib/fatal-signal.c: Likewise.
7706         * lib/findprog.c: Likewise.
7707         * lib/mkdtemp.c: Likewise.
7708         * lib/pipe.h: Likewise.
7709         * lib/pipe.c: Likewise.
7710         * lib/wait-process.h: Likewise.
7711
7712 2006-04-23  Bruno Haible  <bruno@clisp.org>
7713
7714         * gnulib-tool (func_usage): Fix --import description. Document
7715         --update.
7716         (func_import): Create temporary file in a temporary directory, if
7717         --dry-run is specified. Silence errors from 'grep' when there are no
7718         m4 files in $m4dir.
7719         (func_create_testdir): Silence errors from 'grep' when there are no
7720         m4 files in $m4dir.
7721         Reported by Karl Berry <karl@freefriends.org>.
7722
7723 2006-04-20  Bruno Haible  <bruno@clisp.org>
7724
7725         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
7726         one argument, so that the code will be portable to Autoconf 2.60.
7727         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
7728         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7729         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
7730
7731 2006-04-19  Derek Price  <derek@ximbiot.com>
7732             Eric Blake  <ebb9@byu.net>
7733
7734         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
7735         rather than "/full/path.h".  Update comment to match.  Shorten &
7736         generalize m4_translit call via AS_TR_CPP.
7737
7738 2006-04-19  Derek Price  <derek@ximbiot.com>
7739             Eric Blake  <ebb9@byu.net>
7740
7741         * lib/inttypes.h: Correct grammar in comment.
7742
7743 2006-04-18  Derek Price  <derek@ximbiot.com>
7744             Paul Eggert  <eggert@cs.ucla.edu>
7745
7746         * modules/inttypes: New file.
7747         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
7748
7749 2006-04-18  Derek Price  <derek@ximbiot.com>
7750             Paul Eggert  <eggert@cs.ucla.edu>
7751
7752         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
7753         New files.
7754
7755 2006-04-18  Derek Price  <derek@ximbiot.com>
7756             Paul Eggert  <eggert@cs.ucla.edu>
7757
7758         * lib/inttypes.h: New file.
7759         * lib/strtoimax.c: Assume <inttypes.h>.
7760
7761 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
7762
7763         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
7764         isn't mounted.  Problem reported by Kir Kolyshkin.
7765
7766 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
7767
7768         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
7769         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
7770         Derek R. Price.
7771         * lib/regex.h (RE_DUP_MAX): Update comment to match current
7772         implementation.
7773
7774 2006-04-12  Eric Blake  <ebb9@byu.net>
7775
7776         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
7777         is now done automatically by the corresponding Autoconf macro.
7778
7779 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
7780
7781         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
7782         time_r.h.
7783
7784 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7785
7786         Merge regex changes from libc, removing some of our
7787         POSIX-conformance changes that were rejected and redoing them in a
7788         less-intrusive way.
7789
7790         * lib/regcomp.c (re_compile_internal, init_dfa):
7791         Length arg is now size_t, not Idx.  All uses changed.
7792         (peek_token): Forward decl now says internal_function.
7793         (__re_error_msgid, __re_error_msgid_idx):
7794         Now static rather than extern with attribute_hidden.
7795         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
7796         For some reason libc prefers K&R style defns for external functions.
7797         (regerror) [!defined _LIBC]: Likewise.
7798         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
7799         (seek_collating_symbol_entry, lookup_collation_sequence_value):
7800         (build_range_exp, build_collating_symbol):
7801         Use K&R-style defn.
7802         (re_compile_fastmap): Use '\0' to memset, not 0.
7803         (utf8_sb_map): Make the calculations more obvious.
7804         (init_dfa, parse_bracket_exp, build_charclass_op):
7805         Call calloc and cast result, as glibc does.
7806         (init_word_char, fetch_token, peek_token, peek_token_bracket):
7807         (build_range_exp, build_collating_symbol):
7808         Now internal functions.
7809
7810         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
7811
7812         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
7813         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
7814         Don't depend on VMS; depend on __VMS instead, for POSIX
7815         namespace cleanness.
7816         (regoff_t): Define to ssize_t, not long int.
7817
7818         Remove the REG_ macros named below.  Instead, make the old names
7819         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
7820         __USE_GNU_REGEX.
7821         (REG_BACKSLASH_ESCAPE_IN_LISTS):
7822         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
7823         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
7824         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
7825         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
7826         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
7827         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
7828         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
7829         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
7830         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
7831         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
7832         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
7833         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
7834         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
7835         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
7836         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
7837         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
7838         (REG_NREGS):
7839         Remove.  All uses replaced by the old RE_* names.
7840         (RE_BACKSLASH_ESCAPE_IN_LISTS):
7841         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
7842         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
7843         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
7844         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
7845         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
7846         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
7847         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
7848         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
7849         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
7850         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
7851         Don't bother having these macros be independent of each others'
7852         values, since they no longer exist in the POSIX name space.
7853
7854         Rename the following member names back to their old names,
7855         unless !__USE_GNU_REGEX.  All uses changed back.
7856         (buffer): Renamed from re_buffer.
7857         (allocated): Renamed from re_allocated.
7858         (used): Renamed from re_used.
7859         (syntax): Renamed from re_syntax.
7860         (fastmap): Renamed from re_fastmap.
7861         (translate): Renamed from re_translate.
7862         (can_be_null): Renamed from re_can_be_null.
7863         (regs_allocated): Renamed from re_regs_allocated.
7864         (fastmap_accurate): Renamed from re_fastmap_accurate.
7865         (no_sub): Renamed from re_no_sub.
7866         (not_bol): Renamed from re_not_bol.
7867         (not_eol): Renamed from re_not_eol.
7868         (newline_anchor): Renamed from re_newline_anchor.
7869         (num_regs): Renamed from rm_num_regs.
7870         (start): Renamed from rm_start.
7871         (end): Renamed from rm_end.
7872
7873         (free_state): Move up a bit.
7874
7875         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
7876         #define to be empty.
7877         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
7878         when that is what is intended.
7879         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
7880         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
7881         (MAX): New macro.
7882         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
7883         All uses changed back to re_malloc, etc.  It's now the caller's
7884         responsibility to check for overflow; all callers changed.
7885         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
7886         (re_x2nrealloc): Remove.
7887         (free_state): Remove decl.
7888
7889         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
7890         (re_set_registers, re_exec):
7891         Use K&R-style defn.
7892
7893         2006-01-31  Roland McGrath  <roland@redhat.com>
7894
7895         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
7896         Reported by Mike Frysinger <vapier@gentoo.org>.
7897
7898         2006-01-15  Andreas Jaeger  <aj@suse.de>
7899
7900         [BZ #1950]
7901         * lib/regex_internal.c (re_string_reconstruct): Adjust for
7902         build_wcs_upper_buffer change.
7903         (build_wcs_upper_buffer): Change return type.
7904
7905         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
7906
7907         * lib/regex_internal.h: Include <stdint.h> if available.
7908
7909         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
7910
7911         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
7912
7913         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7914
7915         * lib/regcomp.c: Adjust for changed secondary hash function.
7916
7917         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
7918
7919         * lib/regex.h: Pretty printing.
7920         Clean up namespace a bit.
7921
7922         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
7923
7924         * lib/regexec.c (update_cur_sifted_state, check_arrival,
7925         check_arrival_add_next_nodes): Avoid using uninitialized variable.
7926
7927         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
7928                     Ulrich Drepper  <drepper@redhat.com>
7929
7930         [BZ #1302]
7931         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
7932         changed.
7933         (bitset_word_t): Renamed from bitset_word.  All uses changed.
7934
7935         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
7936
7937         [BZ #281]
7938         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
7939         * lib/regcomp.c: Remove unnecessary uses of
7940         unsigned RE_TRANSLATE_TYPE.
7941         * lib/regex_internal.h: Likewise.
7942         * lib/regex_internal.c: Likewise.
7943         * lib/regexec.c: Likewise.
7944         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
7945
7946         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
7947
7948         * lib/regexec.c (find_recover_state): Remove unnecessary
7949         initialization.
7950         (transit_state_bkref): Make DFA a const pointer.
7951         (get_subexp): Likewise.
7952         (check_arrival): Likewise.
7953         (update_cur_sifted_state): Likewise.
7954         (re_search_internal): Likewise.
7955         (prune_impossible_nodes): Likewise.
7956         (acquire_init_state_context): Likewise.
7957         (proceed_next_node): Likewise.
7958         (set_regs): Likewise.
7959         (free_fail_stack_return): Likewise.
7960         (check_arrival_expand_ecl): Mark DFA parameter as const.
7961         (check_arrival_expand_ecl_sub): Likewise.
7962         (check_subexp_limits): Likewise.
7963         (sub_epsilon_src_nodes):  Likewise.
7964         (add_epsilon_src_nodes):  Likewise.
7965         (merge_state_array): Likewise.
7966         (update_regs): Likewise.
7967         (build_trtable): Likewise.
7968         (sift_states_backward): Mark MCTX parameter as const.
7969         (build_sifted_states): Likewise.
7970         (update_cur_sifted_state): Likewise.
7971         (sift_states_mkref): Likewise.
7972         (check_arrival_expand_ecl): Mark eclosure as const.
7973         (check_dst_limits_calc_pos_1): Likewise.
7974         * lib/regex_internal.h (re_match_context_t): Make dfa a const
7975         pointer.
7976
7977         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
7978
7979         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
7980         (transit_state_sb): Likewise.
7981         (transit_state_mb): Likewise.
7982         (sift_states_iter_mb): Likewise.
7983         (check_arrival_add_next_nodes): Likewise.
7984         (check_node_accept_bytes): Change first parameter to pointer-to-const.
7985         [_LIBC] (re_search_2_stub): Use mempcpy.
7986
7987         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
7988         mbrtowc for very simple UTF-8 case.
7989
7990         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
7991         a pointer-to-const.
7992         (re_acquire_state_context): Likewise.
7993         * lib/regex_internal.h: Adjust prototypes.
7994
7995         * lib/regex.c: Prevent using C++ compilers.
7996
7997         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
7998         (re_acquire_state_context): Likewise.
7999
8000 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8001
8002         * modules/regex (Depends-on): Add ssize_t.
8003
8004 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8005
8006         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8007         translation table.
8008
8009 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8010
8011         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8012
8013 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8014             Bruno Haible  <bruno@clisp.org>
8015
8016         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8017         <sys/types.h> and <inttypes.h>.
8018
8019 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8020
8021         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8022         `__error_t_defined', so argp.h will not typedef the former.
8023
8024 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8025
8026         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8027         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8028         glibc names.  Even if glibc is changed to conform to POSIX, the
8029         traditional names will be available anyway, since regex depends on
8030         the extensions module.  Also, fix a longstanding typo in the
8031         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8032         reported by Emanuele Giaquinta.  Also, change sense of cached
8033         variable, so that the message makes sense.
8034
8035 2006-03-24  Simon Josefsson  <jas@extundo.com>
8036
8037         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8038         including some doc fixes.
8039         (base64_encode_alloc): Fix +1 bug on allocation failures.
8040
8041 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8042
8043         * lib/base64.c (base64_encode): Do not read past end of array with
8044         unsanitized input on systems with CHAR_BIT > 8.
8045
8046 2006-03-24  Eric Blake  <ebb9@byu.net>
8047
8048         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8049
8050 2006-03-22  Karl Berry  <karl@gnu.org>
8051
8052         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8053         * config/srclistvars.sh (COREUTILS): new var.
8054
8055 2006-03-17  Jim Meyering  <jim@meyering.net>
8056
8057         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8058         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8059
8060 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8061
8062         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8063         no longer needs it.  Instead, check that regoff_t is as least
8064         as wide as ptrdiff_t.
8065
8066         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8067         so that our regex.h stays compatible with the installed regex.
8068         This is helpful for installers who configure --without-included-regex.
8069         Problem reported by Emanuele Giaquinta.
8070
8071 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8072
8073         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8074         Typedef to long int, not to off_, as POSIX will likely change
8075         in that direction.
8076
8077 2006-03-15  Eric Blake  <ebb9@byu.net>
8078
8079         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8080
8081 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8082
8083         * lib/argp-help.c (validate_uparams): Fix typo
8084         * lib/argp-parse.c (argp_default_options): Consistently begin help
8085         messages with a lowercase letter.
8086
8087 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8088
8089         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8090         overrun buffers and shouldn't be used (much as gets shouldn't be
8091         used).
8092         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8093
8094 2006-03-08  Simon Josefsson  <jas@extundo.com>
8095
8096         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8097         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8098
8099 2006-03-08  Simon Josefsson  <jas@extundo.com>
8100
8101         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8102         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8103
8104 2006-03-08  Simon Josefsson  <jas@extundo.com>
8105
8106         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8107         signal that configure disabled the device.
8108
8109 2006-03-08  Simon Josefsson  <jas@extundo.com>
8110
8111         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8112         languages.
8113
8114 2006-03-07  Simon Josefsson  <jas@extundo.com>
8115
8116         * modules/getopt (Depends-on): Add unistd.
8117
8118         * modules/unistd: New file.
8119
8120 2006-03-07  Simon Josefsson  <jas@extundo.com>
8121
8122         * modules/gc-random: New file.
8123
8124 2006-03-07  Simon Josefsson  <jas@extundo.com>
8125
8126         * m4/unistd_h.m4: New file.
8127
8128 2006-03-07  Simon Josefsson  <jas@extundo.com>
8129
8130         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8131         test to be side-effect free by storing the result in the cache
8132         variable gl_cv_lib_readline, and moving the assignment of
8133         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8134         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8135
8136 2006-03-07  Simon Josefsson  <jas@extundo.com>
8137
8138         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8139         error on missing devices (the functions will return an error).
8140
8141         * m4/gc.m4: Move random stuff to gc-random.m4
8142
8143 2006-03-07  Simon Josefsson  <jas@extundo.com>
8144
8145         * lib/unistd_.h: New file.
8146
8147 2006-03-07  Simon Josefsson  <jas@extundo.com>
8148
8149         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8150
8151 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8152
8153         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8154         Problem reported by Juan Manuel Guerrero.
8155
8156 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8157
8158         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8159         the unistd module.
8160         * lib/getlogin_r.c: Likewise.
8161         * lib/getlogin_r.h: Likewise.
8162         * lib/glob.c: Likewise.
8163         * lib/pagealign_alloc.c: Likewise.
8164         * lib/unistd_.h: Remove; no longer needed.
8165
8166 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8167
8168         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8169         Add unistd.
8170         * modules/c-stack (Depends-on): Add unistd.
8171         * modules/getlogin_r: Likewise.
8172         * modules/glob: Likewise.
8173         * modules/pagealign_alloc: Likewise.
8174         * modules/unistd (Files): Remove lib/unistd_.h.
8175         (EXTRA_DIST): Remove.
8176         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8177         need unistd_.h.
8178         (MOSTLYCLEANFILES): Remove unistd.h-t.
8179
8180 2006-03-03  Simon Josefsson  <jas@extundo.com>
8181
8182         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8183
8184 2006-03-03  Simon Josefsson  <jas@extundo.com>
8185
8186         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8187         libidn and bison.
8188
8189 2006-03-03  Simon Josefsson  <jas@extundo.com>
8190
8191         * build-aux/maint.mk: Add indent target.
8192
8193 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8194
8195         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8196         our replacement poll.h in any case, to avoid a differing
8197         declaration from a system header.  Seen on AIX.
8198
8199 2006-03-01  Simon Josefsson  <jas@extundo.com>
8200
8201         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8202         <kasal@ucw.cz>.
8203
8204 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8205
8206         * modules/gettime (Depends-on): Add extensions module.
8207         * modules/nanosleep (Depends-on): Likewise.
8208         * modules/settime (Depends-on): Likewise.
8209
8210 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8211
8212         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8213         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8214         pedantically.
8215         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8216         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8217
8218         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8219         not "==".  Reported by Ralf Wildenhues.
8220
8221 2006-03-01  Karl Berry  <karl@gnu.org>
8222
8223         * doc/Copyright/request-*: new files, synced from gnuorg.
8224
8225 2006-03-01  Karl Berry  <karl@gnu.org>
8226
8227         * config/srclist.txt (Copyright/*): new entries.
8228
8229 2006-02-28  Simon Josefsson  <jas@extundo.com>
8230
8231         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8232
8233 2006-02-27  Simon Josefsson  <jas@extundo.com>
8234
8235         * lib/base64.h: Indent #define's.  From Jim Meyering
8236         <jim@meyering.net>.
8237
8238 2006-02-27  Jim Meyering  <jim@meyering.net>
8239
8240         Revert the change of 2006-02-24, so these files can continue
8241         to be sync'd from gettext.
8242         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8243         of `config.h'.
8244
8245 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8246
8247         * modules/intprops: New file.
8248         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8249         Add intprops.
8250         * modules/getloadavg (Files): Remove lib/intprops.h.
8251         (Depends-on): Add intprops.
8252         * modules/human: Likewise.
8253         * modules/inttostr: Likewise.
8254         * modules/openat: Likewise.
8255         * modules/sig2str: Likewise.
8256         * modules/userspec: Likewise.
8257         * modules/utimecmp: Likewise.
8258         * modules/xnanosleep: Likewise.
8259         * modules/xstrtol: Likewise.
8260
8261 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8262
8263         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8264         * modules/lock-tests (TESTS): Use $(EXEEXT).
8265         * modules/tls-tests: Likewise.
8266         * modules/argp-tests: Likewise.
8267         (check_PROGRAMS): New var, replacing...
8268         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8269
8270 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8271
8272         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8273         `config.h'.
8274
8275 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8276
8277         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8278
8279 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8280
8281         Sync from coreutils.
8282         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8283         gl_CHDIR_SAFER.
8284
8285 2006-02-22  Jim Meyering  <jim@meyering.net>
8286
8287         Sync from coreutils.
8288         * m4/chdir-safer.m4: New file.
8289
8290 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8291
8292         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8293         AT_FDCWD exceeds INT_MAX.
8294         * lib/openat.h (AT_FDCWD): Likewise.
8295
8296 2006-02-17  Eric Blake  <address@hidden>
8297
8298         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8299
8300 2006-02-16  Simon Josefsson  <jas@extundo.com>
8301
8302         * modules/getaddrinfo (Depends-on): Add sys_socket.
8303
8304 2006-02-15  Simon Josefsson  <jas@extundo.com>
8305
8306         * build-aux/maint.mk: Add dsyntax-check rule.
8307
8308 2006-02-15  Eric Blake  <ebb9@byu.net>
8309
8310         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8311         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8312         'present but cannot compile' warnings on cygwin.
8313         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8314         use ws2tcpip.h if sys/socket.h works.
8315         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8316         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8317
8318 2006-02-14  Simon Josefsson  <jas@extundo.com>
8319
8320         * modules/maintainer-makefile (Files): Rename.
8321
8322         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8323         and (the local) Makefile.cfg to maint-cfg.mk.
8324
8325         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8326         to the latter.
8327
8328         * modules/maintainer-makefile: New module.
8329
8330         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8331         severaly stripped to make it possible to build it up from scratch
8332         with reliable tests.
8333
8334         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8335         fixes to permit overriding the default actions when configure and
8336         makefile are not available.
8337
8338 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8339
8340         Sync from coreutils.
8341         * modules/lstat (Depends-on): Don't depend on xalloc.
8342         (License): Change from GPL to LGPL, since this is now simply a
8343         replacement for a libc function.
8344
8345 2006-02-14  Jim Meyering  <jim@meyering.net>
8346
8347         Sync from coreutils.
8348
8349         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8350         failure on deficient systems, and simplify gnulib lgpl dependencies.
8351         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8352         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8353
8354         * lib/xalloc-die.c: Remove unused definition of N_.
8355
8356 2006-02-14  Jim Meyering  <jim@meyering.net>
8357
8358         Sync from coreutils.
8359         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8360         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8361         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8362         double-quote uses of that variable, to accommodate the rare case in
8363         which getmntent is available in none of the libraries checked.  This
8364         happens at least on FreeBSD 5.0.
8365
8366 2006-02-13  Simon Josefsson  <jas@extundo.com>
8367
8368         * gnulib-tool (Usage): Fix --import, from
8369         karl@freefriends.org (Karl Berry).
8370
8371 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8372
8373         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8374
8375 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8376
8377         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8378         "autoupdate" on 2005-12-12.
8379
8380 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8381
8382         * modules/closeout (Depends-on): Remove atexit.
8383
8384 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8385
8386         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8387         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8388
8389 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8390
8391         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8392         __EXTENSIONS__ if this causes compilation to fail.  Problem
8393         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8394         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8395
8396 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8397
8398         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8399         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8400         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8401         All uses changed.
8402
8403 2006-01-26  Simon Josefsson  <jas@extundo.com>
8404
8405         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8406         prototype is visible on mingw32.
8407
8408         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8409         for mingw32.
8410
8411         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8412         mingw32).
8413
8414 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8415
8416         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8417         attempt to open for write; this always fails, at least on POSIX
8418         hosts.  This reinstates the 2006-01-09 change, which was
8419         inadvertently removed.
8420
8421 2006-01-26  Bruno Haible  <bruno@clisp.org>
8422
8423         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8424         Reported by Paul Eggert.
8425
8426 2006-01-26  Bruno Haible  <bruno@clisp.org>
8427             Paul Eggert  <eggert@cs.ucla.edu>
8428
8429         * lib/stdbool_.h (_Bool)
8430         [(! (defined __cplusplus || defined __BEOS__)
8431           && !defined __GNUC__
8432           && !(defined __HP_cc || defined __xlc__
8433                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8434                || defined __sgi))]:
8435         #define to signed char in these cases too; this simplifies
8436         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8437         etc., separately) and makes it more conservative.
8438
8439 2006-01-25  Simon Josefsson  <jas@extundo.com>
8440
8441         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8442         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8443         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8444
8445 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8446
8447         * lib/argp-namefrob.h: Bugfix. Remove stray #
8448
8449 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8450
8451         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8452         so that we test the test.
8453         Check for yet another HP-UX cc bug involving *bool |= bool.
8454
8455 2006-01-25  Karl Berry  <karl@gnu.org>
8456
8457         * config/srclist.txt (vasnprintf.c): sync lost.
8458
8459 2006-01-25  Jim Meyering  <jim@meyering.net>
8460
8461         Sync from the stable (b5) branch of coreutils:
8462
8463         * lib/fts.c (fts_children): Don't let close() clobber errno from
8464         failed fchdir().
8465
8466         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8467         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8468         a dangling symlink.  That can also happen at least for ELOOP.
8469         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8470         FYI, this bug predates the inclusion of fts.c in coreutils.
8471
8472         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8473         in their own block, so pre-c99 compilers don't object.
8474
8475         Avoid the double-free (first in fts_read, second in fts_close) that
8476         would occur when an `active' directory is made inaccessible (e.g.,
8477         via chmod a-x) during a traversal.
8478         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8479         before returning.  Reproduce this failure by
8480         mkdir -p a/b; cd a; chmod a-x . b
8481         Reported by Stavros Passas.
8482
8483 2006-01-25  Jim Meyering  <jim@meyering.net>
8484
8485         * lib/fileblocks.c: Remove more useless parentheses.
8486         * lib/readutmp.h: Likewise.
8487
8488 2006-01-25  Bruno Haible  <bruno@clisp.org>
8489
8490         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8491         warnings.
8492         Reported by Paul Eggert.
8493
8494 2006-01-25  Bruno Haible  <bruno@clisp.org>
8495
8496         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8497         rid of a trap command. For Solaris sh.
8498         Reported by Mark D. Baushke <mdb@gnu.org>.
8499
8500 2006-01-24  Simon Josefsson  <jas@extundo.com>
8501
8502         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8503         Bruno.
8504
8505 2006-01-24  Karl Berry  <karl@gnu.org>
8506
8507         * config/srclist.txt (argp-namefrob.h): sync lost.
8508
8509 2006-01-24  Jim Meyering  <jim@meyering.net>
8510
8511         * modules/openat (Files): Add lib/intprops.h.
8512         From Mark D. Baushke.
8513
8514 2006-01-24  Jim Meyering  <jim@meyering.net>
8515
8516         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
8517         Reported by Mark D. Baushke.
8518
8519 2006-01-24  Jim Meyering  <jim@meyering.net>
8520
8521         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
8522
8523 2006-01-24  Bruno Haible  <bruno@clisp.org>
8524
8525         * modules/strnlen (Maintainer): Change from glibc to all.
8526
8527 2006-01-24  Bruno Haible  <bruno@clisp.org>
8528
8529         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
8530         Patch by Paul Eggert.
8531
8532 2006-01-24  Bruno Haible  <bruno@clisp.org>
8533
8534         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
8535         already has it.
8536         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
8537         2005-11-26.
8538
8539         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
8540         'signed char' to avoid problems with the built-in _Bool type.
8541         Reported by Paul Eggert on 2005-11-26.
8542
8543 2006-01-24  Bruno Haible  <bruno@clisp.org>
8544
8545         * gnulib-tool (func_import): Avoid constructing complicated sed
8546         expressions inside backquote.
8547         Report and solution by Mark D. Baushke <mdb@gnu.org>.
8548
8549 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
8550
8551         These changes imported from libc.
8552         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
8553         test and two separate function calls.
8554         * lib/strndup.c (__strndup): Add libc_hidden_def.
8555
8556 2006-01-23  Simon Josefsson  <jas@extundo.com>
8557
8558         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
8559         Remove the test_*_SOURCES variable: automake infers it by default.
8560         * modules/tls-tests: Likewise.
8561
8562 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8563
8564         Work around porting bugs reported by Dieter in
8565         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
8566         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
8567         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
8568         Include "getopt.h" first, to check interface.
8569         (getenv): Declare only if defined HAVE_DECL_GETENV &&
8570         !HAVE_DECL_GETENV.
8571         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
8572         (__strndup): Revert to K&R-style function dfns, the glibc style.
8573         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
8574         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
8575         Include strnlen.h first, to get prototype properly.
8576         (strnlen): Renamed from __strnlen.
8577         Remove weak alias.
8578
8579 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8580
8581         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
8582
8583 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
8584
8585         * config/srclist.txt: Adjust to reflect glibc reorganization.
8586         This affects only comments.
8587
8588 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8589
8590          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
8591          Reported by Bruce Korb <bkorb@gnu.org>.
8592
8593 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
8594
8595         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
8596         to pacify gcc -Wswitch-default.
8597
8598 2006-01-22  Bruno Haible  <bruno@clisp.org>
8599
8600         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
8601         temporary buffer for sprintf, take into account the precision also
8602         for 'd', 'i', 'u', 'o', 'x', 'X'.
8603
8604 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8605
8606         * modules/argp-tests: New module
8607         * tests/test-argp.c: New file
8608         * tests/test-argp-2.sh: New file
8609
8610 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
8611
8612         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
8613         (__argp_base_name): Removed
8614         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
8615         typo.
8616         (__argp_base_name): Provide macro definition or extern declaration
8617         depending on the configuration
8618
8619 2006-01-20  Simon Josefsson  <jas@extundo.com>
8620
8621         * modules/inet_ntop (Depends-on): Depend on sys_socket.
8622
8623 2006-01-20  Simon Josefsson  <jas@extundo.com>
8624
8625         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
8626
8627 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
8628
8629         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
8630         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
8631         Suggested by Bruno Haible.
8632
8633 2006-01-20  Karl Berry  <karl@gnu.org>
8634
8635         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
8636         until changes propagate, I guess.
8637
8638 2006-01-19  Simon Josefsson  <jas@extundo.com>
8639
8640         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
8641
8642 2006-01-19  Simon Josefsson  <jas@extundo.com>
8643
8644         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
8645
8646 2006-01-19  Simon Josefsson  <jas@extundo.com>
8647
8648         * gnulib-tool: Set check_PROGRAMS.
8649
8650         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8651         modules/des-tests, modules/gc-arcfour-tests,
8652         modules/gc-arctwo-tests, modules/gc-des-tests,
8653         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8654         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8655         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8656         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8657         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8658         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
8659         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
8660         test_*_SOURCES.
8661
8662 2006-01-18  Simon Josefsson  <jas@extundo.com>
8663
8664         * modules/socklen (Depends-on): Depend on sys_socket.
8665
8666 2006-01-18  Simon Josefsson  <jas@extundo.com>
8667
8668         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
8669         modules/des-tests, modules/gc-arcfour-tests,
8670         modules/gc-arctwo-tests, modules/gc-des-tests,
8671         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
8672         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
8673         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
8674         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
8675         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
8676         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
8677         $(EXEEXT) to automake TESTS variable, for mingw32.
8678
8679 2006-01-17  Simon Josefsson  <jas@extundo.com>
8680
8681         * modules/socklen (Include): Need sys/socket.h.
8682
8683 2006-01-17  Bruno Haible  <bruno@clisp.org>
8684
8685         * modules/ssize_t (Include): Add <sys/types.h>.
8686
8687 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
8688
8689         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
8690         it's not portable and it doesn't work with cross-compiles.
8691         Problem reported by Bruno Haible.  Fix missing-$ typo in
8692         'test "gl_cv_ignore_unused_libraries" ...' that prevented
8693         -zignore from being used with Sun's C compiler.
8694
8695 2006-01-12  Simon Josefsson  <jas@extundo.com>
8696
8697         * lib/base64.c: Fix warning, reported by Bruno Haible
8698         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
8699
8700 2006-01-12  Bruno Haible  <bruno@clisp.org>
8701
8702         * modules/ldd: New file.
8703         * build-aux/ldd.sh.in: New file.
8704         * MODULES.html.sh (Support for building libraries and executables): Add
8705         ldd.
8706
8707 2006-01-12  Bruno Haible  <bruno@clisp.org>
8708
8709         * m4/ldd.m4: New file.
8710
8711 2006-01-12  Bruno Haible  <bruno@clisp.org>
8712
8713         * gnulib-tool (func_import, func_create_testdir): Don't go into an
8714         endless loop while replacing $auxdir with build-aux.
8715
8716 2006-01-11  Simon Josefsson  <jas@extundo.com>
8717
8718         * lib/stdint_.h (SIZE_MAX): Add missing (.
8719
8720 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
8721
8722         Sync from coreutils.
8723         * lib/md5.c: Fix commentary typos.
8724         (alignof, UNALIGNED_P): No need for a GCC-specific version.
8725         * lib/md5.h (__attribute__): Remove; unused.
8726         * lib/sha1.c: Fix commentary to match md5 better.
8727         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
8728         so that we don't need to worry about alignment.  All uses changed.
8729         This merges the 2005-10-28 md5 change into sha1.
8730
8731 2006-01-11  Jim Meyering  <jim@meyering.net>
8732
8733         Sync from coreutils.
8734         * lib/md5.c (OP): Fix spacing.
8735
8736 2006-01-11  Bruno Haible  <bruno@clisp.org>
8737
8738         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8739         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
8740         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
8741
8742 2006-01-11  Bruno Haible  <bruno@clisp.org>
8743
8744         Ensure automatic ordering between gl_LOCK and gl_ARGP.
8745         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
8746         the "early" section as well.
8747
8748 2006-01-11  Bruno Haible  <bruno@clisp.org>
8749
8750         Avoid "ar: no archive members specified" error on MacOS X.
8751         * gnulib-tool (func_modules_add_dummy): New function.
8752         (func_import, func_create_testdir): Invoke it.
8753
8754 2006-01-11  Bruno Haible  <bruno@clisp.org>
8755
8756         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
8757         with $auxdir in AC_CONFIG_FILES statements.
8758
8759 2006-01-11  Bruno Haible  <bruno@clisp.org>
8760
8761         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8762         Initialize also noinst_HEADERS to empty.
8763
8764 2006-01-11  Bruno Haible  <bruno@clisp.org>
8765
8766         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
8767         variables.
8768         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
8769         autoreconf.
8770
8771 2006-01-11  Bruno Haible  <bruno@clisp.org>
8772
8773         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
8774         overridable by the user.
8775         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8776
8777 2006-01-10  Simon Josefsson  <jas@extundo.com>
8778
8779         * modules/sys_socket: New file.
8780
8781 2006-01-10  Simon Josefsson  <jas@extundo.com>
8782
8783         * m4/sys_socket_h.m4: New file.
8784
8785 2006-01-10  Simon Josefsson  <jas@extundo.com>
8786
8787         * lib/socket_.h: New file.
8788
8789 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8790
8791         * modules/readutmp (Maintainer): Add myself.
8792
8793 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8794
8795         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
8796         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
8797         People who are still concerned with buggy memcmp implementations
8798         can invoke gl_FUNC_MEMCMP themselves.
8799
8800 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8801
8802         * lib/regex_internal.h (BITSET_WORD_BITS):
8803         Work around a bug in 64-bit PGC (before version 6.1-2), where the
8804         preprocessor mishandles large unsigned values as if they were signed.
8805         Problem reported by Claudio Fontana in
8806         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
8807
8808 2006-01-10  Jim Meyering  <jim@meyering.net>
8809
8810         Avoid the double-free (first in fts_read, second in fts_close) that
8811         would occur when an `active' directory is made inaccessible (e.g.,
8812         via chmod a-x) during a traversal.
8813         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8814         before returning.  Reproduce this failure by
8815         mkdir -p a/b; cd a; chmod a-x . b
8816         Reported by Stavros Passas.
8817
8818         Sync from coreutils.
8819         * lib/sha1.c: Tweak grammar in a comment.
8820
8821 2006-01-10  Jim Meyering  <jim@meyering.net>
8822
8823         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
8824         Patch by Joerg Sonnenberger.
8825
8826 2006-01-10  Bruno Haible  <bruno@clisp.org>
8827
8828         * modules/readutmp: Depend on module free.
8829         * modules/strtok_r: Depend on module restrict.
8830
8831 2006-01-10  Bruno Haible  <bruno@clisp.org>
8832
8833         * modules/gettext (configure.ac): Add an invocation of
8834         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
8835
8836 2006-01-10  Bruno Haible  <bruno@clisp.org>
8837
8838         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
8839         Reported by Werner Lemberg <wl@gnu.org>.
8840
8841 2006-01-10  Bruno Haible  <bruno@clisp.org>
8842
8843         * lib/localcharset.c: Update from GNU gettext.
8844
8845 2006-01-10  Bruno Haible  <bruno@clisp.org>
8846
8847         * lib/argp.h (__const): Remove macro. Use const instead.
8848         * lib/argp-fmtstream.h (__const): Likewise.
8849         * lib/glob_.h (__const): Remove macro.
8850         * lib/glob-libc.h: Use const instead of __const.
8851
8852 2006-01-10  Bruno Haible  <bruno@clisp.org>
8853
8854         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
8855         variable.
8856         Needed to avoid an automake error regarding the 'gettext' module.
8857
8858 2006-01-09  Simon Josefsson  <jas@extundo.com>
8859
8860         * modules/inet_ntop (Depends-on): Add restrict.
8861
8862 2006-01-09  Simon Josefsson  <jas@extundo.com>
8863
8864         * modules/gc-rijndael-tests (License): Put under LGPL.
8865
8866         * modules/gc-des-tests (License): Likewise.
8867
8868         * modules/gc-arcfour-tests (License): Likewise.
8869
8870         * modules/gc-arctwo-tests (License): Likewise.
8871
8872         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
8873
8874         * modules/gc-hmac-sha1-tests (Files): Likewise.
8875
8876         * modules/gc-hmac-md5-tests (License): Likewise.
8877
8878         * modules/gc-sha1-tests (License): Likewise.
8879
8880         * modules/gc-md5-tests (License): Likewise.
8881
8882         * modules/gc-md4-tests (License): Likewise.
8883
8884         * modules/gc-md2-tests (License): Likewise.
8885
8886         * modules/gc-tests (License): Likewise.
8887
8888         * modules/des-tests (License): Likewise.
8889
8890         * modules/md4-tests (License): Likewise.
8891
8892         * modules/md2-tests (License): Likewise.
8893
8894 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8895
8896         Sync from coreutils:
8897
8898         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
8899         * modules/lib-ignore: New file.
8900         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
8901         chdir-safer.m4, lchmod.m4.
8902         * modules/openat: Add mkdirat.c, openat-priv.h.
8903
8904 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8905
8906         Sync from coreutils.
8907         * m4/lib-ignore.m4: New file.
8908         * m4/lchmod.m4: New file.
8909
8910 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8911
8912         Sync from coreutils.
8913         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
8914         for write access: POSIX says that must fail.
8915         * lib/fts.c (diropen): Likewise.
8916         * lib/save-cwd.c (save_cwd): Likewise.
8917         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
8918         well, for minor improvements on hosts that lack O_DIRECTORY.
8919         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
8920         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
8921         Fall back on chown if open failed with EACCES.
8922
8923         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
8924         Report an error at compile-time if only a 1-second nominal clock
8925         resolution is found.
8926
8927         * lib/lchmod.h: New file.
8928         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
8929         (make_dir_parents): Use lchown rather than chown, and
8930         lchmod rather than chmod.
8931
8932         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
8933         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
8934         "proc" reported by n0dalus.
8935
8936         * lib/mountlist.c: Include <limits.h>.
8937         (dev_from_mount_options)
8938         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
8939         New function.  It no longer assumes "dev=" has the System V meaning
8940         on Linux (since it doesn't).  It also parses "dev=" more carefully.
8941         (read_file_system_list)
8942         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
8943         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
8944         dev= in that case.
8945
8946         * lib/posixtm.h (PDS_PRE_2000): New macro.
8947         * lib/posixtm.c (year): Arg is now syntax_bits rather than
8948         allow_century.  All usages changed.  Reject dates outside the range
8949         1969-1999 if PDS_PRE_2000 is used.
8950
8951 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
8952
8953         Sync from coreutils.
8954         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
8955         (Time of day items): Mention the possibility of leap seconds.
8956         Problem reported by Dr. David Alan Gilbert.
8957
8958 2006-01-09  Jim Meyering  <jim@meyering.net>
8959
8960         Sync from coreutils.
8961
8962         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
8963
8964         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
8965
8966         * lib/modechange.c (mode_compile): Reject an invalid mode string
8967         that starts with an octal digit.  From Andreas Gruenbacher.
8968
8969         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
8970         and dup to open_safer and dup_safer, respectively.
8971         (openat_permissive): Fix typo in comment.
8972
8973         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
8974         "gettext.h"; either no longer needed or are guaranteed by openat.h.
8975         (_): Remove; no longer needed.
8976         (openat): Renamed from rpl_openat; no need for rpl_openat
8977         since openat.h renames openat for us.
8978         Replace most of the body with a call to openat_permissive,
8979         to avoid duplicate code.
8980         Port to (probably hypothetical) environments were mode_t is
8981         wider than int.
8982         (openat_permissive): Require mode arg, so that we can check
8983         types better.  Put it just after flags.  Change cwd failure
8984         indicator from pointer-to-bool to pointer-to-errno-value.
8985         All callers changed.
8986         Invoke openat_save_fail and/or openat_restore_fail if
8987         cwd_errno is null, so that openat can call us.
8988         (openat_permissive, fdopendir, fstatat, unlinkat):
8989         Simplify errno handling to avoid some duplicate code,
8990         as it's OK to set errno on success.
8991         * lib/openat.h: Revamp code so that function macros depend on
8992         __OPENAT_PREFIX only, not also on AT_FDCWD.
8993         (openat_ro): Remove.  Caller changed to use openat_permissive.
8994         (openat_permissive): Now a macro, if not a function.
8995         (openat_restore_fail, openat_save_fail): Now always functions,
8996         since mkdirat needs them even if __OPENAT_PREFIX is defined.
8997
8998         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
8999         and openat.c.
9000         * lib/mkdirat.c: Include openat-priv.h.
9001         Remove definitions of macros defined therein.
9002         * lib/openat.c: Likewise.
9003
9004         * lib/mkdirat.c (mkdirat): New file and function.
9005         * lib/openat.h (mkdirat): Declare.
9006
9007         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9008
9009         * lib/openat.h (openat_permissive): Declare.
9010         (openat_ro): Define.
9011
9012         * lib/openat.c (EXPECTED_ERRNO): New macro.
9013         (openat_permissive): New function -- used in remove.c rewrite.
9014         (all functions): Set errno just before returning, only if there
9015         was an actual failure.
9016         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9017
9018         Emulate openat-family functions using Linux's procfs, if possible.
9019         Idea and some code based on Ulrich Drepper's glibc changes.
9020
9021         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9022         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9023         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9024         before falling back on save_cwd and restore_cwd.
9025         (fdopendir, fstatat, unlinkat): Likewise.
9026
9027         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9028         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9029
9030         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9031         as second argument to va_arg.  Otherwise, some versions of gcc
9032         warn that `if this code is reached, the program will abort'.
9033
9034 2006-01-09  Jim Meyering  <jim@meyering.net>
9035
9036         Sync from coreutils.
9037         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9038         Require openat-priv.h.
9039
9040 2006-01-09  Bruno Haible  <bruno@clisp.org>
9041
9042         * modules/strnlen (Include): Use strnlen.h.
9043
9044 2006-01-09  Bruno Haible  <bruno@clisp.org>
9045
9046         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9047
9048 2006-01-09  Bruno Haible  <bruno@clisp.org>
9049
9050         * lib/sysexit_.h (EX_OK): New macro.
9051         Suggested by Martin Lambers <marlam@marlam.de>.
9052
9053 2006-01-09  Bruno Haible  <bruno@clisp.org>
9054
9055         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9056         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9057
9058 2006-01-09  Bruno Haible  <bruno@clisp.org>
9059
9060         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9061         numbers.
9062
9063 2006-01-09  Bruno Haible  <bruno@clisp.org>
9064
9065         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9066         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9067         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9068         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9069
9070 2006-01-09  Bruno Haible  <bruno@clisp.org>
9071
9072         * build-aux/javacomp.sh.in: New file, moved from lib/.
9073         * modules/javacomp-script (Files): Update.
9074         (configure.ac): Add AC_CONFIG_FILES invocation.
9075         (EXTRA_DIST): Remove variable.
9076
9077         * build-aux/javaexec.sh.in: New file, moved from lib/.
9078         * modules/javaexec (Files): Update.
9079         (configure.ac): Add AC_CONFIG_FILES invocation.
9080         (EXTRA_DIST): Remove javaexec.sh.in.
9081
9082         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9083         * modules/csharpcomp-script (Files): Update.
9084         (configure.ac): Add AC_CONFIG_FILES invocation.
9085         (EXTRA_DIST): Remove variable.
9086
9087         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9088         * modules/csharpexec (Files): Update.
9089         (configure.ac): Add AC_CONFIG_FILES invocation.
9090         (EXTRA_DIST): Remove csharpexec.sh.in.
9091
9092 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9093
9094         Sync from coreutils.
9095
9096         Add POSIX ACL support
9097         * lib/acl.h (copy_acl, set_acl): Add declarations.
9098         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9099         systems other than Linux.
9100         (chmod_or_fchmod): New function: use fchmod when possible,
9101         and chmod otherwise.
9102         (file_has_acl): Add a POSIX ACL implementation, with a
9103         Linux-specific subcase.
9104         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9105         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9106         acls are unsupported.
9107         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9108         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9109         are unsupported.
9110
9111 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9112
9113         Sync from coreutils.
9114         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9115
9116 2006-01-07  Bruno Haible  <bruno@clisp.org>
9117
9118         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9119         gl_EARLY.
9120
9121 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9122
9123         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9124         Problem reported for Mingw by Mark Junker.
9125
9126 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9127
9128         * README: Gnulib normally doesn't generate a tarball.
9129
9130 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9131
9132         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9133         long int, not int, for nanosecond counts, so that people who are
9134         used to POSIX struct timespec won't be surprised.  Reported by Jim
9135         Meyering.
9136
9137 2005-12-28  Bruno Haible  <bruno@clisp.org>
9138
9139         * build-aux/config.rpath: Update from GNU gettext.
9140
9141 2005-12-16  Jim Meyering  <jim@meyering.net>
9142
9143         * modules/fprintftime: New module.
9144         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9145
9146 2005-12-16  Jim Meyering  <jim@meyering.net>
9147
9148         * m4/fprintftime.m4: New file.
9149
9150 2005-12-16  Jim Meyering  <jim@meyering.net>
9151
9152         * lib/fprintftime.c, lib/fprintftime.h: New files.
9153
9154 2005-12-15  Simon Josefsson  <jas@extundo.com>
9155
9156         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9157         new m4/socklen.m4.
9158
9159 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9160
9161         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9162         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9163
9164 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9165
9166         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9167         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9168         struct uparams is valid. Fall back to the default values if it is
9169         not.
9170
9171 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9172
9173         * modules/argp (Files): Add argp-pin.c
9174         (Depends-on): dirname
9175         (lib_SOURCES): Add argp-pin.c
9176
9177 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9178
9179         * m4/argp.m4:  Check if program_invocation_name and
9180         program_invocation_short_name are declared and define appropriate
9181         macros if they are not.
9182
9183 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9184
9185         * lib/argp-help.c (__argp_base_name): New function
9186         (__argp_short_program_name): Rewrite using __argp_base_name
9187         * lib/argp-namefrob.h: Define program_invocation_name and
9188         program_invocation_short_name if requested
9189         (__argp_base_name): Add prototype
9190         * lib/argp-parse.c (argp_def): Use gettext wrappers
9191         (argp_default_parser): Use __argp_base_name
9192         * lib/argp-pin.c: New file. Defines program_invocation_name and
9193         program_invocation_short_name on systems that lack them.
9194
9195 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9196
9197         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9198         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9199         porting problem reported by Georg Schwarz in
9200         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9201
9202 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9203
9204         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9205         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9206         porting problem reported by Georg Schwarz in
9207         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9208
9209 2005-12-05  Bruno Haible  <bruno@clisp.org>
9210
9211         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9212         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9213         Reported by Mark Junker <mjscod@gmx.de>.
9214
9215 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9216
9217         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9218         Use implementation from Albert Chin, with some
9219         comments/corrections by Stepan Kasal and myself.
9220
9221 2005-12-02  Bruno Haible  <bruno@clisp.org>
9222
9223         * gnulib-tool (func_import): Accept GPLed build tool modules when
9224         --lgpl is given.
9225         * modules/csharpcomp-script: New file.
9226         * modules/csharpcomp: Depend on it.
9227         * modules/javacomp-script: New file.
9228         * modules/javacomp: Depend on it.
9229         Suggested by Simon Josefsson.
9230
9231 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9232
9233         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9234         statement, to work around an HP-UX 10.20 compiler bug reported by
9235         Peter O'Gorman.
9236
9237 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9238
9239         * modules/savedir (Depends-on): Add openat.
9240
9241 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9242
9243         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9244         (uintmax_t) [defined uintmax_t]: Do not declare.
9245         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9246         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9247         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9248         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9249         sake of portability to weird hosts that C allows (though we don't
9250         know of any practical examples).
9251
9252         * lib/savedir.h (fdsavedir): New decl.
9253         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9254         contains most of the former guts of savedir.
9255         (savedir): Use savedirstream.
9256         Include "openat.h".
9257
9258 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9259
9260         * modules/obstack (Files): Add m4/ulonglong.m4.
9261         Problem reported by Davide Angelocola.
9262
9263 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9264
9265         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9266         coreutils no longer futzes with rounding modes.
9267
9268 2005-11-14  Jim Meyering  <jim@meyering.net>
9269
9270         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9271         replacement of mkstemp.
9272
9273 2005-11-10  Simon Josefsson  <jas@extundo.com>
9274
9275         * lib/readline.c: Remove EOL.
9276
9277 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9278
9279         * modules/gethrxtime (Depends-on): Add gettime.
9280
9281 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9282
9283         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9284         or gettimeofday; no longer needed.
9285
9286 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9287
9288         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9289         time business.
9290         (gethrxtime) [! (HAVE_NANOUPTIME
9291         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9292         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9293         our own approximation.
9294
9295 2005-11-08  Eric Blake  <ebb9@byu.net>
9296
9297         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9298
9299 2005-11-08  Eric Blake  <ebb9@byu.net>
9300
9301         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9302
9303 2005-11-04  Bruno Haible  <bruno@clisp.org>
9304
9305         * gnulib-tool: Implement --update mode.
9306
9307 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9308
9309         Fix porting problem reported by Theodoros V. Kalamatianos.
9310         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9311         Don't assume that futimes failing means we must fail.
9312
9313 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9314
9315         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9316         variables to suggest the intended function of the PATH_MAX check.
9317
9318 2005-10-30  Kean Johnston  <jkj@sco.com>
9319
9320         Trivial changes to support SCO systems.
9321         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9322         as PATH_MAX.
9323         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9324         where __ptr is null when no I/O is pending.
9325
9326 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9327
9328         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9329         leave errno alone.  Problem reported by Dmitry V. Levin.
9330
9331 2005-10-28  Simon Josefsson  <jas@extundo.com>
9332
9333         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9334         Test more.
9335
9336         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9337
9338         * modules/md2, modules/md2-tests: New files.
9339
9340 2005-10-28  Simon Josefsson  <jas@extundo.com>
9341
9342         * m4/inet_ntop.m4: More tests.
9343
9344         * m4/gc-md2.m4, md2.m4: New file.
9345
9346 2005-10-28  Simon Josefsson  <jas@extundo.com>
9347
9348         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9349         "restrict" keywords, as per POSIX.  Protect the function
9350         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9351         Don't use K&R prototypes.  Check the sprintf return values.
9352         Re-define EAFNOSUPPORT if not present.  Indent.
9353
9354         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9355         suggested by Bruno Haible <bruno@clisp.org>.
9356
9357         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9358
9359         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9360
9361         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9362         libgcrypt).
9363
9364         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9365
9366         * lib/md2.h, lib/md2.c: New files.
9367
9368 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9369
9370         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9371         errno alone.  Problem reported by Frederic Jolliton.
9372
9373 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9374
9375         * modules/verify (License): Change from GPL to LGPL.  This is a
9376         tiny module and there are apparently near-equivalents that are
9377         under the BSD license.
9378
9379 2005-10-24  Simon Josefsson  <jas@extundo.com>
9380
9381         * modules/sha1: Relicense to LGPL.
9382
9383 2005-10-24  Simon Josefsson  <jas@extundo.com>
9384
9385         * lib/md4.h: Shrink buffer size, now that we changed the type.
9386
9387 2005-10-23  Simon Josefsson  <jas@extundo.com>
9388
9389         * gnulib-tool (func_import): Fix --tests-base.
9390
9391 2005-10-22  Simon Josefsson  <jas@extundo.com>
9392
9393         * modules/arcfour (Depends-on): Need stdint.
9394
9395 2005-10-22  Simon Josefsson  <jas@extundo.com>
9396
9397         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9398         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9399
9400 2005-10-22  Simon Josefsson  <jas@extundo.com>
9401
9402         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9403         suggested by Bruno Haible <bruno@clisp.org>.
9404
9405 2005-10-22  Simon Josefsson  <jas@extundo.com>
9406
9407         * lib/crc.h: Include stddef.h, for size_t.
9408
9409 2005-10-22  Simon Josefsson  <jas@extundo.com>
9410
9411         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9412         arcfour_context struct (simplify test vector testing in GNU
9413         Shishi).
9414
9415 2005-10-21  Simon Josefsson  <jas@extundo.com>
9416
9417         * modules/des, modules/des-tests: New files.
9418
9419         * modules/gc-des, modules/gc-des-tests: New files.
9420
9421         * tests/test-des.c, tests/test-gc-des.c: New file.
9422
9423 2005-10-21  Simon Josefsson  <jas@extundo.com>
9424
9425         * modules/arctwo, modules/arctwo-tests: New files.
9426
9427         * tests/test-arctwo.c: New file.
9428
9429         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9430
9431         * tests/test-gc-arctwo.c: New file.
9432
9433 2005-10-21  Simon Josefsson  <jas@extundo.com>
9434
9435         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9436         Bruno Haible <bruno@clisp.org>.
9437
9438         * m4/gc-des.m4: New file.
9439
9440 2005-10-21  Simon Josefsson  <jas@extundo.com>
9441
9442         * m4/arctwo.m4: New file.
9443
9444         * m4/gc-arctwo.m4: New file.
9445
9446 2005-10-21  Simon Josefsson  <jas@extundo.com>
9447
9448         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9449         block.
9450
9451 2005-10-21  Simon Josefsson  <jas@extundo.com>
9452
9453         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9454         <bruno@clisp.org>.
9455
9456         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9457
9458         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9459         Bruno Haible <bruno@clisp.org>.
9460
9461         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9462         <bruno@clisp.org>.
9463
9464 2005-10-21  Simon Josefsson  <jas@extundo.com>
9465
9466         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9467
9468 2005-10-21  Simon Josefsson  <jas@extundo.com>
9469
9470         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9471
9472 2005-10-21  Simon Josefsson  <jas@extundo.com>
9473
9474         * lib/des.h, lib/des.c: New files.
9475
9476         * lib/gc-gnulib.c: Support DES.c
9477
9478 2005-10-21  Simon Josefsson  <jas@extundo.com>
9479
9480         * lib/arctwo.h, lib/arctwo.c: New files.
9481
9482         * lib/gc-gnulib.c: Support ARCTWO.
9483
9484 2005-10-21  Simon Josefsson  <jas@extundo.com>
9485
9486         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9487         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9488
9489 2005-10-21  Simon Josefsson  <jas@extundo.com>
9490
9491         * gnulib-tool (func_import, func_create_testdir): Define automake
9492         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9493         Makefile.am snippet),
9494         suggested by Bruno Haible <bruno@clisp.org>.
9495
9496         * modules/gc (Makefile.am): Use it.
9497
9498 2005-10-21  Bruno Haible  <bruno@clisp.org>
9499
9500         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9501         patch.
9502
9503 2005-10-19  Simon Josefsson  <jas@extundo.com>
9504
9505         * tests/test-gc-rijndael.c: New file.
9506
9507         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
9508
9509 2005-10-19  Simon Josefsson  <jas@extundo.com>
9510
9511         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
9512         interface too.
9513
9514 2005-10-19  Simon Josefsson  <jas@extundo.com>
9515
9516         * tests/test-gc-arcfour.c: New file.
9517
9518         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
9519
9520 2005-10-19  Simon Josefsson  <jas@extundo.com>
9521
9522         * modules/gc-md4, modules/gc-md4-tests: New file.
9523
9524         * tests/test-gc-md4.c: New file.
9525
9526 2005-10-19  Simon Josefsson  <jas@extundo.com>
9527
9528         * m4/gc-md4.m4: New file.
9529
9530 2005-10-19  Simon Josefsson  <jas@extundo.com>
9531
9532         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
9533         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
9534         <kasal@ucw.cz>.
9535
9536 2005-10-19  Simon Josefsson  <jas@extundo.com>
9537
9538         * m4/gc-arcfour.m4: New file.
9539
9540         * m4/gc-rijndael.m4: New file.
9541
9542 2005-10-19  Simon Josefsson  <jas@extundo.com>
9543
9544         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
9545
9546 2005-10-19  Simon Josefsson  <jas@extundo.com>
9547
9548         * lib/gc-gnulib.c: Support ARCFOUR.
9549
9550 2005-10-19  Simon Josefsson  <jas@extundo.com>
9551
9552         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
9553         support.
9554
9555         * lib/gc.h: Add ECB enum type.
9556
9557         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
9558
9559 2005-10-18  Simon Josefsson  <jas@extundo.com>
9560
9561         * tests/test-md5.c: New file.
9562
9563         * modules/md5-tests: New file.
9564
9565 2005-10-18  Simon Josefsson  <jas@extundo.com>
9566
9567         * tests/test-md4.c: New file.
9568
9569         * modules/md4, modules/md4-tests: New files.
9570
9571 2005-10-18  Simon Josefsson  <jas@extundo.com>
9572
9573         * m4/md4.m4: New file.
9574
9575 2005-10-18  Simon Josefsson  <jas@extundo.com>
9576
9577         * lib/md4.h, lib/md4.c: New files, based on md5.?.
9578
9579 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
9580
9581         * gnulib-tool (func_create_testdir): Omit the second check whether
9582         BUILT_SOURCES in nonempty.
9583
9584 2005-10-17  Simon Josefsson  <jas@extundo.com>
9585
9586         * tests/test-rijndael.c: New file.
9587
9588 2005-10-17  Simon Josefsson  <jas@extundo.com>
9589
9590         * modules/sha1: Depend on stdint instead of md5.
9591
9592         * modules/md5: Depend on stdint, remove uint32_t.
9593
9594 2005-10-17  Simon Josefsson  <jas@extundo.com>
9595
9596         * modules/gc-sha1-tests: New file.
9597
9598         * tests/test-gc-sha1.c: New file.
9599
9600 2005-10-17  Simon Josefsson  <jas@extundo.com>
9601
9602         * m4/md5.m4: Remove call to uint32_t.m4.
9603
9604 2005-10-17  Simon Josefsson  <jas@extundo.com>
9605
9606         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
9607
9608         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
9609         md5.h.
9610
9611         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
9612
9613         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
9614
9615 2005-10-17  Simon Josefsson  <jas@extundo.com>
9616
9617         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
9618
9619 2005-10-17  Simon Josefsson  <jas@extundo.com>
9620
9621         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
9622
9623 2005-10-17  Simon Josefsson  <jas@extundo.com>
9624
9625         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
9626
9627         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
9628
9629 2005-10-17  Bruno Haible  <bruno@clisp.org>
9630
9631         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
9632         that it can also be used in a test.
9633
9634 2005-10-16  Bruno Haible  <bruno@clisp.org>
9635
9636         * gnulib-tool (func_emit_tests_Makefile_am): Also define
9637         TESTS_ENVIRONMENT, so that individual tests can augment it.
9638
9639         * gnulib-tool (func_create_testdir): Use an intermediate target for
9640         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
9641         macros, like $(ALLOCA_H), which cannot be passed through the command
9642         line.
9643
9644 2005-10-15  Simon Josefsson  <jas@extundo.com>
9645
9646         * modules/rijndael-tests: New file.
9647
9648         * modules/rijndael: New file.
9649
9650 2005-10-15  Simon Josefsson  <jas@extundo.com>
9651
9652         * m4/rijndael.m4: New file.
9653
9654 2005-10-15  Simon Josefsson  <jas@extundo.com>
9655
9656         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
9657
9658         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
9659
9660 2005-10-14  Simon Josefsson  <jas@extundo.com>
9661
9662         * tests/test-arcfour.c: New file.
9663
9664         * modules/arcfour, modules/arcfour-tests: New files.
9665
9666 2005-10-14  Simon Josefsson  <jas@extundo.com>
9667
9668         * m4/arcfour.m4: New file.
9669
9670 2005-10-14  Simon Josefsson  <jas@extundo.com>
9671
9672         * lib/arcfour.h, lib/arcfour.c: New files.
9673
9674 2005-10-14  Roland McGrath  <roland@redhat.com>
9675
9676         Import from libc.  [BZ #1331]
9677         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
9678         macro argument.
9679         Reported by Matej Vela <vela@debian.org>.
9680
9681 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9682
9683         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
9684         include <wchar.h>; no longer needed.
9685
9686 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9687
9688         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
9689
9690 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
9691         and  Ulrich Drepper  <drepper@redhat.com>
9692
9693         Import from libc.
9694         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
9695         instead of inline stream orientation test and two separate
9696         function calls.  Pay no attention to USE_IN_LIBIO.
9697
9698 2005-10-13  Simon Josefsson  <jas@extundo.com>
9699
9700         * modules/gc-hmac-md5-tests: New file.
9701
9702         * tests/test-gc-hmac-sha1.c: New file.
9703
9704         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
9705
9706         * modules/gc-hmac-md5-tests: New file.
9707
9708         * tests/test-gc-md5.c: New file.
9709
9710         * modules/gc-md5-tests: New file.
9711
9712 2005-10-13  Simon Josefsson  <jas@extundo.com>
9713
9714         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
9715         Move memory allocation outside of loop.
9716
9717 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
9718
9719         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
9720         intermediate directory is in a read-only file system.  Problem
9721         reported by Eric Blake.
9722
9723 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
9724
9725         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
9726
9727 2005-10-12  Simon Josefsson  <jas@extundo.com>
9728
9729         * tests/test-hmac-sha1.c: New file.
9730
9731         * modules/hmac-sha1-tests: New file.
9732
9733         * modules/hmac-sha1: New file.
9734
9735 2005-10-12  Simon Josefsson  <jas@extundo.com>
9736
9737         * modules/gc-sha1: New file.
9738
9739 2005-10-12  Simon Josefsson  <jas@extundo.com>
9740
9741         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
9742
9743         * tests/test-gc-pbkdf2-sha1.c: New file.
9744
9745 2005-10-12  Simon Josefsson  <jas@extundo.com>
9746
9747         * modules/gc-md5, modules/gc-hmac-md5: New files.
9748
9749         * modules/gc (Files): Remove md5, memxor and hmac files.
9750
9751 2005-10-12  Simon Josefsson  <jas@extundo.com>
9752
9753         * m4/gc-pbkdf2-sha1.m4: New file.
9754
9755         * m4/gc-hmac-sha1.m4: New file.
9756
9757         * m4/gc-sha1: New file.
9758
9759         * m4/hmac-sha1.m4: New file.
9760
9761 2005-10-12  Simon Josefsson  <jas@extundo.com>
9762
9763         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
9764
9765         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
9766
9767 2005-10-12  Simon Josefsson  <jas@extundo.com>
9768
9769         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
9770         suggested by Bruno Haible <bruno@clisp.org>.
9771
9772 2005-10-12  Simon Josefsson  <jas@extundo.com>
9773
9774         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
9775
9776 2005-10-12  Simon Josefsson  <jas@extundo.com>
9777
9778         * lib/gc-pbkdf2-sha1.c: New file.
9779
9780         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
9781
9782 2005-10-12  Simon Josefsson  <jas@extundo.com>
9783
9784         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
9785
9786         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
9787
9788 2005-10-12  Simon Josefsson  <jas@extundo.com>
9789
9790         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
9791         GC_USE_HMAC_MD5, respectively.
9792
9793         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
9794         (gc_md5): Fix typo.
9795
9796         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
9797
9798         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
9799
9800         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
9801
9802 2005-10-12  Bruno Haible  <bruno@clisp.org>
9803
9804         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
9805         Reported by Stepan Kasal <kasal@ucw.cz>.
9806
9807 2005-10-11  Simon Josefsson  <jas@extundo.com>
9808
9809         * tests/test-crc.c: New file.
9810
9811         * modules/crc, modules/crc-tests: New files.
9812
9813 2005-10-11  Simon Josefsson  <jas@extundo.com>
9814
9815         * m4/crc.m4: New file.
9816
9817 2005-10-11  Simon Josefsson  <jas@extundo.com>
9818
9819         * lib/gc.h: Add gc_hash and gc_hash_buffer.
9820
9821         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
9822
9823         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
9824
9825 2005-10-11  Simon Josefsson  <jas@extundo.com>
9826
9827         * lib/crc.h, lib/crc.c: New files.
9828
9829         * lib/gc.h (gc_hash_buffer): Add doc.
9830
9831 2005-10-11  Bruno Haible  <bruno@clisp.org>
9832
9833         * modules/c-strcasestr: New file.
9834         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
9835
9836 2005-10-11  Bruno Haible  <bruno@clisp.org>
9837
9838         * modules/c-strcase: New file.
9839         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
9840
9841 2005-10-11  Bruno Haible  <bruno@clisp.org>
9842
9843         * lib/strcasecmp.c: Include limits.h.
9844         (strcasecmp): Avoid integer overflow on exotic platforms.
9845         * lib/strncasecmp.c: Include limits.h.
9846         (strncasecmp): Avoid integer overflow on exotic platforms.
9847         Reported by Paul Eggert.
9848
9849 2005-10-11  Bruno Haible  <bruno@clisp.org>
9850
9851         * lib/c-strcasestr.h: New file, from GNU gettext.
9852         * lib/c-strcasestr.c: New file, from GNU gettext.
9853
9854 2005-10-11  Bruno Haible  <bruno@clisp.org>
9855
9856         * lib/c-strcase.h: New file, from GNU gettext.
9857         * lib/c-strcasecmp.c: New file, from GNU gettext.
9858         * lib/c-strncasecmp.c: New file, from GNU gettext.
9859
9860 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9861
9862         * modules/mempcpy (License): GPL -> LGPL.
9863         * modules/strchrnul (License): Likewise.
9864         * modules/sysexits (License): Likewise.
9865
9866 2005-10-08  Simon Josefsson  <jas@extundo.com>
9867
9868         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
9869
9870 2005-10-07  Simon Josefsson  <jas@extundo.com>
9871
9872         * m4/memxor.m4: Remove gl_C_RESTRICT call.
9873
9874 2005-10-06  Simon Josefsson  <jas@extundo.com>
9875
9876         * tests/test-hmac-md5.c: New file.
9877
9878         * modules/hmac-md5-tests: New file.
9879
9880         * modules/hmac-md5: New file.
9881
9882 2005-10-06  Simon Josefsson  <jas@extundo.com>
9883
9884         * m4/hmac-md5.m4: New file.
9885
9886         * m4/memxor.m4: Require gl_C_RESTRICT.
9887
9888 2005-10-06  Simon Josefsson  <jas@extundo.com>
9889
9890         * lib/memxor.c (memxor): Avoid casts and warnings.
9891
9892 2005-10-06  Simon Josefsson  <jas@extundo.com>
9893
9894         * lib/hmac-md5.c: New file.
9895
9896         * lib/hmac.h: New file.
9897
9898 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9899
9900         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
9901         promotes to int, not unsigned int, to catch the AIX 5.3
9902         compiler bug.
9903
9904 2005-10-05  Simon Josefsson  <jas@extundo.com>
9905
9906         * modules/memxor: New file.
9907
9908         * modules/iconv (Files): Move config.rpath to havelib, it is used
9909         there.
9910
9911         * modules/havelib (Files): Add config.rpath.
9912
9913 2005-10-05  Simon Josefsson  <jas@extundo.com>
9914
9915         * m4/memxor.m4: New file.
9916
9917 2005-10-05  Simon Josefsson  <jas@extundo.com>
9918
9919         * lib/memxor.c (memxor): Fix compiler error.
9920
9921         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
9922         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
9923
9924         * lib/memxor.h, lib/memxor.c: New files.
9925
9926         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
9927         we assume all systems have it, suggested by Jim Meyering
9928         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
9929         any systems lack sys/socket.h; mingw32 is known to lack it, but we
9930         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
9931         same reasons.
9932
9933 2005-10-05  Simon Josefsson  <jas@extundo.com>
9934
9935         * config/srclist.txt: Add glibc bug 1423 for md5.h.
9936
9937 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9938
9939         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
9940         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
9941         needed, since the source code now assumes these .h files.
9942
9943 2005-10-05  Derek Price  <derek@ximbiot.com>
9944
9945         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
9946
9947 2005-10-05  Bruno Haible  <bruno@clisp.org>
9948
9949         * modules/stdint (License): Change to LGPL.
9950
9951 2005-10-04  Simon Josefsson  <jas@extundo.com>
9952
9953         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
9954         D. Baushke" <mdb@gnu.org>.
9955
9956 2005-10-04  Bruno Haible  <bruno@clisp.org>
9957
9958         * lib/verify.h (verify_true): Provide alternative definition for C++.
9959
9960 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
9961
9962         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
9963         (SSIZE_MAX): New macro, if not already defined.
9964         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
9965         than 2 GiB.
9966
9967 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9968
9969         Sync from coreutils.
9970         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
9971         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
9972         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
9973         ULLONG_MAX doesn't work with 2.7.2.1.
9974
9975 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9976
9977         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
9978         From Ben Pfaff.
9979
9980         * modules/exclude (Depends-on): Depend on verify.
9981         * modules/strtoimax (Depends-on): Likewise.
9982         * modules/utimecmp (Depends-on): Likewise.
9983
9984 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
9985
9986         * lib/exclude.c: Include verify.h.
9987         (verify): Remove.  All callers changed to use verify.h's version.
9988         * lib/strtoimax.c: Likewise.
9989         * lib/utimecmp.c: Likewis.e
9990
9991         Sync from coreutils.
9992         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
9993         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
9994         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
9995         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
9996         bother returning ENOSYS if settimeofday or stime fails; just let
9997         them return whatever errno they want to return.
9998         * lib/utimens.c: Include unistd.h, for dup2.
9999         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10000         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10001
10002 2005-10-02  Jim Meyering  <jim@meyering.net>
10003
10004         Sync from coreutils.
10005         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10006         from glibc-2.2.5 that fails for read-only files.
10007
10008 2005-10-02  Jim Meyering  <jim@meyering.net>
10009
10010         Sync from coreutils.
10011         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10012         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10013         `#if HAVE_CONFIG_H'.
10014         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10015         Remove AT_FDCWD test.
10016         Do not consume the fd unless successful.
10017         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10018         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10019         block, so that we don't even try to compile it if settimeofday is
10020         available.  This works around a compilation failure on OSF1 V5.1,
10021         due to stime requiring a `long int*' while tv_sec is `int'.
10022
10023 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10024
10025         Sync from coreutils.
10026         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10027         against `yes', rather than just testing for nonempty.
10028
10029 2005-10-01  Simon Josefsson  <jas@extundo.com>
10030
10031         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10032         and Darwin.
10033
10034         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10035         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10036         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10037         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10038         Check if struct addrinfo is declared.
10039
10040 2005-10-01  Simon Josefsson  <jas@extundo.com>
10041
10042         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10043         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10044         AI_* and EAI_* definitions.  Protect function declarations.
10045
10046 2005-10-01  Jim Meyering  <jim@meyering.net>
10047
10048         Sync from coreutils.
10049
10050         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10051         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10052         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10053         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10054         in the inet and nsl libraries.  Required on Solaris 5.7.
10055
10056 2005-10-01  Jim Meyering  <jim@meyering.net>
10057
10058         Sync from coreutils.
10059         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10060         in the inet and nsl libraries.  Required on Solaris 5.7.
10061
10062 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10063
10064         * lib/getdelim.c (getdelim): Remove unused variables.
10065
10066 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10067
10068         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10069         so that the code works even with ancient cpp.  Portability problem
10070         with GCC 2.7.2.1 reported by Thomas M.Ott.
10071
10072 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10073
10074         * modules/regex (Depends-on): Add strcase.
10075
10076         * modules/gethostname (Licence): Change from GPL to LGPL, since
10077         gethostname.c is a trivial implementation of a standard library
10078         function.
10079         * modules/poll (License): Change from GPL to LGPL, since it's
10080         derived from LGPL code.
10081
10082 2005-09-27  Jim Meyering  <jim@meyering.net>
10083
10084         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10085         HAVE_CONFIG_H.
10086
10087         * lib/intprops.h (signed_type_or_expr__): Define.
10088         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10089         for unsigned types.
10090
10091 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10092
10093         * lib/verify.h (verify_expr): Remove, replacing with:
10094         (verify_true): New macro that returns true instead of void.
10095         (verify_type__): Remove.
10096         (verify): Use verify_true rather than verify_type__.
10097
10098 2005-09-26  Bruno Haible  <bruno@clisp.org>
10099
10100         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10101         is necessary.
10102         (lib_SOURCES): Remove mbchar.c.
10103         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10104         (Files): Add m4/mbrtowc.m4.
10105         * modules/mbiter: Likewise.
10106         * modules/mbuiter: Likewise.
10107
10108 2005-09-26  Bruno Haible  <bruno@clisp.org>
10109
10110         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10111         compile mbchar.c if they are not both present.
10112         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10113         * m4/mbiter.m4 (gl_MBITER): Likewise.
10114         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10115         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10116         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10117
10118 2005-09-25  Jim Meyering  <jim@meyering.net>
10119
10120         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10121         also uses socklen_t.
10122
10123 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10124
10125         * lib/utimens.c (ENOSYS): Define if not already defined.
10126         (futimens): Support having a null PATH if the file descriptor
10127         is nonnegative.
10128
10129         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10130         Remove.
10131         (__attribute): Define to empty unless GCC 3.1 or later.
10132         This works around a core dump on OpenBSD 3.4, which has GCC
10133         2.95.3, which dumps core when given __attribute__(()).  It also
10134         simplifies other tests, since we really don't want to bother with
10135         worrying about which ancient version of GCC supported what.
10136         Original problem reported by Yoann Vandoorselaere, with part of
10137         the fix suggested by Derek Price.
10138
10139 2005-09-24  Jim Meyering  <jim@meyering.net>
10140
10141         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10142         so we can once again use a positive bitfield width of 1 -- now we
10143         don't have to explain why we were using a bitfield width of 2.
10144
10145 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10146
10147         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10148         and similarly for the other external symbols.  Problem reported
10149         by James Gallager.
10150
10151         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10152         bug reported by Jim Meyering.
10153
10154         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10155         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10156         not needed, since socklen is a prerequisite module.
10157
10158 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10159
10160         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10161         Problem reported by Eric Blake.
10162         (getaddrinfo): Initialize se so that it's not garbage.
10163         Redo internal storage allocation so that it doesn't make unportable
10164         assumptions about alignment.
10165         Fix a memory leak.
10166
10167         * lib/utimens.c (futimens): Use futimesat if available.
10168         Prefer it to futimes since it doesn't have the futimes bug.
10169
10170         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10171         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10172         Instead, declare a function that returns a pointer to an array,
10173         and use verify_type__ to declare the size of the array.
10174         Problem and germ of a solution reported by Bruno Haible.
10175         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10176         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10177
10178 2005-09-23  Jim Meyering  <jim@meyering.net>
10179
10180         Sync from coreutils.
10181         Correct build failure (socklen_t not defined) on at least
10182         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10183         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10184
10185 2005-09-23  Jim Meyering  <jim@meyering.net>
10186
10187         * modules/getaddrinfo (Depends-on): Add socklen.
10188
10189 2005-09-23  Bruno Haible  <bruno@clisp.org>
10190
10191         * tests/test-verify.c: New file.
10192
10193 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10194
10195         Sync from coreutils.
10196
10197         * modules/argmatch (Depends-on): Add verify.
10198         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10199         unistd-safer.
10200         * modules/save-cwd (Depends-on): Likewise.
10201
10202         * modules/openat (Files): Add lib/openat-die.c.
10203         (Depends-on): Remove error, exitfail.
10204         Add dirname.
10205
10206         * modules/verify: New file.
10207         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10208         with "verify" module.
10209
10210 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10211
10212         Sync from coreutils.
10213
10214         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10215         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10216         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10217         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10218         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10219         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10220         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10221         Don't bother checking for string.h, stdlib.h, unistd.h.
10222         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10223         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10224         module's job.
10225         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10226         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10227
10228         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10229         (gl_GETDATE): Use it.
10230
10231         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10232
10233 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10234
10235         Sync from coreutils.
10236
10237         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10238         stat-time.h.
10239         * lib/argmatch.h: Include verify.h
10240         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10241         (ARGMATCH_ASSERT): Remove; unused.
10242         * lib/canonicalize.c: Assume STDC_HEADERS.
10243         * lib/exclude.c: Include "strcase.h".
10244         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10245         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10246         and stdio-safer.h.
10247         (getusershell): Call fopen, not fopen_safer.
10248         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10249         Do not include unistd-safer.h.
10250         (save_cwd): Don't call fd_safer; no longer needed
10251         now that we include fcntl--.h.
10252
10253         * lib/getdate.y (relative_time): New type.
10254         (RELATIVE_TIME_0): New constant.
10255         (parser_control): Use relative_time instead of doing it ourselves.
10256         (%union): Add new relative_time rel member.
10257         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10258         Now typeless.
10259         (relunit, relunit_snumber): Now of type rel.
10260         (zone, rel, relunit, get_date): Adjust to above changes.
10261
10262         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10263         Do not include unistd-safer.h.
10264         (getloadavg): Don't call fd_safer; no longer needed
10265         now that we include fcntl--.h.
10266
10267         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10268         (make_dir_parents): Treat ENOSYS like EEXIST.
10269
10270         Improve quality of diagnostics on restore_cwd failure.
10271         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10272         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10273         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10274         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10275         each time through the loop.  Do not diagnose restore_cwd failure;
10276         that is the caller's job (and perhaps the caller does not care).
10277
10278         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10279         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10280         If the file already exists but is not a directory, don't bother
10281         to try to make its parents.
10282         Close potential file descriptor leak if we can't chdir("/") (!).
10283         Don't always return true if chdir($PWD) fails; return true only
10284         if the requested action was done successfully (except for the
10285         chdir($PWD)).
10286         Don't log final directory unless we actually made it.
10287         Refactor to avoid duplicate code to fix up permissions.
10288         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10289
10290         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10291         to make it a bit faster and (I hope) clearer.
10292         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10293         Fix bug in formats like %2N.
10294
10295         * lib/verify.h: New file.
10296
10297 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10298
10299         Sync from coreutils.
10300         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10301
10302 2005-09-22  Jim Meyering  <jim@meyering.net>
10303
10304         Sync from coreutils.
10305
10306         * m4/lstat.m4 (gl_FUNC_LSTAT):
10307         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10308         Remove obsolete comment.
10309         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10310         * m4/xstrtod.m4: Likewise.
10311
10312         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10313
10314 2005-09-22  Jim Meyering  <jim@meyering.net>
10315
10316         Sync from coreutils.
10317
10318         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10319
10320         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10321         the .tm_year member, since otherwise gcc-4.0 would now warn about
10322         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10323
10324         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10325         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10326
10327         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10328         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10329         when run in a time zone for which daylight savings time is in effect
10330         for the starting date.
10331
10332         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10333         stop us from restricting permissions of just-created absolute-named
10334         directories.
10335         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10336         to restore initial working directory.
10337         * lib/mkdir-p.c (make_dir_parents): New parameter:
10338         different_working_dir, to tell caller if/when we change the working
10339         directory and are unable to return to the initial one.
10340         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10341         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10342         `return false'.  This fixes a bug introduced on 2004-07-30.
10343
10344         * lib/openat.c (fdopendir): Be sure to close the supplied
10345         file descriptor before returning.  This makes our replacement
10346         implementation a little closer to Solaris's, where fdopendir
10347         ties the file descriptor to the returned DIR* pointer.
10348         * lib/openat.c (unlinkat): New function.
10349         * lib/openat.h (unlinkat): Add prototype.
10350         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10351         (openat_restore_fail): Rename from openat_restore_die.
10352         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10353
10354         Provide an alternative to exiting immediately upon save_cwd or
10355         restore_cwd failure.  Now, an application can arrange e.g.,
10356         to perform a longjump in that case.
10357         * lib/openat.c: Include dirname.h.
10358         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10359         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10360         and openat_restore_die rather than calling error directly.
10361         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10362
10363         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10364         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10365         define.
10366
10367         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10368         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10369                             int utc, int nanoseconds);
10370         Background:
10371         date should not have to allocate a megabyte of virtual memory to
10372         handle a format argument like +%1048575T.  When implemented with
10373         strftime, it must allocate such a buffer, use strftime to fill it
10374         in, print it, then free it.
10375         With fprintftime, it simply prints everything and exits.
10376         With no need for memory allocation, that's one fewer way to fail.
10377         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10378         optional field width, not before, so we accept %9:z, not %:9z.
10379         (my_strftime): Be sure to use L_('x') for literals.
10380
10381         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10382         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10383         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10384         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10385         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10386         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10387         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10388         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10389         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10390         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10391         * lib/xgethostname.c, lib/xreadlink.c:
10392         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10393
10394         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10395         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10396         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10397         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10398         and don't include <sys/file.h>).
10399
10400 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10401
10402         Sync from coreutils.
10403
10404         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10405         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10406         [!LDAV_DONE]: Avoid unused variable warning.
10407
10408 2005-09-21  Bruno Haible  <bruno@clisp.org>
10409
10410         * lib/unicodeio.h (unicode_to_mb): New declaration.
10411
10412 2005-09-20  Derek Price  <derek@ximbiot.com>
10413
10414         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10415         getaddrinfo.h.
10416
10417 2005-09-20  Bruno Haible  <bruno@clisp.org>
10418
10419         * gnulib-tool: Remove trailing slashes from the values specified for
10420         --source-base, --m4-base, --tests-base, --aux-dir.
10421         Suggested by Simon Josefsson <jas@extundo.com>.
10422
10423 2005-09-20  Bruno Haible  <bruno@clisp.org>
10424
10425         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10426         func_modules_to_filelist, func_import, func_create_testdir): Make all
10427         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10428         change when gnulib-tool is invoked in a different locale.
10429
10430 2005-09-19  Simon Josefsson  <jas@extundo.com>
10431
10432         * m4/socklen.m4: Fix typo.
10433
10434 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10435
10436         Use a consistent style for including <config.h>.
10437         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10438         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10439         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10440         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10441         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10442         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10443         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10444         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10445         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10446         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10447         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10448         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10449         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10450         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10451         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10452         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10453         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10454         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10455         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10456         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10457         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10458         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10459         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10460         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10461         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10462         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10463         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10464         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10465         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10466         lib/xstrtoumax.c, lib/yesno.c:
10467         Standardize inclusion of config.h.
10468         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10469         lib/inttostr.h:  Removed inclusion of config.h from header files.
10470         * lib/inttostr.c:  Adjusted in-tree users.
10471         * lib/timespec.h: Remove superfluous warning to include config.h.
10472         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10473         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10474         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10475         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10476         config.h with HAVE_CONFIG_H.
10477
10478 2005-09-19  Jim Meyering  <jim@meyering.net>
10479
10480         * modules/pathmax (License): Change to LGPL.
10481
10482 2005-09-19  Derek Price  <derek@ximbiot.com>
10483
10484         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10485
10486 2005-09-19  Bruno Haible  <bruno@clisp.org>
10487
10488         * gnulib-tool (import): Provide default for --tests-base.
10489
10490 2005-09-19  Bruno Haible  <bruno@clisp.org>
10491
10492         * doc/quote.texi: New file, extracted from gnulib.texi.
10493         * doc/ctime.texi: New file, extracted from gnulib.texi.
10494         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10495         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10496         * doc/gnulib.texi: Include them.
10497
10498 2005-09-18  Bruno Haible  <bruno@clisp.org>
10499
10500         Portability fix.
10501         * gnulib-tool (func_readlink): New function.
10502         (func_ln_if_changed): Use it.
10503
10504 2005-09-18  Bruno Haible  <bruno@clisp.org>
10505
10506         * gnulib-tool: Support --with-tests also with --import.
10507         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
10508         (func_import): Use variables $testsbase and $inctests. Emit a
10509         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
10510         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
10511         SUBDIRS += $testsdir.
10512         (func_create_testdir): Update.
10513
10514 2005-09-18  Bruno Haible  <bruno@clisp.org>
10515
10516         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
10517         instead of $dry_run.
10518         (func_cp_if_changed, func_mv_if_changed): Remove functions.
10519         (func_ln_if_changed): Don't handle dry-run here.
10520         (func_import): In dry-run mode, detect more precisely which actions
10521         would be performed, and don't use "...ing" verbs.
10522
10523 2005-09-18  Bruno Haible  <bruno@clisp.org>
10524
10525         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
10526         (func_import): Use join on two temporary files instead of three nested
10527         loops, in order to determine which files are new or old.
10528
10529 2005-09-18  Bruno Haible  <bruno@clisp.org>
10530
10531         * gnulib-tool (func_import): Comment out code that spits out the
10532         new files with --dry-run.
10533
10534 2005-09-18  Bruno Haible  <bruno@clisp.org>
10535
10536         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
10537
10538 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10539
10540         * lib/stat-time.h: New file.
10541         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
10542         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
10543         in a different way.
10544         (timespec_cmp): New function.
10545         * lib/utimecmp.c: Include stat-time.h.
10546         (SYSCALL_RESOLUTION): Depend on whether various struct stat
10547         members exist, not on the obsolescent ST_MTIM_NSEC.
10548         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
10549
10550 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10551
10552         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
10553
10554 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
10555
10556         * MODULES.html.sh (File system functions): Add stat-time.
10557         * modules/stat-time: New file.
10558         * modules/timespec (Files): Remove m4/st_mtim.m4; this
10559         is now done in a different way, by the stat-time module.
10560         * modules/utimecmp (Depends-on): Add stat-time.
10561
10562 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
10563
10564         * m4/st_mtim.m4: Remove.  Superseded by...
10565         * m4/stat-time.m4: New file.
10566         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
10567         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
10568
10569 2005-09-15  Derek Price  <derek@ximbiot.com>
10570
10571         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
10572
10573 2005-09-15  Derek Price  <derek@ximbiot.com>
10574
10575         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
10576         * lib/regex_internal.c: Ditto, using this...
10577         (__GNUC_PREREQ): ...new macro.
10578         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
10579         using...
10580         (__GNUC_PREREQ): ...this new macro.
10581
10582         * lib/strstr.h: Include string.h. Define strstr as a macro here.
10583
10584 2005-09-15  Derek Price  <derek@ximbiot.com>
10585             Paul Eggert  <eggert@cs.ucla.edu>
10586
10587         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
10588         changes, consolidating in...
10589         * lib/regex_internal.h: ...this file.
10590
10591 2005-09-13  Jim Meyering  <jim@meyering.net>
10592
10593         * lib/canon-host.c: Filter through gnu indent and reword comments
10594         slightly.
10595         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
10596
10597 2005-09-13  Derek Price  <derek@ximbiot.com>
10598
10599         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
10600         failure.
10601         Reported by Jim Meyering  <jim@meyering.net>.
10602
10603 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10604
10605         * lib/base64.c: Typo.
10606         (base64_encode): Put b64str in initialized data section.
10607
10608 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
10609
10610         Merge glibc and coreutils changes into gnulib, plus a few
10611         extra fixes.
10612         * lib/md5.c: Use #error rather than a string.
10613         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
10614         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
10615         (__attribute__): Define to empty for non recent-GCC.
10616         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
10617         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
10618         Renamed from their non-__ counterparts, with new macros replacing
10619         them if not _LIBC.  Add __THROW attribute.
10620         (rol): Remove.
10621         (struct md5_ctx): Align buffer if using GCC.
10622         * lib/sha1.h (struct sha1_ctx): Likewise.
10623         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
10624         The old name was backwards.
10625         (NOTSWAP): Remove; not used.
10626         (rol): New macro, moved here from md5.h.
10627         (sha1_process_block): Remove a FIXME that doesn't make sense.
10628
10629 2005-09-12  Derek Price  <derek@ximbiot.com>
10630
10631         Return usable errors from canon-host.
10632         * lib/canon-host.h: New file.
10633         * lib/canon-host.c (canon_host): Wrap...
10634         (canon_host_r): ...this new function, which now relies exclusively on
10635         getaddrinfo.
10636         (ch_strerror): New function.
10637         (last_cherror): New global.
10638         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
10639         interface.
10640         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
10641         void *.
10642         (freeaddrinfo): Free ai->ai_canonname when set.
10643
10644 2005-09-12  Derek Price  <derek@ximbiot.com>
10645
10646         Make canon-host require getaddrinfo.
10647         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
10648         AC_LIBSOURCE canon-host.h.  Call...
10649         (gl_PREREQ_CANON_HOST): ...this new function, which requires
10650         gl_GETADDRINFO.
10651         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
10652
10653 2005-09-12  Derek Price  <derek@ximbiot.com>
10654
10655         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
10656         LGPL.
10657         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
10658
10659 2005-09-12  Derek Price  <derek@ximbiot.com>
10660
10661         * lib/gai_strerror.c: Include config.h when available.  Include
10662         getaddrinfo.h before other headers to test interface.
10663         Reported by Larry Jones <lawrence.jones@ugs.com>.
10664
10665 2005-09-12  Derek Price  <derek@ximbiot.com>
10666             Paul Eggert  <eggert@cs.ucla.edu>
10667
10668         * modules/glob (Files): Add glob-libc.h.
10669
10670 2005-09-12  Derek Price  <derek@ximbiot.com>
10671             Paul Eggert  <eggert@cs.ucla.edu>
10672
10673         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
10674         glob_.h, glob-libc.h.
10675         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
10676
10677 2005-09-12  Derek Price  <derek@ximbiot.com>
10678             Paul Eggert  <eggert@cs.ucla.edu>
10679
10680         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
10681         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
10682         protecting things that should be done only in gnulib contexts.
10683         * lib/glob_.h: New file, containing only the glob things needed for
10684         gnulib.
10685         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
10686         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
10687         (glob, globfree, glob_pattern_p): Now defined simply in terms of
10688         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
10689         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
10690         and to respect the namespace rules better.
10691
10692 2005-09-08  Simon Josefsson  <jas@extundo.com>
10693
10694         * modules/socklen: New file.
10695
10696 2005-09-08  Simon Josefsson  <jas@extundo.com>
10697
10698         * m4/socklen.m4: New file.
10699
10700 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10701
10702         * modules/utimens (Files): Add m4/utimbuf.m4, since
10703         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
10704         Reported by Sergey Poznyakoff.
10705
10706 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10707
10708         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
10709         definitions, since that's the preferred style in glibc.
10710         Fix a minor spacing issue, and update copyright notice to match
10711         glibc's.
10712
10713 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10714
10715         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
10716
10717 2005-09-06  Simon Josefsson  <jas@extundo.com>
10718
10719         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
10720         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
10721
10722 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10723
10724         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
10725         warning.
10726
10727 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10728
10729         * config/srclist.txt: Add glibc bug 1302.
10730
10731 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
10732
10733         Change bitset word type from unsigned int to unsigned long int,
10734         as this has better performance on typical 64-bit hosts.
10735         Port bitset code to hosts with unusual word sizes.
10736         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
10737         (build_collating_symbol):
10738         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
10739         argument is a bitset.  This is merely a style issue, but it makes
10740         it clearer that an entire array is expected.
10741         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
10742         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
10743         Port to the case where bitset_word is not the same as unsigned int.
10744         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
10745         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
10746         Likewise.
10747         * lib/regexec.c (check_dst_limits_calc_pos_1,
10748         check_subexp_matching_top):
10749         (build_trtable, group_nodes_into_DFAstates):
10750         Likewise.
10751         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
10752         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
10753         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
10754         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
10755         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
10756         * lib/regcomp.c (optimize_subexps, lower_subexp):
10757         Work even if bitset_word has holes in its bitwise representation.
10758         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
10759         * lib/regexec.c (check_dst_limits_calc_pos_1,
10760         check_subexp_matching_top):
10761         Likewise.
10762         * lib/regex_internal.c (re_string_reconstruct):
10763         Don't assume UCHAR_MAX == 255.
10764         * lib/regex_internal.h (bitset_set_all): Likewise.
10765         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
10766         All uses changed.
10767         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
10768         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
10769         All uses changed.
10770         (BITSET_WORD_MAX): New macro.
10771         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
10772         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
10773         (bitset_empty, bitset_copy):
10774         Prefer sizeof (bitset) to multiplying it out ourselves.
10775         (bitset_not_merge): Remove; unused.
10776         (bitset_contain): Return bool, not unsigned int with one bit on.
10777         All callers changed.
10778         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
10779         alignment than re_node_set; do this by defining a new internal
10780         type struct dests_alloc and using it to allocate memory.
10781
10782 2005-09-05  Bruno Haible  <bruno@clisp.org>
10783
10784         * gnulib-tool (func_import): Fix comparison in handling of symbolic
10785         links.
10786
10787 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
10788
10789         * modules/size_max (Makefile.am): Add size_max.h
10790
10791 2005-09-04  Derek Price  <derek@ximbiot.com>
10792
10793         * gnulib-tool (func_import): Fix reversed $symbolic logic.
10794
10795 2005-09-03  Simon Josefsson  <jas@extundo.com>
10796
10797         * gnulib-tool: Fix typo.
10798
10799 2005-09-03  Simon Josefsson  <jas@extundo.com>
10800
10801         * config/srclist.txt: Add glibc bug 1293.
10802
10803 2005-09-03  Derek Price  <derek@ximbiot.com>
10804
10805         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
10806         From Larry Jones <lawrence.jones@ugs.com>.
10807
10808 2005-09-02  Simon Josefsson  <jas@extundo.com>
10809
10810         * modules/socklen: New file.
10811
10812 2005-09-02  Simon Josefsson  <jas@extundo.com>
10813
10814         * modules/havelib: New module.
10815
10816         * modules/gettext, modules/iconv, modules/lock, modules/readline:
10817         Use havelib.
10818
10819 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10820
10821         Check for arithmetic overflow when calculating sizes, to prevent
10822         some buffer-overflow issues.  These patches are conservative, in the
10823         sense that when I couldn't determine whether an overflow was possible,
10824         I inserted a run-time check.
10825         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
10826         macros.
10827         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
10828         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
10829         (re_xnrealloc, re_x2nrealloc): New inline functions.
10830         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
10831         parse_bracket_exp):
10832         (build_equiv_class, build_charclass): Check for arithmetic overflow
10833         in size expression calculations.
10834         * lib/regex_internal.c (re_string_realloc_buffers):
10835         (build_wcs_upper_buffer, re_node_set_add_intersect):
10836         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
10837         (re_dfa_add_node, register_state): Likewise.
10838         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
10839         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
10840         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
10841         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
10842
10843 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
10844
10845         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
10846         m4/ulonglong.m4.  Problem reported by Martin Lambers.
10847
10848 2005-09-02  Bruno Haible  <bruno@clisp.org>
10849
10850         Support for lib vs. lib64 distinction on biarch platforms.
10851         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
10852         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
10853         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
10854
10855 2005-09-02  Bruno Haible  <bruno@clisp.org>
10856
10857         * gnulib-tool (import): In the other first-use case, provide defaults
10858         as well.
10859
10860 2005-09-02  Bruno Haible  <bruno@clisp.org>
10861
10862         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
10863         patches not yet found in the latest gettext release.
10864
10865 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10866
10867         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
10868         to avoid a collision with bits/local_lim.h in glibc.
10869         All uses changed.  Problem reported by Dmitry V. Levin in
10870         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
10871
10872         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
10873         bugs in int versus size_t comparisons.
10874         (re_string_context_at): Fix bug where the code assumed that
10875         Idx is signed.
10876
10877         Use bool where appropriate.
10878         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
10879         All callers changed.
10880         (calc_eclosure_iter): Likewise, for ROOT arg.
10881         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
10882         (build_charclass_op): Likewise, for NON_MATCH arg.
10883         * lib/regex_internal.c (re_string_allocate, re_string_construct):
10884         (re_string_construct_common): Likewise, for ICASE arg.
10885         * lib/regexec.c (re_search_2_stub, re_search_stub):
10886         Likewise, for RET_LEN arg.
10887         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
10888         (set_regs): Likewise, for FL_BACKTRACK arg.
10889         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
10890         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
10891         (calc_eclosure_iter, parse_bracket_exp):
10892         Use bool for internal variables that are booleans.
10893         * lib/regexec.c (re_search_internal, check_matching,
10894         proceed_next_node):
10895         (set_regs, build_sifted_states, sift_states_bkref):
10896         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
10897         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10898         (find_collation_sequence_value):
10899         Likewise.
10900         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
10901         (re_node_set_compare):
10902         Return bool, not int. All callers changed.
10903         * lib/regexec.c (check_halt_node_context, check_dst_limits):
10904         (build_trtable, check_node_accept): Likewise.
10905         * lib/regex_internal.h: Include stdbool.h.
10906
10907         Fix bugs uncovered when converting to bool.
10908         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
10909         failure instead of charging ahead blindly.
10910         * lib/regex_internal.c (register_state): Likewise.
10911         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
10912         for freeing internal storage.
10913         (group_nodes_into_DFA_states): Use unsigned int, not int, for
10914         bitset pieces used as boolean, to avoid undefined behavior
10915         on hosts that do int overflow checking.
10916
10917 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10918
10919         * config/srclist.txt: Add glibc bugs 1285-1287.
10920
10921 2005-09-01  Jim Meyering  <jim@meyering.net>
10922
10923         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
10924         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
10925         Require gl_STAT_MACROS, too.
10926
10927 2005-09-01  Bruno Haible  <bruno@clisp.org>
10928
10929         * gnulib-tool (import): In the first-use case, provide defaults.
10930
10931 2005-09-01  Bruno Haible  <bruno@clisp.org>
10932
10933         * gnulib-tool (func_import): Remove the .tmp files.
10934
10935 2005-09-01  Bruno Haible  <bruno@clisp.org>
10936
10937         * gnulib-tool (func_import): Fix handling of symbolic links.
10938
10939 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10940
10941         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
10942         old glibc regex code mishandles strings longer than 2**31 bytes.
10943         This patch fixes this when the regex code is used in gnulib
10944         (i.e., outside glibc).
10945
10946         This patch should not affect the use of the regex code inside
10947         glibc.  No doubt this problem also needs to be handled for glibc
10948         as well, but the result will be an incompatible change to the
10949         glibc ABI, and the old ABI will have to be supported too.  That
10950         can be the the subject for another patch.
10951
10952         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
10953         governing whether the rest of this patch is active.  By default,
10954         the macro is disabled and the patch has no effect.
10955         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
10956         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
10957         (struct re_pattern_buffer, re_search, re_search_2, re_match):
10958         (re_match_2, re_set_registers): Use the new types.
10959         * lib/regex_internal.h (Idx, re_hashval_t): New types.
10960         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
10961         New macros.
10962         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
10963         (re_string_context_at, bin_tree_t, re_dfastate_t):
10964         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
10965         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
10966         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
10967         (re_string_char_size_at, re_string_wchar_at):
10968         (re_string_elem_size_at):
10969         Use the new types and macros to port to 64-bit hosts.
10970         Use unsigned types for internal values, so that the code
10971         mostly works even for arrays larger than SSIZE_MAX.
10972         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
10973         (search_duplicated_node, calc_eclosure_iter, fetch_number):
10974         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
10975         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
10976         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
10977         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
10978         (calc_inveclosure, parse_dup_op, build_range_exp):
10979         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
10980         (fetch_number, create_token_tree, mark_opt_subexp):
10981         Likewise.
10982         * lib/regex_internal.c (re_string_construct_common,
10983         create_ci_newstate):
10984         (create_cd_newstate, re_string_allocate, re_string_construct):
10985         (re_string_realloc_buffers, build_wcs_upper_buffer):
10986         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10987         (re_string_reconstruct, re_string_peek_byte_case):
10988         (re_string_fetch_byte_case, re_string_context_at):
10989         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10990         (re_node_set_init_copy, re_node_set_add_intersect):
10991         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10992         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10993         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10994         (re_acquire_state, re_acquire_state_context, register_state):
10995         Likewise.
10996         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
10997         search_cur_bkref_entry):
10998         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
10999         (re_search_internal, re_search_2_stub, re_search_stub)
11000         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11001         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11002         (update_cur_sifted_state, check_dst_limits):
11003         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11004         (check_subexp_limits, sift_states_bkref, merge_state_array):
11005         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11006         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11007         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11008         (expand_bkref_cache, check_node_accept_bytes):
11009         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11010         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11011         (acquire_init_state_context, check_halt_node_context):
11012         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11013         (sift_states_backward, clean_state_log_if_needed):
11014         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11015         (find_recover_state, transit_state_sb, transit_state_mb):
11016         (transit_state_bkref, build_trtable, match_ctx_clean):
11017         Likewise.
11018         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11019         to work around an assumption that REG_MISSING is negative.
11020
11021         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11022         (seek_collating_symbol_entry) [defined _LIBC]:
11023         (lookup_collation_sequence_value) [defined _LIBC]:
11024         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11025         Use prototypes rather than old-style function definitions.
11026         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11027         (transit_state_sb) [0]:
11028         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11029
11030         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11031         rm_eo.
11032
11033         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11034         (optimize_subexps, lower_subexp):
11035         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11036         since the signed shift might overflow.  Use 1u<<31 instead.
11037         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11038         Likewise.
11039         * lib/regexec.c (check_dst_limits_calc_pos_1,
11040         check_subexp_matching_top): Likewise.
11041
11042         * lib/regcomp.c (optimize_subexps, lower_subexp):
11043         Use CHAR_BIT rather than 8, for clarity.
11044         * lib/regexec.c (check_dst_limits_calc_pos_1):
11045         (check_subexp_matching_top): Likewise.
11046         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11047         have to worry about portability issues when shifting it left.
11048         Remove no-longer-needed test for table_size > 0.
11049         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11050         in a word, as the resulting behavior is undefined.
11051         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11052         in one case, a <= should have been an <, and in another case the
11053         whole test was missing.
11054         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11055         the standard name CHAR_BIT.
11056         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11057         this is not true on one's complement and signed-magnitude hosts.
11058
11059         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11060         next_last_offset.
11061         (struct re_dfa_t): Remove unused member states_alloc.
11062         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11063
11064 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11065
11066         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11067         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11068         and large-file glibc and in 32-bit large-file Solaris.
11069
11070 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11071
11072         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11073         lengths fit in regoff_t; this isn't true if regoff_t is the same
11074         width as size_t.
11075         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11076         (= START + RANGE) instead of RANGE.  This avoids overflow
11077         problems when regoff_t is the same width as size_t.
11078         All callers changed.
11079         (re_search_2_stub): Check for overflow when adding the
11080         sizes of the two strings.
11081         (re_search_stub): Check for overflow when adding START
11082         to RANGE; if it occurs, substitute the extreme value.
11083
11084 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11085
11086         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11087
11088 2005-08-31  Jim Meyering  <jim@meyering.net>
11089
11090         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11091         a pointer-to-const.
11092         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11093         (register_state): Likewise.
11094         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11095         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11096         (group_nodes_into_DFAstates): Likewise.
11097
11098 2005-08-31  Jim Meyering  <jim@meyering.net>
11099
11100         * check-module: Add a FIXME comment.
11101
11102 2005-08-31  Eric Blake  <ebb9@byu.net>
11103
11104         * modules/unistd-safer (Files): Add unistd--.h.
11105         * modules/stdio-safer (Files): Add stdio--.h.
11106
11107 2005-08-31  Derek Price  <derek@ximbiot.com>
11108
11109         * lib/getdelim.c (getdelim): Return EOF on EOF.
11110         Reported by Larry Jones <lawrence.jones@ugs.com>.
11111
11112 2005-08-31  Bruno Haible  <bruno@clisp.org>
11113
11114         Avoid unnecessary diffs in the generated lib/Makefile.am.
11115         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11116         the generated files.
11117         (func_import): Don't set cmd.
11118
11119 2005-08-31  Bruno Haible  <bruno@clisp.org>
11120
11121         * lib/strstr.c: Include <stddef.h>, for NULL.
11122         * lib/strcasestr.c: Likewise.
11123         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11124
11125 2005-08-31  Bruno Haible  <bruno@clisp.org>
11126
11127         * gnulib-tool: New option --macro-prefix.
11128         (func_import): Use macro_prefix.
11129         (import): Handle option --macro-prefix.
11130
11131 2005-08-31  Bruno Haible  <bruno@clisp.org>
11132
11133         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11134         Also use new variables cached_lgpl, cached_libtool.
11135
11136 2005-08-31  Bruno Haible  <bruno@clisp.org>
11137
11138         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11139         always instantiating them.
11140
11141 2005-08-31  Bruno Haible  <bruno@clisp.org>
11142
11143         * gnulib-tool (func_import): Read the previous cached settings
11144         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11145         earlier added by gnulib but are now dropped. Warn when a gnulib file
11146         overwrites a non-gnulib file.
11147
11148 2005-08-31  Bruno Haible  <bruno@clisp.org>
11149
11150         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11151         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11152         projects that don't keep autogenerated files in CVS. Put into
11153         actioncmd only the specified modules, not the transitive closure.
11154
11155 2005-08-31  Bruno Haible  <bruno@clisp.org>
11156
11157         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11158         Create directories that shall be filled.
11159         (import): Don't look for gl_* macros in configure.ac. Recurse across
11160         all directories containing a gnulib-cache.m4 files, if meaningful.
11161
11162 2005-08-31  Bruno Haible  <bruno@clisp.org>
11163
11164         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11165         (import): Set seen_libtool when we see gl_LIBTOOL.
11166
11167 2005-08-31  Bruno Haible  <bruno@clisp.org>
11168
11169         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11170         declaration macro definitions from generated gnulib.m4.
11171
11172 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11173
11174         * lib/iconvme.h: Add prototype for iconv_alloc.
11175
11176 2005-08-29  Simon Josefsson  <jas@extundo.com>
11177
11178         * lib/iconvme.c: Fix errno.
11179
11180 2005-08-29  Bruno Haible  <bruno@clisp.org>
11181
11182         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11183         that it works when the directory contains spaces.
11184
11185 2005-08-29  Bruno Haible  <bruno@clisp.org>
11186
11187         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11188
11189 2005-08-29  Bruno Haible  <bruno@clisp.org>
11190
11191         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11192         Emit more advice.
11193
11194 2005-08-29  Bruno Haible  <bruno@clisp.org>
11195         and Stepan Kasal  <kasal@ucw.cz>
11196
11197         * check-module: If more parameters are given, check each of them
11198         separately; add more exceptions, as noted by Jim Meyering.
11199         (check_module): New procedure.
11200         (%exempt_header): Now contains all exceptions.
11201
11202 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11203
11204         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11205
11206 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11207
11208         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11209
11210 2005-08-28  Bruno Haible  <bruno@clisp.org>
11211
11212         * m4/gnulib-tool.m4: New file.
11213
11214 2005-08-27  Jim Meyering  <jim@meyering.net>
11215
11216         * modules/unistd-safer (Files): Add pipe-safer.c.
11217         * modules/fcntl-safer (Files): Add creat-safer.c.
11218
11219 2005-08-27  Jim Meyering  <jim@meyering.net>
11220
11221         * m4/stdlib-safer.m4: New file.  From coreutils.
11222         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11223         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11224         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11225         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11226         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11227
11228 2005-08-27  Jim Meyering  <jim@meyering.net>
11229
11230         * lib/fopen-safer.c: Merge minor changes from coreutils.
11231         * lib/dup-safer.c: Likewise.
11232         * lib/fd-safer.c: Likewise.
11233
11234         Merge from coreutils.
11235         * lib/stdio--.h: New file.
11236         * lib/stdlib--.h: New file.
11237         * lib/mkstemp-safer.c: New file.
11238
11239         GNU tar needs these.
11240         * lib/pipe-safer.c: New file.
11241         * lib/creat-safer.c: New file.
11242         * lib/fcntl--.h (creat): Define to creat_safer.
11243         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11244         * lib/unistd--.h (pipe): Define to pipe_safer.
11245         * lib/unistd-safer.h: Declare pipe_safer.
11246
11247 2005-08-26  Simon Josefsson  <jas@extundo.com>
11248
11249         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11250         Haible <bruno@clisp.org>.
11251
11252 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11253
11254         * lib/regex_internal.h: Remove all references to
11255         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11256         or better.
11257         (bitset_not, bitset_merge, bitset_not_merge):
11258         (bitset_mask, re_string_allocate, re_string_construct):
11259         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11260         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11261         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11262         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11263         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11264         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11265         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11266         (re_acquire_state_context):
11267         Remove unnecessary forward decls.
11268         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11269         Put __attribute at function definition,
11270         now that the function decl has been removed.
11271         * lib/regex_internal.c (re_string_peek_byte_case):
11272         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11273         Likewise.
11274
11275 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11276
11277         * m4/regex.m4: Add AC_PREREQ(2.50).
11278         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11279
11280 2005-08-25  Simon Josefsson  <jas@extundo.com>
11281
11282         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11283         __fsetlocking.
11284
11285 2005-08-25  Simon Josefsson  <jas@extundo.com>
11286
11287         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11288         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11289         GLIBC specific code.
11290
11291 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11292
11293         Make regex safe for g++.  This fixes one real bug (an "err"
11294         that should have been "*err").  g++ problem reported by
11295         Sam Steingold.
11296         * lib/regex_internal.h (re_calloc): New macro, consistent with
11297         re_malloc etc.  All callers of calloc changed to use re_calloc.
11298         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11299         not int.  All callers changed.
11300         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11301         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11302         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11303         (find_recover_state): Change "err" to "*err"; this fixes what
11304         appears to be a real bug.
11305         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11306         versus int.
11307
11308 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11309
11310         * modules/regex (Depends-on): Add malloc, since the code
11311         assumes that !malloc(0) means failure.
11312
11313 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11314
11315         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11316
11317         alloca modernization/simplification for regex.
11318         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11319         needs to be at the start of the file, and can be moved into
11320         regex_internal.h and simplified.
11321         * lib/regex_internal.h: Include <alloca.h>.
11322         (__libc_use_alloca) [!defined _LIBC]: New macro.
11323         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11324         now works outside glibc.
11325
11326 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11327
11328         * config/srclist.txt: Add glibc bugs 1241, 1245.
11329
11330 2005-08-25  Jim Meyering  <jim@meyering.net>
11331
11332         * lib/open-safer.c: Include <config.h>.
11333         Otherwise, we'd lose LARGEFILE support in any file using
11334         e.g. "fcntl--.h"
11335
11336 2005-08-25  Bruno Haible  <bruno@clisp.org>
11337
11338         * m4/minmax.m4: Require autoconf 2.52.
11339         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11340         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11341         alternatives of translit over the alphabet.
11342         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11343
11344 2005-08-24  Simon Josefsson  <jas@extundo.com>
11345
11346         * tests/test-getpass.c: New file.
11347
11348 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11349
11350         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11351         for GNU regex features.
11352
11353 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11354
11355         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11356         * lib/regex.h (regerror): Likewise.
11357
11358         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11359         requires this.  (The code never needed it.)
11360
11361         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11362         All uses of recently-renamed identifiers changed to use the new,
11363         POSIX-compliant names.  The code will build and run just fine
11364         without these changes, but it's better to eat our own dog food
11365         and use the standard-conforming names.
11366
11367         * lib/regex.h: Fix a multitude of POSIX name space violations.
11368         These changes have an effect only for programs that define
11369         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11370         do not change anything for programs compiled in the normal way.
11371         Also, there is no effect on the ABI.
11372
11373         (_REGEX_SOURCE): New macro.
11374         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11375         defined and _GNU_SOURCE is not; this fixes a name space violation.
11376
11377         Rename the following macros to obey POSIX requirements.
11378         The old names are still visible as macros if _REGEX_SOURCE is defined.
11379         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11380         RE_BACKSLASH_ESCAPE_IN_LISTS.
11381         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11382         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11383         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11384         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11385         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11386         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11387         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11388         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11389         (REG_INTERVALS): renamed from RE_INTERVALS.
11390         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11391         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11392         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11393         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11394         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11395         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11396         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11397         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11398         RE_UNMATCHED_RIGHT_PAREN_ORD.
11399         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11400         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11401         (REG_DEBUG): renamed from RE_DEBUG.
11402         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11403         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11404         unusual, since we can't clash with the POSIX REG_ICASE.
11405         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11406         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11407         (REG_NO_SUB): renamed from RE_NO_SUB.
11408         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11409         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11410         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11411         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11412         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11413         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11414         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11415         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11416         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11417         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11418         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11419         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11420         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11421         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11422         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11423         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11424         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11425         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11426         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11427         (REG_FIXED): Renamed from REGS_FIXED.
11428         (REG_NREGS): Renamed from RE_NREGS.
11429
11430         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11431         of other REG_* macros, since POSIX says the user is allowed to
11432         #undef these macros selectively.
11433
11434         (reg_errcode_t): Update comment stating what other tables need
11435         to be consistent.
11436
11437         Rename the following enum values to obey POSIX requirements.
11438         The old names are still visible as macros.
11439         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11440         is not defined, since GNU is supposed to be a superset of POSIX as
11441         much as possible, and since we want reg_errcode_t to be a signed
11442         type for implementation consistency.
11443         (_REG_NOERROR): Renamed from REG_NOERROR.
11444         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11445         (_REG_BADPAT): Renamed from REG_BADPAT.
11446         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11447         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11448         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11449         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11450         (_REG_EBRACK): Renamed from REG_EBRACK.
11451         (_REG_EPAREN): Renamed from REG_EPAREN.
11452         (_REG_EBRACE): Renamed from REG_EBRACE.
11453         (_REG_BADBR): Renamed from REG_BADBR.
11454         (_REG_ERANGE): Renamed from REG_ERANGE.
11455         (_REG_ESPACE): Renamed from REG_ESPACE.
11456         (_REG_BADRPT): Renamed from REG_BADRPT.
11457         (_REG_EEND): Renamed from REG_EEND.
11458         (_REG_ESIZE): Renamed from REG_ESIZE.
11459         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11460         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11461         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11462         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11463         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11464
11465         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11466         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11467         changed.  But support the old name if the new one is not defined
11468         and if _REGEX_SOURCE.
11469
11470         Change the following member names in struct re_pattern_buffer.
11471         The old names are still supported if !_REGEX_SOURCE.
11472         The new names are always supported, regardless of _REGEX_SOURCE.
11473         (re_buffer): Renamed from buffer.
11474         (re_allocated): Renamed from allocated.
11475         (re_used): Renamed from used.
11476         (re_syntax): Renamed from syntax.
11477         (re_fastmap): Renamed from fastmap.
11478         (re_translate): Renamed from translate.
11479         (re_can_be_null): Renamed from can_be_null.
11480         (re_regs_allocated): Renamed from regs_allocated.
11481         (re_fastmap_accurate): Renamed from fastmap_accurate.
11482         (re_no_sub): Renamed from no_sub.
11483         (re_not_bol): Renamed from not_bol.
11484         (re_not_eol): Renamed from not_eol.
11485         (re_newline_anchor): Renamed from newline_anchor.
11486
11487         Change the following member names in struct re_registers.
11488         The old names are still supported if !_REGEX_SOURCE.
11489         The new names are always supported, regardless of _REGEX_SOURCE.
11490         (rm_num_regs): Renamed from num_regs.
11491         (rm_start): Renamed from start.
11492         (rm_end): Renamed from end.
11493
11494         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11495         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11496         Prepend __ to parameter names.
11497
11498         Undo yesterday's changes.
11499
11500 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11501
11502         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11503         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11504         lib/regex.c.
11505
11506 2005-08-24  Jim Meyering  <jim@meyering.net>
11507
11508         Sync from coreutils.
11509         * m4/fcntl-safer.m4: New file.
11510
11511         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
11512         and object files for this module.
11513
11514 2005-08-24  Jim Meyering  <jim@meyering.net>
11515
11516         Sync from coreutils.
11517         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
11518
11519 2005-08-24  Jim Meyering  <jim@meyering.net>
11520
11521         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
11522         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
11523
11524 2005-08-24  Jim Meyering  <jim@meyering.net>
11525
11526         * modules/fcntl-safer: New module.
11527         * modules/fts (Depends-on): Add fcntl-safer.
11528         * MODULES.html.sh (File descriptor based Input/Output):
11529         Add fcntl-safer.
11530
11531 2005-08-24  Bruno Haible  <bruno@clisp.org>
11532
11533         Support for unit test modules.
11534         * modules/README: Mention tests modules.
11535         * modules/TEMPLATE-TESTS: New file.
11536         * gnulib-tool: New options --extract-tests-module, --with-tests and
11537         --tests-base (unused for the moment).
11538         (testsbase, inctests): New variables.
11539         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
11540         (func_verify_module): Exclude TEMPLATE-TESTS.
11541         (func_verify_nontests_module, func_verify_tests_module): New functions.
11542         (func_get_dependencies): Add implicit dependency for tests modules.
11543         (func_get_tests_module): New function.
11544         (func_modules_transitive_closure): When --with-tests was specified,
11545         include the unit tests as well, unless explicitly avoided.
11546         (func_emit_lib_Makefile_am): Ignore the tests modules here.
11547         (func_emit_tests_Makefile_am): New function.
11548         (func_create_testdir): When --with-tests was specified, emit a
11549         tests/ directory.
11550         * MODULES.html.sh (Future developments): Update.
11551
11552 2005-08-24  Bruno Haible  <bruno@clisp.org>
11553
11554         * modules/tls-tests: New file.
11555         * tests/test-tls.c: New file, from GNU gettext.
11556
11557 2005-08-24  Bruno Haible  <bruno@clisp.org>
11558
11559         * modules/lock-tests: New file.
11560         * tests/test-lock.c: New file, from GNU gettext.
11561
11562 2005-08-24  Bruno Haible  <bruno@clisp.org>
11563
11564         * lib/lock.h: Add multiple inclusion guard.
11565         * lib/tls.h: Add multiple inclusion guard.
11566
11567 2005-08-24  Bruno Haible  <bruno@clisp.org>
11568
11569         * gnulib-tool: Add support for the --aux-dir option to
11570         --create-testdir, --create-megatestdir, --test, --megatest.
11571         (func_create_testdir, func_create_megatestdir): Optionally emit a
11572         AC_CONFIG_AUX_DIR directive.
11573         (create-testdir, create-megatestdir, test, megatest): Provide a
11574         default value for $auxdir.
11575
11576 2005-08-24  Bruno Haible  <bruno@clisp.org>
11577
11578         * gnulib-tool (import): Use compound statement instead of subshell
11579         where possible.
11580
11581 2005-08-24  Bruno Haible  <bruno@clisp.org>
11582
11583         * gnulib-tool (import): Change --aux-dir default to "build-aux".
11584
11585 2005-08-24  Bruno Haible  <bruno@clisp.org>
11586
11587         * gnulib-tool (func_version): Update.
11588
11589 2005-08-24  Bruno Haible  <bruno@clisp.org>
11590
11591         * gnulib-tool (func_import, func_create_testdir,
11592         func_create_megatestdir): Quote all autoconf macro arguments.
11593
11594 2005-08-24  Bruno Haible  <bruno@clisp.org>
11595
11596         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
11597         option --force, because --force causes the aclocal.m4 of each
11598         subdirectory to be newer than the corresponding config.h.in.
11599
11600 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11601
11602         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
11603         All contents moved to gl_REGEX.
11604         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
11605         assume that it does.
11606
11607 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11608
11609         * lib/regex.h (REG_NOSYS)
11610         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
11611         Define, since POSIX requires it as of 2001.
11612         (_REG_ENOSYS)
11613         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
11614         New private symbol, used to keep the enum signed in all cases.
11615         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
11616         Youngman in
11617         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
11618
11619         * lib/regex_internal.c (re_string_skip_chars, register_state):
11620         (calc_state_hash):
11621         Remove forward decls; no longer needed now that we use prototypes.
11622         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
11623         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
11624         (clean_state_log_if_needed): Likewise.
11625
11626 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
11627
11628         * config/srclist.txt: Add glibc bugs 1231-1233.
11629
11630 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11631
11632         Fix problems reported by Sam Steingold in
11633         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
11634         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
11635         assumed that reg_errcode_t is a signed type, which is not
11636         necessarily true if _XOPEN_SOURCE is not defined.
11637         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
11638         since some compilers warn about it otherwise.
11639
11640 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11641
11642         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
11643         (init_word_char, create_initial_state, duplicate_node_closure):
11644         (fetch_token, peek_token_bracket, build_range_exp):
11645         (build_collating_symbol): Remove forward decls; no longer needed
11646         now that we use prototypes.
11647
11648         * lib/regcomp.c:
11649         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
11650         (re_compile_fastmap_iter, regcomp, regerror, regfree):
11651         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
11652         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
11653         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
11654         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
11655         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
11656         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
11657         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
11658         (build_range_exp, build_collating_symbol, parse_bracket_exp):
11659         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
11660         (build_charclass, build_charclass_op, fetch_number, create_tree):
11661         (create_token_tree, mark_opt_subexp, duplicate_tree):
11662         Use prototypes rather than old-style definitions.
11663
11664         * lib/regex_internal.c:
11665         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
11666         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
11667         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11668         (re_string_reconstruct, re_string_peek_byte_case):
11669         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
11670         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11671         (re_node_set_init_copy, re_node_set_add_intersect):
11672         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11673         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11674         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11675         (re_acquire_state, re_acquire_state_context, register_state):
11676         (create_ci_newstate, create_cd_newstate, free_state):
11677         Likewise.
11678         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
11679         re_search_2):
11680         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
11681         (re_search_internal, prune_impossible_nodes):
11682         (acquire_init_state_context, check_matching, static):
11683         (check_halt_node_context, check_halt_state_context, proceed_next_node):
11684         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
11685         (update_regs, sift_states_backward, build_sifted_states):
11686         (clean_state_log_if_needed, merge_state_array):
11687         (update_cur_sifted_state, add_epsilon_src_nodes):
11688         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
11689         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
11690         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
11691         (find_recover_state, check_subexp_matching_top, transit_state_mb):
11692         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
11693         (check_arrival, check_arrival_add_next_nodes):
11694         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11695         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11696         (check_node_accept_bytes, check_node_accept, extend_buffers):
11697         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
11698         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
11699         (sift_ctx_init):
11700         Likewise.
11701
11702         * lib/regex_internal.h:
11703         (re_string_allocate, re_string_construct, re_string_reconstruct):
11704         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
11705         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
11706         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
11707         (re_string_context_at, re_string_peek_byte_case):
11708         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
11709         is defined, since we now use prototypes always.
11710
11711         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
11712         C89 or better.  All uses removed.
11713
11714 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11715
11716         * config/srclist.txt: Add glibc bugs 1220-1227.
11717
11718 2005-08-20  Jim Meyering  <jim@meyering.net>
11719
11720         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
11721         of unused local, dfa.
11722
11723 2005-08-20  Bruno Haible  <bruno@clisp.org>
11724
11725         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
11726
11727 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11728
11729         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
11730         (re_node_set_insert_last, re_dfa_add_node):
11731         Rename local variables to avoid GCC shadowing warnings.
11732
11733 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11734
11735         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
11736         [defined lint]: Suppress bogus uninitialized-variable warnings.
11737
11738         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
11739         and let the caller return REG_ESPACE if out of space.  This
11740         removes an uninitialied-variable warning with GCC 4.0.1, and also
11741         avoids taking the address of a local variable.  All callers
11742         changed.
11743
11744 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11745
11746         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
11747         $LIBCSRC/posix/regexec.c.
11748         Add glibc bug 1217 for regcomp.c.
11749
11750 2005-08-19  Jim Meyering  <jim@meyering.net>
11751
11752         * lib/regexec.c (proceed_next_node): Redo local variables to
11753         avoid GCC shadowing warnings.
11754
11755 2005-08-18  Bruno Haible  <bruno@clisp.org>
11756
11757         * lib/strstr.c (strstr): Fix return value in multibyte case.
11758         * lib/strcasestr.c (strcasestr): Likewise.
11759
11760 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11761
11762         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
11763
11764 2005-08-17  Jim Meyering  <jim@meyering.net>
11765
11766         Make the %s format (seconds since the epoch) work for a negative
11767         number and when used with a zero-padded field width, e.g. %015s.
11768
11769         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
11770         label so that it precedes the code to set `digits'.  Otherwise,
11771         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
11772         print `00-22'.  Now, it prints `-0022', as it should.
11773
11774 2005-08-17  Bruno Haible  <bruno@clisp.org>
11775
11776         * modules/strstr (Files): Add m4/mbrtowc.m4.
11777         (Depends-on): Add mbuiter.
11778
11779 2005-08-17  Bruno Haible  <bruno@clisp.org>
11780
11781         * modules/strcasestr: New file.
11782         * MODULES.html.sh (String handling, based on ANSI C 89): Add
11783         strcasestr.
11784
11785 2005-08-17  Bruno Haible  <bruno@clisp.org>
11786
11787         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
11788
11789 2005-08-17  Bruno Haible  <bruno@clisp.org>
11790
11791         * modules/mbuiter: New file.
11792         * MODULES.html.sh (Extended multibyte and wide character utilities):
11793         Add mbuiter.
11794
11795 2005-08-17  Bruno Haible  <bruno@clisp.org>
11796
11797         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
11798         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
11799
11800 2005-08-17  Bruno Haible  <bruno@clisp.org>
11801
11802         * m4/strcasestr.m4: New file.
11803
11804 2005-08-17  Bruno Haible  <bruno@clisp.org>
11805
11806         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
11807         * lib/strstr.c: Completely rewritten, with multibyte locale support.
11808
11809 2005-08-17  Bruno Haible  <bruno@clisp.org>
11810
11811         * lib/strcasestr.h: New file.
11812         * lib/strcasestr.c: New file.
11813
11814 2005-08-17  Bruno Haible  <bruno@clisp.org>
11815
11816         * lib/strcasecmp.c: Use mbuiter.h.
11817
11818 2005-08-17  Bruno Haible  <bruno@clisp.org>
11819
11820         * lib/mbuiter.h: New file.
11821
11822 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11823
11824         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
11825         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
11826         and gl_GETOPT are both invoked via different paths (as happens
11827         with GNU tar CVS because it uses both argp and getopt), the former
11828         wins.
11829
11830 2005-08-16  Bruno Haible  <bruno@clisp.org>
11831
11832         * modules/tls: New file.
11833         * MODULES.html.sh (Multithreading): Add tls.
11834
11835 2005-08-16  Bruno Haible  <bruno@clisp.org>
11836
11837         * modules/strnlen1: New file.
11838         * MODULES.html.sh (String handling): Add strnlen1.
11839
11840 2005-08-16  Bruno Haible  <bruno@clisp.org>
11841
11842         * modules/strcase (Files): Add m4/mbrtowc.m4.
11843         (Depends-on): Add strnlen1, mbchar.
11844
11845 2005-08-16  Bruno Haible  <bruno@clisp.org>
11846
11847         * modules/mbiter: New file.
11848         * MODULES.html.sh (Extended multibyte and wide character utilities):
11849         Add mbiter.
11850
11851 2005-08-16  Bruno Haible  <bruno@clisp.org>
11852
11853         * modules/mbfile: New file.
11854         * MODULES.html.sh (Extended multibyte and wide character utilities):
11855         Add mbfile.
11856
11857 2005-08-16  Bruno Haible  <bruno@clisp.org>
11858
11859         * modules/mbchar: New file.
11860         * MODULES.html.sh (Extended multibyte and wide character utilities):
11861         New section.
11862
11863 2005-08-16  Bruno Haible  <bruno@clisp.org>
11864
11865         * m4/tls.m4: New file, from GNU gettext.
11866
11867 2005-08-16  Bruno Haible  <bruno@clisp.org>
11868
11869         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
11870         always.
11871         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
11872
11873 2005-08-16  Bruno Haible  <bruno@clisp.org>
11874
11875         * m4/mbiter.m4: New file.
11876
11877 2005-08-16  Bruno Haible  <bruno@clisp.org>
11878
11879         * m4/mbfile.m4: New file.
11880
11881 2005-08-16  Bruno Haible  <bruno@clisp.org>
11882
11883         * m4/mbchar.m4: New file.
11884
11885 2005-08-16  Bruno Haible  <bruno@clisp.org>
11886
11887         * lib/tls.h: New file, from GNU gettext.
11888         * lib/tls.c: New file, from GNU gettext.
11889
11890 2005-08-16  Bruno Haible  <bruno@clisp.org>
11891
11892         * lib/strnlen1.h: New file.
11893         * lib/strnlen1.c: New file.
11894
11895 2005-08-16  Bruno Haible  <bruno@clisp.org>
11896
11897         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
11898         (mbi_init): Update.
11899         (mbi_avail, mbi_advance): Let the iteration end before the terminating
11900         NUL byte, not after it.
11901
11902 2005-08-16  Bruno Haible  <bruno@clisp.org>
11903
11904         * lib/strcase.h (strcasecmp): Add note in comments.
11905         * lib/strncasecmp.c: Use code from strcasecmp.c.
11906         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
11907         (strcasecmp): Work correctly in multibyte locales.
11908
11909 2005-08-16  Bruno Haible  <bruno@clisp.org>
11910
11911         * lib/mbiter.h: New file.
11912
11913 2005-08-16  Bruno Haible  <bruno@clisp.org>
11914
11915         * lib/mbfile.h: New file.
11916
11917 2005-08-16  Bruno Haible  <bruno@clisp.org>
11918
11919         * lib/mbchar.h: New file.
11920         * lib/mbchar.c: New file.
11921
11922 2005-08-16  Bruno Haible  <bruno@clisp.org>
11923
11924         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
11925         the valid ones. Makes the comparison operations transitive:
11926         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
11927         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
11928
11929 2005-08-15  Simon Josefsson  <jas@extundo.com>
11930
11931         * modules/ssize_t (License): Change to 'unlimited'.
11932
11933         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
11934
11935 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11936
11937         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
11938         Add comments for each pending glibc patch.
11939
11940 2005-08-15  Bruno Haible  <bruno@clisp.org>
11941
11942         * lib/regex.h (__restrict_arr): Don't define to __restrict if
11943         __cplusplus is defined.
11944
11945 2005-08-14  Jim Meyering  <jim@meyering.net>
11946
11947         Sync from coreutils.
11948
11949         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
11950         Use the hash-table-based cycle-detection code not just when
11951         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
11952         Reported by James Youngman in
11953         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
11954         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
11955         FTS_TIGHT_CYCLE_CHECK.
11956         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
11957         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
11958         once again.
11959         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
11960         * lib/fts.c (fd_safer): Remove decl.
11961         Include fcntl--.h rather than unistd-safer.h
11962         (fts_safe_changedir): Don't call fd_safer; no longer needed
11963         now that we include fcntl--.h.
11964
11965 2005-08-12  Simon Josefsson  <jas@extundo.com>
11966
11967         * modules/getndelim2: Use ssize_t module.
11968         * modules/getnline: Likewise.
11969         * modules/safe-read: Likewise.
11970         * modules/xreadlink: Likewise.
11971
11972         * modules/ssize_t: New file.
11973
11974 2005-08-12  Simon Josefsson  <jas@extundo.com>
11975
11976         * m4/readline.m4: Look for termcap, curses or ncurses if required.
11977
11978 2005-08-12  Simon Josefsson  <jas@extundo.com>
11979
11980         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11981         ssize_t.
11982
11983 2005-08-12  Simon Josefsson  <jas@extundo.com>
11984
11985         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
11986         readline, getdelim and check_version.
11987         (Support for systems lacking ISO C 99: Sizes of integer types):
11988         Add size_max.
11989
11990 2005-08-12  Bruno Haible  <bruno@clisp.org>
11991
11992         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
11993
11994 2005-08-11  Simon Josefsson  <jas@extundo.com>
11995
11996         * modules/readline: New file.
11997
11998         * modules/strnlen (Files): Add strnlen.h.
11999
12000 2005-08-11  Simon Josefsson  <jas@extundo.com>
12001
12002         * m4/readline.m4: New file.
12003
12004 2005-08-11  Simon Josefsson  <jas@extundo.com>
12005
12006         * lib/readline.h, readline.c: New file.
12007
12008 2005-08-11  Simon Josefsson  <jas@extundo.com>
12009
12010         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12011         gl_AVOID.
12012
12013 2005-08-11  Bruno Haible  <bruno@clisp.org>
12014
12015         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12016
12017 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12018
12019         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12020
12021 2005-08-10  Simon Josefsson  <jas@extundo.com>
12022
12023         * tests/test-iconvme.c: New file.
12024
12025 2005-08-10  Simon Josefsson  <jas@extundo.com>
12026
12027         * m4/strnlen.m4: New file.
12028
12029         * m4/strndup.m4: Don't check for strnlen declaration, done in
12030         strnlen.m4.
12031
12032 2005-08-10  Simon Josefsson  <jas@extundo.com>
12033
12034         * lib/strndup.c: Use strnlen.h.
12035
12036         * lib/strnlen.h: New file.
12037
12038 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12039
12040         * README: Typos.
12041
12042 2005-08-02  Simon Josefsson  <jas@extundo.com>
12043
12044         * modules/readline: New file.
12045
12046 2005-08-02  Simon Josefsson  <jas@extundo.com>
12047
12048         * modules/getdelim: New file.
12049
12050         * modules/getline: Rewrite, don't use getndelim2.
12051
12052 2005-08-02  Simon Josefsson  <jas@extundo.com>
12053
12054         * m4/getline.m4: Separate out getdelim stuff into separate module.
12055
12056         * m4/getdelim.m4: New file.
12057
12058 2005-08-02  Simon Josefsson  <jas@extundo.com>
12059
12060         * lib/getline.h, getline.c: Rewrite.
12061
12062         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12063
12064 2005-07-31  Bruno Haible  <bruno@clisp.org>
12065
12066         * lib/lock.h (gl_lock_initializer): New macro.
12067         (gl_lock_define_initialized): Use it.
12068         (gl_rwlock_initializer): New macro.
12069         (gl_rwlock_define_initialized): Use it.
12070         (gl_recursive_lock_initializer): New macro.
12071         (gl_recursive_lock_define_initialized): Use it.
12072
12073 2005-07-30  Karl Berry  <karl@gnu.org>
12074
12075         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12076         Report from Ben Pfaff, regarding getopt.
12077
12078 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12079
12080         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12081         normal way.
12082         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12083         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12084         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12085         (gl_GETOPT): Use the new macros.  Most of the implementation
12086         is moved to the new macros.  This is for programs like Emacs
12087         that don't want all the functionality of gl_GETOPT.
12088
12089 2005-07-26  Bruno Haible  <bruno@clisp.org>
12090
12091         * m4/lock.m4: Update from GNU gettext.
12092
12093 2005-07-26  Bruno Haible  <bruno@clisp.org>
12094
12095         * lib/lock.h: Update from GNU gettext.
12096         * lib/lock.c: Update from GNU gettext.
12097
12098 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12099
12100         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12101         obsolescent AC_TRY_RUN.  Include the default includes files, for
12102         'exit'.
12103
12104 2005-07-24  Bruno Haible  <bruno@clisp.org>
12105
12106         * modules/visibility: New file.
12107         * MODULES.html.sh (Misc): Add visibility.
12108
12109 2005-07-24  Bruno Haible  <bruno@clisp.org>
12110
12111         * m4/visibility.m4: New file.
12112
12113 2005-07-24  Bruno Haible  <bruno@clisp.org>
12114
12115         * doc/visibility.texi: New file.
12116
12117 2005-07-22  Bruno Haible  <bruno@clisp.org>
12118
12119         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12120         $(ALLOCA_H), redundant through BUILT_SOURCES.
12121         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12122         redundant through BUILT_SOURCES.
12123         * modules/byteswap (Makefile.am): Remove explicit dependency on
12124         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12125         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12126         $(FNMATCH_H), redundant through BUILT_SOURCES.
12127         * modules/getopt (Makefile.am): Remove explicit dependency on
12128         $(GETOPT_H), redundant through BUILT_SOURCES.
12129         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12130         redundant through BUILT_SOURCES.
12131         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12132         redundant through BUILT_SOURCES.
12133         * modules/stdbool (Makefile.am): Remove explicit dependency on
12134         $(STDBOOL_H), redundant through BUILT_SOURCES.
12135         * modules/stdint (Makefile.am): Remove explicit dependency on
12136         $(STDINT_H), redundant through BUILT_SOURCES.
12137         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12138         Remove explicit dependency on $(SYSEXITS_H).
12139         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12140
12141 2005-07-18  Simon Josefsson  <jas@extundo.com>
12142
12143         * lib/check-version.c (check_version): Accept identical versions too.
12144
12145 2005-07-18  Bruno Haible  <bruno@clisp.org>
12146
12147         * modules/lock: New file.
12148         * MODULES.html.sh (Multithreading): New section.
12149
12150 2005-07-18  Bruno Haible  <bruno@clisp.org>
12151
12152         * m4/lock.m4: New file, from GNU gettext.
12153
12154 2005-07-18  Bruno Haible  <bruno@clisp.org>
12155
12156         * lib/lock.h: New file, from GNU gettext.
12157         * lib/lock.c: New file, from GNU gettext.
12158
12159 2005-07-18  Bruno Haible  <bruno@clisp.org>
12160
12161         * lib/lock.h (gl_once_t): New type.
12162         (gl_once_define, gl_once): New macros.
12163         * lib/lock.c (fresh_once): New variable.
12164         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12165         functions.
12166
12167 2005-07-16  Simon Josefsson  <jas@extundo.com>
12168
12169         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12170         workaround, suggested by Bruno.
12171
12172 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12173
12174         * modules/xalloc (Depends-on): Add xalloc-die.
12175         * modules/xvasprintf (Depends-on): Add xalloc-die.
12176
12177 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12178
12179         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12180         with a minor change.
12181
12182 2005-07-15  Bruno Haible  <bruno@clisp.org>
12183
12184         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12185         When using lib/poll.c, define poll as rpl_poll.
12186
12187 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12188
12189         * modules/argp (Depends-on): Remove unlocked-io.
12190
12191 2005-07-14  Derek Price  <derek@ximbiot.com>
12192
12193         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12194         for glob symlink bug.
12195
12196 2005-07-14  Bruno Haible  <bruno@clisp.org>
12197
12198         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12199         Instead, test for *_unlocked function declarations directly.
12200
12201 2005-07-11  Simon Josefsson  <jas@extundo.com>
12202
12203         * modules/size_max: New file.
12204
12205         * modules/xsize: Depend on size_max module for size_max.m4.
12206
12207 2005-07-11  Simon Josefsson  <jas@extundo.com>
12208
12209         * lib/size_max.h: New file.
12210
12211 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12212
12213         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12214         copyright symbol and the year.
12215         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12216         (version_etc_va): Use parameterized copyright notice.
12217         Reword to conform to the current GNU coding standards.
12218
12219 2005-07-11  Karl Berry  <karl@gnu.org>
12220
12221         * doc/gnulib.texi (Quoting): new node.
12222         (Initial import): more info, from Patrice.
12223
12224 2005-07-11  Bruno Haible  <bruno@clisp.org>
12225
12226         * gnulib-tool (func_usage): Document option --avoid.
12227         (Command line options): Handle --avoid.
12228         (func_acceptable): New function.
12229         (func_modules_transitive_closure): Use it.
12230
12231 2005-07-11  Bruno Haible  <bruno@clisp.org>
12232
12233         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12234         Reported by Jim Meyering.
12235
12236 2005-07-10  Bruno Haible  <bruno@clisp.org>
12237
12238         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12239         Needed when size_t is smaller than 'unsigned int'.
12240         Reported by Paul Eggert.
12241
12242 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12243
12244         * modules/argp (Depends-on): Add unlocked-io
12245
12246 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12247
12248         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12249         block of defines.
12250
12251 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12252
12253         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12254         fix now.
12255
12256 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12257         and Paul Eggert  <eggert@cs.ucla.edu>
12258
12259         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12260         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12261
12262 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12263
12264         * modules/regex (Files): Add lib/regex_internal.c,
12265         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12266         (Depends-on): Add extensions.
12267         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12268
12269 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12270
12271         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12272         pathconf.
12273         * m4/same.m4 (gl_SAME): Likewise.
12274         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12275
12276         * m4/regex.m4: Adjust to new libc regex implementation.
12277         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12278         all the .c and .h parts of (the new) regex.
12279         Quote the m4 stuff better.
12280         Check for RE_ICASE bug of old gnulib.
12281         Check for REG_STARTEND of recent libc.
12282         Rename local variables from jm_* to gl_*.
12283         Quote operand of "test -f".
12284         Say "recent enough" version of libc, not "version 2".
12285         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12286         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12287         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12288         Remove check for btowc, isascii.
12289         Require AM_LANGINFO_CODESET.
12290
12291 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12292
12293         * lib/regex.c, regex.h: Sync from libc.
12294         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12295         * lib/regexec.c:
12296         New files, synced from libc, except that regex_internal.h
12297         currently has a small porting fix.
12298
12299 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12300
12301         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12302         regex_internal.c, regexec.c.
12303         Add regex_internal.h too, but as a comment, since the libc version
12304         is currently broken in gnulib mode.
12305
12306 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12307
12308         Support programs like Emacs that use gnulib but not gettext.
12309         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12310         * modules/gettext-h: New file.
12311         * modules/gettext (Files): Remove lib/gettext.h.
12312         (Depends-on): Add gettext-h.
12313         (Makefile.am): Remove lib_SOURCES.
12314         * modules/argmatch, modules/c-stack, modules/closeout:
12315         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12316         * modules/execute, modules/file-type, modules/getaddrinfo:
12317         * modules/getopt, modules/human, modules/javacomp:
12318         * modules/javaexec, modules/mkdir-p, modules/obstack:
12319         * modules/openat, modules/pagealign_alloc, modules/pipe:
12320         * modules/quotearg, modules/regex, modules/rpmatch:
12321         * modules/unicodeio, modules/userspec, modules/version-etc:
12322         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12323         * modules/xsetenv:
12324         Depend on gettext-h, not gettext.
12325
12326 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12327
12328         * gnulib-tool (func_import): Add support for 'public domain' license.
12329         * modules/alloca, modules/atexit, modules/memmove:
12330         Now public domain, not GPL.
12331         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12332         * modules/realloc, modules/strerror, modules/strtod:
12333         Now LGPL, not GPL.
12334
12335 2005-07-05  Bruno Haible  <bruno@clisp.org>
12336
12337         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12338         autoconf CVS. Needed for mingw.
12339
12340 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12341
12342         Remove the dependency of the strftime module on the tzset module.
12343         * modules/strftime (Depends-on): Remove dependency on tzset.
12344
12345 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12346
12347         Remove the dependency of the strftime module on the tzset module.
12348         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12349         gl_FUNC_TZSET_CLOBBER.
12350
12351 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12352
12353         Remove the dependency of the strftime module on the tzset module.
12354         * lib/strftime.c (my_strftime)
12355         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12356         Copy the input structure, to work around some of the bug with
12357         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12358         Solaris releases, you should also use the tzset module, but we won't
12359         require it as a dependency any more since we don't want LGPLed code
12360         to depend on GPLed code.
12361
12362 2005-07-02  Jim Meyering  <jim@meyering.net>
12363
12364         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12365         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12366         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12367         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12368
12369 2005-07-02  Jim Meyering  <jim@meyering.net>
12370
12371         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12372
12373 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12374
12375         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12376         declares only 'struct timespec;' (!).
12377
12378 2005-07-01  Jim Meyering  <jim@meyering.net>
12379
12380         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12381         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12382         * lib/save-cwd.c, tempname.c:
12383         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12384         and don't include <sys/file.h>).
12385
12386 2005-06-29  Jim Meyering  <jim@meyering.net>
12387
12388         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12389         type name.  Use the variable name instead.
12390         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12391         Likewise.
12392
12393 2005-06-28  Simon Josefsson  <jas@extundo.com>
12394
12395         * modules/check-version (Files): Add check-version.m4.
12396
12397 2005-06-28  Simon Josefsson  <jas@extundo.com>
12398
12399         * m4/check-version.m4: New file, suggested by Jim Meyering
12400         <jim@meyering.net>.
12401
12402 2005-06-28  Simon Josefsson  <jas@extundo.com>
12403
12404         * lib/check-version.h, lib/check-version.c: New files.
12405
12406 2005-06-28  Simon Josefsson  <jas@extundo.com>
12407
12408         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12409         collision with global variable.  Better indentation.  Don't
12410         increment buffer pointer beyond buffer end.  Based on comments
12411         from Paul Eggert <eggert@cs.ucla.edu>.
12412
12413         * lib/base64.h: Indent.
12414
12415 2005-06-28  Simon Josefsson  <jas@extundo.com>
12416
12417         * doc/gnulib.texi (Library version handling): New section.
12418
12419 2005-06-28  Jim Meyering  <jim@meyering.net>
12420
12421         * check-module (find_included_lib_files): Hard-code another
12422         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12423         but modules/fts-lgpl (correctly) does not list those files.
12424
12425         * modules/canonicalize (Files): Add lib/pathmax.h.
12426
12427 2005-06-25  Simon Josefsson  <jas@extundo.com>
12428
12429         * modules/check-version: New file.
12430
12431 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12432
12433         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12434         initializer of struct addrinfo, as an indication that we don't
12435         care how many members the structure has.
12436
12437 2005-06-24  Derek Price  <derek@ximbiot.com>
12438         and Bruno Haible  <bruno@clisp.org>
12439
12440         Remove stat module & update lstat.
12441         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12442         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12443         * m4/stat.m4: Remove this file.
12444
12445 2005-06-24  Derek Price  <derek@ximbiot.com>
12446         and Bruno Haible  <bruno@clisp.org>
12447
12448         Remove stat module & update lstat.
12449         * lib/stat.c: Remove this file...
12450         (slash_aware_lstat): ...moving this content and its support...
12451         * lib/lstat.c (rpl_lstat): ...into here.
12452         * lib/lstat.h: New file.
12453
12454 2005-06-24  Derek Price  <derek@ximbiot.com>
12455         and Bruno Haible  <bruno@clisp.org>
12456
12457         Remove stat module & update lstat.
12458         * config/srclist.txt (libc sources): Remove stat.
12459
12460 2005-06-24  Derek Price  <derek@ximbiot.com>
12461         and Bruno Haible  <bruno@clisp.org>
12462
12463         Remove stat module & update lstat.
12464         * MODULES.html.sh (stat): Remove.
12465         * MODULES.html: Regenerated.
12466         * modules/lstat (Description): Correct function name.
12467         (Files): Add "lstat.h".
12468         (Depends-on): Remove stat, add xalloc, stat-macros.
12469         * modules/stat: Remove this file.
12470         (Include): Add "lstat.h", remove <sys/stat.h>.
12471
12472 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12473
12474         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12475         (ranged_convert): Don't save conversion in a temporary struct.
12476         This causes a warning with GCC 4.0.0, and anyway in the typical
12477         case it's not worth the extra 100 bytes or so of code.
12478         (ranged_convert, __mktime_internal): When calling a function via a
12479         pointer P, use P () rather than (*P) (), as we now assume C89 or
12480         better.
12481
12482 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12483
12484         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12485         "who -r" failed to give output.  Problem reported by Tim Waugh.
12486
12487         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12488         (xcalloc): Use it to avoid needless tests.
12489         Problem reported by Jim Meyering.
12490
12491 2005-06-20  Derek Price  <derek@ximbiot.com>
12492
12493         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12494         unnecessary for Autoconfs > 2.59c.
12495
12496 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12497
12498         * lib/argp.h (__option_is_short): Check upper limit of
12499         __key. Isprint() requires its argument to have the value
12500         of an unsigned char or EOF.
12501
12502 2005-06-16  Jim Meyering  <jim@meyering.net>
12503
12504         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
12505         when either N or S is zero.
12506
12507 2005-06-16  Derek Price  <derek@ximbiot.com>
12508
12509         * m4/bison.m4: Declare YACC & YFLAGS precious.
12510
12511 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
12512
12513         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
12514         multibyte string or pattern, fall back on unibyte matching.
12515         Problem reported by James Youngman.
12516
12517 2005-06-08  Bruno Haible  <bruno@clisp.org>
12518
12519         * modules/csharpcomp: New file.
12520         * MODULES.html.sh (C#): Add csharpcomp.
12521
12522 2005-06-08  Bruno Haible  <bruno@clisp.org>
12523
12524         * m4/csharpcomp.m4: New file, from GNU gettext.
12525
12526 2005-06-08  Bruno Haible  <bruno@clisp.org>
12527
12528         * lib/csharpcomp.h: New file, from GNU gettext.
12529         * lib/csharpcomp.c: New file, from GNU gettext.
12530         * lib/csharpcomp.sh.in: New file, from GNU gettext.
12531
12532 2005-06-08  Bruno Haible  <bruno@clisp.org>
12533
12534         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
12535         warning on mingw.
12536
12537 2005-06-07  Derek Price  <derek@ximbiot.com>
12538
12539         Sync from CVS.
12540         * lib/glob_.h: Indent nested #ifdef.
12541
12542 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12543
12544         Sync from coreutils.
12545         Use "file name" when talking about file names, instead of "filename"
12546         or "path", as per the GNU coding standards.
12547         * lib/mkdir-p.c: Renamed from makepath.c.
12548         (make_dir_parents): Renamed from make_path.  All callers changed.
12549         * lib/mkdir-p.h: Likewise.  All includers changed.
12550         * lib/filenamecat.c: Renamed from path-concat.c.
12551         (file_name_concat): Renamed from path_concat.  All callers changed.
12552         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
12553         * lib/filenamecat.h: Likewise.  All includers changed.
12554         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
12555         in comments or local variable names.
12556         * lib/basename.c: Likewise.
12557         * lib/canonicalize.c, canonicalize.h: Likewise.
12558         * lib/dirname.c, dirname.h: Likewise.
12559         * lib/euidaccess.c: Likewise.
12560         * lib/exclude.c: Likewise
12561         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
12562         * lib/fsusage.c, fsuage.h: Likewise.
12563         * lib/fts.c, fts_.h: Likewise.
12564         * lib/getcwd.c: Likewise.
12565         * lib/getloadavg.c: Likewise.
12566         * lib/mkstemp.c: Likewise.
12567         * lib/mountlist.c, mountlist.h: Likewise.
12568         * lib/openat.c, openat.h: Likewise.
12569         * lib/readlink-stub.c: Likewise.
12570         * lib/readutmp.c, readutmp.h: Likewise.
12571         * lib/rename.c: Likewise.
12572         * lib/rmdir.c: Likewise.
12573         * lib/same.c: Likewise.
12574         * lib/savedir.c: Likewise.
12575         * lib/stripslash.c: Likewise.
12576         * lib/tempname.c: Likewise.
12577         * lib/xreadlink.c: Likewise.
12578         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
12579         All uses changed.
12580         * lib/exclude.h: Likewise.
12581
12582         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
12583         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12584         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
12585         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12586         * lib/pathmax.h: Include <limits.h> unconditionally, since other
12587         files have been getting away with it for years (MORE/BSD 4.3
12588         is extinct now).
12589         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
12590         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
12591
12592         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
12593         Define to 256, not 255, as per modern POSIX.
12594
12595 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12596
12597         Sync from coreutils.
12598         Use "file name" when talking about file names, instead of "filename"
12599         or "path", as per the GNU coding standards.
12600         * MODULES.html.sh: mkdir-p renamed from makepath.
12601         filenamecat renamed from path-concat.
12602         * modules/filenamecat: Renamed from modules/path-concat.
12603         (Files): filenamecat.h and filenamecat.c renamed from
12604         path-concat.h and path-concat.c.
12605         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
12606         (Include): filenamecat.h, not path-concat.h.
12607         * modules/mkdir-p: Renamed from modules/makepath.
12608         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
12609         makepath.c.
12610         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
12611         (Include): mkdir-p.h, not makepath.h.
12612
12613 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
12614
12615         Sync from coreutils.
12616         * m4/mkdir-p.m4: Renamed from makepath.m4.
12617         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
12618         Rename files from makepath.c to mkdir-p.c, and from
12619         makepath.h to mkdir-p.h.
12620         * m4/filenamecat.m4: Renamed from path-concat.m4.
12621         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
12622         Rename files from path-concat.c to filenamecat.c,
12623         and from path-concat.h to filenamecat.h.
12624         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
12625         "file name" in local variables or comments.
12626         * m4/rename.m4: Likewise.
12627
12628 2005-06-01  Bruno Haible  <bruno@clisp.org>
12629
12630         * modules/csharpexec: New file.
12631         * MODULES.html.sh (C#): New section.
12632
12633 2005-06-01  Bruno Haible  <bruno@clisp.org>
12634
12635         * m4/csharp.m4: New file, from GNU gettext.
12636         * m4/csharpexec.m4: New file, from GNU gettext.
12637
12638 2005-06-01  Bruno Haible  <bruno@clisp.org>
12639
12640         * lib/csharpexec.h: New file, from GNU gettext.
12641         * lib/csharpexec.c: New file, from GNU gettext.
12642         * lib/csharpexec.sh.in: New file, from GNU gettext.
12643
12644 2005-05-31  Derek Price  <derek@ximbiot.com>
12645             Paul Eggert  <eggert@cs.ucla.edu>
12646
12647         Sync from cvs.
12648         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12649
12650 2005-05-31  Derek Price  <derek@ximbiot.com>
12651             Paul Eggert  <eggert@cs.ucla.edu>
12652
12653         Sync from cvs.
12654         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
12655
12656 2005-05-29  Derek Price  <derek@ximbiot.com>
12657
12658         * config/srclist.txt (glob_.h, glob.c): Add these files.
12659
12660 2005-05-29  Derek Price  <derek@ximbiot.com>
12661
12662         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
12663         * modules/glob: New file.
12664         * modules/getlogin_r: Add link to POSIX spec in description.
12665
12666 2005-05-29  Derek Price  <derek@ximbiot.com>
12667             Paul Eggert  <eggert@cs.ucla.edu>
12668
12669         * m4/glob.m4: New file.
12670
12671 2005-05-29  Derek Price  <derek@ximbiot.com>
12672             Paul Eggert  <eggert@cs.ucla.edu>
12673
12674         * lib/glob_.h, lib/glob.c: New files.
12675
12676 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12677
12678         * modules/fts (Files): Remove m4/inttypes-pri.m4.
12679         * modules/fts-lgpl (Depends-on): Remove gettext.
12680
12681 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12682
12683         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
12684         and don't require gt_INTTYPES_PRI.
12685
12686 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
12687
12688         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
12689
12690         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
12691         the configuration hassle isn't worth it.
12692         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
12693         (LONGEST_MODIFIER, PRIuMAX): Remove.
12694
12695 2005-05-27  Bruno Haible  <bruno@clisp.org>
12696
12697         * lib/getlogin_r.h: Remove second include of <stddef.h>.
12698
12699 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
12700
12701         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
12702         _POSIX_PTHREAD_SEMANTICS for Solaris.
12703
12704 2005-05-25  Derek Price  <derek@ximbiot.com>
12705
12706         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
12707
12708 2005-05-25  Derek Price  <derek@ximbiot.com>
12709             Paul Eggert  <eggert@cs.ucla.edu>
12710
12711         * modules/getlogin_r, m4/getlogin_r.m4: New files.
12712         * lib/getlogin_r.c, getlogin_r.h: New files.
12713
12714 2005-05-25  Bruno Haible  <bruno@clisp.org>
12715             Derek Price  <derek@ximbiot.com>
12716
12717         * lib/getlogin_r.h: Simplify API documentation.
12718
12719 2005-05-23  Derek Price  <derek@ximbiot.com>
12720
12721         * modules/minmax (Files): Add m4/minmax.m4.
12722         (configure.ac): Add gl_MINMAX.
12723
12724 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
12725
12726         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
12727         so that unistd-safer.h (GPL'ed code) need not be included.
12728
12729 2005-05-22  Bruno Haible  <bruno@clisp.org>
12730
12731         * m4/minmax.m4: New file.
12732         Based on a patch by Derek Price <derek@ximbiot.com>.
12733
12734 2005-05-22  Bruno Haible  <bruno@clisp.org>
12735
12736         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
12737         (INT64_MIN): Fix definition.
12738         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
12739
12740         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
12741         NEED_SIGNED_INT_TYPES.
12742
12743         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
12744         HAVE_SYSTEM_INTTYPES.
12745
12746 2005-05-22  Bruno Haible  <bruno@clisp.org>
12747
12748         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
12749         Also include <sys/param.h> if it defines MIN, MAX.
12750         Based on a patch by Derek Price <derek@ximbiot.com>.
12751
12752 2005-05-21  Jim Meyering  <jim@meyering.net>
12753
12754         * modules/fts (Files): Add m4/inttypes-pri.m4.
12755         (Depends-on): Add lstat and remove gettext.  Alphabetize.
12756
12757 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12758
12759         New fts module.
12760         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
12761         (setup_dir, free_dir): New functions.
12762         (enter_dir, leave_dir): Define trivial
12763         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
12764         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
12765         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
12766         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
12767         Move to fts-cycle.c.
12768         (fts_open): Use setup_dir.
12769         (fts_close): Use free_dir.
12770         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
12771         This adds a label and some gotos, but the alternatives were messier.
12772         Check for memory allocation failure when entering a dir.
12773         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
12774         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
12775         (FTS): New member fts_cycle, that is a union that contains the
12776         old active_dir_ht and cycle_state.  All uses changed to mention
12777         fts_cycle.ht and fts_cycle.state.
12778         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
12779         fts.c, with the following changes:
12780         (setup_dir, free_dir): New functions.
12781         (enter_dir): Now returns bool.  Return true if successful, false
12782         if memory exhausted.  All callers changed.
12783         Do not bother partly cleaning up on
12784         memory allocation failure; that is free_dir's job.
12785         However, free ad if hash_insert fails, to avoid memory leak.
12786         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
12787         fts->fts_options to see which union member to use.
12788
12789 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12790
12791         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
12792         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
12793
12794 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12795
12796         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
12797
12798 2005-05-20  Jim Meyering  <jim@meyering.net>
12799
12800         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
12801         Now a macro, to pacify GCC.
12802
12803 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12804
12805         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
12806         of -1.
12807
12808 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
12809
12810         * lib/chown.c (rpl_chown): Return -1 on failure.
12811
12812 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12813
12814         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
12815         Don't check for stddef.h.
12816         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
12817         don't use its results.
12818         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
12819         since we include them unconditionally.  Don't require
12820         AM_STDBOOL_H, since stdbool is a prerequisite.
12821         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
12822         since we assume C89 or better.
12823         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
12824         as we don't use their results.
12825         Don't check for fchdir, memmove, memset, strrchr, as we use
12826         them unconditionally.
12827         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
12828         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
12829
12830 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
12831
12832         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
12833         Include <stddef.h> unconditionally, since we assume C89 now.
12834         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
12835         * lib/fts.c: Include fts_.h first, to check interface.
12836         Do not include intprops.h; no longer needed.
12837         Include cycle-check.h and hash.h, since fts_.h no longer does.
12838         Remove unnecessary casts of closedir to void.
12839         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
12840         decide whether to decrement nlinks.
12841         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
12842         (FTS): Use struct hash_table * instead of Hash_table, so that
12843         we no longer need to include hash.h here.
12844
12845 2005-05-18  Jim Meyering  <jim@meyering.net>
12846
12847         * modules/dirfd (License): Change to LGPL.  Most of the code
12848         is already in the public domain.
12849
12850 2005-05-18  Jim Meyering  <jim@meyering.net>
12851
12852         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
12853         Reported by Yoann Vandoorselaere.
12854
12855 2005-05-17  Jim Meyering  <jim@meyering.net>
12856
12857         * m4/fts.m4: New file, from coreutils.
12858
12859 2005-05-17  Jim Meyering  <jim@meyering.net>
12860
12861         * lib/fts.c, lib/fts_.h: New files, from coreutils.
12862
12863 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12864
12865         Sync from coreutils.
12866         * m4/unlinkdir.m4: New file.
12867
12868 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12869
12870         Sync from coreutils.
12871         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
12872         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
12873         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
12874         White space changes only.
12875         * lib/makepath.c (make_path): Port to hosts where leading "//" is
12876         special.
12877         * lib/yesno.c: Include getline.h, not ctype.h.
12878         (yesno): Don't remove leading white space; POSIX doesn't allow it.
12879         Use getline to remove arbitrary restriction on response length.
12880
12881 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
12882
12883         * config/srclist-update: Spell out "Street" in FSF postal
12884         mail address; this is the style the FSF seems to prefer.
12885
12886         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
12887         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
12888         this updates FSF postal mail address.
12889
12890         Sync from coreutils.
12891         * modules/unlinkdir: New file.
12892         * modules/yesno (Depends-on): Add getline.
12893         * MODULES.html.sh (File system functions): Add unlinkdir.
12894
12895 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
12896
12897         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
12898         lib/strsep.h:
12899         Change the initial comment to refer to GPL, not LGPL.
12900         gnulib-tool will change it to LGPL as needed.
12901
12902         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
12903         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
12904         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
12905         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
12906         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
12907         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
12908         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
12909         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
12910         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
12911         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
12912         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
12913         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
12914         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
12915         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
12916         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
12917         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
12918         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
12919         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
12920         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
12921         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
12922         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
12923         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
12924         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
12925         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
12926         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
12927         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
12928         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
12929         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
12930         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
12931         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
12932         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
12933         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
12934         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
12935         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
12936         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
12937         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
12938         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
12939         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
12940         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
12941         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
12942         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
12943         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
12944         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
12945         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
12946         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
12947         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
12948         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
12949         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
12950         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
12951         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
12952         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
12953         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
12954         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
12955         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
12956         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
12957         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
12958         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
12959         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
12960         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
12961         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
12962         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
12963         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
12964         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
12965         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
12966         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
12967         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
12968         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
12969         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
12970         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
12971         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
12972         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
12973         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
12974         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
12975         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
12976         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
12977         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
12978         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
12979         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
12980         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
12981         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
12982         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
12983         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
12984         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
12985         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
12986         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
12987         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
12988         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
12989         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
12990         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
12991         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
12992         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
12993         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
12994         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
12995         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
12996         lib/yesno.c, lib/yesno.h:
12997         Update FSF postal mail address.
12998
12999 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13000
13001         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13002         tests/test-memmem.c, tests/test-stpncpy.c:
13003         Update FSF postal mail address.
13004
13005 2005-05-13  Bruno Haible  <bruno@clisp.org>
13006
13007         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13008         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13009         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13010         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13011         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13012         Add support for 64-bit integers in the MSVC compiler.
13013
13014 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13015
13016         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13017
13018 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13019
13020         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13021
13022 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13023
13024         * doc/getdate.texi (General date syntax): Don't say that date
13025         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13026         Problem reported by Nic Ferrier.
13027
13028 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13029
13030         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13031         specified in ai_socktype. Fix invalid ai_protocol
13032         check. ai_protocol is usually set to 0 or depending on
13033         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13034         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13035         ai_socktype / ai_protocol in the returned addrinfo structure.
13036
13037 2005-05-10  Simon Josefsson  <jas@extundo.com>
13038
13039         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13040         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13041
13042 2005-05-10  Karl Berry  <karl@gnu.org>
13043
13044         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13045         (from http://www.gnu.org/licenses).
13046         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13047         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13048         fdl.texi suffices.
13049
13050 2005-05-10  Karl Berry  <karl@gnu.org>
13051
13052         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13053         (COPYING.DOC): remove.
13054
13055         * config/srclist-update: new FSF address.
13056
13057 2005-05-10  Derek Price  <derek@ximbiot.com>
13058
13059         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13060         possible.
13061
13062 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13063             Bruno Haible  <bruno@clisp.org>
13064
13065         * modules/inet_ntop: New file.
13066         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13067         inet_ntop.
13068
13069 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13070             Bruno Haible  <bruno@clisp.org>
13071
13072         * m4/inet_ntop.m4: New file.
13073
13074 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13075             Bruno Haible  <bruno@clisp.org>
13076
13077         * lib/inet_ntop.h: New file.
13078         * lib/inet_ntop.c: New file, from glibc with modifications.
13079
13080 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13081
13082         * modules/time_r (License): Change to LGPL.
13083         * modules/extensions (License): Change to LGPL.  Actually,
13084         the license is more permissive than that, but currently gnulib-tool
13085         doesn't know how to handle more-permissive licenses.
13086
13087         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13088         Problem reported by Dave Love.
13089
13090 2005-05-08  Jim Meyering  <jim@meyering.net>
13091
13092         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13093         blank.
13094
13095 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13096
13097         * modules/argmatch (Depends-on): Add stdbool.
13098         * modules/backupfile (Depends-on): Likewise.
13099         * modules/chdir-long (Depends-on): Likewise.
13100         * modules/closeout (Depends-on): Likewise.
13101         * modules/cycle-check (Depends-on): Likewise.
13102         * modules/dirname (Depends-on): Likewise.
13103         * modules/fnmatch (Depends-on): Likewise.
13104         * modules/fsusage (Depends-on): Likewise.
13105         * modules/fwriteerror (Depends-on): Likewise.
13106         * modules/getcwd (Depends-on): Likewise.
13107         * modules/getloadavg (Depends-on): Likewise.
13108         * modules/hard-locale (Depends-on): Likewise.
13109         * modules/makepath (Depends-on): Likewise.
13110         * modules/mountlist (Depends-on): Likewise.
13111         * modules/nanosleep (Depends-on): Likewise.
13112         * modules/posixtm (Depends-on): Likewise.
13113         * modules/quotearg (Depends-on): Likewise.
13114         * modules/readtokens (Depends-on): Likewise.
13115         * modules/readtokens0 (Depends-on): Likewise.
13116         * modules/readutmp (Depends-on): Likewise.
13117         * modules/save-cwd (Depends-on): Likewise.
13118         * modules/strftime (Depends-on): Likewise.
13119         * modules/userspec (Depends-on): Likewise.
13120         * modules/utimecmp (Depends-on): Likewise.
13121         * modules/xgetcwd (Depends-on): Likewise.
13122         * modules/xnanosleep (Depends-on): Likewise.
13123         * modules/xstrtod (Depends-on): Likewise.
13124         * modules/yesno (Depends-on): Likewise.
13125
13126 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13127
13128         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13129         needless checks.
13130
13131 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13132
13133         Merge from coreutils.  Among other things,
13134         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13135         * lib/fd-safer.c: New file.
13136         * lib/fcntl-safer.h, open-safer.c: Remove.
13137         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13138         * lib/dup-safer.c: Include unistd-safer.h first.
13139         Don't include errno.h.
13140         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13141         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13142         * lib/file-type.c: Rely on file-type.h change.
13143         * lib/getloadavg.c: Include unistd-safer.h.
13144         (getloadavg): Use safer open.
13145         * lib/getusershell.c: Include "stdio-safer.h".
13146         (getusershell): Use safer fopen.
13147         * lib/long-options.c (long_options): Use NULL rather than 0.
13148         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13149         'free'.
13150         * lib/modechange.c: Likewise.
13151         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13152         (MODE_DONE): New constant.
13153         (struct mode_change): Remove 'next' member.
13154         (make_node_op_equals): New function; like the old one of the
13155         same name, except it allocates an array.
13156         (mode_compile, mode_create_from_ref): Use it.
13157         (mode_compile): Allocate result as an array, not a linked list.
13158         Parse octal string ourself, so that we catch mistakes like "+0".
13159         (mode_adjust): Arg is an array, not a linked list.
13160         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13161         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13162         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13163         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13164         Remove.  This is now stat-macros.h's job.
13165         (talloc): Remove.  All callers replaced by xalloc, so that
13166         our invokers don't have to worry about reporting memory failures.
13167         (make_node_op_equals): Remove.
13168         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13169         New constants.
13170         (struct mode_change): Moved here from modechange.h.
13171         (mode_append_entry): Remove.
13172         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13173         apps to have incorrect behavior.  Use simpler algorithm for head
13174         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13175         Detect more invalid usages rather than having somewhat-random behavior.
13176         Don't insert an "a=" action, as that leads to incorrect behavior.
13177         (mode_compile, mode_create_from_ref): Return NULL on error instead
13178         of an enum, since now there's only one way to have an error.  All
13179         callers changed.
13180         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13181         at the correct time.  Simplify calculation of "+u" and its ilk.
13182         Don't mishandle "+X".
13183         (mode_free): Remove "register" and localize decls.
13184         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13185         (struct mode_change): Move to modechange.c; callers don't
13186         need to see this stuff.
13187         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13188         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13189         (mode_change, mode_adjust): Reflect the new signatures noted above.
13190         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13191         that might redefine system include files.
13192         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13193         (my_usleep): Use NULL rather than (void *) 0.
13194         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13195         Use siginterrupt to specify that system calls should be interrupted.
13196         (rpl_nanosleep): Move initialization of suspended closer to call of
13197         my_usleep.
13198         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13199         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13200         (desirable_utmp_entry): New function.
13201         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13202         using x2nrealloc, to simplify logic.
13203         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13204         size calculation.  Do not assume utmp file is a regular file.
13205         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13206         (READ_UTMP_CHECK_PIDS): New constant.
13207         * lib/save-cwd.c: Include unistd-safer.h.
13208         (save_cwd): Use fd_safer.
13209         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13210         [!_LIBC] Include "stat-macros.h" instead.
13211         * lib/unistd-safer.h (fd_safer): New decl.
13212
13213 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13214
13215         * modules/getloadavg (Depends-on): Add unistd-safer.
13216         * modules/getusershell (Depends-on): Add stdio-safer.
13217         * modules/lstat (Depends-on): Remove xalloc.
13218         * modules/mkstemp (Depends-on): Add stat-macros.
13219         * modules/modechange (Depends-on): Remove xstrtol.
13220         Add stat-macros, xalloc.
13221         * modules/save-cwd (Depends-on): Add unistd-safer.
13222         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13223         * modules/unistd-safer (Files): Add lib/fd-safer.c
13224         (Makefile.am): Remove lib_SOURCES.
13225
13226         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13227         Remove fcntl-safer; unistd-safer supersedes it.
13228
13229 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13230
13231         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13232         AC_HEADER_STAT.
13233         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13234         (gl_PREREQ_CHOWN): Remove.
13235         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13236         it.  Don't require AC_HEADER_STAT.
13237         (gl_PREREQ_LSTAT): Remove.
13238         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13239         Don't require AC_HEADER_STAT.
13240         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13241         (gl_PREREQ_RMDIR): Remove.
13242         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13243         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13244         the stat-macros module a prerequisite.
13245         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13246         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13247         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13248         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13249         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13250         variable names.
13251         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13252         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13253         variable prefixes.
13254         * m4/fcntl-safer.m4: Remove.
13255         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13256         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13257         Invoke gl_PREREQ_FD_SAFER.
13258         (gl_PREREQ_FD_SAFER): New macro.
13259         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13260         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13261         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13262         Remove duplicate call to AC_LIBOBJ(readutmp).
13263         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13264
13265         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13266         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13267
13268 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13269
13270         * MODULES.html.sh (Misc): Add byteswap.
13271
13272 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13273
13274         * modules/getcwd (Depends-on): Add extensions.
13275         * modules/openat (Depends-on): Likewise.
13276
13277 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13278
13279         * modules/byteswap: New file.
13280
13281 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13282
13283         * m4/byteswap.m4: New file.
13284
13285 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13286
13287         * lib/byteswap_.h: New file.
13288
13289 2005-04-25  Karl Berry  <karl@gnu.org>
13290
13291         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13292
13293 2005-04-25  Albert Chin  <china@thewrittenword.com>
13294
13295         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13296         Toolkit C bug.
13297
13298 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13299
13300         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13301         (func_ln_if_changed) Remove forcibly for no error message
13302         in case file does not exist.
13303
13304 2005-04-19  Simon Josefsson  <jas@extundo.com>
13305
13306         * gnulib-tool (Options): Make --symlink mean --symbolic.
13307
13308 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13309
13310         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13311
13312 2005-04-16  Simon Josefsson  <jas@extundo.com>
13313
13314         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13315
13316 2005-04-15  Simon Josefsson  <jas@extundo.com>
13317
13318         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13319
13320 2005-04-15  Simon Josefsson  <jas@extundo.com>
13321
13322         * gnulib-tool: Rename --symlink to --symbolic.
13323
13324 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13325
13326         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13327         symbolic links to files instead of copying/moving.  Add --aux-dir,
13328         specifying directory relative --dir where auxiliary build tools
13329         are placed.
13330
13331 2005-04-14  Bruno Haible  <bruno@clisp.org>
13332
13333         * modules/allocsa (License): Change to LGPL.
13334         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13335
13336 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13337
13338         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13339         that "UTC +1 second" continues to work.  Problem reported
13340         by Dmitry V. Levin.
13341         (relunit_snumber): New rule.
13342         (relunit): Use it.
13343
13344 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13345
13346         * lib/getdate.y (universal_time_zone_table): New constant.
13347         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13348         universal_time_zone_table.
13349         (lookup_zone): Prefer universal_time_zone_table to
13350         local_time_zone_table, so that "GMT" time stamps are allowed in
13351         London during the summer.  Problem reported by Ian Abbott.
13352
13353 2005-04-12  Jim Meyering  <jim@meyering.net>
13354
13355         * lib/human.c (humblock): Set *options even when returning due to
13356         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13357         warning from gcc-4.
13358
13359 2005-04-09  Jim Meyering  <jim@meyering.net>
13360
13361         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13362         -Wuninitialized: initialize tm0.tm_year.
13363
13364 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13365
13366         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13367         count, since there's no maximum.  All uses changed.
13368         Add member dsts_seen.
13369         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13370         not being INT_MAX.
13371         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13372         Use pc_rels_seen to decide whther a date is absolute.
13373
13374         * lib/getdate.y (number): Don't overwrite year.
13375         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13376         check.
13377
13378 2005-04-02  Simon Josefsson  <jas@extundo.com>
13379
13380         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13381         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13382
13383 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13384
13385         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13386         where no absolute path name can be longer than PATH_MAX.
13387
13388 2005-03-27  Jim Meyering  <jim@meyering.net>
13389
13390         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13391
13392 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13393
13394         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13395         "one's complement" -> "ones' complement" in comment, as per Knuth.
13396         "value of type" -> "type or expression" in comment.
13397         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13398
13399 2005-03-26  Jim Meyering  <jim@meyering.net>
13400
13401         Comment nits.
13402         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13403         Correct typos: s/or/of/.
13404
13405 2005-03-26  Jim Meyering  <jim@meyering.net>
13406
13407         * modules/check-include-files: Move to ../ and rename to...
13408         * check-module: ...this.
13409
13410 2005-03-25  Jim Meyering  <jim@meyering.net>
13411
13412         * modules/xvasprintf (Files): Add xalloc.h.
13413
13414 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13415
13416         * modules/gettext (Files): config/config.rpath ->
13417         build-aux/config.rpath
13418         * modules/iconv (Files): Likewise.
13419         Problem reported by Oskar Liljeblad.
13420
13421 2005-03-23  Jim Meyering  <jim@meyering.net>
13422
13423         * modules/check-include-files: New script to check for
13424         missing dependencies, multiple includes, etc.
13425
13426         * modules/c-strtold (Depends-on): Add xalloc.
13427         * modules/c-strtod (Depends-on): Add xalloc.
13428         * modules/hash (Depends-on): Add xalloc.
13429         (Files): Remove lib/xalloc.h.
13430
13431         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13432         * modules/userspec (Files): Add lib/inttostr.h.
13433
13434 2005-03-23  Jim Meyering  <jim@meyering.net>
13435
13436         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13437
13438 2005-03-22  Jim Meyering  <jim@meyering.net>
13439
13440         * modules/stat-macros: New module.
13441         * modules/canonicalize, modules/euidaccess, modules/file-type,
13442         * modules/filemode, modules/lchown, modules/makepath,
13443         * modules/rmdir, modules/stat: Depend on new stat-macros module
13444         rather than listing lib/stat-macros.h manually.
13445         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13446
13447 2005-03-22  Jim Meyering  <jim@meyering.net>
13448
13449         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13450
13451 2005-03-22  Bruno Haible  <bruno@clisp.org>
13452
13453         * config/srclist.txt: Replace target directory 'config' with
13454         'build-aux'.
13455         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13456         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13457         ../build-aux/.
13458
13459 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13460
13461         * modules/chdir-long (Depends-on): Add mempcpy.
13462
13463         * modules/acl, modules/backupfile, modules/c-strtod,
13464         modules/c-strtold, modules/canon-host, modules/canonicalize,
13465         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13466         modules/exclude, modules/exitfail, modules/file-type,
13467         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13468         modules/getdate, modules/getline, modules/getpagesize,
13469         modules/getpass, modules/getugroups, modules/group-member,
13470         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13471         modules/inttostr, modules/long-options, modules/makepath,
13472         modules/md5, modules/memcasecmp, modules/memcoll,
13473         modules/modechange, modules/mountlist, modules/path-concat,
13474         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13475         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13476         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13477         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13478         modules/strftime, modules/strndup, modules/strverscmp,
13479         modules/timespec, modules/unlocked-io, modules/userspec,
13480         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13481         modules/yesno:
13482         Remove lib_SOURCES line from Makefile.am section, as this is now
13483         done automatically by the corresponding Autoconf macro.
13484
13485 2005-03-21  Jim Meyering  <jim@meyering.net>
13486
13487         Changes imported from coreutils.
13488
13489         * lib/cycle-check.c: Don't include xalloc.h.
13490
13491         * lib/path-concat.c: Don't include assert.h.
13492         (path_concat): Remove assertion that would have triggered
13493         for ABASE starting with more than one slash.
13494         Reported by Andreas Schwab.
13495
13496         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13497         properly when ABASE is an absolute file name.
13498         Correct the description of this function.
13499         Include <assert.h>.
13500         Add an assertion and a test driver.
13501         This fixes a bug introduced on 2004-07-02.
13502         Andreas Schwab reported the resulting failure of cp --parents:
13503         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13504
13505 2005-03-21  Jim Meyering  <jim@meyering.net>
13506
13507         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
13508         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
13509
13510 2005-03-21  Jim Meyering  <jim@meyering.net>
13511         and  Paul Eggert  <eggert@cs.ucla.edu>
13512
13513         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
13514         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
13515         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
13516         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
13517         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
13518         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
13519         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
13520         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
13521         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
13522         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
13523         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
13524         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
13525         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
13526         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
13527         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
13528         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
13529         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
13530         for these modules.
13531
13532 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
13533
13534         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
13535         (which shouldn't happen), generate nothing instead of returning 0
13536         immediately, so that nstrftime (NULL, ...) doesn't return 0.
13537
13538 2005-03-16  Bruno Haible  <bruno@clisp.org>
13539
13540         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
13541         HAVE_LONGLONG_64BIT.
13542
13543 2005-03-16  Bruno Haible  <bruno@clisp.org>
13544
13545         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
13546         HAVE_LONGLONG_64BIT.
13547
13548 2005-03-16  Bruno Haible  <bruno@clisp.org>
13549
13550         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
13551         HAVE_LONGLONG_64BIT.
13552
13553 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13554
13555         * lib/strftime.c (my_strftime): Prepend space to format so that we can
13556         reliably distinguish strftime failure from empty output on POSIX
13557         hosts.
13558
13559 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
13560
13561         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
13562         (iconv_string): Don't guess a size-zero buffer, as that might cause
13563         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
13564         result would be 'too large', where 'too large' is (heuristically)
13565         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
13566         overflow concerns.  This will prevent some unwanted malloc failures
13567         when the inputs are very large.
13568
13569 2005-03-15  Karl Berry  <karl@gnu.org>
13570
13571         * config/srclist.txt (config.rpath): from gettext.
13572         * config/config.rpath: update.
13573
13574 2005-03-15  Bruno Haible  <bruno@clisp.org>
13575
13576         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
13577         to 'negate'.
13578
13579         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
13580         variable.
13581
13582         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
13583         results.
13584
13585 2005-03-14  Simon Josefsson  <jas@extundo.com>
13586
13587         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
13588         <fx@gnu.org>.
13589
13590 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
13591
13592         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
13593         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
13594         intprops.h.
13595         * lib/strtol.c: Likewise.
13596
13597 2005-03-14  Jim Meyering  <jim@meyering.net>
13598
13599         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
13600         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
13601         to be nonzero so that we (and caller) can detect the difference
13602         between a valid zero-length expansion and an error return, even
13603         when the underlying strftime fails before writing anything into
13604         that location.
13605
13606 2005-03-14  Bruno Haible  <bruno@clisp.org>
13607
13608         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
13609         Update from GNU gettext 0.14.3.
13610
13611 2005-03-10  Jim Meyering  <jim@meyering.net>
13612
13613         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
13614
13615 2005-03-10  Jim Meyering  <jim@meyering.net>
13616
13617         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
13618         so that this module works on systems without fchdir.
13619
13620 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
13621
13622         Factor int-properties macros into a single file, except for
13623         glibc-related files.
13624         * lib/intprops.h: New file.
13625         * lib/getloadavg.c: Include it instead of limits.h.
13626         (INT_STRLEN_BOUND): Remove.
13627         * lib/human.c: Include intprops.h.
13628         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
13629         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
13630         302/1000.
13631         * lib/inttostr.h: Include intprops.h instead of limits.h.
13632         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
13633         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
13634         for consistency with intprops.h.
13635         (time_t_is_integer, twos_complement_arithmetic): Use them.
13636         * lib/sig2str.h: Include <signal.h>, intprops.h.
13637         (INT_STRLEN_BOUND): Remove.
13638         * lib/strftime.c (TYPE_SIGNED): Remove.
13639         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
13640         * lib/strtol.c: Adjust comments to match intprops.h.
13641         * lib/userspec.c: Include intprops.h.
13642         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
13643         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
13644         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
13645         instead of rolling our own expressions.
13646         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
13647
13648         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
13649         instead of int.
13650         (my_strftime): Do not mishandle years close to INT_MAX, by doing
13651         the right thing even if adding 1900 would overflow.  Similarly
13652         for tm_mon + 1 and tm_yday + 1.
13653         Make %Y always equivalent to %C%y, and similarly for %G and %g.
13654         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
13655         (DO_SIGNED_NUMBER): New macro.
13656         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
13657
13658 2005-03-07  Bruno Haible  <bruno@clisp.org>
13659
13660         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
13661
13662 2005-03-07  Bruno Haible  <bruno@clisp.org>
13663
13664         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
13665
13666 2005-03-04  Derek R. Price  <derek@ximbiot.com>
13667
13668         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
13669         (func_import): Only replace files via --import when they have actually
13670         changed.
13671
13672 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13673
13674         * m4/mmap-anon.m4: New file.
13675         * m4/pagealign_alloc.m4: New file.
13676
13677 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13678             Bruno Haible  <bruno@clisp.org>
13679
13680         * modules/pagealign_alloc: New file.
13681         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
13682
13683 2005-03-03  Derek R. Price  <derek@ximbiot.com>
13684             Bruno Haible  <bruno@clisp.org>
13685
13686         * lib/pagealign_alloc.h: New file.
13687         * lib/pagealign_alloc.c: New file.
13688
13689 2005-03-03  Bruno Haible  <bruno@clisp.org>
13690
13691         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
13692         Use an all-permissive copyright notice, recommended by RMS.
13693
13694 2005-03-02  Bruno Haible  <bruno@clisp.org>
13695
13696         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
13697         of AIX, the replacement has to be done only after <string.h> is
13698         included, therefore not in config.h. stpncpy.h does the replacement,
13699         and stpncpy.c uses it.
13700
13701 2005-03-02  Bruno Haible  <bruno@clisp.org>
13702
13703         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
13704         stpncpy.c uses it.
13705
13706 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13707
13708         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
13709         The workaround isn't strictly needed for POSIX conformance, and
13710         it's too much of a pain to configure and maintain.  We'll ask
13711         people to fix their kernels instead.
13712         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
13713         (NANOSLEEP_BUG_WORKAROUND): Remove.
13714         (xnanosleep): Remove the workaround.
13715
13716 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13717
13718         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
13719         Reported by Derek Price.
13720         (Include): Add "timespec.h".
13721
13722         * modules/xnanosleep (Depends-on): Remove gethrxtime.
13723
13724 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
13725
13726         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
13727         to detect nanosleep bug.
13728
13729 2005-03-01  Bruno Haible  <bruno@clisp.org>
13730
13731         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
13732
13733 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
13734
13735         * modules/gethrxtime: New file.
13736         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
13737         (Depends-on): Add gethrxtime.
13738         (configure.ac): Add gl_XNANOSLEEP.
13739         (Makefile.am): Remove lib_SOURCES line.
13740
13741 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13742
13743         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
13744         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
13745
13746 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
13747
13748         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
13749         * lib/timespec.h (gettime): Return void, since it always
13750         succeeds now.  All uses changed.
13751         * lib/gettime.c (gettime) Likewise.
13752         [HAVE_NANOTIME]: Prefer nanotime.
13753         Assume gettimeofday succeeds, as POSIX requires.
13754         Assime time () succeeds, since other code already does.
13755         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
13756         (timespec_subtract): Remove.
13757         (NANOSLEEP_BUG_WORKAROUND): New constant.
13758         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
13759         things considerably.  Use it only on GNU/Linux hosts, since the
13760         workaround shouldn't be needed elsewhere.
13761
13762 2005-02-24  Bruno Haible  <bruno@clisp.org>
13763
13764         * modules/gettext (Files): Add m4/glibc2.m4.
13765
13766 2005-02-24  Bruno Haible  <bruno@clisp.org>
13767
13768         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
13769         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
13770         * m4/progtest.m4:
13771         Update from GNU gettext 0.14.2.
13772         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
13773
13774 2005-02-24  Bruno Haible  <bruno@clisp.org>
13775
13776         * lib/localcharset.c: Update from GNU gettext 0.14.2.
13777         * lib/config.charset: Update from GNU gettext 0.14.2.
13778
13779 2005-02-24  Bruno Haible  <bruno@clisp.org>
13780
13781         * lib/gettext.h: Update from GNU gettext 0.14.2.
13782
13783 2005-02-23  Simon Josefsson  <jas@extundo.com>
13784
13785         * m4/iconvme.m4: New file.
13786
13787 2005-02-23  Jim Meyering  <jim@meyering.net>
13788
13789         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
13790         change.
13791         Thanks to Bruno Haible for catching it.
13792
13793 2005-02-22  Simon Josefsson  <jas@extundo.com>
13794
13795         * modules/iconvme: New file.
13796
13797         * MODULES.html.sh: Add iconvme.
13798
13799 2005-02-22  Simon Josefsson  <jas@extundo.com>
13800
13801         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
13802
13803 2005-02-22  Simon Josefsson  <jas@extundo.com>
13804
13805         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
13806
13807 2005-02-22  Jim Meyering  <jim@meyering.net>
13808
13809         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
13810         s/ifndef/ifdef/.
13811
13812 2005-02-20  Neil Conway  <neilc@samurai.com>
13813
13814         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
13815         returned by OSX/Darwin if the specified buffer is not large
13816         enough for the hostname.
13817
13818 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13819
13820         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
13821         pass it to _help, otherwise the latter coredumps trying to
13822         dereference state.root_argp.
13823
13824 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13825
13826         * modules/chdir-long (Depends-on): Add memrchr.
13827         * modules/memrchr (Files): Add lib/memrchr.h.
13828         (Include): "memrchr.h".
13829
13830 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13831
13832         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
13833
13834 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
13835
13836         * lib/memrchr.h: New file.
13837         * lib/chdir-long.c: Include it.
13838         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
13839         Don't bother including stddef.h.
13840
13841 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
13842
13843         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
13844         inclusion.
13845         Include <sys/types.h>, for dev_t.
13846         (ME_DUMMY, ME_REMOTE): Move from here....
13847         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
13848         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
13849         Dmitry V. Levin.
13850         Include mountlist.h first, to test the interface.
13851
13852 2005-01-29  Bruno Haible  <bruno@clisp.org>
13853
13854         * lib/progname.c (program_name): Initialize.
13855         Needed when linking statically on MacOS X.
13856
13857 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13858
13859         Sync from coreutils.
13860         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
13861         (Depends-on): Add c-strtod.
13862         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
13863
13864 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
13865
13866         Sync from coreutils.
13867         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
13868
13869         Remove files that are specific to coreutils.
13870         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
13871
13872 2005-01-28  Bruno Haible  <bruno@clisp.org>
13873
13874         * modules/javacomp: New file.
13875         * MODULES.html.sh (Java): Add javacomp.
13876
13877 2005-01-28  Bruno Haible  <bruno@clisp.org>
13878
13879         * m4/javacomp.m4: New file, from GNU gettext.
13880
13881 2005-01-28  Bruno Haible  <bruno@clisp.org>
13882
13883         * lib/javacomp.sh.in: New file, from GNU gettext.
13884         * lib/javacomp.h: New file, from GNU gettext.
13885         * lib/javacomp.c: New file, from GNU gettext.
13886
13887 2005-01-26  Simon Josefsson  <jas@extundo.com>
13888
13889         * lib/gai_strerror.c: Use GPL in header.
13890
13891 2005-01-26  Bruno Haible  <bruno@clisp.org>
13892
13893         * modules/javaexec: New file.
13894         * MODULES.html.sh (Java): Add javaexec.
13895
13896 2005-01-26  Bruno Haible  <bruno@clisp.org>
13897
13898         * m4/javaexec.m4: New file, from GNU gettext.
13899
13900 2005-01-26  Bruno Haible  <bruno@clisp.org>
13901
13902         * lib/javaexec.sh.in: New file, from GNU gettext.
13903         * lib/javaexec.h: New file, from GNU gettext.
13904         * lib/javaexec.c: New file, from GNU gettext.
13905
13906 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13907
13908         * modules/lchown (Depends-on): Remove lchown.h
13909
13910 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13911
13912         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
13913         must be defined if the header file was not found, in order
13914         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
13915
13916 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13917
13918         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
13919         initializers for struct pentry_state.
13920         (__argp_error): Check return value of __asprintf
13921         (__argp_failure): Translate error message
13922
13923         * lib/argp-parse.c: Removed braces around the expansion of N_()
13924
13925 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
13926
13927         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
13928         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
13929         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
13930         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
13931         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
13932         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
13933         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
13934         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
13935         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
13936         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
13937         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
13938         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
13939         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
13940         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
13941         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
13942         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
13943         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
13944         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
13945         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
13946         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
13947         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
13948         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
13949         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
13950         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
13951         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
13952         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
13953         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
13954         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
13955         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
13956         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
13957         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
13958         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
13959         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
13960         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
13961         xstrtol.m4, xstrtoumax.m4, yesno.m4:
13962         Use an all-permissive copyright notice, recommended by RMS.
13963
13964 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
13965
13966         * modules/chdir-long (Depends-on): Remove mempcpy.
13967
13968 2005-01-21  Jim Meyering  <jim@meyering.net>
13969
13970         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
13971         same value as for Solaris 9.
13972
13973         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
13974         component length.  This included changing the parameter to be
13975         of type `char *' rather than `char const *'.
13976         * lib/chdir-long.h (chdir_long): Update prototype.
13977
13978         * lib/openat.c (fdopendir, fstatat): New functions.
13979         * lib/openat.h: Include headers required for use of DIR and struct
13980         stat.
13981         [AT_SYMLINK_NOFOLLOW]: Define.
13982         (fdopendir, fstatat): Add prototypes.
13983
13984 2005-01-21  Bruno Haible  <bruno@clisp.org>
13985
13986         * modules/classpath: New file.
13987         * MODULES.html.sh (Java): Add classpath.
13988
13989 2005-01-21  Bruno Haible  <bruno@clisp.org>
13990
13991         * lib/classpath.h: New file, from GNU gettext.
13992         * lib/classpath.c: New file, from GNU gettext.
13993
13994 2005-01-20  Simon Josefsson  <jas@extundo.com>
13995
13996         * modules/version-etc-fsf: New file.
13997
13998 2005-01-20  Simon Josefsson  <jas@extundo.com>
13999
14000         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14001         * lib/version-etc.c: Remove version_etc_copyright.
14002         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14003         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14004
14005 2005-01-20  Simon Josefsson  <jas@extundo.com>
14006
14007         * lib/base64.h (isbase64): Add.
14008
14009         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14010         using a unsigned prototype, don't inline.
14011         (base64_decode): Use it.
14012
14013 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14014
14015         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14016         it.
14017
14018 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14019
14020         * lib/save-cwd.c (save_cwd): Remove code to support the case
14021         where fchdir is missing or flaky.
14022
14023 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14024
14025         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14026
14027 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14028
14029         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14030         AC_LIBSOURCES now does this.
14031         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14032         with new ullong_max module.
14033
14034 2005-01-19  Bruno Haible  <bruno@clisp.org>
14035
14036         * modules/sh-quote: New file.
14037         * MODULES.html.sh (Executing programs): Add sh-quote.
14038
14039 2005-01-19  Bruno Haible  <bruno@clisp.org>
14040
14041         * lib/sh-quote.h: New file, from GNU gettext.
14042         * lib/sh-quote.c: New file, from GNU gettext.
14043
14044 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14045
14046         Merge from coreutils.
14047         * m4/ullong_max.m4: New file.
14048         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14049         (gl_MACROS): Assume localeconv exists.
14050
14051 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14052
14053         Merge changes from coreutils, as described below in several
14054         changelogs dated today.
14055
14056         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14057         (O_DIRECTORY): Remove; not needed here, since "." must be
14058         a directory.  All uses removed.
14059         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14060         universal on Suns, and we also need to test for IRIX.
14061         Revamp code to use 'if' rather than '#if'.
14062         Avoid unnecessary comparison of cwd->desc to 0.
14063
14064         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14065         for known valid error numbers rather than observed invalid ones.
14066
14067 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14068
14069         * modules/ullong_max: New file.
14070
14071         * modules/chdir-long, modules/openat: New files.
14072         * modules/save-cwd (Depends-on): Depend on chdir-long.
14073         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14074
14075 2005-01-18  Jim Meyering  <jim@meyering.net>
14076
14077         Merge from coreutils.
14078         * m4/chdir-long.m4, m4/openat.m4: New files.
14079         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14080         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14081         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14082         is sane and DOES follow symlinks.  Besides, testing 20 different
14083         systems found no broken chown implementations.
14084         Prompted by a change in rsync's copy of this macro.
14085         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14086
14087         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14088
14089         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14090         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14091         NULL-means-set-to-current-time semantics.
14092         Remove temporary file immediately, rather than waiting
14093         for configure's at-exit trap code to do it.
14094
14095 2005-01-18  Jim Meyering  <jim@meyering.net>
14096
14097         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14098
14099         * lib/utimens.c (futimens): Account for the fact that futimes
14100         can also fail with errno == ENOSYS or errno == ENOENT.
14101         Patch from Dmitry V. Levin.
14102
14103         Change the name of the robust chdir function from chdir to chdir_long.
14104         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14105         (restore_cwd): Use chdir_long, not chdir.
14106         * lib/chdir-long.c: Renamed from chdir.c.
14107         * lib/chdir-long.h: Renamed from chdir.h.
14108         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14109         Hurd.
14110
14111 2005-01-18  Bruno Haible  <bruno@clisp.org>
14112
14113         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14114         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14115         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14116         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14117         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14118         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14119         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14120         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14121         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14122         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14123         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14124         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14125         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14126         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14127         Use an all-permissive copyright notice, recommended by RMS.
14128
14129 2005-01-18  Bob Proulx  <bob@proulx.com>
14130
14131         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14132         simplify offsetof() macro construct to avoid compile failure with
14133         native HP-UX 11.0 ANSI C compiler.
14134
14135 2005-01-17  Bruno Haible  <bruno@clisp.org>
14136
14137         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14138         redundant because stpncpy.m4 takes care of it.
14139
14140 2005-01-17  Bruno Haible  <bruno@clisp.org>
14141
14142         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14143
14144 2005-01-17  Bruno Haible  <bruno@clisp.org>
14145
14146         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14147         used.
14148
14149 2005-01-17  Bruno Haible  <bruno@clisp.org>
14150
14151         * lib/fwriteerror.h (fwriteerror): Change specification to include
14152         fclose.
14153         * lib/fwriteerror.c: Include <stdbool.h>.
14154         (fwriteerror): At the end, close the file stream. Record whether
14155         stdout was already closed.
14156
14157 2005-01-17  Bruno Haible  <bruno@clisp.org>
14158
14159         * lib/execute.c (environ): Declare if needed.
14160         * lib/pipe.c (environ): Likewise.
14161         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14162
14163 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14164
14165         * modules/argp: Depend on vsnprintf
14166
14167 2005-01-10  Jim Meyering  <jim@meyering.net>
14168
14169         * modules/closeout (Depends-on): Add atexit.
14170
14171 2005-01-06  Bruno Haible  <bruno@clisp.org>
14172
14173         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14174
14175 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14176
14177         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14178         definitions to be after all include files, to avoid collisions.
14179         Problem reported by Bob Proulx.
14180
14181 2005-01-04  Jim Meyering  <jim@meyering.net>
14182
14183         Changes imported from coreutils.
14184         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14185         as the mkstemp template, use a temporary directory and an
14186         8.3-friendly template to avoid trouble on systems like DJGPP.
14187         Reported by Juan M. Guerrero via Stepan Kasal.
14188         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14189         close. Remove the temporary directory right away, rather than waiting
14190         for configure's at-exit trap code to do it.
14191         Suggestion from Stepan Kasal.
14192
14193 2005-01-01  Simon Josefsson  <jas@extundo.com>
14194
14195         * gnulib-tool: Print #include directives when --import'ing.
14196
14197 2004-12-28  Simon Josefsson  <jas@extundo.com>
14198
14199         * tests/test-base64.c: Include required header files.  Remove
14200         unused variables.
14201
14202 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14203
14204         * modules/error (Depends-on): Remove gettext.
14205
14206 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14207
14208         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14209         not needed.  This removes a dependency on the gettext module.
14210         [defined _LIBC]: Do not include <libintl.h>; not needed.
14211
14212 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14213
14214         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14215         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14216
14217 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14218
14219         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14220         HAVE_DECL_STRTOLD.
14221
14222 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14223
14224         * modules/getdate (Depends-on): Remove alloca-opt.
14225
14226 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14227
14228         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14229
14230 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14231
14232         * lib/argp-parse.c: Include <stddef.h>.
14233         (alignof, alignto): New macros.
14234         (parser_init): Don't assume that void * is aligned sufficiently
14235         for struct option.
14236
14237         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14238         need to extend the stack.
14239         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14240         large.
14241
14242 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14243
14244         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14245
14246 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14247
14248         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14249         (2004-10-24) change.  Apparently this was a false alarm.
14250
14251         * modules/getdate: Depend on alloca-opt, not alloca.
14252
14253 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14254
14255         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14256         Remove now-obsolete comment about AIX.
14257         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14258         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14259         (YYMAXDEPTH): New macro.
14260
14261 2004-12-18  Simon Josefsson  <jas@extundo.com>
14262
14263         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14264
14265 2004-12-18  Bruno Haible  <bruno@clisp.org>
14266
14267         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14268
14269 2004-12-18  Bruno Haible  <bruno@clisp.org>
14270
14271         * lib/fatal-signal.c (fatal_signals): Make non-const.
14272         (init_fatal_signals): New function.
14273         (uninstall_handlers, install_handlers): Ignore signals that were set to
14274         SIG_IGN.
14275         (at_fatal_signal): Call init_fatal_signals.
14276         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14277         SIG_IGN.
14278         Reported by Paul Eggert.
14279
14280 2004-12-18  Bruno Haible  <bruno@clisp.org>
14281
14282         * doc/alloca.texi: New file.
14283         * doc/alloca-opt.texi: New file.
14284
14285 2004-12-17  Jim Meyering  <jim@meyering.net>
14286
14287         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14288         Otherwise, install-sh could exit with improper exit status when
14289         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14290
14291 2004-12-16  Simon Josefsson  <jas@extundo.com>
14292
14293         * tests/test-base64.c: Add license.
14294
14295 2004-12-15  Stepan Kasal  <address@hidden>
14296
14297         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14298
14299 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14300
14301         * modules/getcwd (Files): Add m4/d-ino.m4.
14302         Suggested by Mark D. Baushke.
14303
14304 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14305
14306         * lib/getdate.y (textint): New member "negative".
14307         (time_zone_hhmm): New function.
14308         Expect 14 shift-reduce conflicts, not 13.
14309         (o_colon_minutes): New rule.
14310         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14311         (yylex): Set the "negative" member of signed numbers.
14312
14313 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14314
14315         * doc/getdate.texi (Time of day items, Time zone items):
14316         Describe new formats +00:00, UTC+00:00.
14317
14318 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14319
14320         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14321         spurious "-l"s.  Problem reported by Stepan Kasal.
14322
14323 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14324
14325         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14326         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14327
14328 2004-12-04  Simon Josefsson  <jas@extundo.com>
14329
14330         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14331         Vandoorselaere <yoann@prelude-ids.org>.
14332
14333 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14334
14335         Changes imported from coreutils.
14336         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14337         exist.
14338         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14339
14340 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14341
14342         Changes imported from coreutils.
14343         * lib/hard-locale.c: Assume <locale.h> exists.
14344         Include "strdup.h".
14345         (GLIBC_VERSION): New macro.
14346         (hard_locale): Assume setlocale exists.
14347         Rewrite to avoid #ifdef.
14348         Use strdup rather than malloc + strcpy.
14349         * lib/human.c: Assume <locale.h> exists.
14350         (human_readable): Assume localeconv exists.
14351
14352 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14353
14354         * modules/hard-locale (Depends-on): Add strdup.
14355
14356 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14357
14358         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14359         convert T2, not T.  (Imported from libc.)
14360
14361 2004-11-30  Simon Josefsson  <jas@extundo.com>
14362
14363         * modules/restrict (License): Change to LGPL.
14364
14365 2004-11-30  Simon Josefsson  <jas@extundo.com>
14366
14367         * m4/restrict.m4: Add copyright and copying conditions.
14368
14369 2004-11-30  Simon Josefsson  <jas@extundo.com>
14370
14371         * m4/base64.m4: New file.
14372
14373 2004-11-30  Simon Josefsson  <jas@extundo.com>
14374
14375         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14376         base64.
14377
14378         * tests/test-base64.c: New file.
14379
14380         * modules/base64: New file.
14381
14382 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14383
14384         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14385         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14386
14387         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14388
14389 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14390
14391         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14392         (__getcwd.c): Don't restore errno; glibc doesn't.
14393         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14394         first, falling back to our code only if its results look suspicious.
14395         Ensure that the resulting buffer is only as large as necessary.
14396
14397         * lib/readutmp.c: Include readutmp.h first.
14398         Include <errno.h>, since readutmp.h no longer does that.
14399         * lib/readutmp.h: Don't include <errno.h>,
14400         <sys/param.h>, <time.h>; not needed to establish interface.
14401         (errno): Remove decl.
14402         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14403         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14404         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14405
14406 2004-11-28  Simon Josefsson  <jas@extundo.com>
14407
14408         * lib/base64.h, base64.c: New file.
14409
14410 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14411
14412         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14413
14414 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14415
14416         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14417         (Depends-on): Remove pathmax, same.  Add mempcpy.
14418         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14419         (Makefile.am): Append getcwd.h to lib_SOURCES.
14420         (Include): Add getcwd.h.
14421         (Maintainer): Change from Jim Meyering to "all, glibc",
14422         since getdate now uses intended-for-glibc code.
14423         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14424         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14425
14426 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14427
14428         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14429         HP's ANSI C compiler.
14430         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14431         Declaring int functions causes warnings on some modern systems and
14432         shouldn't be needed to compile on ancient ones.
14433         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14434         defined.
14435
14436         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14437         with the following changes.
14438         (__set_errno): Parenthesize properly.
14439         Include <stdbool.h>.
14440         (MIN, MAX, MATCHING_INO): New macros.
14441         (__getcwd): Define with prototype, not K&R form.
14442         Use heuristics to allocate default buffer on stack if possible.
14443         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14444         behavior, and to avoid the PATH_MAX limit when computing
14445         ../../../../...
14446         Use MATCHING_INO to compare inode number to file.
14447         Check for arithmetic overflow in size calculations.
14448         Fix bug in reallocation of dot array that caused getcwd to fail
14449         on directories nested deeper than 75.
14450         Be more careful about saving errno on error.
14451         Do not use realloc; use only free+malloc, as this is a bit
14452         more flexible and avoids a needless copy operation.
14453         Do not inspect st_dev and st_ino for symbolic links; POSIX
14454         doesn't specify the latter.
14455         Check for closedir errors.
14456         Avoid needless casts.
14457         Use "#ifdef weak_alias" around weak_alias, to be like other
14458         glibc code.
14459         The following changes to getcwd.c have effect only when used in
14460         gnulib; they have no effect inside glibc proper.
14461         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14462         as alloca isn't used.
14463         (alloca, __alloca): Likewise.
14464         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14465         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14466         unconditionally, as gnulib assumes C89 or better.
14467         Do not include <sys/param.h>.
14468         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14469         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14470         better.
14471         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14472         Include <dirent.h> in a way that is compatible with modern Autoconf.
14473         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14474         New macros, if not already defined.
14475         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14476         Use "_LIBC", not "defined _LIBC", for consistency.
14477         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14478         a mempcpy module.
14479         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14480         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14481         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14482         credit only to Jim Meyering and adjust the copyright dates.
14483         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14484         <stdlib.h>, <unistd.h>, "pathmax.h".
14485         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14486         (INITIAL_BUFFER_SIZE): Remove.
14487         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14488
14489 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14490
14491         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14492         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14493         Use the _ONCE methods, for efficiency.
14494         Check for fcntl.h.  In test program, include <errno.h>
14495         and <fcntl.h> if available.  Remove old K&R cruft from
14496         test program.  Check for common errors in GNU/Linux,
14497         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14498         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14499         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14500         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14501         name accordingly.
14502         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14503         accommodate new getcwd.c.
14504         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
14505         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
14506         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
14507         that's all we need now.
14508
14509 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14510
14511         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
14512         argp-parse.c depends on getopt internals, that means we should
14513         always use our getopt, to be on the safe side.
14514         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
14515         order not to spoil the result of an eventual previous invocation
14516         of gl_GETOPT_SUBSTITUTE.
14517
14518 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14519
14520         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
14521         redefinition warnings. To avoid them, include the defines
14522         in `#if !defined __need_getopt ... #endif'. The only place
14523         where __getopt_argv_const is used is in definitions
14524         of getopt_long and getopt_long_only below, which are as well
14525         protected by `#ifndef __need_getopt'.
14526         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
14527         __need_getopt after including <stdio.h> and <unistd.h> These
14528         headers might have defined it.
14529
14530 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14531
14532         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
14533
14534 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
14535
14536         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
14537         (futimens): New function, which uses futimes if available.
14538         (futimens, utimens): Support timespec==NULL, with same semantics
14539         as utime and utimens.
14540         * lib/utimens.h (futimens): New decl.
14541
14542 2004-11-23  Jim Meyering  <jim@meyering.net>
14543
14544         * lib/getopt_.h: Remove trailing blanks.
14545
14546 2004-11-23  Jim Meyering  <jim@meyering.net>
14547
14548         * lib/__fpending.c: Add comment.
14549
14550 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
14551
14552         * modules/canonicalize (Depends-on): Add xreadlink.
14553         Problem reported by James Youngman.
14554
14555 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
14556
14557         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
14558         New macros.
14559         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
14560         optopt): Use them instead of invoking ## directly; otherwise, the
14561         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
14562
14563 2004-11-19  Bruno Haible  <bruno@clisp.org>
14564
14565         * lib/strtok_r.c: Move comments from here...
14566         * lib/strtok_r.h: ... to here.
14567
14568 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14569
14570         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
14571         implementations that mishandle size_t overflow.
14572
14573 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
14574
14575         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
14576         might fail.  Problem reported by Yoann Vandoorselaere.
14577         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
14578         implementations that mishandle size_t overflow.
14579
14580 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14581
14582         * modules/canon-host (Depends-on): Add strdup.
14583
14584 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14585
14586         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
14587
14588 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14589
14590         * lib/canon-host.c: Include "strdup.h".
14591         (canon_host): Use getaddrinfo if available, so that IPv6 works.
14592         Use strdup instead of malloc/strcpy to duplicate strings.
14593
14594         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
14595         (human_space_before_unit): New constant.
14596         * lib/human.c (human_readable): Support it.
14597
14598         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
14599         (xgetcwd): Set errno correctly when failing.
14600         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
14601         the failure is actually due to a PATH_MAX problem.
14602
14603         Further getopt changes to make it more likely that glibc will
14604         buy the changes back.
14605         * lib/getopt.c (POSIXLY_CORRECT): New constant.
14606         (getopt): Use it, so to preserve glibc semantic
14607         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
14608         when compiling for libc.
14609         * lib/getopt_.h (__getopt_argv_const): Bring it back.
14610         (getopt_long, getopt_long_only): Use it.
14611
14612         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14613         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
14614         (getopt): Argv is now char * const *, as per standard.
14615         (_getopt_internal_r, _getopt_internal): Argv is now char **,
14616         not char *__getopt_argv_const *.
14617         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14618         _getopt_long_only_r): Likewise.
14619         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
14620         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14621         _getopt_long_r, _getopt_long_only_r): Likewise.
14622         * lib/getopt_.h (__getopt_argv_const): Remove.
14623         (getopt): Argv is now char * const *, as per standard.
14624
14625         * lib/getdate.y (tORDINAL): New token.
14626         (day, relunit): Allow it for relative times.
14627         (relative_time_table): Use tORDINAL for ordinals.
14628
14629 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
14630
14631         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
14632         Document that "second" isn't allowed as an ordinal number.
14633
14634 2004-11-16  Jim Meyering  <jim@meyering.net>
14635
14636         * modules/closeout (Depends-on): Add fpending.
14637
14638 2004-11-15  Jim Meyering  <jim@meyering.net>
14639
14640         * lib/closeout.c: Include "__fpending.h" once again.
14641         Include <stdbool.h>.
14642         (close_stdout): Don't fail just because stdout was closed initially,
14643         since some programs don't write to stdout in the normal course of
14644         operation (other than --version and --help), and we don't want this
14645         function to make e.g. `touch file >&-' fail.
14646         But do fail if it was closed and someone has tried to write to it.
14647         E.g., `printf foo >&-' must fail.
14648
14649 2004-11-13  Jim Meyering  <jim@meyering.net>
14650
14651         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
14652
14653 2004-11-12  Simon Josefsson  <jas@extundo.com>
14654
14655         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
14656         small doc fix is still pending.
14657
14658 2004-11-11  Simon Josefsson  <jas@extundo.com>
14659
14660         * modules/strtok_r: New file.
14661
14662         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14663         strtok_r.
14664
14665 2004-11-11  Simon Josefsson  <jas@extundo.com>
14666
14667         * m4/strtok_r.m4: New file.
14668
14669         * m4/getopt.m4: Replace opterr.
14670
14671 2004-11-11  Simon Josefsson  <jas@extundo.com>
14672
14673         * lib/strtok_r.h, strtok_r.c: New file.
14674
14675 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14676
14677         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
14678         of replacing opterr, getopt, etc.  This should handle the
14679         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
14680
14681 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
14682
14683         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
14684         we can stop lying to compilers about the constness of argv when we
14685         are compiled outside glibc.
14686         (getopt, getopt_long, getopt_long_only): Use it.
14687         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
14688         _getopt_internal, getopt): Likewise.
14689         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
14690         _getopt_long_only_r): Likewise.
14691         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
14692         _getopt_long_r, _getopt_long_only_r): Likewise.
14693
14694         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
14695         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
14696         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
14697         the other external symbols.
14698         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
14699         declaration, since the above renaming now works around collisions.
14700
14701 2004-11-11  Jim Meyering  <jim@meyering.net>
14702
14703         * lib/linebreak.c: Remove trailing blanks.
14704         * lib/alloca_.h: Likewise.
14705         * lib/acosl.c: Likewise.
14706         * lib/euidaccess.c: Likewise.
14707         * lib/allocsa.h: Likewise.
14708
14709 2004-11-10  Simon Josefsson  <jas@extundo.com>
14710
14711         * m4/getaddrinfo.m4: New file.
14712
14713 2004-11-10  Simon Josefsson  <jas@extundo.com>
14714
14715         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
14716
14717 2004-11-10  Simon Josefsson  <jas@extundo.com>
14718
14719         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14720         getaddrinfo.
14721
14722         * modules/getaddrinfo: New file.
14723
14724 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14725
14726         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
14727
14728 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
14729
14730         * lib/mktime.c (SHR): New macro, which is a portable
14731         substitute for >> that should work even on Crays.
14732         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
14733         Problem reported by Mark D. Baushke in
14734         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
14735         * lib/getdate.y (SHR): Likewise.
14736         (tm_diff): Use it.
14737         * lib/strftime.c (SHR): Likewise.
14738         (tm_diff): Use it.
14739         * lib/quotearg.c (struct quoting_options): Use unsigned int for
14740         quote_these_too, so that right shifts are well defined.  All uses
14741         changed.
14742
14743 2004-11-10  Jim Meyering  <jim@meyering.net>
14744
14745         Ensure that no close failure goes unreported.
14746         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
14747         return early when it seems there's nothing to flush.
14748         Don't include __fpending.h.
14749
14750 2004-11-10  Jim Meyering  <jim@meyering.net>
14751
14752         * modules/closeout (Depends-on): Remove fpending.
14753
14754 2004-11-10  Jim Meyering  <jim@meyering.net>
14755
14756         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
14757
14758 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14759
14760         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
14761         gl_FUNC_STRFTIME.
14762         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
14763         and AC_REQUIRE when possible, to avoid duplicate checks.
14764         Check for <wchar.h>.
14765
14766 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
14767
14768         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
14769
14770 2004-11-09  Bruno Haible  <bruno@clisp.org>
14771
14772         * m4/sockpfaf.m4: New file.
14773
14774 2004-11-05  Bruno Haible  <bruno@clisp.org>
14775
14776         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
14777         Reported by Mark D. Baushke <mdb@cvshome.org>.
14778
14779 2004-11-04  Bruno Haible  <bruno@clisp.org>
14780
14781         2004-09-11  Bruno Haible  <bruno@clisp.org>
14782                 * allocsa.valgrind: New file.
14783         2004-02-06  Bruno Haible  <bruno@clisp.org>
14784                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
14785                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
14786                 Reported by Christopher Seip <chris.seip@hp.com>.
14787
14788 2004-11-04  Bruno Haible  <bruno@clisp.org>
14789
14790         * modules/allocsa (Files): Add lib/allocsa.valgrind.
14791         (Makefile.am): Distribute it.
14792
14793 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
14794
14795         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
14796         with errno == ERANGE if the buffer is too small.
14797         Problem reported by Mark D. Baushke.
14798
14799 2004-11-03  Albert Chin  <china@thewrittenword.com>
14800             Paul Eggert  <eggert@cs.ucla.edu>
14801
14802         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
14803         equivalent, substitute $ac_type for equivalent type rather than
14804         blindly using uint32_t *always* which won't work if uint32_t is not
14805         available.  Define _UINT32_T to work around typedef of uint32_t if
14806         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
14807         2.5.1.
14808
14809 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14810
14811         * m4/jm-macros.m4: Sync from coreutils.
14812         (gl_MACROS): Check for mbrlen, for pathchk.
14813         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
14814
14815 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14816
14817         * lib/xreadlink.c (MAXSIZE): New macro.
14818         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
14819         size does not exceed MAXSIZE.  Avoid cast.
14820         As suggested by Mark D. Baushke in
14821         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
14822         if readlink fails with buffer size just under MAXSIZE, try again
14823         with MAXSIZE.
14824
14825 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
14826
14827         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
14828
14829 2004-11-02  Derek R. Price  <derek@ximbiot.com>
14830         and  Paul Eggert  <eggert@cs.ucla.edu>
14831
14832         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
14833         (get_date): Overparenthesize to avoid GCC warning.
14834
14835 2004-11-02  Bruno Haible  <bruno@clisp.org>
14836
14837         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
14838         returns void.
14839
14840 2004-11-02  Bruno Haible  <bruno@clisp.org>
14841
14842         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
14843         function returns void.
14844
14845 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14846
14847         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
14848         fflush_unlocked, flockfile, funlockfile, funlockfile,
14849         fputs_unlocked, putc_unlocked.
14850
14851 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
14852
14853         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14854         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
14855         already declared.
14856
14857 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14858
14859         * modules/getdate (Files): Add doc/getdate.texi.
14860         (Depends-on): Add setenv, xalloc.
14861
14862 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14863
14864         * lib/getdate.y: Add support for TZ="foo" within a date string.
14865         Fix some bugs near time_t boundaries.  Reject dates with
14866         out-of-range components, e.g., "Sept 31".
14867         Include <stdlib.h>, "setenv.h", "xalloc.h".
14868         (ISDIGIT_LOCALE): Remove; unused.
14869         Note that the TZ and time functions used here are not reentrant.
14870         (mktime_ok, get_tz): New functions.
14871         (TZBUFSIZE): New constant.
14872         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
14873         This requires that we sometimes generate our own TZ="XXX..." setting.
14874
14875 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
14876
14877         * doc/getdate.texi: New file, from coreutils with modifications for
14878         the new TZ parsing.
14879
14880 2004-10-27  Derek R. Price  <derek@ximbiot.com>
14881
14882         * lib/mktime.c (not_equal_tm): Remove redundant check.
14883
14884 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14885
14886         * modules/regex (lib_SOURCES): Add regex.c.
14887         Reported by James Youngman in
14888         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
14889
14890 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
14891
14892         * lib/getdate.y: Use Bison 1.875 features, and some minor
14893         code cleanups.  This change does not affect semantics.
14894         Don't include <stdlib.h>; no longer needed.
14895         Don't include unlocked-io.h; only the "#if TEST" code uses
14896         stdio, and performance isn't crucial there.
14897         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
14898         Bison 1.875 features as described below.
14899         All uses of "PC." replaced by "pc->".
14900         (YYSTYPE): Add a forward declaration.
14901         (yylex, yyerror): Use full prototypes in forward decls.
14902         Use "%pure-parser" rather than obsolescent "%pure_parser".
14903         Use %parse-param and %lex-param instead of obsolescent
14904         YYPARSE_PARAM and YYLEX_PARAM.
14905         (meridian_table, month_and_day_table, time_units_table,
14906         relative_time_table, time_zone_table, military_table,
14907         lookup_zone, lookup_word, get_date):
14908         Use NULL instead of 0 where appropriate.
14909         (to_hour): Avoid abort (), to avoid a dependency on
14910         stdlib.h.
14911         (yyerror, yylex): Now accepts parser_control * arg.
14912         (main) [TEST]: Use '\0' rather than 0 for char.
14913
14914 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14915
14916         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
14917
14918 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
14919
14920         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
14921         It's now the caller's responsibility to handle the case where
14922         !HAVE_GETPAGESIZE && !defined getpagesize.
14923
14924         * lib/mktime.c (leapyear): Arg is long int, not int.
14925
14926 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
14927
14928         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
14929
14930 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
14931
14932         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
14933         missing.  Problem reported by James Youngman.
14934
14935 2004-10-16  Simon Josefsson  <jas@extundo.com>
14936
14937         * gnulib-tool: Fix comments.  Fix parse problem.
14938         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
14939
14940 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
14941
14942         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
14943         implementation of getopt_long.  Problem reported by Alexander Taler in:
14944         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
14945
14946 2004-10-15  Bruno Haible  <bruno@clisp.org>
14947
14948         * gnulib-tool: Untabify. Initialize supplied_libname.
14949         (func_usage): More homogenous output.
14950         (func_modules_transitive_closure, func_modules_to_filelist,
14951         func_emit_lib_Makefile_am): New functions.
14952         (func_import): New function, extracted from big case statement. Use
14953         func_get_license, func_modules_transitive_closure,
14954         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
14955         opt_lgpl. Don't use test -a, as it's not portable.
14956         (func_create_testdir): Use func_modules_transitive_closure,
14957         func_modules_to_filelist, func_emit_lib_Makefile_am.
14958
14959 2004-10-15  Bruno Haible  <bruno@clisp.org>
14960
14961         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
14962
14963 2004-10-15  Bruno Haible  <bruno@clisp.org>
14964
14965         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
14966         the portions belonging to each module.
14967         Suggested by Derek Robert Price <derek@ximbiot.com>.
14968
14969 2004-10-12  Simon Josefsson  <jas@extundo.com>
14970
14971         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
14972         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
14973         to real functions.
14974
14975 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14976
14977         * modules/vsnprintf: New file.
14978
14979 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14980
14981         * m4/vsnprintf.m4: New file.
14982
14983 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
14984
14985         * lib/vsnprintf.h: New file.
14986         * lib/vsnprintf.c: New file.
14987
14988 2004-10-11  Bruno Haible  <bruno@clisp.org>
14989
14990         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
14991         vsnprintf.
14992
14993 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
14994
14995         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
14996
14997 2004-10-07  Bruno Haible  <bruno@clisp.org>
14998
14999         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15000         fits into the provided buffer.
15001
15002 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15003
15004         * lib/diacrit.c, diacrit.h: Add GPL notice.
15005
15006         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15007         notice.
15008         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15009         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15010         This avoids a potential constant-folding bug.
15011
15012 2004-10-05  Bruno Haible  <bruno@clisp.org>
15013
15014         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15015         for the declaration of strsep.
15016
15017 2004-10-05  Bruno Haible  <bruno@clisp.org>
15018
15019         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15020
15021 2004-10-04  Simon Josefsson  <jas@extundo.com>
15022
15023         * modules/memmem: New file.
15024         * tests/test-memmem.c: New file.
15025         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15026
15027 2004-10-04  Simon Josefsson  <jas@extundo.com>
15028
15029         * m4/memmem.m4: New file.
15030
15031 2004-10-04  Simon Josefsson  <jas@extundo.com>
15032
15033         * lib/memmem.h: New file.
15034         * lib/memmem.c: New file, taken from glibc.
15035
15036 2004-10-04  Simon Josefsson  <jas@extundo.com>
15037
15038         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15039         '#ifdef USE_UNLOCKED_IO'.
15040
15041 2004-10-04  Simon Josefsson  <jas@extundo.com>
15042
15043         * config/srclist.txt: Add memmem from glibc.
15044
15045 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15046
15047         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15048
15049         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15050         modules/exclude, modules/getdate, modules/getline,
15051         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15052         modules/getusershell, modules/linebuffer, modules/md5,
15053         modules/mountlist, modules/posixtm, modules/readtokens,
15054         modules/readutmp, modules/regex, modules/sha1,
15055         modules/version-etc, modules/yesno:
15056         Remove dependency on unlocked-io.
15057
15058 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15059
15060         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15061
15062         * m4/unlocked-io.m4: Add copyright notice.
15063         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15064
15065 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15066
15067         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15068         * lib/xmalloc.c (xmemdup): Likewise.
15069         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15070         XFREE): Remove these long-obsolescent macros.
15071         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15072         * lib/xstrdup.c: Remove.
15073
15074         * lib/regex.c (re_comp): Cast gettext return value to char *,
15075         Problem reported by Martin Neitzel via Mark D. Baushke.
15076
15077 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15078
15079         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15080         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15081         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15082         regex.c, sha1.c, version-etc.c, yesno.c:
15083         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15084         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15085         the includer's responsibility.
15086
15087         Sync from coreutils.
15088
15089         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15090         points to the start of a string, as the C Standard says the
15091         resulting behavior is undefined.
15092
15093         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15094         simple -> simple_backups, numbered_existing ->
15095         numbered_existing_backups, numbered -> numbered_backups
15096         to avoid shadowing problems.  All uses changed.
15097         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15098         * lib/backupfile.c (check_extension, numbered_backup):
15099         Rename locals to avoid shadowing 'basename'.
15100         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15101         once.
15102
15103         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15104         * lib/.cvsignore: Add getopt.h.
15105
15106 2004-10-04  Bruno Haible  <bruno@clisp.org>
15107
15108         * modules/README: New file.
15109         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15110         not a module.
15111
15112 2004-10-02  Jim Meyering  <jim@meyering.net>
15113
15114         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15115
15116 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15117
15118         * modules/strsep: New file.
15119
15120 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15121
15122         * m4/strsep.m4: New file.
15123
15124 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15125
15126         * lib/strsep.h: New file.
15127         * lib/strsep.c: New file.
15128
15129 2004-10-01  Simon Josefsson  <jas@extundo.com>
15130
15131         * lib/snprintf.c (snprintf): Handle size==0.
15132
15133 2004-10-01  Simon Josefsson  <jas@extundo.com>
15134             Bruno Haible  <bruno@clisp.org>
15135
15136         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15137         (snprintf): Declare 'args'.
15138
15139 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15140
15141         * lib/snprintf.c: Remove comments as to why each header is needed.
15142
15143 2004-10-01  Bruno Haible  <bruno@clisp.org>
15144
15145         * MODULES.html.sh: Add strsep.
15146
15147 2004-09-30  Simon Josefsson  <jas@extundo.com>
15148
15149         * modules/snprintf: New file.
15150
15151 2004-09-30  Simon Josefsson  <jas@extundo.com>
15152
15153         * m4/snprintf.m4: New file.
15154
15155 2004-09-30  Simon Josefsson  <jas@extundo.com>
15156
15157         * lib/snprintf.h, lib/snprintf.c: New files.
15158
15159 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15160
15161         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15162         (hol_entry_help): Never translate an empty string.
15163         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15164         * lib/argp.h (OPTION_NO_TRANS): New option.
15165
15166 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15167
15168         * modules/argp (Maintainer): Replace Simon Josefsson
15169         by Sergey Poznyakoff.
15170
15171 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15172
15173         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15174         changes merged back into glibc.
15175
15176 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15177
15178         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15179
15180 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15181
15182         * lib/xvasprintf.c: Include xalloc.h.
15183         (xvasprintf): Use xalloc_die, not xmalloc_die.
15184
15185 2004-09-29  Bruno Haible  <bruno@clisp.org>
15186
15187         * modules/alloca-opt: New file, derived from modules/alloca.
15188         * modules/allocsa: Depend on alloca-opt instead of alloca.
15189         * modules/setenv: Likewise.
15190         * modules/vasnprintf: Likewise.
15191         * MODULES.html.sh: Add alloca-opt.
15192
15193 2004-09-28  Simon Josefsson  <jas@extundo.com>
15194
15195         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15196         LGPL, and to replace license template from GPL to LGPL.
15197
15198 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15199
15200         * modules/dummy: Change license to LGPL.
15201
15202 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15203
15204         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15205
15206 2004-09-24  Simon Josefsson  <jas@extundo.com>
15207
15208         * modules/minmax (License): Change from GPL to LGPL.
15209
15210 2004-09-23  Simon Josefsson  <jas@extundo.com>
15211
15212         * gnulib-tool (--import): Typo.
15213
15214 2004-09-23  Simon Josefsson  <jas@extundo.com>
15215
15216         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15217
15218 2004-09-22  Bruno Haible  <bruno@clisp.org>
15219
15220         * modules/*: Add 'License' field.
15221         * gnulib-tool: Accept --extract-license option.
15222         (func_get_license): New function.
15223
15224 2004-09-21  Bruno Haible  <bruno@clisp.org>
15225
15226         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15227         Reported by Simon Josefsson.
15228
15229 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15230
15231         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15232         gl_AC_TYPE_LONG_LONG.
15233
15234 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15235
15236         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15237
15238 2004-09-18  Simon Josefsson  <jas@extundo.com>
15239         and  Paul Eggert  <eggert@cs.ucla.edu>
15240
15241         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15242         calls with autoreconf.  Define GL_LIB.
15243
15244 2004-09-14  Karl Berry  <karl@gnu.org>
15245
15246         * config/srclist.txt: unsync setenv.c, sigh.
15247
15248 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15249
15250         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15251         Problem reported by Bruno Haible in:
15252         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15253
15254 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15255
15256         * config/srclist.txt: Comment out argp-pvh.c.
15257
15258 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15259
15260         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15261         in case some system header has #define'd it.  Problem reported by
15262         Soeren D. Schulze in
15263         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15264
15265 2004-09-09  Karl Berry  <karl@gnu.org>
15266
15267         * regex.[ch]: delete from the root.  These were supposed to be
15268                 synced with emacs cvs, but this has not happened for about
15269                 a year, and anyway nothing else uses emacs regex.[ch].
15270                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15271                 lib/regex[.ch] is untouched.
15272
15273 2004-09-09  Bruno Haible  <bruno@clisp.org>
15274
15275         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15276
15277 2004-09-09  Bruno Haible  <bruno@clisp.org>
15278
15279         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15280         modifications.
15281         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15282
15283 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15284
15285         * modules/xvasprintf: New file.
15286         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15287
15288 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15289
15290         * lib/xvasprintf.h: New file.
15291         * lib/xvasprintf.c: New file.
15292         * lib/xasprintf.c: New file.
15293
15294 2004-09-08  Bruno Haible  <bruno@clisp.org>
15295
15296         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15297
15298 2004-09-08  Bruno Haible  <bruno@clisp.org>
15299
15300         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15301         length is > INT_MAX.
15302         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15303         more.
15304
15305 2004-09-08  Bruno Haible  <bruno@clisp.org>
15306
15307         * lib/stdint_.h: New file, taken from GNU clisp.
15308
15309 2004-09-08  Bruno Haible  <bruno@clisp.org>
15310             Oskar Liljeblad  <oskar@osk.mine.nu>
15311
15312         * modules/stdint: New file.
15313         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15314
15315 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15316
15317         Import from coreutils.
15318         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15319         strings on unbounded length.  alloca's performance benefits aren't
15320         that important here.
15321         (V_STRDUP): Remove.
15322         (parse_with_separator): New function, with most of the internals
15323         of the old parse_user_spec.  Allow user to omit both user and group,
15324         for compatibility with FreeBSD.
15325         Clone only the user name, not the entire spec.
15326         Do not set *uid, *gid unless entirely successful.
15327         Avoid memory leak in some failing cases.
15328         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15329         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15330         (parse_user_spec): Rewrite to use parse_with_separator.
15331
15332 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15333
15334         * modules/userspec: Don't depend on alloca.
15335
15336 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15337
15338         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15339
15340 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15341
15342         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15343         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15344         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15345
15346 2004-08-16  Simon Josefsson  <jas@extundo.com>
15347
15348         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15349         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15350         Add --dry-run for --import.
15351         Let user provided command line parameters override configure.ac
15352         settings.
15353
15354 2004-08-12  Simon Josefsson  <jas@extundo.com>
15355
15356         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15357         as discussed with Paul Eggert in threads rooted at
15358         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15359         and
15360         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15361         Before, the test was empty, and relied on ELIDE_CODE in source
15362         code.)
15363         (gl_PREREQ_GETOPT): New macro.
15364         (gl_GETOPT): Use them.
15365
15366 2004-08-12  Simon Josefsson  <jas@extundo.com>
15367
15368         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15369         * lib/getopt_.h: Renamed from getopt.h.
15370
15371 2004-08-12  Simon Josefsson  <jas@extundo.com>
15372
15373         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15374         Change default library name from libfoo to libgnu.
15375         Now, if you have a configure.ac that says:
15376                 gl_SOURCE_BASE(gl)
15377                 gl_M4_BASE(gl/m4)
15378                 gl_MODULES(error getopt etcetera)
15379                 gl_INIT
15380         you can import all you need by running:
15381                 ../gnulib/gnulib-tool --import
15382
15383         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15384         (Makefile.am): Rewrite, use logic from argz.
15385         (Include): Use <getopt.h> instead of "getopt.h".
15386
15387 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15388
15389         * modules/argp (Files): Add m4/unlocked-io.m4.
15390         (Depends-on): Add extensions.
15391
15392 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15393
15394         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15395         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15396         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15397         Check for program_invocation_name, program_invocation_short_name,
15398         flockfile, funlockfile, features.h, _getopt_long_only_r.
15399
15400 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15401
15402         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15403         its complicated substitute.
15404         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15405         and program_invocation_name.
15406         (__argp_basename) [!_LIBC]: Remove; the only use was
15407         replaced by its body.
15408         (__argp_short_program_name): Change condition from
15409         !defined __argp_short_program_name to
15410         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15411         to match argp-namefrob.h.
15412         (__argp_failure): Don't assume strerror_r returns char *.
15413         * lib/argp-parse.c (N_): Define unconditionally.
15414         (argp_default_options): Fill out initializers with 0 to avoid
15415         gcc warnings.
15416
15417 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15418
15419         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15420         getopt1.c.
15421
15422 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15423
15424         Merge from coreutils.
15425
15426         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15427
15428         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15429         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15430
15431 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15432
15433         Merge from coreutils.
15434
15435         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15436         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15437         for Reliant Unix 5.43.
15438
15439         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15440         (union fooround): Use uintmax_t, not long int.
15441         The rest is a merge from libc:
15442         [defined _LIBC]: Include <shlib-compat.h>.
15443         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15444
15445         * lib/settime.c (settime): Recode to avoid warning with
15446         Sun Forte C 6U2.
15447
15448         * lib/strverscmp.c: Convert to UTF-8.
15449
15450 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15451
15452         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15453         m4/uintmax_t.m4.
15454
15455 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15456
15457         * modules/xalloc-die: New file.
15458         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15459
15460         * modules/md5 (Files): Add m4/uint32_t.m4.
15461         * modules/sha1: Renamed from modules/sha.
15462         (Files):
15463         Rename lib/sha.h to lib/sha1.h.
15464         Rename lib/sha.c to lib/sha1.c.
15465         Rename m4/sha.m4 to m4/sha1.m4.
15466         (lib_SOURCES): Likewise.
15467         (configure.ac): Rename gl_SHA to gl_SHA1.
15468         (Include): sha.h -> sha1.h.
15469
15470 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15471
15472         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15473         * m4/sha1.m4: Renamed from sha.m4.
15474         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15475
15476 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15477
15478         * lib/obstack.h (obstack_empty_p):
15479         Don't assume that chunk->contents is suitably aligned.
15480         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15481         Likewise. Problem reported by Benno in
15482         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15483
15484         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15485         readable.  This could be improved further but it'd take some work.
15486
15487 2004-08-08  Simon Josefsson  <jas@extundo.com>
15488
15489         * modules/xgethostname (Depends-on): Remove exit and error (not
15490         used).
15491
15492         * modules/getpass-gnu: Add getpass.h.
15493         (Depends-on): Add stdbool.
15494         * modules/getpass: Add getpass.h.
15495
15496 2004-08-08  Simon Josefsson  <jas@extundo.com>
15497
15498         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15499         Check getpass declaration.
15500
15501 2004-08-08  Simon Josefsson  <jas@extundo.com>
15502
15503         * lib/xgethostname.c: Don't include error.h (not used).
15504
15505         * lib/getpass.h: Add.
15506         * lib/getpass.c: Include getpass.h first.
15507
15508 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
15509
15510         * lib/xalloc-die.c: New file.
15511         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
15512         All uses removed.
15513         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
15514         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
15515         xalloc-die.c.
15516         (_, N_, xalloc_die): Move to xalloc-die.c.
15517         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
15518         so that we needn't mess with xalloc_msg_memory_exhausted.
15519
15520         * lib/sha1.h: Renamed from sha.h.
15521         (SHA1_H): Renamed from _SHA_H.
15522         (sha1_ctx): Renamed from sha_ctx.
15523         (sha1_init_ctx): Renamed from sha_init_ctx.
15524         (sha1_process_block): Renamed from sha_process_block.
15525         (sha1_process_bytes): Renamed from sha_process_bytes.
15526         (sha1_finish_ctx): Renamed from sha_finish_ctx.
15527         (sha1_read_ctx): Renamed from sha_read_ctx.
15528         (sha1_stream): Renamed from sha_stream.
15529         (sha1_buffer): Renamed from sha_buffer.
15530         * lib/sha1.c: Likewise; renamed from sha.c.
15531         Do not include <sys/types.h>.
15532         Include <stddef.h> rather than <stdlib.h>.
15533
15534 2004-08-08  Bruno Haible  <bruno@clisp.org>
15535
15536         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
15537         FILESYSTEM_PREFIX_LEN.
15538         * lib/progreloc.c: Likewise.
15539         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
15540
15541 2004-08-06  Simon Josefsson  <jas@extundo.com>
15542
15543         * modules/progname (Depends-on): Don't depend on stdbool.
15544
15545 2004-08-06  Simon Josefsson  <jas@extundo.com>
15546
15547         * modules/getsubopt: New file.
15548         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15549         getsubopt.
15550
15551 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15552
15553         More merge from coreutils.
15554
15555         * m4/utimens.m4, m4/utimecmp.m4: New files.
15556         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
15557         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
15558         prereq.m4, sha.m4: Import changes from coreutils.
15559
15560 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15561
15562         More merge from coreutils.
15563         * modules/raise, modules/readtokens0, modules/utimens:
15564         * modules/utimecmp, module/xnanosleep: New files.
15565         * modules/strftime: Add lib/strftime.h.
15566         Change include from <time.h> to "strftime.h".
15567         * modules/yesno: Add lib/yesno.h.
15568         * modules/backupfile: Remove lib/addext.c.
15569         * modules/euidaccess: Add stat-macros.h.
15570         * modules/canonicalize, modules/euidaccess,
15571         modules/filemode, modules/lchown, modules/makepath,
15572         modules/rmdir, modules/stat: Likewise.
15573
15574 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
15575
15576         Merge from tar.
15577         * lib/argp-help.c (make_hol, hol_append): Don't assume that
15578         SIZE_MAX is a valid preprocessor constant.
15579         (__argp_basename): Change from "#ifndef _LIBC"
15580         to "#ifndef __argp_short_program_name", so that
15581         we don't compile these functions for tar.
15582
15583         More merges from coreutils.
15584         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
15585         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
15586         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
15587         * lib/addext.c: Remove; no longer needed.
15588         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
15589         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
15590         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
15591         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
15592         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
15593         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
15594         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
15595         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
15596         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
15597         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15598         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
15599         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
15600         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
15601         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
15602         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
15603         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
15604         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
15605         Import changes from coreutils.
15606
15607 2004-08-05  Simon Josefsson  <jas@extundo.com>
15608
15609         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
15610
15611 2004-08-05  Simon Josefsson  <jas@extundo.com>
15612
15613         * m4/getsubopt.m4: New file.
15614
15615 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15616
15617         Merge from coreutils.
15618
15619         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
15620         * m4/getcwd-path-max.m4: New files.
15621
15622         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
15623         FILESYSTEM_PREFIX_LEN ->
15624         FILE_SYSTEM_PREFIX_LEN.
15625         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
15626         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
15627         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
15628         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
15629
15630         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
15631         prerequisite modules now handle the DOS stuff.
15632         Don't check for unistd.h.
15633
15634 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15635
15636         Merge from coreutils.
15637
15638         * lib/.gdb-history: Remove; this doesn't belong here.
15639
15640         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
15641         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
15642         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
15643         * lib/getcwd.c: New files.
15644
15645         * lib/dirname.h: Include <stdbool.h>.
15646         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
15647         for consistency with POSIX terminology.  All uses changed.
15648         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
15649         (strip_trailing_slashes): Use bool for booleans.
15650         * lib/stripslash.c (strip_trailing_slashes): Likewise.
15651
15652         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
15653         sometimes returns a positive errno value even when it succeeds.
15654         (print_errno_message) [!LIBC]: Fall back on strerror if
15655         __strerror_r fails.
15656
15657         * lib/path-concat.c (mempcpy): Don't define if a system header defines
15658         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
15659         (longest_relative_suffix): New function.
15660         (path_concat): Use it.  Assume first argument is not NULL.
15661         Port to DOS.  Omit redundant separators.
15662         Report an error instead of returning NULL.
15663         Use mempcpy instead of memcpy.
15664         (xpath_concat): Remove: not declared or used.
15665
15666         * lib/same.h: Include <stdbool.h>
15667         (same_name): Return bool, not int.
15668         * lib/same.c (same_name): Likewise.
15669         (errno): Don't declare; we assume C89 or better now.
15670
15671         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
15672         if not already defined.
15673
15674         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
15675         * lib/dup-safer.c (errno): Likewise.
15676
15677 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
15678
15679         Merge from coreutils.
15680         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
15681         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
15682         * modules/path-concat: Don't depend on strdup.
15683
15684 2004-08-03  Simon Josefsson  <jas@extundo.com>
15685
15686         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
15687         * lib/progname.h: Don't include stdbool.h.
15688
15689 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15690
15691         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
15692         * MODULES.html.sh (func_all_modules): Remove fatal.
15693
15694 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15695
15696         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
15697
15698 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
15699
15700         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
15701         working.
15702
15703 2004-08-02  Simon Josefsson  <jas@extundo.com>
15704
15705         * lib/getsubopt.h: New file, with comments from Bruno Haible.
15706         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
15707         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
15708
15709 2004-08-01  Simon Josefsson  <jas@extundo.com>
15710
15711         * lib/xgetdomainname.c: Include stdlib.h, for free().
15712
15713 2004-07-19  Bruno Haible  <bruno@clisp.org>
15714
15715         * MODULES.html.sh (func_all_modules): Add dummy.
15716
15717 2004-07-16  Simon Josefsson  <jas@extundo.com>
15718
15719         * modules/dummy: New file.
15720
15721 2004-07-16  Simon Josefsson  <jas@extundo.com>
15722
15723         * lib/dummy.c: New file.
15724
15725 2004-07-16  Bruno Haible  <bruno@clisp.org>
15726
15727         * lib/backupfile.h: Add extern "C" for C++.
15728         * lib/closeout.h: Likewise.
15729         * lib/copy-file.h: Likewise.
15730         * lib/findprog.h: Likewise.
15731         * lib/full-write.h: Likewise.
15732         * lib/pathname.h: Likewise.
15733         * lib/progname.h: Likewise.
15734         * lib/stpcpy.h: Likewise.
15735         * lib/stpncpy.h: Likewise.
15736         * lib/strcase.h: Likewise.
15737         * lib/strstr.h: Likewise.
15738         * lib/xalloc.h: Likewise.
15739
15740         * lib/mbswidth.h: Add extern "C" for C++.
15741         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
15742
15743 2004-07-13  Robert Millan  <robertmh@gnu.org>
15744
15745         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
15746
15747 2004-07-09  Simon Josefsson  <jas@extundo.com>
15748
15749         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
15750         failed without this.)
15751
15752 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15753
15754         * modules/chown (Files): Add lib/fchown-stub.c, since
15755         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
15756
15757 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
15758
15759         * lib/fchown-stub.c: New file.
15760
15761 2004-06-24  Jim Meyering  <jim@meyering.net>
15762
15763         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
15764
15765 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15766
15767         * modules/argz: Omit "#include".
15768
15769         * MODULES.html.sh (func_all_modules): Add calloc, to match
15770         2004-06-01 addition of calloc module.
15771
15772 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15773
15774         * m4/argz.m4: New file, which is autoupdated from libtool.
15775
15776 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15777
15778         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
15779         libtool.
15780
15781 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15782
15783         * config/srclist-update: Don't insist on "USA." before the
15784         close-comment, as libtool omits the period and puts the */ on a
15785         separate line.
15786         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
15787         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
15788
15789 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
15790
15791         * modules/argz: New file.
15792         * MODULES.html.sh (func_all_modules): Add argz.
15793
15794 2004-06-12  Jim Meyering  <jim@meyering.net>
15795         and  Paul Eggert  <eggert@cs.ucla.edu>
15796
15797         * modules/hash (Files): Add lib/xalloc.h.
15798         * modules/pipe (Depends-on): Add wait-process.
15799         * modules/stat (Depends-on): Add xalloc.
15800         * modules/userspec (Files): Add lib/userspec.h.
15801         * modules/xstrto
15802
15803         Upgrade from gettext-0.13.
15804         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
15805         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
15806         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
15807
15808 2004-06-10  Jim Meyering  <jim@meyering.net>
15809
15810         * lib/calloc.c: New file.
15811
15812 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
15813
15814         * lib/getdate.y (yylex): Allow space between sign and number.
15815         Problem reported by Dan Jacobson.
15816
15817 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15818
15819         Merge from coreutils CVS.
15820
15821         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
15822         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
15823         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
15824         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
15825         xstrtol.m4: Fix copyright date and/or serial number.
15826
15827         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
15828         See if we need an fchown replacement.
15829         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
15830         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
15831         and use the replacement function if we detect either defect.
15832
15833         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
15834         gl_UTIMECMP.
15835
15836 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
15837         and  Jim Meyering  <jim@meyering.net>
15838
15839         Merge from coreutils CVS.
15840
15841         * lib/stat-macros.h: New file, with contents from file-type.h
15842         and coreutils' system.h.
15843         * lib/file-type.c: Include "stat-macros.h".
15844         * lib/file-type.h (file_type): Move all macro definitions to new file,
15845         stat-macros.h.
15846
15847         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
15848         Wrap old code with this conditional.
15849         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
15850         function that does not dereference symlinks.
15851         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
15852
15853         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
15854         dependency problems.
15855         (xreadlink): Accept new arg SIZE, for efficiency.
15856         All decls and uses changed.
15857         * lib/xreadlink.h: Include <stddef.h>, for size_t.
15858
15859         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
15860         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
15861
15862         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
15863         sysexits.h.
15864
15865 2004-06-01  Jim Meyering  <jim@meyering.net>
15866
15867         * m4/calloc.m4: New file.
15868
15869 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
15870
15871         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
15872         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
15873         Also, fix a typo in a diagnostic.
15874
15875 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15876
15877         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
15878         or AC_FUNC_REALLOC.
15879
15880 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
15881
15882         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
15883         macros to be defined.
15884         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
15885         the allocator returns NULL because the requested size is zero.
15886
15887 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15888
15889         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
15890         var.  Add comment explaining why libc still defines it.  This
15891         merges the following patch from glibc:
15892         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
15893
15894 2004-05-20  Andreas Schwab  <schwab@suse.de>
15895
15896         * m4/free.m4: Replace free if it not known to work, not the other
15897         way round.
15898
15899 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15900
15901         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
15902         present in glibc since revision 1.1 of this file.
15903         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
15904         obstack_alignment_mask, obstack_alloc, obstack_base,
15905         obstack_blank, obstack_blank_fast, obstack_chunk_size,
15906         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
15907         obstack_grow0, obstack_init, obstack_int_grow,
15908         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
15909         obstack_next_free, obstack_object_size, obstack_ptr_grow,
15910         obstack_ptr_grow_fast, obstack_room): Remove declarations of
15911         nonexistent functions.
15912
15913 2004-05-18  Karl Berry  <karl@gnu.org>
15914
15915         * config/srclist.txt: break link for vasnprintf.c.
15916
15917 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15918
15919         Port obstack to the AS/400, where pointers are 16 bytes wide and
15920         you cannot cast an integer to a valid pointer.  This patch is
15921         currently waiting to be integrated into glibc; see
15922         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
15923
15924         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
15925         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
15926         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
15927         (struct obstack): temp member is now a union of a pointer and
15928         an integer, instead of an integer.  All integer uses changed.
15929         This does not affect the physical layout of struct obstack,
15930         except on hosts (like the AS/400) where the size or alignment of
15931         void * is greater than that of ptrdiff_t.
15932         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
15933         __STDC__)]: Store temporary in pointer member of union, not
15934         integer member.
15935         * lib/obstack.c: Include <stddef.h>, for offsetof.
15936         (struct fooalign): Remove; it doesn't need a name.
15937         (union fooround): Change double to long double, and add void *.
15938         (DEFAULT_ALIGNMENT): Use offsetof to compute.
15939         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
15940         not a macro.  Hence the values are always int; so remove all
15941         casts-to-int in uses.
15942
15943 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
15944
15945         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
15946         we can get this patch merged into glibc.
15947
15948 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15949             Paul Eggert  <eggert@cs.ucla.edu>
15950
15951         * m4/argp: Depend on alloca.
15952
15953 2004-05-17  Derek R. Price  <derek@ximbiot.com>
15954             Paul Eggert  <eggert@cs.ucla.edu>
15955
15956         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
15957         freecoding.
15958
15959 2004-05-17  Bruno Haible  <bruno@clisp.org>
15960
15961         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
15962         precision that consists of a '.' followed by an empty digit string.
15963         Patch by Tor Lillqvist <tml@iki.fi>.
15964
15965 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15966
15967         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
15968         for backward compatibility with older code.  We need our own
15969         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
15970         it under some other name, and our alloca.h will define it.
15971
15972 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
15973             Derek Price  <derek@ximbiot.com>
15974
15975         * lib/alloca.c: Include <alloca.h>, to get our interface.
15976         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
15977         include <alloca.h> first.  Use C89 prototype for alloca; this
15978         requires including <stddef.h> for size_t.  Use extern "C" if C++.
15979         Use #elif for simplicity, since we can assume C89 now.
15980         Don't try to source the system alloca.h since it will not be found
15981         and to prevent recursively including its replacement.
15982         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
15983         * lib/regex.c: Likewise.
15984
15985 2004-05-16  Derek Price  <derek@ximbiot.com>
15986             Paul Eggert  <eggert@cs.ucla.edu>
15987
15988         getline cleanup.  This changes the getndelim2 API: both order of
15989         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
15990         no delimiter).
15991
15992         * lib/getline.c: Don't include stddef.h or stdio.h, since our
15993         interface does that.
15994         (getline): Always use getdelim, so that we don't have two
15995         copies of this code.
15996         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
15997         if available.
15998         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
15999         (GETNDELIM2_MAXIMUM): New macro.
16000         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16001         instead of the old practice of delim2==0.  All callers changed.
16002         Return -1 on overflow, instead of returning junk.
16003         Do not set *linesize unless allocation succeeds.
16004         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16005         that we include sys/types.h.
16006         * lib/getnline.h: Likewise.
16007         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16008         (getndelim2): Reorder arguments.
16009         * lib/getnline.c (getnline, getndelim):
16010         Don't discard the NMAX argument.
16011         (getnline): Invoke getndelim, to avoid code duplication.
16012         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16013         of (size_t) -1 by callers of the getnline family.
16014
16015 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16016
16017         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16018         Check for gettimeofday.
16019         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16020         Check for settimeofday, stime.
16021
16022 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16023
16024         * lib/nanosleep.c (suspended): Change its type from int to
16025         sig_atomic_t volatile.
16026         (first_call): Make it private to rpl_nanosleep, and have it
16027         be zero initially as that's a bit faster.
16028         (my_usleep): Round up fractional times instead of truncating them,
16029         as this is the usual meaning for 'sleep'.
16030
16031         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16032         doesn't work.
16033         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16034         (ENOSYS): Define if not defined.
16035         (settime): Fall back on stime if it exists and settimeofday fails.
16036         But don't bother with fallbacks if a method fails with errno == EPERM.
16037
16038 2004-05-11  Jim Meyering  <jim@meyering.net>
16039
16040         Prior to this change, the save_cwd caller required read access to the
16041         current directory on most systems (ones with the fchdir function).
16042
16043         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16044         fails, try write-only, and finally, resort to using xgetcwd.
16045
16046 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16047
16048         * lib/obstack.c, obstack.h: Import changes from libc.
16049
16050 2004-04-28  Bruno Haible  <bruno@clisp.org>
16051
16052         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16053         also implicitly appends .exe to executables.
16054         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16055         accepts Windows pathnames.
16056         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16057         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16058         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16059         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16060         Reported by Derek Robert Price <derek@ximbiot.com>.
16061
16062 2004-04-21  Karl Berry  <karl@gnu.org>
16063
16064         * config/srclist.txt (localcharset.c): break sync.
16065
16066 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16067
16068         * m4/host-os.m4: Add a copyright notice.
16069
16070 2004-04-20  Jim Meyering  <jim@meyering.net>
16071
16072         Change UTILS_ to gl_ in AC_DEFINE'd names.
16073         Change utils_- and jm_-prefixed variables, too.
16074         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16075         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16076         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16077
16078         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16079         Don't emit trailing blanks.
16080         Also rename jm_-prefixed variables to have gl_ prefix.
16081
16082         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16083         Also rename jm_-prefixed variables to have gl_ prefix.
16084
16085         * m4/jm-macros.m4: Reflect the renamings.
16086         * m4/prereq.m4: Likewise.
16087
16088 2004-04-20  Jim Meyering  <jim@meyering.net>
16089
16090         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16091         memory.
16092
16093 2004-04-20  Jim Meyering  <jim@meyering.net>
16094             Bruno Haible  <bruno@clisp.org>
16095
16096         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16097         memory when realloc fails.
16098
16099 2004-04-19  Jim Meyering  <jim@meyering.net>
16100
16101         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16102         now that readutmp.c may call `free (0)'.
16103
16104 2004-04-19  Bruno Haible  <bruno@clisp.org>
16105
16106         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16107         * m4/inttypes_h.m4: Likewise.
16108         * m4/stdint_h.m4: Likewise.
16109         * m4/intmax_t.m4: Likewise.
16110         * m4/uintmax_t.m4: Likewise.
16111
16112 2004-04-18  Jim Meyering  <jim@meyering.net>
16113
16114         * m4/prereq.m4: Don't forbid jm_ prefix.
16115
16116         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16117         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16118         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16119         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16120         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16121         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16122         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16123         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16124         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16125         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16126         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16127         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16128         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16129         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16130         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16131         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16132         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16133         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16134         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16135
16136 2004-04-18  Jim Meyering  <jim@meyering.net>
16137
16138         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16139         failure, don't leak memory and do call END_UTMP_ENT.
16140
16141 2004-04-16  Jim Meyering  <jim@meyering.net>
16142
16143         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16144         coreutils' stat program.
16145         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16146
16147 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16148
16149         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16150         C89.
16151         (CHAR_BIT): Remove, since we assume C89.
16152         Include <stdint.h> if available, as per current Autoconf CVS advice.
16153
16154 2004-03-31  Jim Meyering  <jim@meyering.net>
16155
16156         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16157         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16158         * m4/xalloc.m4: Likewise.
16159
16160 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16161
16162         Merge from coreutils.
16163
16164         * m4/inttostr.m4: New file.
16165         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16166         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16167         Require gl_CLOCK_TIME.
16168         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16169
16170 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16171
16172         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16173         not bool, to be more consistent with Unix conventions.
16174         Suggested by Bruno Haible.
16175
16176         Merge from coreutils.
16177
16178         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16179         * lib/umaxtostr.c: New files.
16180
16181         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16182         the usual <time.h> dance.
16183         (get_date): Change signature to support fractional time stamps.
16184         All callers changed.
16185         * lib/getdate.y: Include "getdate.h" first, as we can now
16186         assume C89 and don't need to worry about 'const'.
16187         Similarly, include "unlocked-io.h" near start, not in middle.
16188         Include <limits.h>.
16189         (textint.value): Use long int rather than int.
16190         (textint.digits): Use size_t rather than int.
16191         (BILLION, LOG10_BILLION): New constants.
16192         (parser_control): New member rel_ns.  Members day_ordinal,
16193         time_zone, month, day, hour, minutes, rel_year, rel_month,
16194         rel_day, rel_hour, rel_minutes, rel_seconds
16195         are now long int, not int.  Member seconds is now struct timespec,
16196         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16197         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16198         not int.
16199         (%union.intval): Now long int, not int.
16200         New member timespec.
16201         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16202         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16203         (spec): Now is a timespec or an item list.
16204         (timespec, items): New nonterminals.
16205         (time, rel, relunit, number, get_date):
16206         Add support for fractional seconds.
16207         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16208         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16209         (to_hour): First arg is now long int, not int.
16210         (to_year): Returns long int, not int.
16211         Don't treat year -70 like 70.
16212         (tm_diff): Returns long int, not int.
16213         (lookup_word): Use bool instead of int when appropriate.
16214         (yylex): Use size_t for count, not int.
16215         Detect overflow when parsing large integer constants.
16216         Add support for fractions.
16217         (get_date): Make pointers 'const' if possible.
16218         Use more-portable code to detect integer overflow.
16219         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16220         Don't use ctime; it's not reliable if the year has >4 digits.
16221
16222         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16223         This is for compatibility with BSD.
16224
16225         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16226         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16227         From coreutils' system.h.
16228
16229         * lib/userspec.c: Don't include "posixver.h".
16230         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16231         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16232         compatible extension.  Simplify code by removing a boolean int
16233         that was always nonzero if a string was nonnull.
16234
16235 2004-03-30  Jim Meyering  <jim@meyering.net>
16236
16237         Merge from coreutils.
16238
16239         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16240         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16241         on some systems one must include <grp.h> before it.
16242         Reported by Christian Krackowizer.
16243
16244 2004-03-30  Jim Meyering  <jim@meyering.net>
16245
16246         Merge from coreutils.
16247
16248         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16249
16250         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16251         an empty input stream.
16252
16253         * lib/readtokens.c: Include <stdbool.h>.
16254         (readtoken): Use `size_t' rather than int/long.
16255         All callers adjusted.
16256         Use `bool' rather than `int' where appropriate.
16257         Use memset rather than an explicit loop.
16258         Use x2nrealloc rather than xrealloc.
16259         Allow the use of `\0' as a delimiter.
16260         (readtokens): Likewise.
16261         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16262
16263 2004-03-30  Jim Meyering  <jim@meyering.net>
16264
16265         * m4/realloc.m4: Remove file, since now it does no more than
16266         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16267         the `configure.ac' section of module/realloc.
16268         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16269
16270 2004-03-30  Bruno Haible  <bruno@clisp.org>
16271
16272         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16273         nonnull.
16274
16275 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16276
16277         Merge changes to getloadavg.c from coreutils and Emacs.
16278
16279         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16280         Define to an expression, not to the empty string.
16281         Include cloexec.h and xalloc.h.
16282         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16283         Use set_cloexec_flag rather than rolling our own.
16284         * lib/cloexec.c, lib/cloexec.h: New files.
16285
16286 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16287
16288         * m4/cloexec.m4: New file.
16289
16290 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16291
16292         * lib/getopt.h: Sync with libc CVS.
16293
16294 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16295             Bruno Haible  <bruno@clisp.org>
16296
16297         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16298         mbswidth.
16299
16300 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16301             Bruno Haible  <bruno@clisp.org>
16302
16303         * lib/mbswidth.h: Include <wchar.h> only if
16304         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16305         <wchar.h>.
16306         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16307
16308 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16309
16310         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16311         Sync with libc CVS.
16312         * lib/getopt_int.h: New file, also synced from libc.
16313
16314 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16315
16316         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16317         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16318         Bring back getopt.c, getopt.h, getopt1.c.
16319
16320 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16321
16322         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16323         All uses changed.  Check for sa_sigaction member; this fixes
16324         a bug first reported by Jason Andrade in
16325         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16326
16327 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16328
16329         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16330         '#if' expressions.  Unlike the code it replaces, it does not
16331         depend on (defined _SC_PAGESIZE).  However, it does depend on
16332         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16333         first reported by Jason Andrade in
16334         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16335
16336 2004-02-25  Simon Josefsson  <jas@extundo.com>
16337
16338         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16339
16340 2004-02-25  Simon Josefsson  <jas@extundo.com>
16341
16342         * lib/strdup.h: New file.
16343         * lib/strdup.c: Include it.
16344         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16345         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16346
16347 2004-02-23  Karl Berry  <karl@gnu.org>
16348
16349         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16350         (from fencepost.gnu.org:/gd/gnuorg).
16351
16352 2004-02-23  Karl Berry  <karl@gnu.org>
16353
16354         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16355         * config/srclist.txt: add maintain/standards documents.
16356
16357 2004-02-18  Bruno Haible  <bruno@clisp.org>
16358
16359         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16360         Reported by Derek Robert Price <derek@ximbiot.com>.
16361
16362 2004-02-16  Karl Berry  <karl@gnu.org>
16363
16364         * config/mkinstalldirs, install-sh: update from automake.
16365
16366 2004-02-06  Karl Berry  <karl@gnu.org>
16367
16368         * m4/po.m4: update from gettext 0.14.1.
16369
16370 2004-02-06  Karl Berry  <karl@gnu.org>
16371
16372         * lib/config.charset: update from gettext 0.14.1.
16373
16374 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16375
16376         Add comments and code, prompted by suggestions from Bruno Haible
16377         for sh-quote.
16378         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16379         describing the enum quoting_style values.
16380         * lib/quotearg.c (quotearg_alloc): New function.
16381         (quotearg_buffer_restyled): Treat lone { and } as special.
16382         Treat = as special.  Work around bug with older shells
16383         that "see" a '\' that is really the 2nd byte of a multibyte char.
16384         Quote empty string with shell_quoting_style.
16385
16386 2004-02-03  Bruno Haible  <bruno@clisp.org>
16387
16388         * m4/pipe.m4: New file, from GNU gettext.
16389
16390 2004-02-03  Bruno Haible  <bruno@clisp.org>
16391
16392         * lib/pipe.h: New file, from GNU gettext.
16393         * lib/pipe.c: New file, from GNU gettext.
16394
16395 2004-01-27  Bruno Haible  <bruno@clisp.org>
16396
16397         * m4/execute.m4: New file, from GNU gettext.
16398
16399 2004-01-27  Bruno Haible  <bruno@clisp.org>
16400
16401         * lib/execute.h: New file, from GNU gettext.
16402         * lib/execute.c: New file, from GNU gettext.
16403         * lib/w32spawn.h: New file, from GNU gettext.
16404
16405 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16406
16407         Merge from diffutils.
16408
16409         * lib/file-type.c (file_type): Add typed memory objects.
16410         * lib/file-type.h (S_TYPEISTMO): New macro.
16411
16412         * lib/c-stack.h (c_stack_action): Remove argv argument.
16413         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16414         (die): Don't calculate message unless segv_action returns.
16415         (get_stack_location, min_address_from_argv, max_address_from_argv,
16416         volatile stack_base, volatile_stack_size): Remove.
16417         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16418         that every segmentation violation is a stack overflow.  (Ouch!)
16419         See Debian bug 136249 (still outstanding) for more info about why
16420         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16421
16422 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16423
16424         Exit-status fix from coreutils.
16425
16426         Use exit_failure consistently in place of EXIT_FAILURE,
16427         so that program exit statuses are consistent on failure.
16428
16429         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16430         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16431         * lib/argmatch.h: Comment fix to match the above.
16432         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16433         Now a macro referring to exit_failure, instead of a separate
16434         variable.  Include "exitfail.h" to get it.
16435         * lib/xstrtol.h: Include "exitfail.h".
16436         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16437
16438         * lib/long-options.c (parse_long_options): Use prototype
16439         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16440         for clarity.
16441
16442 2004-01-21  Jim Meyering  <jim@meyering.net>
16443
16444         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16445         so as not to conflict with a different-sized __mktime_internal
16446         function in GNU libc.
16447         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16448         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16449
16450 2004-01-20  Karl Berry  <karl@gnu.org>
16451
16452         * config/config.guess: update from config.
16453
16454         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16455
16456 2004-01-20  Bruno Haible  <bruno@clisp.org>
16457
16458         Safer stack allocation.
16459         * lib/setenv.c: Include allocsa.h.
16460         (alloca): Remove fallback definition.
16461         (freea): Remove macro.
16462         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16463         instead of freea.
16464
16465 2004-01-20  Bruno Haible  <bruno@clisp.org>
16466
16467         * m4/eealloc.m4: New file, from GNU gettext.
16468
16469 2004-01-20  Bruno Haible  <bruno@clisp.org>
16470
16471         * m4/allocsa.m4: New file, from GNU gettext.
16472
16473 2004-01-20  Bruno Haible  <bruno@clisp.org>
16474
16475         * lib/xallocsa.h: New file, from GNU gettext.
16476         * lib/xallocsa.c: New file, from GNU gettext.
16477
16478 2004-01-20  Bruno Haible  <bruno@clisp.org>
16479
16480         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16481
16482 2004-01-20  Bruno Haible  <bruno@clisp.org>
16483
16484         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16485         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16486         specially.
16487
16488 2004-01-20  Bruno Haible  <bruno@clisp.org>
16489
16490         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16491         patch.
16492
16493 2004-01-20  Bruno Haible  <bruno@clisp.org>
16494
16495         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16496
16497 2004-01-20  Bruno Haible  <bruno@clisp.org>
16498
16499         * lib/eealloc.h: New file.
16500
16501 2004-01-20  Bruno Haible  <bruno@clisp.org>
16502
16503         * lib/binary-io.h: Avoid warnings on Cygwin.
16504
16505 2004-01-20  Bruno Haible  <bruno@clisp.org>
16506
16507         * lib/allocsa.h: New file, from GNU gettext.
16508         * lib/allocsa.c: New file, from GNU gettext.
16509
16510 2004-01-18  Karl Berry  <karl@gnu.org>
16511
16512         * doc/gpl.texi, doc/lgpl.texi: new files.
16513
16514 2004-01-18  Karl Berry  <karl@gnu.org>
16515
16516         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
16517         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
16518
16519 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16520
16521         Merge from coreutils.
16522
16523         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
16524         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
16525         (gl_DEFAULT_POSIX2_VERSION): Move
16526         the documentation from 'configure' into 'config.hin',
16527         so that 'configure --help' isn't burdened by it and
16528         we don't have to worry about its formatting there.
16529         Reword the documentation so that it's more succinct
16530         and can be run together into a single paragraph.
16531         * m4/same.m4 (gl_SAME): Check for pathconf.
16532
16533 2004-01-15  Paul Eggert  <eggert@twinsun.com>
16534
16535         Merge from coreutils.
16536
16537         * lib/posixver.c: Include posixver.h.
16538
16539         * lib/same.c: Include <stdbool.h>, <limits.h>.
16540         (_POSIX_NAME_MAX): Define if not defined.
16541         (MIN): New macro.
16542         (same_name): If file names are silently truncated, report
16543         that the file names are the same if they are the same after
16544         the silent truncation.
16545
16546         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
16547         conversion function.
16548         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
16549         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
16550         longer needed.
16551
16552 2004-01-15  Jim Meyering  <jim@meyering.net>
16553
16554         Merge from coreutils.
16555
16556         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
16557         if no library is required.
16558         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
16559         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
16560         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
16561         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
16562         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
16563         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
16564         value, $ac_cv_search_crypt, if it's "none required".
16565         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
16566         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
16567         not gl_FUNC_GETLOADAVG.
16568         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
16569         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
16570
16571 2004-01-15  Jim Meyering  <jim@meyering.net>
16572
16573         Merge from coreutils.
16574
16575         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
16576         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
16577         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
16578
16579         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
16580         optional configure-time default.
16581
16582         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16583
16584         * lib/xreadlink.c (xreadlink): Correct outdated comment.
16585
16586 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
16587
16588         Merge from coreutils.
16589
16590         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
16591         value, $ac_cv_search_nanosleep, if it's "none required".
16592
16593 2004-01-14  Paul Eggert  <eggert@twinsun.com>
16594
16595         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
16596         with like-named macro in fnmatch.c.
16597         (EXT): Use an internal constant instead.
16598
16599         Merge fnmatch patches from glibc.
16600         * lib/fnmatch.c (mbsinit): Remove define.
16601         Add libc_hidden_ver (__fnmatch, fnmatch).
16602         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
16603         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
16604
16605 2004-01-14  Karl Berry  <karl@gnu.org>
16606
16607         * config/install-sh: update from automake.
16608
16609 2004-01-13  Karl Berry  <karl@gnu.org>
16610
16611         * config/install-sh: update from automake.
16612
16613 2004-01-09  Karl Berry  <karl@gnu.org>
16614
16615         * config/install-sh: update from automake.
16616
16617 2004-01-05  Karl Berry  <karl@gnu.org>
16618
16619         * config/config.{sub,guess}: update from config.
16620
16621 2003-12-31  Karl Berry  <karl@gnu.org>
16622
16623         * config/depcomp: update from automake.
16624
16625 2003-12-14  Karl Berry  <karl@gnu.org>
16626
16627         * lib/config.charset: update from gettext-runtime.
16628
16629 2003-12-03  Paul Eggert  <eggert@twinsun.com>
16630
16631         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
16632         Bug reported by Alfred M. Szmidt.
16633
16634 2003-12-03  Bruno Haible  <bruno@clisp.org>
16635
16636         * m4/gettext.m4: Upgrade from gettext-0.13.
16637         * m4/po.m4: Upgrade from gettext-0.13.
16638         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
16639         * m4/intmax.m4: New file, from gettext-0.13.
16640         * m4/printf-posix.m4: New file, from gettext-0.13.
16641
16642 2003-11-29  Karl Berry  <karl@gnu.org>
16643
16644         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
16645
16646 2003-11-25  Paul Eggert  <eggert@twinsun.com>
16647             Bruno Haible  <bruno@clisp.org>
16648
16649         * lib/printf-parse.h: Don't include sys/types.h.
16650         (ARG_NONE): New macro.
16651         (char_directive): Change type of *arg_index fields to size_t.
16652         * lib/printf-parse.c: Don't include sys/types.h.
16653         (SSIZE_MAX): Remove macro.
16654         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
16655         Remove unnecessary overflow check.
16656         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
16657         fields.
16658
16659 2003-11-25  Bruno Haible  <bruno@clisp.org>
16660
16661         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
16662
16663 2003-11-25  Bruno Haible  <bruno@clisp.org>
16664
16665         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
16666         gt_TYPE_SSIZE_T.
16667
16668 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16669
16670         * modules/alloca: Remove dependency on xalloc.
16671
16672 2003-11-24  Paul Eggert  <eggert@twinsun.com>
16673
16674         * lib/alloca.c: Remove dependency on xalloc module.
16675         (xalloc_die): Remove.
16676         (memory_full) [!defined emacs]: New macro.
16677         [!defined emacs]: Don't include xalloc.h.
16678         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
16679         address arithmetic overflows.  Change datatypes a bit to avoid
16680         unnecessary casts.
16681
16682 2003-11-22  Jim Meyering  <jim@meyering.net>
16683
16684         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
16685         s/size/size_t/.
16686
16687 2003-11-21  Karl Berry  <karl@gnu.org>
16688
16689         * config/config.{sub,guess}: update from config.
16690
16691 2003-11-18  Karl Berry  <karl@gnu.org>
16692
16693         * config/config.{sub,guess}: update from config.
16694
16695         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
16696
16697 2003-11-17  Paul Eggert  <eggert@twinsun.com>
16698
16699         * README: Mention that S+T cannot overflow if S is the size of
16700         an existing object and T is sufficiently small.
16701
16702 2003-11-17  Jim Meyering  <jim@meyering.net>
16703
16704         On systems without utime and without a utimes function capable of
16705         dealing with a NULL struct utimbuf* argument, this utime replacement
16706         could -- in unusual circumstances -- leak a file descriptor.
16707         * lib/utime.c: Include <unistd.h> and <errno.h>.
16708         (utime_null): Be sure to close `fd' and to preserve errno.
16709         Reported by Geoff Collyer via Arnold Robbins.
16710
16711 2003-11-17  Bruno Haible  <bruno@clisp.org>
16712
16713         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
16714         (Depends-on): Add xsize.
16715
16716 2003-11-17  Bruno Haible  <bruno@clisp.org>
16717
16718         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
16719
16720 2003-11-17  Bruno Haible  <bruno@clisp.org>
16721
16722         * lib/vasnprintf.c (alloca): Remove fallback definition.
16723         (freea): Remove definition.
16724         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
16725         Reported by Paul Eggert.
16726
16727 2003-11-16  Paul Eggert  <eggert@twinsun.com>
16728             Bruno Haible  <bruno@clisp.org>
16729
16730         Protect against address arithmetic overflow.
16731         * lib/printf-args.h: Include stddef.h.
16732         (arguments): Change type of field 'count' to size_t.
16733         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
16734         'unsigned int' where appropriate.
16735         * lib/printf-parse.h: Include sys/types.h.
16736         (char_directive): Change type of *arg_index fields to ssize_t.
16737         (char_directives): Change type of fields 'count', max_*_length to
16738         size_t.
16739         * lib/printf-parse.c: Include sys/types.h and xsize.h.
16740         (SSIZE_MAX): Define fallback value.
16741         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
16742         instead of 'int' where appropriate. Check a_allocated, d_allocated
16743         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
16744         * lib/vasnprintf.c: Include xsize.h.
16745         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
16746         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
16747         overflow. Avoid wraparound when converting a width or precision from
16748         decimal to binary.
16749
16750 2003-11-16  Bruno Haible  <bruno@clisp.org>
16751
16752         Update from GNU gettext.
16753         * lib/printf-parse.c: Generalize to it can be compiled for wide
16754         strings.
16755         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
16756         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
16757         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
16758         SNPRINTF): New macros.
16759         Don't include <alloca.h> if the file is used inside libintl.
16760         (local_wcslen): New function, for Solaris 2.5.1.
16761         (VASNPRINTF): Use it instead of wcslen.
16762
16763 2003-11-16  Bruno Haible  <bruno@clisp.org>
16764
16765         * lib/xsize.h (xmax): New function.
16766         (xsum, xsum3, xsum4): Declare as "pure" functions.
16767
16768 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16769
16770         * modules/xalloc (Files): Undo latest change, since xalloc.h
16771         no longer needs SIZE_MAX or PTRDIFF_MAX.
16772
16773 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16774
16775         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
16776         gl_PTRDIFF_MAX.
16777
16778 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16779
16780         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
16781         "return", to pacify some unknown compiler.  Problem reported
16782         by Joerg Schilling.
16783
16784 2003-11-12  Paul Eggert  <eggert@twinsun.com>
16785
16786         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
16787         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
16788         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
16789         heuristic is just as accurate as far as we know, and it removes a
16790         dependency on size_max.m4 and ptrdiff_max.m4.
16791
16792 2003-11-11  Bruno Haible  <bruno@clisp.org>
16793
16794         * modules/xsize (Files): Add m4/size_max.m4.
16795         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
16796
16797 2003-11-11  Bruno Haible  <bruno@clisp.org>
16798
16799         * m4/size_max.m4: New file.
16800         * m4/ptrdiff_max.m4: New file.
16801         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
16802         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
16803         (gl_XALLOC): Invoke it.
16804
16805 2003-11-11  Bruno Haible  <bruno@clisp.org>
16806
16807         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
16808         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
16809         defined.
16810
16811 2003-11-10  Paul Eggert  <eggert@twinsun.com>
16812
16813         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
16814         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
16815         rejected some allocations of exactly SIZE_MAX - 2 bytes.
16816         From Bruno Haible.
16817         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
16818         not (size_t) -1, since it's defined here.
16819
16820 2003-11-09  Karl Berry  <karl@gnu.org>
16821
16822         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
16823
16824 2003-11-06  Paul Eggert  <eggert@twinsun.com>
16825
16826         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
16827         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
16828         Reject sizes of exactly SIZE_MAX bytes.
16829         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
16830         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
16831
16832 2003-11-05  Bruno Haible  <bruno@clisp.org>
16833
16834         * lib/xsize.h: Include limits.h, to avoid a possible collision with
16835         SIZE_MAX defined in <limits.h> on Solaris.
16836
16837 2003-11-04  Jim Meyering  <jim@meyering.net>
16838
16839         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
16840         variable names, rather than @VAR@.
16841         * modules/poll: Likewise.
16842
16843 2003-11-04  Bruno Haible  <bruno@clisp.org>
16844
16845         * modules/xsize: New file.
16846         * modules/linebreak: Depend on xsize.
16847         * MODULES.html.sh (func_all_modules): Add xsize.
16848
16849 2003-11-04  Bruno Haible  <bruno@clisp.org>
16850
16851         * m4/xsize.m4: New file.
16852
16853 2003-11-04  Bruno Haible  <bruno@clisp.org>
16854
16855         * lib/xsize.h: New file.
16856         * lib/linebreak.c: Include xsize.h.
16857         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
16858         argument for overflow.
16859         Suggested by Paul Eggert.
16860
16861 2003-11-03  Karl Berry  <karl@gnu.org>
16862
16863         * config/config.{guess,sub}: update from config.
16864
16865 2003-11-03  Jim Meyering  <jim@meyering.net>
16866
16867         * modules/userspec (lib_SOURCES): Add userspec.h.
16868         (Include): Add "userspec.h".
16869         Improve description.
16870
16871 2003-11-03  Jim Meyering  <jim@meyering.net>
16872
16873         * lib/userspec.c: Include "userspec.h".
16874         * lib/userspec.h: New file.
16875
16876 2003-11-03  Bruno Haible  <bruno@clisp.org>
16877
16878         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
16879
16880 2003-11-03  Bruno Haible  <bruno@clisp.org>
16881
16882         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
16883         available, to avoid (extremely rare) race condition.
16884         Suggested by Paul Eggert.
16885
16886 2003-11-02  Karl Berry  <karl@gnu.org>
16887
16888         * config/srclist.txt (vasprintf.c): sync broken, sigh.
16889
16890 2003-10-31  Paul Eggert  <eggert@twinsun.com>
16891
16892         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
16893         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
16894         (read_filesystem_list): Set and use me_type_malloced.
16895         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
16896         whatever the type happens to be), for brevity and consistency.
16897         Check for size calculation overflow on Alphas running OSF/1.
16898
16899 2003-10-31  Jim Meyering  <jim@meyering.net>
16900
16901         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
16902
16903         * lib/linebuffer.c: Include <string.h> for declaration of memset.
16904
16905 2003-10-30  Paul Eggert  <eggert@twinsun.com>
16906             Bruno Haible  <bruno@clisp.org>
16907
16908         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
16909         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
16910
16911 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16912
16913         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
16914         netbsd*-gnu*.  Suggested by Robert Millan.
16915
16916 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16917
16918         * modules/group-member: Depend on stdbool.
16919
16920 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16921
16922         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
16923
16924 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16925
16926         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
16927         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
16928         after the 'gnu' in these cases.  This fixes some bugs in the
16929         previous change, and is based on suggestions by Robert Millan.
16930
16931 2003-10-29  Paul Eggert  <eggert@twinsun.com>
16932
16933         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
16934         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
16935         no longer needed.
16936         * lib/quotearg.c (quotearg_n_options): Use it.
16937         * lib/group-member.c: Include <stdbool.h>.
16938         (free_group_info): Arg is now const *; don't free arg.
16939         (get_group_info): Now returns bool and accepts struct group_info *,
16940         rather than returning a malloc'ed struct group_info *.
16941         All uses changed.  Check for overflow in internal size calculation.
16942
16943         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
16944         rather than xmalloc/xrealloc.
16945         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
16946         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
16947         conformance bug: the old code used a pointer after freeing the
16948         storage that it addressed.
16949         * lib/hash.c (hash_initialize): Simplify the code by using
16950         xalloc_oversized rather than doing it by hand.
16951         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
16952         the buffer preserved.  Use free and xmalloc instead.
16953         * lib/quotearg.c (quotearg_n_options): Likewise.
16954         Use a simpler test for size overflow.  Don't use xalloc_oversized
16955         because unsigned int might be wider than size_t (!); this suggests
16956         that we should switch from unsigned int to size_t for slot numbers.
16957
16958 2003-10-28  Paul Eggert  <eggert@twinsun.com>
16959
16960         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
16961         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
16962         NetBSD kernels.  Requested by Richard Stallman.
16963
16964 2003-10-27  Paul Eggert  <eggert@twinsun.com>
16965
16966         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
16967         to allocate the returned structure.  Do not allocate a subarray,
16968         as x2nrealloc will do that.
16969         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
16970         instead of xnrealloc.
16971         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
16972
16973 2003-10-27  Bruno Haible  <bruno@clisp.org>
16974
16975         * lib/stdbool_.h: Better support for BeOS.
16976
16977 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16978
16979         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
16980         now uses inline.
16981
16982 2003-10-26  Paul Eggert  <eggert@twinsun.com>
16983
16984         * lib/xalloc.h (xalloc_oversized): New static inline function, for
16985         callers that want to do their own size-overflow checking.  Include
16986         <stdbool.h>, since xalloc_oversized returns bool.
16987         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
16988         to use xalloc_oversized.
16989
16990         Add two functions x2realloc, x2nrealloc, for programs that grow
16991         arrays dynamically by doubling their sizes.
16992         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
16993         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
16994         New functions.
16995
16996         Port to C99 semantics for 'inline' of external functions.
16997         Bug reported by Bruno Haible.
16998         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
16999         with the old contents of xnmalloc.
17000         (xnmalloc, xmalloc): Use it.
17001         (xnrealloc_inline): New static inline function,
17002         with the old contents of xnrealloc.
17003         (xnrealloc, xrealloc): Use it.
17004
17005         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17006         that.
17007
17008 2003-10-26  Karl Berry  <karl@gnu.org>
17009
17010         * config/srclist.txt (COPYING.DOC): no longer available from
17011         /gd/gnuorg; don't know where the ultimate source is.
17012
17013 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17014
17015         Fix several address-calculation bugs in the hash modules,
17016         plus some minor code cleanup.
17017
17018         * lib/hash.h: Include <stdbool.h>, for bool.
17019         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17020         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17021         hash_get_n_entries, hash_get_max_bucket_length,
17022         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17023         hash_rehash): Use size_t rather than unsigned.
17024         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17025         hash_get_n_buckets_used, hash_get_n_entries,
17026         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17027         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17028         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17029         Likewise.
17030         (SIZE_MAX): Define if not defined.
17031         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17032         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17033         hash_print):
17034         Use const * when possible.
17035         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17036         (check_tuning): Fix bug: if tuning parameters were very close to
17037         0 or 1, rounding errors could have caused subscript violations.
17038         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17039         (hash_initialize): Add 'fail:' label
17040         to free table and return NULL, and use it to simplify code.
17041         Use calloc rather than clearing the storage ourself.
17042         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17043         buffer size calculations.
17044         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17045         Include <stddef.h>, for size_t.
17046         * lib/hash-pjw.c (hash_pjw): Likewise.
17047         Switch to method described by Bruno Haible.
17048         Include <limits.h>, for CHAR_BIT.
17049         (SIZE_BITS): New macro.
17050
17051 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17052
17053         * m4/getline.m4 (AM_FUNC_GETLINE):
17054         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17055         hosts.  Problem reported by Derek Robert Price in
17056         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17057         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17058         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17059
17060 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17061
17062         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17063         ceiling the allocation at NMAX bytes rather than silently
17064         discarding input bytes before NMAX is reached.  This makes
17065         a difference only if NMAX exceeds SIZE_MAX / 2.
17066
17067         * lib/obstack.c: Merge from glibc.
17068         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17069         Add libc_hidden_def (_obstack_newchunk).
17070         (_obstack_free) [! defined _LIBC]: Remove.
17071         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17072         a clone of the function body.
17073         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17074         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17075
17076         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17077         glibc.
17078         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17079         arg to memcpy.
17080
17081         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17082         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17083         Don't use lvalue casts, as GCC plans to remove support for them
17084         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17085         was also present in the non-GCC version, indicating that this
17086         code had always been buggy and had never been widely used.
17087         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17088         Use the fast variant of each macro, rather than copying the
17089         definiens of the fast variant; that way, we'll be more likely to
17090         catch future bugs in the fast variants.
17091
17092 2003-10-20  Bruno Haible  <bruno@clisp.org>
17093
17094         * modules/wait-process: New file.
17095         * MODULES.html.sh (func_all_modules): Add wait-process.
17096
17097 2003-10-20  Bruno Haible  <bruno@clisp.org>
17098
17099         * m4/wait-process.m4: New file.
17100
17101 2003-10-20  Bruno Haible  <bruno@clisp.org>
17102
17103         * lib/wait-process.h: New file, from GNU gettext.
17104         * lib/wait-process.c: New file, from GNU gettext.
17105
17106 2003-10-19  Jim Meyering  <jim@meyering.net>
17107
17108         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17109         HPUX 10.20.
17110
17111 2003-10-18  Karl Berry  <karl@gnu.org>
17112
17113         * config/config.guess: update from config.
17114
17115 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17116
17117         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17118         (getgroups): First arg is int, not size_t.
17119         Don't let 'free' mangle errno.
17120
17121 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17122
17123         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17124
17125 2003-10-16  Karl Berry  <karl@gnu.org>
17126
17127         * config/config.{guess,sub}: update from config.
17128
17129 2003-10-16  Jim Meyering  <jim@meyering.net>
17130
17131         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17132         memcpy.
17133
17134 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17135
17136         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17137         (SIZE_MAX): Remove.
17138         (new_exclude, add_exclude_file): Initial size no longer needs to
17139         be a power of 2.
17140         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17141         our own address arithmetic overflow checking.
17142
17143         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17144         (fnmatch): Do not alloca more than 2000 wide characters;
17145         instead, use malloc for large buffers.
17146         Check for address arithmetic overflow, and return -1
17147         with errno set to ENOMEM in that case.
17148         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17149         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17150         instead, return -1.  Check for address arithmetic overflow.
17151
17152 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17153
17154         Handle invalid suffixes and overflow independently, so that
17155         callers can treat them independently as needed.  Fix some bugs in
17156         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17157         suffix for a human-readable blocksize.  The major caller-visible
17158         change is the addition of a new
17159         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17160         that both overflow and suffix chars were found.
17161
17162         * lib/human.c (humblock): Don't check separately for invalid suffix
17163         char; that is xstrtoumax's job (now that its bug is fixed).
17164         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17165         INTMAX_MAX]: New macros.
17166         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17167         TYPE_MAXIMUM): New macros.
17168         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17169         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17170         if overflow occurs, as it's what __strtol does and it's more useful
17171         in practice.
17172         (__xstrtol): If __strtol reports some error other than ERANGE,
17173         reflect it to the caller as LONGINT_INVALID.  If it reports
17174         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17175         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17176         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17177         value.
17178         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17179         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17180         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17181         [defined UINTMAX_MAX]: New macros.
17182
17183 2003-10-14  Bruno Haible  <bruno@clisp.org>
17184
17185         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17186
17187 2003-10-14  Bruno Haible  <bruno@clisp.org>
17188
17189         * m4/sig_atomic_t: New file, from GNU gettext.
17190         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17191
17192 2003-10-14  Bruno Haible  <bruno@clisp.org>
17193
17194         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17195         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17196         Also use volatile where needed.
17197
17198 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17199
17200         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17201         Change maintainer from Bruno Haible to 'all'.
17202
17203 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17204
17205         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17206
17207 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17208
17209         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17210         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17211         and define in terms of the other primitives.
17212         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17213         (SIZE_MAX): Define if not already defined.
17214         (array_size_overflow): New function.
17215         (xalloc_die): Abort instead of exiting if 'error' returns.
17216         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17217         (xmalloc, xrealloc): Use them.
17218         (xcalloc): Check for address arithmetic overflow.
17219         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17220         a bit faster than strcpy.
17221
17222 2003-10-10  Simon Josefsson  <jas@extundo.com>
17223
17224         * modules/argp (Depends-on): Add restrict and strcase.
17225
17226 2003-10-10  Simon Josefsson  <jas@extundo.com>
17227
17228         * m4/argp.m4: Add AC_C_INLINE.
17229
17230 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17231
17232         Merge getpass from libc, plus a few fixes.
17233
17234         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17235         Include <stdbool.h>.
17236         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17237         __fsetlocking to empty.
17238         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17239         do include <bits/libc-lock.h>.
17240         Do not include <fcntl.h>; not needed.
17241         [_LIBC]: Include <wchar.h>.
17242         (NOTCANCEL_MODE): New macro.
17243         (flockfile, funlockfile) [_LIBC]: New macros.
17244         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17245         [!_LIBC]: New macros.
17246         (call_fclose): New function.
17247         (getpass): Use it.  Save tty stream separately; this simplifies the
17248         code and makes it more reliable if stdin happens to equal stdout.
17249         Invoke __fsetlocking on tty.
17250         Handle thread cancellation if needed.
17251         Namespace cleanup (use __tcgetattr, __getline).
17252         Use bool for Booleans.
17253         [USE_IN_LIBIO]: Handle wide streams.
17254         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17255         stream might go where.
17256
17257         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17258         doesn't have to include <stdio.h> before us.
17259         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17260         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17261         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17262         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17263         if not declared, so that we can use getpass.c code from libc without
17264         rewriting it.
17265         (flockfile, ftrylockfile, funlockfile): New macros.
17266
17267 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17268
17269         * modules/getpass: Depend on stdbool.
17270
17271 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17272
17273         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17274
17275 2003-10-07  Karl Berry  <karl@gnu.org>
17276
17277         * config/config.{guess,sub}: update from config.
17278
17279 2003-10-06  Jim Meyering  <jim@meyering.net>
17280             Bruno Haible  <bruno@clisp.org>
17281
17282         This lets translators provide better translations for the
17283         "Written by ..." part of --version output.
17284         * lib/version-etc.h: Include stdarg.h.
17285         (version_etc_copyright): Declare as readonly.
17286         (version_etc): Make this function variadic with a NULL-terminated list
17287         of author name strings.
17288         (version_etc_va): New declaration.
17289         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17290         (version_etc_copyright): Declare as readonly.
17291         (version_etc_va): New function. Provide a different translatable string
17292         for each possible number of authors < 10. Abbreviate when there are 10
17293         authors or more.
17294         (version_etc): Make this function variadic. Call version_etc_va.
17295         Suggestion from Gary V. Vaughan.
17296
17297         * lib/long-options.h (parse_long_options): Change prototype: the
17298         authors string is moved to the end and becomes variadic.
17299         * lib/long-options.c: Include stdarg.h.
17300         (parse_long_options): Make this function variadic, too.
17301         Call version_etc_va, not version_etc.
17302
17303 2003-10-06  Bruno Haible  <bruno@clisp.org>
17304
17305         * modules/version-etc-2: Remove file.
17306         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17307
17308 2003-10-06  Bruno Haible  <bruno@clisp.org>
17309
17310         * modules/fatal-signal: New file.
17311         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17312
17313 2003-10-06  Bruno Haible  <bruno@clisp.org>
17314
17315         * m4/fatal-signal.m4: New file.
17316         * m4/signalblocking.m4: New file, from GNU gettext.
17317
17318 2003-10-06  Bruno Haible  <bruno@clisp.org>
17319
17320         * lib/version-etc-2.h: Remove file.
17321         * lib/version-etc-2.c: Remove file.
17322
17323 2003-10-06  Bruno Haible  <bruno@clisp.org>
17324
17325         * lib/fatal-signal.h: New file, from GNU gettext.
17326         * lib/fatal-signal.c: New file, from GNU gettext.
17327
17328 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17329
17330         * README: Rework advice for preventing empty .o files.
17331         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17332         not <sys/types.h>.
17333
17334 2003-10-04  Karl Berry  <karl@gnu.org>
17335
17336         * lib/argp*: update from libc.
17337
17338 2003-10-04  Karl Berry  <karl@gnu.org>
17339
17340         * config/config.{guess,sub}: update from config.
17341
17342 2003-10-02  Bruno Haible  <bruno@clisp.org>
17343
17344         * modules/lchown (Include): Add lchown.h.
17345         * modules/time_r (Include): Use "..." syntax.
17346         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17347
17348 2003-10-01  Simon Josefsson  <jas@extundo.com>
17349
17350         * MODULES.html.sh (func_all_modules): Move gethostname from section
17351         'based on' to section 'lacking' POSIX:2001.
17352
17353 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17354
17355         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17356         to output mode on the same stream.
17357
17358 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17359
17360         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17361         Fix arg typo in previous patch.
17362
17363 2003-09-28  Jim Meyering  <jim@meyering.net>
17364
17365         * lib/error.c: Correct cpp indentation.
17366
17367 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17368
17369         * modules/free: New file.
17370
17371 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17372
17373         * m4/free.m4: New file.
17374
17375 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17376
17377         * lib/minmax.h (MIN, MAX)
17378         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17379         Omit the special code that used __typeof__, since we worry that
17380         it could be more trouble than it's worth.  See:
17381         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17382         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17383
17384         * lib/free.c: New file.
17385
17386 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17387
17388         Trivial fixes to Makefile.am parts of module listings.
17389         * modules/strstr: Append strstr.h to lib_SOURCES.
17390         * modules/strcase: Likewise, for strcase.h.
17391
17392 2003-09-27  Karl Berry  <karl@gnu.org>
17393
17394         * config/mkinstalldirs: update from automake.
17395
17396 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17397
17398         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17399         (error_tail): Do not loop, reallocating temporary buffer, since
17400         the output cannot contain more wide characters than the input
17401         contains bytes, the size must be big enough already.  This avoids
17402         one potential size overflow calculation.  Check for size overflow
17403         when calculating temporary buffer size.  Free temporary buffer
17404         when done, if it was allocated with malloc; this plugs a memory
17405         leak.  Remove casts from void * to pointers, that are no longer
17406         needed now that we're assuming C89 or better.
17407
17408         Merge error changes from glibc.
17409
17410         * lib/error.c, error.h: Update copyright notice header to match glibc.
17411         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17412         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17413         Disable cancellation while printing error.
17414         * lib/error.h: Prepend __ to parameter names.
17415
17416 2003-09-26  Jim Meyering  <jim@meyering.net>
17417
17418         * lib/error.c (error_tail): Move some declarations
17419         into inner scope where the local variables are used.
17420
17421 2003-09-26  Bruno Haible  <bruno@clisp.org>
17422
17423         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17424         stpncpy().
17425         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17426
17427 2003-09-26  Bruno Haible  <bruno@clisp.org>
17428
17429         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17430         (stpncpy): Define as alias for gnu_stpncpy.
17431         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17432
17433 2003-09-25  Simon Josefsson  <jas@extundo.com>
17434
17435         * lib/xgetdomainname.h: New file.
17436         * lib/xgetdomainname.c: New file.
17437
17438 2003-09-25  Simon Josefsson  <jas@extundo.com>
17439             Bruno Haible  <bruno@clisp.org>
17440
17441         * modules/getdomainname: New file.
17442         * modules/xgetdomainname: New file.
17443         * MODULES.html.sh (func_all_modules): Add getdomainname,
17444         xgetdomainname.
17445
17446 2003-09-25  Simon Josefsson  <jas@extundo.com>
17447             Bruno Haible  <bruno@clisp.org>
17448
17449         * m4/getdomainname.m4: New file.
17450
17451 2003-09-25  Simon Josefsson  <jas@extundo.com>
17452             Bruno Haible  <bruno@clisp.org>
17453
17454         * lib/getdomainname.h: New file.
17455         * lib/getdomainname.c: New file.
17456
17457 2003-09-25  Karl Berry  <karl@gnu.org>
17458
17459         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17460
17461 2003-09-25  Karl Berry  <karl@gnu.org>
17462
17463         * config/install-sh: update from automake.
17464
17465 2003-09-25  Bruno Haible  <bruno@clisp.org>
17466
17467         * modules/version-etc-2: New file, from modules/version-etc with
17468         modifications.
17469         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17470
17471 2003-09-25  Bruno Haible  <bruno@clisp.org>
17472
17473         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17474         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17475
17476 2003-09-24  Simon Josefsson  <jas@extundo.com>
17477
17478         * modules/xgethostname: Add xgethostname.h.
17479
17480 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17481
17482         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17483         the buffer associated with the argument.  Bug reported by
17484         Simon Josefsson.
17485
17486 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17487
17488         * README: Document assumptions that 'int' is at least 32 bits
17489         wide, that integer arithmetic is 2's complement without overflow,
17490         that there are no holes in integer values, that adding sizes of
17491         two nonoverlapping objects can't overflow, and that all-bits-zero
17492         yields scalar zero.  Fix spelling and capitalization typos.
17493
17494 2003-09-19  Karl Berry  <karl@gnu.org>
17495
17496         * lib/argp.h: update from libc.
17497
17498 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17499
17500         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17501         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17502         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17503
17504 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17505
17506         * gnulib-tool: Use "test -h", not "test -L", for portability
17507         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
17508         (tags_regexp): Remove, since \| doesn't conform to POSIX.
17509         (sed_extract_prog): Issue s commands one-by-one, rather than
17510         using \| in one s command.
17511
17512 2003-09-16  Paul Eggert  <eggert@twinsun.com>
17513
17514         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
17515         input error, instead of returning NULL the next time we are called
17516         (and therefore losing track of errno).
17517
17518 2003-09-16  Bruno Haible  <bruno@clisp.org>
17519
17520         * gnulib-tool (func_create_testdir): Warn about duplicated
17521         dependencies.
17522
17523 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17524
17525         * modules/argmatch, modules/fatal, modules/obstack,
17526         modules/xalloc, modules/xgethostname: Sort dependencies by
17527         importance, not alphabetically.
17528
17529 2003-09-15  Paul Eggert  <eggert@twinsun.com>
17530
17531         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
17532         fails, so that the caller gets the proper errno.
17533
17534         * lib/readutmp.c (read_utmp): Likewise.
17535         Check for fstat error.  Close stream and free storage
17536         when failing.
17537
17538 2003-09-14  Karl Berry  <karl@gnu.org>
17539
17540         * config/srclist.txt (strdup.c): disable for c89 changes.
17541
17542 2003-09-14  Jim Meyering  <jim@meyering.net>
17543
17544         * lib/getloadavg.c: Correct cpp indentation.
17545         * lib/strdup.c: Likewise.
17546         * lib/vasnprintf.c: Likewise.
17547
17548 2003-09-14  Bruno Haible  <bruno@clisp.org>
17549
17550         * modules/fwriteerror: New file.
17551         * MODULES.html.sh (func_all_modules): Add fwriteerror.
17552
17553 2003-09-14  Bruno Haible  <bruno@clisp.org>
17554
17555         * lib/fwriteerror.h: New file.
17556         * lib/fwriteerror.c: New file.
17557
17558 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17559
17560         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
17561         modules/xgethostname, modules/xalloc: Depend on exit.
17562
17563 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17564
17565         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
17566
17567         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
17568         and AC_MINIX, too, so that their extensions are available.
17569
17570         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
17571         This macro has been superseded by gl_BACKUPFILE.
17572
17573         More patches to assume C89 or better.
17574
17575         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
17576
17577         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
17578         unconditionally.
17579         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
17580         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
17581         Include <string.h>, <stdlib.h> unconditionally.
17582         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
17583         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
17584         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
17585         headers or for string.h.
17586         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
17587         or strtoul.
17588
17589         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
17590         headers.
17591         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
17592         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17593         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
17594         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
17595         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17596         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
17597         memcpy, memset.
17598         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
17599         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
17600         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
17601         strtol.
17602         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
17603         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
17604         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
17605         strtoul.
17606
17607 2003-09-12  Paul Eggert  <eggert@twinsun.com>
17608
17609         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
17610         * lib/obstack.c [!defined _LIBC]: Likewise.
17611         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
17612         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
17613         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
17614
17615         More changes to assume C89 or better.
17616
17617         * lib/error.c (error_tail): Assume vprintf.
17618
17619         * lib/argmatch.c (getenv): Remove decl.
17620         * lib/progreloc.c (get_full_program_name): Define via prototype.
17621         * lib/setenv.c (clearenv): Likewise.
17622         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
17623         needed.
17624         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
17625         (malloc, memcpy): Remove decls.
17626         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
17627         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
17628         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17629         (memcpy): Remove macro.
17630         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
17631         (__P): Remove.  All uses removed.
17632         (PTR): Remove.  All uses changed to void *.
17633         (CHAR_BIT, NULL): Remove.
17634         (spaces, zeros, memset_space, memset_zero)
17635         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
17636         Remove.
17637         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
17638         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
17639         Define with prototype.
17640         Remove now-unnecessary prototype decl.
17641         (extra_args_spec): Assume ANSI C.  All uses changed.
17642         (extra_args_spec_iso): Remove.
17643         (my_strftime, emacs_strftimeu): Define via prototype.
17644         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
17645         unconditionally.
17646         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
17647         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
17648         (strtoul, strtol): Remove decls.
17649         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
17650         LONG_MAX): Remove.
17651         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
17652         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
17653         (LOCALE_PARAM_PROTO): New macro.
17654         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
17655         (INTERNAL (strtol), strtol): Define with a prototype.
17656         (PARAMS): Remove.  All uses removed.
17657         * lib/tempname.c: Include <string.h> unconditionally.
17658         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
17659         * lib/xgethostname.c (main): Define with a prototype.
17660         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
17661         Include <stdlib.h> unconditionally.
17662         (calloc, malloc, realloc, free): Remove decls.
17663         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
17664         Include <stdlib.h> unconditionally.  Sort include file names.
17665         (strtod): Remove.
17666         (xstrtod): Define with a prototype.
17667         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
17668         (strtol, strtoul): Remove decls.
17669
17670 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17671
17672         More patches to assume C89 or better.
17673         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
17674         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
17675         string.h, memchr, STDC_HEADERS.
17676
17677 2003-09-11  Paul Eggert  <eggert@twinsun.com>
17678
17679         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
17680         Include <stdlib.h>, <string.h> unconditionally.
17681         Remove now-unnecessary cast to char *.
17682         * lib/strnlen.c: Include <string.h> unconditionally.
17683         * lib/yesno.c (yesno): Define with a prototype.
17684
17685 2003-09-11  Bruno Haible  <bruno@clisp.org>
17686
17687         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
17688
17689 2003-09-10  Jim Meyering  <jim@meyering.net>
17690
17691         * lib/error.c: Correct indentation of cpp directives.
17692
17693 2003-09-10  Bruno Haible  <bruno@clisp.org>
17694
17695         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
17696         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
17697         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
17698         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
17699         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
17700         <stdlib.h> and <string.h> checks.
17701         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
17702         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
17703
17704 2003-09-10  Bruno Haible  <bruno@clisp.org>
17705
17706         * lib/strcspn.c: Include <string.h> unconditionally.
17707         * lib/strpbrk.c: Include <string.h> unconditionally.
17708         * lib/strstr.c: Include <string.h> unconditionally.
17709         * lib/unicodeio.c: Include <string.h> unconditionally.
17710         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
17711         * lib/unsetenv.c: Likewise.
17712         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
17713         * lib/yesno.c: Include <stdlib.h> unconditionally.
17714         (rpmatch): Add prototype.
17715
17716 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17717
17718         More patches to assume C89 or better.
17719         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
17720         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
17721         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
17722         or for string.h.
17723         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
17724         stdlib.h.
17725         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
17726         C headers.
17727         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
17728         string.h.
17729         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
17730         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
17731         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
17732         or for string.h.
17733         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
17734         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
17735         C headers.
17736         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
17737         memcpy.
17738         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
17739         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
17740         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
17741         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
17742         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
17743         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
17744         string.h, free.
17745         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
17746         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
17747         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
17748         C headers, or for string.h.
17749         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
17750         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
17751         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
17752         headers, memory.h, stdlib.h, string.h, strings.h.
17753         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
17754         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
17755         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
17756         strchr.
17757         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
17758         headers, memory.h, string.h.
17759         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
17760         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
17761         free.
17762         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
17763         headers.
17764         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
17765         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
17766         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
17767         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
17768         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
17769
17770 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17771
17772         More K&R removal.
17773
17774         * lib/acosl.c (main): Use a prototype.
17775         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
17776         tanl.c: Likewise.
17777
17778         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
17779
17780         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
17781         (getopt, etopt_long, getopt_long_only, _getopt_internal)
17782         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
17783         with a prototype.
17784         * lib/getopt.c (const): Remove macro.
17785         Include <string.h> unconditionally.
17786         (my_index): Remove; all uses changed to strchr.
17787         (strlen): Remove decl.
17788         (exchange): Remove forward decl; no longer needed.
17789         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
17790         Define with prototype.
17791         * lib/getopt1.c (const): Remove macro.
17792         (getopt_long, getopt_long_only, main): Define with prototype.
17793
17794         * lib/getugroups.c: Include <string.h> unconditionally.
17795
17796         * lib/getusershell.c: Include <stdlib.h> unconditionally.
17797         (getusershell, setusershell, endusershell, readname, main):
17798         Define with prototypes.
17799
17800         * lib/group-member.c: Include group-member.h first.
17801         Include <stdlib.h> unconditionally.
17802
17803         * lib/hard-locale.c: Include hard-locale.h first.
17804         Include <stdlib.h>, <string.h> unconditionally.
17805
17806         * lib/hash.c (free, malloc): Remove decls.
17807         Include <stdlib.h> unconditionally.
17808
17809         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
17810         (getenv): Do not declare.
17811
17812         * lib/idcache.c: Include <string.h> unconditionally.
17813
17814         * lib/long-options.c: Include long-options.h first, to test interface.
17815         Include <stdlib.h> unconditionally.
17816
17817         * lib/makepath.c: Include makepath.h first, to test interface.
17818         Include <stdlib.h> and <string.h> unconditionally.
17819
17820         * lib/linebuffer.c: Include <stdlib.h>.
17821         (free): Remove decl.
17822
17823         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
17824         stddef.h. rpl_malloc returns void *, not char *.
17825         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
17826         prototype.
17827
17828         * lib/md5.h: Include <limits.h> unconditionally.
17829         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
17830         (__P): Remove; all uses removed.
17831         * lib/md5.c: Include "md5.h" first.
17832         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
17833         md5_buffer, md5_process_bytes, md5_process_block):
17834         Define with prototypes.
17835         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
17836         * lib/sha.c: Include "sha.h" first.
17837         Include <stdlib.h>, <string.h> unconditionally.
17838
17839         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
17840         * lib/memcmp.c (__ptr_t): Likewise.
17841         * lib/memrchr.c (__ptr_t): Likewise.
17842         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
17843         Include <string.h> unconditionally.
17844         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
17845         * lib/memchr.c: Include <stdlib.h> unconditionally.
17846         * lib/memchr.c (LONG_MAX): Remove.
17847         * lib/memrchr.c (LONG_MAX): Likewise.
17848         * lib/memchr.c (__memchr): Define via a prototype.
17849         * lib/memrchr.c (__memrchr): Likewise.
17850         * lib/memcmp.c (__P): Remove, and remove all uses.
17851         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
17852         Remove forward decls; no longer needed.
17853         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
17854         Use types required by C89 in prototype.
17855
17856         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
17857         * lib/savedir.c: Likewise.
17858         * lib/mkdir.c (free): Remove decl.
17859         * lib/rmdir.c (rmdir): Define with a prototype.
17860         * lib/savedir.c: Include savedir.h first, to test interface.
17861
17862         * lib/mktime.c (STDC_HEADERS): Remove.
17863         Include <stdlib.h>, <string.h> unconditionally.
17864
17865         * lib/modechange.c: Include <stdlib.h> unconditionally.
17866         (malloc): Remove decl.
17867
17868         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
17869         (free): Remove decl.
17870
17871         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
17872         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
17873         (This type really should be intptr_t, but that's a C99ism.)
17874         (_obstack_memcpy): Remove: all uses changed to memcpy.
17875         Include <string.h> unconditionally.
17876         (struct obstack): Assume __STDC__ for types of members
17877         chunkfun, freefun, extra_arg.
17878         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
17879         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
17880         obstack_begin, obstack_specify_allocation,
17881         obstack_specify_allocation_with_arg, obstack_chunkfun,
17882         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
17883         Remove unprototyped decls and the macros that use them.
17884         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
17885         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
17886         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
17887         (defined __STDC__ && __STDC__)]:
17888         Remove nonprototyped code.
17889         Include <stdlib.h> unconditionally.
17890         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
17891         _obstack_allocated_p, _obstack_free, obstack_free,
17892         _obstack_memory_used, print_and_abort):
17893         Define using prototypes.
17894         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
17895         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
17896         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
17897         obstack_next_free, obstack_object_size, obstack_room) [0]:
17898         Remove unused, unprototyped code.
17899
17900         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
17901
17902         * lib/physmem.c (physmem_total, physmem_available, main): Define
17903         with prototypes.
17904
17905         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
17906         (main): Define with a prototype.
17907
17908         * lib/posixver.c (getenv): Remove decl.
17909
17910         * lib/putenv.c (malloc): Returns void *, not char *.
17911         Include <string.h> unconditionally.
17912         (strchr, memcpy, NULL): Do not define.
17913
17914         * lib/readtokens.c: Include readtokens.h first, to test interface.
17915         Include <stdlib.h>, <string.h> unconditionally.
17916         (init_tokenbuffer): Define with a prototype.
17917
17918         * lib/regex.c (PARAMS): Remove.  All uses removed.
17919         All uses of _RE_ARGS removed, too.
17920         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17921         unconditionally.
17922         (bzero): Assume memset exists.
17923         (memcmp, memcpy, NULL): Remove.
17924         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
17925         char, or assignments to local vars of type signed char.
17926         (init_syntax_once, PREFIX(extract_number_and_incr),
17927         PREFIX(print_partial_compiled_pattern),
17928         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
17929         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
17930         PREFIX(regex_grow_registers), PREFIX(regex_compile),
17931         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
17932         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
17933         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
17934         wcs_compile_range, byte_compile_range, truncate_wchar,
17935         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
17936         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
17937         count_mbs_length, wcs_re_match_2_internal,
17938         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
17939         PREFIX(alt_match_null_string_p),
17940         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
17941         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
17942         regfree, PREFIX(extract_number)): Define with prototype.  Remove
17943         now-unnecessary declaration, if any.
17944         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
17945         regcomp, regexec):
17946         Remove now-unnecessary casts among pointer types.
17947         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
17948
17949         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
17950         (free): Remove decl.
17951
17952         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
17953
17954         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
17955         (free): Remove decl.
17956
17957         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
17958         * lib/xgetcwd.c: Likewise.
17959
17960         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
17961         (free): Remove decl.
17962
17963         * lib/strchrnul.c (strchrnul): Define with a prototype.
17964         Fix bug: c_in was not converted to char before searching.
17965
17966         The following changes are not K&R related:
17967
17968         * lib/group-member.h: Include <sys/types.h>, so that this file is
17969         self-contained.
17970         * lib/makepath.h: Likewise.
17971
17972         * lib/getusershell.c (readname, default_index, line_size, readname):
17973         Use size_t, not int, for sizes.
17974         (readname): If the size overflows, report an error instead of
17975         looping forever.
17976
17977 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17978
17979         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
17980         libc.
17981
17982 2003-09-09  Paul Eggert  <eggert@twinsun.com>
17983
17984         * README: New section: portability guidelines.
17985
17986 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17987
17988         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
17989         C89 spec.
17990
17991 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
17992
17993         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
17994
17995 2003-09-08  Paul Eggert  <eggert@twinsun.com>
17996
17997         Assume C89 or better; remove K&R cruft.
17998         A few of these changes were first proposed by Derek Robert Price
17999         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18000
18001         * lib/addext.c: Include <string.h> unconditionally.
18002         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18003         Don't declare getenv or malloc.
18004
18005         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18006         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18007         (NULL): Remove.
18008         (find_stack_direction, alloca): Use prototypes.
18009
18010         * lib/atexit.c (atexit): Define using a prototype.
18011
18012         * lib/basename.c, dirname.c, stripslash.c:
18013         Include <string.h> unconditionally.
18014
18015         * lib/bcopy.c: Include <stddef.h>.
18016         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18017
18018         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18019
18020         * lib/error.h (error, error_at_line, error_print_progname)
18021         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18022         * lib/error.c: Include error.h first, to check interface.
18023         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18024         (VA_START): Remove; all uses changeed to va_start.
18025         (exit, strerror): Remove decls.
18026         (error_print_progname): Prototype uncondionally.
18027         Don't include <errno.h>; no longer needed.
18028         (private_strerror): Remove.
18029         (error_tail): Always define.
18030         (error, error_at_line): Assume C89 or better; always use prototypes.
18031         * lib/fatal.c: Include "fatal.h" first, to test interface.
18032         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18033         (VA_START): Remove; all uses changed to va_start.
18034         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18035         this case.
18036         (exit): Remove decl.
18037         (fatal): Prototype unconditionally.  Assume va_start works.
18038         Abort at end, to pacify gcc.
18039
18040         * lib/euidaccess.c (main): Define with a prototype.
18041
18042         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18043
18044         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18045
18046         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18047         prototypes.
18048         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18049         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18050         (getenv): Remove decl.
18051         (fnmatch): Define using a prototype.
18052         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18053         (FCT): Define using a prototype.
18054
18055         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18056
18057         * lib/gethostname.c: Include <stddef.h>.
18058         (gethostname): Define with prototype.  Length is size_t, not int.
18059
18060 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18061
18062         Assume C89 or better; remove K&R cruft.
18063         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18064         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18065         string.h, getenv, malloc.
18066         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18067         headers.
18068         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18069         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18070         do not check for strerror.
18071         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18072         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18073         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18074         do not check for doprnt or vprintf.
18075         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18076         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18077
18078 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18079
18080         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18081         getversion.c should have been removed then, but was accidentally
18082         preserved.
18083
18084         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18085         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18086
18087 2003-09-08  Karl Berry  <karl@gnu.org>
18088
18089         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18090                 config, forget about prep.
18091
18092         * config/depcomp, missing: update from automake.
18093
18094 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18095
18096         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18097         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18098
18099 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18100
18101         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18102         copy_tm_result.  Bug reported by Simon Josefsson in
18103         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18104
18105 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18106
18107         * m4/time_r.m4: New file.
18108         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18109         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18110         is. Check for timegm declaration.
18111         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18112         Do not check for gmtime_r.
18113         Replace mktime if __mktime_internal does not exist and if mktime
18114         hasn't been replaced already.
18115
18116 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18117
18118         * lib/time_r.c, lib/time_r.h: New files.
18119
18120         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18121         __localtime_r.
18122         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18123         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18124
18125         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18126         __gmtime_r.
18127         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18128         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18129         Include <time_r.h>.
18130
18131         * lib/timegm.c: Switch to glibc implementation, with the following
18132         changes:
18133         [defined HAVE_CONFIG_H]: Include <config.h>.
18134         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18135         (__mktime_internal) [!defined _LIBC]: New decl.
18136         (__gmtime_r) [!defined _LIBC]: New macro and function.
18137         (timegm): Use a prototype, since gnulib assumes C89.
18138         Do not bother declaring tmp to be const, as it's not really usefu.
18139         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18140         (timegm): Declare only if HAVE_DECL_TIMEGM.
18141
18142 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18143
18144         * MODULES.html.sh (func_all_modules): Add time_r.
18145         * modules/time_r: New file.
18146         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18147         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18148
18149 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18150
18151         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18152         Bug reported by Lute Kamstra in
18153         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18154
18155         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18156         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18157         course with correspondingly smaller numbers for tomorrow and
18158         yesterday.  From Tadayoshi Funaba.  Originally installed into
18159         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18160         coreutils merge?).
18161
18162 2003-08-31  Simon Josefsson  <jas@extundo.com>
18163
18164         * modules/timegm: New file.
18165         * MODULES.html.sh (func_all_modules): Add timegm.
18166
18167 2003-08-31  Simon Josefsson  <jas@extundo.com>
18168
18169         * m4/timegm.m4: New file.
18170
18171 2003-08-31  Simon Josefsson  <jas@extundo.com>
18172
18173         * lib/timegm.h: New file.
18174         * lib/timegm.c: New file.  Based on
18175         wget-1.8.2/src/http.c:mktime_from_utc.
18176
18177 2003-08-31  Karl Berry  <karl@gnu.org>
18178
18179         * lib/argp.h: update from libc.
18180
18181 2003-08-28  Bruno Haible  <bruno@clisp.org>
18182
18183         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18184         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18185         followed by '#define fnmatch fnmatch_posix' gives an error.
18186
18187 2003-08-28  Bruno Haible  <bruno@clisp.org>
18188
18189         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18190         warning on QNX, which defines O_BINARY to 000000.
18191
18192 2003-08-27  Jim Meyering  <jim@meyering.net>
18193
18194         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18195         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18196         would fail after 32.  Reported by Danny Levinson.  Details here:
18197         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18198
18199 2003-08-24  Bruno Haible  <bruno@clisp.org>
18200
18201         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18202         MSVC7 <stdio.h> is included later.
18203
18204 2003-08-22  Simon Josefsson  <jas@extundo.com>
18205
18206         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18207
18208 2003-08-20  Karl Berry  <karl@gnu.org>
18209
18210         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18211
18212 2003-08-20  Bruno Haible  <bruno@clisp.org>
18213
18214         * modules/progname: New file.
18215         * MODULES.html.sh (func_all_modules): Add progname.
18216
18217 2003-08-20  Bruno Haible  <bruno@clisp.org>
18218
18219         * lib/progname.h: New file, from GNU gettext.
18220         * lib/progname.c: New file, from GNU gettext.
18221         * lib/progreloc.c: New file, from GNU gettext.
18222
18223 2003-08-19  Jim Meyering  <jim@meyering.net>
18224
18225         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18226         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18227
18228 2003-08-19  Bruno Haible  <bruno@clisp.org>
18229
18230         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18231         more.
18232
18233 2003-08-19  Bruno Haible  <bruno@clisp.org>
18234
18235         * lib/xstrdup.c: Assume <string.h> exists.
18236
18237 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18238
18239         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18240         in makefile rules.
18241
18242 2003-08-18  Jim Meyering  <jim@meyering.net>
18243
18244         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18245         * m4/lib-ld.m4: Likewise.
18246
18247 2003-08-18  Jim Meyering  <jim@meyering.net>
18248
18249         * lib/setenv.h: Indent nested cpp directive.
18250         * lib/vasnprintf.c: Remove trailing blanks.
18251
18252 2003-08-17  Simon Josefsson  <jas@extundo.com>
18253
18254         * modules/xstrndup: New file.
18255         * MODULES.html.sh (func_all_modules): Add xstrndup.
18256
18257 2003-08-17  Simon Josefsson  <jas@extundo.com>
18258
18259         * modules/argp: Fix autoconf macro name. Add more dependencies.
18260
18261 2003-08-17  Simon Josefsson  <jas@extundo.com>
18262
18263         * m4/xstrndup.m4: New file.
18264
18265 2003-08-17  Simon Josefsson  <jas@extundo.com>
18266
18267         * m4/argp.m4: New file.
18268
18269 2003-08-17  Simon Josefsson  <jas@extundo.com>
18270             Bruno Haible  <bruno@clisp.org>
18271
18272         * lib/xstrndup.h: New file.
18273         * lib/xstrndup.c: New file.
18274
18275 2003-08-17  Bruno Haible  <bruno@clisp.org>
18276
18277         * modules/strndup (Files, Include): Add lib/strndup.h.
18278
18279 2003-08-17  Bruno Haible  <bruno@clisp.org>
18280
18281         * modules/euidaccess (Files): Add lib/euidaccess.h.
18282
18283 2003-08-17  Bruno Haible  <bruno@clisp.org>
18284
18285         * lib/strndup.h: New file.
18286
18287 2003-08-17  Bruno Haible  <bruno@clisp.org>
18288
18289         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18290         like AC_GNU_SOURCE.
18291         * modules/extensions (configure.ac): Comment out the invocation of
18292         gl_USE_SYSTEM_EXTENSIONS.
18293
18294 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18295
18296         Merges from coreutils, etc.
18297         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18298         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18299         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18300         fixing a typo.
18301         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18302         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18303
18304 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18305
18306         Document merge from coreutils.
18307         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18308         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18309         * modules/utime: Add m4/utimes-null.m4.
18310
18311 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18312
18313         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18314         space, undoing this 2003-08-12 change:
18315         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18316
18317 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18318
18319         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18320         strtoul.c from libc, undoing this 2003-08-12 change:
18321         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18322
18323 2003-08-16  Jim Meyering  <jim@meyering.net>
18324
18325         Merges from coreutils.
18326         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18327         prefix.  Adjust cache variables similarly.  Create 500 rather than
18328         just 300 files, to exercise bug on Darwin6.5, too.
18329         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18330         $missing_dir.
18331         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18332         AM_SYS_POSIX_TERMIOS.
18333         Reported by mkc@mathdogs.com.
18334         Also change use of $am_cv_sys_posix_termios
18335         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18336         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18337         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18338         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18339         in /proc/mounts until it finds one with matching device number.  This
18340         is unnecessary when the FILE argument *is* a mount point.  No stat call
18341         is necessary in that case.  So, disable the statvfs-testing code on
18342         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18343         as RedHat bug# 84846.
18344         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18345         to 1MB, so as not to render systems with no stack size limit (e.g.,
18346         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18347         Include <unistd.h>.  On some systems,
18348         it is required for the definition of _SC_PAGESIZE.
18349
18350 2003-08-16  Jim Meyering  <jim@meyering.net>
18351
18352         Merge from coreutils.
18353         * lib/xstrtoimax.c: #else #if -> #elif.
18354         * lib/xstrtoumax.c: Likewise.
18355
18356 2003-08-16  Jim Meyering  <jim@meyering.net>
18357
18358         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18359         * m4/utimes.m4: Removed.
18360         * m4/utimes-null.m4: Renamed from utimes.m4.
18361
18362         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18363         to 1MB, so as not to render systems with no stack size limit (e.g.,
18364         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18365         Include <unistd.h>.  On some systems,
18366         it is required for the definition of _SC_PAGESIZE.
18367
18368 2003-08-16  Jim Meyering  <jim@meyering.net>
18369         and Paul Eggert  <eggert@cs.ucla.edu>
18370
18371         Merges from coreutils, etc.
18372
18373         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18374         using the latest version from cvs.  This avoids problems with #line
18375         directives using a vendor (Sun) compiler.
18376         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18377         Don't set GETGROUPS_LIB here; now it's
18378         done via getgroups.m4's wrapper function.
18379         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18380         rather than just in sh-util/configure.in, so that the
18381         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18382         same.
18383         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18384         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18385         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18386         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18387         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18388         Remove code that is now done by the newly-required macros.
18389         Append $(EXEEXT) to DF_PROG.
18390         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18391         Do not invoke or require the following here,
18392         since prereq.m4 or some gnulib .m4 now does this for us:
18393         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18394         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18395         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18396         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18397         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18398         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18399         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18400         AC_FUNC_OBSTACK.
18401         Do not replace the following functions, as this is now the job
18402         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18403         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18404         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18405         atexit getpass, strdup, getpagesize.
18406         Replace 'raise'.
18407         Do not check for the following functions, as this is now the job
18408         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18409         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18410         setregid.
18411         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18412         Check for sys/sysctl.h.
18413         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18414         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18415         of checking for ssize_t ourselves.
18416
18417         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18418         Require every macro that gnulib/modules/* suggests for us.
18419         (jm_PREREQ_ADDEXT): New macro.
18420         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18421         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18422
18423         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18424         (gl_PHYSMEM): Use it.
18425         Also check for `table' function.
18426         Check for new headers and functions.
18427         Add check for sys/sysmp.h.
18428         With suggestions from Kaveh Ghazi.
18429         Ignore headers that are present but cannot be compiled.  This
18430         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18431         C 5.4.
18432
18433 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18434
18435         Document merge from coreutils.
18436         * modules/userspec: Depend on posixver.
18437         * modules/strftime: Depend on tzset.
18438
18439 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18440
18441         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18442         rather than tab, after '#' in shell-script copyright notices.
18443         Suggested by Bruno Haible.
18444
18445 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18446
18447         * config/srclist-update: Use three spaces, rather than tab, after '#'
18448         in shell-script copyright notices.  Suggested by Bruno Haible.
18449         Remove unnecessary parenthesization in regular expression.
18450
18451 2003-08-15  Jim Meyering  <jim@meyering.net>
18452
18453         Merge from coreutils.
18454         * lib/xgethostname.c: Include <stdlib.h>.
18455         (xghostname): Don't exit for anything other than memory-related
18456         failure; just return NULL.
18457         * lib/userspec.c: Include "posixver.h".
18458         (parse_user_spec): Accept `.' as a separator only
18459         in pre-POSIX-200112 mode.
18460         * lib/strtoimax.c: Use #elif rather than #else #if.
18461         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18462         Remove function, now that we can rely on a working tzset function.
18463         [!_LIBC]: Ensure that the required autoconf test has been run.
18464         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18465         Use underlying_strftime for %r.
18466         * lib/sha.c: Merge in some clean-up and optimization changes from
18467         glibc.
18468         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18469         Ensure that it is a multiple of 64.
18470         Rearrange loop exit tests so as to avoid performing an
18471         additional fread after encountering an error or EOF.
18472         * lib/realloc.c: Update copyright date.
18473
18474 2003-08-15  Jim Meyering  <jim@meyering.net>
18475         and Paul Eggert  <eggert@twinsun.com>
18476
18477         Merge from coreutils.
18478         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18479         member but strut utmpx does not.  Needed for AIX 4.3.3.
18480         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18481
18482 2003-08-15  Jim Meyering  <jim@meyering.net>
18483         and Paul Eggert  <eggert@cs.ucla.edu>
18484
18485         Merges from coreutils, etc.
18486         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18487         Require gl_FUNC_TZSET_CLOBBER.
18488         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18489         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18490         members.
18491
18492 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18493
18494         Help the merge from coreutils.
18495         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18496         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18497         * m4/tzset.m4: Use it too.
18498
18499 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18500
18501         * modules/tzset: New file.
18502
18503 2003-08-14  Jim Meyering  <jim@meyering.net>
18504
18505         Merges from coreutils.
18506         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
18507         variable names, rather than @FNMATCH_H@.
18508         * modules/alloca: Likewise for $(ALLOCA_H).
18509
18510         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
18511         the three copies of the literal target, `fnmatch.h'.
18512         * modules/alloca (alloca.h): Likewise.
18513
18514 2003-08-14  Jim Meyering  <jim@meyering.net>
18515
18516         Merge from coreutils.
18517         * m4/tzset.m4: New file.
18518         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
18519         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
18520         otherwise, AIX 5.1 systems would end up using the latter.
18521         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
18522         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
18523         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
18524         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
18525
18526 2003-08-14  Jim Meyering  <jim@meyering.net>
18527
18528         Merge from coreutils.
18529         * lib/obstack.h: Whitespace changes.
18530         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
18531         and xcalloc return values.
18532         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
18533         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
18534         hang on OSF/1 5.1 for DIR on both local and remote file systems.
18535         Reported by (and fix confirmed by) Nelson H. F. Beebe.
18536         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18537         error from mntctl.
18538         Use mntctl's return value to drive the entry-processing loop, since
18539         we can't rely on the value of the vmt_length member in the last
18540         entry.  On some systems doing so could result in exhausting
18541         virtual memory.  Based in part on a patch from Mike Jetzer.
18542
18543 2003-08-14  Jim Meyering  <jim@meyering.net>
18544         and Paul Eggert  <eggert@twinsun.com>
18545
18546         Merges from coreutils, plus other fixes.
18547         * lib/physmem.c: Merge in portability changes from gcc/libiberty
18548         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
18549         for credits and details.  Thanks to Kaveh Ghazi for helping
18550         to keep these files in sync.
18551         (ARRAY_SIZE): Define it.
18552         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
18553         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
18554         (memcasecmp): Don't assume size_t fits in unsigned int.
18555         Remove casts and duplicate code.
18556         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
18557         (memcpy): Remove definition.
18558         Merge in some clean-up and optimization changes from glibc.
18559         [BLOCKSIZE]: Move definition to top of file.
18560         Ensure that it is a multiple of 64.
18561         Rearrange loop exit tests so as to avoid performing an
18562         additional fread after encountering an error or EOF.
18563         * lib/md5.h (md5_uintptr): Define.
18564         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
18565         return to the initial working directory.  Preserve errno
18566         for caller.
18567         * lib/idcache.c: Include "xalloc.h".
18568         (xmalloc, xrealloc): Remove decls.
18569         (getuser): Remove casts no longer required in C89.
18570         * lib/human.c: Include stdio.h, for sprintf.
18571         * lib/group-member.c: Include "xalloc.h".
18572         (xmalloc, xrealloc): Remove decls.
18573         (get_group_info): Remove casts no longer required in C89.
18574         * lib/getusershell.c (readname): Remove casts no longer required in
18575         C89.
18576         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
18577         * lib/getline.c: Whitespace fix, from coreutils.
18578
18579 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18580
18581         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
18582         Check for isascii.
18583
18584         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18585         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18586         Undo previous (whitespace-only) change.
18587
18588 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18589
18590         * lib/exclude.c: Include <ctype.h>
18591         (IN_CTYPE_DOMAIN): New macro.
18592         (is_space): New fn.
18593         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
18594         and empty lines.
18595
18596         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18597         Undo previous (whitespace-only) change.
18598
18599 2003-08-13  Paul Eggert  <eggert@twinsun.com>
18600
18601         * config/srclist-update: Change update back to the old behavior,
18602         leaving whitespace alone.  Use one 'sed' command rather than a
18603         pipeline.
18604         (fixlicense): Now a variable, not a function.
18605         (remove_trailing_blanks): Remove.
18606         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
18607         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18608         Undo previous (whitespace-only) change.
18609
18610 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18611
18612         Merge from coreutils.
18613         * modules/euidaccess: Add lib_SOURCES, include for new
18614         file euidaccess.h
18615
18616 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18617
18618         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
18619         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
18620         Normalize leading white space and remove trailing white space.
18621
18622         Merge from coreutils
18623         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
18624
18625         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
18626         0.12.1.  These files are now being upgraded automatically by
18627         ../config/srclist-update.
18628
18629 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18630
18631         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
18632         Normalize leading white space and remove trailing white space.
18633         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
18634         notice, as per ../config/srclist-update.
18635
18636         Merge from coreutils.
18637         * lib/euidaccess.h: New file.
18638         * lib/euidaccess.c: Include it.
18639         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
18640         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
18641         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
18642
18643 2003-08-12  Paul Eggert  <eggert@twinsun.com>
18644
18645         * config/srclist-update: Add copyright notice.
18646         (remove_id_lines, remove_trailing_blanks): New constants.
18647         (fixfile): Use them to normalize spacing a bit in copied files.
18648         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
18649         Normalize leading white space and remove trailing white space.
18650
18651         * config/texinfo.tex: Sync with texinfo.
18652
18653         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
18654         strtoul.c from libc, to merge coreutils whitespace changes.
18655
18656         * config/srclist.txt: Get the following m4 files from gettext:
18657         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
18658         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
18659         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
18660         wint_t.m4.
18661
18662 2003-08-12  Karl Berry  <karl@gnu.org>
18663
18664         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
18665         been made.
18666
18667 2003-08-11  Paul Eggert  <eggert@twinsun.com>
18668
18669         * modules/gnu-source, m4/gnu-source.m4:
18670         Remove; we're assuming Autoconf 2.54 or later now.
18671         Suggested by Bruno Haible.
18672         * MODULES.html.sh (func_all_modules): Remove gnu-source.
18673
18674 2003-08-11  Bruno Haible  <bruno@clisp.org>
18675
18676         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
18677
18678 2003-08-11  Bruno Haible  <bruno@clisp.org>
18679
18680         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
18681         (vasnprintf): Use it instead of wcslen.
18682
18683 2003-08-11  Bruno Haible  <bruno@clisp.org>
18684
18685         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
18686         value to ensure that _Bool promotes to int. Use #define for _Bool when
18687         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
18688
18689 2003-08-10  Karl Berry  <karl@gnu.org>
18690
18691         * lib/regex.h: update from libc (whitespace fix).
18692
18693 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18694
18695         Merge some files from coreutils.  These changes were
18696         originally made by Jim Meyering.
18697         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
18698         many older Unixes require this.
18699         * lib/alloca.c (alloca): Remove cast to argument of free;
18700         no longer needed in C89.
18701         * lib/alloca_.h, regex.h: Fix white space to match
18702         what GNU indent does.
18703
18704 2003-08-09  Paul Eggert  <eggert@twinsun.com>
18705
18706         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
18707         apparently Emacs's Unicode mode got confused before my 2003-08-05
18708         checkin.
18709
18710 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18711
18712         * m4/extensions.m4: New file.
18713         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
18714         Require gl_USE_SYSTEM_EXTENSIONS.
18715         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
18716         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
18717
18718 2003-08-08  Paul Eggert  <eggert@twinsun.com>
18719
18720         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
18721         * modules/extensions, modules/gnu-source: New files.
18722         * modules/timespec, modules/unlocked-io: Depend on extensions.
18723
18724 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18725
18726         * modules/restrict: New file.
18727         * MODULES.html.sh (func_all_modules): Add restrict.
18728         * modules/regex: Depend on restrict.
18729
18730 2003-08-07  Paul Eggert  <eggert@twinsun.com>
18731
18732         * m4/restrict.m4: New file.
18733         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
18734
18735 2003-08-07  Bruno Haible  <bruno@clisp.org>
18736
18737         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
18738         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
18739
18740 2003-08-07  Bruno Haible  <bruno@clisp.org>
18741
18742         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
18743         makes the module 'getndelim2' compatible with the module 'getline'.
18744
18745 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18746
18747         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
18748         byte with "\201" to avoid glitches when editing that source file
18749         with multi-gnome-terminal.
18750
18751 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18752
18753         * lib/bumpalloc.h: Remove.
18754
18755 2003-08-05  Paul Eggert  <eggert@twinsun.com>
18756
18757         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
18758         * modules/bumpalloc: Remove.
18759
18760 2003-08-04  Paul Eggert  <eggert@twinsun.com>
18761
18762         * lib/getloadavg.c: Change copyright notice and spacing to conform to
18763         GNU coding style.
18764
18765         Merge from coreutils.
18766         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
18767         1. From glibc.
18768         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
18769         from Karl Berry, implemented by Jim Meyering.
18770         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
18771         from Dmitry V. Levin.
18772         Remove anachronistic cast of xrealloc.
18773         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
18774         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
18775         type. Otherwise, it wouldn't compile with at least /bin/cc on
18776         ymp-cray-unicos9.0.2.X.
18777         Combine two mostly-identical uses of alloca into one.
18778         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
18779
18780 2003-08-04  Dave Love  <d.love@dl.ac.uk>
18781
18782         [From Emacs.]
18783
18784         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
18785         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
18786         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
18787         obsolete NLIST_NAME_UNION.
18788         [__GNU__]: Undef BSD and FSCALE.
18789         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
18790
18791 2003-08-03  Paul Eggert  <eggert@twinsun.com>
18792
18793         * lib/stdbool_.h (_Bool): Make it signed char, instead of
18794         an enum type, so that it's guaranteed to promote to int.  See:
18795         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
18796
18797 2003-08-03  Karl Berry  <karl@gnu.org>
18798
18799         * config/depcomp: update from automake.
18800
18801 2003-07-31  Paul Eggert  <eggert@twinsun.com>
18802
18803         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
18804         (strerror): Don't assume that a printable int fits in 14 bytes.
18805
18806 2003-07-31  Bruno Haible  <bruno@clisp.org>
18807
18808         * modules/getpass-gnu: New file.
18809         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
18810
18811 2003-07-31  Bruno Haible  <bruno@clisp.org>
18812
18813         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
18814
18815 2003-07-24  Karl Berry  <karl@gnu.org>
18816
18817         * config/missing: update from automake.
18818
18819 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
18820             Bruno Haible  <bruno@clisp.org>
18821
18822         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
18823         * lib/getline.c (getline, getdelim): Likewise.
18824         Remove _GNU_SOURCE define; now it's defined in config.h through
18825         m4/getline.m4.
18826
18827 2003-07-23  Karl Berry  <karl@gnu.org>
18828
18829         * config/config.sub: update from prep.
18830
18831 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18832
18833         * modules/xalloc (Depends-on): Add exitfail.
18834         * modules/xmemcoll: Likewise.
18835
18836 2003-07-22  Paul Eggert  <eggert@twinsun.com>
18837
18838         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
18839         over-parenthesization in macros.
18840
18841         Sync with coreutils.
18842
18843         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
18844         required by C99.
18845
18846         Use `exit_failure' for xalloc and xmemcoll instead of their own
18847         private exit-failure variables.
18848         * lib/xalloc.h (xalloc_exit_failure): Remove.
18849         * lib/xmalloc.c: Likewise.  Include exitfail.h.
18850         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
18851         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
18852         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
18853         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
18854
18855 2003-07-20  Jim Meyering  <jim@meyering.net>
18856
18857         * modules/closeout (Depends-on): Add exitfail.
18858         Suggestion from Bruno Haible.
18859
18860 2003-07-19  Karl Berry  <karl@gnu.org>
18861
18862         * config/config.sub: update from prep.
18863
18864 2003-07-18  Paul Eggert  <eggert@twinsun.com>
18865
18866         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
18867         Remove.
18868         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
18869         to test that it can stand by itself.  Include "exitfail.h".
18870         Clients should set exit_failure instead.
18871         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
18872
18873 2003-07-18  Bruno Haible  <bruno@clisp.org>
18874
18875         * modules/getndelim2: New file.
18876         * modules/getline: Share files with module getndelim2.
18877         * modules/getnline: Depend on getndelim2 instead of sharing files with
18878         it. Add getnline.c to lib_SOURCES.
18879         * MODULES.html.sh (func_all_modules): Add getndelim2.
18880
18881 2003-07-18  Bruno Haible  <bruno@clisp.org>
18882
18883         * m4/getndelim2.m4: New file.
18884         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
18885         invoke gl_PREREQ_GETNDELIM2.
18886         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
18887         gl_PREREQ_GETNDELIM2.
18888         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
18889         gl_GETNDELIM2.
18890
18891 2003-07-18  Bruno Haible  <bruno@clisp.org>
18892
18893         * lib/getndelim2.h: New file.
18894         * lib/getndelim2.c: Make into a module of its own. Include config.h,
18895         getndelim2.h.
18896         (getndelim2): Make non-static. Change return type to ssize_t.
18897         * lib/getline.h: Change argument names.
18898         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
18899         * lib/getnline.c: Include getndelim2.h.
18900
18901 2003-07-18  Andreas Schwab  <schwab@suse.de>
18902
18903         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
18904
18905 2003-07-17  Karl Berry  <karl@gnu.org>
18906
18907         * config/config.sub: update from prep.
18908
18909 2003-07-17  Bruno Haible  <bruno@clisp.org>
18910
18911         * modules/getnline: New file.
18912         * modules/getline: Add lib/getndelim2.c to source file list.
18913         * MODULES.html.sh (func_all_modules): Add getnline.
18914
18915 2003-07-17  Bruno Haible  <bruno@clisp.org>
18916
18917         * m4/getnline.m4: New file.
18918
18919 2003-07-17  Bruno Haible  <bruno@clisp.org>
18920
18921         * m4/Makefile.am.in: Remove file.
18922         * m4/Makefile.am: Remove file.
18923         * m4/Makefile.in: Remove file.
18924
18925 2003-07-17  Bruno Haible  <bruno@clisp.org>
18926
18927         * lib/getnline.h: New file.
18928         * lib/getnline.c: New file.
18929         * lib/getndelim2.c: New file, extracted from getline.c.
18930         (getndelim2): Renamed from getdelim2, with added nmax argument.
18931         * lib/getline.c: Include getndelim2.c.
18932         (getdelim2): Moved out to getndelim2.c.
18933         (getline, getdelim): Update.
18934
18935 2003-07-17  Bruno Haible  <bruno@clisp.org>
18936
18937         * lib/Makefile.am: Remove file.
18938         * lib/Makefile.in: Remove file.
18939
18940 2003-07-17  Bruno Haible  <bruno@clisp.org>
18941
18942         * configure.in: Remove file.
18943         * Makefile.in: Remove file.
18944
18945 2003-07-17  Bruno Haible  <bruno@clisp.org>
18946
18947         * MODULES.html.sh: Put the </BODY> right before </HTML>.
18948
18949 2003-07-16  Karl Berry  <karl@gnu.org>
18950
18951         * config/srclist-update: was running fixlicense twice, which caused
18952                 texinfo.tex to be nullified for some reason.  Simplify,
18953                 $gplsrc is no longer needed as far as I can see?
18954
18955 2003-07-16  Jim Meyering  <jim@meyering.net>
18956
18957         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
18958
18959 2003-07-15  Paul Eggert  <eggert@twinsun.com>
18960
18961         * config/srclist.txt: Get the following files from gettext-runtime/intl
18962         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
18963         ref-del.sin.  From Bruno Haible.
18964         * config/srclist-update (fixfile): Change grep pattern again, since the
18965         previous fix didn't work (there was another trailing $).  Use
18966         '[$]' to escape the $s.
18967
18968 2003-07-15  Karl Berry  <karl@gnu.org>
18969
18970         * lib/vasnprintf.c: update from gettext.
18971
18972 2003-07-15  Karl Berry  <karl@gnu.org>
18973
18974         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
18975         gets expanded when surrounded by '$'.
18976
18977 2003-07-15  Jim Meyering  <jim@meyering.net>
18978
18979         * modules/save-cwd: Don't depend on error.  From Derek Price.
18980
18981 2003-07-15  Jim Meyering  <jim@meyering.net>
18982
18983         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
18984
18985 2003-07-14  Simon Josefsson  <jas@extundo.com>
18986
18987         * modules/mempcpy: New file.
18988         * MODULES.html.sh (func_all_modules): Add mempcpy.
18989
18990 2003-07-14  Simon Josefsson  <jas@extundo.com>
18991
18992         * m4/mempcpy.m4: New file.
18993
18994 2003-07-14  Simon Josefsson  <jas@extundo.com>
18995
18996         * lib/mempcpy.h: New file.
18997         * lib/mempcpy.c: New file.
18998
18999 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19000
19001         * modules/getdate, modules/posixtm: Depend on mktime.
19002
19003 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19004
19005         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19006         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19007         unicodeio.c, unicodeio.h, unlocked-io.h:
19008         Switch from LGPL to GPL.
19009
19010 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19011
19012         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19013         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19014         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19015         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19016         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19017         updated automatically by ../config/srclist-update.  This changes
19018         their license from LPGL to GPL.
19019
19020 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19021
19022         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19023         assumed to refer to the root of the most recent stable gettext version.
19024         * config/srclistvars.sh: Add defaults for eggert.
19025         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19026         Match "This program" as well as "The program".  This is needed
19027         for gettext.
19028
19029 2003-07-14  Jim Meyering  <jim@meyering.net>
19030
19031         Don't emit diagnostics.  Let callers do that.
19032         * lib/save-cwd.c: Don't include "error.h".
19033         (save_cwd): Don't call error.  Ensure that errno is valid
19034         when returning nonzero.
19035
19036         * lib/save-cwd.h (restore_cwd): Update prototype.
19037         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19038         Simplify.  Don't call error upon failure.  Let callers do that.
19039         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19040         when auditing is enabled.  But don't bother updating the #if.
19041
19042 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19043
19044         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19045         it breaks C++ compilation.
19046         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19047
19048 2003-07-10  Simon Josefsson  <jas@extundo.com>
19049
19050         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19051
19052 2003-07-10  Jim Meyering  <jim@meyering.net>
19053
19054         * m4/clock_time.m4: Remove trailing blank.
19055         * m4/intmax_t.m4: Likewise.
19056
19057 2003-07-10  Jim Meyering  <jim@meyering.net>
19058
19059         * lib/vasnprintf.c: Remove trailing blanks.
19060         Make cpp indentation consistent.
19061
19062 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19063
19064         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19065         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19066         Switch from LGPL to GPL.
19067
19068 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19069
19070         * config/srclist.txt: Sort sublists.  Add
19071         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19072         that differ from gnulib for one reason or another; we'd like this list
19073         to be smaller but for now let's document what we have.
19074
19075 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19076
19077         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19078         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19079         and sweeter "eval x=$x".
19080         * config/srclist.txt: Get lib/argp* from glibc.
19081
19082 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19083
19084         * lib/mktime.c: Fix some boundary cases and remove need for floating
19085         point.
19086
19087         Issue a compile-time diagnostic if time_t is floating point, or if
19088         two's complement arithmetic is not in effect, or if arithmetic
19089         right shift does not propagate the sign.  These assumptions were
19090         all in the original code but they weren't checked.
19091
19092         (TIME_T_MIDPOINT, verify): New macros.
19093         (__isleap): Remove; it has integer overflow problems.
19094         (leapyear): New function, without those problems.
19095         (ydhms_tm_diff): Remove; splitting into two parts.
19096         (ydhms_diff): New function, containing the arithmetic part of
19097         the old ydhms_tm_diff function.  Issue a compile-time
19098         diagnostic if we are not using C99 integer division.
19099         Avoid casts when possible.
19100         (guess_time_tm): New function, containing the checking part of
19101         the old ydhms_tm_diff function.  Return the new value, rather than
19102         the difference between it and the old.  Accept a new argument T
19103         so that *T specifies the old value.  Check for overflow in the result.
19104
19105         (__mktime_internal): Use a time_t offset, not a long int offset.
19106         This undoes the 2003-06-04 change, which is no longer needed now
19107         that we have better overflow checking.
19108         (localtime_offset): Likewise.
19109
19110         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19111         and long are 64-bit but int is only 32-bit.
19112         (ydhms_diff): Use long int to store year1 and yday1.
19113         Issue a compile-time diagnostic if long int is not wide enough.
19114
19115         (__mktime_internal): Use long int to store adjusted year and yday.
19116         Use plain C rather than preprocessor commands, if that doesn't
19117         affect efficiency.
19118         Check for overflow (and try to repair) after each probe
19119         rather than checking only at the very end.  This avoids some bugs
19120         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19121         does not equal GMT offset at maximum time).
19122         Use integer to check for overflow rather than floating point; this
19123         is more portable to non-IEEE hosts, and is a tad faster.
19124         When we detect that we are oscillating between two values,
19125         don't check whether tm_isdst has the requested value, since
19126         we already know the answer.  When tm_isdst has the wrong value,
19127         use a different heuristic to find the right one, based on the
19128         extreme values actually observed in practice in tz2003a,
19129         rather than the (overly optimistic) "previous 3 calendar quarters".
19130
19131         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19132         "T const" to accommodate glibc style.
19133         (check_result): Use less-confusing report format.  "long" -> "long int.
19134         (main): Likewise.
19135         Don't loop if the iteration overflows time_t.
19136         Allow a negative step in the iteration.
19137
19138 2003-07-06  Karl Berry  <karl@gnu.org>
19139
19140         * config/depcomp: update from automake.
19141         * config/config.sub: update from prep.
19142
19143 2003-07-03  Karl Berry  <karl@gnu.org>
19144
19145         * config/config.guess: update from prep.
19146
19147 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19148
19149         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19150         xreadlink.c now includes it unconditionally.
19151
19152 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19153
19154         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19155         having it depend on HAVE_SYS_TYPES_H.
19156
19157 2003-07-01  Bruno Haible  <bruno@clisp.org>
19158
19159         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19160         <sys/types.h> should be sufficient.
19161         Reported by Paul Eggert.
19162
19163 2003-06-26  Karl Berry  <karl@gnu.org>
19164
19165         * config/depcomp: update from automake.
19166
19167 2003-06-26  Bruno Haible  <bruno@clisp.org>
19168
19169         * modules/human: Depend on module stdbool.
19170
19171 2003-06-25  Bruno Haible  <bruno@clisp.org>
19172
19173         * modules/readlink: New file.
19174         * modules/xreadlink: Depend on it.
19175         * MODULES.html.sh (func_all_modules): Add readlink.
19176
19177 2003-06-25  Bruno Haible  <bruno@clisp.org>
19178
19179         * m4/readlink.m4: New file.
19180
19181 2003-06-25  Bruno Haible  <bruno@clisp.org>
19182
19183         * lib/readlink.c: New file.
19184
19185 2003-06-22  Karl Berry  <karl@gnu.org>
19186
19187         * config/srclist.txt: update mkinstalldirs from automake.
19188         * config/mkinstalldirs: update.
19189
19190 2003-06-22  Bruno Haible  <bruno@clisp.org>
19191
19192         Portability to mingw32.
19193         * m4/ssize_t.m4: New file, from GNU gettext.
19194         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19195         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19196
19197 2003-06-22  Bruno Haible  <bruno@clisp.org>
19198
19199         * modules/safe-read: Add m4/ssize_t.m4.
19200         * modules/xreadlink: Add m4/ssize_t.m4.
19201
19202 2003-06-20  Bruno Haible  <bruno@clisp.org>
19203
19204         Assume C89, so PARAMS isn't needed.
19205         * lib/unicodeio.h (PARAMS): Remove.
19206         * lib/unicodeio.c: Don't use PARAMS.
19207
19208 2003-06-18  Karl Berry  <karl@gnu.org>
19209
19210         * config/config.{guess,sub}: update from prep.
19211
19212 2003-06-18  Jim Meyering  <jim@meyering.net>
19213
19214         Merge changes from coreutils.
19215         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19216         Remove explicit declarations of xmalloc and realloc.
19217         Include xalloc.h.
19218         (read_utmp): Remove anachronistic cast of xmalloc.
19219
19220 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19221
19222         Assume C89, so PARAMS isn't needed.
19223         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19224         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19225         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19226         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19227         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19228         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19229         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19230         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19231         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19232         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19233         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19234         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19235         no longer needed. Anyway, config.h should always be included before any
19236         other file.
19237
19238 2003-06-11  Simon Josefsson  <jas@extundo.com>
19239
19240         * modules/sysexits: New file.
19241         * MODULES.html.sh (func_all_modules): Add sysexits.
19242
19243 2003-06-11  Simon Josefsson  <jas@extundo.com>
19244
19245         * lib/sysexit_.h: New file.
19246
19247 2003-06-11  Derek Price  <derek@ximbiot.com>
19248
19249         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19250         necessary.
19251
19252 2003-06-11  Bruno Haible  <bruno@clisp.org>
19253
19254         * m4/sysexits.m4: New file.
19255
19256 2003-06-10  Simon Josefsson  <jas@extundo.com>
19257
19258         * lib/argp.h: New file, from glibc.
19259         * lib/argp-ba.c: New file, from glibc.
19260         * lib/argp-eexst.c: New file, from glibc.
19261         * lib/argp-fmtstream.c: New file, from glibc.
19262         * lib/argp-fmtstream.h: New file, from glibc.
19263         * lib/argp-fs-xinl.c: New file, from glibc.
19264         * lib/argp-help.c: New file, from glibc.
19265         * lib/argp-namefrob.h: New file, from glibc.
19266         * lib/argp-parse.c: New file, from glibc.
19267         * lib/argp-pv.c: New file, from glibc.
19268         * lib/argp-pvh.c: New file, from glibc.
19269         * lib/argp-xinl.c: New file, from glibc.
19270
19271 2003-06-10  Simon Josefsson  <jas@extundo.com>
19272
19273         * modules/strchrnul: New file.
19274
19275 2003-06-10  Simon Josefsson  <jas@extundo.com>
19276
19277         * modules/argp: New file.
19278
19279 2003-06-10  Simon Josefsson  <jas@extundo.com>
19280
19281         * m4/strchrnul.m4: New file.
19282
19283 2003-06-10  Simon Josefsson  <jas@extundo.com>
19284
19285         * lib/strchrnul.h: New file.
19286         * lib/strchrnul.c: New file.
19287
19288 2003-06-10  Bruno Haible  <bruno@clisp.org>
19289
19290         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19291
19292 2003-06-07  Karl Berry  <karl@gnu.org>
19293
19294         * config/config.{guess,sub}: update from prep.
19295
19296 2003-06-07  Jim Meyering  <jim@meyering.net>
19297
19298         * modules/strtod: Use $(...) notation, not @...@ for
19299         AC_REPLACE'd variables.
19300         * modules/localcharset: Likewise.
19301
19302 2003-06-07  Jim Meyering  <jim@meyering.net>
19303
19304         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19305         in place of my name in the copyright comment.
19306         Remove definition and uses of __P.
19307
19308         From coreutils.
19309         * lib/stat.c: Don't declare xmalloc explicitly.
19310         Instead, include "xalloc.h".
19311         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19312         xrealloc, and xcalloc return values.
19313         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19314         Improve comment.
19315         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19316
19317 2003-06-07  Bruno Haible  <bruno@clisp.org>
19318
19319         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19320         avoid AC_CONFIG_LINKS.
19321         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19322         fnmatch.h, to avoid AC_CONFIG_LINKS.
19323         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19324
19325 2003-06-07  Bruno Haible  <bruno@clisp.org>
19326
19327         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19328         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19329         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19330         directory.
19331         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19332         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19333         directory.
19334
19335 2003-06-06  Jim Meyering  <jim@meyering.net>
19336
19337         Merge from coreutils.
19338         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19339         Consolidate declarations and initializations of *_base* locals.
19340
19341         Merge from coreutils.
19342         This avoids a core dump on systems without GNU putenv,
19343         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19344         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19345         (unsetenv): New static function, from GNU libc.
19346         (rpl_putenv): Use it.
19347
19348         * lib/modechange.c: Remove trailing blanks.
19349
19350         Merge from coreutils.
19351         * lib/fsusage.c: Remove declaration of statfs.
19352         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19353
19354         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19355
19356 2003-06-06  Jim Meyering  <jim@meyering.net>
19357
19358         * lib/stdbool_.h: Renamed from stdbool.h.in.
19359
19360 2003-06-06  Jim Meyering  <jim@meyering.net>
19361             Bruno Haible  <bruno@clisp.org>
19362
19363         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19364         Adjust Makefile.am snippet not to redirect directly to target.
19365         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19366
19367 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19368
19369         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19370         mismatch, look in future quarters as well as past.  This fixes a
19371         bug when processing fall-backwards gaps immediately after a long
19372         period of daylight-saving time.
19373
19374         * lib/mktime.c: Assume freestanding C89 or better.
19375         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19376         (__P): Remove; not used.
19377         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19378         (mktime, not_equal_tm, print_tm, check_result,
19379         main): Use prototypes.  Use const * where appropriate.
19380         (main): Fix typo in testing code that uncovered by above changes.
19381         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19382
19383 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19384
19385         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19386         locale.h, localeconv.  This merges changes from coreutils.
19387
19388         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19389         It can be removed after the next Autoconf is released.
19390         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19391         needed.
19392
19393 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19394
19395         * lib/mktime.c: Fix Debian bug 177940
19396         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19397         (localtime_offset): Now long int, not time_t, because we want it
19398         to be guaranteed to be signed.  All uses changed.
19399         (__mktime_internal): If overflow would occur when adding offset,
19400         don't add it.
19401
19402         Merge 'human' changes from coreutils.  Rewrite to support
19403         locale-specific notations like thousands separators.
19404         * lib/human.c: Simplify authorship notice.
19405         Include human.h immediately after config.h.
19406         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19407         <limits.h>: Do not include, since human.h does.
19408         (SIZE_MAX, UINTMAX_MAX): New macros.
19409         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19410         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19411         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19412         (power_letter): Renamed from suffixes.
19413         (generate_suffix_backwards): Remove.
19414         (adjust_value): Now takes int style (because of human.h changes)
19415         and long double value (for greater precision on some platforms).
19416         (group_number): New function.
19417         (human_readable): Use it.  Use integer options, not enum.
19418         Put the options before the sizes in the arg list.
19419         Support all the new options.
19420         The old human_readable function has been removed;
19421         use inttostr.h instead.
19422         (human_readable, default_block_size, humblock):
19423         Use uintmax_t, not int, for block sizes.
19424         (human_readable_inexact, block_size_types): Remove.
19425         (block_size_opts): New constant.
19426         (human_options): Renamed from human_block_size, with new signature
19427         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19428         * lib/human.h: Add copyright and authorship notice.
19429         Include <limits.h> and <stdbool.h> unconditionally.
19430         (PARAMS): Remove.  All uses removed.
19431         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19432         (enum human_inexact_style): Remove tag; now a nameless enum.
19433         (human_floor, human_ceiling, human_round_to_even): Now have
19434         values 2, 0, 1 rather than -1, 1, 0.
19435         (human_group_digits, human_suppress_point_zero, human_autoscale,
19436         human_base_1024, human_SI, human_B): New constants.
19437         (human_readable_inexact, human_block_size): Remove.
19438         (human_readable): Size args are now uintmax_t, not int.
19439         (human_options): New decl.
19440
19441         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19442         unnecessary now that we assume C89 or better.  This change
19443         imported from coreutils.
19444
19445         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19446         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19447         in the 2003-05-30 sync from glibc.
19448
19449         .h files should stand alone, but we shouldn't include <sys/types.h>
19450         if we can get away with just <stddef.h>.
19451
19452         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19453         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19454         rather than <sys/types.h>, as we merely need size_t.
19455         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19456         to get size_t.
19457         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19458         Include <stdio.h>, to get FILE.
19459         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19460         memcasecmp.h has included <stddef.h> and all we need is size_t.
19461         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19462         our interface, instead of including <sys/types.h>
19463
19464 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19465
19466         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19467         now, as glibc mktime is buggy on non-glibc systems.
19468
19469 2003-06-03  Karl Berry  <karl@gnu.org>
19470
19471         * config/config.sub: update from prep.
19472
19473 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19474
19475         [from coreutils]
19476         Fix some minor time-related bugs with POSIX time arguments.
19477         Some valid time stamps were being rejected (notably -1, and
19478         time stamps before 1900 on 64-bit hosts).  And some invalid
19479         time stamps were being accepted, e.g. September 31.
19480
19481         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19482         that we can return (time_t) -1 successfully.
19483         * lib/posixtm.c: Likewise.
19484         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19485         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19486         (t): Remove static var.
19487         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19488         of static var.  All uses changed.
19489         (year): Do not reject years before 1900; they can occur with
19490         64-bit time_t.
19491         (posix_time_parse): Do not check for out-of-range components;
19492         that is now the caller's responsibility, since our checks were
19493         only approximations.
19494         (posixtime): Use mktime to check for out-of-range components,
19495         since it knows them exactly.
19496         If mktime returns (time_t) -1, check whether an error actually occurred
19497         by invoking localtime on -1.
19498         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19499         posixtime failures better.
19500         Improve the test data (in comments only).
19501
19502 2003-06-02  Karl Berry  <karl@gnu.org>
19503
19504         * config/mkinstalldirs (version): new variable.
19505         (--version): new option.
19506         (usage): improve message.
19507
19508 2003-05-30  Karl Berry  <karl@gnu.org>
19509
19510         * lib/mktime.c: update from libc.
19511
19512 2003-05-30  Bruno Haible  <bruno@clisp.org>
19513
19514         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
19515         * config/config.rpath: Upgrade to gettext-0.12.1.
19516
19517 2003-05-30  Bruno Haible  <bruno@clisp.org>
19518
19519         * m4/gettext.m4: Upgrade to gettext-0.12.1.
19520         * m4/nls.m4: New file, from gettext-0.12.1.
19521         * m4/po.m4: New file, from gettext-0.12.1.
19522         * m4/progtest.m4: Upgrade to gettext-0.12.1.
19523
19524 2003-05-30  Bruno Haible  <bruno@clisp.org>
19525
19526         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
19527         * lib/localcharset.h: Likewise.
19528         * lib/localcharset.c: Likewise.
19529
19530 2003-05-29  Karl Berry  <karl@gnu.org>
19531
19532         * config/config.rpath: update from gettext.
19533
19534 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19535
19536         Assume the headers required for C89 freestanding compilers.
19537         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
19538         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
19539         * m4/human.m4 (gl_HUMAN): Likewise.
19540         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
19541         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
19542         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19543         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
19544         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19545         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
19546
19547 2003-05-28  Paul Eggert  <eggert@twinsun.com>
19548
19549         Assume the headers required for C89 freestanding compilers.
19550         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
19551         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
19552         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
19553         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
19554         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
19555         define, since <limits.h> is guaranteed to do that.
19556         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
19557         * lib/exclude.c: Include <stdbool.h> unconditionally.
19558         * lib/tempname.c: Include <stddef.h> unconditionally.
19559         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
19560         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
19561         <stddef.h> does that.
19562         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
19563         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
19564         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
19565         needed.
19566         * lib/xstrtol.c: Likewise.
19567         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
19568         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
19569
19570         * lib/addext.c (addext): Use assignment rather than cast, to avoid
19571         warnings on some platforms.
19572
19573         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19574         arbitrarily.
19575
19576 2003-05-26  Jim Meyering  <jim@meyering.net>
19577
19578         Merge in a change from coreutils:
19579         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
19580         that is guaranteed to be `no'.  Use `no_such_member' to indicate
19581         that condition, rather than `-1' which is slightly misleading.
19582         Change the name of the cache variable to have the gl_ prefix.
19583         Prompted by a patch from Richard Dawe for DJGPP.
19584
19585 2003-05-24  Karl Berry  <karl@gnu.org>
19586
19587         * config/config.guess: update from prep.
19588
19589 2003-05-22  Karl Berry  <karl@gnu.org>
19590
19591         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
19592
19593 2003-05-20  Karl Berry  <karl@gnu.org>
19594
19595         * config/config.guess: update from prep.
19596
19597 2003-05-18  Karl Berry  <karl@gnu.org>
19598
19599         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
19600         might actually be set by the user.
19601
19602         * config/depcomp, install-sh, mdate-sh: update from automake.
19603
19604 2003-05-17  Bruno Haible  <bruno@clisp.org>
19605
19606         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
19607         invalid expansion for AC_EGREP_CPP.
19608         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
19609         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
19610         Suggested by Akim Demaille <akim@epita.fr> in
19611         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
19612
19613 2003-05-12  Jim Meyering  <jim@meyering.net>
19614
19615         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
19616         the space-padded-by-default conversion specifiers, %e, %k, %l.
19617
19618 2003-05-12  Bruno Haible  <bruno@clisp.org>
19619
19620         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
19621         the string is longer than 4 KB.
19622
19623 2003-05-11  Karl Berry  <karl@gnu.org>
19624
19625         * config/config.{guess,sub}: update from prep.
19626
19627 2003-05-09  Bruno Haible  <bruno@clisp.org>
19628
19629         * modules/error: Add m4/strerror_r.m4 to file list.
19630
19631 2003-05-03  Bruno Haible  <bruno@clisp.org>
19632
19633         Upgrade to Unicode-4.0.
19634         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
19635         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
19636         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
19637         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
19638         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
19639         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
19640         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
19641         Change width of U+E0100..U+E01EF from 1 to 0.
19642
19643 2003-04-25  Jim Meyering  <jim@meyering.net>
19644
19645         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
19646         of type size_t, not int.
19647
19648 2003-04-25  Bruno Haible  <bruno@clisp.org>
19649
19650         * lib/copy-file.c: Include <stddef.h>, for size_t.
19651
19652 2003-04-21  Paul Eggert  <eggert@twinsun.com>
19653
19654         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
19655         code which expansion is under static control.  Patch imported from
19656         Akim Demaille's patch to Bison; see
19657         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
19658
19659 2003-04-14  Bruno Haible  <bruno@clisp.org>
19660
19661         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
19662
19663 2003-04-11  Jim Meyering  <jim@meyering.net>
19664
19665         Merge changes from Coreutils.
19666
19667         2003-03-22  Jim Meyering  <jim@meyering.net>
19668
19669         * lib/strftime.c (widen): Cast alloca return value to proper type.
19670
19671         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
19672
19673         From GNU libc.
19674         * lib/strftime.c (my_strftime): Handle very large width
19675         specifications for numeric values correctly.  Improve checks for
19676         overflow.
19677
19678         2003-01-19  Jim Meyering  <jim@meyering.net>
19679
19680         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
19681         definitions.
19682         (nl_get_alt_digit) [! defined my_strftime]: Define.
19683         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
19684         _nl_get_alt_digit and _nl_get_walt_digit.
19685
19686         * lib/strftime.c (my_strftime): Merge in locale-related changes from
19687         libc. These changes have no effect outside of _LIBC.
19688
19689 2003-04-10  Bruno Haible  <bruno@clisp.org>
19690
19691         * modules/findprog: New file.
19692         * MODULES.html.sh (func_all_modules): Add it.
19693
19694 2003-04-10  Bruno Haible  <bruno@clisp.org>
19695
19696         * m4/findprog.m4: New file.
19697         * m4/eaccess.m4: New file.
19698
19699 2003-04-10  Bruno Haible  <bruno@clisp.org>
19700
19701         * lib/findprog.h: New file, from GNU gettext.
19702         * lib/findprog.c: New file, from GNU gettext.
19703
19704 2003-04-05  Jim Meyering  <jim@meyering.net>
19705
19706         Merge changes from Coreutils.
19707
19708         * lib/exclude.h (PARAMS): Remove definition and uses.
19709         * lib/exclude.c: Remove uses of `PARAMS'.
19710
19711         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
19712         Add test-cases for DOS filenames. Declare program_name.
19713         (main): Set up program_name.  Patch by Rich Dawe.
19714
19715         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19716         error from mntctl.
19717         Use mntctl's return value to drive the entry-processing loop, since
19718         we can't rely on the value of the vmt_length member in the last
19719         entry.  On some systems doing so could result in exhausting
19720         virtual memory.  Based in part on a patch from Mike Jetzer.
19721
19722 2003-04-04  Bruno Haible  <bruno@clisp.org>
19723
19724         * modules/linebreak: New file.
19725         * MODULES.html.sh (func_all_modules): Add it.
19726
19727 2003-04-04  Bruno Haible  <bruno@clisp.org>
19728
19729         * m4/linebreak.m4: New file.
19730
19731 2003-04-04  Bruno Haible  <bruno@clisp.org>
19732
19733         * lib/linebreak.h: New file, from GNU gettext.
19734         * lib/linebreak.c: New file, from GNU gettext with slight
19735         modifications.
19736         * lib/lbrkprop.h: New file, from GNU gettext.
19737
19738 2003-04-03  Bruno Haible  <bruno@clisp.org>
19739
19740         * modules/utf8-ucs4: New file.
19741         * modules/utf16-ucs4: New file.
19742         * modules/ucs4-utf8: New file.
19743         * modules/ucs4-utf16: New file.
19744         * MODULES.html.sh (func_all_modules): Add them.
19745
19746 2003-04-03  Bruno Haible  <bruno@clisp.org>
19747
19748         * m4/utf-ucs4.m4: New file.
19749         * m4/ucs4-utf.m4: New file.
19750
19751 2003-04-03  Bruno Haible  <bruno@clisp.org>
19752
19753         * lib/utf8-ucs4.h: New file, from GNU gettext.
19754         * lib/utf16-ucs4.h: New file, from GNU gettext.
19755         * lib/ucs4-utf8.h: New file, from GNU gettext.
19756         * lib/ucs4-utf16.h: New file, from GNU gettext.
19757
19758 2003-04-02  Bruno Haible  <bruno@clisp.org>
19759
19760         * modules/binary-io: New file.
19761         * MODULES.html.sh (func_all_modules): Add it.
19762
19763 2003-04-02  Bruno Haible  <bruno@clisp.org>
19764
19765         * lib/binary-io.h: New file, from GNU gettext.
19766
19767 2003-04-01  Bruno Haible  <bruno@clisp.org>
19768
19769         * modules/pathname: New file.
19770         * MODULES.html.sh (func_all_modules): Add it.
19771
19772 2003-04-01  Bruno Haible  <bruno@clisp.org>
19773
19774         * lib/pathname.h: New file, from GNU gettext.
19775         * lib/concatpath.c: New file, from GNU gettext.
19776
19777 2003-03-30  Bruno Haible  <bruno@clisp.org>
19778
19779         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
19780
19781 2003-03-30  Bruno Haible  <bruno@clisp.org>
19782
19783         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
19784         function chown() doesn't exist.
19785
19786 2003-03-28  Bruno Haible  <bruno@clisp.org>
19787
19788         * modules/copy-file: New file.
19789         * MODULES.html.sh (func_all_modules): Add it.
19790
19791 2003-03-28  Bruno Haible  <bruno@clisp.org>
19792
19793         * m4/copy-file.m4: New file.
19794
19795 2003-03-28  Bruno Haible  <bruno@clisp.org>
19796
19797         * lib/copy-file.h: New file, from GNU gettext.
19798         * lib/copy-file.c: New file, from GNU gettext.
19799
19800 2003-03-18  Jim Meyering  <jim@meyering.net>
19801
19802         * lib/quote.c (quote_n): Fix typo in comment.
19803
19804 2003-03-18  Bruno Haible  <bruno@clisp.org>
19805
19806         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
19807         checking.
19808         * m4/onceonly_2_57.m4: Likewise.
19809
19810 2003-03-17  Bruno Haible  <bruno@clisp.org>
19811
19812         * m4/onceonly.m4: Require autoconf 2.54 or newer.
19813         (m4_quote): Remove macro.
19814         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
19815
19816 2003-03-14  Jim Meyering  <jim@meyering.net>
19817
19818         Merge changes from Coreutils.
19819         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
19820         to be const, in order to avoid warnings.
19821         (obstack_room): Likewise.
19822         (obstack_empty_p): Likewise.
19823
19824 2003-03-14  Bruno Haible  <bruno@clisp.org>
19825
19826         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
19827         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
19828
19829 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19830
19831         Merge changes from Bison.
19832         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
19833         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
19834         when compiling Bison 1.875's `bitset bset = obstack_alloc
19835         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
19836         * lib/hash.c: Include <stdbool.h> unconditionally.
19837
19838 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19839
19840         * m4/onceonly.m4 (m4_quote): New macro.
19841         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
19842         Quote AC_FOREACH variable-expansions properly.
19843
19844 2003-03-13  Paul Eggert  <eggert@twinsun.com>
19845
19846         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
19847
19848 2003-03-09  Paul Eggert  <eggert@twinsun.com>
19849
19850         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
19851         Reported by Bruce Becker; see:
19852         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
19853
19854 2003-03-03  Paul Eggert  <eggert@twinsun.com>
19855             Bruno Haible  <bruno@clisp.org>
19856
19857         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
19858         Reported by John Hughes, see
19859         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
19860
19861 2003-02-20  Bruno Haible  <bruno@clisp.org>
19862
19863         * MODULES.html.sh (func_all_modules): Add poll.
19864
19865 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19866
19867         * modules/poll: New file.
19868
19869 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19870
19871         * lib/poll_.h: New file.
19872         * lib/poll.c: New file.
19873
19874 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
19875
19876         * m4/poll.m4: New file.
19877
19878 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19879
19880         * modules/mathl: New file.
19881
19882 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19883
19884         * lib/mathl.h: New file.
19885         * lib/acosl.c: New file.
19886         * lib/asinl.c: New file.
19887         * lib/atanl.c: New file.
19888         * lib/ceill.c: New file.
19889         * lib/cosl.c: New file.
19890         * lib/expl.c: New file.
19891         * lib/floorl.c: New file.
19892         * lib/frexpl.c: New file.
19893         * lib/ldexpl.c: New file.
19894         * lib/logl.c: New file.
19895         * lib/sincosl.c: New file.
19896         * lib/sinl.c: New file.
19897         * lib/sqrtl.c: New file.
19898         * lib/tanl.c: New file.
19899         * lib/trigl.c: New file.
19900         * lib/trigl.h: New file.
19901
19902 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
19903
19904         * m4/mathl.m4: New file.
19905
19906 2003-02-18  Bruno Haible  <bruno@clisp.org>
19907
19908         * MODULES.html.sh (func_all_modules): Add mathl.
19909
19910 2003-02-17  Bruno Haible  <bruno@clisp.org>
19911
19912         * modules/mkdtemp: New module.
19913         * MODULES.html.sh (func_all_modules): Add it.
19914
19915 2003-02-17  Bruno Haible  <bruno@clisp.org>
19916
19917         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
19918
19919 2003-02-17  Bruno Haible  <bruno@clisp.org>
19920
19921         * lib/mkdtemp.h: New file, from GNU gettext.
19922         * lib/mkdtemp.c: New file, from GNU gettext.
19923
19924 2003-02-02  Jim Meyering  <jim@meyering.net>
19925
19926         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
19927         e.g. glibc-2.2.93.
19928
19929 2003-01-31  Bruno Haible  <bruno@clisp.org>
19930
19931         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
19932         'rpl_rename'.
19933         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
19934         'rpl_strnlen'.
19935         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
19936         'rpl_strtod'.
19937         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
19938         'rpl_utime'.
19939
19940 2003-01-31  Bruno Haible  <bruno@clisp.org>
19941
19942         * lib/rename.c: #undef rename before defining rpl_rename.
19943         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
19944
19945 2003-01-30  Bruno Haible  <bruno@clisp.org>
19946
19947         * modules/vasnprintf, modules/vasprintf: New modules.
19948         * MODULES.html.sh (func_all_modules): Add them.
19949
19950 2003-01-30  Bruno Haible  <bruno@clisp.org>
19951
19952         * m4/signed.m4: New file, from GNU gettext.
19953         * m4/longdouble.m4: New file, from GNU gettext.
19954         * m4/wchar_t.m4: New file, from GNU gettext.
19955         * m4/wint_t.m4: New file, from GNU gettext.
19956         * m4/vasnprintf.m4: New file.
19957         * m4/vasprintf.m4: New file.
19958
19959 2003-01-30  Bruno Haible  <bruno@clisp.org>
19960
19961         * lib/printf-args.h: New file, from GNU gettext.
19962         * lib/printf-args.c: New file, from GNU gettext.
19963         * lib/printf-parse.h: New file, from GNU gettext.
19964         * lib/printf-parse.c: New file, from GNU gettext.
19965         * lib/vasnprintf.h: New file, from GNU gettext.
19966         * lib/vasnprintf.c: New file, from GNU gettext.
19967         * lib/asnprintf.c: New file, from GNU gettext.
19968         * lib/vasprintf.h: New file, from GNU gettext with modifications.
19969         * lib/vasprintf.c: New file, from GNU gettext.
19970         * lib/asprintf.c: New file, from GNU gettext.
19971
19972 2003-01-29  Bruno Haible  <bruno@clisp.org>
19973
19974         * modules/stpncpy: New module.
19975         * MODULES.html.sh (func_all_modules): Add it.
19976
19977 2003-01-29  Bruno Haible  <bruno@clisp.org>
19978
19979         * m4/stpncpy.m4: New file.
19980
19981 2003-01-29  Bruno Haible  <bruno@clisp.org>
19982
19983         * lib/stpncpy.h: New file, from GNU gettext with modifications.
19984         * lib/stpncpy.c: New file, from GNU gettext with modifications.
19985
19986 2003-01-28  Bruno Haible  <bruno@clisp.org>
19987
19988         * modules/c-ctype: New module.
19989         * MODULES.html.sh (func_all_modules): Add it.
19990
19991 2003-01-28  Bruno Haible  <bruno@clisp.org>
19992
19993         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
19994         Paul Eggert.
19995         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
19996         Paul Eggert.
19997
19998 2003-01-27  Bruno Haible  <bruno@clisp.org>
19999
20000         * modules/xsetenv: New module.
20001         * MODULES.html.sh (func_all_modules): Add it.
20002
20003 2003-01-27  Bruno Haible  <bruno@clisp.org>
20004
20005         * lib/xsetenv.h: New file, from GNU gettext.
20006         * lib/xsetenv.c: New file, from GNU gettext.
20007
20008 2003-01-23  Jim Meyering  <jim@meyering.net>
20009
20010         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20011         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20012
20013 2003-01-23  Bruno Haible  <bruno@clisp.org>
20014
20015         * modules/minmax: New module.
20016         * MODULES.html.sh (func_all_modules): Add it.
20017
20018 2003-01-23  Bruno Haible  <bruno@clisp.org>
20019
20020         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20021         Eggert.
20022
20023 2003-01-22  Bruno Haible  <bruno@clisp.org>
20024
20025         * modules/exit: New module.
20026         * MODULES.html.sh (func_all_modules): Add it.
20027
20028 2003-01-22  Bruno Haible  <bruno@clisp.org>
20029
20030         * lib/exit.h: New file, from GNU gettext.
20031
20032 2003-01-19  Bruno Haible  <bruno@clisp.org>
20033
20034         * gnulib-tool: Recognize option --extract-maintainer.
20035         (func_get_maintainer): New function.
20036         * modules/*: Add Maintainer entry.
20037
20038 2003-01-16  Jim Meyering  <jim@meyering.net>
20039
20040         * m4/regex.m4: The `regex' struct is both input and output.
20041         Initialize it before each use.  Patch by Tim Waugh.
20042
20043 2003-01-16  Bruno Haible  <bruno@clisp.org>
20044
20045         * MODULES.html.sh: Add a table of contents. Add the module name as
20046         leftmost column. Add hyperlinks.
20047
20048 2003-01-15  Bruno Haible  <bruno@clisp.org>
20049
20050         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20051
20052 2003-01-15  Bruno Haible  <bruno@clisp.org>
20053
20054         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20055         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20056         suffix.
20057
20058 2003-01-15  Bruno Haible  <bruno@clisp.org>
20059
20060         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20061
20062 2003-01-15  Bruno Haible  <bruno@clisp.org>
20063
20064         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20065         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20066
20067 2003-01-14  Jim Meyering  <jim@meyering.net>
20068
20069         * lib/same.c (same_name): Tweak a comment.
20070
20071 2003-01-14  Bruno Haible  <bruno@clisp.org>
20072
20073         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20074         when a string comparison is sufficient.
20075
20076 2003-01-14  Bruno Haible  <bruno@clisp.org>
20077
20078         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20079         'unsigned int'.
20080
20081 2003-01-14  Bruno Haible  <bruno@clisp.org>
20082
20083         * lib/hash-pjw.c: Add comment about low quality of this function.
20084
20085 2003-01-13  Bruno Haible  <bruno@clisp.org>
20086
20087         * modules/stpcpy: Distribute lib/stpcpy.h.
20088         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20089
20090 2003-01-13  Bruno Haible  <bruno@clisp.org>
20091
20092         * modules/*: Add a description.
20093         * modules/strpbrk: Fix Makefile.am snippet.
20094         * modules/strtoimax: Fix dependencies.
20095         * modules/strtoumax: Likewise.
20096
20097 2003-01-13  Bruno Haible  <bruno@clisp.org>
20098
20099         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20100         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20101         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20102
20103 2003-01-13  Bruno Haible  <bruno@clisp.org>
20104
20105         * gnulib-tool (func_create_testdir): Store config/* files in the main
20106         directory.
20107         * config.rpath: Move to ...
20108         * config/config.rpath: ... here.
20109         * modules/gettext: Contains config/config.rpath, not config.rpath.
20110         * modules/iconv: Likewise.
20111
20112 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20113
20114         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20115         to avoid collisions with libcurses and libreadline.
20116
20117         * m4/getstr.m4: Remove.
20118         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20119
20120 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20121
20122         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20123         to avoid collisions with libcurses and libreadline.
20124
20125         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20126         * lib/getstr.h, getstr.c: Remove.
20127         * lib/getline.c: Include "getline.h", to check interface.
20128         Move body of old getstr.c here: this defines MIN_CHUNK and
20129         declares getdelim2, which is renamed from getstr.
20130         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20131
20132         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20133         All uses changed.
20134         * lib/linebuffer.h: Likewise.
20135         (readline): Remove backward-compatibility macro.
20136
20137 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20138
20139         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20140         to avoid collisions with libcurses and libreadline.
20141         * getstr: Remove.
20142         * MODULES.html.sh: Remove getstr.
20143         * modules/getline: Depend on unlocked-io, not getstr.
20144
20145 2003-01-12  Jim Meyering  <jim@meyering.net>
20146
20147         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20148
20149 2003-01-10  Bruno Haible  <bruno@clisp.org>
20150
20151         * modules/alloca: Change Makefile.am requirements. Simplify Include
20152         requirements. Add lib/alloca_.h to file list.
20153
20154 2003-01-10  Bruno Haible  <bruno@clisp.org>
20155
20156         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20157
20158 2003-01-10  Bruno Haible  <bruno@clisp.org>
20159
20160         * lib/alloca_.h: New file.
20161         * lib/getdate.y: Unconditionally include alloca.h.
20162         * lib/makepath.c: Likewise.
20163         * lib/setenv.c: Likewise.
20164         * lib/userspec.c: Likewise.
20165
20166 2003-01-09  Karl Berry  <karl@gnu.org>
20167
20168         * MODULES.html.sh: include `dirname $0` in PATH, to find
20169         gnulib-tool.
20170
20171 2003-01-09  Bruno Haible  <bruno@clisp.org>
20172
20173         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20174         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20175
20176 2003-01-09  Bruno Haible  <bruno@clisp.org>
20177
20178         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20179
20180 2003-01-09  Bruno Haible  <bruno@clisp.org>
20181
20182         * lib/stdbool.h.in: New file.
20183
20184 2003-01-09  Bruno Haible  <bruno@clisp.org>
20185
20186         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20187         * MODULES.html.sh: Likewise.
20188
20189 2003-01-08  Jim Meyering  <jim@meyering.net>
20190
20191         * lib/full-write.c: Undefine and define-away `const' after inclusion
20192         of errno.h, not before.  Suggestion from Bruno Haible.
20193
20194 2003-01-08  Bruno Haible  <bruno@clisp.org>
20195
20196         * modules/full-read: Depend on full-write.
20197
20198 2003-01-08  Bruno Haible  <bruno@clisp.org>
20199
20200         * lib/safe-read.c: Include specification header first, to ensure its
20201         selfcontainedness.
20202         * lib/full-write.c: Likewise.
20203
20204 2003-01-07  Jim Meyering  <jim@meyering.net>
20205
20206         * lib/full-write.c: Rework so that it may serve to define full_read,
20207         too.
20208         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20209
20210 2003-01-07  Bruno Haible  <bruno@clisp.org>
20211
20212         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20213         <inttypes.h>.
20214         * lib/xstrtol.h: Likewise.
20215         * lib/xstrtoimax.c: Likewise.
20216         * lib/xstrtoumax.c: Likewise.
20217         * lib/human.h: Likewise.
20218
20219         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20220         on systems that have <inttypes.h> but not <stdint.h>.
20221
20222 2003-01-07  Bruno Haible  <bruno@clisp.org>
20223
20224         * MODULES.html.sh: Add copyright notice.
20225         (missed_files): Omit CVS directory entries.
20226         (func_module): Make it work with sed-3.02.
20227         * MODULES.txt: Remove file.
20228
20229 2003-01-06  Jim Meyering  <jim@meyering.net>
20230
20231         * lib/version-etc.c: Update year in translatable copyright string.
20232
20233 2003-01-03  Karl Berry  <karl@gnu.org>
20234
20235         * config/config.{guess,sub}: update from prep.
20236
20237 2003-01-02  Karl Berry  <karl@gnu.org>
20238
20239         * doc/COPYING.DOC: belatedly updated to 1.2.
20240
20241 2003-01-01  Karl Berry  <karl@gnu.org>
20242
20243         * gnulib-tool (func_verify_module): report module name $module in
20244         error message, not $1.
20245         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20246         be created, only if it doesn't exist.
20247         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20248
20249 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20250
20251         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20252
20253 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20254
20255         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20256         memcmp if strcoll doesn't work.
20257
20258 2002-12-31  Bruno Haible  <bruno@clisp.org>
20259
20260         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20261         nonempty.
20262
20263 2002-12-31  Bruno Haible  <bruno@clisp.org>
20264
20265         * lib/memcoll.c (STRCOLL): New macro.
20266         (memcoll): Use it.
20267
20268 2002-12-31  Bruno Haible  <bruno@clisp.org>
20269
20270         * lib/localcharset.h: New file.
20271         * lib/localcharset.c: Include it.
20272         * lib/unicodeio.c: Likewise.
20273
20274 2002-12-31  Bruno Haible  <bruno@clisp.org>
20275
20276         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20277         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20278
20279 2002-12-31  Bruno Haible  <bruno@clisp.org>
20280
20281         * lib/getline.h: Include <stddef.h>, for size_t.
20282
20283         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20284         * lib/unicodeio.c: Don't include <stddef.h>.
20285
20286 2002-12-31  Bruno Haible  <bruno@clisp.org>
20287
20288         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20289         HAVE_TM_ZONE.
20290
20291 2002-12-24  Karl Berry  <karl@gnu.org>
20292
20293         * config/config.guess: update from prep.
20294
20295 2002-12-24  Bruno Haible  <bruno@clisp.org>
20296
20297         General infrasructure.
20298         * m4/README: Rewritten.
20299         * m4/onceonly.m4: New file.
20300         * m4/onceonly_2_57.m4: New file.
20301
20302         Module atexit.
20303         * m4/atexit.m4: New file.
20304
20305         Module strtod.
20306         * m4/strtod.m4: New file.
20307
20308         Module strtol.
20309         * m4/strtol.m4: New file.
20310
20311         Module strtoul.
20312         * m4/strtoul.m4: New file.
20313
20314         Module memchr.
20315         * m4/memchr.m4: New file.
20316
20317         Module memcmp.
20318         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20319         (jm_FUNC_MEMCMP): Invoke it.
20320
20321         Module memcpy.
20322         * m4/memcpy.m4: New file.
20323
20324         Module memmove.
20325         * m4/memmove.m4: New file.
20326
20327         Module memset.
20328         * m4/memset.m4: New file.
20329
20330         Module strcspn.
20331         * m4/strcspn.m4: New file.
20332
20333         Module strpbrk.
20334         * m4/strpbrk.m4: New file.
20335
20336         Module strstr.
20337         * m4/strstr.m4: New file.
20338
20339         Module strerror.
20340         * m4/strerror.m4: New file.
20341
20342         Module mktime.
20343         * m4/mktime.m4: Renamed from jm-mktime.m4.
20344         (gl_PREREQ_MKTIME): New macro.
20345         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20346
20347         Module malloc.
20348         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20349         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20350         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20351
20352         Module realloc.
20353         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20354         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20355         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20356
20357         Module strftime.
20358         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20359         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20360         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20361         gl_TM_GMTOFF.
20362         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20363
20364         Module xalloc.
20365         * m4/xalloc.m4: New file.
20366
20367         Module alloca.
20368         * m4/alloca.m4: New file.
20369
20370         Module putenv.
20371         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20372         (jm_FUNC_PUTENV): Invoke it.
20373
20374         Module setenv.
20375         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20376         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20377         when invoked twice.
20378         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20379         gt_FUNC_SETENV.
20380
20381         Module memrchr.
20382         * m4/memrchr.m4: New file.
20383
20384         Module stpcpy.
20385         * m4/stpcpy.m4: New file.
20386
20387         Module strcase.
20388         * m4/strcase.m4: New file.
20389
20390         Module strdup.
20391         * m4/strdup.m4: New file.
20392
20393         Module strnlen.
20394         * m4/strnlen.m4: New file.
20395
20396         Module strndup.
20397         * m4/strndup.m4: New file.
20398
20399         Module xstrtod.
20400         * m4/xstrtod.m4: New file.
20401
20402         Module xstrtol.
20403         * m4/xstrtol.m4: New file.
20404
20405         Module getdate.
20406         * m4/getdate.m4: New file.
20407
20408         Module unlocked-io.
20409         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20410         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20411         * m4/jm-glibc-io.m4n: Remove file.
20412
20413         Module long-options.
20414         * m4/long-options.m4: New file.
20415
20416         Module md5.
20417         * m4/md5.m4: New file.
20418
20419         Module sha.
20420         * m4/sha.m4: New file.
20421
20422         Module getstr.
20423         * m4/getstr.m4: New file.
20424
20425         Module getline.
20426         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20427         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20428         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20429         simply getline. Infoke gl_PREREQ_GETLINE.
20430
20431         Module obstack.
20432         * m4/obstack.m4: New file.
20433
20434         Module hash.
20435         * m4/hash.m4: New file.
20436
20437         Module readtokens.
20438         * m4/readtokens.m4: New file.
20439
20440         Module strverscmp.
20441         * m4/strverscmp.m4: New file.
20442
20443         Module stdbool.
20444         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20445         OSF/1.
20446
20447         Module strtoll.
20448         * m4/strtoll.m4: New file.
20449
20450         Module strtoull.
20451         * m4/strtoull.m4: New file.
20452
20453         Module strtoimax.
20454         * m4/strtoimax.m4: New file.
20455
20456         Module strtoumax.
20457         * m4/strtoumax.m4: New file.
20458
20459         Module xstrtoimax.
20460         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20461         jm_AC_PREREQ_XSTRTOIMAX.
20462         Moved the strtol prerequisites to strtol.m4.
20463         Moved the strtoll prerequisites to strtoll.m4.
20464         Moved the strtoimax prerequisites to strtoimax.m4.
20465
20466         Module xstrtoumax.
20467         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20468         jm_AC_PREREQ_XSTRTOUMAX.
20469         Moved the strtoul prerequisites to strtoul.m4.
20470         Moved the strtoull prerequisites to strtoull.m4.
20471         Moved the strtoumax prerequisites to strtoumax.m4.
20472
20473         Module chown.
20474         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20475         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20476
20477         Module dup2.
20478         * m4/dup2.m4: New file.
20479
20480         Module ftruncate.
20481         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20482         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20483
20484         Module getgroups.
20485         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20486         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20487
20488         Module gettimeofday.
20489         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20490         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20491         gl_PREREQ_GETTIMEOFDAY.
20492
20493         Module mkdir.
20494         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20495         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20496
20497         Module mkstemp.
20498         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20499         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20500         jm_AC_TYPE_UINTMAX_T.
20501         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20502
20503         Module stat.
20504         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
20505         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
20506
20507         Module lstat.
20508         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
20509         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
20510
20511         Module timespec.
20512         * m4/timespec.m4 (gl_TIMESPEC): New macro.
20513         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
20514         * m4/st_mtim.m4: Indentation.
20515
20516         Module nanosleep.
20517         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
20518         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
20519         gl_PREREQ_NANOSLEEP.
20520
20521         Module regex.
20522         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
20523         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
20524         (gl_REGEX): New macro.
20525
20526         Module rename.
20527         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
20528         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
20529
20530         Module rmdir.
20531         * m4/rmdir.m4: New file.
20532
20533         Module utime.
20534         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
20535         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
20536         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
20537
20538         Module dirname.
20539         * m4/dirname.m4: New file.
20540
20541         Module getopt.
20542         * m4/getopt.m4: New file.
20543
20544         Module unistd-safer.
20545         * m4/unistd-safer.m4: New file.
20546
20547         Module fnmatch.
20548         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
20549         declaration.
20550         (gl_PREREQ_FNMATCH_EXTRA): New macro.
20551         (gl_FUNC_FNMATCH_POSIX): New macro.
20552         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
20553         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
20554         simply fnmatch.
20555
20556         Module exclude.
20557         * m4/exclude.m4: New file.
20558
20559         Module human.
20560         * m4/human.m4: New file.
20561
20562         Module acl.
20563         * m4/acl.m4: Nop.
20564
20565         Module backupfile.
20566         * m4/backupfile.m4: New file.
20567         * m4/d-ino.m4: Indentation.
20568
20569         Module fsusage.
20570         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
20571         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
20572         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
20573
20574         Module dirfd.
20575         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
20576         requirements.
20577
20578         Module euidaccess.
20579         * m4/euidaccess.m4: New file.
20580
20581         Module file-type.
20582         * m4/file-type.m4: New file.
20583
20584         Module fileblocks.
20585         * m4/fileblocks.m4: New file.
20586
20587         Module filemode.
20588         * m4/filemode.m4: New file.
20589
20590         Module isdir.
20591         * m4/isdir.m4: New file.
20592
20593         Module lchown.
20594         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
20595         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
20596
20597         Module makepath.
20598         * m4/makepath.m4: New file.
20599
20600         Module modechange.
20601         * m4/modechange.m4: New file.
20602
20603         Module mountlist.
20604         * m4/mountlist.m4: New file.
20605         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
20606         Indentation.
20607
20608         Module path-concat.
20609         * m4/path-concat.m4: New file.
20610
20611         Module pathmax.
20612         * m4/pathmax.m4: New file.
20613
20614         Module same.
20615         * m4/same.m4: New file.
20616
20617         Module save-cwd.
20618         * m4/save-cwd.m4: New file.
20619
20620         Module savedir.
20621         * m4/savedir.m4: New file.
20622
20623         Module xgetcwd.
20624         * m4/xgetcwd.m4: New file.
20625         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
20626
20627         Module xreadlink.
20628         * m4/xreadlink.m4: New file.
20629
20630         Module safe-read.
20631         * m4/safe-read.m4: New file.
20632
20633         Module safe-write.
20634         * m4/safe-write.m4: New file.
20635
20636         Module closeout.
20637         * m4/closeout.m4: New file.
20638
20639         Module stdio-safer.
20640         * m4/stdio-safer.m4: New file.
20641
20642         Module getpass.
20643         * m4/getpass.m4: New file.
20644
20645         Module getugroups.
20646         * m4/getugroups.m4: New file.
20647
20648         Module group-member.
20649         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
20650         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
20651
20652         Module idcache.
20653         * m4/idcache.m4: New file.
20654
20655         Module userspec.
20656         * m4/userspec.m4: New file.
20657
20658         Module gettime.
20659         * m4/clock_time.m4: New file.
20660         * m4/gettime.m4: New file.
20661
20662         Module settime.
20663         * m4/settime.m4: New file.
20664
20665         Module posixtm.
20666         * m4/posixtm.m4: New file.
20667
20668         Module gethostname.
20669         * m4/gethostname.m4: New file.
20670
20671         Module canon-host.
20672         * m4/canon-host.m4: New file.
20673
20674         Module gettext.
20675         * m4/codeset.m4: New file, from gettext-0.11.5.
20676         * m4/gettext.m4: New file, from gettext-0.11.5.
20677         * m4/glibc21.m4: New file, from gettext-0.11.5.
20678         * m4/iconv.m4: New file, from gettext-0.11.5.
20679         * m4/intdiv0.m4: New file, from gettext-0.11.5.
20680         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
20681         * m4/inttypes.m4: New file, from gettext-0.11.5.
20682         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
20683         * m4/isc-posix.m4: New file, from gettext-0.11.5.
20684         * m4/lcmessage.m4: New file, from gettext-0.11.5.
20685         * m4/lib-ld.m4: New file, from gettext-0.11.5.
20686         * m4/lib-link.m4: New file, from gettext-0.11.5.
20687         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
20688         * m4/progtest.m4: New file, from gettext-0.11.5.
20689         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
20690         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
20691         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
20692
20693         Module localcharset.
20694         * m4/localcharset.m4: New file.
20695
20696         Module hard-locale.
20697         * m4/hard-locale.m4: New file.
20698
20699         Module mbswidth.
20700         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
20701         onceonly macros.
20702         * m4/mbrtowc.m4: Add comment.
20703
20704         Module memcasecmp.
20705         * m4/memcasecmp.m4: New file.
20706
20707         Module memcoll.
20708         * m4/memcoll.m4: New file.
20709
20710         Module unicodeio.
20711         * m4/unicodeio.m4: New file.
20712
20713         Module rpmatch.
20714         * m4/rpmatch.m4: New file.
20715
20716         Module yesno.
20717         * m4/yesno.m4: New file.
20718
20719         Module exitfail.
20720         * m4/exitfail.m4: New file.
20721
20722         Module c-stack.
20723         * m4/c-stack.m4 (gl_C_STACK): New macro.
20724         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
20725
20726         Module error.
20727         * m4/error.m4 (gl_ERROR): New macro.
20728         (jm_PREREQ_ERROR): Use onceonly macros.
20729
20730         Module fatal.
20731         * m4/fatal.m4: New file.
20732
20733         Module getloadavg.
20734         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
20735         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
20736
20737         Module getpagesize.
20738         * m4/getpagesize.m4: New file.
20739
20740         Module getusershell.
20741         * m4/getusershell.m4: New file.
20742
20743         Module physmem.
20744         * m4/physmem.m4: New file.
20745
20746         Module posixver.
20747         * m4/posixver.m4: New file.
20748
20749         Module quotearg.
20750         * m4/quotearg.m4: New file.
20751
20752         Module quote.
20753         * m4/quote.m4: New file.
20754
20755         Module readutmp.
20756         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
20757
20758         Module sig2str.
20759         * m4/sig2str.m4: New file.
20760
20761         Other.
20762         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
20763         ulonglong.m4.
20764         * m4/intmax_t.m4: New file.
20765         * m4/d-type.m4: Indentation.
20766         * m4/jm-macros.m4: Update.
20767         * m4/prereq.m4 (jm_PREREQ): Update.
20768         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
20769         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
20770         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
20771         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
20772         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
20773         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
20774         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
20775         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
20776         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
20777         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
20778         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
20779         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
20780         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
20781         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
20782         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
20783         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
20784         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
20785         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
20786         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
20787
20788 2002-12-24  Bruno Haible  <bruno@clisp.org>
20789
20790         * MODULES.txt: Update according to m4/ changes.
20791
20792         Module gettext.
20793         * config.rpath: New file, from gettext-0.11.5.
20794
20795         * modules/*: New module descriptions.
20796         * gnulib-tool: New file.
20797         * MODULES.html.sh: New file.
20798
20799 2002-12-21  Karl Berry  <karl@gnu.org>
20800
20801         * doc/fdl.texi: update to version 1.2.
20802
20803 2002-12-19  Karl Berry  <karl@gnu.org>
20804
20805         * config/config.guess: update from prep.
20806
20807 2002-12-18  Bruno Haible  <bruno@clisp.org>
20808
20809         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
20810         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
20811
20812 2002-12-17  Bruno Haible  <bruno@clisp.org>
20813
20814         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
20815         stdlib.h, string.h.
20816
20817 2002-12-17  Bruno Haible  <bruno@clisp.org>
20818
20819         * lib/canon-host.c (strdup): Remove unused declaration.
20820
20821         * lib/fsusage.c: Include full_read.h.
20822         (get_fs_usage): Use full_read instead of safe_read.
20823
20824         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
20825
20826 2002-12-12  Karl Berry  <karl@gnu.org>
20827
20828         * config/config.guess: update from prep.
20829
20830 2002-12-11  Bruno Haible  <bruno@clisp.org>
20831
20832         * m4/setenv.m4: New file, from gettext-0.11.5.
20833
20834 2002-12-11  Bruno Haible  <bruno@clisp.org>
20835
20836         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
20837         not unsetenv().
20838         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
20839         modifications:
20840
20841         2002-12-11  Bruno Haible  <bruno@clisp.org>
20842
20843                 * setenv.c (alloca): Fall back to malloc.
20844                 (freea): New macro.
20845                 (setenv): Use freea() to free memory allocated with alloca().
20846
20847         2002-11-13  Bruno Haible  <bruno@clisp.org>
20848
20849                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
20850                 function declarations.
20851                 * unsetenv.c (unsetenv): Likewise.
20852
20853         2002-03-04  Bruno Haible  <bruno@clisp.org>
20854
20855                 Portability to AIX 4.3.3.
20856                 * unsetenv.c: New file, extracted from setenv.c.
20857                 * setenv.c: Move the unsetenv() function to unsetenv.c.
20858
20859         2001-12-20  Bruno Haible  <bruno@clisp.org>
20860
20861                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
20862                 use malloc instead. For SunOS 4.
20863
20864         2001-12-11  Bruno Haible  <bruno@clisp.org>
20865
20866                 * setenv.c: Declare alloca.
20867                 (compar_fn_t): New typedef.
20868                 (KNOWN_VALUE, STORE_VALUE): Use it.
20869
20870         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
20871         setenv.h.
20872
20873 2002-12-10  Paul Eggert  <eggert@twinsun.com>
20874
20875         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
20876         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
20877         Choose values that are less likely to collide with system fnmatch
20878         options.
20879         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
20880         defined (e.g., a pure POSIX system).
20881         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
20882         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
20883
20884 2002-12-06  Paul Eggert  <eggert@twinsun.com>
20885
20886         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
20887         a pain in practice to deal with generated m4 files.  This change
20888         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
20889
20890         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
20891         and jm-glibc-io.m4, as they are no longer a special case.
20892         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
20893         kludge and the auto-generation stuff.  Check only whether the
20894         functions are declared, not whether they exist, since older hosts
20895         that don't declare the functions can't use the optimization anyway.
20896
20897 2002-12-06  Jim Meyering  <jim@meyering.net>
20898
20899         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
20900
20901         Merge in changes from libc's misc/error.c, in preparation
20902         for the merge of gnulib's changes back into libc.
20903
20904         * lib/error.c (_): Define only if not already defined.
20905         Move definition to follow all #include directives.
20906         Include unlocked-io.h only if !_LIBC.
20907         [_LIBC]: Include <libio/libioP.h>.
20908         [USE_IN_LIBIO]: Include <libio/iolibio.h>
20909         (fflush): Tweak definition to use INTUSE.
20910         (putc): Define.
20911
20912 2002-12-05  Paul Eggert  <eggert@twinsun.com>
20913
20914         * lib/alloca.c [defined emacs]: Include "lisp.h".
20915         (xalloc_die) [defined emacs]: New macro.
20916         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
20917         [! defined emacs]: Include <xalloc.h>.
20918         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
20919         (pointer): Typedef to POINTER_TYPE *.
20920         (malloc): Remove decl; we now always use xmalloc.
20921         (alloca): Use old-style definition, since Emacs needs this.
20922         Check for arithmetic overflow when computing combined size.
20923
20924 2002-12-04  Paul Eggert  <eggert@twinsun.com>
20925
20926         Do not generate unlocked-io.h automatically, since it's easier to
20927         maintain it by hand.
20928
20929         * lib/unlocked-io.h: New file, from GNU diffutils,
20930         but with proper copyright notice and attribution.
20931         * lib/gen-uio: Remove.
20932         * lib/Makefile.am: Add copyright notice.
20933         (libfetish_a_SOURCES): Add unlocked-io.h.
20934         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
20935         (DISTCLEANFILES, io_functions): Remove macros.
20936         (EXTRA_DIST): Remove gen_uio.
20937         (unlocked-io.h): Remove rule.
20938
20939 2002-12-04  Jim Meyering  <jim@meyering.net>
20940
20941         Reflect the fact that stat.c and lstat.c are no longer generated.
20942         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
20943         (DISTCLEANFILES): Likewise.
20944         (EXTRA_DIST): Likewise.
20945         (all_local): Don't depend on stat.c or lstat.c.
20946         (stat.c, lstat.c): Remove rules.
20947         (EXTRA_DIST): Remove xstat.in.
20948
20949         * lib/xstat.in: Remove file.  Contents moved into stat.c.
20950         * lib/stat.c: New file.  Contents mostly from xstat.in.
20951         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
20952         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
20953
20954         * lib/safe-read.c: Rework so that it may serve to define safe_write,
20955         too.
20956         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
20957
20958 2002-12-03  Jim Meyering  <jim@meyering.net>
20959
20960         * lib/safe-read.c, safe-write.c: Change variable names and comments,
20961         but not semantics, to minimize the differences between these two files.
20962         (safe_read): Change comment to mention SAFE_READ_ERROR.
20963
20964         * lib/safe-read.c (IS_EINTR): Define.
20965         (safe_read): Use IS_EINTR in place of in-function cpp directives.
20966
20967 2002-12-02  Jim Meyering  <jim@meyering.net>
20968
20969         * lib/safe-read.c (EINTR): Define.
20970         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
20971         (INT_MAX): Provide fallback.
20972         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
20973
20974         * lib/safe-read.h (SAFE_READ_ERROR): Define.
20975
20976 2002-12-02  Bruno Haible  <bruno@clisp.org>
20977
20978         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
20979         Define, taken from safe-read.c.
20980         (INT_MAX): Provide fallback.
20981         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
20982         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
20983
20984         * lib/safe-read.c (EINTR): Remove definition.
20985         (safe_read): Don't use EINTR if it is absent.
20986
20987 2002-12-01  Jim Meyering  <jim@meyering.net>
20988
20989         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
20990         zero.
20991         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
20992
20993 2002-11-27  Paul Eggert  <eggert@twinsun.com>
20994
20995         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
20996         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
20997         with `if (! (value < limit)) abort ();', for readability.
20998
20999 2002-11-26  Karl Berry  <karl@gnu.org>
21000
21001         * lib/strdup.c: copy from libc again, with jim's ok.
21002         * lib/.cppi-disable: re-add strdup.c
21003
21004 2002-11-25  Karl Berry  <karl@gnu.org>
21005
21006         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21007         instead of "strtol.c".
21008
21009 2002-11-25  Karl Berry  <karl@gnu.org>
21010
21011         * config/install-sh: update from automake for variable quoting, $0 in
21012         error msgs, etc.
21013
21014         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21015         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21016         entry.
21017
21018 2002-11-25  Jim Meyering  <jim@meyering.net>
21019
21020         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21021
21022 2002-11-24  Karl Berry  <karl@gnu.org>
21023
21024         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21025         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21026
21027 2002-11-24  Jim Meyering  <jim@meyering.net>
21028
21029         Update from coreutils:
21030
21031         * lib/mktime.c: Merge in changes from libc.
21032
21033         Avoid a link-time failure on some Linux systems.
21034         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21035         (otherwise).
21036         (__mon_yday): Declare with the STATIC attribute.
21037         (__mktime_internal): Likewise.
21038         Based on a report from Greg Schafer.
21039
21040 2002-11-23  Jim Meyering  <jim@meyering.net>
21041
21042         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21043         Use `unsigned', not `int', as type of index.
21044
21045         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21046
21047         * lib/fsusage.c: Remove unneeded parentheses around operands of
21048         `defined'.
21049
21050 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21051
21052         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21053         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21054         so that we can be included first.
21055         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21056         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21057         No need to include stddef.h or sys/types.h any more.
21058         Surround local include files with "", not "<>".
21059         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21060         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21061         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21062         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21063         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21064         (ISPRINT): Remove; no longer needed now that we assume C89.
21065
21066         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21067         Preserve errno.
21068
21069         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21070         quotearg_char): Use SIZE_MAX rather than
21071         (size_t) -1 when we are talking about "infinity".
21072
21073         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21074
21075 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21076
21077         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21078         hint that one should use `if (! x) abort ();' rather than `assert
21079         (x);', and anyway it's one less thing to worry about configuring.
21080         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21081         hash_rehash, hash_insert): Use abort rather than assert.
21082
21083 2002-11-22  Bruno Haible  <bruno@clisp.org>
21084
21085         * lib/safe-read.h: Assume C89. Add comments.
21086         (safe_read): Change return type to size_t.
21087         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21088         byte counts > SSIZE_MAX correctly.
21089         * lib/safe-write.h: New file.
21090         * lib/safe-write.c: New file.
21091         * lib/full-read.h: New file.
21092         * lib/full-read.c: New file.
21093         * lib/full-write.h: Assume C89. Add comments.
21094         * lib/full-write.c: Include safe-write.h.
21095         (full_write): Rewritten to use safe_write.
21096         Suggested by Jim Meyering and Paul Eggert.
21097
21098 2002-11-21  Jim Meyering  <jim@meyering.net>
21099
21100         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21101
21102         Merge in changes from the coreutils.
21103
21104         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21105         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21106         <stdint.h>.
21107         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21108         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21109         int.  Work more efficiently if X is the same width as uintmax_t.
21110         Do not compare X to -1, to avoid bogus compiler warning.
21111         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21112         Don't assume that f_frsize and f_bsize are the same type.
21113
21114         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21115         warning on FreeBSD.
21116
21117         * lib/makepath.c (make_path): Restore umask *before* creating the final
21118         component.
21119         (make_path): Minor reformatting.
21120
21121         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21122         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21123         HAVE_MALLOC/HAVE_REALLOC.
21124
21125         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21126         dummy ones.  At least on GNU/Linux systems, `auto' means something
21127         else.
21128         From Michael Stone.
21129
21130 2002-11-21  Bruno Haible  <bruno@clisp.org>
21131
21132         Remove case insensitive option matching.
21133         * lib/argmatch.h (argcasematch): Remove declaration.
21134         (ARGCASEMATCH): Remove macro.
21135         (__xargmatch_internal): Remove case_sensitive argument.
21136         (XARGMATCH): Update.
21137         (XARGCASEMATCH): Remove macro.
21138         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21139         case_sensitive argument.
21140         (argcasematch): Remove function.
21141         (__xargmatch_internal): Remove case_sensitive argument.
21142         (main): Use XARGMATCH instead of XARGCASEMATCH.
21143
21144         * lib/xmalloc.c: Change compile-time error message. Add comment about
21145         required autoconf version.
21146
21147 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21148
21149         Merge argmatch cleanups from Bison.  Assume C89.
21150
21151         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21152         Include stdlib.h, for EXIT_FAILURE.
21153         Always include <string.h>, since we assume C89.
21154         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21155         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21156         Include <stddef.h> instead, since it's all we need for size_t.
21157         (PARAMS): Remove.  All uses removed.
21158         (ARRAY_CARDINALITY): Do not bother to #undef.
21159         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21160         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21161         Remove unnecessary parentheses.
21162         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21163         Insert necessary parentheses.
21164         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21165         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21166
21167 2002-11-19  Bruno Haible  <bruno@clisp.org>
21168
21169         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21170         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21171
21172         * lib/mbswidth.h (PARAMS): Remove macro.
21173         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21174         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21175
21176         * lib/gcd.h (PARAMS): Remove macro.
21177         (gcd): Use ANSI C function declarations.
21178         * lib/gcd.c (gcd): Likewise.
21179
21180 2002-11-15  Bruno Haible  <bruno@clisp.org>
21181
21182         * lib/strcspn.c: Include <stddef.h>.
21183         (strcspn): Use ANSI C function declaration. Change return type to
21184         size_t. Use NULL.
21185         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21186         (strpbrk): Use NULL.
21187         * lib/strpbrk.h (PARAMS): Remove macro.
21188         (strpbrk): Use ANSI C function declaration.
21189         * lib/strstr.c: Don't include <sys/types.h>.
21190         * lib/strstr.h (PARAMS): Remove macro.
21191         (strstr): Use ANSI C function declarations.
21192
21193 2002-11-14  Karl Berry  <karl@gnu.org>
21194
21195         * config/mkinstalldirs: `do' on separate line, instead of
21196         `for var; do'.
21197
21198 2002-11-06  Bruno Haible  <bruno@clisp.org>
21199
21200         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21201         * lib/gcd.c (gcd): Likewise.
21202
21203 2002-11-05  Bruno Haible  <bruno@clisp.org>
21204
21205         * lib/gcd.h: New file, from gettext-0.11.5.
21206         * lib/gcd.c: New file, from gettext-0.11.5.
21207
21208 2002-11-05  Bruno Haible  <bruno@clisp.org>
21209
21210         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21211         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21212         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21213         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21214
21215         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21216         <libintl.h>.
21217         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21218         <libintl.h>.
21219
21220         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21221         * lib/human.c: Include gettext.h instead of <libintl.h>.
21222         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21223         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21224         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21225         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21226         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21227         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21228         (textdomain): Remove definition.
21229         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21230
21231         * lib/long-options.c: Remove include of <libintl.h> and definition of
21232         _.
21233         * lib/same.c: Remove include of <libintl.h> and definition of _.
21234
21235 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21236
21237         * lib/config.charset: A few additions for Solaris.
21238
21239 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21240
21241         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21242         * lib/localcharset.c (locale_charset): Declare as extern "C".
21243
21244 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21245
21246         * lib/config.charset: msdos in uk_UA uses CP1125.
21247
21248 2002-11-04  Bruno Haible  <bruno@clisp.org>
21249
21250         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21251         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21252         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21253         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21254         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21255
21256 2002-11-04  Bruno Haible  <bruno@clisp.org>
21257
21258         * lib/localcharset.c (locale_charset): Don't return an empty string.
21259
21260 2002-11-04  Bruno Haible  <bruno@clisp.org>
21261
21262         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21263         aliases.
21264
21265 2002-11-04  Bruno Haible  <bruno@clisp.org>
21266
21267         * lib/config.charset: Update for newest glibc. Add canonical names
21268         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21269
21270 2002-11-04  Bruno Haible  <bruno@clisp.org>
21271
21272         * lib/config.charset: Add support for NetBSD.
21273
21274 2002-11-04  Bruno Haible  <bruno@clisp.org>
21275
21276         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21277
21278 2002-11-01  Bruno Haible  <bruno@clisp.org>
21279
21280         * configure.in: Add AC_CONFIG_AUX_DIR call.
21281         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21282         test/Makefile.
21283         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21284
21285 2002-09-28  Karl Berry  <karl@gnu.org>
21286
21287         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21288         installed automake until the next release, since changes have been
21289         made.
21290
21291 2002-09-25  Karl Berry  <karl@gnu.org>
21292
21293         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21294         * lib/getopt*: copy from libc/posix.
21295         * lib/gettext.h: copy from gettext.
21296         * lib/.cppi-disable: add strdup.c, gettext.h.
21297
21298 2002-09-25  Karl Berry  <karl@gnu.org>
21299
21300         * config/srclist.txt: enable gettext.h check.
21301         * config/config.{guess,sub}: update from prep.
21302         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21303                 from automake 1.6.3.
21304         See srclist*.
21305
21306 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21307
21308         * regex.c (PATFETCH): Remove the translating fetch.
21309         (PATFETCH_RAW): Rename to PATFETCH.
21310         (set_image_of_range): New fun.
21311         (SET_RANGE_TABLE_WORK_AREA): Use it.
21312         (regex_compile): Don't translate the pattern chars so eagerly.
21313         Only do it when inserting an `exactn' bytecode or when handling
21314         a char-range.
21315         (mutually_exclusive_p): Avoid empty statement.
21316
21317 2002-07-06  Jim Meyering  <meyering@lucent.com>
21318
21319         * m4/README: Don't mention Makefile.am.in.
21320         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21321
21322 2002-07-01  Jim Meyering  <meyering@lucent.com>
21323
21324         * lib/c-stack.c: Include sys/time.h.
21325         From Volker Borchert.
21326
21327 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21328
21329         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21330
21331 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21332
21333         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21334         New macro.  Use it uniformly instead of
21335         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21336         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21337         reported by Vin Shelton.
21338
21339 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21340
21341         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21342         Do not assume SA_SIGINFO behavior.
21343         Bug reported by Jim Meyering on NetBSD 1.5.2.
21344
21345 2002-06-22  Jim Meyering  <meyering@lucent.com>
21346
21347         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21348         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21349
21350         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21351         now that configure.ac uses AC_GNU_SOURCE.
21352         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21353         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21354
21355         Update to latest tools.  Suggestions from Paul Eggert.
21356         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21357         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21358         * m4/fnmatch.m4: Likewise.
21359         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21360         to AC_HEADER_STDBOOL
21361
21362 2002-06-22  Jim Meyering  <meyering@lucent.com>
21363
21364         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21365         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21366
21367 2002-06-22  Jim Meyering  <meyering@lucent.com>
21368
21369         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21370
21371         * lib/exitfail.c, exitfail.h: Likewise.
21372         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21373
21374         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21375         of fnmatch.h.
21376         (EXTRA_DIST): Add fnmatch_loop.c.
21377         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21378
21379         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21380         * lib/fnmatch.c: Update from diffutils-2.8.2.
21381         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21382         * lib/fnmatch.h: Remove file.
21383
21384 2002-06-21  Jim Meyering  <meyering@lucent.com>
21385
21386         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21387         * m4/mbrtowc.m4: Likewise.
21388
21389         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21390         * m4/mbswidth.m4: Reflect name change:
21391         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21392         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21393
21394         * m4/lib-link.m4: Update from gettext-0.11.2.
21395         * m4/gettext.m4: Likewise.
21396
21397         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21398         From Alfred M. Szmidt.
21399
21400 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21401
21402         * lib/file-type.h: Report an error if neither S_ISREG nor
21403         S_IFREG is defined, instead of using a test specific to glibc
21404         2.2.  This should be safe, since POSIX requires S_ISREG and
21405         Unix Version 7 had S_IFREG.  We don't need to check for
21406         <sys/types.h> since we don't use any symbols that it defines.
21407
21408 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21409
21410         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21411         $@-t, so that each temporary file name is unique and valid in the first
21412         8 characters, for operation under DOS.
21413
21414 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21415
21416         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21417
21418 2002-06-15  Jim Meyering  <meyering@lucent.com>
21419
21420         Work even with DJGPP 2.03, which lacks support for symlinks.
21421         From Richard Dawe.
21422         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21423         is defined.
21424         * lib/lchown.c (S_ISLNK): Likewise.
21425
21426 2002-06-15  Jim Meyering  <meyering@lucent.com>
21427
21428         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21429         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21430         have been included before this file.
21431
21432 2002-06-14  Jim Meyering  <meyering@lucent.com>
21433
21434         * lib/file-type.h: Use the version from diffutils-2.8.2.
21435         * lib/file-type.c: Likewise.
21436
21437 2002-06-07  Jim Meyering  <meyering@lucent.com>
21438
21439         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21440         They're needed at least for NetBSD 1.5.2.
21441         ($statxfs_includes): Include those same headers.
21442         ($statxfs_includes): Include sys/vfs.h if available.
21443         ($statxfs_includes): Likewise for sys/statvfs.h.
21444         Check for the following members in both structs statfs and statvfs:
21445         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21446
21447 2002-06-01  Jim Meyering  <meyering@lucent.com>
21448
21449         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21450         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21451
21452 2002-05-28  Jim Meyering  <meyering@lucent.com>
21453
21454         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21455         Reported by Volker Borchert.
21456
21457 2002-05-27  Jim Meyering  <meyering@lucent.com>
21458
21459         Fix a problem seen only on nonconforming systems whereby ls.c's
21460         use of localtime, and then of gettimeofday would cause trouble:
21461         the localtime call used to initialize rpl_gettimeofday's save
21462         mechanism would clobber ls's current local time information so
21463         that in any long listing the first file would always be listed
21464         with date 1970-01-01.  Analysis by Volker Borchert.
21465
21466         * lib/gettimeofday.c (localtime): Undefine.
21467         (rpl_localtime): New function.
21468
21469 2002-05-27  Jim Meyering  <meyering@lucent.com>
21470
21471         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21472         localtime.
21473
21474         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21475         use the replacement function; it wouldn't resolve at link time.
21476         Reported by Volker Borchert.
21477
21478 2002-05-22  Jim Meyering  <meyering@lucent.com>
21479
21480         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21481         file-type.h.
21482         * lib/file-type.h: New file.
21483         * lib/file-type.c (file_type): New file/function.  Extracted from
21484         diffutils.
21485
21486 2002-04-30  Jim Meyering  <meyering@lucent.com>
21487
21488         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21489
21490 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21491
21492         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21493
21494 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21495
21496         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21497         Do not check for alloca.h (no longer used) or stdbool.h (was never
21498         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21499
21500 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21501
21502         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21503
21504 2002-04-29  Jim Meyering  <meyering@lucent.com>
21505
21506         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
21507         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
21508         Use AC_FUNC_STRNLEN here instead.
21509
21510         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
21511         With autoconf-2.53a, it's part of AC_PROG_CC.
21512
21513 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21514
21515         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
21516         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
21517
21518 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21519
21520         * lib/sig2str.h, lib/sig2str.c: New files.
21521         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
21522
21523 2002-04-28  Paul Eggert  <eggert@twinsun.com>
21524
21525         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
21526         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
21527         of 127, since 64 is the largest conceivable number for ancient
21528         nonstandard hosts.
21529         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
21530
21531 2002-04-28  Jim Meyering  <meyering@lucent.com>
21532
21533         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
21534
21535 2002-04-24  Jim Meyering  <meyering@lucent.com>
21536
21537         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
21538         (jm_PREREQ): Use it.
21539
21540         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
21541         mach/mach.h fcntl.h.
21542         Check for this function: setlocale.
21543
21544 2002-04-24  Jim Meyering  <meyering@lucent.com>
21545
21546         * lib/gettext.h: New file, from Gettext.
21547         * lib/Makefile.am (INCLUDES): Remove -I../intl.
21548         (libfetish_a_SOURCES): Add gettext.h.
21549
21550 2002-04-16  Jim Meyering  <meyering@lucent.com>
21551
21552         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
21553         ut_pid, ut_id, ut_exit.
21554
21555 2002-04-16  Jim Meyering  <meyering@lucent.com>
21556
21557         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
21558         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
21559         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
21560
21561 2002-04-12  Jim Meyering  <meyering@lucent.com>
21562
21563         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
21564         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
21565         existence of the getmntinfo function.  Needed for Darwin 5.3.
21566
21567         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
21568         This is necessary at least on Darwin 5.3.
21569
21570         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
21571         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
21572         strnlen.o in the library, and that makes some versions of ranlib
21573         object.
21574
21575 2002-04-12  Jim Meyering  <meyering@lucent.com>
21576
21577         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
21578
21579 2002-04-09  Jim Meyering  <meyering@lucent.com>
21580
21581         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
21582         to be more precise.  Rather than saying we're checking whether the
21583         function `works', say what we're testing.
21584         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
21585         Reported by Bruno Haible.
21586
21587 2002-03-10  Jim Meyering  <meyering@lucent.com>
21588
21589         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
21590         Suggestion from Santiago Vila.
21591
21592 2002-03-08  Jim Meyering  <meyering@lucent.com>
21593
21594         * lib/rename.c: Mention that this wrapper is needed also on
21595         mips-dec-ultrix4.4 systems.
21596
21597 2002-03-02  Jim Meyering  <meyering@lucent.com>
21598
21599         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
21600         not HAVE_CLOCK_SETTIME.
21601
21602 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21603
21604         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
21605         Check for clock_settime.
21606
21607 2002-02-27  Paul Eggert  <eggert@twinsun.com>
21608
21609         * lib/nanosleep.h: Rename to....
21610         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
21611
21612         * lib/gettime.c: New file.
21613         * lib/settime.c: New file.
21614         * lib/stime.c: Remove.
21615
21616         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
21617         timespec.h.  Remove nanosleep.h.
21618
21619 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21620
21621         * m4/acl.m4: New file.
21622         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
21623         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
21624
21625 2002-02-25  Paul Eggert  <eggert@twinsun.com>
21626
21627         * lib/acl.c, lib/acl.h: New files.
21628         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
21629
21630 2002-02-24  Jim Meyering  <meyering@lucent.com>
21631
21632         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
21633         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
21634         cause trouble.  Reported by Nelson Beebe.
21635
21636 2002-02-23  Paul Eggert  <eggert@twinsun.com>
21637
21638         * lib/path-concat.c (xpath_concat): Reorder code to pacify
21639         compilers that don't know that xalloc_die never returns.
21640
21641 2002-02-20  Jim Meyering  <meyering@lucent.com>
21642
21643         * lib/getdate.c: Regenerate using bison-1.33.
21644
21645 2002-02-17  Jim Meyering  <meyering@lucent.com>
21646
21647         * config/config.guess (main): Don't use `head -1'; it's no longer
21648         portable. Use `sed 1q' instead.
21649
21650 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
21651
21652         * m4/codeset.m4: Upgrade to gettext-0.11.
21653         * m4/gettext.m4: Upgrade to gettext-0.11.
21654         * m4/glibc21.m4: Upgrade to gettext-0.11.
21655         * m4/iconv.m4: Upgrade to gettext-0.11.
21656         * m4/isc-posix.m4: Upgrade to gettext-0.11.
21657         * m4/lcmessage.m4: Upgrade to gettext-0.11.
21658         * m4/lib-ld.m4: New file, from gettext-0.11.
21659         * m4/lib-link.m4: New file, from gettext-0.11.
21660         * m4/lib-prefix.m4: New file, from gettext-0.11.
21661         * m4/progtest.m4: Upgrade to gettext-0.11.
21662
21663 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21664
21665         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
21666         (jm_PREREQ): Use it.
21667
21668 2002-02-15  Paul Eggert  <eggert@twinsun.com>
21669
21670         * lib/posixver.c, lib/posixver.h: New files.
21671         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21672
21673 2002-02-02  Paul Eggert  <eggert@twinsun.com>
21674             Bruno Haible  <bruno@clisp.org>
21675
21676         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
21677         (fwrite_success_callback): New declaration.
21678         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
21679         print_unicode_char. Call failure callback instead of error.
21680         (fwrite_success_callback): New function.
21681         (exit_failure_callback): New function.
21682         (fallback_failure_callback): New function.
21683         (print_unicode_char): Call unicode_to_mb.
21684
21685 2002-01-26  Jim Meyering  <meyering@lucent.com>
21686
21687         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
21688         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
21689
21690 2002-01-26  Jim Meyering  <meyering@lucent.com>
21691
21692         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
21693
21694 2002-01-22  Paul Eggert  <eggert@twinsun.com>
21695
21696         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
21697
21698 2002-01-22  Jim Meyering  <meyering@lucent.com>
21699
21700         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
21701         Otherwise, some versions of automake would omit the rule that makes
21702         Makefile from Makefile.in.
21703
21704 2002-01-21  Paul Eggert  <eggert@twinsun.com>
21705
21706         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
21707         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
21708         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
21709         (memcoll): Set errno to zero if there is no error.
21710
21711         * lib/quotearg.c (quotearg_buffer_restyled):
21712         Fix bug with quoting buffers containing NUL when backslashing escapes.
21713         This bug was exposed by the other changes in this patch.
21714         (quotearg_n_options): New arg ARGSIZE.
21715         All callers changed.
21716         (quoting_options_from_style): New function.
21717         (quotearg_n_style): Use it.
21718         (quotearg_n_style_mem): New function.
21719
21720         * lib/quotearg.h (quotearg_n_style_mem): New function.
21721
21722 2002-01-19  Jim Meyering  <meyering@lucent.com>
21723
21724         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
21725         Remove useless quotes: DF_PROG="df".
21726         * m4/strnlen.m4: New file.
21727
21728 2002-01-16  Paul Eggert  <eggert@twinsun.com>
21729
21730         * lib/backupfile.c (ISDIGIT): Comment fix.
21731         * lib/getdate.y (ISDIGIT): Likewise.
21732         * lib/posixtm.c (ISDIGIT, year): Likewise.
21733         * lib/strverscmp.c (ISDIGIT): Likewise.
21734         * lib/userspec.c (ISDIGIT): Likewise.
21735
21736 2002-01-16  Jim Meyering  <meyering@lucent.com>
21737
21738         * lib/getdate.y: Add three semicolons, each just before a closing
21739         brace. Bison (as of version 1.31) no longer papers over that mistake.
21740
21741 2002-01-05  Jim Meyering  <meyering@lucent.com>
21742
21743         * lib/version-etc.c (version_etc_copyright): Update copyright year.
21744
21745 2001-12-19  Paul Eggert  <eggert@twinsun.com>
21746
21747         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
21748         not silently exit merely because the output buffer happens to
21749         have nothing pending.
21750
21751 2001-12-18  Paul Eggert  <eggert@twinsun.com>
21752
21753         See the big note in ../ChangeLog.
21754         * lib/human.c (suffixes): Prefer K to k for 1024.
21755         (generate_suffix_backwards): New function.
21756         (human_readable_inexact): Use it.
21757         * lib/xstrtol.c (__xstrtol): If there is no number but there
21758         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
21759         Accept 'K' as well as 'k'.
21760
21761 2001-12-15  Jim Meyering  <meyering@lucent.com>
21762
21763         * lib/regex.h (__restrict_arr): Update from libc.
21764
21765         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
21766         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
21767         (STREQ): Define.
21768
21769 2001-12-14  Jim Meyering  <meyering@lucent.com>
21770
21771         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
21772         Suggestion from Bruno Haible.
21773
21774 2001-12-10  Jim Meyering  <meyering@lucent.com>
21775
21776         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
21777         xrealloc, Instead, include "xalloc.h".
21778         (initbuffer): Don't cast xmalloc return value to char*.
21779         (readline): Reword comment.
21780         Don't cast xrealloc return value to char*
21781         Return NULL, not 0.
21782
21783 2001-12-09  Jim Meyering  <meyering@lucent.com>
21784
21785         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
21786         about `signed and unsigned type in conditional expression'.
21787         * lib/posixtm.c (posix_time_parse): Likewise.
21788
21789         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
21790
21791         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
21792         to avoid a pedantic warning.
21793
21794         * lib/getstr.c: Don't include assert.h.
21795         (getstr): Remove warning-evoking assertions.
21796         Return -1 if offset parameter is out of bounds.
21797         Change the type of a local from int to size_t.
21798
21799         * lib/strftime.c (my_strftime_localtime_r): Include this function
21800         definition in the `#if ! HAVE_TM_GMTOFF' block.
21801
21802         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
21803         Include xalloc.h instead.
21804
21805 2001-12-02  Jim Meyering  <meyering@lucent.com>
21806
21807         * lib/tempname.c: Don't declare getenv, thus reverting the change of
21808         2001-11-18.  It's no longer necessary, now that stdlib.h is always
21809         included.
21810
21811         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
21812         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
21813
21814 2001-11-30  Akim Demaille  <akim@epita.fr>
21815
21816         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
21817         before being defined.
21818
21819 2001-11-27  Paul Eggert  <eggert@twinsun.com>
21820
21821         * lib/quotearg.h (quotearg_n, quotearg_n_style):
21822         First arg is int, not unsigned.
21823         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21824         (SIZE_MAX, UINT_MAX): New macros.
21825         (quotearg_n_options): Abort if N is negative.
21826         Avoid overflow check on hosts where size_t is 64 bits and int
21827         is 32 bits, as overflow is impossible there.
21828         Fix off-by-one typo that caused unnecessary reallocation.
21829
21830 2001-11-27  Jim Meyering  <meyering@lucent.com>
21831
21832         * lib/tempname.c: Merge with version from libc.
21833         * lib/regex.c: Likewise.
21834
21835         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
21836         systems for which STDC_HEADERS is 0, it was not included, resulting in
21837         a warning about an integer-to-pointer conversion problem with getenv.
21838         Reported by Volker Borchert.
21839
21840 2001-11-26  Jim Meyering  <meyering@lucent.com>
21841
21842         * lib/gtod.h: Remove file.
21843         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
21844         * lib/gettimeofday.c: Don't include gtod.h.
21845         (GTOD_init): Remove function.
21846         (rpl_gettimeofday): Do its job here instead, rather than aborting.
21847         Suggestion from Volker Borchert.
21848
21849 2001-11-23  Jim Meyering  <meyering@lucent.com>
21850
21851         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
21852         it.
21853         * lib/hash.c (struct hash_table): Define it here instead.
21854
21855 2001-11-22  Jim Meyering  <meyering@lucent.com>
21856
21857         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
21858
21859 2001-11-20  Jim Meyering  <meyering@lucent.com>
21860
21861         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
21862         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
21863
21864 2001-11-19  Jim Meyering  <meyering@lucent.com>
21865
21866         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
21867         directory.  Use "conftestXXXXXX" as the template.
21868         Suggestion from Paul Eggert.
21869
21870         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
21871         immediately, so the test doesn't mistakenly hit the max-open-files
21872         limit.
21873
21874 2001-11-18  Paul Eggert  <eggert@twinsun.com>
21875
21876         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
21877         (TEMPORARIES): New macro.
21878         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
21879         removes an artificial limitation (e.g. HP-UX 10.20, where
21880         TMP_MAX is 17576).
21881
21882 2001-11-18  Jim Meyering  <meyering@lucent.com>
21883
21884         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
21885
21886 2001-11-18  Jim Meyering  <meyering@lucent.com>
21887
21888         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
21889         on SunOS 4.
21890
21891         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
21892         files will be created before anything else.
21893
21894 2001-11-17  Paul Eggert  <eggert@twinsun.com>
21895
21896         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
21897         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
21898
21899 2001-11-17  Jim Meyering  <meyering@lucent.com>
21900
21901         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
21902         Prompted by a report from Bob Proulx.
21903
21904         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
21905         Instead, require UTILS_FUNC_MKSTEMP.
21906
21907 2001-11-17  Jim Meyering  <meyering@lucent.com>
21908
21909         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
21910         Now, that's done as part of AC_FUNC_STRTOD.
21911
21912 2001-11-17  Jim Meyering  <meyering@lucent.com>
21913
21914         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
21915         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
21916         rather than group writable.  Patch by Juan F. Codagnone.
21917
21918         * lib/readtokens.c: Remove explicit declarations of xmalloc and
21919         xrealloc, Instead, include "xalloc.h".
21920
21921         * lib/mountlist.c: Include unlocked-io.h after all system headers.
21922         Remove explicit declarations of xmalloc, xrealloc,
21923         and xstrdup.  Instead, include "xalloc.h".
21924
21925         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
21926         unlocked-io.h.
21927         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
21928         Likewise.
21929         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
21930
21931         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
21932         Reported by Padraig Brady.
21933
21934         * lib/mkstemp.c: #undef mkstemp.
21935         Include config.h.
21936         (rpl_mkstemp): Rename from mkstemp.
21937         Protoize.
21938
21939 2001-11-16  Jim Meyering  <meyering@lucent.com>
21940
21941         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
21942         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
21943         determine the amount of total physical memory, use pstat_getstatic.
21944         HPUX-11 doesn't define _SC_PHYS_PAGES.
21945         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
21946         If sysconf couldn't be used to determine the amount of available
21947         physical memory, use both pstat_getstatic and pstat_getdynamic.
21948         Based on a patch from Bob Proulx.
21949
21950 2001-11-10  Jim Meyering  <meyering@lucent.com>
21951
21952         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
21953         (jm_PREREQ): Use it.
21954
21955 2001-11-09  Jim Meyering  <meyering@lucent.com>
21956
21957         * m4/jm-macros.m4: Require autoconf-2.52f.
21958         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
21959         Use these AC_-prefixed names, not the AM_-prefixed ones.
21960
21961         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
21962
21963 2001-11-05  Jim Meyering  <meyering@lucent.com>
21964
21965         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
21966
21967 2001-11-04  Jim Meyering  <meyering@lucent.com>
21968
21969         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
21970         $DEFS.
21971
21972 2001-11-03  Jim Meyering  <meyering@lucent.com>
21973
21974         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
21975         of AC_DEFUN.
21976
21977         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
21978         know the name of the variable in the macro definition.
21979
21980 2001-11-03  Jim Meyering  <meyering@lucent.com>
21981
21982         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
21983         in argmatch_to_argument call.
21984
21985         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
21986         argument.
21987
21988         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
21989         e.g., a fault due to an attempt to free a NULL pointer.
21990
21991 2001-11-01  Jim Meyering  <meyering@lucent.com>
21992
21993         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
21994         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
21995
21996 2001-11-01  Jim Meyering  <meyering@lucent.com>
21997
21998         * lib/dirfd.c, lib/dirfd.h: New files.
21999         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22000
22001         * lib/hash.c (hash_print) [TESTING]: Clean up.
22002
22003 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22004
22005         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22006         to avoid a warning if -Wall.
22007
22008 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22009
22010         * README: New file
22011         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22012         (per RMS's instructions, this is now the canonical source)
22013         * lgpl/, gpl/: New directories.
22014
22015 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22016
22017         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22018
22019 2001-10-21  Jim Meyering  <meyering@lucent.com>
22020
22021         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22022         this code would end up calling gettext even in packages built
22023         with --disable-nls.
22024         * lib/getopt.c (_): Likewise.
22025         * lib/regex.c (_): Likewise.
22026
22027 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22028
22029         * m4/error.m4 (jm_PREREQ_ERROR):
22030         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22031         AC_FUNC_STRERROR_R does that.
22032         Check for strerror declaration.
22033
22034         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22035         are supposed to have them these days.
22036         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22037         Merge changes from latest Autoconf CVS.
22038         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22039         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22040         POSIX decided to standardize on the int flavor of strerror_r.
22041
22042 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22043
22044         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22045         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22046         Use strerror_r that is only a macro, even if it is not a function.
22047         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22048         (private_strerror): Use prototypes, not old-style function definition.
22049         (print_errno_message): New function.
22050         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22051         char*-flavored one.
22052         (error_tail, error, error_at_line): Use it.
22053
22054 2001-10-11  Jim Meyering  <meyering@lucent.com>
22055
22056         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22057         and quote_n (1, ... to avoid clobbering a buffer.
22058
22059 2001-10-05  Jim Meyering  <meyering@lucent.com>
22060
22061         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22062         hash-pjw.h.
22063         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22064         * lib/hash-pjw.h: New file.
22065
22066 2001-09-30  Jim Meyering  <meyering@lucent.com>
22067
22068         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22069         `struct fsstat' has the `f_fstypename' member.
22070         Use that to define FS_TYPE, which is now used to make
22071         the getfsstat link test tighter.
22072
22073 2001-09-30  Jim Meyering  <meyering@lucent.com>
22074
22075         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22076         Include <sys/ucred.h>, for Apple Darwin.
22077         Include sys/mount.h and sys/fs_types.h only if available.
22078         (FS_TYPE): Define.
22079         (read_filesystem_list): Use FS_TYPE.
22080
22081 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22082
22083         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22084         a boolean context.
22085
22086 2001-09-29  Jim Meyering  <meyering@lucent.com>
22087
22088         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22089         [one-argument getmntent function]): Include stdio.h before mntent.h.
22090         SunOS 4.1.x needs it for the declaration of `FILE'.
22091         Patch by Volker Borchert.
22092
22093         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22094         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22095         sys/fs_types.h, and make the link-test for getfsstat guard #include
22096         directives with appropriate #if HAVE_*_H tests so that we can
22097         detect getfsstat on Apple Darwin1.3.7 systems.
22098         Reported by Nelson Beebe.
22099         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22100
22101 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22102
22103         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22104         #defines strtoimax.  Also treat the other strto* functions
22105         like strtoimax.
22106
22107         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22108         Check for strtoul and strtoumax,
22109         as those declarations are made even in the signed case.
22110         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22111         Likewise, for strtol and strtoimax.
22112
22113 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22114
22115         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22116         #defines strtoimax.  Also treat the other strto* functions
22117         like strtoimax.
22118
22119         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22120         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22121         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22122
22123 2001-09-26  Jim Meyering  <meyering@lucent.com>
22124
22125         Most macros in unlocked-io.h had the wrong number of arguments.
22126         * lib/gen-uio: New script.
22127         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22128         * lib/unlocked-io.hin: Remove file.
22129         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22130         rather than trying to embed it here.
22131         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22132         Reported by Padraig Brady.
22133
22134 2001-09-25  Volker Borchert  <bt@teknon.de>
22135
22136         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22137         `result'.
22138
22139 2001-09-24  Jim Meyering  <meyering@lucent.com>
22140
22141         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22142
22143 2001-09-23  Jim Meyering  <meyering@lucent.com>
22144
22145         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22146         instead of the mere test for existence of mntent.h.  The latter
22147         would get a false-positive on AIX 3.4 systems.
22148         In the outer getmntent if-block, don't die if neither of the getmntent
22149         tests succeeds.  Instead, just fall through and continue with the
22150         remaining tests.
22151
22152 2001-09-23  Jim Meyering  <meyering@lucent.com>
22153
22154         * lib/mountlist.c: Remove useless parentheses in #if directives.
22155         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22156         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22157
22158 2001-09-22  Jim Meyering  <meyering@lucent.com>
22159
22160         * m4/gettext.m4: New file.  From gettext.
22161         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22162         * m4/progtest.m4: Likewise
22163         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22164         * m4/glibc21.m4: Likewise.
22165
22166         * m4/libintl.m4: Remove.  No longer used.
22167
22168 2001-09-22  Jim Meyering  <meyering@lucent.com>
22169
22170         * lib/localcharset.c: Update from latest gettext.
22171         * lib/config.charset: Likewise.
22172
22173 2001-09-20  Jim Meyering  <meyering@lucent.com>
22174
22175         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22176         strtoimax.
22177         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22178         strtoumax.
22179
22180 2001-09-20  Jim Meyering  <meyering@lucent.com>
22181
22182         * lib/xstrtol.c (strtoimax): Guard declaration with
22183         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22184         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22185         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22186         (strtoumax): Likewise, for completeness (it wasn't necessary).
22187
22188 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22189
22190         * lib/strtoimax.c (HAVE_LONG_LONG):
22191         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22192         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22193         to work around bug in IBM C compiler.
22194
22195 2001-09-17  Jim Meyering  <meyering@lucent.com>
22196
22197         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22198         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22199         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22200         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22201         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22202         whenever the right hand side need not be expanded by the shell.
22203
22204 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22205
22206         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22207         library.  It's not correct, as some older glibcs are buggy.
22208         fnmatch wasn't fixed until glibc 2.2.
22209
22210         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22211         special shell magic here.
22212
22213 2001-09-16  Jim Meyering  <meyering@lucent.com>
22214
22215         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22216         * m4/jm-macros.m4: Require it.
22217
22218 2001-09-16  Jim Meyering  <meyering@lucent.com>
22219
22220         * lib/mkdir.c: New file.
22221
22222 2001-09-15  Jim Meyering  <meyering@lucent.com>
22223
22224         * m4/jm-macros.m4: Check for help2man.
22225
22226 2001-09-11  Jim Meyering  <meyering@lucent.com>
22227
22228         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22229         The body, by Paul Eggert, was moved here from configure.in.
22230         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22231
22232 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22233
22234         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22235         (jm_PREREQ): Use it.
22236
22237 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22238
22239         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22240         Use ssize_t, not int, to store result of readlink.
22241         Check for ssize_t overflow as well as size_t overflow,
22242         as POSIX says the result of readlink is implementation-defined
22243         when ssize_t overflows.
22244         Remove unnecessary cast to char*.
22245         Use free+malloc instead of realloc, as the storage doesn't need
22246         to be preserved and it's clearer and can be more efficient that way.
22247         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22248         * lib/xreadlink.h (xreadlink): Update prototype.
22249
22250 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22251
22252         * lib/xgetcwd.c: Revert some of the previous change; intead,
22253         fix the HAVE_GETCWD_NULL code to behave more like the
22254         !HAVE_GETCWD_NULL code used to.
22255
22256         Include "xalloc.h".
22257         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22258         invoke xalloc_die.
22259
22260 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22261
22262         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22263         sys/param.h, as pathmax.h includes them.
22264
22265 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22266
22267         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22268         (jm_PREREQ_XGETCWD): New macro.
22269
22270         * m4/getcwd.m4: New file.
22271
22272 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22273
22274         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22275         like the HAVE_GETCWD_NULL code.
22276         Include pathmax.h if not HAVE_GETCWD.
22277         Do not include xalloc.h.
22278         (INITIAL_BUFFER_SIZE): New symbol.
22279         Do not use xmalloc / xrealloc, since the caller is responsible for
22280         handling errors.  Preserve errno around `free' during failure.
22281         Do not overrun buffer when using getwd.
22282
22283 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22284
22285         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22286         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22287         getcwd (NULL, 0).
22288
22289 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22290
22291         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22292         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22293         spotted by Jim Meyering.
22294
22295 2001-09-03  Jim Meyering  <meyering@lucent.com>
22296
22297         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22298         failure.
22299
22300 2001-09-02  Jim Meyering  <meyering@lucent.com>
22301
22302         * lib/error.c: Update from GNU libc.
22303
22304 2001-09-01  Jim Meyering  <meyering@lucent.com>
22305
22306         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22307         Used by df.
22308
22309 2001-09-01  Jim Meyering  <meyering@lucent.com>
22310
22311         * lib/xreadlink.c: New file.
22312         * lib/xreadlink.h: New file.
22313         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22314         xreadlink.h.
22315
22316         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22317         doesn't conflict with sparc Solaris 7's definition in
22318         /usr/include/sys/int_types.h.
22319
22320         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22321         files.
22322         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22323         and strncasecmp as r-values.  Unixware didn't have declarations.
22324
22325 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22326
22327         * lib/xstrtol.h: Add copyright notice.
22328         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22329         LONGINT_INVALID_SUFFIX_CHAR.
22330
22331 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22332
22333         * lib/xstrtol.c (strtoimax): New decl.
22334
22335 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22336
22337         * lib/xgetcwd.c: Don't include pathmax.h.
22338         Include stdlib.h and unistd.h if available.
22339         Include xalloc.h.
22340         (xmalloc, xstrdup, free): Remove decls.
22341         (xgetcwd): Don't assume sizes fit in unsigned.
22342         Check for overflow when computing sizes.
22343         Simplify reallocation code.
22344
22345 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22346
22347         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22348         a directory's st_size can have an arbitrary value, so the old
22349         usage could waste an arbitrary amount of memory.  All uses
22350         changed.
22351         * lib/savedir.h: Update prototype.
22352
22353 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22354
22355         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22356
22357         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22358         old strtoimax.c.
22359
22360         Also, make the following further changes to make this file's
22361         configuration more similar to that of strtol.c:
22362         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22363         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22364         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22365         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22366         changed to signed values.
22367
22368         And make the following changes as well:
22369         Fix copyright notice, as 1999 was missing.
22370         (verify): New macro.
22371         (strtoimax): Check sizes at compile-time, not run-time.
22372         Prefer strtol to strtoll if both work.
22373         (main): Remove; it was not that useful and was a pain to maintain.
22374
22375         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22376
22377 2001-08-31  Jim Meyering  <meyering@lucent.com>
22378
22379         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22380         Use an initial, malloc'd, buffer of length 128 rather than
22381         a statically allocated one of length 1024.
22382
22383 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22384
22385         Simplify code, partly by assuming autoconf 2.52 semantics.
22386
22387         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22388
22389         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22390         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22391         All uses removed.
22392         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22393         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22394         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22395         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22396         jm_AC_HEADER_INTTYPES_H.
22397         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22398
22399         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22400
22401         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22402         Quote first arg of AC_DEFUN.
22403         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22404         since they are needed to parse the include file even if we need
22405         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22406         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22407         but with opposite signedness.
22408
22409 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22410
22411         Merge 'exclude' changes from tar 1.13.22.
22412         This fixes one or two unlikely storage allocation overflow bugs,
22413         but doesn't change user-visible behavior otherwise.
22414
22415 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22416
22417         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22418         (jm_PREREQ_EXCLUDE): New macro.
22419
22420 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22421
22422         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22423         tm to be declared.
22424
22425 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22426
22427         * lib/hash.c: Remove '2001' from copyright notice.
22428
22429 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22430
22431         * lib/full-write.h: New file.
22432         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22433         * lib/full-write.c: Correct credits, as cccp.c no longer
22434         exists and anyway it was so heavily changed from the old cccp
22435         code as to be unrecognizable.  Include full-write.h.
22436         (full_write) Return size_t, with short writes meaning failure.
22437         All callers changed.  This fixes a bug with large buffers
22438         on 64-bit hosts.
22439         * lib/utime.c: Include full-write.h.
22440
22441 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22442
22443         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22444         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22445         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22446         Include if available.
22447         (<xalloc.h>): Include
22448         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22449         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22450         collide with FNM macros.
22451         (struct patopts): New struct.
22452         (struct exclude): Use it, as exclude patterns now come with options.
22453         (new_exclude): Support above changes.
22454         (new_exclude, add_exclude_file):
22455         Initial size must now be a power of two to simplify overflow checking.
22456         (free_exclude, fnmatch_no_wildcards): New function.
22457         (excluded_filename): No longer requires options arg, as the options
22458         are determined by add_exclude.  Now returns bool, not int.
22459         (excluded_filename, add_exclude):
22460         Add support for the fancy new exclusion options.
22461         (add_exclude, add_exclude_file): Now takes int options arg.
22462         Check for arithmetic overflow when computing sizes.
22463         (add_exclude_file): xrealloc might modify errno, so don't
22464         realloc until after errno might be used.
22465
22466         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22467         New macros.
22468         (free_exclude): New decl.
22469         (add_exclude, add_exclude_file): Now takes int options arg.
22470         (excluded_filename): No longer requires options arg, as the options
22471         are determined by add_exclude.  Now returns bool, not int.
22472
22473 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22474
22475         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22476
22477 2001-08-27  Jim Meyering  <meyering@lucent.com>
22478
22479         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22480
22481         * lib/version-etc.c (N_): Remove definition.
22482         Revert most of last change.
22483         Instead, simply don't mark the `Copyright...' string for translation.
22484         Based on advice from Paul Eggert.
22485
22486         * lib/strtoxmax.c: Tweak comment.
22487
22488 2001-08-26  Jim Meyering  <meyering@lucent.com>
22489
22490         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22491
22492         * m4/xstrtoimax.m4: New file.
22493         * m4/xstrtoumax.m4: Add comments explaining why we
22494         AC_REPLACE_FUNCS(strtol).
22495
22496 2001-08-26  Jim Meyering  <meyering@lucent.com>
22497
22498         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22499         of copyright with `%s' so translators don't get an untranslated
22500         message in 2002.
22501         (COPYRIGHT_YEAR): Define.
22502         (version_etc): Use fprintf rather than fputs.
22503         Suggestion from Ulrich Drepper.
22504
22505         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
22506
22507         * lib/strtoll.c: New file, from GNU libc.
22508         * lib/xstrtoimax.c: New file.
22509
22510         * lib/xstrtol.h: Add xstrtoimax.
22511         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
22512         * lib/strtoimax.c: New file.  Likewise, but first define
22513         STRTOUXMAX_SIGNED.
22514
22515         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
22516         ...
22517         * lib/strtoxmax.c: ... then renamed to this.
22518
22519 2001-08-18  Paul Eggert  <eggert@twinsun.com>
22520
22521         * m4/inttypes.m4: Add AC_PREREQ(2.13).
22522         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
22523         (jm_AC_TYPE_INTMAX_T): New macro.
22524         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
22525
22526         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
22527
22528         * m4/longlong.m4: Renamed from ulonglong.m4.
22529         * m4/inttypes.m4: Renamed from inttypes_h.m4.
22530         * m4/uintmax_t.m4: Removed.
22531
22532 2001-08-13  Paul Eggert  <eggert@twinsun.com>
22533
22534         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
22535         Port to Solaris 8, where 'sed' requires a space after the 'r'
22536         command, and where sh dislikes "$/".  Clean up the spacing a bit.
22537         Redirect output to $tmp just once.
22538
22539 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
22540
22541         * lib/addext.c (<errno.h>): Include.
22542         (errno): Declare if not defined.
22543         (addext): Work correctly when pathconf returns -1 and leaves
22544         errno alone because there is no limit.  Also, work even if
22545         pathconf returns a value greater than SIZE_MAX.
22546
22547 2001-08-12  Jim Meyering  <meyering@lucent.com>
22548
22549         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
22550         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
22551         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
22552         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
22553         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
22554         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
22555         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
22556         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
22557         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
22558         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
22559         utime.m4, utimes.m4, xstrtoumax.m4:
22560         Quote the first argument in each use of AC_DEFUN.
22561
22562 2001-08-12  Jim Meyering  <meyering@lucent.com>
22563
22564         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
22565         Simply `return getcwd (NULL, 0);'.
22566         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
22567         Use 1300 as initial value for length, not PATH_MAX.
22568
22569         * lib/pathmax.h: Clean up cpp syntax.
22570
22571 2001-08-12  Jim Meyering  <meyering@lucent.com>
22572
22573         * lib/gettimeofday.c: New file.
22574         * lib/gtod.h: New file.
22575         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
22576
22577 2001-08-05  Jim Meyering  <meyering@lucent.com>
22578
22579         * m4/jm-macros.m4: Require autoconf-2.52.
22580
22581 2001-08-04  Jim Meyering  <meyering@lucent.com>
22582
22583         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
22584         stmt, to get in sync with glibc.
22585
22586 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22587
22588         The following changes are from gettext 0.10.39 as maintained by
22589         Bruno Haible.
22590
22591         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
22592         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
22593         with inverted sense.  All uses changed.
22594
22595         * lib/mbswidth.c: Don't include <limits.h>.
22596         Include <stdlib.h> and <string.h> unconditionally.
22597         (iswcntrl, mbsinit, ISCNTRL): New macros.
22598         (mbsnwidth): Use K&R style function declarations.
22599         Don't bother checking for MB_LEN_MAX == 1, since the compiler
22600         can optimize it when MB_CUR_MAX == 1.
22601         The width of control characters is zero, not 1.
22602
22603 2001-08-03  Paul Eggert  <eggert@twinsun.com>
22604
22605         The following changes are from gettext 0.10.39 as maintained by
22606         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
22607
22608         * m4/codeset.m4: Upgrade to serial AM1.
22609         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
22610         all uses changed.  Quote first arg of AC_DEFUN.
22611         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
22612
22613         * m4/iconv.m4: Upgrade to serial AM2.
22614         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
22615         Add --with-libconv-prefix.
22616         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
22617         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
22618         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
22619         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
22620         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
22621
22622         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
22623         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
22624         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
22625         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
22626         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
22627         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
22628         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
22629         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
22630         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
22631
22632         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
22633         string.h any more.
22634
22635         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
22636         not the default value.
22637
22638         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
22639         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
22640         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
22641         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
22642         Also check for iswcntrl, used for wcwidth fallback.
22643         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
22644         to Autoconf 2.13.
22645
22646 2001-08-03  Jim Meyering  <meyering@lucent.com>
22647
22648         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
22649         as it was in the original.  Reported by Paul Eggert.
22650
22651 2001-07-16  Jim Meyering  <meyering@lucent.com>
22652
22653         * m4/gettimeofday.m4: New file.
22654         Prompted by a report from Bernhard Baehr.
22655
22656 2001-07-15  Jim Meyering  <meyering@lucent.com>
22657
22658         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
22659         stuff. Now it's in ../Makefile.cfg.
22660
22661 2001-07-15  Jim Meyering  <meyering@lucent.com>
22662
22663         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
22664         (BUILT_SOURCES): Add unlocked-io.h.
22665         (io_functions): Define.
22666         (unlocked-io.h): New rule.
22667         (DISTCLEANFILES): Add unlocked-io.h.
22668         (all-local): Depend on unlocked-io.h, to ensure it is created.
22669
22670         * lib/unlocked-io.hin: New file
22671
22672         * lib/regex.c: Update from glibc.
22673
22674 2001-07-05  Jim Meyering  <meyering@lucent.com>
22675
22676         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
22677         recommendation.
22678         (libfetish_a_SOURCES): Put all .h files here instead.
22679         Remove a thus-exposed (better checks in automake) duplicate and
22680         two unnecessary .h files.
22681
22682 2001-07-04  Jim Meyering  <meyering@lucent.com>
22683
22684         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
22685         that generates jm-glibc-io.m4 so that it doesn't trigger any make
22686         distcheck failure.
22687
22688 2001-07-02  Jim Meyering  <meyering@lucent.com>
22689
22690         The following changes were prompted by suggestions from Bruno Haible.
22691
22692         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
22693         is now generated.
22694         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
22695         definition of EXTRA_DIST.
22696         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
22697         ensure that the generated file is created/updated whenever the list
22698         of $(unlocked_functions) is changed.
22699         (jm-glibc-io.m4): New rule.
22700         (unlocked-io.h): New rule -- currently unused.
22701
22702 2001-06-24  Jim Meyering  <meyering@lucent.com>
22703
22704         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
22705         unmatched right bracket, rather than kludging it with an extra,
22706         falsely-matching quote in a comment.  Patch by Akim Demaille.
22707
22708 2001-06-11  Jim Meyering  <meyering@lucent.com>
22709
22710         * lib/regex.c: Update from GNU libc.
22711
22712 2001-05-27  Jim Meyering  <meyering@lucent.com>
22713
22714         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
22715         Check for ut_type in struct utmp.
22716
22717 2001-05-27  Jim Meyering  <meyering@lucent.com>
22718
22719         * lib/readutmp.h (UT_TYPE): Define.
22720
22721 2001-05-24  Jim Meyering  <meyering@lucent.com>
22722
22723         * lib/argmatch.c: Include "quote.h".
22724         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
22725         quote function.  Reported by Göran Uddeborg.
22726
22727 2001-05-22  Jim Meyering  <meyering@lucent.com>
22728
22729         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
22730         now that we use the package-supplied version unconditionally.
22731         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
22732
22733 2001-05-21  Jim Meyering  <meyering@lucent.com>
22734
22735         * m4/regex.m4: Change a couple backticks to single quotes to avoid
22736         shell syntax errors.
22737
22738 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22739
22740         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
22741
22742 2001-05-20  Paul Eggert  <eggert@twinsun.com>
22743
22744         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
22745         Don't bother to check library strftime, since
22746         we'll be using our own my_strftime function anyway.
22747         Define my_strftime instead of strftime.
22748
22749 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
22750
22751         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
22752         which is not yet declared.
22753
22754 2001-05-15  Jim Meyering  <meyering@lucent.com>
22755
22756         * m4/regex.m4: Use proper quoting so brackets appear in the test
22757         program.
22758         Reported by, and with help from, Bruno Haible.
22759
22760 2001-05-13  Jim Meyering  <meyering@lucent.com>
22761
22762         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
22763         undefined.
22764
22765 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22766
22767         dirname code cleanup.  base_name now behaves more compatibly
22768         with POSIX basename when given file names that have trailing
22769         slashes, and similarly for dir_name.  Add new primitives
22770         base_len and dir_len.  Put the directory-name-related decls
22771         into dirname.h.
22772
22773         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
22774         * lib/backupfile.c (base_name): Likewise.
22775         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
22776         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
22777         * lib/makepath.c (strip_trailing_slashes): Likewise.
22778         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
22779         ISSLASH): Likewise.
22780         * lib/rename.c (strip_trailing_slashes): Likewise.
22781         * lib/same.c (base_name): Likewise.
22782         * lib/stripslash.c (ISSLASH): Likewise.
22783
22784         * lib/addext.c: Include <dirname.h> after size_t is defined.
22785         * lib/backupfile.c: Likewise.
22786
22787         * lib/addext.c (addext): Use base_len to trim redundant
22788         trailing slashes instead of doing it ourselves.
22789         But do not trim the last slash if it is not redundant.
22790
22791         * lib/backupfile.c (find_backup_file_name,
22792         max_backup_version): Use base_len instead of rolling it ourselves.
22793         Handle the case of "" and (on DOS) "C:" correctly.
22794
22795         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
22796         needed. Include <string.h>, <dirname.h>.
22797         (base_name): Allow file names ending in slashes, other than names
22798         that are all slashes.  In this case, return the basename followed
22799         by the slashes.  This is more general, and can be used in places
22800         where the original base_name purposely had an assertion failure.
22801         (base_len): New function.
22802
22803         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
22804         Do not include <assert.h>; no longer needed.
22805         Include xalloc.h.
22806         (memrchr): Remove decl.
22807         (dir_name_r): Remove.
22808         (dir_len): Renamed from dirlen.  All callers changed.
22809         Rewrite in terms of base_name, for simplicity and consistency.
22810         (dir_name): Never return NULL.  All callers changed.
22811         Do not include <stdlib.h> in test program; no longer needed.
22812         return 0; is fine for test program.
22813
22814         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
22815         New macros.
22816         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
22817
22818         * lib/path-concat.c (path_concat): Use base_len to compute
22819         base length, not strlen; this means we cannot rely on memcpy
22820         to null-terminate.
22821
22822         * lib/same.c (STREQ): Remove.
22823         (same_name): Handle the case where the basename ends in trailing '/'.
22824
22825         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
22826         a slash was stripped.  Do not strip the last slash after a
22827         file system prefix.
22828
22829 2001-05-11  Paul Eggert  <eggert@twinsun.com>
22830
22831         * lib/Makefile.am (libfetish_a_SOURCES):
22832         Add strftime.c, since we now compile it on all hosts.
22833
22834         * lib/strftime.c (my_strftime):
22835         Define to nstrftime if emacs, but only if my_strftime is not defined.
22836         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
22837         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
22838         Add one more extra argument: a nanoseconds value.
22839         All uses changed.
22840         (ns): New macro.
22841         (my_strftime function): Add %N format.
22842         (emacs_strftimeu): Renamed from emacs_strftime,
22843         with extra ut argument.
22844
22845 2001-05-09  Paul Eggert  <eggert@twinsun.com>
22846
22847         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
22848
22849 2001-04-21  Jim Meyering  <meyering@lucent.com>
22850
22851         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
22852         doesn't interfere.
22853
22854 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
22855
22856         * m4/ftruncate.m4: Check for chsize.
22857         Link with ftruncate.o unconditionally if ftruncate is missing.
22858         This was required when cross-compiling to i586-mingw32msvc.
22859
22860 2001-04-08  Jim Meyering  <meyering@lucent.com>
22861
22862         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
22863         recomputed; that's necessary when the offset spans a DST transition.
22864         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
22865
22866 2001-04-02  Jim Meyering  <meyering@lucent.com>
22867
22868         * lib/regex.h, regex.c: Update from GNU libc.
22869
22870 2001-03-24  Jim Meyering  <meyering@lucent.com>
22871
22872         * m4/jm-macros.m4: Require autoconf-2.49d.
22873
22874 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
22875
22876         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
22877
22878 2001-03-19  Paul Eggert  <eggert@twinsun.com>
22879
22880         * lib/version-etc.c (version_etc_copyright): Update to 2001.
22881
22882 2001-03-17  Jim Meyering  <meyering@lucent.com>
22883
22884         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
22885         now that the version in autoconf is equivalent.
22886         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
22887
22888         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
22889         Suggestion from Akim Demaille.
22890
22891         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
22892         (jm_PREREQ_TEMPNAME): New function.
22893
22894 2001-03-16  Paul Eggert  <eggert@twinsun.com>
22895
22896         * lib/tempname.c (uint64_t): Define to uintmax_t if
22897         not defined, and if UINT64_MAX is not defined.
22898         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
22899         Reported by John David Anglin.
22900
22901 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
22902
22903         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
22904         resolve alias if codeset is empty.
22905         * lib/config.charset (BeOS): Use wildcard syntax.
22906
22907 2001-03-13  Jim Meyering  <meyering@lucent.com>
22908
22909         * lib/path-concat.c (path_concat)
22910         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
22911         concatenating e.g., `C:' and `foo'.
22912         From Bruno Haible.
22913
22914 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22915
22916         * lib/localcharset.c (locale_charset): Don't use
22917         setlocale(LC_CTYPE,NULL). Don't return NULL.
22918         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
22919
22920 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
22921
22922         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
22923         support for DOS/DJGPP.
22924
22925 2001-03-01  Paul Eggert  <eggert@twinsun.com>
22926
22927         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
22928         lacks mkstemp.  Compile our own tempname.c if we compile our own
22929         mkstemp.c, as mkstemp relies on tempname.
22930
22931 2001-03-01  Jim Meyering  <meyering@lucent.com>
22932
22933         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
22934         AH_VERBATIM really does output its argument verbatim.
22935
22936 2001-02-28  Paul Eggert  <eggert@twinsun.com>
22937
22938         * lib/Makefile.am (libfetish_a_SOURCES):
22939         Add dup-safer.c, fopen-safer.c.
22940         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
22941
22942         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
22943         * lib/unistd-safer.h: New files.
22944
22945 2001-02-25  Paul Eggert  <eggert@twinsun.com>
22946
22947         The mkstemp replacement is taken from glibc 2.2.2, with some
22948         portability fixes for use outside glibc, as follows:
22949
22950         * lib/tempname.c (struct_stat64): New macro.
22951         (direxists, __gen_tempname): Use it.
22952         This avoids a portability problem with Solaris 8.
22953
22954         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
22955         (<stddef.h>, <stdint.h>, <string.h>):
22956         Include only if STDC_HEADERS || _LIBC.
22957         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
22958         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
22959         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
22960         (__set_errno): Define this macro if <errno.h> doesn't.
22961         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
22962         Define these macros if <stdio.h> doesn't.
22963         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
22964         Define these macros if <sys/stat.h>
22965         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
22966         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
22967         __xstat64): Define if not _LIBC.
22968         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
22969         (__gen_tempname): Invoke gettimeofday only if
22970         HAVE_GETTIMEOFDAY || _LIBC;
22971         otherwise, fall back on plain "time".
22972         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
22973
22974         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
22975
22976         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
22977
22978 2001-02-18  Paul Eggert  <eggert@twinsun.com>
22979
22980         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
22981
22982 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22983
22984         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
22985         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
22986         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
22987         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22988
22989 2001-02-17  Paul Eggert  <eggert@twinsun.com>
22990
22991         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
22992         Remove workaround macros for hosts that have mbrtowc but not
22993         mbstate_t, as we now insist on proper declarations for both
22994         before using mbrtowc.
22995
22996 2001-02-17  Jim Meyering  <meyering@lucent.com>
22997
22998         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
22999         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23000         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23001         UnixWare 7.1.1.
23002
23003         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23004         rather than AC_CACHE_VAL.
23005
23006 2001-02-17  Jim Meyering  <meyering@lucent.com>
23007
23008         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23009         around included file name.
23010
23011         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23012
23013         * lib/strftime.c: Update from GNU libc (the only changes were to
23014         comments).
23015
23016 2001-02-17  Jim Meyering  <meyering@lucent.com>
23017
23018         * lib/regex.c: Update from libc.
23019
23020 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23021
23022         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23023         clash.
23024
23025 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23026
23027         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23028         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23029         Reported by Mark Hounschell via Paul Eggert.
23030
23031 2001-02-07  Jim Meyering  <meyering@lucent.com>
23032
23033         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23034
23035 2001-02-05  Jim Meyering  <meyering@lucent.com>
23036
23037         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23038         it includes the patch required for `large file' support with at least
23039         HP-UX's 10.20 /bin/cc.
23040
23041 2001-02-03  Jim Meyering  <meyering@lucent.com>
23042
23043         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23044         AS_IF, now that it works once again (mysteriously).
23045         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23046
23047 2001-01-30  Jim Meyering  <meyering@lucent.com>
23048
23049         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23050         * m4/chown.m4: Rename conftestchown to conftest.chown.
23051         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23052         s/conftestdir2/conftest.d2/.
23053         * m4/utimes.m4: s/conftestdata/conftest.data/
23054         Inspired by Pavel Roskin's change in autoconf.
23055
23056 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23057
23058         * lib/config.charset: Update for FreeBSD 4.2.
23059
23060 2001-01-27  Jim Meyering  <meyering@lucent.com>
23061
23062         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23063         a use of AS_IF.
23064         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23065
23066 2001-01-26  Jim Meyering  <meyering@lucent.com>
23067
23068         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23069         quotearg.c includes it.
23070
23071 2001-01-26  Jim Meyering  <meyering@lucent.com>
23072
23073         * lib/quotearg.c: Include stddef.h.
23074         * lib/quote.c: Include stddef.h.
23075         Reported by Axel Kittenberger.
23076
23077         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23078         line in double quotes so that it evokes a better diagnostic.
23079         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23080         Reported by Axel Kittenberger.
23081
23082 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23083
23084         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23085         as if it was a `charset'.
23086
23087 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23088
23089         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23090         has const.
23091
23092 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23093
23094         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23095         to avoid a warning.  Add back 'const' to inptr.
23096
23097 2001-01-20  Jim Meyering  <meyering@lucent.com>
23098
23099         Be sure that headers are checked before used in code compiled
23100         for the type checks.
23101         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23102         In place of that, invoke jm_CHECK_ALL_TYPES.
23103         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23104         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23105         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23106         The check for ssize_t was mistakenly run before the test for unistd.h.
23107
23108         The configure-time check for stdbool.h was missing.
23109         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23110         (jm_PREREQ_HASH): New function.
23111
23112 2001-01-17  Jim Meyering  <meyering@lucent.com>
23113
23114         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23115         for autoconf-2.49c.
23116         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23117
23118 2001-01-16  Jim Meyering  <meyering@lucent.com>
23119
23120         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23121         From Bruno Haible.
23122
23123 2001-01-14  Jim Meyering  <meyering@lucent.com>
23124
23125         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23126         foo and bar.  Create conftestdir/ in the script, not in the C code.
23127         Remove directories in the script, not in the C code.
23128         Remove conftestdir{,2} before trying to create the directory.
23129         Make the entire configure script fail if the mkdir fails.
23130
23131 2001-01-14  Jim Meyering  <meyering@lucent.com>
23132
23133         * lib/rename.c: New file.  From Volker Borchert.
23134         Include stdlib.h, string.h or strings.h, and xalloc.h.
23135         Use strip_trailing_slashes rather than open-coding it.
23136
23137 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23138
23139         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23140
23141 2001-01-03  Jim Meyering  <meyering@lucent.com>
23142
23143         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23144         of local `inptr' to avoid warning with some system declarations of
23145         iconv.
23146
23147 2001-01-02  Volker Borchert  <bt@teknon.de>
23148
23149         * m4/rename.m4: New file.
23150         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23151
23152 2001-01-01  Jim Meyering  <meyering@lucent.com>
23153
23154         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23155         even on systems with utmpx.h.  It's necessary for the declaration of
23156         utmp's ut_user member.  Reported by Andreas Jaeger.
23157
23158         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23159         available. They are required for the declarations of getgrgid and
23160         getpwuid resp.
23161         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23162         Reported by Andreas Jaeger.
23163
23164 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23165
23166         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23167         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23168         so `make install' also works in VPATH builds.
23169
23170 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23171
23172         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23173         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23174         can be used in subdirectories.
23175
23176 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23177
23178         * lib/modechange.c: Do not assume that mode_t uses the
23179         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23180         the other-execute bit of FOO even if S_IXOTH != 1.
23181
23182         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23183         WOTH, XOTH, ALLM): New macros.
23184         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23185          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23186         Use them.
23187         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23188         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23189         (mode_compile):
23190         No need to use uintmax_t; unsigned long is long enough.
23191         Don't bother to get suffix since we don't use it.
23192
23193 2000-12-26  Jim Meyering  <meyering@lucent.com>
23194
23195         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23196         better with autoheader.
23197
23198 2000-12-24  Jim Meyering  <meyering@lucent.com>
23199
23200         * lib/hash.c (is_prime): Return explicit boolean values.
23201         (hash_get_first): Return NULL to appease Irix5.6's 89.
23202         Reported by Nelson Beebe.
23203
23204 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23205
23206         * lib/localcharset.c (locale_charset): Add support for Win32.
23207
23208 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23209
23210         * lib/physmem.h, lib/physmem.c: New files.
23211
23212         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23213         (noinst_HEADERS): Add physmem.h.
23214
23215         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23216         't' for compatibility with Solaris 8 sort.
23217
23218 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23219
23220         * lib/config.charset: Add support for BeOS.
23221
23222 2000-12-17  Jim Meyering  <meyering@lucent.com>
23223
23224         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23225         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23226
23227 2000-12-16  Jim Meyering  <meyering@lucent.com>
23228
23229         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23230         N and M) would have treated it like `chown N:N FILE'.
23231
23232         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23233
23234 2000-12-16  Jim Meyering  <meyering@lucent.com>
23235
23236         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23237         SHELLS_FILE to a file name that's useful on djgpp systems.
23238         Include stdlib.h.
23239         (ADDITIONAL_DEFAULT_SHELLS): Define.
23240         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23241         Based mostly on a patch from Prashant TR.
23242
23243 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23244
23245         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23246         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23247         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23248
23249 2000-12-08  Andreas Schwab  <schwab@suse.de>
23250
23251         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23252         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23253
23254 2000-12-07  Jim Meyering  <meyering@lucent.com>
23255
23256         * lib/stripslash.c (ISSLASH): Define.
23257         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23258         `/'.
23259         From Prashant TR.
23260
23261         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23262         (dir_name_r): Declare this function as static.
23263         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23264         manifest itself on a name containing a mix of slashes and
23265         backslashes.
23266         Make this function work with names starting with a DOS-style
23267         drive letter and colon prefix.
23268         (dir_name): Append `.' if necessary.
23269         Based mostly on patches from Prashant TR and Eli Zaretskii.
23270
23271         * lib/dirname.h (dir_name_r): Remove prototype.
23272
23273 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23274
23275         * m4/off_t-format.m4: Remove this file.
23276         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23277
23278 2000-12-06  Jim Meyering  <meyering@lucent.com>
23279
23280         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23281         replacement strtoull, we may well need the replacement strtoul, too.
23282         Check for declarations of strtoul and strtoull.
23283         Check for strtol.  Mainly as a cue to cause automake to include
23284         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23285         Check for limits.h -- strtol.c needs it.
23286
23287 2000-12-05  Jim Meyering  <meyering@lucent.com>
23288
23289         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23290
23291 2000-12-04  Jim Meyering  <meyering@lucent.com>
23292
23293         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23294         Also include memory.h, stdlib.h, unistd.h if appropriate.
23295         Reported by Andreas Jaeger (conflicting declaration of malloc).
23296
23297 2000-12-02  Jim Meyering  <meyering@lucent.com>
23298
23299         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23300         * m4/jm-macros.m4 (jm_MACROS): require it.
23301
23302 2000-12-02  Jim Meyering  <meyering@lucent.com>
23303
23304         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23305
23306 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23307
23308         * lib/memrchr.c: Include <config.h> before any system include file.
23309
23310 2000-11-30  Jim Meyering  <meyering@lucent.com>
23311
23312         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23313
23314 2000-11-30  Jim Meyering  <meyering@lucent.com>
23315
23316         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23317
23318 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23319
23320         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23321
23322 2000-11-26  Jim Meyering  <meyering@lucent.com>
23323
23324         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23325
23326 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23327
23328         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23329         size of (size_t) -1; it's not portable.
23330
23331 2000-11-17  Jim Meyering  <meyering@lucent.com>
23332
23333         * lib/strstr.c: Update from GNU libc.
23334
23335 2000-11-17  Akim Demaille  <akim@epita.fr>
23336
23337         * lib/obstack.h: Formatting changes.
23338         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23339         prevent type checking.
23340         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23341         cast the value to (void *): assigning a `foo *' to a `void *'
23342         variable is valid.
23343         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23344
23345 2000-11-16  Jim Meyering  <meyering@lucent.com>
23346
23347         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23348
23349 2000-11-11  Jim Meyering  <meyering@lucent.com>
23350
23351         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23352
23353 2000-11-10  Jim Meyering  <meyering@lucent.com>
23354
23355         * lib/obstack.h: Update from GNU libc.
23356         * lib/obstack.c: Likewise.
23357
23358 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23359
23360         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23361
23362 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23363
23364         * lib/getusershell.c (setusershell): Use rewind rather than
23365         fseek/fseeko, to avoid configuration hassles with fseeko.
23366         Don't bother opening SHELLS_FILE if shellstream is NULL;
23367         it's not necessary.
23368
23369 2000-11-05  Jim Meyering  <meyering@lucent.com>
23370
23371         * lib/makepath.h (make_dir): Declare.
23372         * lib/makepath.c (make_dir): Remove `static' attribute.
23373         Tweak a comment.
23374
23375 2000-11-04  Jim Meyering  <meyering@lucent.com>
23376
23377         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23378
23379 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23380
23381         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23382         last one in a bucket, advance to the next bucket.
23383
23384 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23385
23386         * lib/fnmatch.c: Do not comment out all the code if we are using
23387         the GNU C library, because in some cases we are replacing buggy
23388         code in the GNU C library itself.
23389
23390 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23391
23392         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23393         (regex_compile): Catch bogus \(\1\).
23394
23395 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23396
23397         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23398         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23399         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23400
23401 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23402
23403         * lib/error.h, getline.h, modechange.h:
23404         Remove "2000" from Copyright line, as the file hasn't been
23405         changed this year other than in the copyright notice.
23406
23407         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23408         was changed this year.
23409
23410 2000-10-29  Jim Meyering  <meyering@lucent.com>
23411
23412         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23413         renaming.
23414         * m4/ls-mntd-fs.m4: Likewise
23415
23416 2000-10-29  Jim Meyering  <meyering@lucent.com>
23417
23418         * lib/xstat.in: Fix grammar in comment.
23419
23420 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23421
23422         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23423         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23424         doesn't define __restrict_arr.
23425
23426 2000-10-28  Jim Meyering  <meyering@lucent.com>
23427
23428         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23429         (jm_PREREQ_MEMCHR): New function.
23430
23431 2000-10-28  Jim Meyering  <meyering@lucent.com>
23432
23433         * lib/memchr.c: Update from libc.
23434         Adjust for portability:
23435         [HAVE_STDLIB_H]: Include stdlib.h.
23436         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23437         Undef __memchr, too.
23438         [!weak_alias]: Define __memchr to memchr.
23439
23440         * lib/regex.c: Update from libc.
23441         * lib/regex.h: Likewise.
23442         * lib/getopt1.c: Likewise.
23443         * lib/memcmp.c: Likewise.
23444
23445         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23446         Avoid using fseek, when possible -- it's broken by design.
23447         Patch by Ulrich Drepper.
23448
23449 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23450
23451         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23452         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23453         Giving in to popular pressure to shut up the compiler with casts.
23454
23455 2000-10-26  Jim Meyering  <meyering@lucent.com>
23456
23457         * lib/strftime.c: Update from libc.
23458
23459 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23460
23461         * regex.c: More `unsigned char' -> `re_char' changes.
23462         Also change several `int' into `re_wchar_t'.
23463         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23464         (PUSH_FAILURE_POINTER): Don't cast any more.
23465         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23466         We want GCC to complain, since this piece of code makes
23467         re_match non-reentrant, which *should* be fixed.
23468         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23469         (EXTEND_BUFFER): Use RETALLOC.
23470         (SET_LIST_BIT): Don't cast.
23471         (re_wchar_t): New type.
23472         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23473         that those two functions will always properly return.
23474         (IMMEDIATE_QUIT_CHECK): Cast to void.
23475         (analyse_first): Use recursion rather than an explicit stack.
23476         (re_compile_fastmap): Can't fail anymore.
23477         (re_search_2): Don't check re_compile_fastmap for failure.
23478         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23479         Now also sets the new value (passed in a new argument).
23480         (re_match_2_internal): Use it.
23481         Also, use a new var `reg' of type size_t when looping through regs
23482         rather than reuse the inappropriate `mcnt'.
23483
23484 2000-10-25  Jim Meyering  <meyering@lucent.com>
23485
23486         * lib/obstack.c: Update from libc.
23487
23488 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23489
23490         * regex.c (regex_compile): Change the way of handling a range from
23491         a char less than 256 to a char not less than 256.
23492
23493 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23494
23495         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23496         NT-Emacs only.
23497         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23498         so that re_search functions only quit when callers expect them to.
23499
23500 2000-10-23  Jim Meyering  <meyering@lucent.com>
23501
23502         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23503         wrong.  That set_locale call must not have any side effects.
23504         From Paul Eggert.
23505
23506 2000-10-22  Jim Meyering  <meyering@lucent.com>
23507
23508         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
23509         [CYCLIC]: Remove now-unused definition.
23510
23511         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
23512         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
23513         Suggestion from Ulrich Drepper.
23514
23515 2000-10-21  Jim Meyering  <meyering@lucent.com>
23516
23517         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
23518         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
23519         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
23520
23521 2000-10-21  Jim Meyering  <meyering@lucent.com>
23522
23523         * lib/dirname.c (memrchr): Declare if necessary.
23524         (dir_name): Remove the restriction that there be no
23525         trailing slashes.  Now, this code skips past them, effectively
23526         ignoring them.
23527         [TEST_DIRNAME] (main): New unit tests.
23528
23529         * lib/memrchr.c: New file from GNU libc.
23530         Undef __memrchr, too.
23531         [!weak_alias]: Define __memrchr to memrchr.
23532         Guard weak_alias use with `#ifdef weak_alias'.
23533
23534 2000-10-21  Jim Meyering  <meyering@lucent.com>
23535
23536         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
23537         (dir_name): Use dir_name_r.
23538         * lib/dirname.h (dir_name_r): Declare it.
23539
23540 2000-10-17  Jim Meyering  <meyering@lucent.com>
23541
23542         * lib/quote.h (PARAMS): Define and use.
23543         Reported by Akim Demaille.
23544
23545         * lib/getopt.c: Update from libc.
23546
23547 2000-10-16  Jim Meyering  <meyering@lucent.com>
23548
23549         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
23550         setlocale.
23551         From Jan Fedak.
23552
23553 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
23554
23555         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
23556
23557 2000-09-25  Jim Meyering  <meyering@lucent.com>
23558
23559         * lib/md5.h (rol): Define (from GnuPG).
23560
23561         * lib/sha.c: Give credit (GnuPG) where due.
23562         (M): Use rol rather than open-coding it.
23563         Add a FIXME comment.
23564
23565 2000-09-21  Jim Meyering  <meyering@lucent.com>
23566
23567         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
23568         Reported by Michael Stone.
23569
23570 2000-09-20  Jim Meyering  <meyering@lucent.com>
23571
23572         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
23573         (noinst_HEADERS): Add sha.h.
23574         Based on code from Scott G. Miller and from GnuPG.
23575
23576 2000-09-18  Jim Meyering  <meyering@lucent.com>
23577
23578         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
23579         LIBS. Otherwise, everyone ends up linking with -lelf for some
23580         configurations.
23581         Reported by Mike Stone.
23582
23583 2000-09-15  Jim Meyering  <meyering@lucent.com>
23584
23585         * lib/regex.c: Update from libc.
23586
23587 2000-09-10  Jim Meyering  <meyering@lucent.com>
23588
23589         * lib/getopt.c (_getopt_internal): Update from glibc.
23590
23591 2000-09-09  Jim Meyering  <meyering@lucent.com>
23592
23593         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
23594         think it should be used as a general replacement for isascii.
23595         * lib/fnmatch.c: Likewise.
23596         * lib/mbswidth.c: Likewise
23597         * lib/regex.c: Likewise.
23598
23599         Don't use atoi.
23600         * lib/userspec.c: Include sys/param.h and limits.h.
23601         Include xstrtol.h.
23602         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23603         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
23604         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
23605         UID, GID.  Check range.
23606
23607 2000-09-06  Jim Meyering  <meyering@lucent.com>
23608
23609         * lib/getopt.c (_getopt_internal): Update from glibc.
23610
23611 2000-08-30  Jim Meyering  <meyering@lucent.com>
23612
23613         * lib/strftime.c: Merge in changes from GNU libc.
23614
23615 2000-08-26  Jim Meyering  <meyering@lucent.com>
23616
23617         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
23618         * m4/fpending.m4: New file.
23619
23620 2000-08-26  Jim Meyering  <meyering@lucent.com>
23621
23622         * lib/closeout.c: Include "__fpending.h".
23623         (close_stdout_status): Return right away if there's nothing to flush.
23624
23625         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
23626         * lib/__fpending.c: New file.
23627         * lib/__fpending.h: New file.
23628
23629 2000-08-20  Jim Meyering  <meyering@lucent.com>
23630
23631         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
23632         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
23633         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
23634
23635 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
23636
23637         Improve fileutils installation on systems where running
23638         programs (like install) can't be unlinked.
23639         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
23640         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
23641
23642 2000-08-07  Paul Eggert  <eggert@twinsun.com>
23643
23644         Standardize on "memory exhausted" instead of "Memory exhausted"
23645         or "virtual memory exhausted".
23646         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
23647         "virtual memory exhausted".
23648         * lib/same.c (same_name): Invoke xalloc_die instead of printing
23649         our own message.
23650         * lib/userspec.c (parse_user_spec): Likewise.
23651         * lib/bumpalloc.h: comment fix
23652         * lib/same.c, userspec.c: Include xalloc.h.
23653
23654         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
23655         not char *const and pointing to a constant array.
23656         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
23657         (xrealloc): Comment fix.
23658
23659         * lib/userspec.c (parse_user_spec):
23660         Don't translate a message until just before returning,
23661         to avoid unnecessary translation.
23662
23663 2000-08-07  Jim Meyering  <meyering@lucent.com>
23664
23665         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
23666         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
23667         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
23668         getgroups.c, gethostname.c, getopt.h, group-member.c,
23669         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
23670         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
23671         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
23672         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
23673         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
23674         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
23675         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
23676         yesno.c: Back out Copyright date changes for each file with no change
23677         this year.  This eases coordination with other programs using the same
23678         source code modules.  From Paul Eggert.
23679
23680 2000-08-06  Paul Eggert  <eggert@twinsun.com>
23681
23682         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
23683         not char, for compatibility with glibc 2.1.3 strftime.c.
23684
23685 2000-08-03  Greg McGary  <greg@mcgary.org>
23686
23687         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
23688         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
23689         (EXTEND_BUFFER): Use them.
23690
23691 2000-08-01  Jim Meyering  <meyering@lucent.com>
23692
23693         * lib/dirname.c (ISSLASH): Define.
23694         (BACKSLASH_IS_PATH_SEPARATOR): Define.
23695         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
23696         both `\' and `/' may be use as path separators.
23697         Based on a patch from Prashant TR.
23698
23699 2000-07-31  Paul Eggert  <eggert@twinsun.com>
23700
23701         * lib/quotearg.c (quotearg_n_options): Don't make the initial
23702         slot vector a constant, since it might get modified.
23703
23704 2000-07-31  Jim Meyering  <meyering@lucent.com>
23705
23706         * lib/xmalloc.c: Use `virtual memory exhausted', not
23707         `Memory exhausted'.
23708         * lib/obstack.c (print_and_abort): Likewise.
23709
23710 2000-07-30  Paul Eggert  <eggert@twinsun.com>
23711
23712         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
23713         buffer, so that the caller can always quote one small
23714         component of a "memory exhausted" message in slot 0.
23715         From a suggestion by Jim Meyering.
23716
23717 2000-07-30  Jim Meyering  <meyering@lucent.com>
23718
23719         * lib/makepath.c (make_path): Quote the other instance, too.
23720
23721         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
23722         (STATIC_BUF_SIZE): Define.
23723         (quotearg_n_options): Use only statically allocated storage when
23724         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
23725         than STATIC_BUF_SIZE.
23726
23727 2000-07-29  Jim Meyering  <meyering@lucent.com>
23728
23729         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
23730         * lib/dirname.c (dir_name): Likewise.
23731
23732         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
23733         `/'.
23734
23735         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
23736         (dir_name): Assert that there are no trailing slashes.
23737
23738 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
23739
23740         * lib/mbswidth.h (mbswidth): Add a flags argument.
23741         (mbswidth): New declaration.
23742         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
23743         * lib/mbswidth.c (mbswidth): Add a flags argument.
23744         (mbsnwidth): New function.
23745
23746 2000-07-24  Jim Meyering  <meyering@lucent.com>
23747
23748         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
23749
23750 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23751
23752         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
23753
23754 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23755
23756         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
23757         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
23758         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
23759         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
23760         invoke multibyte primitives.
23761
23762 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23763
23764         * lib/quotearg.c:
23765         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
23766         so that mbstate_t is always defined.
23767
23768         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
23769         be 1 in at least one GCC installation, and this configuration
23770         error is likely to be common.  Ignoring MB_LEN_MAX hurts
23771         performance on hosts that have mbrtowc but have only unibyte
23772         locales, but I assume these hosts are rare.
23773
23774 2000-07-23  Paul Eggert  <eggert@twinsun.com>
23775
23776         * lib/mbswidth.c (_XOPEN_SOURCE):
23777         Don't define; this causes problems on Solaris 7.
23778         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
23779
23780 2000-07-23  Jim Meyering  <meyering@lucent.com>
23781
23782         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
23783         too: getgrgid, getpwuid, getuid.
23784
23785 2000-07-23  Jim Meyering  <meyering@lucent.com>
23786
23787         * lib/basename.c (base_name): Add an assertion.
23788
23789 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
23790
23791         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
23792         shadow its mbsinit function.
23793
23794 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23795
23796         * lib/mbswidth.h: New file.
23797         * lib/mbswidth.c: New file.
23798         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
23799         (noinst_HEADERS): Add mbswidth.h.
23800
23801 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
23802
23803         * lib/config.charset: Add support for FreeBSD. Improve support for
23804         HP-UX and IRIX 6.
23805
23806 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
23807
23808         * m4/mbswidth.m4: New file.
23809         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
23810
23811 2000-07-15  Jim Meyering  <meyering@lucent.com>
23812
23813         * lib/makepath.c: Include quote.h.
23814         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
23815         corresponding argument in a `quote (...)' call.
23816         Give better diagnostics.
23817
23818         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
23819         (noinst_HEADERS): Add quote.h.
23820
23821         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
23822         from tar's src/misc.c.
23823         * lib/quote.h: New file.  Prototypes for same.
23824
23825 2000-07-14  Paul Eggert  <eggert@twinsun.com>
23826
23827         From a suggestion by Bruno Haible.
23828         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
23829         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
23830         to decide whether to define the BeOS workaround macro;
23831         this adjusts to the change to AC_MBSTATE_T.
23832
23833 2000-07-14  Jim Meyering  <meyering@lucent.com>
23834
23835         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
23836         jm_AC_TYPE_UINTMAX_T.
23837
23838 2000-07-13  Paul Eggert  <eggert@twinsun.com>
23839
23840         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
23841
23842         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
23843         quotearg_buffer_restyled): Add support for
23844         clocale_quoting_style.  Undo previous change to
23845         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
23846         and "{RIGHT QUOTATION MARK}" msgids.
23847
23848 2000-07-10  Paul Eggert  <eggert@twinsun.com>
23849
23850         From a suggestion by Bruno Haible.
23851         * m4/mbstate_t.m4 (AC_MBSTATE_T):
23852         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
23853         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
23854         and mbstate_t, to a single-part test that simply defines mbstate_t.
23855         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
23856         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
23857
23858 2000-07-10  Jim Meyering  <meyering@lucent.com>
23859
23860         * m4/strerror_r.m4: Mirror the correction made in autoconf.
23861
23862         * m4/gnu-source.m4: Output to confdefs.h directly.
23863         Suggestion from Akim Demaille.
23864
23865 2000-07-09  Paul Eggert  <eggert@twinsun.com>
23866
23867         The old behavior of quoting `like this' doesn't look good with
23868         newer, ISO-style fonts.  See:
23869         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
23870
23871         Instead, quote "like this" by default.  Let the translator
23872         tailor the locale-specific quoting behavior by providing
23873         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
23874
23875         * lib/quotearg.c (N_): New macro.
23876         (gettext_default): New function.
23877         (quotearg_buffer_restyled): Use
23878         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
23879         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
23880
23881 2000-07-09  Jim Meyering  <meyering@lucent.com>
23882
23883         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
23884         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
23885
23886         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
23887         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
23888
23889 2000-07-09  Jim Meyering  <meyering@lucent.com>
23890
23891         * lib/Most files: Update copyright dates to include 2000.
23892
23893 2000-07-08  Jim Meyering  <meyering@lucent.com>
23894
23895         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
23896         if not defined.
23897         (xgethostname): Remove now-unnecessary #ifdef.
23898         Move declaration of `err' into loop where it's used.
23899
23900 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23901         and Bruno Haible  <haible@clisp.cons.org>
23902
23903         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
23904         only if the test for an object-type mbstate_t fails.  This
23905         prevents us from mistakenly reporting that mbstate_t is a
23906         system object type after we "#define mbstate_t int" to work
23907         around its lack.
23908
23909 2000-07-05  Paul Eggert  <eggert@twinsun.com>
23910         and Bruno Haible  <haible@clisp.cons.org>
23911
23912         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
23913
23914 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23915
23916         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
23917         to strerror_r.
23918         Include <ctype.h> for use of isalpha.
23919
23920 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23921
23922         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
23923         by allocating a larger buffer. Test the gethostname return value for
23924         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
23925         returns an error and ENAMETOOLONG isn't defined.
23926
23927 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
23928
23929         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
23930         dimension.
23931
23932 2000-07-04  Jim Meyering  <meyering@lucent.com>
23933
23934         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
23935         of the deprecated AC_CHECKING.
23936
23937 2000-07-04  Jim Meyering  <meyering@lucent.com>
23938
23939         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
23940         Reported by Bruno Haible.
23941
23942 2000-07-04  Jim Meyering  <meyering@lucent.com>
23943
23944         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
23945         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
23946         lacks mbrtowc.
23947
23948 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23949
23950         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
23951         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
23952
23953 2000-07-03  Paul Eggert  <eggert@twinsun.com>
23954         and Bruno Haible  <haible@clisp.cons.org>
23955
23956         * lib/quotearg.c (mbrtowc):
23957         Assign to *pwc, and return 1 only if result is nonzero.
23958         (iswprint): Use ISPRINT when substituting our own mbrtowc.
23959
23960 2000-07-03  Jim Meyering  <meyering@lucent.com>
23961
23962         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
23963
23964 2000-07-03  Jim Meyering  <meyering@lucent.com>
23965
23966         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
23967         This is necessary to get a definition of e.g., UTMP_FILE on
23968         HP-UX 10.20.
23969         From Bob Proulx.
23970
23971 2000-07-02  Jim Meyering  <meyering@lucent.com>
23972
23973         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
23974
23975         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
23976         AC_LIBOBJ(function_name).
23977         * m4/chown.m4: Likewise.
23978         * m4/fnmatch.m4: Likewise.
23979         * m4/ftruncate.m4: Likewise.
23980         * m4/getgroups.m4: Likewise.
23981         * m4/getline.m4: Likewise.
23982         * m4/group-member.m4: Likewise.
23983         * m4/jm-macros.m4: Likewise.
23984         * m4/lstat.m4: Likewise.
23985         * m4/malloc.m4: Likewise.
23986         * m4/memcmp.m4: Likewise.
23987         * m4/nanosleep.m4: Likewise.
23988         * m4/putenv.m4: Likewise.
23989         * m4/realloc.m4: Likewise.
23990         * m4/regex.m4: Likewise.
23991         * m4/stat.m4: Likewise.
23992         * m4/strftime.m4: Likewise.
23993
23994 2000-07-02  Jim Meyering  <meyering@lucent.com>
23995
23996         * lib/quotearg.c (mbstate_t): Don't define here.
23997
23998 2000-07-02  Jim Meyering  <meyering@lucent.com>
23999
24000         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24001
24002 2000-07-01  Jim Meyering  <meyering@lucent.com>
24003
24004         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24005
24006 2000-07-01  Jim Meyering  <meyering@lucent.com>
24007
24008         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24009         problem.
24010
24011 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24012
24013         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24014         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24015
24016 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24017
24018         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24019         per change in ../m4/ls-mntd-fs.m4.
24020         (read_filesystem_list): Ignore symbolic links.
24021
24022 2000-06-29  Jim Meyering  <meyering@lucent.com>
24023
24024         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24025         for declaration of strcmp.
24026
24027         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24028
24029         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24030         Avoid warning by casting result to `char *' to remove `const'.
24031
24032 2000-06-28  Jim Meyering  <meyering@lucent.com>
24033
24034         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24035         included by quotearg.c, for which we perform this test.  From
24036         Bruno Haible.
24037
24038 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24039
24040         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24041         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24042         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24043
24044 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24045
24046         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24047
24048 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24049
24050         savedir now sets errno on failure and invokes xmalloc to get memory.
24051         Fix a couple of other minor bugs while we're at it.
24052
24053         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24054         (NAMLEN): Remove macro.
24055         (malloc, realloc): Remove decls.
24056         (stpcpy): Likewise.
24057         ("xalloc.h"): Include.
24058         (NAME_SIZE_DEFAULT): New macro.
24059         (savedir): Use xmalloc / xrealloc to allocate memory.
24060         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24061         Skip "" directory entries.
24062         Use strlen to calculate directory entry length, since the old method
24063         is rarely used these days and isn't worth supporting.
24064         Don't use a pointer after freeing it.
24065         Check for integer overflow when calculating allocation size.
24066         Use memcpy to copy entries, instead of stpcpy.
24067         Set errno properly when returning NULL.
24068         Check for readdir error.
24069
24070 2000-06-26  Jim Meyering  <meyering@lucent.com>
24071
24072         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24073
24074 2000-06-25  Jim Meyering  <meyering@lucent.com>
24075
24076         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24077         Linux header bug when _XOPEN_SOURCE is defined to 500.
24078
24079 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24080
24081         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24082         deficiency.
24083
24084 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24085
24086         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24087         Include xalloc.h.
24088         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24089
24090 2000-06-24  Jim Meyering  <meyering@lucent.com>
24091
24092         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24093         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24094         for which strerror does return char*, but which lacks a conveniently
24095         accessible declaration of the function.  If the compile-test says
24096         strerror_r doesn't work, then resort to a `run'-test that works on
24097         BeOS and segfaults on DEC Unix.
24098
24099 2000-06-24  Jim Meyering  <meyering@lucent.com>
24100
24101         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24102
24103 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24104
24105         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24106         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24107
24108 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24109
24110         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24111         (mbrtowc, mbstate_t): Define substitutes if
24112         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24113         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24114         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24115
24116 2000-06-23  Jim Meyering  <meyering@lucent.com>
24117
24118         * m4/afs.m4: Add missing AC_MSG_RESULT.
24119         Reported by Bruno Haible.
24120
24121         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24122         Suggestion from Bruno Haible.
24123
24124 2000-06-23  Jim Meyering  <meyering@lucent.com>
24125
24126         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24127
24128 2000-06-21  Jim Meyering  <meyering@lucent.com>
24129
24130         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24131
24132 2000-06-21  Jim Meyering  <meyering@lucent.com>
24133
24134         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24135         (noinst_HEADERS): Add getstr.h.
24136
24137         * lib/getline.c (getstr): Move into a separate file.
24138         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24139         the following changes: new parameter, delim2; both delim[12]
24140         parameters have type `int', not `char'.  The latter would lose
24141         with 8-bit delimiters.
24142         * lib/getstr.h: New file.
24143
24144 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24145
24146         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24147         than 1024, return a memory chunk of least possible size, instead
24148         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24149         Use free/xmalloc instead of xrealloc to avoid copying for very long
24150         paths.
24151
24152 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24153
24154         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24155         the empty string.
24156
24157 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24158
24159         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24160         address, not strdup.  Include <stdlib.h> and don't declare free().
24161
24162 2000-06-19  Jim Meyering  <meyering@lucent.com>
24163
24164         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24165
24166 2000-06-18  Jim Meyering  <meyering@lucent.com>
24167
24168         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24169
24170         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24171         `checking whether...' message to be consistent with that of the
24172         lstat test.
24173
24174 2000-06-18  Jim Meyering  <meyering@lucent.com>
24175
24176         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24177         Besides, these days every porting target provides a mkdir function.
24178
24179         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24180         needed. (this snippet comes from src/system.h).
24181
24182 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24183
24184         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24185
24186 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24187
24188         * lib/human.c (adjust_value): New function.
24189         (human_readable_inexact): Apply rounding style even when
24190         printing approximate values.
24191
24192 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24193
24194         * lib/human.c (human_readable_inexact): Allow an input block
24195         size that is not a multiple of the output block size, and vice versa.
24196         Reported by Piergiorgio Sartor.
24197
24198 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24199
24200         * lib/getdate.y (get_date): Apply relative times after time
24201         zone indicator, not before.  Reported by Todd A. Jacobs.
24202
24203 2000-06-13  Jim Meyering  <meyering@lucent.com>
24204
24205         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24206
24207         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24208
24209 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24210
24211         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24212
24213 2000-06-12  Jim Meyering  <meyering@lucent.com>
24214
24215         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24216         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24217         optional argument.
24218         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24219         the optional argument, `lib'.
24220
24221 2000-06-08  Jim Meyering  <meyering@lucent.com>
24222
24223         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24224
24225 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24226
24227         Rewrite largefile configuration so that we don't need to run
24228         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24229         AC_CANONICAL_HOST in configure.in -- jmm]
24230
24231         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24232         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24233         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24234         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24235         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24236         All uses changed.
24237         Instead of inspecting the output of getconf, try to compile the
24238         test program without and with the macro definition.
24239         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24240         for getconf.  Instead, check for the needed flags by compiling
24241         test programs.
24242
24243 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24244
24245         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24246
24247 2000-06-04  Jim Meyering  <meyering@lucent.com>
24248
24249         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24250         SunOS 4.1.4 for which gid_t is an unsigned type.
24251
24252 2000-06-03  Jim Meyering  <meyering@lucent.com>
24253
24254         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24255         now that autoconf requires that.
24256
24257         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24258         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24259         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24260
24261 2000-06-03  Jim Meyering  <meyering@lucent.com>
24262
24263         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24264
24265 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24266
24267         * m4/glibc21.m4: New file.
24268         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24269
24270 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24271
24272         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24273         newer, don't install charset.alias.
24274         * lib/config.charset: Change the Linux/glibc rules so they become empty
24275         on glibc-2.1 or newer.
24276
24277 2000-06-02  Jim Meyering  <meyering@lucent.com>
24278
24279         * lib/mountlist.c: Back out last change.  Instead, do this...
24280         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24281         me_dummy member using the same `ignore'-testing code.
24282         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24283         fs_type strings.
24284         From Mark D. Roth.
24285
24286 2000-05-29  Jim Meyering  <meyering@lucent.com>
24287
24288         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24289         mounts with the `ignore' attribute.  Based on a patch from
24290         Mark D. Roth.
24291
24292 2000-05-28  Jim Meyering  <meyering@lucent.com>
24293
24294         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24295         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24296         * m4/stat.m4: Likewise.
24297         * m4/lstat.m4: Likewise.
24298         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24299
24300         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24301         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24302
24303 2000-05-26  Jim Meyering  <meyering@lucent.com>
24304
24305         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24306
24307 2000-05-24  Jim Meyering  <meyering@lucent.com>
24308
24309         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24310         autoconf requires that.
24311         * m4/lib-check.m4: Likewise.
24312         * m4/jm-macros.m4: Likewise.
24313         * m4/strftime.m4: Likewise.
24314
24315         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24316         AC_CHECK_DECLS, now that autoconf requires that.
24317
24318 2000-05-22  Jim Meyering  <meyering@lucent.com>
24319
24320         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24321         * m4/lstat.m4: Likewise.
24322
24323 2000-05-22  Jim Meyering  <meyering@lucent.com>
24324
24325         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24326
24327 2000-05-20  Jim Meyering  <meyering@lucent.com>
24328
24329         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24330         (jm_PREREQ): Use it.
24331
24332 2000-05-18  Jim Meyering  <meyering@lucent.com>
24333
24334         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24335         back, too, since it may have been modified by allocate_entry.
24336         (hash_delete): Rewrite to use neither the assignment operator
24337         nor the comma operator in an if-expression.
24338
24339 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24340
24341         * lib/closeout.c:
24342         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24343         Remove; no longer needed.
24344         "quotearg.h": Add include.
24345         (file_name): Do not bother to explicitly initialize to NULL; it's less
24346         efficient on some hosts.
24347         (close_stdout_status): Remove test as to whether stdout was already
24348         closed; it breaks for the case "echo x | sort >&-".
24349         Quote file name colons.
24350         Do not assume that _("write error") lacks format strings.
24351
24352 2000-05-15  Jim Meyering  <meyering@lucent.com>
24353
24354         * lib/version-etc.c (version_etc_copyright): Update the copyright
24355         string used in all --version output.
24356
24357 2000-05-14  Jim Meyering  <meyering@lucent.com>
24358
24359         * lib/closeout.c (close_stdout_set_file_name): New function.
24360         (close_stdout_status): Use new file-scoped global.
24361         Return right away if fstat says the stdout file descriptor is invalid.
24362         * lib/closeout.h (close_stdout_set_file_name): Declare.
24363
24364 2000-05-10  Jim Meyering  <meyering@lucent.com>
24365
24366         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24367         (close_stdout_set_status): New function.
24368         * lib/closeout.h (close_stdout_set_status): Declare.
24369
24370 2000-05-09  Jim Meyering  <meyering@lucent.com>
24371
24372         * m4/gettext.m4: Rename this...
24373         * m4/libintl.m4: ...to this.
24374
24375 2000-05-08  Jim Meyering  <meyering@lucent.com>
24376
24377         * lib/long-options.c: Don't include closeout.h.
24378         (parse_long_options): Don't call close_stdout for --version.
24379
24380 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24381
24382         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24383         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24384         2.1.3 bug.  This avoids a clash when files like regex.c define
24385         _GNU_SOURCE.
24386
24387 2000-05-06  Jim Meyering  <meyering@lucent.com>
24388
24389         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24390         (AC_REPLACE_FUNCS): Add strnlen.
24391
24392         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24393         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24394
24395         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24396         AC_SEARCH_LIBS call for nanosleep.
24397         (LIB_NANOSLEEP): Set and AC_SUBST.
24398
24399 2000-05-06  Jim Meyering  <meyering@lucent.com>
24400
24401         * lib/strnlen.c: Undefine __strnlen and strnlen.
24402         [!weak_alias]: Define __strnlen to strnlen.
24403
24404         * lib/atexit.c: New file, from libiberty.
24405
24406 2000-05-06  Jim Meyering  <meyering@lucent.com>
24407
24408         * lib/closeout.c (close_stdout_status): Also check for errors on the
24409         stderr stream.
24410
24411 2000-05-05  Jim Meyering  <meyering@lucent.com>
24412
24413         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24414         AC_SEARCH_LIBS call for clock_gettime.
24415         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24416
24417         * m4/search-libs.m4: Update from autoconf.
24418
24419         su doesn't work on Solaris 2.6.
24420         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24421         <shadow.h>.  Reported by Dragos Harabor.
24422
24423 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24424
24425         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24426         memcpy instead of xmalloc, xrealloc, path_concat.
24427         (locale_charset): Treat empty environment variables as absent.
24428         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24429
24430 2000-05-04  Jim Meyering  <meyering@lucent.com>
24431
24432         * lib/getopt.c: Update from glibc.
24433         * lib/obstack.c: Likewise.
24434         * lib/obstack.h: Likewise.
24435         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24436         file
24437
24438         * lib/regex.h: Likewise.
24439         * lib/strndup.c: Likewise.
24440         * lib/strnlen.c: New file, from glibc.
24441
24442 2000-05-03  Jim Meyering  <meyering@lucent.com>
24443
24444         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24445
24446 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24447
24448         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24449         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24450         compile-time test, rather than inspecting host and OS, to
24451         decide whether to define _LARGEFILE_SOURCE.
24452
24453 2000-05-01  Jim Meyering  <meyering@lucent.com>
24454
24455         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24456
24457         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24458         Based on a patch from Bruno Haible.
24459
24460 2000-05-01  Jim Meyering  <meyering@lucent.com>
24461
24462         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24463
24464 2000-04-29  Jim Meyering  <meyering@lucent.com>
24465
24466         * lib/path-concat.c: Declare strdup only if it's not defined.
24467         * lib/canon-host.c: Likewise.
24468
24469 2000-04-28  Jim Meyering  <meyering@lucent.com>
24470
24471         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24472         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24473         is included first, then limits.h is included by locale.h by libintl.h.
24474         From John David Anglin.
24475
24476 2000-04-25  Jim Meyering  <meyering@lucent.com>
24477
24478         * lib/makepath.c (S_IRWXUGO): Define.
24479         (make_path): Always perform explicit chmod if MODE specifies any
24480         of the `special' permission bits.  Prompted by a bug report against
24481         install from Mate Wierdl and Joost van Baal.
24482
24483 2000-04-18  Jim Meyering  <meyering@lucent.com>
24484
24485         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24486         (jm_PREREQ): Use it.
24487
24488 2000-04-18  Jim Meyering  <meyering@lucent.com>
24489
24490         * lib/README: New file.
24491
24492         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24493         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24494
24495 2000-04-17  Jim Meyering  <meyering@lucent.com>
24496
24497         Get it right :-)
24498         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24499         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24500         Suggestion from Akim Demaille.
24501
24502 2000-04-17  Jim Meyering  <meyering@lucent.com>
24503
24504         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
24505         the definition of it to rpl_strftime also defined-away the system's
24506         declaration.
24507
24508 2000-04-15  Jim Meyering  <meyering@lucent.com>
24509
24510         Use `C' to denote so-called `contiguous' files, the same way
24511         that tar does.
24512         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
24513         (ftypelet): Use S_ISCTG.
24514         From Michael Deutschmann.
24515
24516 2000-04-14  Jim Meyering  <meyering@lucent.com>
24517
24518         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
24519         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
24520         clobbered.
24521
24522 2000-04-14  Jim Meyering  <meyering@lucent.com>
24523
24524         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
24525
24526 2000-04-13  Jim Meyering  <meyering@lucent.com>
24527
24528         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
24529         AH_VERBATIM to insert required #ifndef into config.h.in.
24530         Suggestion from Akim Demaille.
24531
24532 2000-04-12  Jim Meyering  <meyering@lucent.com>
24533
24534         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
24535         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
24536         Christian Krackowizer.
24537
24538         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
24539         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
24540         (AC_SYS_LARGEFILE): Require.
24541         (AM_C_PROTOTYPES): Require.
24542
24543 2000-04-08  Jim Meyering  <meyering@lucent.com>
24544
24545         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
24546         names don't conflict.  Reported by Eli Zaretskii.
24547
24548 2000-04-07  Jim Meyering  <meyering@lucent.com>
24549
24550         * lib/putenv.c: Move inclusion of errno.h so it follows that of
24551         sys/types.h, to work around system header problems on AIX 3.2.5.
24552         From Bruno Haible.
24553
24554 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
24555
24556         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
24557         bug.  Deal with the different error behavior of Irix iconv.
24558
24559 2000-04-05  Paul Eggert  <eggert@twinsun.com>
24560
24561         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
24562         IRIX if the installer said otherwise.
24563
24564 2000-04-05  Jim Meyering  <meyering@lucent.com>
24565
24566         Portability tweaks required for ultrix4.3.
24567         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
24568         (jm_CHECK_DECLS): Add getutent to the list of functions.
24569         (_jm_DECL_HEADERS): Add utmpx.h.
24570         From John David Anglin.
24571
24572         * m4/strftime.m4: Back out the 2000-04-02 change.
24573         Instead of that change, simply undefine putenv in the test program.
24574
24575 2000-04-05  Jim Meyering  <meyering@lucent.com>
24576
24577         Portability tweaks required for ultrix4.3.
24578         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
24579         getutent.
24580         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
24581         * lib/canon-host.c: Declare strdup.
24582         * lib/path-concat.c: Likewise.
24583         From John David Anglin.
24584
24585 2000-04-04  Jim Meyering  <meyering@lucent.com>
24586
24587         Be more DOS 8.3-friendly.
24588         * lib/ref-add.sin: Renamed from ref-add.sed.in.
24589         * lib/ref-del.sin: Renamed from ref-del.sed.in.
24590         * lib/Makefile.am: Reflect renaming.
24591         Reported by Eli Zaretskii.
24592
24593         Use a temporary file name that won't clash with `charset.alias'
24594         in the DOS 8.3 name space.
24595         * lib/Makefile.am (charset_tmp): Define.
24596         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
24597         (uninstall-local): Likewise.
24598         Reported by Eli Zaretskii.
24599
24600 2000-04-03  Jim Meyering  <meyering@lucent.com>
24601
24602         * m4/gettext.m4: Fix typo in comment.
24603
24604         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
24605         textutils/configure.in).  Suggestion from Paul Eggert.
24606         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
24607
24608 2000-04-02  Paul Eggert  <eggert@twinsun.com>
24609
24610         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
24611         variable in the shell rather than using putenv, which isn't
24612         portable.  This avoids the configure-time inter-test dependency
24613         on the potentially-renamed putenv function.
24614
24615 2000-03-30  Paul Eggert  <eggert@twinsun.com>
24616
24617         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
24618         before checking struct stat.st_blksize, so that
24619         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
24620
24621 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24622
24623         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
24624         since strftime.c uses HAVE_STRFTIME to decide whether to use
24625         the underlying strftime.
24626
24627 2000-03-29  Paul Eggert  <eggert@twinsun.com>
24628
24629         * lib/time/strftime.c (my_strftime): Make sure we call the system
24630         strftime, not ourselves, when invoking the underlying strftime.
24631
24632 2000-03-24  Jim Meyering  <meyering@lucent.com>
24633
24634         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
24635         (charset_alias): Define.
24636         (install-exec-local): Factor out common code.
24637         (uninstall-local): Split lines longer than 80.
24638         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
24639         (SUFFIXES): Define.
24640         (.sed.in.sed): New rule.  Don't redirect directly to $@.
24641         (CLEANFILES): Add ref-add.sed and ref-del.sed.
24642
24643 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
24644
24645         * lib/config.charset: Output a line containing "Packages using this
24646         file".
24647         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
24648         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
24649         ref-del.sed): New rules.
24650
24651 2000-03-17  Jim Meyering  <meyering@lucent.com>
24652
24653         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
24654         Otherwise, include <strings.h>
24655
24656 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
24657
24658         * lib/unicodeio.c (utf8_wctomb): New function.
24659         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
24660         format instead of in UCS-4 with platform dependent endianness.
24661
24662 2000-03-10  Jim Meyering  <meyering@lucent.com>
24663
24664         * m4/lib-check.m4: Look for getspnam in -lgen, too.
24665         From Marco Franzen.
24666
24667 2000-03-07  Paul Eggert  <eggert@twinsun.com>
24668
24669         * lib/savedir.c (savedir): Work even if directory size is
24670         negative; this can happen with some screwy NFS configurations.
24671
24672 2000-03-06  Jim Meyering  <meyering@lucent.com>
24673
24674         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
24675         if it's NULL (because we ran out of memory).  From Bruno Haible.
24676
24677 2000-03-05  Jim Meyering  <meyering@lucent.com>
24678
24679         * lib/localcharset.c ("path-concat.h"): Include.
24680         (get_charset_aliases): Use path_concat instead of ANSI string
24681         concatenation.
24682
24683         * lib/unicodeio.h (PARAMS): Define.
24684         Use it to guard prototype.
24685
24686 2000-03-04  Jim Meyering  <meyering@lucent.com>
24687
24688         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
24689         for lib/localcharset.c.
24690
24691 2000-03-04  Jim Meyering  <meyering@lucent.com>
24692
24693         * lib/Makefile.am (install-exec-local): Create $(libdir) before
24694         installing into it.
24695         (uninstall-local): Uncomment this rule so `make distcheck' works
24696         once again.
24697
24698         * lib/unicodeio.c (<errno.h>): Include it.
24699         (errno): Declare if not defined.
24700
24701         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
24702
24703         * lib/config.charset: New version, incorporating remarks from a linux
24704         i18n mailing list.  From Bruno Haible.
24705
24706 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
24707
24708         * m4/codeset.m4: New file.
24709         * m4/iconv.m4: New file.
24710         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
24711
24712 2000-03-03  Jim Meyering  <meyering@lucent.com>
24713
24714         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
24715
24716 2000-03-02  Jim Meyering  <meyering@lucent.com>
24717
24718         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
24719         the messages come out on separate lines.
24720
24721         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
24722         rather than jm_CHECK_DECLARATIONS.
24723         * m4/decl.m4: Remove now-unused file.
24724
24725         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
24726         geteuid.
24727
24728 2000-03-02  Jim Meyering  <meyering@lucent.com>
24729
24730         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
24731
24732 2000-03-01  Jim Meyering  <meyering@lucent.com>
24733
24734         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
24735         * lib/unicodeio.c: Likewise.
24736
24737 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
24738
24739         * lib/config.charset: New file.
24740         * lib/localcharset.c: New file.
24741         * lib/unicodeio.h, lib/unicodeio.c: New files.
24742         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
24743         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
24744         (noinst_HEADERS): Add unicodeio.h.
24745         (all-local, install-exec-local, charset.alias): New targets.
24746
24747 2000-02-28  Paul Eggert  <eggert@twinsun.com>
24748
24749         * lib/quotearg.c (ALERT_CHAR): New macro.
24750         (quotearg_buffer_restyled): Use it.
24751
24752 2000-02-27  Jim Meyering  <meyering@lucent.com>
24753
24754         * m4/check-decl.m4: Add getenv to the list.
24755
24756 2000-02-27  Jim Meyering  <meyering@lucent.com>
24757
24758         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
24759         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
24760
24761         * lib/backupfile.c: Guard inclusion of stdlib.h with
24762         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
24763         Declare malloc if needed.
24764
24765         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
24766         `#ifndef HAVE_DECL..'
24767         now that autoconf always defines the HAVE_DECL_ symbols.
24768         * lib/human.c: Likewise.
24769         * lib/same.c: Likewise.
24770         * lib/strtoumax.c: Likewise.
24771
24772         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
24773         declaration check was not run.
24774         * lib/hash.c: Likewise.
24775         * lib/human.c: Likewise.
24776         * lib/same.c: Likewise.
24777         * lib/strtoumax.c: Likewise.
24778
24779         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
24780         `.', then first look up the entire `.'-containing string as a login
24781         name.
24782
24783 2000-02-23  Jim Meyering  <meyering@lucent.com>
24784
24785         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
24786         in place of my hack.
24787
24788 2000-02-18  Paul Eggert  <eggert@twinsun.com>
24789
24790         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
24791         (textint): New typedef.
24792         (parser_control): Member year changed from int to textint.
24793         All uses changed.
24794         (YYSTYPE): Removed; replaced by %union with int and textint members.
24795         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
24796         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
24797         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
24798         (tSNUMBER, tUNUMBER): Now of type <textintval>.
24799         (date, number, to_year): Use width of number in digits, not its value,
24800         to determine whether it's a 2-digit year, or a 2-digit time.
24801         (yylex): Store number of digits of numeric tokens.
24802         Reported by John Kendall.
24803
24804         (parser_control): Changed from struct parser_control to typedef (for
24805         consistency).  All uses changed.
24806
24807         (tID): Removed; not used.
24808         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
24809
24810 2000-02-14  Paul Eggert  <eggert@twinsun.com>
24811
24812         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
24813         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
24814
24815 2000-02-12  Jim Meyering  <meyering@lucent.com>
24816
24817         * lib/userspec.c (ISDIGIT): Define it.
24818         (isdigit): Remove definition.
24819         (is_number): Use ISDIGIT, not isdigit.
24820         <libintl.h>: Include.
24821         (_ and N_): Define.
24822         (parse_user_spec): Mark translatable strings.
24823
24824 2000-02-10  Jim Meyering  <meyering@lucent.com>
24825
24826         With these changes, nanosleep.[ch] are finally enough like the other
24827         lib/* replacement files to compile on a few more losing systems.
24828
24829         * lib/nanosleep.h: Don't include config.h.
24830         Remove prototype from declaration of nanosleep.
24831         (PARAMS): Remove now-unneeded definition.
24832         * lib/nanosleep.c: #undef nanosleep.
24833         (rpl_nanosleep): Rename from nanosleep.
24834
24835 2000-02-10  Jim Meyering  <meyering@lucent.com>
24836
24837         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
24838         gnu_nanosleep to rpl_nanosleep.
24839
24840 2000-02-09  Jim Meyering  <meyering@lucent.com>
24841
24842         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
24843         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
24844
24845 2000-02-08  Akim Demaille  <akim@epita.fr>
24846
24847         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
24848         `[' and `]' and remove uses of `changequote'.
24849         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
24850         (AC_SYS_LARGEFILE): Likewise.
24851         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
24852         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
24853         of changequote.
24854         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
24855         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
24856         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
24857         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
24858
24859 2000-02-05  Jim Meyering  <meyering@lucent.com>
24860
24861         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
24862         Remove explicit use of AC_HEADER_TIME.  It is required by
24863         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
24864         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
24865         in autoconf whereby the expansion of the latter ended up preceding
24866         the expansion of its prerequisite, AC_HEADER_TIME.
24867         Reported by Volker Borchert.
24868
24869 2000-02-03  Jim Meyering  <meyering@lucent.com>
24870
24871         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
24872
24873 2000-02-03  Jim Meyering  <meyering@lucent.com>
24874
24875         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
24876         rather than with `#if HAVE_UTMPNAME'.
24877
24878 2000-02-02  Jim Meyering  <meyering@lucent.com>
24879
24880         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
24881         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
24882         Reported by Eli Zaretskii.
24883
24884 2000-02-01  Jim Meyering  <meyering@lucent.com>
24885
24886         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
24887
24888 2000-01-31  Jim Meyering  <meyering@lucent.com>
24889
24890         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
24891         functions.  Add the time.h and sys/time.h headers along with the
24892         AC_REQUIRE'ment of AC_HEADER_TIME.
24893
24894 2000-01-31  Jim Meyering  <meyering@lucent.com>
24895
24896         * lib/nanosleep.h (nanosleep): Guard declaration with
24897         `#if ! HAVE_DECL_NANOSLEEP'.
24898         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
24899         the declaration in that vendor's sys/timers.h.
24900         Reported by Christian Krackowizer.
24901
24902         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
24903         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
24904         (ISPRINT): Likewise.
24905         Reported by Tom Tromey.
24906
24907 2000-01-30  Jim Meyering  <meyering@lucent.com>
24908
24909         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
24910
24911         * m4/prereq.m4 (utmp_includes): Define.
24912         Check for ut_user and ut_name members in both struct utmpx
24913         and struct utmp.
24914
24915 2000-01-30  Jim Meyering  <meyering@lucent.com>
24916
24917         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
24918         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
24919         header files where only utmpx.ut_user is declared.
24920
24921         * lib/readutmp.h (UT_USER): Define.
24922
24923 2000-01-29  Jim Meyering  <meyering@lucent.com>
24924
24925         * m4/lib-check.m4: New file containing library-related checks from
24926         fileutils and sh-utils (textutils had none).
24927
24928 2000-01-28  Jim Meyering  <meyering@lucent.com>
24929
24930         * m4/perl.m4: Change format of warning message to look more like that
24931         from the missing script.  Suggestion from François Pinard.
24932
24933 2000-01-25  Jim Meyering  <meyering@lucent.com>
24934
24935         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
24936         well as time.h in the compile check.
24937         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
24938         Fix typo in cross-compiling case: s/yes/no/.
24939
24940 2000-01-23  Jim Meyering  <meyering@lucent.com>
24941
24942         * m4/jm-macros.m4: Move df-related tests here from
24943         fileutils/configure.in
24944
24945         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
24946         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
24947
24948         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
24949         s/space/ac_fsusage_space/.
24950         (jm_FILE_SYSTEM_USAGE): Take two parameters.
24951
24952         * m4/ftruncate.m4: New file (derived from part of
24953         fileutils/configure.in).
24954         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
24955         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
24956
24957         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
24958         AC_SUBST these here, rather than just in sh-util/configure.in, so
24959         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
24960         all the same.
24961         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
24962         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
24963         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
24964         (AC_SUBST(POW_LIBM)): Likewise.
24965         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
24966
24967 2000-01-23  Jim Meyering  <meyering@lucent.com>
24968
24969         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
24970         obstack.c.
24971
24972 2000-01-22  Jim Meyering  <meyering@lucent.com>
24973
24974         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
24975
24976         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
24977
24978         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
24979         configure.in
24980         (AC_CHECK_HEADERS): Likewise for sh-utils.
24981         (AC_CHECK_HEADERS): Likewise for textutils.
24982         Merge the three lists of headers.
24983
24984         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
24985         from fileutils' configure.in.
24986
24987         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
24988         code. Moved tests into their own function (_jm_DECL_HEADERS) in
24989         check-decl.m4.
24990
24991         * m4/check-decl.m4: Use #if rather than #ifdef.
24992         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
24993         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
24994         (_jm_DECL_HEADERS): Define new function.
24995         (jm_CHECK_DECLARATIONS): Require it.
24996
24997 2000-01-22  Jim Meyering  <meyering@lucent.com>
24998
24999         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25000         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25001         Required for some AIX systems.  Reported by Christian Krackowizer.
25002         [TESTING] (main): New function.
25003
25004         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25005         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25006         letters.
25007
25008         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25009         iswprint.
25010
25011         * lib/strverscmp.c (ISDIGIT): Define.
25012         (strverscmp): Use ISDIGIT, not isdigit.
25013
25014 2000-01-19  Jim Meyering  <meyering@lucent.com>
25015
25016         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25017         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25018         defines `struct timespec' in <sys/time.h>
25019
25020         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25021         Thanks to Akim for explaining.
25022
25023 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25024
25025         * lib/nanosleep.c (nanosleep):
25026         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25027         POSIX.1 doesn't require SA_INTERRUPT and some systems
25028         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25029         it's been part of POSIX.1 since day 1 (in 1988).
25030
25031 2000-01-17  Jim Meyering  <meyering@lucent.com>
25032
25033         * lib/interlock: Remove unused file.  Reported by François Pinard.
25034
25035 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25036
25037         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25038         alert, backslash, formfeed, and vertical tab unnecessarily in
25039         shell quoting style.
25040
25041 2000-01-16  Jim Meyering  <meyering@lucent.com>
25042
25043         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25044         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25045         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25046         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25047
25048 2000-01-16  Jim Meyering  <meyering@lucent.com>
25049
25050         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25051         because the latter didn't work.
25052
25053 2000-01-15  Jim Meyering  <meyering@lucent.com>
25054
25055         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25056         (AC_REPLACE_FUNCS): Add memcpy and memset.
25057         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25058         Add strpbrk.
25059         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25060
25061 2000-01-12  Jim Meyering  <meyering@lucent.com>
25062
25063         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25064         (jm_PREREQ): Use it.
25065         (jm_PREREQ_READUTMP): New macro.
25066         (jm_PREREQ): Use it.
25067
25068 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25069
25070         Quote multibyte characters correctly.
25071         * m4/c-bs-a.m4: New file.
25072         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25073         (jm_PREREQ): Use it.
25074
25075 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25076
25077         * m4/uintmax_t.m4: Port to autoconf 2.13.
25078
25079 2000-01-08  Jim Meyering  <meyering@ascend.com>
25080
25081         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25082         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25083
25084 2000-01-04  Jim Meyering  <meyering@ascend.com>
25085
25086         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25087         jm_STRUCT_DIRENT_D_TYPE.
25088         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25089         jm_STRUCT_DIRENT_D_INO.
25090         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25091         jm_STRUCT_UTIMBUF.
25092         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25093         renamings.
25094         * m4/utime.m4: Likewise.
25095
25096         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25097         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25098
25099 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25100
25101         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25102         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25103
25104 2000-01-02  Jim Meyering  <meyering@ascend.com>
25105
25106         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25107         remember if this is necessary.
25108
25109 1999-12-26  Jim Meyering  <meyering@ascend.com>
25110
25111         * m4/jm-macros.m4: Use it here.
25112         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25113
25114 1999-12-23  Jim Meyering  <meyering@ascend.com>
25115
25116         * m4/jm-macros.m4: Check for clock_gettime (moved from
25117         fileutils/configure.in)
25118         Check for gettimeofday.
25119
25120 1999-12-20  Jim Meyering  <meyering@ascend.com>
25121
25122         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25123         autoconf-2.14a-1999-12-20.
25124
25125 1999-12-19  Jim Meyering  <meyering@ascend.com>
25126
25127         * m4/lstat-slash.m4: New file.
25128         * m4/jm-macros.m4: Use the new macro:
25129         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25130
25131 1999-12-07  Jim Meyering  <meyering@ascend.com>
25132
25133         * m4/perl.m4: Require that File::Compare be available, too.
25134         Too many systems seem to lack it.
25135
25136         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25137         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25138
25139 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25140
25141         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25142         problem with the QNX 4.25 shell, which doesn't propagate exit
25143         status of failed commands inside shell assignments.
25144
25145 1999-11-17  Jim Meyering  <meyering@ascend.com>
25146
25147         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25148
25149 1999-11-07  Jim Meyering  <meyering@ascend.com>
25150
25151         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25152
25153 1999-11-06  Jim Meyering  <meyering@ascend.com>
25154
25155         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25156         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25157
25158 1999-11-05  Jim Meyering  <meyering@ascend.com>
25159
25160         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25161         configure.in of textutils, fileutils, and sh-utils into this one
25162         (shared between those packages) file.
25163         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25164         AC_STRUCT_ST_BLKSIZE.
25165
25166 1999-11-03  Jim Meyering  <meyering@ascend.com>
25167
25168         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25169         of AC_CHECK_TYPE checks includes unistd.h.
25170         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25171         Suggestion from Akim Demaille.
25172
25173 1999-10-30  Jim Meyering  <meyering@ascend.com>
25174
25175         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25176         m4-quoted string.
25177         * m4/ls-mntd-fs.m4: Likewise.
25178         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25179         * m4/jm-winsz1.m4: Likewise.
25180
25181         * m4/const.m4: Remove file, since the fix made it into the experimental
25182         version of autoconf.
25183         * m4/mktime.m4: Likewise.
25184
25185         * m4/check-type.m4: Remove file, now that the latest version of
25186         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25187
25188         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25189         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25190         AC_CHECK_TYPE.
25191
25192 1999-10-04  Jim Meyering  <meyering@ascend.com>
25193
25194         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25195
25196 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25197
25198         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25199         2.95.1 bug with HP-UX 10.20.
25200
25201 1999-09-17  Jim Meyering  <meyering@ascend.com>
25202
25203         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25204         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25205         due to missing strdup (against sh-utils-2.0).
25206
25207 1999-08-29  Jim Meyering  <meyering@ascend.com>
25208
25209         * m4/jm-macros.m4: Require jm_BISON.
25210         * m4/bison.m4: New file.
25211
25212 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25213
25214         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25215         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25216
25217 1999-08-05  Jim Meyering  <meyering@ascend.com>
25218
25219         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25220         to avoid conflicts with `conftest' on 8+3 filesystems.
25221         Suggestion from Eli Zaretskii.
25222
25223 1999-08-04  Jim Meyering  <meyering@ascend.com>
25224
25225         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25226         fileutils and sh-utils (textutils's getline test was inadequate).
25227         (AM_FUNC_GETLINE): Run this test.
25228         (AC_CHECK_FUNCS): Check for getdelim.
25229         Reported by Bob Proulx.
25230
25231 1999-08-02  Jim Meyering  <meyering@ascend.com>
25232
25233         * m4/jm-macros.m4: Add a comment.
25234
25235 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25236
25237         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25238         <inttypes.h> defines strtoumax as a macro (and not as a
25239         function).
25240
25241 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25242
25243         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25244         that we can shift, multiply and divide unsigned long long
25245         values; Ultrix cc can't do it.
25246
25247 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25248
25249         * m4/mktime.m4: New file, which is a preview of what should appear
25250         in the next public autoconf release.
25251
25252 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25253
25254         * m4/lfs.m4: Remove this file.
25255         * m4/largefile.m4: New file.  It contains the old contents of
25256         lfs.m4, except that all names with prefix AC_LFS have been
25257         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25258         compatible with future autoconf versions.  Also, some minor m4
25259         quoting problems have been fixed.
25260
25261 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25262
25263         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25264         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25265         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25266         and simplify the shell code.
25267
25268 1999-08-01  Jim Meyering  <meyering@ascend.com>
25269
25270         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25271         m4.
25272
25273 1999-07-20  Jim Meyering  <meyering@ascend.com>
25274
25275         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25276
25277 1999-07-15  Jim Meyering  <meyering@ascend.com>
25278
25279         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25280
25281 1999-05-22  Jim Meyering  <meyering@ascend.com>
25282
25283         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25284
25285 1999-05-20  Jim Meyering  <meyering@ascend.com>
25286
25287         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25288         Add a colon after each `then' in case $4 is empty.
25289
25290 1999-05-16  Jim Meyering  <meyering@ascend.com>
25291
25292         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25293
25294 1999-05-10  Jim Meyering  <meyering@ascend.com>
25295
25296         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25297
25298         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25299         AC_FUNC_MKTIME.
25300
25301 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25302
25303         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25304
25305 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25306
25307         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25308         not CPPFLAGS, so that linking works correctly in IRIX.
25309
25310 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25311
25312         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25313
25314 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25315
25316         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25317         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25318         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25319         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25320         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25321
25322         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25323
25324 1999-04-20  Jim Meyering  <meyering@ascend.com>
25325
25326         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25327         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25328         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25329
25330 1999-04-18  Jim Meyering  <meyering@ascend.com>
25331
25332         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25333         * m4/jm-macros.m4: Use it.
25334
25335 1999-04-06  Jim Meyering  <meyering@ascend.com>
25336
25337         * m4/strftime.m4: Remove test for %f.
25338
25339 1999-03-29  Jim Meyering  <meyering@ascend.com>
25340
25341         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25342         superset of the AC_TYPE_* checks in the textutils, fileutils,
25343         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25344         AC_TYPE_PID_T.
25345
25346 1999-03-28  Jim Meyering  <meyering@ascend.com>
25347
25348         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25349         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25350         replaced e.g., in the *.sh files of the sh-utils.
25351
25352 1999-03-20  Jim Meyering  <meyering@ascend.com>
25353
25354         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25355         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25356         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25357
25358 1999-03-19  Jim Meyering  <meyering@ascend.com>
25359
25360         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25361
25362 1999-03-12  Jim Meyering  <meyering@ascend.com>
25363
25364         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25365
25366 1999-03-07  Jim Meyering  <meyering@ascend.com>
25367
25368         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25369         declared.
25370
25371 1999-02-17  Jim Meyering  <meyering@ascend.com>
25372
25373         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25374         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25375
25376 1999-02-07  Jim Meyering  <meyering@ascend.com>
25377
25378         * m4/group-member.m4: New file -- extracted from sh-utils'
25379         configure.in.
25380
25381         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25382         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25383
25384 1999-02-06  Jim Meyering  <meyering@ascend.com>
25385
25386         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25387         * m4/fnmatch.m4: Likewise.
25388         * m4/getgroups.m4: Likewise.
25389         * m4/lstat.m4: Likewise.
25390         * m4/malloc.m4: Likewise.
25391         * m4/putenv.m4: Likewise.
25392         * m4/realloc.m4: Likewise.
25393         * m4/regex.m4: Likewise.
25394         * m4/stat.m4: Likewise.
25395         * m4/strftime.m4: Likewise.
25396         Suggestion from Alain Magloire.
25397
25398         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25399         * m4/fnmatch.m4: Likewise.
25400         * m4/getgroups.m4: Likewise.
25401         * m4/getline.m4: Likewise.
25402         * m4/lstat.m4: Likewise.
25403         * m4/malloc.m4: Likewise.
25404         * m4/memcmp.m4: Likewise.
25405         * m4/putenv.m4: Likewise.
25406         * m4/realloc.m4: Likewise.
25407         * m4/regex.m4: Likewise.
25408         * m4/stat.m4: Likewise.
25409         * m4/strftime.m4: Likewise.
25410         Suggestion from Alain Magloire.
25411
25412         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25413         an argument.
25414
25415         * m4/regex.m4: Add a run-time Test for proper operation of
25416         re_compile_pattern.
25417
25418 1999-01-31  Jim Meyering  <meyering@ascend.com>
25419
25420         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25421
25422 1999-01-30  Jim Meyering  <meyering@ascend.com>
25423
25424         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25425
25426         * m4/jm-mktime.m4: Make this a wrapper around the official
25427         AM_FUNC_MKTIME rather than my private copy, now that the official one
25428         is up to date.
25429         * m4/mktime.m4: Remove file.
25430
25431         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25432         * m4/uptime.m4: Likewise.
25433         * m4/uintmax_t.m4: Likewise.
25434
25435 1999-01-28  Jim Meyering  <meyering@ascend.com>
25436
25437         * m4/jm-macros.m4: Use jm_AFS.
25438         * m4/afs.m4: New file (from fileutils' configure.in).
25439
25440         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25441         * m4/chown.m4: Likewise.
25442         * m4/d-ino.m4: Likewise.
25443         * m4/d-type.m4: Likewise.
25444         * m4/fnmatch.m4: Likewise.
25445         * m4/getgroups.m4: Likewise.
25446         * m4/gettext.m4: Likewise.
25447         * m4/jm-mktime.m4: Likewise.
25448         * m4/jm-winsz2.m4: Likewise.
25449         * m4/lcmessage.m4: Likewise.
25450         * m4/ls-mntd-fs.m4: Likewise.
25451         * m4/malloc.m4: Likewise.
25452         * m4/memcmp.m4: Likewise.
25453         * m4/putenv.m4: Likewise.
25454         * m4/realloc.m4: Likewise.
25455         * m4/st_mtim.m4: Likewise.
25456         * m4/strftime.m4: Likewise.
25457
25458 1999-01-16  Jim Meyering  <meyering@ascend.com>
25459
25460         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25461         (ARGMATCH_DIE_DECL): Define.
25462
25463 1999-01-12  Jim Meyering  <meyering@ascend.com>
25464
25465         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25466         Reported by Lars Hecking.
25467
25468 1999-01-10  Jim Meyering  <meyering@ascend.com>
25469
25470         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25471         gross kludge.
25472         * m4/inttypes_h.m4: Likewise.
25473         * m4/lstat.m4: Likewise.
25474         * m4/malloc.m4: Likewise.
25475         * m4/readdir.m4: Likewise.
25476         * m4/realloc.m4: Likewise.
25477         * m4/st_dm_mode.m4: Likewise.
25478         * m4/stat.m4: Likewise.
25479         * m4/utimbuf.m4: Likewise.
25480         * m4/utimes.m4: Likewise.
25481
25482         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25483         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25484         comments in config.h.in are meaningful.
25485
25486         * m4/jm-macros.m4: Require autoconf-2.13 here.
25487
25488         * m4/regex.m4: By default, don't use the included regex.c on systems
25489         with glibc 2.  Suggestion from Uli Drepper.
25490
25491 1999-01-02  Jim Meyering  <meyering@ascend.com>
25492
25493         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25494
25495 1998-12-18  Jim Meyering  <meyering@ascend.com>
25496
25497         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25498         Based on a suggestion from Lars Hecking.
25499
25500 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25501
25502         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25503
25504 1998-11-16  Jim Meyering  <meyering@ascend.com>
25505
25506         * m4/lfs.m4: Double-quote the `uname...` expression.
25507
25508 1998-11-14  Jim Meyering  <meyering@ascend.com>
25509
25510         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
25511         * m4/stat.m4: Likewise.
25512
25513 1998-11-03  Jim Meyering  <meyering@ascend.com>
25514
25515         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
25516         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
25517
25518 1998-10-18  Jim Meyering  <meyering@ascend.com>
25519
25520         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
25521
25522 1998-10-17  Jim Meyering  <meyering@ascend.com>
25523
25524         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
25525         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
25526         calls for those previously hard-coded headers.  Instead, take a new
25527         parameter.
25528         (jm_CHECK_DECLARATIONS): Reflect interface change.
25529         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
25530         (jm_CHECK_DECL_LOCALTIME_R): New macro.
25531
25532         * m4/mktime.m4: Test for spring-forward gap before long-running test.
25533
25534 1998-10-14  Jim Meyering  <meyering@ascend.com>
25535
25536         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
25537         instead of "TZ=America/Vancouver".  From Paul Eggert.
25538
25539 1998-10-11  Jim Meyering  <meyering@ascend.com>
25540
25541         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
25542         This adds a test for a recently added compatibility fix for mktime.c.
25543         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
25544
25545 1998-09-27  Jim Meyering  <meyering@ascend.com>
25546
25547         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
25548
25549         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
25550         ../configure.in, including a change from Gordon Matzigkeit to allow
25551         cross-compiling for the Hurd.
25552
25553         * m4/glibc.m4: New file/macro to test for the GNU C Library
25554         versions 1 and 2.  From Gordon Matzigkeit.
25555         Indent.
25556
25557 1998-09-21  Jim Meyering  <meyering@ascend.com>
25558
25559         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
25560
25561 1998-08-18  Paul Eggert  <eggert@twinsun.com>
25562
25563         Port nanosecond-resolution times to UnixWare 2.1.2 and
25564         pedantic Solaris 2.6.
25565
25566         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
25567         AC_STRUCT_ST_MTIM.
25568         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
25569         Generate name of ns member, instead of just 1 or undef.
25570         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
25571
25572 1998-08-15  Jim Meyering  <meyering@ascend.com>
25573
25574         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
25575         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
25576         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
25577         instead of jm_TYPE_SSIZE_T.
25578
25579 1998-08-12  Jim Meyering  <meyering@ascend.com>
25580
25581         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
25582
25583 1998-08-02  Jim Meyering  <meyering@ascend.com>
25584
25585         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
25586         in acconfig.h manually.
25587
25588 1998-07-31  Paul Eggert  <eggert@twinsun.com>
25589
25590         * m4/st_mtim.m4: New file.
25591
25592 1998-07-28  Jim Meyering  <meyering@ascend.com>
25593
25594         * m4/utimes.m4: Undef stat.
25595
25596 1998-07-25  Jim Meyering  <meyering@ascend.com>
25597
25598         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
25599         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
25600
25601 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
25602
25603         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
25604         uid and gid actually remain unchanged.
25605
25606 1998-07-07  Jim Meyering  <meyering@ascend.com>
25607
25608         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
25609
25610 1998-07-04  Jim Meyering  <meyering@ascend.com>
25611
25612         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
25613         to prove that this macro can be used in packages without regex.c.
25614
25615 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
25616
25617         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
25618         is to be used.
25619
25620 1998-07-03  Jim Meyering  <meyering@ascend.com>
25621
25622         * m4/gettext.m4: Add -lintl if it's found to be necessary.
25623
25624         * m4/gettext.m4: New file -- from gettext-0.10.35.
25625         * m4/lcmessage.m4: Likewise.
25626         * m4/progtest.m4: Likewise.
25627
25628         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
25629         * m4/jm-macros.m4: Require the new macro.
25630
25631 1998-06-29  Jim Meyering  <meyering@ascend.com>
25632
25633         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
25634         for the definition of NGROUPS (used in a system header included
25635         by sys/mount.h).
25636
25637 1998-06-28  Jim Meyering  <meyering@ascend.com>
25638
25639         * m4/ls-mntd-fs.m4: New file.
25640         * m4/fstypename.m4: New file.
25641
25642         * m4/jm-macros.m4: Require the new macro.
25643         * m4/jm-glibc-io.m4: New file.
25644
25645 1998-05-19  Jim Meyering  <meyering@ascend.com>
25646
25647         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
25648         * m4/lchown.m4: New file.
25649
25650         * m4/Makefile.am.in: New file.
25651         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
25652
25653 1998-05-14  Jim Meyering  <meyering@ascend.com>
25654
25655         * m4/Makefile.am (EXTRA_DIST): Add them.
25656         * m4/jm-macros.m4: New file.
25657         * m4/utimbuf.m4: New file.
25658
25659 1998-05-12  Jim Meyering  <meyering@ascend.com>
25660
25661         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
25662
25663 1998-05-11  Jim Meyering  <meyering@ascend.com>
25664
25665         * m4/isc-posix.m4: New file.
25666
25667 1998-05-10  Jim Meyering  <meyering@ascend.com>
25668
25669         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
25670
25671 1998-05-09  Jim Meyering  <meyering@ascend.com>
25672
25673         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
25674         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
25675         with automake.
25676
25677         * m4/ssize_t.m4: New file.
25678         * m4/mktime.m4: Remove file -- the new automake has this now.
25679
25680 1998-04-26  Jim Meyering  <meyering@ascend.com>
25681
25682         * m4/assert.m4: New file.
25683         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
25684
25685 1998-04-05  Jim Meyering  <meyering@ascend.com>
25686
25687         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
25688         (jm_PREREQ): Use it here.
25689
25690 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
25691
25692         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
25693         in acconfig.h.
25694
25695 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
25696
25697         * m4/prereq.m4: New file.
25698         * m4/error.m4: New file.
25699         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
25700
25701 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
25702
25703         * m4/getline.m4: Don't set am_cv_func_working_getline before the
25704         cache-check for the same variable -- that defeated the purpose of
25705         the test; the test program was never run.  This was a problem only
25706         on systems with losing getline functions -- HP-UX 10.20 is one.
25707         Reported by Bjorn Helgaas.
25708
25709 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
25710
25711         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
25712
25713 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
25714
25715         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
25716
25717         * m4/const.m4: New file.  Use an initializer in this declaration
25718         typedef int charset[2]; const charset x;
25719         Reported by Bob Glickstein.
25720
25721 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
25722
25723         * m4/chown.m4: Fix reversed types on -1 args to chown.
25724         From Kaveh Ghazi.
25725
25726 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
25727
25728         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
25729         Add lseek and memchr.
25730
25731         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
25732         T.E.Dickey <dickey@clark.net> said that some older preprocessors
25733         have a 20-character limit on names.
25734
25735 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
25736
25737         * m4/inttypes_h.m4: New file.
25738         * m4/uintmax_t.m4: New file.
25739         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
25740
25741 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
25742   Free Software Foundation, Inc.
25743 Copying and distribution of this file, with or without modification,
25744 are permitted provided the copyright notice and this notice are preserved.