37bc7bee668a7f9187978f9e9accff478104f668
[gnulib.git] / ChangeLog
1 2007-03-01  Bruno Haible  <bruno@clisp.org>
2
3         * build-aux/install-reloc: Remove object files left over by some
4         compilers.
5         Reported by Ralf Wildenhues.
6
7 2007-03-01  Bruno Haible  <bruno@clisp.org>
8
9         * build-aux/install-reloc: Break long lines.
10
11 2007-03-01  Bruno Haible  <bruno@clisp.org>
12
13         * doc/relocatable.texi: Document that it may not work on OpenBSD.
14         Reported by Ralf Wildenhues.
15
16 2007-03-01  Bruno Haible  <bruno@clisp.org>
17
18         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
19         include ordering constraints.
20
21 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
22
23         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
24         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
25         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
26         as another example.
27         * lib/time_.h: Fix misspelling.
28         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
29         Require gl_HEADER_TIME_H_DEFAULTS.
30         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
31         * m4/time_r.m4 (gl_TIME_R): Likewise.
32         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
33
34 2007-03-01  Bruno Haible  <bruno@clisp.org>
35
36         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
37         * m4/utimens.m4 (gl_UTIMENS): Likewise.
38
39 2007-03-01  Jim Meyering  <jim@meyering.net>
40
41         * modules/xreadlink (Maintainer): Add my name.
42         * modules/xreadlink-with-size (Depends-on): Alphabetize.
43
44 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
45             Bruno Haible  <bruno@clisp.org>
46
47         * build-aux/install-reloc: Compile also c-ctype.c.
48         * build-aux/relocatable.sh.in: New file.
49         * doc/relocatable.texi: New file.
50         * doc/relocatable-maint.texi: New file.
51         * doc/gnulib.texi: Include relocatable-maint.texi.
52         * lib/progreloc.c: Include unistd.h unconditionally.
53         * lib/relocwrapper.c: Include unistd.h unconditionally.
54         Include c-ctype.h.
55         (add_dotbin): Use c_tolower.
56         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
57         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
58         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
59         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
60         to m4/relocatable-lib.m4.
61         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
62         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
63         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
64         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
65         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
66         * modules/relocatable: New file.
67         * modules/relocatable-lib: New file.
68         * modules/relocatable-script: New file.
69
70 2007-02-28  Bruno Haible  <bruno@clisp.org>
71
72         Import --enable-relocatable infrastructure.
73         * build-aux/config.libpath: New file, from GNU gettext.
74         * build-aux/install-reloc: New file, from GNU gettext.
75         * build-aux/reloc-ldflags: New file, from GNU gettext.
76         * lib/relocatable.h: New file, from GNU gettext.
77         * lib/relocatable.c: New file, from GNU gettext.
78         * lib/relocwrapper.c: New file, from GNU gettext.
79         * m4/relocatable.m4: New file, from GNU gettext.
80
81 2007-02-28  Bruno Haible  <bruno@clisp.org>
82
83         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
84
85         * modules/xreadlink: New file, from GNU gettext with modifications.
86         * lib/xreadlink.c: New file, from GNU gettext.
87         * lib/xreadlink.h: Add comments.
88         (xreadlink): New declaration.
89
90         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
91         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
92         lib/xreadlink-with-size.c.
93         (configure.ac): Remove gl_XREADLINK invocation.
94         (Makefile.am): Augment lib_SOURCES.
95         * m4/xreadlink.m4: Remove file.
96         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
97         (xreadlink_with_size): Renamed from xreadink.
98         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
99         * modules/canonicalize (Depends-on): Replace xreadlink with
100         xreadlink-with-size.
101         * lib/canonicalize.c (canonicalize_filename_mode): Update.
102
103 2007-02-25  Jim Meyering  <jim@meyering.net>
104
105         * build-aux/announce-gen: When complaining about excess arguments,
106         list them.
107
108 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
109
110         * README: Document signed integer overflow situation more
111         accurately.
112
113 2007-02-25  Bruno Haible  <bruno@clisp.org>
114
115         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
116         'a' or 'A' conversion.
117
118 2007-02-25  Bruno Haible  <bruno@clisp.org>
119
120         * modules/filename: Renamed from modules/pathname.
121         (Files): Replace lib/pathname.h with lib/filename.h. Replace
122         lib/concatpath.c with lib/concat-filename.c.
123         (Makefile.am): Update.
124         (Include): Replace pathname.h with filename.h.
125         * lib/filename.h: Renamed from lib/pathname.h.
126         (concatenated_filename): Renamed from concatenated_pathname.
127         * lib/concat-filename.c: Renamed from lib/concatpath.c.
128         (concatenated_filename): Renamed from concatenated_pathname.
129         * lib/findprog.c: Include filename.h instead of pathname.h.
130         (find_in_path): Update.
131         * lib/javacomp.c: Include filename.h instead of pathname.h.
132         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
133         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
134         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
135         is_oldgcj_14_13_usable, is_javac_usable): Update.
136         * lib/javaexec.c: Include filename.h instead of pathname.h.
137         (execute_java_class): Update.
138         * modules/findprog: Update.
139         * modules/javacomp: Update.
140         * modules/javaexec: Update.
141         * MODULES.html.sh (File system functions): Add 'filename', remove
142         'pathname'.
143
144 2007-02-25  Bruno Haible  <bruno@clisp.org>
145
146         * modules/printf-frexpl-tests: New file.
147         * tests/test-printf-frexpl.c: New file.
148
149         * modules/printf-frexpl: New file.
150         * lib/printf-frexpl.h: New file.
151         * lib/printf-frexpl.c: New file.
152         * m4/printf-frexpl.m4: New file.
153
154 2007-02-25  Bruno Haible  <bruno@clisp.org>
155
156         * modules/printf-frexp-tests: New file.
157         * tests/test-printf-frexp.c: New file.
158
159         * modules/printf-frexp: New file.
160         * lib/printf-frexp.h: New file.
161         * lib/printf-frexp.c: New file.
162         * m4/printf-frexp.m4: New file.
163
164 2007-02-25  Bruno Haible  <bruno@clisp.org>
165
166         Assume automake >= 1.10 for the tests.
167         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
168         * modules/arctwo-tests: Likewise.
169         * modules/argp-tests: Likewise.
170         * modules/avltree-list-tests: Likewise.
171         * modules/avltree-oset-tests: Likewise.
172         * modules/avltreehash-list-tests: Likewise.
173         * modules/carray-list-tests: Likewise.
174         * modules/crc-tests: Likewise.
175         * modules/des-tests: Likewise.
176         * modules/gc-arcfour-tests: Likewise.
177         * modules/gc-arctwo-tests: Likewise.
178         * modules/gc-des-tests: Likewise.
179         * modules/gc-hmac-md5-tests: Likewise.
180         * modules/gc-hmac-sha1-tests: Likewise.
181         * modules/gc-md2-tests: Likewise.
182         * modules/gc-md4-tests: Likewise.
183         * modules/gc-md5-tests: Likewise.
184         * modules/gc-pbkdf2-sha1-tests: Likewise.
185         * modules/gc-rijndael-tests: Likewise.
186         * modules/gc-sha1-tests: Likewise.
187         * modules/gc-tests: Likewise.
188         * modules/getaddrinfo-tests: Likewise.
189         * modules/hmac-md5-tests: Likewise.
190         * modules/hmac-sha1-tests: Likewise.
191         * modules/linked-list-tests: Likewise.
192         * modules/linkedhash-list-tests: Likewise.
193         * modules/lock-tests: Likewise.
194         * modules/md2-tests: Likewise.
195         * modules/md4-tests: Likewise.
196         * modules/md5-tests: Likewise.
197         * modules/rbtree-list-tests: Likewise.
198         * modules/rbtree-oset-tests: Likewise.
199         * modules/rbtreehash-list-tests: Likewise.
200         * modules/read-file-tests: Likewise.
201         * modules/rijndael-tests: Likewise.
202         * modules/stdint-tests: Likewise.
203         * modules/tls-tests: Likewise.
204
205 2007-02-24  Bruno Haible  <bruno@clisp.org>
206
207         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
208         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
209         function; instead check whether isnan with a double argument links.
210         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
211         function; instead check whether isnan with a 'long double' argument
212         links.
213         Reported by Eric Blake <ebb9@byu.net>.
214
215 2007-02-24  Bruno Haible  <bruno@clisp.org>
216
217         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
218         defined.
219         * lib/isnanl.c: Remove all code. Just include isnan.c.
220         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
221
222 2007-02-25  Jim Meyering  <jim@meyering.net>
223
224         Avoid conflicting types for 'unsetenv' on FreeBSD.
225         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
226         conflicting with FreeBSD's (5.0 and 6.1) function declaration
227         in stdlib.h.
228
229 2007-02-24  Bruno Haible  <bruno@clisp.org>
230
231         * modules/isnanl-nolibm-tests: New file.
232         * tests/test-isnanl.c: New file.
233
234         * modules/isnanl-nolibm: New file.
235         * lib/isnanl.h: New file.
236         * lib/isnanl.c: New file.
237         * m4/isnanl.m4: New file.
238
239 2007-02-24  Bruno Haible  <bruno@clisp.org>
240
241         * modules/isnan-nolibm-tests: New file.
242         * tests/test-isnan.c: New file.
243
244         * modules/isnan-nolibm: New file.
245         * lib/isnan.h: New file.
246         * lib/isnan.c: New file.
247         * m4/isnan.m4: New file.
248
249 2007-02-24  Bruno Haible  <bruno@clisp.org>
250
251         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
252         assume that an exponent fits in 20 bits.
253
254 2007-02-24  Jim Meyering  <jim@meyering.net>
255
256         * m4/regex.m4: Update the description of the configure-time option,
257         --without-included-regex, to state accurately what the defaults are,
258         and perhaps to give people an idea why using this option is risky.
259
260 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
261
262         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
263         loops on small arguments.  This attempts to avoid the problem
264         Bruno Haible reported for AIX 4.3.2 in
265         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
266
267 2007-02-23  Bruno Haible  <bruno@clisp.org>
268
269         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
270         Needed for help2man.
271
272 2007-02-23  Karl Berry  <karl@gnu.org>
273
274         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
275         exists, foo.h should be cvs-ignored, not committed.
276
277 2007-02-23  Eric Blake  <ebb9@byu.net>
278
279         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
280         * lib/stat-time.h (includes): Likewise.
281         * lib/utimecmp.c (includes): Likewise.
282         * lib/utimens.h (includes): Likewise.
283         * lib/getdate.y (includes): Also include "timespec.h" for use
284         internal to the module.
285         * modules/utimens (Depends-on): Revert yesterday's patch.
286         * modules/nanosleep (Depends-on): Add missing dependency.
287
288 2007-02-22  Bruno Haible  <bruno@clisp.org>
289
290         * lib/glob.c: Don't include getlogin_r.h.
291
292 2007-02-22  Jim Meyering  <jim@meyering.net>
293
294         * modules/utimens (Depends-on): Add timespec, required for
295         utimens.h's inclusion of timespec.h.
296
297 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
298
299         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
300         long unreadable paths in GNU/Linux.  Problem reported by Andreas
301         Schwab in
302         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
303         I'll try to think of a better way to fix the Solaris problem.
304
305         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
306         like glibc; on Solaris 10, it fails with errno == EINVAL.
307         POSIX says the behavior is unspecified if the first argument is NULL,
308         so play it safe and never pass NULL to the system getcwd.
309
310 2007-02-21  Jim Meyering  <jim@meyering.net>
311
312         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
313         of gettimeofday.  It would conflict with the one now always
314         provided via sys_time_.h.  Reported by Matthew Woehlke, as
315         an IRIX 6.5 build failure.
316
317 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
318
319         Minor fixups to port to Solaris 10 with Sun C 5.8.
320         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
321         * modules/getcwd (Depends-on): Add dirfd.
322         * lib/putenv.c (putenv): #undef it.
323         (rpl_putenv): New decl.
324         (malloc, free): Include <stdlib.h> rather than prototyping separately.
325
326 2007-02-20  Bruno Haible  <bruno@clisp.org>
327
328         * modules/stdio-tests: New file.
329         * tests/test-stdio.c: New file.
330
331         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
332         (Depends-on): Add stdio.
333         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
334         (Include): Use <stdio.h> instead of vsnprintf.h.
335         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
336         HAVE_DECL_VSNPRINTF.
337         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
338
339         * modules/snprintf (Files): Remove lib/snprintf.h.
340         (Depends-on): Add stdio.
341         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
342         (Include): Use <stdio.h> instead of snprintf.h.
343         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
344         HAVE_DECL_SNPRINTF.
345         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
346         * lib/getaddrinfo.c: Likewise.
347
348         * modules/stdio: New file.
349         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
350         * lib/snprintf.h: Remove file.
351         * lib/vsnprintf.h: Remove file.
352         * lib/.cppi-disable: Remove snprintf.h.
353         * m4/stdio_h.m4: New file.
354         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
355
356 2007-02-20  Jim Meyering  <jim@meyering.net>
357
358         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
359         used by e.g., mingw.  From Bruno Haible.
360
361 2007-02-19  Bruno Haible  <bruno@clisp.org>
362
363         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
364         warnings.
365         Reported by Ben Pfaff <blp@cs.stanford.edu>.
366
367 2007-02-19  Bruno Haible  <bruno@clisp.org>
368
369         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
370         from mingw users.
371
372 2007-02-19  Bruno Haible  <bruno@clisp.org>
373
374         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
375         warnings.
376         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
377
378 2007-02-19  Jim Meyering  <jim@meyering.net>
379
380         Don't use FD after a successful "fdopendir (fd)".
381         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
382         Reset it by calling dirfd on the just-obtained DIR*.
383
384         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
385         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
386
387 2007-02-18  Bruno Haible  <bruno@clisp.org>
388
389         * lib/readlink.c: Include <unistd.h>.
390         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
391         HAVE_READLINK.
392         * modules/readlink (Depends-on): Add unistd.
393         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
394         (Include): Add <unistd.h>.
395
396         * lib/getlogin_r.h: Remove file.
397         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
398         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
399         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
400         HAVE_DECL_GETLOGIN_R.
401         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
402         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
403         (Include): Use <unistd.h> instead of getlogin_r.h.
404
405         * lib/getcwd.h: Remove file.
406         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
407         * lib/xgetcwd.c: Likewise.
408         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
409         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
410         * modules/getcwd (Files): Remove lib/getcwd.h.
411         (Depends-on): Add unistd.
412         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
413         (Include): Use <unistd.h> instad of getcwd.h.
414
415         * lib/ftruncate.c: Include <unistd.h> first.
416         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
417         Set HAVE_FTRUNCATE.
418         * modules/ftruncate (Depends-on): Add unistd.
419         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
420
421         * lib/fchdir.c: Include <unistd.h> first.
422         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
423         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
424         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
425         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
426         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
427
428         * lib/dup2.c: Include <unistd.h> first.
429         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
430         HAVE_DUP2.
431         * modules/dup2 (Depends-on): Add unistd.
432         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
433
434         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
435         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
436         REPLACE_CHOWN. Don't define chown as a macro here.
437         * modules/chown (Depends-on): Add unistd.
438         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
439
440         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
441         Add definition for GL_LINK_WARNING.
442         (chown, dup2): New declarations.
443         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
444         link warning.
445         (ftruncate): New declaration.
446         (getcwd): New declaration, taken from old getcwd.h.
447         (getlogin_r): New declaration, taken from old getlogin_r.h.
448         (readlink): New declaration.
449         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
450         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
451         (gl_PREREQ_UNISTD): Remove macro.
452         (gl_UNISTD_MODULE_INDICATOR): New macro.
453         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
454         many new variables. Don't set UNISTD_H.
455         * modules/unistd (Description): Change.
456         (Depends-on): Add link-warning.
457         (configure.ac): Update.
458         (Makefile.am): Create unistd.h always. Substitute many new variables
459         into it.
460
461 2007-02-18  Bruno Haible  <bruno@clisp.org>
462
463         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
464         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
465         HAVE_GETSUBOPT.
466         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
467         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
468         * lib/getsubopt.h: Remove file.
469         * modules/getsubopt (Files): Remove lib/getsubopt.h.
470         (Depends-on): Add stdlib.
471         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
472         (Includes): Use <stdlib.h> instead of getsubopt.h.
473         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
474         Set HAVE_GETSUBOPT.
475         * lib/getsubopt.c: Don't include getsubopt.h.
476
477 2007-02-18  Bruno Haible  <bruno@clisp.org>
478
479         * modules/fchdir (Depends-on): Add dup2.
480
481 2007-02-18  Bruno Haible  <bruno@clisp.org>
482
483         * lib/stdlib_.h: Handle glibc's special invocation convention
484         specially.
485
486 2007-02-18  Bruno Haible  <bruno@clisp.org>
487
488         * modules/stdlib-tests: New file.
489         * tests/test-stdlib.c: New file.
490
491         * modules/mkstemp (Files): Remove lib/mkstemp.h.
492         (Depends-on): Add stdlib.
493         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
494         (Includes): Use <stdlib.h> instead of mkstemp.h.
495         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
496         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
497         * lib/mkstemp.c: Don't include mkstemp.h.
498         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
499         * lib/stdlib--.h: Don't include mkstemp.h.
500
501         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
502         (Depends-on): Add stdlib.
503         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
504         (Includes): Use <stdlib.h> instead of mkdtemp.h.
505         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
506         HAVE_MKDTEMP.
507         * lib/mkdtemp.c: Don't include mkdtemp.h.
508         * lib/clean-temp.c: Don't include mkdtemp.h.
509
510         * modules/exit (Files): Remove lib/exit.h.
511         (Depends-on): Add stdlib.
512         (Makefile.am): Remove lib_SOURCES.
513         (Include): Use <stdlib.h> instead of exit.h.
514         * lib/argmatch.c: Don't include exit.h.
515         * lib/execute.c: Likewise.
516         * lib/pagealign_alloc.c: Likewise.
517         * lib/pipe.c: Likewise.
518         * lib/wait-process.c: Likewise.
519         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
520         * lib/exitfail.c: Likewise.
521         * lib/savewd.c: Likewise.
522         * lib/xsetenv.c: Likewise.
523
524         * modules/stdlib: New file.
525         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
526         and extra comments about mkstemp().
527         * lib/exit.h: Remove file.
528         * lib/mkdtemp.h: Remove file.
529         * lib/mkstemp.h: Remove file.
530         * m4/stdlib_h.m4: New file.
531         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
532
533 2007-02-18  Bruno Haible  <bruno@clisp.org>
534
535         * modules/math-tests: New file.
536         * tests/test-math.c: New file.
537
538         * modules/math: New file.
539         * modules/mathl (Files): Remove lib/mathl.h.
540         (Depends-on): Add math.
541         (Makefile.am): Don't mention mathl.h.
542         (Include): Use <math.h> instead of mathl.h.
543         * lib/math_.h: New file.
544         * lib/mathl.h: Remove file.
545         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
546         mathl.h.
547         * lib/asinl.c: Likewise.
548         * lib/atanl.c: Likewise.
549         * lib/ceill.c: Likewise.
550         * lib/cosl.c: Likewise.
551         * lib/expl.c: Likewise.
552         * lib/floorl.c: Likewise.
553         * lib/frexpl.c: Likewise.
554         * lib/ldexpl.c: Likewise.
555         * lib/logl.c: Likewise.
556         * lib/sincosl.c: Likewise.
557         * lib/sinl.c: Likewise.
558         * lib/sqrtl.c: Likewise.
559         * lib/tanl.c: Likewise.
560         * lib/trigl.c: Likewise.
561         * m4/math_h.m4: New file.
562         * MODULES.html.sh (Mathematics): Add math.
563
564 2007-02-17  Bruno Haible  <bruno@clisp.org>
565
566         * modules/wctype-tests: New file.
567         * tests/test-wctype.c: New file.
568
569         * modules/wchar-tests: New file.
570         * tests/test-wchar.c: New file.
571
572         * modules/unistd-tests: New file.
573         * tests/test-unistd.c: New file.
574
575         * modules/time-tests: New file.
576         * tests/test-time.c: New file.
577
578         * modules/sysexits-tests: New file.
579         * tests/test-sysexits.c: New file.
580
581         * modules/sys_time-tests: New file.
582         * tests/test-sys_time.c: New file.
583
584         * modules/sys_stat-tests: New file.
585         * tests/test-sys_stat.c: New file.
586
587         * modules/sys_socket-tests: New file.
588         * tests/test-sys_socket.c: New file.
589
590         * modules/sys_select-tests: New file.
591         * tests/test-sys_select.c: New file.
592
593         * modules/string-tests: New file.
594         * tests/test-string.c: New file.
595
596         * modules/stdbool-tests: New file.
597         * tests/test-stdbool.c: New file.
598
599         * modules/netinet_in-tests: New file.
600         * tests/test-netinet_in.c: New file.
601
602         * modules/inttypes-tests: New file.
603         * tests/test-inttypes.c: New file.
604
605         * modules/fcntl-tests: New file.
606         * tests/test-fcntl.c: New file.
607
608         * modules/byteswap-tests: New file.
609         * tests/test-byteswap.c: New file.
610
611         * modules/arpa_inet-tests: New file.
612         * tests/test-arpa_inet.c: New file.
613
614 2007-02-17  Bruno Haible  <bruno@clisp.org>
615
616         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
617         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
618         if the corresponding module is not enabled. Emit link warnings if
619         the function is used nevertheless.
620         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
621         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
622         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
623         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
624         * modules/inttypes (Depends-on): Add link-warning.
625         (Makefile.am): Copy the contents of build-aux/link-warning.h into
626         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
627         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
628         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
629         * modules/imaxdiv (configure.ac): Likewise.
630         * modules/strtoimax (configure.ac): Likewise.
631         * modules/strtoumax (configure.ac): Likewise.
632
633 2007-02-17  Bruno Haible  <bruno@clisp.org>
634
635         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
636         gl_STRING_MODULE_INDICATOR_DEFAULTS.
637         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
638         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
639
640 2007-02-17  Bruno Haible  <bruno@clisp.org>
641
642         * modules/link-warning: New file.
643         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
644         * lib/string_.h (GL_LINK_WARNING): Remove definition.
645         * modules/string (Depends-on): Add link-warning.
646         (Makefile.am): Copy the contents of build-aux/link-warning.h into
647         string.h.
648         * MODULES.html.sh (Support for building libraries and executables): Add
649         link-warning.
650
651 2007-02-17  Bruno Haible  <bruno@clisp.org>
652
653         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
654         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
655         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
656         long lines.
657
658 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
659             Bruno Haible  <bruno@clisp.org>
660
661         * modules/tmpfile: New file.
662         * lib/tmpfile.c: New file.
663         * m4/tmpfile.m4: New file.
664         * MODULES.html.sh (func_all_modules): New section "Input/output".
665
666 2007-02-15  Bruno Haible  <bruno@clisp.org>
667
668         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
669         (supports_delete_on_close): New function.
670         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
671
672 2007-02-14  Bruno Haible  <bruno@clisp.org>
673
674         * modules/mbspcasecmp-tests: New file.
675         * tests/test-mbspcasecmp.sh: New file.
676         * tests/test-mbspcasecmp.c: New file.
677
678         New module mbspcasecmp.
679         * modules/mbspcasecmp: New file.
680         * lib/mbspcasecmp.c: New file.
681         * lib/string_.h (strncasecmp): Change warning message.
682         (mbspcasecmp): New declaration.
683         * m4/mbspcasecmp.m4: New file.
684         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
685         GNULIB_MBSPCASECMP.
686         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
687         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
688
689 2007-02-14  Bruno Haible  <bruno@clisp.org>
690
691         * modules/mbsncasecmp-tests: New file.
692         * tests/test-mbsncasecmp.sh: New file.
693         * tests/test-mbsncasecmp.c: New file.
694
695         New module mbsncasecmp.
696         * modules/mbsncasecmp: New file.
697         * lib/mbsncasecmp.c: New file.
698         * lib/string_.h (mbsncasecmp): New declaration.
699         * m4/mbsncasecmp.m4: New file.
700         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
701         GNULIB_MBSNCASECMP.
702         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
703         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
704
705 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
706
707         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
708         Verify that it doesn't overlap with our flags.
709         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
710         do not have the desired effect in multibyte locales; instead, use
711         mbscasecmp.
712         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
713         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
714         we don't require GNU fnmatch ourselves (if our users require it, they
715         should do so explicitly).
716
717         Fix regex code so it doesn't rely on strcasecmp.
718         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
719         Otherwise, include gnulib's langinfo.h.
720         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
721         undesirable behavior in non-C locales.  Instead, rely on localecharset.
722         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
723         * modules/regex (FILES): Remove m4/codeset.m4.
724         (Depends-on): Add localcharset.  Remove strcase.
725
726 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
727
728         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
729         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
730
731 2007-02-13  Bruno Haible  <bruno@clisp.org>
732
733         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
734         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
735
736 2007-02-12  Bruno Haible  <bruno@clisp.org>
737
738         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
739         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
740         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
741         time warning rather than a link error.
742
743 2007-02-12  Bruno Haible  <bruno@clisp.org>
744
745         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
746         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
747         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
748
749 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
750
751         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
752         args, not 2.
753
754 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
755
756         New module 'time', so that apps can include <time.h> as per
757         POSIX and GNU instead of separate include files like time_r.h
758         and timegm.h.  This implementation tries out a simpler approach
759         for replacing decls in standard include files (as compared to
760         the string module), somewhat as an experiment.
761
762         * config/srclist.txt: Comment out mktime.c for now.
763         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
764         since it doesn't apply any more.  Use generic wording instead.
765         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
766         'time'.
767         * lib/time_.h, m4/time_h.m4, modules/time: New files.
768         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
769         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
770         Don't include <sys/types.h>; no longer needed since we assume C89.
771         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
772         * lib/strftime.c: Likewise.
773         * lib/time_r.c: Likewise.
774         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
775         * lib/nanosleep.c: Include <time.h> first, to check interface.
776         * lib/strptime.c: Likewise.
777         * lib/time_r.c: Likewise.
778         * lib/timegm.c: Likewise.
779         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
780         needed.
781         * lib/timegm.c: Don't include timegm.h; no longer needed.
782         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
783         time.h now handles any problems in that area.
784         (struct timespec, nanosleep): Remove; time.h now arranges for these.
785         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
786         that time.h defines struct timespec.
787         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
788         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
789         handles that.
790         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
791         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
792         needed.  Set REPLACE_LOCALTIME.
793         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
794         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
795         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
796         nanosleep; time_h.m4 now does that.  Don't require
797         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
798         module handles this now.
799         * modules/getdate (Depends-on): Remove timespec.  Add time.
800         * modules/nanosleep (Depends-on): Likewise.
801         * modules/stat-time (Depends-on): Likewise.
802         * modules/nanosleep (Include): Include time.h, not timespec.h.
803         * modules/strptime (Files): Remove lib/strptime.h.
804         (Depends-on): Add extensions, time.
805         (Include): Include time.h, not strptime.h.
806         * modules/time_r (Files): Remove lib/time_r.h.
807         (Depends-on): Add time.
808         (Include): Include time.h, not time_r.h.
809         * modules/timegm: Likewise.
810         * modules/timespec (Description): Now does timespec-related decls
811         of our own, instead of struct timespec itself.
812         (Depends-on): Add time; remove extensions.
813         (Maintainer): Add self.
814         * modules/utimecmp (Depends-on): Add time; remove timespec.
815         * modules/utimens (Depends-on): Likewise.
816         * modules/xnanosleep (Depends-on): Likewise.
817
818 2007-02-11  Bruno Haible  <bruno@clisp.org>
819
820         * lib/c-strstr.c: Include allocsa.h.
821         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
822         * lib/c-strcasestr.c: Include allocsa.h.
823         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
824         * lib/strcasestr.c: Include allocsa.h.
825         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
826         * lib/mbsstr.c: Include allocsa.h.
827         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
828         allocsa/freesa instead of malloc/free.
829         * lib/mbscasestr.c: Include allocsa.h.
830         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
831         allocsa/freesa instead of malloc/free.
832         * modules/c-strstr (Depends-on): Add allocsa.
833         * modules/c-strcasestr (Depends-on): Likewise.
834         * modules/strcasestr (Depends-on): Likewise.
835         * modules/mbsstr (Depends-on): Likewise.
836         * modules/mbscasestr (Depends-on): Likewise.
837
838 2007-02-11  Bruno Haible  <bruno@clisp.org>
839
840         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
841
842         * modules/mbsspn-tests: New file.
843         * tests/test-mbsspn.sh: New file.
844         * tests/test-mbsspn.c: New file.
845
846 2007-02-11  Bruno Haible  <bruno@clisp.org>
847
848         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
849
850         * modules/mbspbrk-tests: New file.
851         * tests/test-mbspbrk.sh: New file.
852         * tests/test-mbspbrk.c: New file.
853
854 2007-02-11  Bruno Haible  <bruno@clisp.org>
855
856         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
857         unneeded cast.
858
859         * modules/mbscspn-tests: New file.
860         * tests/test-mbscspn.sh: New file.
861         * tests/test-mbscspn.c: New file.
862
863 2007-02-11  Bruno Haible  <bruno@clisp.org>
864
865         * modules/mbscasecmp-tests: New file.
866         * tests/test-mbscasecmp.sh: New file.
867         * tests/test-mbscasecmp.c: New file.
868
869 2007-02-11  Bruno Haible  <bruno@clisp.org>
870
871         Ensure O(n) worst-case complexity of mbscasestr.
872         * lib/mbscasestr.c: Include stdbool.h.
873         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
874         functions.
875         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
876         the bookkeeping indicates that it's worth it.
877         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
878
879         * modules/mbscasestr-tests: New file.
880         * tests/test-mbscasestr1.c: New file.
881         * tests/test-mbscasestr2.sh: New file.
882         * tests/test-mbscasestr2.c: New file.
883         * tests/test-mbscasestr3.sh: New file.
884         * tests/test-mbscasestr3.c: New file.
885         * tests/test-mbscasestr4.sh: New file.
886         * tests/test-mbscasestr4.c: New file.
887         * m4/locale-tr.m4: New file.
888
889 2007-02-11  Bruno Haible  <bruno@clisp.org>
890
891         Ensure O(n) worst-case complexity of mbsstr.
892         * lib/mbsstr.c: Include stdbool.h.
893         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
894         functions.
895         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
896         bookkeeping indicates that it's worth it.
897         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
898
899         * modules/mbsstr-tests: New file.
900         * tests/test-mbsstr1.c: New file.
901         * tests/test-mbsstr2.sh: New file.
902         * tests/test-mbsstr2.c: New file.
903         * tests/test-mbsstr3.sh: New file.
904         * tests/test-mbsstr3.c: New file.
905         * m4/locale-fr.m4: New file.
906
907 2007-02-11  Bruno Haible  <bruno@clisp.org>
908
909         * lib/mbsrchr.c (mbsrchr): Fix bug.
910
911         * modules/mbsrchr-tests: New file.
912         * tests/test-mbsrchr.sh: New file.
913         * tests/test-mbsrchr.c: New file.
914
915 2007-02-11  Bruno Haible  <bruno@clisp.org>
916
917         * lib/mbschr.c (mbschr): Fix bug.
918
919         * modules/mbschr-tests: New file.
920         * tests/test-mbschr.sh: New file.
921         * tests/test-mbschr.c: New file.
922         * m4/locale-zh.m4: New file.
923
924 2007-02-11  Bruno Haible  <bruno@clisp.org>
925
926         Support for copying multibyte string iterators.
927         * lib/mbiter.h: Include <string.h>.
928         (mbiter_multi_copy): New function.
929         (mbi_copy): New macro.
930         * lib/mbuiter.h: Include <string.h>.
931         (mbuiter_multi_copy): New function.
932         (mbui_copy): New macro.
933
934 2007-02-11  Bruno Haible  <bruno@clisp.org>
935
936         New module mbslen.
937         * modules/mbslen: New file.
938         * lib/mbslen.c: New file.
939         * lib/string_.h (mbslen): New declaration.
940         * m4/mbslen.m4: New file.
941         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
942         GNULIB_MBSLEN.
943         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
944         * MODULES.html.sh (Internationalization functions): Add mbslen.
945
946 2007-02-11  Bruno Haible  <bruno@clisp.org>
947
948         Ensure O(n) worst-case complexity of strcasestr substitute.
949         * lib/strcasestr.c: Include stdbool.h.
950         (knuth_morris_pratt): New function.
951         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
952         bookkeeping indicates that it's worth it.
953         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
954
955         * modules/strcasestr-tests: New file.
956         * tests/test-strcasestr.c: New file.
957
958 2007-02-11  Bruno Haible  <bruno@clisp.org>
959
960         Ensure O(n) worst-case complexity of c_strcasestr.
961         * lib/c-strcasestr.c: Include stdbool.h, string.h.
962         (knuth_morris_pratt): New function.
963         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
964         the bookkeeping indicates that it's worth it.
965         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
966
967         * modules/c-strcasestr-tests: New file.
968         * tests/test-c-strcasestr.c: New file.
969
970 2007-02-11  Bruno Haible  <bruno@clisp.org>
971
972         Ensure O(n) worst-case complexity of c_strstr.
973         * lib/c-strstr.c: Include stdbool.h, string.h.
974         (knuth_morris_pratt): New function.
975         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
976         bookkeeping indicates that it's worth it.
977         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
978
979         * lib/c-strstr.c: Complete rewrite for maintainability.
980
981         * modules/c-strstr-tests: New file.
982         * tests/test-c-strstr.c: New file.
983
984 2007-02-11  Bruno Haible  <bruno@clisp.org>
985
986         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
987         5.2.1 and earlier, whereby \055 was treated just like the range
988         delimiter '-'.
989         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
990
991 2007-02-08  Bruno Haible  <bruno@clisp.org>
992
993         * modules/regex (Depends-on): Add stdbool.
994         Reported by Dalibor Topic <robilad@kaffe.org>.
995
996 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
997
998         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
999         Prefer returning from main to exiting from it.
1000         Remove unnecessary parens after sizeof.
1001
1002 2007-02-05  Bruno Haible  <bruno@clisp.org>
1003
1004         New module mbssep.
1005         * modules/mbssep: New file.
1006         * lib/mbssep.c: New file.
1007         * lib/string_.h (strsep): Add a conditional link warning.
1008         (mbssep): New declaration.
1009         * m4/mbssep.m4: New file.
1010         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1011         GNULIB_MBSSEP.
1012         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
1013         * MODULES.html.sh (Internationalization functions): Add mbssep.
1014
1015 2007-02-05  Bruno Haible  <bruno@clisp.org>
1016
1017         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
1018         Optimize search in case of 1 delimiter.
1019
1020 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1021
1022         * lib/acl.h: Include sys/types.h before sys/acl.h.
1023
1024 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1025
1026         Merge upstream fix for glibc bugzilla #3957:
1027
1028         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
1029
1030         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
1031         bit for RE_HAT_LISTS_NOT_NEWLINE.
1032         (build_charclass_op): Remove bogus comment.
1033
1034 2007-02-05  Simon Josefsson  <simon@josefsson.org>
1035
1036         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
1037
1038 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1039
1040         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
1041         * lib/memmem.c [!defined _LIBC]: Include config.h.
1042
1043 2007-02-04  Bruno Haible  <bruno@clisp.org>
1044
1045         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
1046         warning message.
1047
1048 2007-02-04  Bruno Haible  <bruno@clisp.org>
1049
1050         New module mbstok_r.
1051         * modules/mbstok_r: New file.
1052         * lib/mbstok_r.c: New file.
1053         * lib/string_.h (strtok_r): Change argument names to match the
1054         comments. Add a conditional link warning.
1055         (mbstok_r): New declaration.
1056         * m4/mbstok_r.m4: New file.
1057         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1058         GNULIB_MBSTOK_R.
1059         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
1060         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
1061
1062 2007-02-04  Bruno Haible  <bruno@clisp.org>
1063
1064         New module mbsspn.
1065         * modules/mbsspn: New file.
1066         * lib/mbsspn.c: New file.
1067         * lib/string_.h (strspn): Add a conditional link warning.
1068         (mbsspn): New declaration.
1069         * m4/mbsspn.m4: New file.
1070         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1071         GNULIB_MBSSPN.
1072         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
1073         * MODULES.html.sh (Internationalization functions): Add mbsspn.
1074
1075 2007-02-04  Bruno Haible  <bruno@clisp.org>
1076
1077         New module mbspbrk.
1078         * modules/mbspbrk: New file.
1079         * lib/mbspbrk.c: New file.
1080         * lib/string_.h (strpbrk): Add a conditional link warning.
1081         (mbspbrk): New declaration.
1082         * m4/mbspbrk.m4: New file.
1083         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1084         GNULIB_MBSPBRK.
1085         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
1086         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
1087
1088 2007-02-04  Bruno Haible  <bruno@clisp.org>
1089
1090         New module mbscspn.
1091         * modules/mbscspn: New file.
1092         * lib/mbscspn.c: New file.
1093         * lib/string_.h (strcspn): Add a conditional link warning.
1094         (mbscspn): New declaration.
1095         * m4/mbscspn.m4: New file.
1096         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1097         GNULIB_MBSCSPN.
1098         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
1099         * MODULES.html.sh (Internationalization functions): Add mbscspn.
1100
1101 2007-02-04  Bruno Haible  <bruno@clisp.org>
1102
1103         New module mbscasestr, reduced goal of strcasestr.
1104         * modules/mbscasestr: New file.
1105         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
1106         (mbscasestr): Renamed from strcasestr.
1107         * lib/strcasestr.c: Don't include mbuiter.h.
1108         (strcasestr): Remove support for multibyte locales.
1109         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
1110         Change the conditional link warning.
1111         (mbscasestr): New declaration.
1112         * m4/mbscasestr.m4: New file.
1113         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
1114         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
1115         REPLACE_STRCASESTR.
1116         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
1117         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
1118         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
1119         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
1120         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
1121         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
1122         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
1123         (Depends-on): Remove mbuiter.
1124         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
1125
1126 2007-02-04  Bruno Haible  <bruno@clisp.org>
1127
1128         Simplify handling of strncasecmp.
1129         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
1130         the conditional link warning.
1131         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
1132         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
1133         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
1134         * modules/strcase (configure.ac): Don't invoke
1135         gl_STRING_MODULE_INDICATOR.
1136         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
1137
1138 2007-02-04  Bruno Haible  <bruno@clisp.org>
1139
1140         New module mbscasecmp, reduced goal of strcasecmp.
1141         * modules/mbscasecmp: New file.
1142         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
1143         (mbscasecmp): Renamed from strcasecmp.
1144         * lib/strcasecmp.c: Don't include mbuiter.h.
1145         (strcasecmp): Remove support for multibyte locales.
1146         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
1147         Change the conditional link warning.
1148         (mbscasecmp): New declaration.
1149         * m4/mbscasecmp.m4: New file.
1150         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
1151         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
1152         REPLACE_STRCASECMP.
1153         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
1154         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1155         GNULIB_MBSCASECMP.
1156         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
1157         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
1158         * modules/strcase (Files): Remove m4/mbrtowc.m4.
1159         (Depends-on): Remove mbuiter.
1160         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
1161
1162 2007-02-04  Bruno Haible  <bruno@clisp.org>
1163
1164         New module mbsstr. Remove module strstr.
1165         * modules/mbsstr: New file.
1166         * modules/strstr: Remove file.
1167         * lib/mbsstr.c: Renamed from lib/strstr.c.
1168         (mbsstr): Renamed from strstr.
1169         * lib/string_.h (strstr): Remove declaration. Change the conditional
1170         link warning.
1171         (mbsstr): New declaration.
1172         * m4/mbsstr.m4: New file.
1173         * m4/strstr.m4: Remove file.
1174         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
1175         REPLACE_STRSTR.
1176         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
1177         Don't initialize GNULIB_STRSTR.
1178         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
1179         substitute GNULIB_STRSTR and REPLACE_STRSTR.
1180         * MODULES.html.sh (Internationalization functions): Add mbsstr.
1181         (Support for systems lacking ANSI C 89): Remove strstr.
1182
1183 2007-02-04  Bruno Haible  <bruno@clisp.org>
1184
1185         New module mbsrchr.
1186         * modules/mbsrchr: New file.
1187         * lib/mbsrchr.c: New file.
1188         * lib/string_.h (strrchr): Add a conditional link warning.
1189         (mbsrchr): New declaration.
1190         * m4/mbsrchr.m4: New file.
1191         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1192         GNULIB_MBSRCHR.
1193         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
1194         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
1195
1196 2007-02-04  Bruno Haible  <bruno@clisp.org>
1197
1198         New module mbschr.
1199         * modules/mbschr: New file.
1200         * lib/mbschr.c: New file.
1201         * lib/string_.h (strchr): Add a conditional link warning.
1202         (mbschr): New declaration.
1203         * m4/mbschr.m4: New file.
1204         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1205         GNULIB_MBSCHR.
1206         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
1207         * MODULES.html.sh (Internationalization functions): Add mbschr.
1208
1209 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1210
1211         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
1212
1213         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
1214
1215 2007-02-04  Bruno Haible  <bruno@clisp.org>
1216
1217         New module description section 'configure.ac-early'.
1218         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
1219         (func_get_autoconf_early_snippet): New function.
1220         (func_import, func_create_testdir): Use it. Remove special cases for
1221         modules 'extensions' and 'lock'.
1222         * modules/extensions (configure.ac-early): Require
1223         gl_USE_SYSTEM_EXTENSIONS.
1224         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
1225
1226 2007-02-04  Bruno Haible  <bruno@clisp.org>
1227
1228         Make use of gcj-4.3's -fsource and -ftarget option.
1229         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
1230         and if so try the options -fsource and -ftarget.
1231         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
1232         source_version, ftarget_option, target_version arguments.
1233         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
1234         (is_envjavac_oldgcj_14_14_usable): Renamed from
1235         is_envjavac_gcj_14_14_usable.
1236         (is_envjavac_oldgcj_14_13_usable): Renamed from
1237         is_envjavac_gcj_14_13_usable.
1238         (is_gcj_present): Update.
1239         (is_gcj_43, is_gcj43_usable): New functions.
1240         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
1241         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
1242         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
1243         try the options -fsource and -ftarget.
1244
1245 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
1246
1247         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
1248         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
1249         larger value.
1250
1251 2007-02-03  Jim Meyering  <jim@meyering.net>
1252
1253         Give tools a better chance to allocate space for very large buffers.
1254         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
1255
1256         Make pwd and readlink work also when run with an unreadable parent dir
1257         on systems with openat support.
1258         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
1259         provided getcwd function, even when we have openat support.
1260         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
1261
1262 2007-02-02  Bruno Haible  <bruno@clisp.org>
1263
1264         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1265         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
1266         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
1267         portability problems if one of these functions is only used on specific
1268         platforms.
1269         Reported by Paul Eggert.
1270
1271 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
1272
1273         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
1274         is causing more trouble than it's curing.
1275         * lib/regex_internal.h (__mempcpy): Remove.
1276         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
1277         (and make the code a tad smaller to boot).
1278         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
1279
1280 2007-02-02  Jim Meyering  <jim@meyering.net>
1281
1282         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
1283         section, not in the Makefile.am: one.
1284
1285 2007-02-02  Eric Blake  <ebb9@byu.net>
1286
1287         * lib/strchrnul.c: Always include config.h first.
1288
1289         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
1290         gnulib strstr is not necessary here.
1291
1292 2007-02-02  Simon Josefsson  <simon@josefsson.org>
1293
1294         * m4/socklen.m4: Fix typo.
1295
1296 2007-02-02  Eric Blake  <ebb9@byu.net>
1297
1298         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
1299         * modules/netinet_in (Makefile.am): Likewise.
1300
1301 2007-02-01  Bruno Haible  <bruno@clisp.org>
1302
1303         * lib/string_.h (GL_LINK_WARNING): New macro.
1304         (strcasecmp, strstr, strcasestr): If provided by the system,
1305         conditionally define as a macro that leads to a warning instead of to
1306         an error.
1307         (strncasecmp): Conditionally define as a macro that leads to a warning.
1308
1309 2007-02-01  Karl Berry  <karl@gnu.org>
1310
1311         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
1312
1313 2007-02-01  Bruno Haible  <bruno@clisp.org>
1314
1315         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
1316         renamings.
1317
1318 2007-02-01  Eric Blake  <ebb9@byu.net>
1319
1320         * modules/regex (Depends-on): Revert dependence on mempcpy.
1321         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
1322         module's definition of mempcpy.
1323         Reported by Paul Eggert.
1324
1325 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
1326
1327         * lib/string_.h: If the gnulib module XYZ is not present, undefine
1328         the symbol XYZ before redefining it.  This fixes a problem with
1329         programs that don't use XYZ, when compiled on systems that define
1330         XYZ to something else.
1331
1332 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
1333
1334         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
1335         occurs when "mkdir -m foo" creates a setgid directory that is (1)
1336         writeable to group or other and (2) is intended to have a special
1337         mode bit that is set or cleared.  In such a case, the directory
1338         should be neither group- nor other-writeable until the special
1339         mode bits are right.
1340
1341 2007-01-31  Eric Blake  <ebb9@byu.net>
1342
1343         * modules/mountlist (Depends-on): Add strstr.
1344
1345         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
1346         bug.
1347         * modules/string (Makefile.am): Remove redundant replacement.
1348         * modules/regex (Depends-on): Add mempcpy.
1349
1350 2007-01-31  Bruno Haible  <bruno@clisp.org>
1351
1352         New module description field 'Link'.
1353         * gnulib-tool (func_usage): Document --extract-link-directive.
1354         (sed_extract_prog): Recognize 'Link' directive.
1355         (func_get_link_directive): New function.
1356         (func_import): Show summary of link directives.
1357         Handle --extract-link-directive option.
1358         * modules/acl (Link): New section.
1359         * modules/clock-time (Link): New section.
1360         * modules/euidaccess (Link): New section.
1361         * modules/gettext (Link): New section.
1362         * modules/iconv (Link): New section.
1363         * modules/lock (Link): New section.
1364         * modules/nanosleep (Link): New section.
1365         * modules/readline (Link): New section.
1366
1367 2007-01-27  Bruno Haible  <bruno@clisp.org>
1368
1369         Enforce the use of gnulib modules for unportable <string.h> functions.
1370         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
1371         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
1372         (gl_HEADER_STRING_H_BODY): Require it.
1373         * lib/string_.h: If the gnulib module XYZ is not present, redefine
1374         the symbol XYZ to one that gives a link error.
1375         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
1376         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
1377         * modules/mempcpy (configure.ac): Likewise.
1378         * modules/memrchr (configure.ac): Likewise.
1379         * modules/stpcpy (configure.ac): Likewise.
1380         * modules/stpncpy (configure.ac): Likewise.
1381         * modules/strcase (configure.ac): Likewise.
1382         * modules/strcasestr (configure.ac): Likewise.
1383         * modules/strchrnul (configure.ac): Likewise.
1384         * modules/strdup (configure.ac): Likewise.
1385         * modules/strndup (configure.ac): Likewise.
1386         * modules/strnlen (configure.ac): Likewise.
1387         * modules/strpbrk (configure.ac): Likewise.
1388         * modules/strsep (configure.ac): Likewise.
1389         * modules/strstr (configure.ac): Likewise.
1390         * modules/strtok_r (configure.ac): Likewise.
1391
1392 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1393
1394         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1395
1396 2007-01-30  Jim Meyering  <jim@meyering.net>
1397
1398         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1399
1400 2007-01-29  Bruno Haible  <bruno@clisp.org>
1401
1402         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1403         * lib/execute.c: Likewise.
1404         * lib/pipe.c: Likewise.
1405         * lib/printf-args.h: Likewise.
1406         * lib/printf-args.c: Likewise.
1407         * lib/printf-parse.c: Likewise.
1408         * lib/vasnprintf.c: Likewise.
1409
1410 2007-01-29  Eric Blake  <ebb9@byu.net>
1411
1412         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1413         declaration.
1414
1415 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1416
1417         * lib/strptime.h (strptime): Use 'restrict' for args where
1418         POSIX requires this.
1419         * lib/strptime.c (strptime): Likewise.
1420         Change license notice from LGPL to GPL, since gnulib-tool will
1421         change this as needed.
1422         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1423         defined.
1424         Include "strptime.h" first, to check interface.
1425         Do not #undef _LIBC and _NL_CURRENT.
1426         Do not include <stdlib.h>; no longer needed.
1427         Include "time_r.h" and declare ptime_locale_status
1428         only if _LIBC is not defined.
1429         (__P): Remove unused macro.
1430         (match_string): Bring back glibc version, but use it only if _LIBC
1431         is defined.
1432         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1433         Remove unnecessary assertion and abort() call.
1434         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1435         * m4/strptime.m4: Fix serial number comment.
1436         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1437         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1438         (Depends-on): Add time_r.
1439
1440 2007-01-29  Bruno Haible  <bruno@clisp.org>
1441
1442         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1443         strptime.
1444         * modules/strptime (Depends-on): Add stdbool.
1445         * lib/strptime.h: Include <time.h> always. Add comments.
1446
1447 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1448
1449         * modules/strptime: New file.
1450         * lib/strptime.h: New file.
1451         * lib/strptime.c: New file.
1452         * m4/strptime.m4: New file.
1453
1454 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1455
1456         * MODULES.html.sh: New module mpsort.
1457         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1458
1459         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1460         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1461         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1462         All uses changed.
1463         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1464         All uses changed.
1465         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1466         to _Restrict_.
1467         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1468         the parameter matches the prototype.
1469
1470 2007-01-28  Jim Meyering  <jim@meyering.net>
1471
1472         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1473         sys/time.h here, reverting that part of the previous patch:
1474         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1475
1476 2007-01-28  Bruno Haible  <bruno@clisp.org>
1477
1478         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1479         value of $(SYS_TIME_H).
1480         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1481         remove it conditionally, too. [added by Jim Meyering]
1482         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1483         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1484         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1485         GETTIMEOFDAY_REPLACEMENT to 1.
1486
1487 2007-01-28  Bruno Haible  <bruno@clisp.org>
1488
1489         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1490         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1491         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1492         Set UNISTD_H instead of UNISTD_H2.
1493         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1494
1495 2007-01-28  Bruno Haible  <bruno@clisp.org>
1496
1497         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1498         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1499
1500 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1501
1502         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1503         (func_create_testdir): Ensure C locale for `grep' and `tr'
1504         character ranges.
1505         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1506         ACLOCAL_AMFLAGS parsing state machine.
1507
1508 2007-01-27  Bruno Haible  <bruno@clisp.org>
1509
1510         * modules/unistr/base: Update.
1511
1512 2007-01-27  Bruno Haible  <bruno@clisp.org>
1513
1514         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1515         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1516         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1517         modules/unistr/u32-mbtouc.
1518         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1519         * lib/unistr.h: Update.
1520         * lib/linebreak.c: Update.
1521         * modules/unistr/u32-mbtouc: Renamed from
1522         modules/unistr/u32-mbtouc-safe.
1523         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1524         * lib/unistr.h: Update.
1525         * lib/unistr/u32-to-u8.c: Update.
1526         * lib/unistr/u32-to-u16.c: Update.
1527
1528 2007-01-27  Bruno Haible  <bruno@clisp.org>
1529
1530         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1531         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1532         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1533         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1534         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1535         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1536         modules/unistr/u16-mbtouc.
1537         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1538         * lib/unistr.h: Update.
1539         * lib/linebreak.c: Update.
1540         * modules/linebreak: Update.
1541         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1542         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1543         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1544         * modules/unistr/u16-mbtouc: Renamed from
1545         modules/unistr/u16-mbtouc-safe.
1546         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1547         * lib/unistr.h: Update.
1548         * lib/unistr/u16-to-u8.c: Update.
1549         * modules/unistr/u16-to-u8: Update.
1550         * lib/unistr/u16-to-u32.c: Update.
1551         * modules/unistr/u16-to-u32: Update.
1552
1553 2007-01-27  Bruno Haible  <bruno@clisp.org>
1554
1555         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1556         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1557         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1558         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1559         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1560         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1561         modules/unistr/u8-mbtouc.
1562         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1563         * lib/unistr.h: Update.
1564         * lib/striconveh.c: Update.
1565         * modules/striconveh: Update.
1566         * lib/linebreak.c: Update.
1567         * modules/linebreak: Update.
1568         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1569         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1570         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1571         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1572         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1573         * lib/unistr.h: Update.
1574         * lib/striconveh.c: Update.
1575         * modules/striconveh: Update.
1576         * lib/unistr/u8-to-u16.c: Update.
1577         * modules/unistr/u8-to-u16: Update.
1578         * lib/unistr/u8-to-u32.c: Update.
1579         * modules/unistr/u8-to-u32: Update.
1580
1581 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1582
1583         Sync from Libtool.
1584         * lib/argz.c: Do not include strings.h nor memory.h, include
1585         string.h unconditionally.  Patch by Simon Josefsson.
1586
1587 2007-01-27  Bruno Haible  <bruno@clisp.org>
1588
1589         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1590         from gl_HEADER_STRING_H_BODY.
1591         (gl_HEADER_STRING_H_BODY): Require it.
1592         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1593         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1594         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1595         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1596         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1597         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1598         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1599         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1600         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1601         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1602         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1603         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1604         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1605         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1606         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1607
1608 2007-01-27  Bruno Haible  <bruno@clisp.org>
1609
1610         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1611         check_PROGRAMS into noinst_PROGRAMS.
1612         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1613         check_PROGRAMS in this case.
1614         (func_import): Set for_test to false.
1615         (func_create_testdir): Set for_test to true.
1616
1617 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1618             Bruno Haible  <bruno@clisp.org>
1619
1620         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1621         (Depends-on): Add string.
1622         (Includes): Use <string.h> instead of strcasestr.h.
1623         * modules/string (Makefile.am): Also substitute the value of
1624         REPLACE_STRCASESTR.
1625         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1626         assume strcasestr is declared in <string.h> not <strings.h>. Also
1627         set REPLACE_STRCASESTR.
1628         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1629         REPLACE_STRCASESTR.
1630         * lib/strcasestr.h: Remove file.
1631         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1632         * lib/string_.h (strcasestr): New declaration.
1633
1634 2007-01-27  Bruno Haible  <bruno@clisp.org>
1635
1636         * lib/string_.h: Use 'extern'.
1637
1638 2007-01-27  Jim Meyering  <jim@meyering.net>
1639
1640         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1641         of set-but-not-used local, "q".
1642
1643         * lib/mempcpy.c: Include <config.h> before <string.h>.
1644         This fixes a compilation error on HP-UX, due to the system's
1645         "restrict"-using mempcpy prototype.
1646
1647 2007-01-26  Bruno Haible  <bruno@clisp.org>
1648
1649         Small optimization.
1650         * lib/javacomp.c: Include c-strstr.h.
1651          (is_envjavac_gcj): Use c_strstr instead of strstr.
1652         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1653
1654 2007-01-26  Bruno Haible  <bruno@clisp.org>
1655
1656         * MODULES.html.sh (Unicode string functions): Add the new modules.
1657
1658         * modules/uniconv/u32-strconv-to-locale: New file.
1659         * lib/uniconv/u32-strconv-to-locale.c: New file.
1660
1661         * modules/uniconv/u16-strconv-to-locale: New file.
1662         * lib/uniconv/u16-strconv-to-locale.c: New file.
1663
1664         * modules/uniconv/u8-strconv-to-locale: New file.
1665         * lib/uniconv/u8-strconv-to-locale.c: New file.
1666
1667         * modules/uniconv/u32-strconv-from-locale: New file.
1668         * lib/uniconv/u32-strconv-from-locale.c: New file.
1669
1670         * modules/uniconv/u16-strconv-from-locale: New file.
1671         * lib/uniconv/u16-strconv-from-locale.c: New file.
1672
1673         * modules/uniconv/u8-strconv-from-locale: New file.
1674         * lib/uniconv/u8-strconv-from-locale.c: New file.
1675
1676         * modules/uniconv/u32-strconv-to-enc: New file.
1677         * lib/uniconv/u32-strconv-to-enc.c: New file.
1678         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1679         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1680
1681         * modules/uniconv/u16-strconv-to-enc: New file.
1682         * lib/uniconv/u16-strconv-to-enc.c: New file.
1683         * lib/uniconv/u-strconv-to-enc.h: New file.
1684         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1685         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1686
1687         * modules/uniconv/u8-strconv-to-enc: New file.
1688         * lib/uniconv/u8-strconv-to-enc.c: New file.
1689         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1690         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1691
1692         * modules/uniconv/u32-strconv-from-enc: New file.
1693         * lib/uniconv/u32-strconv-from-enc.c: New file.
1694         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1695         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1696
1697         * modules/uniconv/u16-strconv-from-enc: New file.
1698         * lib/uniconv/u16-strconv-from-enc.c: New file.
1699         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1700         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1701
1702         * modules/uniconv/u8-strconv-from-enc: New file.
1703         * lib/uniconv/u8-strconv-from-enc.c: New file.
1704         * lib/uniconv/u-strconv-from-enc.h: New file.
1705         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1706         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1707
1708         * modules/uniconv/u32-conv-from-enc: New file.
1709         * lib/uniconv/u32-conv-from-enc.c: New file.
1710         * modules/uniconv/u32-conv-from-enc-tests: New file.
1711         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1712
1713         * modules/uniconv/u16-conv-from-enc: New file.
1714         * lib/uniconv/u16-conv-from-enc.c: New file.
1715         * lib/uniconv/u-conv-from-enc.h: New file.
1716         * modules/uniconv/u16-conv-from-enc-tests: New file.
1717         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1718
1719         * modules/uniconv/u8-conv-from-enc: New file.
1720         * lib/uniconv/u8-conv-from-enc.c: New file.
1721         * modules/uniconv/u8-conv-from-enc-tests: New file.
1722         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1723
1724         * modules/uniconv/base: New file.
1725         * lib/uniconv.h: New file.
1726
1727 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1728
1729         * doc/gnulib-tool.texi (Initial import): Update to match current
1730         behavior with strdup module.
1731         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1732         * lib/memmem.h: Remove; all uses removed.  This is now done
1733         by <string.h>.
1734         * lib/mempcpy.h: Likewise.
1735         * lib/memrchr.h: Likewise.
1736         * lib/stpcpy.h: Likewise.
1737         * lib/stpncpy.h: Likewise.
1738         * lib/strcase.h: Likewise.
1739         * lib/strchrnul.h: Likewise.
1740         * lib/strdup.h: Likewise.
1741         * lib/strndup.h: Likewise.
1742         * lib/strnlen.h: Likewise.
1743         * lib/strpbrk.h: Likewise.
1744         * lib/strsep.h: Likewise.
1745         * lib/strstr.h: Likewise.
1746         * lib/strtok_r.h: Likewise.
1747         * lib/string_.h: New file.
1748         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1749         Rely on <string.h> instead.
1750         * lib/canon-host.c: Likewise.
1751         * lib/chdir-long.c: Likewise.
1752         * lib/concatpath.c: Likewise.
1753         * lib/exclude.c: Likewise.
1754         * lib/fchdir.c: Likewise.
1755         * lib/getaddrinfo.c: Likewise.
1756         * lib/getcwd.c: Likewise.
1757         * lib/getsubopt.c: Likewise.
1758         * lib/glob.c: Likewise.
1759         * lib/hard-locale.c: Likewise.
1760         * lib/iconvme.c: Likewise.
1761         * lib/javacomp.c: Likewise.
1762         * lib/mempcpy.c: Likewise.
1763         * lib/memrchr.c: Likewise.
1764         * lib/regex_internal.h: Likewise.
1765         * lib/stpncpy.c: Likewise.
1766         * lib/strcasecmp.c: Likewise.
1767         * lib/strchrnul.c: Likewise.
1768         * lib/strdup.c: Likewise.
1769         * lib/striconv.c: Likewise.
1770         * lib/striconveh.c: Likewise.
1771         * lib/striconveha.c: Likewise.
1772         * lib/strncasecmp.c: Likewise.
1773         * lib/strndup.c: Likewise.
1774         * lib/strnlen.c: Likewise.
1775         * lib/strsep.c: Likewise.
1776         * lib/strstr.c: Likewise.
1777         * lib/strtok_r.c: Likewise.
1778         * lib/userspec.c: Likewise.
1779         * lib/w32spawn.h: Likewise.
1780         * lib/xstrndup.c: Likewise.
1781         * lib/mountlist.c (strstr): Remove decl.
1782         * m4/string_h.m4: New file.
1783         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1784         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1785         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1786         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1787         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1788         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1789         Set REPLACE_STRCASECMP if necessary.
1790         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1791         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1792         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1793         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1794         HAVE_DECL_STRDUP if necessary.
1795         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1796         since gl_FUNC_STRNDUP does that now.
1797         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1798         Check for decl here...
1799         (gl_PREREQ_STRNLEN): ... not here.
1800         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1801         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1802         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1803         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1804         necessary.
1805         * modules/string: New file.
1806         * modules/memmem (Files): Remove special-purpose include file.
1807         (Depends-on): Add string.
1808         (Include): Include <string.h>, not the removed file.
1809         * modules/mempcpy: Likewise.
1810         * modules/memrchr: Likewise.
1811         * modules/stpcpy: Likewise.
1812         * modules/stpncpy: Likewise.
1813         * modules/strcase: Likewise.
1814         * modules/strchrnul: Likewise.
1815         * modules/strdup: Likewise.
1816         * modules/strndup: Likewise.
1817         * modules/strnlen: Likewise.
1818         * modules/strpbrk: Likewise.
1819         * modules/strsep: Likewise.
1820         * modules/strstr: Likewise.
1821         * modules/strtok_r: Likewise.
1822         * tests/test-dirname.c: Don't include "strdup.h", since
1823         <string.h> now suffices.
1824         * tests/test-memmem.c: Don't include "memmem.h", since
1825         <string.h> now suffices.
1826
1827 2007-01-25  Bruno Haible  <bruno@clisp.org>
1828
1829         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1830         *resultp is 0.
1831
1832         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1833         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1834         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1835         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1836
1837         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1838         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1839         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1840         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1841         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1842         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1843
1844 2007-01-24  Bruno Haible  <bruno@clisp.org>
1845
1846         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1847         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1848         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1849         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1850         gl_FUNC_FTS_CORE.
1851         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1852         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1853         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1854         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1855         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1856         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1857         gl_FUNC_FCHOWNAT.
1858         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1859         gl_FUNC_STRFTIME.
1860         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1861         Reported by Ralf Wildenhues.
1862
1863 2007-01-24  Bruno Haible  <bruno@clisp.org>
1864
1865         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1866         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1867         gl_GETADDRINFO.
1868         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1869         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1870         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1871
1872 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1873
1874         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1875         Don't use 'exit'; just return from 'main'.
1876         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1877
1878         * lib/fnmatch_.h: Readjust white space and comments to match
1879         glibc, to avoid spurious diffs.
1880
1881 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1882
1883         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1884         2004-12-01 change by Jakub Jelinek, since this code won't compile
1885         if !LIBC.  Problem reported by Bob Proulx.
1886
1887 2007-01-23  Bruno Haible  <bruno@clisp.org>
1888
1889         * lib/striconveh.c: Include c-strcaseeq.h.
1890         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1891         * modules/striconveh (Depends-on): Add c-strcaseeq.
1892
1893 2007-01-23  Bruno Haible  <bruno@clisp.org>
1894
1895         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1896
1897         * modules/c-strcaseeq: New file.
1898         * lib/c-strcaseeq.h: New file.
1899
1900         * modules/streq: New file.
1901         * lib/streq.h: New file.
1902
1903 2007-01-23  Bruno Haible  <bruno@clisp.org>
1904
1905         * modules/striconveha-tests: New file.
1906         * tests/test-striconveha.c: New file.
1907
1908         * lib/striconveha.h: Include <stdbool.h>.
1909         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1910         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1911         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1912         (mem_iconveha): New function.
1913         (str_iconveha_notranslit): Renamed from str_iconveha.
1914         (str_iconveha): New function.
1915         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
1916         c-strcase.
1917
1918 2007-01-23  Bruno Haible  <bruno@clisp.org>
1919
1920         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
1921         encodings without forgiving before trying any encoding with handler.
1922         (str_iconveha): Try all encodings without forgiving before trying any
1923         encoding with handler.
1924
1925 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1926
1927         Import the following changes from libc.
1928
1929         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
1930
1931         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
1932
1933         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1934
1935         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
1936         normal_bracket label.
1937
1938         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
1939
1940         [BZ #361]
1941         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
1942         to normal_bracket after fetching the next character.
1943
1944 2007-01-22  Bruno Haible  <bruno@clisp.org>
1945
1946         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
1947         argument.
1948         * lib/striconveh.c (iconv_carefully_1): New function.
1949         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
1950         argument.
1951         (str_cd_iconveh): Update.
1952         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
1953         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
1954         * tests/test-striconveh.c (MAGIC): New macro.
1955         (new_offsets): New function.
1956         (main): Test call with and without offsets.
1957
1958 2007-01-22  Bruno Haible  <bruno@clisp.org>
1959
1960         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
1961         * modules/sys_select (Makefile.am): Likewise.
1962         * modules/sys_socket (Makefile.am): Likewise.
1963         * modules/sys_time (Makefile.am): Likewise.
1964
1965 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1966
1967         * modules/gettimeofday (License): Change from GPL to LGPL, since
1968         gettimeofday is a library function.
1969
1970 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1971
1972         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1973
1974 2007-01-21  Bruno Haible  <bruno@clisp.org>
1975
1976         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1977
1978 2007-01-21  Bruno Haible  <bruno@clisp.org>
1979
1980         * modules/striconveha: New file.
1981         * lib/striconveha.h: New file.
1982         * lib/striconveha.c: New file.
1983         * MODULES.html.sh (Internationalization functions): Add striconveha.
1984         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1985         string.
1986         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1987
1988 2007-01-21  Bruno Haible  <bruno@clisp.org>
1989
1990         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1991         * lib/striconveh.c (str_iconveh): Likewise.
1992
1993 2007-01-21  Bruno Haible  <bruno@clisp.org>
1994
1995         * lib/striconveh.h (mem_iconveh): New declaration.
1996         * lib/striconveh.c (mem_iconveh): New function.
1997         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1998
1999 2007-01-21  Bruno Haible  <bruno@clisp.org>
2000
2001         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
2002
2003         * lib/striconveh.h (mem_cd_iconveh): Change specification.
2004         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
2005         original result buffer.
2006         (str_cd_iconveh): Update.
2007         * tests/test-striconveh.c (main): Update.
2008
2009         * lib/striconv.h (mem_cd_iconv): Change specification.
2010         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
2011         result buffer.
2012         (str_cd_iconv): Update.
2013         * tests/test-striconv.c (main): Update.
2014
2015 2007-01-21  Bruno Haible  <bruno@clisp.org>
2016
2017         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
2018
2019 2007-01-20  Jim Meyering  <jim@meyering.net>
2020
2021         * lib/userspec.c (parse_with_separator): If a user or group string
2022         starts with "+", skip the corresponding name-to-ID look-up, since
2023         such a look-up must fail: user and group names may not include "+".
2024
2025 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
2026
2027         * lib/poll.c: Include sys/time.h and time.h unconditionally,
2028         since we now assume the sys_time module.
2029         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
2030         check for sys/time.h; no longer needed.
2031         * modules/poll (Depends-on): Depend on sys_time.
2032
2033 2007-01-18  Bruno Haible  <bruno@clisp.org>
2034
2035         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
2036         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2037
2038         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
2039         gettimeofday.
2040
2041         * tests/test-gettimeofday.c: Include <time.h>.
2042         (dummy): Remove variable.
2043
2044         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
2045         gl_HEADER_SYS_TIME_H.
2046         (gl_HEADER_SYS_TIME_H): New macro.
2047
2048         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
2049         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2050         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
2051         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
2052         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2053         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
2054         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
2055         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2056         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
2057         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
2058         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2059
2060         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
2061         last change; it caused a compilation error when cross-compiling to
2062         Cygwin.
2063
2064 2007-01-18  Jim Meyering  <jim@meyering.net>
2065
2066         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
2067         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
2068         than the race-prone "test -d sys || mkdir sys".
2069         (configure.ac): Use AC_PROG_MKDIR_P.
2070         * modules/sys_select: Likewise.
2071         * modules/sys_socket: Likewise.
2072         * modules/sys_time: Likewise.
2073
2074 2007-01-18  Eric Blake  <ebb9@byu.net>
2075
2076         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
2077         replace gettimeofday.
2078         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
2079         name, to avoid infinite recursion.
2080
2081 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
2082
2083         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
2084         module sys_time.
2085         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
2086         assume timespec.h defines struct timeval.
2087         * lib/settime.c: Likewise.
2088         * lib/utimens.c: Likewise.
2089         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
2090         since we now assume the gettimeofday module.
2091         * lib/tempname.c (__gen_tempname): Likewise.
2092         * lib/gettimeofday.h: Remove.
2093         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
2094         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
2095         Include <time.h>, for 'time()'.
2096         (localtime_buffer_addr): Also use this workaround if
2097         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
2098         to simplify the uses.  All uses changed.
2099         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
2100         that #undef is inside {}, and 'const' follows type name consistently.
2101         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
2102         (gettimeofday): Do not use the maximum possible value for
2103         tv->tv_usec, since that might break usages other than ls.c.
2104         Instead, we'll leave ls.c alone.  This undoes today's patch
2105         by Bruno.  Add a compile-time warning for 1s-clock resolution;
2106         we've never observed the problem but might as well keep the
2107         canary.
2108         * lib/nanosleep.c: Include timespec.h first, for interface check.
2109         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
2110         now assume the sys_time module.
2111         * lib/tempname.c: Likewise.
2112         * lib/timespec.h: Likewise.
2113         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
2114         needed.
2115         * lib/strftime.c: Likewise.
2116         * lib/timespec.h: Likewise.
2117         * lib/posixtm.c: Include posixtm.h first, for interface check.
2118         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
2119         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
2120         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
2121         * lib/sys_time_.h: New file.
2122         * lib/timespec.h (struct timespec): Use long int, not long.
2123         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
2124         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
2125         Remove obsolescent call to AC_HEADER_TIME.
2126         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
2127         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
2128         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2129         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
2130         Likewise.
2131         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
2132         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
2133         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
2134         into the sys_time module.  Check for gettimeofday just once.
2135         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
2136         for gettimeofday signature to just check the signature.  Merely
2137         compile it, since linking doesn't test signature.  Improve test for
2138         whether gettimeofday.o is actually needed.
2139         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
2140         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
2141         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
2142         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2143         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
2144         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
2145         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
2146         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
2147         than worrying about sys/time.h.
2148         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2149         Don't bother worrying about TIME_WITH_SYS_TIME.
2150         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
2151         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
2152         * m4/sys_time_h.m4: New file.
2153         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
2154         Don't include sys/time.h.  Return from main rather than exiting.
2155         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
2156         all uses changed.
2157         * modules/gethrxtime (Depends-on): Add sys_time.
2158         * modules/gettime (Depends-on): Likewise.
2159         * modules/gettimeofday (Depends-on): Likewise.
2160         * modules/nanosleep (Depends-on): Likewise.
2161         * modules/settime (Depends-on): Likewise.
2162         * modules/tempname (Depends-on): Likewise.
2163         * modules/utimens (Depends-on): Likewise.
2164         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
2165         (Include:) Change back to <sys/time.h>.
2166         (Maintainer:) Add self.
2167         * modules/sys_time: New file.
2168         * modules/tempname (Depends-on): Add gettimeofday.
2169         * tests/test-gettimeofday.c: Include <sys/time.h>
2170         rather than gettimeofday.h.
2171
2172 2007-01-17  Bruno Haible  <bruno@clisp.org>
2173
2174         * gnulib-tool (func_get_license): Revert last patch. Instead, let
2175         the license default to GPL.
2176         (func_create_testdir): Don't complain if a module is LGPL and its
2177         tests module depends on GPLed modules.
2178
2179 2007-01-17  Bruno Haible  <bruno@clisp.org>
2180
2181         * lib/gettimeofday.c (gettimeofday): Add code for the case
2182         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
2183         maximum possible value for tv->tv_usec, rather than the minimum one.
2184
2185 2005-10-08  Martin Lambers  <marlam@marlam.de>
2186 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2187 2007-01-16  Bruno Haible  <bruno@clisp.org>
2188
2189         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
2190         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
2191         gl_FUNC_GETTIMEOFDAY.
2192         (Include): Add gettimeofday.h.
2193         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
2194         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
2195         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
2196         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
2197         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
2198         * lib/gettimeofday.h: New file.
2199         * lib/gettimeofday.c: Include <sys/timeb.h>.
2200         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
2201         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2202         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
2203         fall back on time().
2204
2205         * tests/test-gettimeofday.c: New file.
2206         * modules/gettimeofday-tests: New file.
2207
2208 2007-01-16  Eric Blake  <ebb9@byu.net>
2209
2210         * modules/fnmatch (Depends-on): Depend on wchar.
2211         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
2212         * m4/fnmatch.m4: Likewise.
2213         * modules/mbchar (Makefile.am): Assume <wchar.h>.
2214         * m4/mbchar.m4: Likewise.
2215         * modules/mbswidth (Depends-on): Depend on wchar.
2216         * lib/mbswidth.c: Assume <wchar.h>.
2217         * m4/mbswidth.m4: Likewise.
2218         * modules/quotearg (Depends-on): Depend on wchar.
2219         * lib/quotearg.c: Assume <wchar.h>.
2220         * m4/quotearg.m4: Likewise.
2221         * modules/regex (Depends-on): Depend on wchar.
2222         * lib/regex_internal.h: Assume <wchar.h>.
2223         * m4/regex.m4: Likewise.
2224         * modules/stdint (Depends-on): Depend on wchar.
2225         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
2226         * m4/stdint.m4: Likewise.
2227         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
2228         * modules/strftime (Depends-on): Depend on wchar.
2229         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
2230         * modules/strtol (Depends-on): Depend on wchar.
2231         * lib/strtol.c: Assume <wchar.h>.
2232         * modules/wcwidth (Depends-on): Depend on wchar.
2233         * lib/wcwidth.h: Assume <wchar.h>.
2234         * m4/wcwidth.m4: Likewise.
2235
2236 2007-01-16  Bruno Haible  <bruno@clisp.org>
2237
2238         * modules/csharpexec-script: New, created from...
2239         * modules/csharpexec: ... this.
2240
2241 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
2242
2243         * modules/javaexec-script: New, created from...
2244         * modules/javaexec: ... this.
2245
2246 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2247
2248         * modules/poll (Dependencies): Add sys_select.
2249
2250 2007-01-15  Jim Meyering  <jim@meyering.net>
2251
2252         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
2253         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
2254         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
2255         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
2256
2257 2007-01-15  Bruno Haible  <bruno@clisp.org>
2258
2259         * modules/striconveh: New file.
2260         * lib/striconveh.h: New file.
2261         * lib/striconveh.c: New file.
2262         * MODULES.html.sh (Internationalization functions): Add striconveh.
2263
2264         * modules/striconveh-tests: New file.
2265         * tests/test-striconveh.c: New file.
2266
2267 2007-01-15  Bruno Haible  <bruno@clisp.org>
2268
2269         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
2270         not from GNU libiconv or GNU libc.
2271
2272 2007-01-15  Bruno Haible  <bruno@clisp.org>
2273
2274         * doc/gnulib-intro.texi (Copyright): Explain the different license
2275         terms for module descriptions, autoconf macros, tests, documentation.
2276
2277 2007-01-14  Bruno Haible  <bruno@clisp.org>
2278
2279         * modules/striconv-tests: New file.
2280         * tests/test-striconv.c: New file.
2281
2282 2007-01-14  Bruno Haible  <bruno@clisp.org>
2283
2284         * modules/iconv-tests: New file.
2285         * tests/test-iconv.c: New file.
2286
2287 2007-01-14  Bruno Haible  <bruno@clisp.org>
2288
2289         * gnulib-tool (func_get_license): For test modules, use the license of
2290         the main module.
2291
2292 2007-01-14  Bruno Haible  <bruno@clisp.org>
2293
2294         * modules/iconv (Include): Clarify that <iconv.h> can only be included
2295         if iconv is found to exist.
2296
2297 2007-01-14  Bruno Haible  <bruno@clisp.org>
2298
2299         * modules/c-ctype-tests: New file.
2300         * tests/test-c-ctype.c: New file.
2301
2302 2007-01-14  Bruno Haible  <bruno@clisp.org>
2303
2304         * modules/binary-io-tests: New file.
2305         * tests/test-binary-io.sh: New file.
2306         * tests/test-binary-io.c: New file.
2307
2308 2007-01-14  Bruno Haible  <bruno@clisp.org>
2309
2310         * modules/array-oset-tests: New file.
2311         * tests/test-array_oset.c: New file.
2312
2313 2007-01-14  Bruno Haible  <bruno@clisp.org>
2314
2315         * modules/array-list-tests: New file.
2316         * tests/test-array_list.c: New file.
2317
2318 2007-01-14  Bruno Haible  <bruno@clisp.org>
2319
2320         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
2321         and make.
2322         Reported by Simon Josefsson in
2323         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
2324
2325 2007-01-14  Bruno Haible  <bruno@clisp.org>
2326
2327         * modules/allocsa-tests: New file.
2328         * tests/test-allocsa.c: New file.
2329
2330 2007-01-14  Bruno Haible  <bruno@clisp.org>
2331
2332         * modules/fchdir (Depends-on): Add absolute-header.
2333         * modules/unistd (Depends-on): Likewise.
2334
2335 2006-12-30  Bruno Haible  <bruno@clisp.org>
2336
2337         * modules/fchdir: New file.
2338         * modules/unistd (Files): Add lib/unistd_.h.
2339         (Makefile.am): Generate unistd.h from unistd_.h.
2340         * lib/fchdir.c: New file.
2341         * lib/dirent_.h: New file.
2342         * lib/unistd_.h: New file.
2343         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
2344         * m4/fchdir.m4: New file.
2345         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
2346         (gl_HEADER_UNISTD): Invoke it.
2347         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
2348         function.
2349         * lib/backupfile.c (opendir, closedir): Undefine.
2350         * lib/chown.c (open, close): Undefine.
2351         * lib/clean-temp.c (open, close): Undefine.
2352         * lib/copy-file.c (open, close): Undefine.
2353         * lib/execute.c (open, close): Undefine.
2354         * lib/fsusage.c (open, close): Undefine.
2355         * lib/gc-gnulib.c (open, close): Undefine.
2356         * lib/getcwd.c (opendir, closedir): Undefine.
2357         * lib/glob.c (opendir, closedir): Undefine.
2358         * lib/javacomp.c (open, close): Undefine.
2359         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
2360         * lib/openat-proc.c (open, close): Undefine.
2361         * lib/pagealign_alloc.c (open, close): Undefine.
2362         * lib/pipe.c (open, close): Undefine.
2363         * lib/progreloc.c (open, close): Undefine.
2364         * lib/savedir.c (opendir, closedir): Undefine.
2365         * lib/utime.c (open, close): Undefine.
2366         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
2367
2368 2007-01-10  Bruno Haible  <bruno@clisp.org>
2369
2370         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
2371
2372 2007-01-12  Eric Blake  <ebb9@byu.net>
2373
2374         Provide a robust <wchar.h>.  Further simplifications are now
2375         possible in other modules, but not included here.
2376         * modules/wchar: New module.
2377         * m4/wchar.m4: New file.
2378         * lib/wchar_.h: Likewise.
2379         * modules/mbchar (Depends-on): Depend on wchar, as the first use
2380         of the new module.
2381         * MODULES.html.sh (Extended multibyte and wide character utilities):
2382         New section.
2383
2384 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2385
2386         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2387         to a reasonable default for memory allocation.
2388         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2389         file system that reports garbage st_size values for symlinks.
2390         Problem reported by Liyang Hu.
2391
2392 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2393
2394         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2395         Emacs .#* auto-save files).
2396
2397 2007-01-11  Bruno Haible  <bruno@clisp.org>
2398
2399         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2400         directory.
2401
2402 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2403
2404         Use @...@ consistently in lib/wctype_.h.
2405         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2406         on it being set to 1 or 0.
2407         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2408         go back to AC_SUBSTing it.
2409         * modules/wctype (Makefile.am): Undo previous change.
2410
2411 2007-01-10  Eric Blake  <ebb9@byu.net>
2412
2413         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2414         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2415         * modules/wctype (Makefile.am): Likewise.
2416         Reported by Chris McGuire.
2417
2418 2007-01-10  Jim Meyering  <jim@meyering.net>
2419
2420         fts.c: a small readability/maintainability improvement
2421         * lib/fts.c (fts_read): Make this code slightly more readable and
2422         maintainable by hoisting the "sp->fts_cur = p" assignments to
2423         immediately follow the statements that set P.  Derived from
2424         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2425
2426 2007-01-10  Eric Blake  <ebb9@byu.net>
2427
2428         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2429         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2430         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2431         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2432         Reported by Chris McGuire.
2433
2434 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2435
2436         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2437         in sed script.
2438
2439 2007-01-09  Bruno Haible  <bruno@clisp.org>
2440
2441         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2442         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2443         variables.
2444         (func_module): Use them.
2445
2446 2007-01-09  Bruno Haible  <bruno@clisp.org>
2447
2448         * modules/unistr/base: New file.
2449         * lib/unistr.h: New file.
2450
2451         * modules/unistr/u8-to-u16: New file.
2452         * lib/unistr/u8-to-u16.c: New file.
2453
2454         * modules/unistr/u8-to-u32: New file.
2455         * lib/unistr/u8-to-u32.c: New file.
2456
2457         * modules/unistr/u16-to-u8: New file.
2458         * lib/unistr/u16-to-u8.c: New file.
2459
2460         * modules/unistr/u16-to-u32: New file.
2461         * lib/unistr/u16-to-u32.c: New file.
2462
2463         * modules/unistr/u32-to-u8: New file.
2464         * lib/unistr/u32-to-u8.c: New file.
2465
2466         * modules/unistr/u32-to-u16: New file.
2467         * lib/unistr/u32-to-u16.c: New file.
2468
2469         * modules/unistr/u8-check: New file.
2470         * modules/unistr/u16-check: New file.
2471         * modules/unistr/u32-check: New file.
2472         * lib/unistr/u8-check.c: New file.
2473         * lib/unistr/u16-check.c: New file.
2474         * lib/unistr/u32-check.c: New file.
2475
2476         * modules/unistr/u8-chr: New file.
2477         * modules/unistr/u16-chr: New file.
2478         * modules/unistr/u32-chr: New file.
2479         * lib/unistr/u8-chr.c: New file.
2480         * lib/unistr/u16-chr.c: New file.
2481         * lib/unistr/u32-chr.c: New file.
2482
2483         * modules/unistr/u8-cmp: New file.
2484         * modules/unistr/u16-cmp: New file.
2485         * modules/unistr/u32-cmp: New file.
2486         * lib/unistr/u8-cmp.c: New file.
2487         * lib/unistr/u16-cmp.c: New file.
2488         * lib/unistr/u32-cmp.c: New file.
2489
2490         * modules/unistr/u8-cpy: New file.
2491         * modules/unistr/u16-cpy: New file.
2492         * modules/unistr/u32-cpy: New file.
2493         * lib/unistr/u8-cpy.c: New file.
2494         * lib/unistr/u16-cpy.c: New file.
2495         * lib/unistr/u32-cpy.c: New file.
2496         * lib/unistr/u-cpy.h: New file.
2497
2498         * modules/unistr/u8-cpy-alloc: New file.
2499         * modules/unistr/u16-cpy-alloc: New file.
2500         * modules/unistr/u32-cpy-alloc: New file.
2501         * lib/unistr/u8-cpy-alloc.c: New file.
2502         * lib/unistr/u16-cpy-alloc.c: New file.
2503         * lib/unistr/u32-cpy-alloc.c: New file.
2504         * lib/unistr/u-cpy-alloc.h: New file.
2505
2506         * modules/unistr/u8-endswith: New file.
2507         * modules/unistr/u16-endswith: New file.
2508         * modules/unistr/u32-endswith: New file.
2509         * lib/unistr/u8-endswith.c: New file.
2510         * lib/unistr/u16-endswith.c: New file.
2511         * lib/unistr/u32-endswith.c: New file.
2512         * lib/unistr/u-endswith.h: New file.
2513
2514         * modules/unistr/u8-mblen: New file.
2515         * modules/unistr/u16-mblen: New file.
2516         * modules/unistr/u32-mblen: New file.
2517         * lib/unistr/u8-mblen.c: New file.
2518         * lib/unistr/u16-mblen.c: New file.
2519         * lib/unistr/u32-mblen.c: New file.
2520
2521         * modules/unistr/u8-mbtouc: New file.
2522         * modules/unistr/u16-mbtouc: New file.
2523         * modules/unistr/u32-mbtouc: New file.
2524         * lib/unistr/u8-mbtouc.c: New file.
2525         * lib/unistr/u16-mbtouc.c: New file.
2526         * lib/unistr/u32-mbtouc.c: New file.
2527
2528         * modules/unistr/u8-mbtouc-safe: New file.
2529         * modules/unistr/u16-mbtouc-safe: New file.
2530         * modules/unistr/u32-mbtouc-safe: New file.
2531         * lib/unistr/u8-mbtouc-safe.c: New file.
2532         * lib/unistr/u16-mbtouc-safe.c: New file.
2533         * lib/unistr/u32-mbtouc-safe.c: New file.
2534
2535         * modules/unistr/u8-move: New file.
2536         * modules/unistr/u16-move: New file.
2537         * modules/unistr/u32-move: New file.
2538         * lib/unistr/u8-move.c: New file.
2539         * lib/unistr/u16-move.c: New file.
2540         * lib/unistr/u32-move.c: New file.
2541         * lib/unistr/u-move.h: New file.
2542
2543         * modules/unistr/u8-next: New file.
2544         * modules/unistr/u16-next: New file.
2545         * modules/unistr/u32-next: New file.
2546         * lib/unistr/u8-next.c: New file.
2547         * lib/unistr/u16-next.c: New file.
2548         * lib/unistr/u32-next.c: New file.
2549
2550         * modules/unistr/u8-prev: New file.
2551         * modules/unistr/u16-prev: New file.
2552         * modules/unistr/u32-prev: New file.
2553         * lib/unistr/u8-prev.c: New file.
2554         * lib/unistr/u16-prev.c: New file.
2555         * lib/unistr/u32-prev.c: New file.
2556
2557         * modules/unistr/u8-set: New file.
2558         * modules/unistr/u16-set: New file.
2559         * modules/unistr/u32-set: New file.
2560         * lib/unistr/u8-set.c: New file.
2561         * lib/unistr/u16-set.c: New file.
2562         * lib/unistr/u32-set.c: New file.
2563         * lib/unistr/u-set.h: New file.
2564
2565         * modules/unistr/u8-startswith: New file.
2566         * modules/unistr/u16-startswith: New file.
2567         * modules/unistr/u32-startswith: New file.
2568         * lib/unistr/u8-startswith.c: New file.
2569         * lib/unistr/u16-startswith.c: New file.
2570         * lib/unistr/u32-startswith.c: New file.
2571         * lib/unistr/u-startswith.h: New file.
2572
2573         * modules/unistr/u8-stpcpy: New file.
2574         * modules/unistr/u16-stpcpy: New file.
2575         * modules/unistr/u32-stpcpy: New file.
2576         * lib/unistr/u8-stpcpy.c: New file.
2577         * lib/unistr/u16-stpcpy.c: New file.
2578         * lib/unistr/u32-stpcpy.c: New file.
2579         * lib/unistr/u-stpcpy.h: New file.
2580
2581         * modules/unistr/u8-stpncpy: New file.
2582         * modules/unistr/u16-stpncpy: New file.
2583         * modules/unistr/u32-stpncpy: New file.
2584         * lib/unistr/u8-stpncpy.c: New file.
2585         * lib/unistr/u16-stpncpy.c: New file.
2586         * lib/unistr/u32-stpncpy.c: New file.
2587         * lib/unistr/u-stpncpy.h: New file.
2588
2589         * modules/unistr/u8-strcat: New file.
2590         * modules/unistr/u16-strcat: New file.
2591         * modules/unistr/u32-strcat: New file.
2592         * lib/unistr/u8-strcat.c: New file.
2593         * lib/unistr/u16-strcat.c: New file.
2594         * lib/unistr/u32-strcat.c: New file.
2595         * lib/unistr/u-strcat.h: New file.
2596
2597         * modules/unistr/u8-strchr: New file.
2598         * modules/unistr/u16-strchr: New file.
2599         * modules/unistr/u32-strchr: New file.
2600         * lib/unistr/u8-strchr.c: New file.
2601         * lib/unistr/u16-strchr.c: New file.
2602         * lib/unistr/u32-strchr.c: New file.
2603
2604         * modules/unistr/u8-strcmp: New file.
2605         * modules/unistr/u16-strcmp: New file.
2606         * modules/unistr/u32-strcmp: New file.
2607         * lib/unistr/u8-strcmp.c: New file.
2608         * lib/unistr/u16-strcmp.c: New file.
2609         * lib/unistr/u32-strcmp.c: New file.
2610
2611         * modules/unistr/u8-strcpy: New file.
2612         * modules/unistr/u16-strcpy: New file.
2613         * modules/unistr/u32-strcpy: New file.
2614         * lib/unistr/u8-strcpy.c: New file.
2615         * lib/unistr/u16-strcpy.c: New file.
2616         * lib/unistr/u32-strcpy.c: New file.
2617         * lib/unistr/u-strcpy.h: New file.
2618
2619         * modules/unistr/u8-strcspn: New file.
2620         * modules/unistr/u16-strcspn: New file.
2621         * modules/unistr/u32-strcspn: New file.
2622         * lib/unistr/u8-strcspn.c: New file.
2623         * lib/unistr/u16-strcspn.c: New file.
2624         * lib/unistr/u32-strcspn.c: New file.
2625         * lib/unistr/u-strcspn.h: New file.
2626
2627         * modules/unistr/u8-strdup: New file.
2628         * modules/unistr/u16-strdup: New file.
2629         * modules/unistr/u32-strdup: New file.
2630         * lib/unistr/u8-strdup.c: New file.
2631         * lib/unistr/u16-strdup.c: New file.
2632         * lib/unistr/u32-strdup.c: New file.
2633         * lib/unistr/u-strdup.h: New file.
2634
2635         * modules/unistr/u8-strlen: New file.
2636         * modules/unistr/u16-strlen: New file.
2637         * modules/unistr/u32-strlen: New file.
2638         * lib/unistr/u8-strlen.c: New file.
2639         * lib/unistr/u16-strlen.c: New file.
2640         * lib/unistr/u32-strlen.c: New file.
2641         * lib/unistr/u-strlen.h: New file.
2642
2643         * modules/unistr/u8-strmblen: New file.
2644         * modules/unistr/u16-strmblen: New file.
2645         * modules/unistr/u32-strmblen: New file.
2646         * lib/unistr/u8-strmblen.c: New file.
2647         * lib/unistr/u16-strmblen.c: New file.
2648         * lib/unistr/u32-strmblen.c: New file.
2649
2650         * modules/unistr/u8-strmbtouc: New file.
2651         * modules/unistr/u16-strmbtouc: New file.
2652         * modules/unistr/u32-strmbtouc: New file.
2653         * lib/unistr/u8-strmbtouc.c: New file.
2654         * lib/unistr/u16-strmbtouc.c: New file.
2655         * lib/unistr/u32-strmbtouc.c: New file.
2656
2657         * modules/unistr/u8-strncat: New file.
2658         * modules/unistr/u16-strncat: New file.
2659         * modules/unistr/u32-strncat: New file.
2660         * lib/unistr/u8-strncat.c: New file.
2661         * lib/unistr/u16-strncat.c: New file.
2662         * lib/unistr/u32-strncat.c: New file.
2663         * lib/unistr/u-strncat.h: New file.
2664
2665         * modules/unistr/u8-strncmp: New file.
2666         * modules/unistr/u16-strncmp: New file.
2667         * modules/unistr/u32-strncmp: New file.
2668         * lib/unistr/u8-strncmp.c: New file.
2669         * lib/unistr/u16-strncmp.c: New file.
2670         * lib/unistr/u32-strncmp.c: New file.
2671
2672         * modules/unistr/u8-strncpy: New file.
2673         * modules/unistr/u16-strncpy: New file.
2674         * modules/unistr/u32-strncpy: New file.
2675         * lib/unistr/u8-strncpy.c: New file.
2676         * lib/unistr/u16-strncpy.c: New file.
2677         * lib/unistr/u32-strncpy.c: New file.
2678         * lib/unistr/u-strncpy.h: New file.
2679
2680         * modules/unistr/u8-strnlen: New file.
2681         * modules/unistr/u16-strnlen: New file.
2682         * modules/unistr/u32-strnlen: New file.
2683         * lib/unistr/u8-strnlen.c: New file.
2684         * lib/unistr/u16-strnlen.c: New file.
2685         * lib/unistr/u32-strnlen.c: New file.
2686         * lib/unistr/u-strnlen.h: New file.
2687
2688         * modules/unistr/u8-strpbrk: New file.
2689         * modules/unistr/u16-strpbrk: New file.
2690         * modules/unistr/u32-strpbrk: New file.
2691         * lib/unistr/u8-strpbrk.c: New file.
2692         * lib/unistr/u16-strpbrk.c: New file.
2693         * lib/unistr/u32-strpbrk.c: New file.
2694         * lib/unistr/u-strpbrk.h: New file.
2695
2696         * modules/unistr/u8-strrchr: New file.
2697         * modules/unistr/u16-strrchr: New file.
2698         * modules/unistr/u32-strrchr: New file.
2699         * lib/unistr/u8-strrchr.c: New file.
2700         * lib/unistr/u16-strrchr.c: New file.
2701         * lib/unistr/u32-strrchr.c: New file.
2702
2703         * modules/unistr/u8-strspn: New file.
2704         * modules/unistr/u16-strspn: New file.
2705         * modules/unistr/u32-strspn: New file.
2706         * lib/unistr/u8-strspn.c: New file.
2707         * lib/unistr/u16-strspn.c: New file.
2708         * lib/unistr/u32-strspn.c: New file.
2709         * lib/unistr/u-strspn.h: New file.
2710
2711         * modules/unistr/u8-strstr: New file.
2712         * modules/unistr/u16-strstr: New file.
2713         * modules/unistr/u32-strstr: New file.
2714         * lib/unistr/u8-strstr.c: New file.
2715         * lib/unistr/u16-strstr.c: New file.
2716         * lib/unistr/u32-strstr.c: New file.
2717         * lib/unistr/u-strstr.h: New file.
2718
2719         * modules/unistr/u8-strtok: New file.
2720         * modules/unistr/u16-strtok: New file.
2721         * modules/unistr/u32-strtok: New file.
2722         * lib/unistr/u8-strtok.c: New file.
2723         * lib/unistr/u16-strtok.c: New file.
2724         * lib/unistr/u32-strtok.c: New file.
2725         * lib/unistr/u-strtok.h: New file.
2726
2727         * modules/unistr/u8-uctomb: New file.
2728         * modules/unistr/u16-uctomb: New file.
2729         * modules/unistr/u32-uctomb: New file.
2730         * lib/unistr/u8-uctomb.c: New file.
2731         * lib/unistr/u16-uctomb.c: New file.
2732         * lib/unistr/u32-uctomb.c: New file.
2733
2734         * MODULES.html.sh (Unicode string functions): Add the new modules.
2735
2736 2007-01-08  Bruno Haible  <bruno@clisp.org>
2737
2738         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2739         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2740         subdirectories.
2741
2742 2007-01-08  Karl Berry  <karl@gnu.org>
2743
2744         * doc/error.texi: mention that main() fns must set program_name
2745         when progname is used.
2746
2747 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2748
2749         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2750         WCTYPE_H is empty, for the benefit of builds from non-distclean
2751         directories.  Problem reported by Eric Blake in
2752         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2753
2754 2007-01-08  Bruno Haible  <bruno@clisp.org>
2755
2756         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2757         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2758         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2759         PROVIDE_CANONICALIZE_FILENAME_MODE.
2760         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2761
2762 2007-01-08  Bruno Haible  <bruno@clisp.org>
2763
2764         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2765         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2766         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2767         * lib/fts.c: Likewise.
2768         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2769
2770 2006-12-25  Bruno Haible  <bruno@clisp.org>
2771
2772         * modules/utf8-ucs4-safe: New file.
2773         * lib/utf8-ucs4-safe.h: New file.
2774         * lib/unistr/utf8-ucs4-safe.c: New file.
2775
2776         * modules/utf16-ucs4-safe: New file.
2777         * lib/utf16-ucs4-safe.h: New file.
2778         * lib/unistr/utf16-ucs4-safe.c: New file.
2779
2780         * MODULES.html.sh (Unicode string functions): Add the new modules.
2781
2782 2007-01-08  Bruno Haible  <bruno@clisp.org>
2783
2784         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2785         (Depends-on): Add unitypes.
2786         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2787         (u8_mbtouc_aux): Move out to separate file.
2788         (u8_mbtouc): Use ucs4_t, uint8_t types.
2789         * lib/unistr/utf8-ucs4.c: New file.
2790
2791         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2792         (Depends-on): Add unitypes.
2793         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2794         (u16_mbtouc_aux): Move out to separate file.
2795         (u16_mbtouc): Use ucs4_t, uint16_t types.
2796         * lib/unistr/utf16-ucs4.c: New file.
2797
2798         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2799         (Depends-on): Add unitypes.
2800         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2801         (u8_uctomb_aux): Move out to separate file.
2802         (u8_uctomb): Use ucs4_t, uint8_t types.
2803         * lib/unistr/ucs4-utf8.c: New file.
2804
2805         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2806         (Depends-on): Add unitypes.
2807         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2808         (u16_uctomb_aux): Move out to separate file.
2809         (u16_uctomb): Use ucs4_t, uint16_t types.
2810         * lib/unistr/ucs4-utf16.c: New file.
2811
2812 2006-12-25  Bruno Haible  <bruno@clisp.org>
2813
2814         * modules/unitypes: New file.
2815         * lib/unitypes.h: New file.
2816         * MODULES.html.sh (func_all_modules): New section "Unicode string
2817         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2818         this section. Add unitypes.
2819
2820 2007-01-08  Bruno Haible  <bruno@clisp.org>
2821
2822         Avoid variable names that conflict with those from libtool.
2823         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2824         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2825         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2826         library_names_spec to acl_library_names_spec, hardcode_* to
2827         acl_hardcode_*.
2828         Reported by Ralf Wildenhues.
2829
2830 2007-01-08  Bruno Haible  <bruno@clisp.org>
2831
2832         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2833         definition.
2834         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2835         definition.
2836         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2837         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2838         definition.
2839         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2840         definition.
2841         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2842         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2843         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2844         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2845         definition.
2846         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2847         definition.
2848         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2849         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2850         GC_USE_<algorithm>.
2851         * lib/gc-libgcrypt.c: Likewise.
2852         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2853         * modules/gc-arctwo (configure.ac): Likewise.
2854         * modules/gc-des (configure.ac): Likewise.
2855         * modules/gc-hmac-md5 (configure.ac): Likewise.
2856         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2857         * modules/gc-md2 (configure.ac): Likewise.
2858         * modules/gc-md4 (configure.ac): Likewise.
2859         * modules/gc-md5 (configure.ac): Likewise.
2860         * modules/gc-random (configure.ac): Likewise.
2861         * modules/gc-rijndael (configure.ac): Likewise.
2862         * modules/gc-sha1 (configure.ac): Likewise.
2863
2864 2007-01-08  Bruno Haible  <bruno@clisp.org>
2865
2866         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2867         macro definition.
2868         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2869         definition.
2870         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2871         definition.
2872         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2873         * modules/fcntl-safer (configure.ac): Likewise.
2874         * modules/fopen-safer (configure.ac): Likewise.
2875         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2876         GNULIB_FWRITEERROR macro definition.
2877
2878 2007-01-08  Bruno Haible  <bruno@clisp.org>
2879
2880         * m4/gnulib-common.m4: New file.
2881         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2882         (func_get_filelist): Add m4/gnulib-common.m4.
2883
2884 2007-01-08  Bruno Haible  <bruno@clisp.org>
2885
2886         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2887         command.
2888
2889 2007-01-08  Jim Meyering  <jim@meyering.net>
2890
2891         Use a more robust test for a "can't happen" condition.
2892         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2893         narrowed the st_size value.  Presuming the "can't happen" condition
2894         is true, that narrowing could conceivably convert an invalid st_size
2895         value into a valid one.  Instead, use a change based on Matthew
2896         Woehlke's original patch.
2897
2898         Slight readability improvement: use an assert-like macro
2899         in place of literal "abort ()" uses.
2900         * lib/fts.c (fts_assert): Define.
2901         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2902         Use this macro instead of a bare 'abort'.
2903
2904 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2905
2906         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2907         simply work around them.
2908         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2909         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2910         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
2911         declaring.
2912         Don't bother to define as macros, since the standard doesn't require it.
2913         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
2914         longer worry about IRIX 5.3.
2915         (HAVE_WCTYPE_CTMP_BUG): Remove.
2916
2917 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
2918
2919         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
2920         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
2921         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
2922         Problems reported by Georg Schwarz for IRIX 5.3.
2923
2924         * gnulib-tool (autoconf_minversion): Take the maximum version number
2925         found, not the minimum.  Problem reported by James Youngman.
2926
2927 2007-01-03  Karl Berry  <karl@gnu.org>
2928
2929         * doc/error.texi: new file, explaining interaction with progname.
2930         * doc/gnulib.texi: include it.  Update copyright.
2931
2932 2007-01-03  Simon Josefsson  <simon@josefsson.org>
2933
2934         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
2935         AC_CANONICAL_HOST, to improve autobuild outputs.
2936
2937 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
2938             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2939
2940         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
2941         sockets, server sockets, and other file descriptors.  Count errors
2942         to compute the return value.  Reorder the code a bit to be easier
2943         to follow.  Don't set event bits that were not requested (except
2944         POLLERR and POLLHUP).
2945
2946 2007-01-01  Bruno Haible  <bruno@clisp.org>
2947
2948         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
2949
2950 2007-01-03  Jim Meyering  <jim@meyering.net>
2951
2952         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
2953
2954 2007-01-02  Bruno Haible  <bruno@clisp.org>
2955
2956         * modules/settime (Include): Require timespec.h.
2957         * modules/nanosleep (Include): Likewise.
2958
2959 2007-01-01  Bruno Haible  <bruno@clisp.org>
2960
2961         * gnulib-tool (func_emit_copyright_notice): Bump year.
2962         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
2963
2964 2007-01-01  Bruno Haible  <bruno@clisp.org>
2965
2966         Improve support for OpenBSD.
2967         * build-aux/config.rpath (libname_spec): Export.
2968         (library_names_spec): New variable. Export.
2969         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2970         library_names_spec from the config.rpath output. Locate shared library
2971         through the name pattern in library_names_spec.
2972
2973 2007-01-01  Eric Blake  <ebb9@byu.net>
2974
2975         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2976
2977 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2978
2979         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2980         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2981         assume the C locale, and avoid an "eval" that could cause trouble.
2982         Problem with SORT reported by Bob Proulx.
2983
2984         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2985         Define.  Trivial patch from Henning Nielsen Lund, originally
2986         sent to bug-grep@gnu.org today.
2987
2988 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2989
2990         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2991         struct stat.  Problem reported by Henning Nielsen Lund.
2992         * lib/acl.c: Include acl.h first, to check interface.  Don't
2993         bother to include sys/types.h and sys/stat.h again.
2994
2995 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2996
2997         Import the following change from libc; problem reported by
2998         Sven Verdoolaege.
2999
3000         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
3001
3002         [BZ #1373]
3003         * lib/argp.h: Remove __NTH for __argp_usage inline function.
3004
3005 2006-12-28  Jim Meyering  <jim@meyering.net>
3006
3007         * build-aux/announce-gen: Do not assume that the package
3008         builds any of tar.gz, tar.bz2, and .xdelta files.
3009         Suggestion from Simon Josefsson.
3010
3011 2006-12-28  Simon Josefsson  <simon@josefsson.org>
3012
3013         * modules/announce-gen: New file.
3014
3015 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
3016
3017         * lib/mbchar.h: Just include <wctype.h>; the wctype module
3018         handles its gotchas now.
3019         * lib/mbswidth.c: Likewise.
3020         * lib/wcwidth.h: Likewise.
3021         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
3022         and iswcntrl; the wctype module does this stuff now.
3023         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3024         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3025         * modules/mbchar (Depends-on): Add wctype.
3026         * modules/mbswidth (Depends-on): Likewise.
3027         * modules/wcwidth (Depends-on): Likewise.
3028
3029 2006-12-27  Eric Blake  <ebb9@byu.net>
3030
3031         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
3032         module uses more than what <wctype.h> is required to provide.
3033
3034 2006-12-26  Eric Blake  <ebb9@byu.net>
3035
3036         * gnulib-tool (sed_extract_prog): Avoid space-tab.
3037
3038 2006-12-26  Eric Blake  <ebb9@byu.net>
3039
3040         * modules/absolute-header: New module.
3041         * modules/fcntl (Depends-on): Depend on it.
3042         * modules/inttypes (Depends-on): Likewise.
3043         * modules/stdint (Depends-on): Likewise.
3044         * modules/sys_stat (Depends-on): Likewise.
3045         * modules/wctype (Depends-on): Likewise.
3046         * MODULES.html.sh (Support for building libraries and
3047         executables): Document it.
3048
3049 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
3050
3051         * gnulib-tool (SED): Remove, undoing previous change.
3052         The problem was that it broke coreutils on Solaris, because
3053         "sed --posix" leaked into a makefile.
3054         (sed): New alias, if 'alias' and GNU sed.
3055
3056 2006-12-24  Jim Meyering  <jim@meyering.net>
3057
3058         Work around an fchownat bug in glibc-2.4:
3059         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
3060         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
3061         in spite of the -P option.
3062         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
3063         New macros.
3064         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
3065         * modules/openat (Files): Add lib/fchownat.c.
3066         * lib/openat.c (fchownat): Don't define here.  Move to...
3067         * lib/fchownat.c: ...this new file.
3068
3069 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
3070
3071         Fix bug reported by Bruno Haible in
3072         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
3073         where quotearg.c didn't compile on Mac OS X 10.2 because it
3074         lacks <wchar.h> and wint_t.
3075         * lib/wctype_.h (__wctype_wint_t): New type.
3076         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
3077         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
3078         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
3079         Arg is now of type __wctype_wint_t, not wint_t.
3080         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
3081         substitute HAVE_WINT_T.
3082         * modules/wctype (Files): Add m4/wint_t.m4.
3083         (wctype.h): Substitute HAVE_WINT_T.
3084
3085 2006-12-23  Bruno Haible  <bruno@clisp.org>
3086
3087         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
3088
3089 2006-12-23  Bruno Haible  <bruno@clisp.org>
3090
3091         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
3092         S_ISLNK.
3093         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
3094         mingw.
3095
3096 2006-12-22  Bruno Haible  <bruno@clisp.org>
3097
3098         * lib/copy-file.c: Include acl.h.
3099         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
3100         Close the file descriptors only after being done with copy_acl.
3101         * modules/copy-file (Depends-on): Add acl.
3102
3103 2006-12-22  Bruno Haible  <bruno@clisp.org>
3104
3105         * gnulib-tool (SED): New variable.
3106         Use $SED instead of sed everywhere.
3107
3108 2006-12-22  Bruno Haible  <bruno@clisp.org>
3109
3110         * modules/no-c++: New file.
3111         * m4/no-c++.m4: New file.
3112         * MODULES.html.sh (Support for building libraries and executables):
3113         Add no-c++.
3114
3115 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
3116
3117         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3118         Include <limits.h>, and use its INT_MAX to rewrite the
3119         j loop so that it does not overflow 'int'.  Problem reported by
3120         Ralf Wildenhues in
3121         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
3122         Play it safe by shifting left by 1 rather than multiplying by 2,
3123         as GCC is less likely to optimize this away when the value
3124         is signed (when it assumes overflow leads to undefined behavior).
3125         Also, don't assume time_t uses two's complement.
3126
3127 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
3128
3129         * MODULES.html.sh: New module wctype.
3130         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
3131         * lib/fnmatch.c: Don't bother to include <wchar.h> before
3132         <wctype.h>, since the new wctype module should fix this.
3133         * lib/quotearg.c: Include <wctype.h> unconditionally, since
3134         the wctype module should arrange for it.
3135         * lib/regex_internal.h: Likewise.
3136         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
3137         since the wctype module should handle this now.
3138         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
3139         * modules/fnmatch (Depends-on): Add wctype.
3140         * modules/quotearg (Depends-on): Likewise.
3141         * modules/regex (Depends-on): Likewise.
3142
3143 2006-12-19  Bruno Haible  <bruno@clisp.org>
3144
3145         * lib/strdup.h [C++]: Wrap definitions in extern "C".
3146         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
3147
3148 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3149
3150         * modules/savewd (Depends-on): Fix dependency on fcntl.
3151
3152 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
3153
3154         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
3155         conforms to C99, rather than relying on the user's environment
3156         setting of STDINT_H.
3157
3158 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
3159         and Eric Blake  <ebb9@byu.net>
3160
3161         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
3162         This is more consistent with the other defines here.
3163         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
3164         Port to z/OS.  Problem reported by Paul Gilmartin.
3165         Change local vars to use gl_ prefix rather than ac_.
3166         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
3167         with other defines.
3168         * modules/double-slash-root: New module.
3169         * modules/dirname (Files): Remove m4/double-slash-root.m4.
3170         (Depends-on): Add double-slash-root.
3171         * MODULES.html.sh (File system functions): Mention new module.
3172
3173 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
3174
3175         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
3176         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
3177         This is for the benefit of gzip, which doesn't do i18n.
3178
3179 2006-12-12  Jim Meyering  <jim@meyering.net>
3180
3181         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
3182         Reported by Andreas Schwab <schwab@suse.de>.
3183
3184 2006-12-12  Bruno Haible  <bruno@clisp.org>
3185
3186         Merge these changes.
3187         2006-09-05  Bruno Haible  <bruno@clisp.org>
3188         * lib/iconvme.c (iconv_string): No need to save and restore errno when
3189         iconv_alloc succeeded.
3190         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
3191         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
3192         test for " && dest " at the end - dest is always != NULL there. Call
3193         iconv with 4xNULL arguments initially, to reset the state. Call iconv
3194         with 2xNULL arguments, also to flush the state storage. Handle the
3195         IRIX iconv behaviour. Realloc the final result, to throw away unused
3196         memory.
3197
3198 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
3199
3200         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
3201         and fchmodat unconditionally, since glibc 2.4 has them.
3202         Problem reported by Arkadiusz Miskiewicz.
3203
3204 2006-12-10  Bruno Haible  <bruno@clisp.org>
3205
3206         * gnulib-tool (func_import): Show the include files only for those
3207         modules that are copied and specified.
3208         Reported by Karl Berry.
3209
3210 2006-12-08  Jim Meyering  <jim@meyering.net>
3211
3212         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
3213         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
3214
3215         * build-aux/announce-gen: Add two new options, both optional:
3216         --bootstrap-tools=TOOL_LIST
3217               a comma-separated list of tools, e.g.,
3218               autoconf,automake,bison,gnulib
3219         --gnulib-snapshot-date=DATE
3220               if gnulib is in the bootstrap tool list,
3221               then report this as the snapshot date.
3222               If not specified, use the current date/time.
3223               If you specify a date here, be sure it's UTC.
3224
3225 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3226
3227         * tests/test-argp-2.sh: Fix test to match actual output.
3228         (func_compare): Fix sed script to be portable.
3229
3230 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
3231
3232         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
3233         workaround for this case.  It is not autoconfigured now; offhand
3234         it's hard to see how to autoconfigure it.
3235
3236 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
3237
3238         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
3239         a directory that is about to be chowned.  Such a directory's
3240         initial file permissions should permit the owner only and this
3241         should not be changed until after the chown, since the group and
3242         other bits would be incorrect if they granted permission before
3243         the chown.
3244
3245         Fix porting problem for iswctype reported by Georg Schwarz in:
3246         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
3247         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
3248         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
3249         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
3250         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
3251
3252 2006-12-03  Jim Meyering  <jim@meyering.net>
3253
3254         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
3255         p->fts_statp may not yet be defined.
3256         (fts_read): Instead, set it in the caller, once p->fts_statp is
3257         sure to be defined, and corresponds to a top-level directory.
3258         This bug made du -x fail.  Here's the coreutils test case:
3259         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
3260         Reported by Mike Frysinger.
3261
3262 2006-12-01  Jim Meyering  <jim@meyering.net>
3263
3264         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
3265         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
3266         Reported by Simon Josefsson.
3267
3268 2006-11-30  Jim Meyering  <jim@meyering.net>
3269
3270         * m4/warning.m4: Use the all-permissive copyright notice
3271         recommended by RMS (rather than LGPL).
3272         * m4/vararrays.m4: Likewise.
3273         * m4/flexmember.m4: Likewise.
3274
3275 2006-11-29  Bruno Haible  <bruno@clisp.org>
3276
3277         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3278         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
3279         using +=.
3280         Reported by Simon Josefsson <simon@josefsson.org>.
3281
3282 2006-11-28  James Youngman <jay@gnu.org>
3283
3284         * README: Advise users that they might find the bug-gnulib@gnu.org
3285         and autotools-announce@gnu.org mailing lists useful.
3286
3287 2006-11-28  Bruno Haible  <bruno@clisp.org>
3288
3289         * m4/ptrdiff_max.m4: Remove file.
3290
3291 2006-11-21  Bruno Haible  <bruno@clisp.org>
3292
3293         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
3294         _AC_COMPUTE_INT.
3295         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3296         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
3297         _AC_COMPUTE_INT.
3298         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3299         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
3300         _AC_COMPUTE_INT.
3301         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3302
3303 2006-11-28  Jim Meyering  <jim@meyering.net>
3304
3305         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
3306         warning from "gcc -Wshadow" about shadowing the builtin.
3307
3308 2006-11-27  Bruno Haible  <bruno@clisp.org>
3309
3310         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
3311         _AC_COMPUTE_INT.
3312         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3313
3314 2006-11-27  Bruno Haible  <bruno@clisp.org>
3315             Paul Eggert  <eggert@cs.ucla.edu>
3316
3317         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
3318
3319 2006-11-26  Bruno Haible  <bruno@clisp.org>
3320
3321         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3322         noinst_LTLIBRARIES.
3323
3324 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
3325             Bruno Haible  <bruno@clisp.org>
3326
3327         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
3328         if compiling with "gcc -ansi".
3329
3330 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
3331
3332         Fix some incompatibilities with gcc -ansi -pedantic.
3333         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
3334         if compiling pedantically with GCC, unless it's C99 or later.
3335         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
3336         it mishandles gcc -ansi -pedantic as well.
3337         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
3338         if gcc -pedantic.
3339         * lib/regexec.c (check_node_accept_bytes): Don't use auto
3340         initializers for struct if -pedantic, unless it's C99 or later.
3341
3342 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
3343
3344         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
3345         Don't close an fd more than once. Identical atimes indicate
3346         success, not failure.
3347
3348 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
3349
3350         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
3351
3352 2006-11-23  Jim Meyering  <jim@meyering.net>
3353
3354         * build-aux/announce-gen: New file.  From coreutils.
3355
3356 2006-11-22  Jim Meyering  <jim@meyering.net>
3357
3358         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
3359         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
3360         (fts_read): Use a temporary to narrow the overused st_size member
3361         before using it in a switch statement.  Reported by Matthew Woehlke.
3362
3363         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
3364         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
3365
3366 2006-11-20  Bruno Haible  <bruno@clisp.org>
3367
3368         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
3369         changequote instead of pairs of brackets.
3370         Reported by Andreas Schwab <schwab@suse.de>.
3371
3372 2006-11-21  Jim Meyering  <jim@meyering.net>
3373
3374         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
3375         so as to remain compatible with older compilers.
3376         Patch from Michael Deutschmann.
3377
3378 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3379
3380         * MODULES.html.sh (File system functions): Add openat.
3381
3382         * lib/openat.h (rpl_fstatat): New macro, if
3383         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3384         (fstatat): Define to rpl_fstatat under the same conditions,
3385         unless COMPILING_FSTATAT.
3386         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3387         seems to have the bug.
3388         * lib/fstatat.c: New file.
3389         * modules/openat (Files): Add it.
3390
3391 2006-11-20  Bruno Haible  <bruno@clisp.org>
3392
3393         * Makefile: New file.
3394
3395 2006-11-20  Jim Meyering  <jim@meyering.net>
3396
3397         The beginnings of syntax-related checks for gnulib.
3398         * lib/Makefile: New file.
3399         * lib/t-idcache: New script.  Ensure that the two halves of
3400         idcache.c stay in sync.
3401
3402         * lib/idcache.c: Adjust comments in user- and group- portions to
3403         be more accurate, and to be consistent with one another.
3404
3405 2006-11-20  Jim Meyering  <jim@meyering.net>
3406
3407         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3408         continue using the flexible array member (thus, this module performs
3409         half as many malloc calls), with the addition that...
3410         (getgroup, getuser): Consistently record a non-match via an empty
3411         "name" string, and map an empty string match to a NULL return value.
3412         * modules/idcache (Depends-on): Re-add flexmember.
3413
3414         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3415         (getuidbyname, getgroup, getgidbyname): Likewise.
3416
3417         Use cleaner syntax: NULL rather than 0.
3418         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3419
3420 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3421
3422         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3423         It mishandled the case where the group was missing.
3424         Problem reported by Greg Schafer.
3425         * modules/idcache: Likewise.
3426
3427 2006-11-18  Jim Meyering  <jim@meyering.net>
3428
3429         * check-module (%exempt_header): Add exception for some
3430         conditionally-included headers.
3431
3432         * modules/i-ring (Depends-on): Add verify.
3433         (License): Change to LGPL.
3434
3435 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3436
3437         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3438         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3439         and inttostr.h.  Use snprintf rather than uinttostr, so that
3440         LGPLed code doesn't depend on GPLed.
3441
3442 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3443
3444         * modules/inline (License): Change from GPL to LGPL.
3445
3446 2006-11-17  Jim Meyering  <jim@meyering.net>
3447
3448         * modules/d-type (License): Switch to LGPL.
3449
3450 2006-11-15  Bruno Haible  <bruno@clisp.org>
3451
3452         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3453
3454 2006-11-15  Eric Blake  <ebb9@byu.net>
3455
3456         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3457         the module dependency.
3458
3459 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3460             Bruno Haible  <bruno@clisp.org>
3461
3462         * gnulib-tool (func_create_testdir): Add license consistency check.
3463
3464 2006-11-15  Eric Blake  <ebb9@byu.net>
3465
3466         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3467         random "(cached)" in configure output.
3468
3469 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3470
3471         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3472         test for conforming inttypes.h is both announced and cached.
3473
3474         * MODULES.html.sh (seen_modules, seen_files): New variables.
3475         (func_module): Rewrite to use a few less gnulib-tool and sed
3476         invocations.  Avoid a couple of quadratic algorithms for ...
3477         (missed_modules, missed_files): ... these, with ...
3478         (func_append, func_tmpdir): ... these new functions, from
3479         gnulib-tool.  Analogously, install traps for cleanup.
3480
3481         * tests/test-gc.c (main): Remove unused variables.
3482         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3483
3484 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3485
3486         * modules/inttostr (License): Change to LGPL.
3487
3488 2006-11-14  Eric Blake  <ebb9@byu.net>
3489
3490         * modules/tempname (License): Change to LGPL.
3491
3492 2006-11-14  Eric Blake  <ebb9@byu.net>
3493
3494         * doc/functions.texi (Function Portability): *printf functions on
3495         Cygwin now understand all POSIX size specifiers.
3496
3497 2006-11-14  Bruno Haible  <bruno@clisp.org>
3498
3499         * modules/c-ctype (License): Change to LGPL.
3500
3501 2006-11-12  Bruno Haible  <bruno@clisp.org>
3502
3503         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3504         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3505         for GNOME libraries, for which the include files are installed in
3506         subdirectories of $prefix/include.
3507
3508 2006-11-12  Bruno Haible  <bruno@clisp.org>
3509
3510         * m4/lib-link.m4: Require at least autoconf-2.54.
3511         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3512         name to underscores for the --with option.
3513
3514 2006-11-13  Bruno Haible  <bruno@clisp.org>
3515
3516         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3517         the tests directory.
3518         Reported by Ralf Wildenhues.
3519
3520 2006-11-13  Bruno Haible  <bruno@clisp.org>
3521
3522         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3523         (func_emit_initmacro_end): Undo the override here.
3524         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3525         Works around the famous automake error in coreutils.
3526
3527 2006-11-13  Eric Blake  <ebb9@byu.net>
3528
3529         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3530         element, not its node.
3531
3532 2006-11-12  Bruno Haible  <bruno@clisp.org>
3533
3534         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3535         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3536
3537 2006-11-12  Bruno Haible  <bruno@clisp.org>
3538
3539         * gnulib-tool: New option --local-symlink.
3540         (func_usage): Document it.
3541         (lsymbolic): New variable.
3542         (func_import, func_create_testdir): If --symlink was not specified,
3543         test whether --local-symlink was specified and the file comes from
3544         the local_gnulib_dir.
3545
3546 2006-11-12  Bruno Haible  <bruno@clisp.org>
3547
3548         * gnulib-tool (func_ln): New function.
3549         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3550
3551 2006-11-12  Bruno Haible  <bruno@clisp.org>
3552
3553         Finish support for source files in subdirectories.
3554         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3555         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3556         AUTOMAKE_OPTIONS.
3557         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3558
3559 2006-11-12  Bruno Haible  <bruno@clisp.org>
3560
3561         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3562         EXTRA_lib_SOURCES augmentation.
3563         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3564
3565 2006-11-12  Jim Meyering  <jim@meyering.net>
3566
3567         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3568         file descriptors.  This also averts a failure on systems with
3569         native openat support when a traversed directory lacks "x" access.
3570         * lib/fts_.h: Include "i-ring.h"
3571         (struct FTS) [fts_fd_ring]: New member.
3572         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3573         (FCHDIR): Add parentheses.
3574         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3575         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3576         When descending, rather than simply closing the previous
3577         fts_cwd_fd value, push that file descriptor onto the ring.
3578         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3579         (fts_open): Initialize the new fd_ring member.
3580         (fts_close): Clear the ring.
3581         (fts_safe_changedir): When possible, use our new fd_ring to skip
3582         the diropen and fstat and dev/ino comparison that would normally
3583         accompany a virtual `chdir ("..")'.
3584
3585         * modules/fts (Depends-on): Add i-ring.
3586         * modules/i-ring: New module.
3587         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3588         * m4/i-ring.m4: New file.
3589
3590 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3591
3592         * gnulib-tool (func_create_testdir): Fix replacement of
3593         `build-aux' in configure.ac.  Run autotools in gltests
3594         subdirectory.
3595         (func_create_testdir, func_create_megatestdir, test): There is
3596         no need for '--force' in most autotool invocations in a new
3597         tree.  Actually fail the whole test if any of the tools, or the
3598         configure or make stages fail.
3599
3600         Sync from Automake.
3601         * build-aux/gnupload: Revert last change.  Add pointer to upload
3602         instructions of the GNU Maintenance Instructions.
3603         Suggestion by Karl Berry.
3604
3605 2006-11-10  Jim Meyering  <jim@meyering.net>
3606
3607         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3608
3609 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3610
3611         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3612         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3613         (bind_textdomain_codeset) [! ENABLE_NLS]:
3614         Evaluate all the arguments.  That way, callers get compatible behavior
3615         if the arguments have side effects.  Also, it avoids some GCC
3616         diagnostics in some cases; Joel E. Denny reported problems when Bison
3617         was configured with --enable-gcc-warnigs.
3618
3619 2006-11-10  Jim Meyering  <jim@meyering.net>
3620
3621         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3622         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3623         account.
3624
3625 2006-11-10  Jim Meyering  <jim@meyering.net>
3626
3627         * modules/inline: New file/module.
3628         * modules/xalloc (Files): Remove m4/inline.m4.
3629         (Depends-on): Add inline, instead.
3630         * modules/oset: Likewise.
3631         * modules/list: Likewise.
3632
3633 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3634
3635         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3636         Problem reported by Matthew Woehlke.
3637
3638 2006-11-09  Bruno Haible  <bruno@clisp.org>
3639
3640         * lib/tempname.c (gen_tempname): Remove variant that invokes
3641         __gen_tempname.
3642         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3643         __gen_tempname.
3644
3645 2006-11-08  Bruno Haible  <bruno@clisp.org>
3646
3647         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3648         to 'yes' instead of 'cross-compiling'.
3649
3650 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3651
3652         * lib/quotearg.h (quotearg_free): New decl.
3653         * lib/quotearg.c (quotearg_free): New function.
3654         (slot0, nslots, slotvec0, slotvec):
3655         Now file-scope so that quotearg_free can get at them.
3656
3657 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3658
3659         Sync from Automake.
3660         * build-aux/gnupload: Add missing 'gnu' to example URL.
3661         Report by Karl Berry.
3662
3663 2006-11-08  Bruno Haible  <bruno@clisp.org>
3664
3665         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3666         Suggested by Paul Eggert.
3667
3668 2006-11-08  Jim Meyering  <jim@meyering.net>
3669
3670         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3671         It's already included if !_LIBC.
3672         (fts_safe_changedir): Add a comment.
3673
3674 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3675
3676         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3677         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3678         Matthew Woehlke.
3679
3680         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3681         definitions up, to avoid colliding with change below.
3682         (static_inline) [HAVE_INLINE]: New macro.
3683         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3684         Provide extern decls when !HAVE_INLINE.  Do not define unless
3685         static_inline is defined, either by us or by xmalloc.c.  Use
3686         static_inline rather than static inline.
3687         (XCALLOC): Optimize sizeof(T) = 1 case.
3688         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3689
3690 2006-11-07  Bruno Haible  <bruno@clisp.org>
3691
3692         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3693         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3694         AC_C_INLINE.
3695         * modules/xalloc (Files): Add m4/inline.m4.
3696
3697 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3698
3699         * README: Fix typo.
3700         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3701         (Miscellanous Notes): ...from this.
3702
3703 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3704
3705         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3706         Mention that offsetof should be used instead of sizeof.
3707         From Bruno Haible.
3708
3709 2006-11-07  Bruno Haible  <bruno@clisp.org>
3710
3711         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3712
3713 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3714
3715         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3716         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3717         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3718         (gl_tree_add_before, gl_tree_add_after):
3719         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3720         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3721         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3722         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3723         (gl_linked_add_after, gl_linked_add_at): Likewise.
3724         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3725         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3726         (gl_tree_add_before, gl_tree_add_after): Likewise.
3727         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3728         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3729         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3730
3731 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3732
3733         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3734
3735 2006-11-06  Bruno Haible  <bruno@clisp.org>
3736
3737         * m4/inline.m4: New file.
3738         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3739         * modules/list (Files): Add m4/inline.m4.
3740         * modules/oset (Files): Likewise.
3741
3742 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3743
3744         * lib/idcache.c: Include <stddef.h>, for offsetof.
3745         (struct userid.name): Change from char * to a flexible array member.
3746         All uses changed.
3747         * modules/idcache (Depends-on): Add flexmember.
3748
3749         * MODULES.html.sh (Core language properties): New module flexmember.
3750         * modules/flexmember, m4/flexmember.m4: New files.
3751
3752         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3753         inline functions that are identical with the old xnmalloc_inline,
3754         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3755         that we can avoid some unnecessary integer multiplications and
3756         divisions in the common case where the element size is known at
3757         compile time.
3758         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3759         needed.
3760         (xnboundedmalloc): Remove.
3761         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3762         arguments, for consistency with rest of this header.
3763         (xcharalloc): Rewrite using XNMALLOC.
3764         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3765         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3766         versions have been moved to lib/xalloc.h and renamed to be the
3767         non-*_inline versions.
3768         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3769         and xnrealloc functions, since those functions are now inline and
3770         now call us.
3771         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3772         renaming described above.
3773         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3774         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3775         captures the dependency in AC_C_INLINE.
3776
3777         New module canonicalize-lgpl, proposed by Charles Wilson in
3778         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3779         with a few small changes afterwards.
3780         * MODULES.html.sh (File system functions): New module
3781         canonicalize-lgpl.
3782         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3783         and canonicalize_file_name.
3784         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3785         * modules/canonicalize-lgpl: New files.
3786
3787 2006-11-05  Bruno Haible  <bruno@clisp.org>
3788
3789         * gnulib-tool (func_import, func_create_testdir): Create directories
3790         also for files in subdirectories of lib/.
3791
3792 2006-11-05  Bruno Haible  <bruno@clisp.org>
3793
3794         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3795         ANSI C compliant.
3796
3797 2006-11-03  Bruno Haible  <bruno@clisp.org>
3798
3799         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3800         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3801         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3802         (xnboundedmalloc): New inline function.
3803         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3804         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3805         xmalloc.
3806         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3807         xmalloc.
3808         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3809         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3810         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3811         xmalloc.
3812         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3813         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3814         xmalloc.
3815         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3816         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3817         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3818         xmalloc.
3819         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3820         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3821         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3822         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3823         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3824         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3825         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3826
3827 2006-11-03  Bruno Haible  <bruno@clisp.org>
3828
3829         * lib/c-ctype.h [C++]: Define functions without name mangling.
3830         * lib/fwriteerror.h [C++]: Likewise.
3831         * lib/gcd.h [C++]: Likewise.
3832         * lib/linebreak.h [C++]: Likewise.
3833
3834 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3835
3836         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3837         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3838         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3839         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3840         Check for functions and headers just once.
3841         Check for declaration of canonicalize_file_name.
3842         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3843
3844 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3845
3846         * gnulib-tool (func_import): Fix typo in actioncmd.
3847
3848 2006-11-02  Bruno Haible  <bruno@clisp.org>
3849
3850         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3851         newline sequence in the Makefile.am snippet as a space, like "make"
3852         does.
3853         Reported by Roger Persson <perrog@gmail.com>.
3854
3855 2006-11-01  Bruno Haible  <bruno@clisp.org>
3856
3857         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3858         already declared in <string.h>.
3859         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3860
3861 2006-11-01  Bruno Haible  <bruno@clisp.org>
3862
3863         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3864         * lib/strcase.h: Include <string.h>.
3865         (strcasecmp): Define to rpl_strcasecmp here.
3866
3867 2006-11-01  Bruno Haible  <bruno@clisp.org>
3868
3869         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3870
3871 2006-11-01  Eric Blake  <ebb9@byu.net>
3872
3873         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3874
3875         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3876
3877 2006-10-29  Bruno Haible  <bruno@clisp.org>
3878
3879         Make it compile in C++ mode.
3880         * lib/full-write.c (full_rw): Add a cast.
3881
3882 2006-11-01  Bruno Haible  <bruno@clisp.org>
3883
3884         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3885         be POSIX compliant.
3886         Reported by Roger Persson <perrog@gmail.com>.
3887
3888 2006-11-01  Eric Blake  <ebb9@byu.net>
3889
3890         * lib/getopt_.h: Fix comments.
3891
3892 2006-10-31  Eric Blake  <ebb9@byu.net>
3893
3894         * modules/tmpdir (Depends-on): Add sys_stat.
3895         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3896         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3897         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3898         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3899         tempname.
3900
3901 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3902
3903         Avoid some C++ diagnostics reported by Bruno Haible.
3904         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3905         xmalloc.
3906         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3907         (struct slotvec): Move to top level.
3908         (quotearg_n_options): Rewrite to avoid xmalloc.
3909         * lib/xalloc.h (xcharalloc): New function.
3910         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3911         [defined __cplusplus]: Add function template that provides result
3912         type propagation.  This part of the change is from Bruno Haible.
3913
3914 2006-10-29  Bruno Haible  <bruno@clisp.org>
3915
3916         Make it compile in C++ mode.
3917         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
3918         * lib/strnlen1.c (strnlen1): Cast memchr result.
3919         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
3920         * lib/clean-temp.c (string_equals, string_hash): Add casts.
3921         (create_temp_dir): Rename local variable 'template'.
3922         (compile_csharp_using_sscli): Add cast.
3923         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
3924         * lib/findprog.c (find_in_path): Likewise.
3925         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
3926         * lib/wait-process.c (register_slave_subprocess): Likewise.
3927
3928 2006-10-22  Bruno Haible  <bruno@clisp.org>
3929
3930         * modules/tsearch: New file.
3931         * lib/tsearch.h: New file.
3932         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
3933         * m4/tsearch.m4: New file.
3934         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
3935
3936 2006-10-29  Eric Blake  <ebb9@byu.net>
3937
3938         * lib/arcfour.c: Assume config.h.
3939         * lib/arctwo.c: Likewise.
3940         * lib/base64.c: Likewise.
3941         * lib/check-version.c: Likewise.
3942         * lib/crc.c: Likewise.
3943         * lib/des.c: Likewise.
3944         * lib/gc-gnulib.c: Likewise.
3945         * lib/gc-libgcrypt.c: Likewise.
3946         * lib/gc-pbkdf2-sha1.c: Likewise.
3947         * lib/getaddrinfo.c: Likewise.
3948         * lib/getdelim.c: Likewise.
3949         * lib/getline.c: Likewise.
3950         * lib/hmac-md5.c: Likewise.
3951         * lib/hmac-sha1.c: Likewise.
3952         * lib/iconvme.c: Likewise.
3953         * lib/md2.c: Likewise.
3954         * lib/md4.c: Likewise.
3955         * lib/memxor.c: Likewise.
3956         * lib/read-file.c: Likewise.
3957         * lib/readline.c: Likewise.
3958         * lib/rijndael-alg-fst.c: Likewise.
3959         * lib/rijndael-api-fst.c: Likewise.
3960         * lib/xgetdomainname.c: Likewise.
3961
3962 2006-10-28  Eric Blake  <ebb9@byu.net>
3963
3964         * lib/xstrndup.c: Assume config.h.
3965
3966 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3967
3968         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3969         stat-macros.h is now for our own macros, whereas stat_h is for
3970         macros in the <sys/stat.h> name space.
3971         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3972         (STAT_MACROS_H): Remove.
3973         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3974         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3975         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3976         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3977         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3978         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3979         Move these macros to ...
3980         * lib/stat_.h: here.  Don't include stat-macros.h.
3981         * lib/canonicalize.c: Don't include stat-macros.h.
3982         * lib/chown.c: Likewise.
3983         * lib/euidaccess.c: Likewise.
3984         * lib/file-type.c: Likewise.
3985         * lib/filemode.c: Likewise.
3986         * lib/glob.c: Likewise.
3987         * lib/isapipe.c: Likewise.
3988         * lib/lchown.c: Likewise.
3989         * lib/lstat.c: Likewise.
3990         * lib/mkdir-p.c: Likewise.
3991         * lib/rmdir.c: Likewise.
3992         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3993         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3994         unless mkdir isn't declared, to speed up 'configure'.
3995         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3996         would define all the S_* symbols.
3997         * modules/canonicalize (Depends-on):
3998         Depend on sys_stat, not stat-macros.
3999         * modules/chown: Likewise.
4000         * modules/euidaccess: Likewise.
4001         * modules/filemode: Likewise.
4002         * modules/file-type: Likewise.
4003         * modules/glob: Likewise.
4004         * modules/isapipe: Likewise.
4005         * modules/lchown: Likewise.
4006         * modules/lstat: Likewise.
4007         * modules/mkancesdirs: Likewise.
4008         * modules/rmdir: Likewise.
4009         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
4010         * modules/modechange: Likewise.
4011         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
4012         (configure.ac): Remove gl_STAT_MACROS.
4013         * modules/sys_stat (Depends-on): Remove stat-macros.
4014
4015 2006-10-27  Bruno Haible  <bruno@clisp.org>
4016
4017         * m4/signed.m4: Remove file.
4018         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
4019         invocation.
4020         * modules/vasnprintf (Files): Remove m4/signed.m4.
4021
4022 2006-10-27  Bruno Haible  <bruno@clisp.org>
4023
4024         Update to GNU gettext 0.16.
4025         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
4026         m4/inttypes-h.m4, m4/signed.m4.
4027         * m4/gettext.m4: Update to GNU gettext 0.16.
4028         * m4/intl.m4: New file, from GNU gettext.
4029         * m4/intldir.m4: New file, from GNU gettext.
4030         * config/srclist.txt: Update
4031
4032 2006-10-27  Eric Blake  <ebb9@byu.net>
4033
4034         * MODULES.html.sh: Document tempname.
4035         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
4036         dependencies.
4037         (Files): Move lib/tempname.c...
4038         * modules/tempname: ...to this new module.
4039         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
4040         (gl_PREREQ_TEMPNAME): Move...
4041         * m4/tempname.m4: ...to this new file.
4042         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
4043         * modules/sys_stat (Depends-on): Add stat-macros.
4044         * lib/stat_.h (includes): Pick up stat macros.
4045         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
4046         if stat macros are broken.
4047         * lib/tempname.c (includes): No need to include "stat-macros.h".
4048         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
4049         (direxists, __path_search) [!_LIBC]: Don't compile these in
4050         gnulib; the tmpdir module covers that.
4051         * lib/tempname.h: New file.
4052
4053 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
4054
4055         * COPYING: Explain how gnulib-tool converts licence headers.
4056         Almost all wording by Eric Blake.
4057
4058 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
4059
4060         * lib/mbchar.h (is_basic_table): Make read-only.
4061         * lib/mbchar.c (is_basic_table): Likewise.
4062         Reported by John Darrington.
4063
4064 2006-10-25  Bruno Haible  <bruno@clisp.org>
4065
4066         * lib/progname.h (set_program_name): Undefine before defining.
4067
4068 2006-10-25  Bruno Haible  <bruno@clisp.org>
4069
4070         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
4071         false for non-gcc C++ compilers.
4072         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
4073
4074 2006-10-24  Bruno Haible  <bruno@clisp.org>
4075
4076         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
4077         iconv implementations like Irix iconv.
4078
4079 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4080
4081         * modules/vararrays: New file.
4082         * m4/vararrays.m4: New file, taken from diffutils.
4083         * MODULES.html.sh: New module vararrays.
4084
4085 2006-10-24  Karl Berry  <karl@gnu.org>
4086
4087         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
4088         Don't call GNU Unix.
4089
4090 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4091
4092         * users.txt: Add Libtool.
4093
4094         Sync from Libtool:
4095
4096         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4097
4098         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
4099         to gnulib's policy of including config.h unconditionally.
4100
4101 2006-10-24  Bruno Haible  <bruno@clisp.org>
4102
4103         * modules/wcwidth (Files): Add m4/wint_t.m4.
4104         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
4105         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
4106
4107 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4108
4109         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
4110         to pacify GCC with some -W flags enabled.  Problem reported by
4111         Bruno Haible.
4112
4113 2006-10-24  Jim Meyering  <jim@meyering.net>
4114
4115         * MODULES.html.sh: Remove uinttostr.  It's not a module.
4116         Reported by Karl Berry.
4117
4118 2006-10-23  Bruno Haible  <bruno@clisp.org>
4119
4120         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
4121
4122 2006-10-24  Bruno Haible  <bruno@clisp.org>
4123
4124         * lib/gl_list.h: Use C comment style, not C++ comment style.
4125
4126 2006-10-23  Eric Blake  <ebb9@byu.net>
4127
4128         * lib/getaddrinfo.c (includes): Add missing include.
4129
4130 2006-10-23  Bruno Haible  <bruno@clisp.org>
4131             Paul Eggert  <eggert@cs.ucla.edu>
4132
4133         Ability to rename obstack_free.
4134         * lib/obstack.h (__obstack_free): New macro. Declare instead of
4135         obstack_free.
4136         (obstack_free): Invoke the __obstack_free macro.
4137         * lib/obstack.c (obstack_free): Use __obstack_free macro.
4138
4139 2006-10-23  Bruno Haible  <bruno@clisp.org>
4140             Paul Eggert  <eggert@cs.ucla.edu>
4141
4142         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
4143         __argc, __argv from the declaration. (They are defined as macros on
4144         mingw.)
4145
4146 2006-10-22  Bruno Haible  <bruno@clisp.org>
4147
4148         * doc/gnulib-intro.texi: New file.
4149         * doc/gnulib.texi: Include it.
4150
4151 2006-10-21  Bruno Haible  <bruno@clisp.org>
4152
4153         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
4154         "Introduction", "Miscellanous Notes", "Particular Modules".
4155
4156 2006-10-21  Bruno Haible  <bruno@clisp.org>
4157
4158         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4159         Change mostlyclean-local rule to avoid sh syntax error from bash
4160         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
4161
4162 2006-10-23  Jim Meyering  <jim@meyering.net>
4163
4164         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
4165         in place of snprintf.
4166
4167         * modules/inttostr (Files): Add lib/uinttostr.c.
4168         * lib/uinttostr.c (inttostr): New file/function.
4169         * lib/inttostr.h (uinttostr): Declare.
4170         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
4171         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
4172         Add uinttostr.
4173         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
4174
4175 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
4176
4177         * lib/canonicalize.c (ELOOP): Define if not already defined.
4178         Problem reported by Bruno Haible in
4179         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
4180
4181 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
4182
4183         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
4184         Problem reported by Perry Smith and Ville Laurikari.
4185
4186         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
4187         uses.
4188
4189 2006-10-19  Bruno Haible  <bruno@clisp.org>
4190
4191         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
4192         for mingw.
4193
4194 2006-10-19  Bruno Haible  <bruno@clisp.org>
4195
4196         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
4197         Needed for mingw.
4198
4199 2006-10-19  Bruno Haible  <bruno@clisp.org>
4200
4201         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
4202
4203 2006-10-19  Bruno Haible  <bruno@clisp.org>
4204
4205         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
4206         it.
4207
4208 2006-10-19  Bruno Haible  <bruno@clisp.org>
4209
4210         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
4211         invocation.
4212
4213 2006-10-19  Bruno Haible  <bruno@clisp.org>
4214
4215         * gnulib-tool (func_create_testdir): Don't include ftruncate and
4216         mountlist by default.
4217
4218 2006-10-16  Bruno Haible  <bruno@clisp.org>
4219
4220         * lib/c-strstr.c: Include c-strstr.h.
4221
4222 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4223
4224         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
4225         in a slash.
4226
4227 2006-10-18  Bruno Haible  <bruno@clisp.org>
4228
4229         * lib/lock.h [C++]: Wrap definitions in extern "C".
4230
4231 2006-10-18  Bruno Haible  <bruno@clisp.org>
4232
4233         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
4234         gl_LIBOBJS list.
4235
4236 2006-10-18  Bruno Haible  <bruno@clisp.org>
4237
4238         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
4239
4240 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
4241
4242         * lib/xstrtol.h: Include gettext.h.
4243         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
4244         Problem reported by Eric Blake.
4245         * modules/xstrtol (Depends-on): Add gettext-h.
4246
4247 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
4248
4249         * lib/strftime.c (advance): New macro.
4250         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
4251         incomplete type, so you can't add 0 to it.  Problem and patch
4252         reported by Eelco Dolstra for dietlibc.
4253
4254 2006-10-18  Jim Meyering  <jim@meyering.net>
4255
4256         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
4257         type for a local, and rename it: s/up/user_proc/.
4258
4259 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
4260
4261         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
4262         READ_UTMP_USER_PROCESS.
4263         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
4264
4265 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
4266
4267         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
4268         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
4269
4270 2006-10-17  Eric Blake  <ebb9@byu.net>
4271
4272         * lib/sigprocmask.c (sigprocmask): Fix typo.
4273
4274         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
4275
4276         * modules/clean-temp (Makefile.am): Don't add to make output...
4277         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
4278         config.h.
4279
4280 2006-10-17  Bruno Haible  <bruno@clisp.org>
4281
4282         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
4283         differently if DEFAULT_TEXT_DOMAIN is set.
4284
4285 2006-10-16  Bruno Haible  <bruno@clisp.org>
4286
4287         * lib/clean-temp.c: Include fwriteerror.h.
4288
4289 2006-10-16  Bruno Haible  <bruno@clisp.org>
4290
4291         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
4292
4293 2006-10-16  Bruno Haible  <bruno@clisp.org>
4294
4295         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
4296         * lib/sigprocmask.h: Include <sys/types.h>.
4297         (sigset_t): Use the system's definition if present.
4298
4299 2006-10-17  Eric Blake  <ebb9@byu.net>
4300
4301         * lib/xvasprintf.c (includes): Assume config.h.
4302         * lib/xasprintf.c (includes): Likewise.
4303
4304 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
4305
4306         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
4307         at least as wide as intmax_t.
4308
4309 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
4310
4311         (Imported from Automake.)
4312         * build-aux/gnupload: Update to version 1.1 of directive file.
4313
4314 2006-10-16  Eric Blake  <ebb9@byu.net>
4315
4316         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
4317         match Automake 1.10a.
4318
4319 2006-10-14  Bruno Haible  <bruno@clisp.org>
4320
4321         * modules/sigprocmask: New file.
4322         * lib/sigprocmask.h: New file.
4323         * lib/sigprocmask.c: New file.
4324         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
4325         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
4326         request sigprocmask.o.
4327         (gl_PREREQ_SIGPROCMASK): New macro.
4328         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
4329         (Depends-on): Add sigprocmask.
4330         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
4331         gt_SIGNALBLOCKING. Test for 'raise' only once.
4332         * lib/fatal-signal.c: Include sigprocmask.h.
4333         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
4334         unblock_fatal_signals): Define always.
4335         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
4336         sigprocmask.
4337
4338 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
4339
4340         Sync from Automake.
4341         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
4342         which incorrectly sets the mode of an existing destination
4343         directory.  In some cases the unpatched install-sh could do the
4344         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
4345         system.  We hope this is rare in practice, but it's clearly worth
4346         fixing.  Problem reported by Alex Unleashed in
4347         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
4348         Also, don't bother to check for -m bugs unless we're using -m;
4349         suggested by Stepan Kasal.
4350
4351 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4352
4353         Sync from Automake.
4354         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
4355         `-c' flag, so they appear at the same position as in %FASTDEP%
4356         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
4357         which ignores unknown options only after the first non-option.
4358         Bug report against M4 by Nelson H. F. Beebe.
4359
4360 2006-10-13  Jim Meyering  <jim@meyering.net>
4361
4362         Fix a bug in yesterday's change.
4363         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
4364         p->fts_statp->st_dev would be used uninitialized.
4365         Ensures that we always call fts_stat on the very first entry.
4366         Miklos Szeredi reported that find -xdev stopped working.
4367
4368 2006-10-12  Bruno Haible  <bruno@clisp.org>
4369
4370         * gnulib-tool (func_get_automake_snippet): Append an automatically
4371         computed EXTRA_DIST augmentation.
4372         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
4373         * modules/alloca-opt (Makefile.am): Likewise.
4374         * modules/allocsa (Makefile.am): Likewise.
4375         * modules/arcfour (Makefile.am): Likewise.
4376         * modules/arctwo (Makefile.am): Likewise.
4377         * modules/argmatch (Makefile.am): Likewise.
4378         * modules/argz (Makefile.am): Likewise.
4379         * modules/atexit (Makefile.am): Likewise.
4380         * modules/backupfile (Makefile.am): Likewise.
4381         * modules/byteswap (Makefile.am): Likewise.
4382         * modules/c-strtod (Makefile.am): Likewise.
4383         * modules/c-strtold (Makefile.am): Likewise.
4384         * modules/calloc (Makefile.am): Likewise.
4385         * modules/canon-host (Makefile.am): Likewise.
4386         * modules/canonicalize (Makefile.am): Likewise.
4387         * modules/chdir-long (Makefile.am): Likewise.
4388         * modules/chdir-safer (Makefile.am): Likewise.
4389         * modules/check-version (Makefile.am): Likewise.
4390         * modules/chown (Makefile.am): Likewise.
4391         * modules/cloexec (Makefile.am): Likewise.
4392         * modules/close-stream (Makefile.am): Likewise.
4393         * modules/closeout (Makefile.am): Likewise.
4394         * modules/crc (Makefile.am): Likewise.
4395         * modules/csharpexec (Makefile.am): Likewise.
4396         * modules/cycle-check (Makefile.am): Likewise.
4397         * modules/des (Makefile.am): Likewise.
4398         * modules/dev-ino (Makefile.am): Likewise.
4399         * modules/dirfd (Makefile.am): Likewise.
4400         * modules/dirname (Makefile.am): Likewise.
4401         * modules/dup2 (Makefile.am): Likewise.
4402         * modules/eealloc (Makefile.am): Likewise.
4403         * modules/error (Makefile.am): Likewise.
4404         * modules/euidaccess (Makefile.am): Likewise.
4405         * modules/exclude (Makefile.am): Likewise.
4406         * modules/exitfail (Makefile.am): Likewise.
4407         * modules/fcntl-safer (Makefile.am): Likewise.
4408         * modules/fcntl (Makefile.am): Likewise.
4409         * modules/file-type (Makefile.am): Likewise.
4410         * modules/fileblocks (Makefile.am): Likewise.
4411         * modules/filemode (Makefile.am): Likewise.
4412         * modules/filenamecat (Makefile.am): Likewise.
4413         * modules/fnmatch (Makefile.am): Likewise.
4414         * modules/fopen-safer (Makefile.am): Likewise.
4415         * modules/fpending (Makefile.am): Likewise.
4416         * modules/fprintftime (Makefile.am): Likewise.
4417         * modules/free (Makefile.am): Likewise.
4418         * modules/fsusage (Makefile.am): Likewise.
4419         * modules/ftruncate (Makefile.am): Likewise.
4420         * modules/fts (Makefile.am): Likewise.
4421         * modules/gc-arcfour (Makefile.am): Likewise.
4422         * modules/gc-des (Makefile.am): Likewise.
4423         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4424         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4425         * modules/gc-md4 (Makefile.am): Likewise.
4426         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4427         * modules/gc-sha1 (Makefile.am): Likewise.
4428         * modules/gc (Makefile.am): Likewise.
4429         * modules/getaddrinfo (Makefile.am): Likewise.
4430         * modules/getcwd (Makefile.am): Likewise.
4431         * modules/getdelim (Makefile.am): Likewise.
4432         * modules/getdomainname (Makefile.am): Likewise.
4433         * modules/getgroups (Makefile.am): Likewise.
4434         * modules/gethostname (Makefile.am): Likewise.
4435         * modules/gethrxtime (Makefile.am): Likewise.
4436         * modules/getline (Makefile.am): Likewise.
4437         * modules/getloadavg (Makefile.am): Likewise.
4438         * modules/getlogin_r (Makefile.am): Likewise.
4439         * modules/getndelim2 (Makefile.am): Likewise.
4440         * modules/getopt (Makefile.am): Likewise.
4441         * modules/getpagesize (Makefile.am): Likewise.
4442         * modules/getpass-gnu (Makefile.am): Likewise.
4443         * modules/getpass (Makefile.am): Likewise.
4444         * modules/getsubopt (Makefile.am): Likewise.
4445         * modules/gettime (Makefile.am): Likewise.
4446         * modules/gettimeofday (Makefile.am): Likewise.
4447         * modules/getugroups (Makefile.am): Likewise.
4448         * modules/getusershell (Makefile.am): Likewise.
4449         * modules/glob (Makefile.am): Likewise.
4450         * modules/group-member (Makefile.am): Likewise.
4451         * modules/hard-locale (Makefile.am): Likewise.
4452         * modules/hash (Makefile.am): Likewise.
4453         * modules/hmac-md5 (Makefile.am): Likewise.
4454         * modules/hmac-sha1 (Makefile.am): Likewise.
4455         * modules/human (Makefile.am): Likewise.
4456         * modules/idcache (Makefile.am): Likewise.
4457         * modules/imaxabs (Makefile.am): Likewise.
4458         * modules/imaxdiv (Makefile.am): Likewise.
4459         * modules/inet_ntop (Makefile.am): Likewise.
4460         * modules/inet_pton (Makefile.am): Likewise.
4461         * modules/intprops (Makefile.am): Likewise.
4462         * modules/inttostr (Makefile.am): Likewise.
4463         * modules/inttypes (Makefile.am): Likewise.
4464         * modules/isapipe (Makefile.am): Likewise.
4465         * modules/javaversion (Makefile.am): Likewise.
4466         * modules/lchmod (Makefile.am): Likewise.
4467         * modules/lchown (Makefile.am): Likewise.
4468         * modules/localcharset (Makefile.am): Likewise.
4469         * modules/long-options (Makefile.am): Likewise.
4470         * modules/lstat (Makefile.am): Likewise.
4471         * modules/malloc (Makefile.am): Likewise.
4472         * modules/mathl (Makefile.am): Likewise.
4473         * modules/mbchar (Makefile.am): Likewise.
4474         * modules/md2 (Makefile.am): Likewise.
4475         * modules/md4 (Makefile.am): Likewise.
4476         * modules/md5 (Makefile.am): Likewise.
4477         * modules/memcasecmp (Makefile.am): Likewise.
4478         * modules/memchr (Makefile.am): Likewise.
4479         * modules/memcmp (Makefile.am): Likewise.
4480         * modules/memcoll (Makefile.am): Likewise.
4481         * modules/memcpy (Makefile.am): Likewise.
4482         * modules/memmem (Makefile.am): Likewise.
4483         * modules/memmove (Makefile.am): Likewise.
4484         * modules/mempcpy (Makefile.am): Likewise.
4485         * modules/memrchr (Makefile.am): Likewise.
4486         * modules/memset (Makefile.am): Likewise.
4487         * modules/memxor (Makefile.am): Likewise.
4488         * modules/mkancesdirs (Makefile.am): Likewise.
4489         * modules/mkdir-p (Makefile.am): Likewise.
4490         * modules/mkdir (Makefile.am): Likewise.
4491         * modules/mkdtemp (Makefile.am): Likewise.
4492         * modules/mkstemp (Makefile.am): Likewise.
4493         * modules/mktime (Makefile.am): Likewise.
4494         * modules/modechange (Makefile.am): Likewise.
4495         * modules/mountlist (Makefile.am): Likewise.
4496         * modules/nanosleep (Makefile.am): Likewise.
4497         * modules/obstack (Makefile.am): Likewise.
4498         * modules/openat (Makefile.am): Likewise.
4499         * modules/pagealign_alloc (Makefile.am): Likewise.
4500         * modules/pathmax (Makefile.am): Likewise.
4501         * modules/physmem (Makefile.am): Likewise.
4502         * modules/poll (Makefile.am): Likewise.
4503         * modules/posixtm (Makefile.am): Likewise.
4504         * modules/posixver (Makefile.am): Likewise.
4505         * modules/putenv (Makefile.am): Likewise.
4506         * modules/quote (Makefile.am): Likewise.
4507         * modules/quotearg (Makefile.am): Likewise.
4508         * modules/raise (Makefile.am): Likewise.
4509         * modules/read-file (Makefile.am): Likewise.
4510         * modules/readline (Makefile.am): Likewise.
4511         * modules/readlink (Makefile.am): Likewise.
4512         * modules/readtokens (Makefile.am): Likewise.
4513         * modules/readutmp (Makefile.am): Likewise.
4514         * modules/realloc (Makefile.am): Likewise.
4515         * modules/regex (Makefile.am): Likewise.
4516         * modules/rename-dest-slash (Makefile.am): Likewise.
4517         * modules/rename (Makefile.am): Likewise.
4518         * modules/rijndael (Makefile.am): Likewise.
4519         * modules/rmdir (Makefile.am): Likewise.
4520         * modules/rpmatch (Makefile.am): Likewise.
4521         * modules/safe-read (Makefile.am): Likewise.
4522         * modules/safe-write (Makefile.am): Likewise.
4523         * modules/same-inode (Makefile.am): Likewise.
4524         * modules/same (Makefile.am): Likewise.
4525         * modules/save-cwd (Makefile.am): Likewise.
4526         * modules/savedir (Makefile.am): Likewise.
4527         * modules/setenv (Makefile.am): Likewise.
4528         * modules/settime (Makefile.am): Likewise.
4529         * modules/sha1 (Makefile.am): Likewise.
4530         * modules/sig2str (Makefile.am): Likewise.
4531         * modules/snprintf (Makefile.am): Likewise.
4532         * modules/stat-macros (Makefile.am): Likewise.
4533         * modules/stat-time (Makefile.am): Likewise.
4534         * modules/stdbool (Makefile.am): Likewise.
4535         * modules/stdint (Makefile.am): Likewise.
4536         * modules/stdlib-safer (Makefile.am): Likewise.
4537         * modules/stpcpy (Makefile.am): Likewise.
4538         * modules/stpncpy (Makefile.am): Likewise.
4539         * modules/strcase (Makefile.am): Likewise.
4540         * modules/strcasestr (Makefile.am): Likewise.
4541         * modules/strchrnul (Makefile.am): Likewise.
4542         * modules/strcspn (Makefile.am): Likewise.
4543         * modules/strdup (Makefile.am): Likewise.
4544         * modules/strerror (Makefile.am): Likewise.
4545         * modules/strftime (Makefile.am): Likewise.
4546         * modules/strndup (Makefile.am): Likewise.
4547         * modules/strnlen (Makefile.am): Likewise.
4548         * modules/strpbrk (Makefile.am): Likewise.
4549         * modules/strsep (Makefile.am): Likewise.
4550         * modules/strstr (Makefile.am): Likewise.
4551         * modules/strtod (Makefile.am): Likewise.
4552         * modules/strtoimax (Makefile.am): Likewise.
4553         * modules/strtok_r (Makefile.am): Likewise.
4554         * modules/strtol (Makefile.am): Likewise.
4555         * modules/strtoll (Makefile.am): Likewise.
4556         * modules/strtoul (Makefile.am): Likewise.
4557         * modules/strtoull (Makefile.am): Likewise.
4558         * modules/strtoumax (Makefile.am): Likewise.
4559         * modules/strverscmp (Makefile.am): Likewise.
4560         * modules/sys_socket (Makefile.am): Likewise.
4561         * modules/sys_stat (Makefile.am): Likewise.
4562         * modules/sysexits (Makefile.am): Likewise.
4563         * modules/time_r (Makefile.am): Likewise.
4564         * modules/timegm (Makefile.am): Likewise.
4565         * modules/timespec (Makefile.am): Likewise.
4566         * modules/tmpfile-safer (Makefile.am): Likewise.
4567         * modules/trim (Makefile.am): Likewise.
4568         * modules/unistd-safer (Makefile.am): Likewise.
4569         * modules/unlinkdir (Makefile.am): Likewise.
4570         * modules/unlocked-io (Makefile.am): Likewise.
4571         * modules/userspec (Makefile.am): Likewise.
4572         * modules/utime (Makefile.am): Likewise.
4573         * modules/utimecmp (Makefile.am): Likewise.
4574         * modules/utimens (Makefile.am): Likewise.
4575         * modules/vasnprintf (Makefile.am): Likewise.
4576         * modules/vasprintf (Makefile.am): Likewise.
4577         * modules/vsnprintf (Makefile.am): Likewise.
4578         * modules/xalloc (Makefile.am): Likewise.
4579         * modules/xgetcwd (Makefile.am): Likewise.
4580         * modules/xnanosleep (Makefile.am): Likewise.
4581         * modules/xreadlink (Makefile.am): Likewise.
4582         * modules/xstrtod (Makefile.am): Likewise.
4583         * modules/xstrtol (Makefile.am): Likewise.
4584         * modules/xstrtold (Makefile.am): Likewise.
4585         * modules/yesno (Makefile.am): Likewise.
4586         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4587
4588 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4589
4590         * modules/error (Makefile.am): Distribute files through
4591         EXTRA_DIST, not lib_SOURCES.
4592
4593 2006-10-12  Eric Blake  <ebb9@byu.net>
4594
4595         * modules/error (Makefile.am): Distribute files in /lib.
4596         * modules/obstack (Makefile.am): Likewise.
4597
4598 2006-10-12  Bruno Haible  <bruno@clisp.org>
4599
4600         * modules/acl (Makefile.am): Distribute all files in lib/ through
4601         EXTRA_DIST.
4602         * modules/arcfour (Makefile.am): Likewise.
4603         * modules/arctwo (Makefile.am): Likewise.
4604         * modules/argmatch (Makefile.am): Likewise.
4605         * modules/argz (Makefile.am): Likewise.
4606         * modules/atexit (Makefile.am): Likewise.
4607         * modules/backupfile (Makefile.am): Likewise.
4608         * modules/c-strtod (Makefile.am): Likewise.
4609         * modules/c-strtold (Makefile.am): Likewise.
4610         * modules/calloc (Makefile.am): Likewise.
4611         * modules/canon-host (Makefile.am): Likewise.
4612         * modules/canonicalize (Makefile.am): Likewise.
4613         * modules/chdir-long (Makefile.am): Likewise.
4614         * modules/chdir-safer (Makefile.am): Likewise.
4615         * modules/check-version (Makefile.am): Likewise.
4616         * modules/chown (Makefile.am): Likewise.
4617         * modules/cloexec (Makefile.am): Likewise.
4618         * modules/close-stream (Makefile.am): Likewise.
4619         * modules/closeout (Makefile.am): Likewise.
4620         * modules/crc (Makefile.am): Likewise.
4621         * modules/cycle-check (Makefile.am): Likewise.
4622         * modules/des (Makefile.am): Likewise.
4623         * modules/dirfd (Makefile.am): Likewise.
4624         * modules/dirname (Makefile.am): Likewise.
4625         * modules/dup2 (Makefile.am): Likewise.
4626         * modules/euidaccess (Makefile.am): Likewise.
4627         * modules/exclude (Makefile.am): Likewise.
4628         * modules/exitfail (Makefile.am): Likewise.
4629         * modules/fcntl-safer (Makefile.am): Likewise.
4630         * modules/file-type (Makefile.am): Likewise.
4631         * modules/fileblocks (Makefile.am): Likewise.
4632         * modules/filemode (Makefile.am): Likewise.
4633         * modules/filenamecat (Makefile.am): Likewise.
4634         * modules/fnmatch (Makefile.am): Likewise.
4635         * modules/fopen-safer (Makefile.am): Likewise.
4636         * modules/fpending (Makefile.am): Likewise.
4637         * modules/fprintftime (Makefile.am): Likewise.
4638         * modules/free (Makefile.am): Likewise.
4639         * modules/fsusage (Makefile.am): Likewise.
4640         * modules/ftruncate (Makefile.am): Likewise.
4641         * modules/fts (Makefile.am): Likewise.
4642         * modules/gc (Makefile.am): Likewise.
4643         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4644         * modules/getaddrinfo (Makefile.am): Likewise.
4645         * modules/getcwd (Makefile.am): Likewise.
4646         * modules/getdelim (Makefile.am): Likewise.
4647         * modules/getdomainname (Makefile.am): Likewise.
4648         * modules/getgroups (Makefile.am): Likewise.
4649         * modules/gethostname (Makefile.am): Likewise.
4650         * modules/gethrxtime (Makefile.am): Likewise.
4651         * modules/getline (Makefile.am): Likewise.
4652         * modules/getloadavg (Makefile.am): Likewise.
4653         * modules/getlogin_r (Makefile.am): Likewise.
4654         * modules/getopt (Makefile.am): Likewise.
4655         * modules/getpass (Makefile.am): Likewise.
4656         * modules/getpass-gnu (Makefile.am): Likewise.
4657         * modules/getsubopt (Makefile.am): Likewise.
4658         * modules/gettime (Makefile.am): Likewise.
4659         * modules/gettimeofday (Makefile.am): Likewise.
4660         * modules/getugroups (Makefile.am): Likewise.
4661         * modules/getusershell (Makefile.am): Likewise.
4662         * modules/glob (Makefile.am): Likewise.
4663         * modules/group-member (Makefile.am): Likewise.
4664         * modules/hard-locale (Makefile.am): Likewise.
4665         * modules/hash (Makefile.am): Likewise.
4666         * modules/hmac-md5 (Makefile.am): Likewise.
4667         * modules/hmac-sha1 (Makefile.am): Likewise.
4668         * modules/human (Makefile.am): Likewise.
4669         * modules/idcache (Makefile.am): Likewise.
4670         * modules/imaxabs (Makefile.am): Likewise.
4671         * modules/imaxdiv (Makefile.am): Likewise.
4672         * modules/inet_ntop (Makefile.am): Likewise.
4673         * modules/inet_pton (Makefile.am): Likewise.
4674         * modules/inttostr (Makefile.am): Likewise.
4675         * modules/isapipe (Makefile.am): Likewise.
4676         * modules/lchown (Makefile.am): Likewise.
4677         * modules/long-options (Makefile.am): Likewise.
4678         * modules/lstat (Makefile.am): Likewise.
4679         * modules/malloc (Makefile.am): Likewise.
4680         * modules/mathl (Makefile.am): Likewise.
4681         * modules/mbchar (Makefile.am): Likewise.
4682         * modules/md2 (Makefile.am): Likewise.
4683         * modules/md4 (Makefile.am): Likewise.
4684         * modules/md5 (Makefile.am): Likewise.
4685         * modules/memcasecmp (Makefile.am): Likewise.
4686         * modules/memchr (Makefile.am): Likewise.
4687         * modules/memcmp (Makefile.am): Likewise.
4688         * modules/memcoll (Makefile.am): Likewise.
4689         * modules/memcpy (Makefile.am): Likewise.
4690         * modules/memmem (Makefile.am): Likewise.
4691         * modules/memmove (Makefile.am): Likewise.
4692         * modules/mempcpy (Makefile.am): Likewise.
4693         * modules/memrchr (Makefile.am): Likewise.
4694         * modules/memset (Makefile.am): Likewise.
4695         * modules/memxor (Makefile.am): Likewise.
4696         * modules/mkancesdirs (Makefile.am): Likewise.
4697         * modules/mkdir (Makefile.am): Likewise.
4698         * modules/mkdir-p (Makefile.am): Likewise.
4699         * modules/mkdtemp (Makefile.am): Likewise.
4700         * modules/mkstemp (Makefile.am): Likewise.
4701         * modules/mktime (Makefile.am): Likewise.
4702         * modules/modechange (Makefile.am): Likewise.
4703         * modules/mountlist (Makefile.am): Likewise.
4704         * modules/nanosleep (Makefile.am): Likewise.
4705         * modules/openat (Makefile.am): Likewise.
4706         * modules/pagealign_alloc (Makefile.am): Likewise.
4707         * modules/physmem (Makefile.am): Likewise.
4708         * modules/poll (Makefile.am): Likewise.
4709         * modules/posixtm (Makefile.am): Likewise.
4710         * modules/posixver (Makefile.am): Likewise.
4711         * modules/putenv (Makefile.am): Likewise.
4712         * modules/quote (Makefile.am): Likewise.
4713         * modules/quotearg (Makefile.am): Likewise.
4714         * modules/raise (Makefile.am): Likewise.
4715         * modules/read-file (Makefile.am): Likewise.
4716         * modules/readline (Makefile.am): Likewise.
4717         * modules/readlink (Makefile.am): Likewise.
4718         * modules/readtokens (Makefile.am): Likewise.
4719         * modules/readutmp (Makefile.am): Likewise.
4720         * modules/realloc (Makefile.am): Likewise.
4721         * modules/regex (Makefile.am): Likewise.
4722         * modules/rename (Makefile.am): Likewise.
4723         * modules/rename-dest-slash (Makefile.am): Likewise.
4724         * modules/rijndael (Makefile.am): Likewise.
4725         * modules/rmdir (Makefile.am): Likewise.
4726         * modules/rpmatch (Makefile.am): Likewise.
4727         * modules/safe-read (Makefile.am): Likewise.
4728         * modules/safe-write (Makefile.am): Likewise.
4729         * modules/same (Makefile.am): Likewise.
4730         * modules/save-cwd (Makefile.am): Likewise.
4731         * modules/savedir (Makefile.am): Likewise.
4732         * modules/setenv (Makefile.am): Likewise.
4733         * modules/settime (Makefile.am): Likewise.
4734         * modules/sha1 (Makefile.am): Likewise.
4735         * modules/sig2str (Makefile.am): Likewise.
4736         * modules/snprintf (Makefile.am): Likewise.
4737         * modules/stdlib-safer (Makefile.am): Likewise.
4738         * modules/stpcpy (Makefile.am): Likewise.
4739         * modules/stpncpy (Makefile.am): Likewise.
4740         * modules/strcase (Makefile.am): Likewise.
4741         * modules/strcasestr (Makefile.am): Likewise.
4742         * modules/strchrnul (Makefile.am): Likewise.
4743         * modules/strcspn (Makefile.am): Likewise.
4744         * modules/strdup (Makefile.am): Likewise.
4745         * modules/strerror (Makefile.am): Likewise.
4746         * modules/strftime (Makefile.am): Likewise.
4747         * modules/strndup (Makefile.am): Likewise.
4748         * modules/strnlen (Makefile.am): Likewise.
4749         * modules/strpbrk (Makefile.am): Likewise.
4750         * modules/strsep (Makefile.am): Likewise.
4751         * modules/strstr (Makefile.am): Likewise.
4752         * modules/strtod (Makefile.am): Likewise.
4753         * modules/strtoimax (Makefile.am): Likewise.
4754         * modules/strtok_r (Makefile.am): Likewise.
4755         * modules/strtol (Makefile.am): Likewise.
4756         * modules/strtoll (Makefile.am): Likewise.
4757         * modules/strtoul (Makefile.am): Likewise.
4758         * modules/strtoull (Makefile.am): Likewise.
4759         * modules/strtoumax (Makefile.am): Likewise.
4760         * modules/strverscmp (Makefile.am): Likewise.
4761         * modules/time_r (Makefile.am): Likewise.
4762         * modules/timegm (Makefile.am): Likewise.
4763         * modules/tmpfile-safer (Makefile.am): Likewise.
4764         * modules/unistd-safer (Makefile.am): Likewise.
4765         * modules/unlinkdir (Makefile.am): Likewise.
4766         * modules/userspec (Makefile.am): Likewise.
4767         * modules/utime (Makefile.am): Likewise.
4768         * modules/utimecmp (Makefile.am): Likewise.
4769         * modules/utimens (Makefile.am): Likewise.
4770         * modules/vasnprintf (Makefile.am): Likewise.
4771         * modules/vasprintf (Makefile.am): Likewise.
4772         * modules/vsnprintf (Makefile.am): Likewise.
4773         * modules/xalloc (Makefile.am): Likewise.
4774         * modules/xgetcwd (Makefile.am): Likewise.
4775         * modules/xnanosleep (Makefile.am): Likewise.
4776         * modules/xreadlink (Makefile.am): Likewise.
4777         * modules/xstrtod (Makefile.am): Likewise.
4778         * modules/xstrtol (Makefile.am): Likewise.
4779         * modules/xstrtold (Makefile.am): Likewise.
4780         * modules/yesno (Makefile.am): Likewise.
4781
4782 2006-10-12  Jim Meyering  <jim@meyering.net>
4783
4784         * m4/getloadavg.m4: Revert the change below.
4785
4786         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4787         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4788         fail with a symlink, which is what coreutils' ./bootstrap now
4789         creates by default.
4790
4791 2006-10-12  Bruno Haible  <bruno@clisp.org>
4792
4793         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4794         mingw.
4795         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4796         MSVC and mingw explicitly.
4797
4798 2006-10-11  Simon Josefsson  <jas@extundo.com>
4799             Bruno Haible  <bruno@clisp.org>
4800
4801         Add support for multiple gnulib-tool invocations in the scope of a
4802         single configure.ac file.
4803         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4804         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4805         with the same contents as the _LIBADD variable.
4806         (func_emit_initmacro_start, func_emit_initmacro_end,
4807         func_emit_initmacro_done): New functions.
4808         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4809         gl_LIBOBJS and gl_LTLIBOBJS.
4810
4811 2006-10-11  Bruno Haible  <bruno@clisp.org>
4812
4813         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4814         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4815         autoreconf. Instead, invoke autopoint explicitly but move back the
4816         *.m4 files from gnulib.
4817
4818 2006-10-11  Bruno Haible  <bruno@clisp.org>
4819
4820         * gnulib-tool (func_usage): Make module names after --create-testdir
4821         optional.
4822         (func_create_testdir): If no module was specified, use nearly all
4823         modules.
4824
4825 2006-10-12  Jim Meyering  <jim@meyering.net>
4826
4827         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4828         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4829         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4830         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4831         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4832         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4833         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4834         (fts_set_stat_required): New function.
4835         (fts_open): Defer the calls to fts_stat, if possible or requested.
4836         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4837         into fts_stat itself.
4838         (fts_read): Perform any required (deferred) fts_stat call.
4839         (fts_build): Likewise, for the directory we're about to open and read.
4840         In the readdir loop, carefully decide whether each entry will require
4841         an eventual call to fts_stat, using dirent.d_type info if available.
4842         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4843         a command line argument into this function.  Update all callers.
4844         Map a return value of FTS_DOT to FTS_D for a command line argument.
4845         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4846         Thanks to Miklos Szeredi for his tenacity and for the initial
4847         bug report about "find" failing on a FUSE-based file system.
4848
4849         * lib/fts.c (fts_open): Use consistent indentation.
4850
4851 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4852
4853         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4854         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4855         reported by Jim Meyering.  All uses of cache variables renamed
4856         to match Autoconf's.
4857         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4858         the other one.
4859
4860         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4861         Fix misspelling in diagnostic.
4862
4863 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4864
4865         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4866         defined.  Problem reported by Matthew Woehlke.
4867
4868         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4869         Add support for Tandem NonStop R series.
4870         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4871         Use new macro.
4872
4873         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4874         (has_trailing_slash): Omit size arg; all callers changed.
4875         Omit 'inline', since it doesn't help performance and we'd
4876         need to configure it.
4877         Don't count //, ///, etc. as having a trailing slash.
4878         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4879         (rpl_rename_dest_slash): On failure, use rename's errno rather
4880         than (in some cases) an incorrect or junk errno.
4881         Simplify code by removing need to compute length; this does
4882         cause it to make two passes instead of one over the file name,
4883         but it's worth it.
4884
4885         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4886         change, since Autoconf's version may no longer be appropriate now
4887         that we are using CVS Autoconf's version.  Add support for Tandem.
4888
4889 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4890             Bruno Haible  <bruno@clisp.org>
4891
4892         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4893         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4894         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4895         gl_AC_TYPE_LONG_LONG.
4896
4897         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4898         instead of HAVE_LONG_LONG.
4899         * lib/printf-args.c (printf_fetchargs): Likewise.
4900         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4901         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4902         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4903         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4904         gl_AC_TYPE_LONG_LONG.
4905
4906 2006-10-11  Bruno Haible  <bruno@clisp.org>
4907
4908         * m4/longlong.m4: Add comments.
4909         * m4/ulonglong.m4: Likewise.
4910
4911 2006-10-10  Bruno Haible  <bruno@clisp.org>
4912
4913         Make it possible to #define stpcpy, strdup to aliases.
4914         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
4915         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
4916
4917 2006-10-10  Bruno Haible  <bruno@clisp.org>
4918
4919         Make it possible to #define gcd to an alias.
4920         * lib/gcd.c: Include config.h.
4921
4922 2006-10-10  Bruno Haible  <bruno@clisp.org>
4923
4924         Make it possible to #define c_isascii to an alias.
4925         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
4926         defined. Undefine the macros before defining them, to avoid gcc
4927         warnings.
4928         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
4929         define NO_C_CTYPE_MACROS early.
4930
4931 2006-10-10  Bruno Haible  <bruno@clisp.org>
4932
4933         Make it possible to #define set_program_name to an alias.
4934         * lib/progname.c: Don't undefine set_program_name; instead, undefine
4935         ENABLE_RELOCATABLE early.
4936
4937 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
4938
4939         Port to Tandem NSK OSS, which has 64-bit signed int but at most
4940         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
4941         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
4942         More generally, don't assume that 64-bit signed int is available
4943         if unsigned int is, and vice versa.
4944         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
4945         unsigned symbols, not on their signed counterparts.
4946         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
4947         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
4948         (UINT64_C, UINTMAX_C):
4949         Likewise.
4950         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
4951         unsigned counterparts.
4952         (Have_long_long, Unsigned): New macros.
4953         (Int): Renamed from INT.
4954         (strtoimax): Use the new macros.
4955         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
4956         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
4957         * modules/inttypes (inttypes.h): Substitute
4958         HAVE_UNSIGNED_LONG_LONG_INT.
4959         * modules/stdint (stdint.h): Likewise.
4960         (Files): Add m4/ulonglong.m4.
4961
4962 2006-10-10  Bruno Haible  <bruno@clisp.org>
4963
4964         Fix a gcc -Wshadow warning.
4965         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
4966         to 'bucket'.
4967         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4968         gl_linked_indexof_from_to): Likewise.
4969         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4970         Likewise.
4971         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4972         Likewise.
4973         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4974         Reported by Eric Blake.
4975
4976 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4977
4978         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4979         for NetBSD.  Problem reported by Bruno Haible.
4980
4981 2006-10-09  Jim Meyering  <jim@meyering.net>
4982
4983         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4984         Patch from Bruno Haible.
4985
4986 2006-10-09  Jim Meyering  <jim@meyering.net>
4987
4988         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4989         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4990         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4991
4992 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4993
4994         Don't include <config.h> twice; this doesn't work in some cases,
4995         e.g., when config.h has "#define intmax_t long long int" and
4996         we include <config.h>, <inttypes.h>, <config.h> in that order.
4997         Problem reported by Matthew Woehlke in:
4998         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4999         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
5000         * lib/fts-cycle.c: Don't include config.h.
5001         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
5002         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
5003         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
5004         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
5005         inttypes.h.
5006         * lib/xstrtoumax.c: Likewise.
5007         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
5008         __strtol and the like, so that this module is more like its siblings.
5009         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
5010         Remove; no longer needed now that we assume gnulib inttypes.h.
5011
5012 2006-10-08  Bruno Haible  <bruno@clisp.org>
5013
5014         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
5015         option.
5016
5017 2006-10-07  Jim Meyering  <jim@meyering.net>
5018
5019         * modules/inttypes (inttypes.h): Revert what seems to have been
5020         an inadvertent part of today's change: use "|", not "/" in the
5021         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
5022
5023 2006-10-07  Bruno Haible  <bruno@clisp.org>
5024
5025         * modules/sublist: New file.
5026
5027 2006-10-07  Bruno Haible  <bruno@clisp.org>
5028
5029         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
5030         * modules/argz (argz.h): Likewise.
5031         * modules/arpa_inet (arpa/inet.h): Likewise.
5032         * modules/byteswap (byteswap.h): Likewise.
5033         * modules/configmake (configmake.h): Likewise.
5034         * modules/fcntl (fcntl.h): Likewise.
5035         * modules/fnmatch (fnmatch.h): Likewise.
5036         * modules/getopt (getopt.h): Likewise.
5037         * modules/glob (glob.h): Likewise.
5038         * modules/inttypes (inttypes.h): Likewise.
5039         * modules/netinet_in (netinet/in.h): Likewise.
5040         * modules/poll (poll.h): Likewise.
5041         * modules/stdbool (stdbool.h): Likewise.
5042         * modules/stdint (stdint.h): Likewise.
5043         * modules/sys_select (sys/select.h): Likewise.
5044         * modules/sys_socket (sys/socket.h): Likewise.
5045         * modules/sys_stat (sys/stat.h): Likewise.
5046         * modules/sysexits (sysexits.h): Likewise.
5047         * modules/unistd (unistd.h): Likewise.
5048         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5049         Add a "DO NOT EDIT" comment to the generated file.
5050         (func_import): Likewise for gnulib-comp.m4.
5051
5052 2006-10-07  Bruno Haible  <bruno@clisp.org>
5053
5054         * lib/gl_sublist.h: New file.
5055         * lib/gl_sublist.c: New file.
5056
5057 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
5058
5059         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
5060         name (relative to the original working directory) and the file
5061         name component (relative to the temporary working directory).  All
5062         callers changed.
5063         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
5064         * lib/mkdir-p.c (make_dir_parents): Likewise.
5065         * lib/mkdir-p.h (make_dir_parents): Likewise.
5066
5067 2006-10-06  Eric Blake  <ebb9@byu.net>
5068
5069         Define several macros for use by the clean-temp module.
5070         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
5071         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
5072         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
5073
5074         * lib/clean-temp.h (close_stream_temp): New declaration.
5075         * lib/clean-temp.c (includes): Pull in headers according to what
5076         other modules are in use.
5077         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
5078
5079 2006-10-06  Bruno Haible  <bruno@clisp.org>
5080
5081         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
5082         instead of fopen, fwriteerror.
5083
5084 2006-10-06  Bruno Haible  <bruno@clisp.org>
5085
5086         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
5087         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
5088         int.
5089         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
5090         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
5091         Return an error indicator.
5092         Suggested by Eric Blake.
5093
5094 2006-10-06  Bruno Haible  <bruno@clisp.org>
5095
5096         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
5097         Reported by Eric Blake.
5098
5099 2006-10-06  Bruno Haible  <bruno@clisp.org>
5100
5101         * modules/closeout (Description): Mention stderr too.
5102
5103 2006-10-06  Bruno Haible  <bruno@clisp.org>
5104         and Paul Eggert  <eggert@cs.ucla.edu>
5105
5106         * lib/closeout.c (close_stdout): Also close stderr.
5107         * lib/closeout.h: Update comment.
5108
5109 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
5110
5111         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
5112         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
5113         * lib/dirchownmod.c: Include lchown.h.
5114         * lib/lchown.c: Don't include files that lchown.h now includes.
5115         Don't declare chown, since lchown.h now does that.
5116         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
5117         (lchown): Define to rpl_chown if lchown is declared but
5118         does not exist.  Declare using a prototype if lchown is not
5119         declared.  Add a copyright notice.
5120         * lib/mkstemp.h: Include <unistd.h>.
5121         * lib/openat.c: Include lchown.h.
5122
5123         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
5124         we now test for that separately.
5125         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
5126         rather than O_NOFOLLOW, when testing whether it's possible to
5127         avoid a race condition reliably.
5128         * lib/savewd.c (savewd_chdir): Likewise.
5129
5130         Remove macros that are no longer needed now that stdint.h is
5131         reliable.
5132         * lib/fsusage.c (UINTMAX_MAX): Remove.
5133         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
5134         * lib/utimecmp.c (SIZE_MAX): Remove.
5135
5136         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
5137
5138         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
5139         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
5140         O_NOATIME works.
5141
5142 2006-10-05  Bruno Haible  <bruno@clisp.org>
5143
5144         * lib/gl_list.h (gl_sortedlist_search_from_to,
5145         gl_sortedlist_indexof_from_to): New declarations.
5146         (gl_list_implementation): New fields sortedlist_search_from_to,
5147         sortedlist_indexof_from_to.
5148         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
5149         inline functions.
5150         * lib/gl_list.c (gl_sortedlist_search_from_to,
5151         gl_sortedlist_indexof_from_to): New functions.
5152         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
5153         function.
5154         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
5155         (gl_array_sortedlist_search_from_to): New function.
5156         (gl_array_list_implementation): Update.
5157         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
5158         function.
5159         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
5160         (gl_carray_sortedlist_search_from_to): New function.
5161         (gl_carray_list_implementation): Update.
5162         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
5163         gl_linked_sortedlist_indexof_from_to): New functions.
5164         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5165         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5166         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
5167         gl_tree_sortedlist_indexof_from_to): New functions.
5168         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5169         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5170         Update.
5171         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5172         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
5173         Update.
5174
5175 2006-10-05  Bruno Haible  <bruno@clisp.org>
5176
5177         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
5178         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
5179         (struct gl_list_implementation): Add fields search_from_to,
5180         indexof_from_to. Remove fields search, indexof.
5181         (gl_list_search): Use the search_from_to method.
5182         (gl_list_search_from, gl_list_search_from_to): New functions.
5183         (gl_list_indexof): Use the indexof_from_to method.
5184         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
5185         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
5186         (gl_list_search_from, gl_list_search_from_to): New functions.
5187         (gl_list_indexof): Use the indexof_from_to method.
5188         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
5189         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
5190         gl_array_indexof. Add start_index, end_index arguments.
5191         (gl_array_search_from_to): Renamed from gl_array_search. Add
5192         start_index, end_index arguments.
5193         (gl_array_remove, gl_array_list_implementation): Update.
5194         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
5195         gl_carray_indexof. Add start_index, end_index arguments.
5196         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
5197         start_index, end_index arguments.
5198         (gl_carray_remove, gl_carray_list_implementation): Update.
5199         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
5200         gl_linked_search. Add start_index, end_index arguments.
5201         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
5202         start_index, end_index arguments.
5203         (gl_linked_remove): Update.
5204         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5205         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5206         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
5207         field to 'size_t'.
5208         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
5209         gl_tree_search. Add start_index, end_index arguments.
5210         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5211         start_index, end_index arguments.
5212         (gl_tree_remove): Update.
5213         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5214         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5215         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
5216         function.
5217         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
5218         gl_tree_search. Add start_index, end_index arguments.
5219         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5220         start_index, end_index arguments.
5221         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5222         Update.
5223         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
5224
5225 2006-10-05  Bruno Haible  <bruno@clisp.org>
5226
5227         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
5228
5229         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
5230         fwriteerror_temp): New declarations.
5231         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
5232         (descriptors): New variable.
5233         (cleanup): First, close the descriptors.
5234         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
5235         fclose_temp, fwriteerror_temp): New functions.
5236
5237 2006-10-04  Jim Meyering  <jim@meyering.net>
5238
5239         * lib/fts.c (fts_open): Tiny comment change.
5240
5241 2006-10-04  Bruno Haible  <bruno@clisp.org>
5242
5243         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
5244         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
5245         gl_LOCK_BODY.
5246         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
5247         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
5248         gl_LOCK_EARLY_BODY.
5249         (gl_LOCK): Require gl_LOCK_BODY.
5250
5251 2006-10-04  Bruno Haible  <bruno@clisp.org>
5252
5253         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
5254         (gl_oset_search_atleast): New declaration.
5255         (struct gl_oset_implementation): Add field 'search_atleast'.
5256         (gl_oset_search_atleast): New inline function.
5257         * lib/gl_oset.c (gl_oset_search_atleast): New function.
5258         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
5259         (gl_array_oset_implementation): Update.
5260         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
5261         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
5262         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
5263
5264 2006-10-04  Bruno Haible  <bruno@clisp.org>
5265
5266         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
5267
5268 2006-10-03  Bruno Haible  <bruno@clisp.org>
5269
5270         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
5271         from gl_avltreehash_list_implementation.
5272
5273 2006-10-03  Bruno Haible  <bruno@clisp.org>
5274
5275         * lib/gl_oset.c (gl_oset_add): Fix return type.
5276
5277 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
5278
5279         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
5280
5281 2006-10-02  Eric Blake  <ebb9@byu.net>
5282
5283         * modules/strnlen (Depends-on): Add extensions.
5284
5285 2006-10-02  Eric Blake  <ebb9@byu.net>
5286
5287         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
5288         definition in 2.60+.
5289
5290 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
5291
5292         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
5293         checks.
5294
5295 2006-10-02  Bruno Haible  <bruno@clisp.org>
5296
5297         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
5298         to the AUTOMAKE_OPTIONS.
5299         Reported by Jim Meyering.
5300
5301 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
5302
5303         Work around bug in Solaris 10 /proc file system:
5304         /proc/self/fd/NNN/.. isn't the parent directory of
5305         the directory whose file descriptor is NNN.  This needs to
5306         be worked around at run time, not compile time, since a
5307         program might be built on Solaris 8, where things work, and
5308         run on Solaris 10.
5309         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
5310         to use the following interface instead:
5311         (OPENAT_BUFFER_SIZE): New macro.
5312         (openat_proc_name): New function.
5313         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
5314         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
5315         Likewise.
5316         * lib/openat-proc.c: New file.
5317         * modules/openat (Files): Add lib/openat-proc.c.
5318         (Depends-on): Add same-inode, stdbool.
5319         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
5320
5321 2006-09-29  Bruno Haible  <bruno@clisp.org>
5322
5323         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
5324         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
5325         argument. Set stdout_closed before testing for ferror, not after.
5326         (fwriteerror, fwriteerror_no_ebadf): New functions.
5327
5328 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5329
5330         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
5331
5332 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
5333
5334         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
5335         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
5336
5337 2006-09-28  Jim Meyering  <jim@meyering.net>
5338
5339         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
5340         Include <unistd.h>.
5341
5342 2006-09-28  Bruno Haible  <bruno@clisp.org>
5343
5344         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
5345         * modules/linkedhash-list (Depends-on): Likewise.
5346         * modules/rbtreehash-list (Depends-on): Likewise.
5347
5348 2006-09-28  Bruno Haible  <bruno@clisp.org>
5349
5350         * lib/strndup.h: Simplify the redefinition of strndup.
5351         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
5352         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
5353
5354 2006-09-28  Bruno Haible  <bruno@clisp.org>
5355
5356         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
5357         * lib/gl_linkedhash_list.c: Likewise.
5358         * lib/gl_rbtreehash_list.c: Likewise.
5359
5360 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
5361
5362         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
5363         getaddrinfo.
5364
5365         * lib/__fpending.h: Don't include <stdio_ext.h> unless
5366         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
5367         it causes <stdio_ext.h> to cause a compile-time error.
5368         Problem reported by Nelson H. F. Beebe.
5369         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
5370         of HAVE_DECL___PENDING.
5371
5372         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
5373         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
5374         declaration.
5375
5376 2006-09-27  Jim Meyering  <jim@meyering.net>
5377
5378         This file could end up with a definition for a function
5379         named __strndup, rather than rpl_strndup on a system with
5380         incomplete weak_alias support.
5381         * lib/strndup.c (strndup): Rename from __strndup.
5382         Remove #defines that used to map __strndup to strndup.
5383         Don't use K&R prototypes.
5384         Remove LIBC-related code, since this file is not sync'd with glibc.
5385         * lib/strndup.h: Revamp, accordingly.
5386         * m4/strndup.m4: Modernize.
5387
5388 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5389
5390         * modules/savewd (Depends-on): Add 'raise'.
5391         * lib/savewd.c: Include <signal.h>, for 'raise'.
5392
5393 2006-09-26  Jim Meyering  <jim@meyering.net>
5394
5395         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5396         when we detect Darwin 8.7.0's acl_get_file bug.
5397         Rearrange to perform the new (below) run-test while $LIBS
5398         contains any acl-related library.  Set USE_ACL at the end.
5399         (gl_ACL_GET_FILE): New function.
5400
5401 2006-09-26  Eric Blake  <ebb9@byu.net>
5402
5403         * lib/verror.c: Include <config.h> unconditionally.
5404
5405 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5406
5407         * modules/clock-time (Maintainer): Add self.
5408         * modules/getlogin_r (Depends-on): Add extensions.
5409
5410 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5411
5412         * modules/clock-time: New module.
5413         * modules/nanosleep (Depends-on): Add clock-time.
5414         * modules/gethrxtime (Depends-on): Likewise.
5415         * modules/gettime (Depends-on): Likewise.
5416         * modules/settime (Depends-on): Likewise.
5417
5418         * modules/fts-lgpl: Depend on openat.
5419         * modules/mkancesdirs: Depend on savewd.
5420         * modules/mkdir-p: Likewise.
5421
5422 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5423
5424         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5425
5426         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5427         `gl_have_arbitrary_file_name_length_limit' to
5428         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5429         actually works between configure runs.
5430
5431 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5432             Bruno Haible  <bruno@clisp.org>
5433
5434         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5435
5436 2006-09-25  Jim Meyering  <jim@meyering.net>
5437
5438         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5439         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5440
5441 2006-09-25  Eric Blake  <ebb9@byu.net>
5442
5443         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5444         exec's in 2006-09-18 patch when shuffling fds.
5445
5446 2006-09-25  Bruno Haible  <bruno@clisp.org>
5447
5448         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5449         Reported by Jim Meyering.
5450
5451 2006-09-24  Jim Meyering  <jim@meyering.net>
5452
5453         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5454         compare a pointer against a literal "0".  That caused failures with
5455         at least HP-UX's hpcc.
5456
5457 2006-09-22  Simon Josefsson  <jas@extundo.com>
5458
5459         * modules/gc-sha1:
5460         * modules/gc-md4:
5461         * modules/gc-hmac-sha1:
5462         * modules/gc-hmac-md5:
5463         * modules/gc-des:
5464         * modules/gc-arcfour: Distribute more files.
5465
5466 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5467
5468         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5469         (gl_linked_iterator_from_to): Initialize struct completely.
5470         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5471         (gl_tree_iterator_from_to): Likewise
5472         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5473         * lib/gl_array_list.c [lint] (gl_array_iterator)
5474         (gl_array_iterator_from_to): Likewise.
5475         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5476         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5477         (gl_carray_iterator_from_to): Likewise.
5478
5479         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5480         * lib/md4.c (md4_process_block): Remove unused variable.
5481         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5482         parentheses for clarity.
5483
5484 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5485
5486         * modules/bison-i18n (Depends-on): Add gettext.
5487
5488 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5489
5490         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5491         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5492         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5493         also add missing comma that caused broken test.
5494         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5495         stdlib.h, for `abort'.
5496         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5497         variables.
5498         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5499         include unistd.h if present, for `rmdir'.
5500         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5501         variables.
5502         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5503         in the process include standard headers for prototypes.
5504         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5505         gets declared on GNU/Linux.
5506         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5507         unistd.h, for `rmdir'.
5508         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5509
5510         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5511         always true.
5512         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5513
5514         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5515
5516 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5517
5518         * gnulib-tool (func_version): Create output all at once.  This
5519         may help avoid triggering unnecessary SIGPIPEs, and at any
5520         rate it doesn't hurt.
5521
5522 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5523             Bruno Haible  <bruno@clisp.org>
5524
5525         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5526         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5527         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5528
5529         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5530         (gl_FUNC_VASPRINTF): Invoke it.
5531
5532 2006-09-22  Bruno Haible  <bruno@clisp.org>
5533
5534         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5535         getloadavg.c as first argument.
5536
5537 2006-09-22  Bruno Haible  <bruno@clisp.org>
5538
5539         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5540         at the beginning of the gl_INIT macro.
5541         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5542         gl_GETLOADAVG.
5543
5544 2006-09-22  Bruno Haible  <bruno@clisp.org>
5545
5546         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5547         module.
5548         Suggested by Ralf Wildenhues.
5549
5550 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5551
5552         Import this patch from libc:
5553
5554         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5555
5556         * lib/regex_internal.c (re_string_reconstruct): Handle
5557         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5558         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5559         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5560         re_string_context_at.
5561
5562         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5563         now requires it.
5564         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5565         gl_REGEX now does it for us.
5566         (gl_REGEX): Add test taken from
5567         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5568
5569         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5570         Check that large offsets work.  Modernize Autoconf usages.
5571         Prefer "yes" to mean a good thing rather than a bad.
5572         Don't put "#define mkstemp" in config.h, as this might interfere
5573         with standard system headers that "#define mkstemp mkstemp64".
5574
5575         * modules/mkstemp (Depends-on): Add extensions, so that
5576         mkstemp is visible on some platforms.
5577         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5578         (Include): Change to "mkstemp.h" from <stdlib.h>.
5579         (Files): Add mkstemp.h.
5580
5581         * lib/mkstemp.h: New file, since some standard headers
5582         #define mkstemp.
5583         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5584         Include "mkstemp.h".
5585         Make the _LIBC code resemble glibc original more,
5586         e.g., use K&R style.
5587         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5588         (mkstemp): Remove, since mkstemp.h does this for us.
5589         * lib/stdlib--.h: Include mkstemp.h.
5590
5591         Import this patch from libc:
5592
5593         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5594
5595         * lib/tempname.c (__gen_tempname): Change attempts_min
5596         into a macro.  Use preprocessor to decide how to initialize
5597         attempts [Coverity CID 67].
5598
5599 2006-09-20  Bruno Haible  <bruno@clisp.org>
5600
5601         * lib/mkdtemp.c: Import from libc.
5602         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5603                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5604                 attempts_min into a macro.  Use preprocessor to decide how to
5605                 initialize attempts [Coverity CID 67].
5606         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5607                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5608                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5609
5610 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5611
5612         * gnulib-tool (func_exit): New function, to allow to pass the
5613         exit status portably through the trap.  Use everywhere.
5614         (--help, --version): Signal a write error.
5615         (trap): catch SIGPIPE, for write errors.
5616         Exit at the end of the trap, with the correct exit status.
5617
5618 2006-09-19  Karl Berry  <karl@gnu.org>
5619
5620         * doc/gnulib.texi: note about the license texinfo files.
5621
5622 2006-09-19  Eric Blake  <ebb9@byu.net>
5623
5624         * gnulib-tool: Avoid space-tab.
5625
5626 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5627
5628         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5629         that prevented coreutils 6.1 from building.  Problem reported
5630         by Petter Reinholdtsen.
5631
5632 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5633
5634         * gnulib-tool (avoidlist): Fix typo that broke options like
5635         --avoid=lock that are used by coreutils bootstrap.
5636
5637 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5638
5639         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5640         more systematically.
5641
5642 2006-09-18  Jim Meyering  <jim@meyering.net>
5643
5644         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5645
5646 2006-09-18  Bruno Haible  <bruno@clisp.org>
5647
5648         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5649
5650 2006-09-18  Bruno Haible  <bruno@clisp.org>
5651
5652         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5653         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5654         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5655         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5656         * m4/gettext.m4: Require autoconf >= 2.52.
5657         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5658         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5659         of gl_cv_header_inttypes_h.
5660
5661 2006-09-18  Bruno Haible  <bruno@clisp.org>
5662
5663         * lib/javaversion.c: Include configmake.h.
5664
5665 2006-09-18  Bruno Haible  <bruno@clisp.org>
5666
5667         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5668         avoid that the while loops be executed in a subshell.
5669
5670 2006-09-18  Bruno Haible  <bruno@clisp.org>
5671
5672         * MODULES.html.sh (func_module): Break long lines.
5673         Suggested by Bruce Korb <bkorb@gnu.org>.
5674
5675 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5676
5677         Speed up by a factor of 1.12.
5678         * gnulib-tool (nl): New variable.
5679         (func_import): Rewrite include directive extraction to only read each
5680         directive once.
5681
5682 2006-09-17  Bruno Haible  <bruno@clisp.org>
5683
5684         * modules/javaversion (Makefile.am): Remove DEFS setting.
5685         (Depends-on): Add configmake, for PKGDATADIR definition.
5686
5687 2006-09-17  Bruno Haible  <bruno@clisp.org>
5688
5689         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5690
5691 2006-09-17  Bruno Haible  <bruno@clisp.org>
5692
5693         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5694         (func_modules_transitive_closure, func_modules_add_dummy,
5695         func_modules_to_filelist, func_import, func_create_testdir,
5696         func_create_megatestdir, ...): Use it wherever possible.
5697         Suggested by Ralf Wildenhues.
5698
5699 2006-09-16  Karl Berry  <karl@gnu.org>
5700
5701         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5702         to avoid sectioning errors.
5703         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5704         [ifinfo]: blank line after @center-ed titles.
5705         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5706         Spell FSF address consistently with others.
5707         (These changes approved by rms.)
5708
5709 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5710
5711         Speed up by a factor of 1.61.
5712         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5713         already checked module names again.
5714
5715 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5716
5717         Speed up by a factor of 1.13.
5718         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5719         for new_files, and the input to func_add_or_update.
5720
5721 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5722
5723         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5724         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5725
5726 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5727
5728         * modules/mkancesdirs (Depends-on): Add fcntl.
5729         * modules/savewd: New file.
5730         * MODULES.html.sh (File system functions): Add savewd.
5731
5732         * modules/configmake (Makefile.am): Add support for the
5733         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5734
5735 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5736
5737         * m4/savewd.m4: New file.
5738
5739 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5740
5741         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5742         (dirchownmod): New arg FD.  All callers changed.
5743         Use FD rather than opening the directory ourself, as opening is
5744         now the caller's responsibility.
5745         * lib/dirchownmod.h: Likewise.
5746         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5747         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5748         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5749         (test_dir): Remove.
5750         (mkancesdirs): Return length of prefix of FILE that has already
5751         been made, or -2 if there is a child doing the work.  Redo
5752         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5753         ".", and treat ".." specially since it might stray back into
5754         already-created areas.  Use a subprocess if necessary.  New arg
5755         WD; all users changed.  MAKE_DIR function should now return 1
5756         if it creates a directory that is not readable.  Return -2 if
5757         a child process is spun off.
5758         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5759         Adjust signature to match code.
5760         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5761         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5762         all users changed.
5763         * lib/savewd.c, lib/savewd.h: New files.
5764
5765 2006-09-15  Jim Meyering  <jim@meyering.net>
5766
5767         * modules/rename-dest-slash: New module.
5768         * MODULES.html.sh (posix_compat): Add it here.
5769
5770         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5771
5772 2006-09-15  Jim Meyering  <jim@meyering.net>
5773
5774         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5775         file.
5776
5777         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5778
5779 2006-09-15  Jim Meyering  <jim@meyering.net>
5780
5781         * lib/rename-dest-slash.c (has_trailing_slash): Use
5782         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5783         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5784         test before testing whether SRC is a directory.
5785         Suggestions from Bruno Haible.
5786
5787         Avoid a warning about an unused variable.
5788         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5789         into the #ifdef block where it's used.
5790
5791         * lib/rename-dest-slash.c: New file.
5792
5793 2006-09-14  Bruno Haible  <bruno@clisp.org>
5794
5795         * lib/allocsa.c: Include <config.h> unconditionally.
5796         * lib/asnprintf.c: Likewise.
5797         * lib/asprintf.c: Likewise.
5798         * lib/c-strcasecmp.c: Likewise.
5799         * lib/c-strcasestr.c: Likewise.
5800         * lib/c-strncasecmp.c: Likewise.
5801         * lib/c-strstr.c: Likewise.
5802         * lib/classpath.c: Likewise.
5803         * lib/clean-temp.c: Likewise.
5804         * lib/concatpath.c: Likewise.
5805         * lib/copy-file.c: Likewise.
5806         * lib/csharpcomp.c: Likewise.
5807         * lib/csharpexec.c: Likewise.
5808         * lib/execute.c: Likewise.
5809         * lib/fatal-signal.c: Likewise.
5810         * lib/findprog.c: Likewise.
5811         * lib/fwriteerror.c: Likewise.
5812         * lib/gl_array_list.c: Likewise.
5813         * lib/gl_array_oset.c: Likewise.
5814         * lib/gl_avltree_list.c: Likewise.
5815         * lib/gl_avltree_oset.c: Likewise.
5816         * lib/gl_avltreehash_list.c: Likewise.
5817         * lib/gl_carray_list.c: Likewise.
5818         * lib/gl_linked_list.c: Likewise.
5819         * lib/gl_linkedhash_list.c: Likewise.
5820         * lib/gl_list.c: Likewise.
5821         * lib/gl_oset.c: Likewise.
5822         * lib/gl_rbtree_list.c: Likewise.
5823         * lib/gl_rbtree_oset.c: Likewise.
5824         * lib/gl_rbtreehash_list.c: Likewise.
5825         * lib/imaxabs.c: Likewise.
5826         * lib/imaxdiv.c: Likewise.
5827         * lib/javacomp.c: Likewise.
5828         * lib/javaexec.c: Likewise.
5829         * lib/javaversion.c: Likewise.
5830         * lib/linebreak.c: Likewise.
5831         * lib/localcharset.c: Likewise.
5832         * lib/lock.c: Likewise.
5833         * lib/mbchar.c: Likewise.
5834         * lib/mbswidth.c: Likewise.
5835         * lib/mkdtemp.c: Likewise.
5836         * lib/pipe.c: Likewise.
5837         * lib/printf-args.c: Likewise.
5838         * lib/printf-parse.c: Likewise.
5839         * lib/progname.c: Likewise.
5840         * lib/progreloc.c: Likewise.
5841         * lib/readlink.c: Likewise.
5842         * lib/sh-quote.c: Likewise.
5843         * lib/stpcpy.c: Likewise.
5844         * lib/stpncpy.c: Likewise.
5845         * lib/strcasecmp.c: Likewise.
5846         * lib/strcasestr.c: Likewise.
5847         * lib/strcspn.c: Likewise.
5848         * lib/striconv.c: Likewise.
5849         * lib/strncasecmp.c: Likewise.
5850         * lib/strnlen1.c: Likewise.
5851         * lib/strstr.c: Likewise.
5852         * lib/strtok_r.c: Likewise.
5853         * lib/tls.c: Likewise.
5854         * lib/tmpdir.c: Likewise.
5855         * lib/unicodeio.c: Likewise.
5856         * lib/unsetenv.c: Likewise.
5857         * lib/vasnprintf.c: Likewise.
5858         * lib/vasprintf.c: Likewise.
5859         * lib/wait-process.c: Likewise.
5860         * lib/xallocsa.c: Likewise.
5861         * lib/xsetenv.c: Likewise.
5862         * lib/xstriconv.c: Likewise.
5863
5864 2006-09-13  Simon Josefsson  <jas@extundo.com>
5865
5866         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5867         that internally, suggested by Ralf Wildenhues
5868         <Ralf.Wildenhues@gmx.de>.
5869
5870 2006-09-13  Simon Josefsson  <jas@extundo.com>
5871
5872         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5873         @LIBOBJS@.
5874         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5875
5876 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5877
5878         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5879         longer worry about uses that don't define HAVE_CONFIG_H.
5880         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5881         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5882         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5883         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5884         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5885         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5886         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5887         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5888         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5889         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5890         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5891         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5892         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5893         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5894         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5895         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5896         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5897         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5898         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5899         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5900         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5901         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5902         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5903         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5904         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5905         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5906         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5907         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5908         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5909         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5910         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5911         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5912         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5913         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
5914         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
5915         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
5916         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
5917         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
5918         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
5919         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
5920         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
5921         Likewise.
5922
5923 2006-09-13  Eric Blake  <ebb9@byu.net>
5924
5925         * lib/getopt.c: Fix typo in last commit.
5926
5927 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
5928
5929         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
5930         dgettext.
5931
5932 2006-09-12  Jim Meyering  <jim@meyering.net>
5933
5934         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
5935         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
5936         Reported by Nelson H. F. Beebe.
5937
5938 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
5939
5940         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
5941         program_invocation_name and program_invocation_short_name are
5942         initialized.
5943         * lib/argp-namefrob.h: Move declarations of program_invocation_name
5944         and program_invocation_short_name to argp.h, so they are visible
5945         to user programs.
5946         * lib/argp.h: Likewise
5947
5948 2006-09-10  Bruno Haible  <bruno@clisp.org>
5949
5950         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5951         m4/inttypes_h.m4, m4/uintmax_t.m4.
5952
5953 2006-09-10  Bruno Haible  <bruno@clisp.org>
5954
5955         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
5956         gl_AC_TYPE_UINTMAX_T.
5957
5958 2006-09-10  Bruno Haible  <bruno@clisp.org>
5959
5960         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
5961
5962 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
5963
5964         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
5965         convention.  Text proposed by Bruno Haible.
5966         (struct argp_option): Document the use of N_() wrappers.
5967
5968         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5969         '\v', and translate the two parts separately, instead of feeding
5970         the whole string to gettext.  This allows to exclude
5971         '\v' from the strings visible to the translator by writing doc
5972         strings as N_("..") "\v" N_("..").
5973
5974 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5975
5976         * config/srclist.txt: Undo latest change; the bug was fixed.
5977
5978 2006-09-09  Bruno Haible  <bruno@clisp.org>
5979
5980         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5981         assignments if building a library without libtool.
5982         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5983         in func_emit_lib_Makefile_am.
5984         (func_import): When building a static library libfoo.a, arrange to
5985         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5986         (func_create_testdir): Likewise.
5987         * modules/gc (configure.ac, Makefile.am): If building statically,
5988         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5989         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5990         * modules/striconv (configure.ac, Makefile.am): Likewise.
5991         Based on a suggestion by Ralf Wildenhues.
5992
5993 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5994
5995         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5996         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5997         Also:
5998
5999         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6000         Add year_2050_test to catch glibc bug 2821
6001         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6002
6003         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6004         Prefer #ifdef to #if.
6005
6006         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
6007         Return from 'main' instead of calling 'exit'.
6008
6009 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6010
6011         * lib/mktime.c (guess_time_tm): Fix bug where mktime
6012         returned the maximum time_t value rather than (time_t) -1.
6013         Problem originally reported by William Bardwell
6014         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6015
6016         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6017         Moved to here ...
6018         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6019         ... from here.
6020
6021 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6022
6023         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
6024         2821 is fixed.
6025
6026 2006-09-08  Jim Meyering  <jim@meyering.net>
6027
6028         Don't make generated files read-only.  That would bother too many
6029         people.  However, do retain the ability to work when targets are
6030         read-only: remove the destination and temporary files before writing
6031         them (when generated via sed or echo), or by using the -f option for
6032         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
6033         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6034         * modules/byteswap, modules/configmake, modules/fcntl:
6035         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6036         * modules/localcharset, modules/netinet_in, modules/poll:
6037         * modules/stdbool, modules/stdint, modules/sys_select:
6038         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6039
6040 2006-09-08  Jim Meyering  <jim@meyering.net>
6041
6042         Avoid new build failure on FreeBSD 6.0.
6043         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
6044         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
6045         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
6046
6047 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6048
6049         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
6050
6051 2006-09-07  Jim Meyering  <jim@meyering.net>
6052
6053         Fix global typo in last change: use chmod u-w, not chmod u-x.
6054         Spotted by Paul Eggert and Bruce Korb.
6055         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6056         * modules/byteswap, modules/configmake, modules/fcntl:
6057         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6058         * modules/localcharset, modules/netinet_in, modules/poll:
6059         * modules/stdbool, modules/stdint, modules/sys_select:
6060         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6061
6062 2006-09-06  Jim Meyering  <jim@meyering.net>
6063
6064         Make generated files be read-only.
6065         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
6066         Ensure that each generated file is now read-only.
6067         * modules/argz: Likewise.
6068         * modules/arpa_inet: Likewise.
6069         * modules/byteswap: Likewise.
6070         * modules/configmake: Likewise.
6071         * modules/fcntl: Likewise.
6072         * modules/fnmatch: Likewise.
6073         * modules/getopt: Likewise.
6074         * modules/glob: Likewise.
6075         * modules/inttypes: Likewise.
6076         * modules/netinet_in: Likewise.
6077         * modules/poll: Likewise.
6078         * modules/stdbool: Likewise.
6079         * modules/stdint: Likewise.
6080         * modules/sys_select: Likewise.
6081         * modules/sys_socket: Likewise.
6082         * modules/sys_stat: Likewise.
6083         * modules/sysexits: Likewise.
6084         * modules/localcharset: Same as above, but continue using temporary
6085         file named "t-$@" (why different?) rather than the "$@-t" used
6086         everywhere else.
6087
6088         * modules/sysexits (Makefile.am): Replace literal occurrences
6089         of "sysexit.h" more readable, and more consistent, "$@".
6090
6091 2006-09-06  Bruno Haible  <bruno@clisp.org>
6092
6093         * modules/striconv: New file.
6094         * modules/xstriconv: New file.
6095         * MODULES.html.sh (Internationalization functions): Add striconv,
6096         xstriconv.
6097
6098 2006-09-06  Bruno Haible  <bruno@clisp.org>
6099
6100         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
6101         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
6102         not using libtool correctly.
6103
6104 2006-09-06  Bruno Haible  <bruno@clisp.org>
6105
6106         * lib/striconv.h: New file.
6107         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
6108         iconvstring.c.
6109         * lib/xstriconv.h: New file.
6110         * lib/xstriconv.c: New file.
6111
6112 2006-09-06  Bruno Haible  <bruno@clisp.org>
6113
6114         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
6115         lib_..._LDFLAGS.
6116
6117 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6118
6119         * lib/argz_.h: Sync from Libtool.
6120
6121         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
6122                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6123
6124         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
6125
6126 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
6127
6128         * modules/trim: New file.
6129
6130 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
6131
6132         * lib/trim.h: New file.
6133         * lib/trim.c: New file.
6134
6135 2006-09-05  Bruno Haible  <bruno@clisp.org>
6136
6137         * MODULES.html.sh (String handling): Add trim.
6138
6139 2006-09-04  Karl Berry  <karl@gnu.org>
6140
6141         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
6142         until next release.
6143
6144 2006-09-03  Bruno Haible  <bruno@clisp.org>
6145
6146         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
6147         correctly.
6148
6149 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6150
6151         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
6152         not gl_GETLOADAVG.  Omit unneeded semicolons.
6153         Problems reported by Ralf Wildenhues in
6154         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
6155         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
6156         at the end, which is the usual gnulib style.
6157
6158         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
6159         of doing all the work ourselves.
6160         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
6161         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
6162
6163 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6164
6165         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
6166         Problem reported by Ralf Wildenhues in
6167         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
6168
6169         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
6170         HAVE_STRUCT_STATFS_F_FSTYPENAME.
6171
6172 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6173
6174         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
6175         yesterday's patch by changing test -n to test -z.
6176
6177 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6178
6179         * modules/getloadavg (Files): Add m4/getloadavg.m4.
6180         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
6181         the former is now obsolescent.
6182
6183         * modules/chdir-long (Depends-on): Add fcntl.
6184
6185 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6186
6187         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
6188         obsolescent, and programs should use gnulib instead.
6189         * m4/getloadavg.m4: New file, with contents taken from Autoconf
6190         but with prefixes changed.
6191
6192 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6193
6194         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
6195         or stdbool.h, because they might not exist while configuring.
6196
6197         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
6198         Don't include unistd.h or limits.h; not needed, since chdir-long.h
6199         does that for us.
6200         (O_DIRECTORY): Remove.
6201
6202 2006-08-31  Eric Blake  <ebb9@byu.net>
6203
6204         * gnulib-tool: Don't let emacs change spaces to TAB.
6205
6206 2006-08-31  Bruno Haible  <bruno@clisp.org>
6207
6208         * gnulib-tool: When calling func_import more than once, do it in a
6209         subshell.
6210         Reported by Eric Blake <ebb9@byu.net>.
6211
6212 2006-08-31  Bruno Haible  <bruno@clisp.org>
6213
6214         * gnulib-tool (nl): Remove variable.
6215         (sed_transform_lib_file): Use more robust test for config-h module.
6216         (func_import): Fix typo in 2006-08-25 patch.
6217
6218 2006-08-31  Bruno Haible  <bruno@clisp.org>
6219
6220         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
6221         specified, augment Makefile.am variables instead of assigning them.
6222
6223 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6224
6225         Work around a bug in both the Linux and SunOS 64-bit kernels:
6226         nanosleep mishandles sleeps for longer than 2**31 seconds.
6227         Problem reported by Frank v Waveren in
6228         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6229         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
6230         Check for nanosleep bug.
6231         (LIB_NANOSLEEP): Append clock_gettime library if needed.
6232
6233 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6234
6235         Work around a bug in both the Linux and SunOS 64-bit kernels:
6236         nanosleep mishandles sleeps for longer than 2**31 seconds.
6237         Problem reported by Frank v Waveren in
6238         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6239         * lib/nanosleep.c (BILLION): New constant.
6240         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
6241         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
6242         implementation.
6243
6244 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6245
6246         * modules/nanosleep (Depends-on): Add gettime.
6247
6248 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6249         and Simon Josefsson  <jas@extundo.com>
6250         and Oskar Liljeblad  <oskar@osk.mine.nu>
6251
6252         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
6253         * gnulib-tool (func_import): New license type 'unmodifiable license
6254         text'.
6255         * modules/fdl: Use it.  Longer description.
6256         * module/gpl, module/lgpl: New files.
6257
6258 2006-08-30  Jim Meyering  <jim@meyering.net>
6259
6260         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
6261         shadowing the parameter.
6262
6263 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6264
6265         Sync from Libtool:
6266
6267         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6268
6269         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
6270         sharing with gnulib.  Report by Eric Blake.
6271
6272 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6273
6274         * modules/isapipe: New file.
6275         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
6276
6277 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6278
6279         * modules/configmake (Makefile.am): Add a comment, and omit
6280         the CONFIGMAKE_ prefix from generated macro names.  Suggested
6281         by Bruno Haible.
6282
6283 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6284
6285         * m4/isapipe.m4: New file.
6286
6287 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6288
6289         * lib/isapipe.c, lib/isapipe.h: New files.
6290
6291 2006-08-29  Jim Meyering  <jim@meyering.net>
6292
6293         * modules/configmake (Makefile.am): Make configmake.h depend on
6294         Makefile.  Otherwise, a stale configmake.h could hang around.
6295
6296 2006-08-29  Eric Blake  <ebb9@byu.net>
6297
6298         * lib/error.c (error_at_line, print_errno_message): Match libc, after
6299         resolution of upstream bug 3044.
6300
6301 2006-08-29  Bruno Haible  <bruno@clisp.org>
6302
6303         * modules/localcharset (Depends-on): Add configmake.
6304         (Makefile.am): Remove setting of LIBDIR through DEFS.
6305
6306 2006-08-29  Bruno Haible  <bruno@clisp.org>
6307
6308         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
6309         defined.
6310
6311 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6312
6313         * modules/fcntl: New file.
6314         * modules/chdir-safer (Depends-on): Add fcntl.
6315         * modules/fts: Likewise.
6316         * modules/mkdir-p: Likewise.
6317
6318         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
6319         This undoes the most recent change, since we're now addressing the
6320         problem in a different way.
6321
6322         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
6323         into output, since the output might be called Makefile.am even
6324         if $makefile_name is something different.
6325         (func_import): Use $makefile_am rather than
6326         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
6327         empty.
6328
6329         * modules/inttypes (Files): Add m4/inttypes-h.m4.
6330
6331 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6332
6333         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
6334         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
6335         recent change to stdint.m4, since we're now addressing the problem in a
6336         different way.
6337
6338 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6339
6340         * m4/fcntl_h.m4: New file.
6341
6342 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6343
6344         * lib/fcntl_.h: New file.
6345         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
6346         the fcntl module.
6347         * lib/dirchownmod.c: Likewise.
6348         * lib/fts.c: Likewise.
6349
6350         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
6351         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
6352         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
6353         just before including <inttypes.h>, to avoid circular inclusion.
6354
6355 2006-08-28  Jim Meyering  <jim@meyering.net>
6356
6357         * doc/visibility.texi: Actually read and correct the grammar of the
6358         sentence affected by yesterday's change.
6359
6360 2006-08-28  Eric Blake  <ebb9@byu.net>
6361
6362         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
6363         needs wrapper.
6364
6365 2006-08-28  Eric Blake  <ebb9@byu.net>
6366
6367         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
6368
6369 2006-08-28  Eric Blake  <ebb9@byu.net>
6370
6371         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
6372
6373 2006-08-28  Bruno Haible  <bruno@clisp.org>
6374
6375         * modules/c-strstr: New file, from GNU gettext.
6376         * MODULES.html.sh (String handling): Add c-strstr.
6377
6378 2006-08-28  Bruno Haible  <bruno@clisp.org>
6379
6380         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
6381         macros.
6382         Reported by Eric Blake.
6383
6384 2006-08-28  Bruno Haible  <bruno@clisp.org>
6385
6386         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6387         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6388         * lib/vasprintf.c: Include errno.h, limits.h.
6389         (EOVERFLOW): New fallback definition.
6390         (vasprintf): Test here whether the string length is > INT_MAX.
6391         * lib/vsnprintf.c: Include errno.h, limits.h.
6392         (EOVERFLOW): New fallback definition.
6393         (vsnprintf): Fix bug when generated string was too long for the buffer.
6394         Test here whether the string length is > INT_MAX.
6395
6396 2006-08-28  Bruno Haible  <bruno@clisp.org>
6397
6398         * lib/inttypes_.h (SCNX*): Remove definitions.
6399         Reported by Eric Blake.
6400
6401 2006-08-28  Bruno Haible  <bruno@clisp.org>
6402
6403         * lib/c-strstr.h: New file, from GNU gettext.
6404         * lib/c-strstr.c: New file, from GNU gettext.
6405
6406 2006-08-28  Bruno Haible  <bruno@clisp.org>
6407
6408         * gnulib-tool: Reorder some statements.
6409
6410 2006-08-28  Bruno Haible  <bruno@clisp.org>
6411
6412         * gnulib-tool: New option --makefile-name.
6413         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6414         $makefile_name.
6415         (func_import): Write $makefile_name to the cache file, and read it from
6416         there unless explicitly specified. Use $makefile_name as file name
6417         instead of Makefile.am. Adjust the recommendations accordingly.
6418
6419 2006-08-28  Bruno Haible  <bruno@clisp.org>
6420
6421         * gnulib-tool (func_verify_module): Check against misapplying patch.
6422
6423 2006-08-28  Bruno Haible  <bruno@clisp.org>
6424
6425         * gnulib-tool (func_relativize, func_relconcat): New functions.
6426         Give an error if --local-dir is given with --update.
6427         Remove trailing slashes from $local_gnulib_dir.
6428         (func_import): Store the relativized $local_gnulib_dir in
6429         gnulib-cache.m4, and read it from there if not specified explicitly.
6430
6431 2006-08-28  Bruno Haible  <bruno@clisp.org>
6432
6433         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6434         is the current directory. Respect also $local_gnulib_dir.
6435
6436 2006-08-28  Bruno Haible  <bruno@clisp.org>
6437             Simon Josefsson  <jas@extundo.com>
6438
6439         BeOS portability.
6440         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6441
6442 2006-08-27  Jim Meyering  <jim@meyering.net>
6443
6444         * doc/visibility.texi: Remove duplicate word: "pointer".
6445
6446 2006-08-26  Bruno Haible  <bruno@clisp.org>
6447
6448         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6449         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6450         (Makefile.am): Create inttypes.h from inttypes_.h.
6451         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6452
6453         * modules/imaxabs: New file.
6454
6455         * modules/imaxdiv: New file.
6456
6457 2006-08-26  Bruno Haible  <bruno@clisp.org>
6458
6459         * m4/inttypes.m4: New file.
6460         * m4/_inttypes_h.m4: Remove file.
6461         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6462         PRI_MACROS_BROKEN.
6463         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6464
6465         * m4/imaxabs.m4: New file.
6466
6467         * m4/imaxdiv.m4: New file.
6468
6469 2006-08-26  Bruno Haible  <bruno@clisp.org>
6470
6471         * lib/inttypes_.h: New file.
6472         * lib/inttypes.h: Remove file.
6473         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6474
6475         * lib/imaxabs.c: New file.
6476
6477         * lib/imaxdiv.c: New file.
6478
6479 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6480
6481         New config-h module, so that "make" output needn't be cluttered
6482         by -DHAVE_CONFIG_H.
6483         * MODULES.html.sh (Support for building libraries and executables):
6484         Add config-h.
6485         * modules/config-h: New file.
6486         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6487         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6488         the config-h module is used.
6489
6490         New configmake module, so that "make" output needn't be cluttered
6491         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6492         * MODULES.html.sh (Support for building libraries and executables):
6493         Add configmake.
6494         * modules/configmake: New file.
6495
6496 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6497
6498         * m4/config-h.m4: New file.
6499
6500 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6501
6502         * config/srclist.txt: Add elisp-comp.
6503
6504 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6505
6506         * MODULES.html.sh (Support for building libraries and executables):
6507         Add elisp-comp.
6508         * build-aux/elisp-comp: New file.
6509         * modules/elisp-comp: New file.
6510
6511 2006-08-24  Bruno Haible  <bruno@clisp.org>
6512
6513         * gnulib-tool (func_create_testdir): Use non-default values of
6514         sourcebase and m4base.
6515
6516 2006-08-24  Bruno Haible  <bruno@clisp.org>
6517
6518         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6519         HTML structure.
6520
6521 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6522
6523         * modules/openat (Depends-on): Add lchown.
6524
6525 2006-08-23  Bruno Haible  <bruno@clisp.org>
6526
6527         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6528         of gl_LOCK_EARLY instead of gl_LOCK.
6529
6530 2006-08-23  Bruno Haible  <bruno@clisp.org>
6531
6532         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6533         on OSF/1 to no.
6534         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6535
6536 2006-08-23  Bruno Haible  <bruno@clisp.org>
6537
6538         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6539         as unusable.
6540
6541         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6542         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6543         (gl_LOCK): New macro.
6544
6545 2006-08-22  Simon Josefsson  <jas@extundo.com>
6546
6547         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6548         to md5 module.
6549
6550 2006-08-22  Simon Josefsson  <jas@extundo.com>
6551
6552         * MODULES.html.sh: Add "Support for maintaining and release
6553         projects".
6554
6555         * build-aux/gnupload: New file, from coreutils.
6556
6557 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6558
6559         Avoid the need for AC_LIBSOURCES in m4 macros.
6560         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6561         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6562         * modules/check-version (EXTRA_DIST): Add check-version.h.
6563         * modules/crc (EXTRA_DIST): Add crc.h.
6564         * modules/des (EXTRA_DIST): Add des.h.
6565         * modules/gc (EXTRA_DIST): Add gc.h.
6566         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6567         * modules/getline (EXTRA_DIST): Add getline.h.
6568         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6569         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6570         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6571         * modules/md2 (EXTRA_DIST): Add md2.h.
6572         * modules/md4 (EXTRA_DIST): Add md4.h.
6573         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6574         * modules/read-file (EXTRA_DIST): Add read-file.h.
6575         * modules/readline (EXTRA_DIST): Add readline.h.
6576         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6577         rijndael-api-fst.h.
6578
6579 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6580
6581         * m4/rijndael.m4 (gl_ARCFOUR):
6582         * m4/arctwo.m4 (gl_ARCTWO):
6583         * m4/check-version.m4 (gl_CHECK_VERSION):
6584         * m4/crc.m4 (gl_CRC):
6585         * m4/des.m4 (gl_DES):
6586         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6587         * m4/gc.m4 (gl_GC):
6588         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6589         * m4/getline.m4 (gl_FUNC_GETLINE):
6590         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6591         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6592         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6593         * m4/md2.m4 (gl_MD2):
6594         * m4/md4.m4 (gl_MD4):
6595         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6596         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6597         * m4/readline.m4 (gl_FUNC_READLINE):
6598         * m4/rijndael.m4 (gl_RIJNDAEL):
6599         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6600         to get the necessary .h files and whatnot.
6601
6602 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6603
6604         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6605         gnulib rather than the other way around.
6606         * config/srclistvars.sh (COREUTILS): Remove.
6607
6608 2006-08-22  Jim Meyering  <jim@meyering.net>
6609
6610         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6611
6612         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6613
6614 2006-08-22  Eric Blake  <ebb9@byu.net>
6615
6616         * modules/regexprops-generic: New file.
6617         * MODULES.html.sh (Support for building documentation): List it.
6618
6619 2006-08-22  Eric Blake  <ebb9@byu.net>
6620
6621         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6622         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6623         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6624         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6625
6626 2006-08-22  Bruno Haible  <bruno@clisp.org>
6627
6628         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6629         and lib_LTLIBRARIES like the other lib_* variables.
6630
6631 2006-08-22  Bruno Haible  <bruno@clisp.org>
6632
6633         * build-aux/x-to-1.in: New file, from GNU gettext.
6634
6635 2006-08-22  Bruno Haible  <bruno@clisp.org>
6636
6637         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6638         <utmpx.h> exists.
6639
6640 2006-08-22  Bruno Haible  <bruno@clisp.org>
6641
6642         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6643         <utmpx.h> exists.
6644
6645 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6646
6647         BeOS portability.
6648         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6649         exist.
6650         Problem reported by Bruno Haible.
6651
6652 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6653
6654         Avoid the need for AC_LIBSOURCES in m4 macros.
6655         * modules/acl (EXTRA_DIST): Add acl.h.
6656         * modules/argmatch (Files): Add m4/argmatch.m4.
6657         (configure.ac): Add gl_ARGMATCH.
6658         (EXTRA_DIST): Renamed from lib_SOURCES, for
6659         consistency with the other modules.  Remove argmatch.c.
6660         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6661         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6662         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6663         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6664         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6665         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6666         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6667         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6668         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6669         * modules/closeout (EXTRA_DIST): Add closeout.h.
6670         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6671         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6672         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6673         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6674         dirname.h; remove basename.c and stripslash.c.
6675         * modules/exclude (EXTRA_DIST): Add exclude.h.
6676         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6677         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6678         * modules/file-type (EXTRA_DIST): Add file-type.h.
6679         * modules/filemode (EXTRA_DIST): Add filemode.h.
6680         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6681         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6682         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6683         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6684         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6685         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6686         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6687         * modules/getdate (EXTRA_DIST): Add getdate.c.
6688         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6689         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6690         * modules/getpass (EXTRA_DIST): Add getpass.h.
6691         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6692         * modules/group-member (EXTRA_DIST): Add group-member.h.
6693         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6694         * modules/hash (EXTRA_DIST): Add hash.h.
6695         * modules/human (EXTRA_DIST): Add human.h.
6696         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6697         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6698         * modules/lchown (EXTRA_DIST): Add lchown.h.
6699         * modules/long-options (EXTRA_DIST): Add long-options.h.
6700         * modules/lstat (EXTRA_DIST): Add lstat.h.
6701         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6702         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6703         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6704         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6705         * modules/memxor (EXTRA_DIST): Add memxor.h.
6706         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6707         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6708         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6709         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6710         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6711         * modules/physmem (EXTRA_DIST): Add physmem.h.
6712         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6713         * modules/posixver (EXTRA_DIST): Add posixver.h.
6714         * modules/quote (EXTRA_DIST): Add quote.h.
6715         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6716         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6717         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6718         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6719         regex_internal.h regexec.c.
6720         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6721         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6722         * modules/same (EXTRA_DIST): Add same.h.
6723         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6724         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6725         * modules/savedir (EXTRA_DIST): Add savedir.h.
6726         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6727         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6728         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6729         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6730         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6731         * modules/strdup (EXTRA_DIST): Add strdup.h.
6732         * modules/strftime (EXTRA_DIST): Add strftime.h.
6733         * modules/strndup (EXTRA_DIST): Add strndup.h.
6734         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6735         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6736         * modules/time_r (EXTRA_DIST): Add time_r.h.
6737         * modules/timespec (EXTRA_DIST): Add timespec.h.
6738         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6739         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6740         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6741         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6742         * modules/userspec (EXTRA_DIST): Add userspec.h.
6743         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6744         * modules/utimens (EXTRA_DIST): Add utimens.h.
6745         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6746         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6747         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6748         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6749         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6750         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6751         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6752         * modules/yesno (EXTRA_DIST): Add yesno.h.
6753
6754 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6755
6756         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6757
6758         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6759         * m4/dev-ino.m4, same-inode.m4: Remove.
6760
6761         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6762         * m4/acl.m4 (AC_FUNC_ACL):
6763         * m4/backupfile.m4 (gl_BACKUPFILE):
6764         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6765         * m4/canon-host.m4 (gl_CANON_HOST):
6766         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6767         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6768         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6769         * m4/cloexec.m4 (gl_CLOEXEC):
6770         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6771         * m4/closeout.m4 (gl_CLOSEOUT):
6772         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6773         * m4/dirname.m4 (gl_DIRNAME):
6774         * m4/exclude.m4 (gl_EXCLUDE):
6775         * m4/exitfail.m4 (gl_EXITFAIL):
6776         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6777         * m4/file-type.m4 (gl_FILE_TYPE):
6778         * m4/filemode.m4 (gl_FILEMODE):
6779         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6780         * m4/fpending.m4 (gl_FUNC_FPENDING):
6781         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6782         * m4/fts.m4 (gl_FUNC_FTS):
6783         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6784         * m4/getdate.m4 (gl_GETDATE):
6785         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6786         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6787         * m4/getpass.m4 (gl_FUNC_GETPASS):
6788         * m4/gettime.m4 (gl_GETTIME):
6789         * m4/getugroups.m4 (gl_GETUGROUPS):
6790         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6791         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6792         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6793         * m4/hash.m4 (gl_HASH):
6794         * m4/idcache.m4 (gl_IDCACHE):
6795         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6796         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6797         * m4/long-options.m4 (gl_LONG_OPTIONS):
6798         * m4/lstat.m4 (gl_FUNC_LSTAT):
6799         * m4/md5.m4 (gl_MD5):
6800         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6801         * m4/memcoll.m4 (gl_MEMCOLL):
6802         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6803         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6804         * m4/memxor.m4 (gl_MEMXOR):
6805         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6806         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6807         * m4/modechange.m4 (gl_MODECHANGE):
6808         * m4/mountlist.m4 (gl_MOUNTLIST):
6809         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6810         * m4/openat.m4 (gl_FUNC_OPENAT):
6811         * m4/pathmax.m4 (gl_PATHMAX):
6812         * m4/physmem.m4 (gl_PHYSMEM):
6813         * m4/posixtm.m4 (gl_POSIXTM):
6814         * m4/posixver.m4 (gl_POSIXVER):
6815         * m4/quote.m4 (gl_QUOTE):
6816         * m4/quotearg.m4 (gl_QUOTEARG):
6817         * m4/readtokens.m4 (gl_READTOKENS):
6818         * m4/readutmp.m4 (gl_READUTMP):
6819         * m4/regex.m4 (gl_REGEX):
6820         * m4/safe-read.m4 (gl_SAFE_READ):
6821         * m4/safe-write.m4 (gl_SAFE_WRITE):
6822         * m4/same.m4 (gl_SAME):
6823         * m4/save-cwd.m4 (gl_SAVE_CWD):
6824         * m4/savedir.m4 (gl_SAVEDIR):
6825         * m4/settime.m4 (gl_SETTIME):
6826         * m4/sha1.m4 (gl_SHA1):
6827         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6828         * m4/stat-macros.m4 (gl_STAT_MACROS):
6829         * m4/stat-time.m4 (gl_STAT_TIME):
6830         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6831         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6832         * m4/strdup.m4 (gl_FUNC_STRDUP):
6833         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6834         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6835         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6836         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6837         * m4/time_r.m4 (gl_TIME_R):
6838         * m4/timespec.m4 (gl_TIMESPEC):
6839         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6840         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6841         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6842         * m4/userspec.m4 (gl_USERSPEC):
6843         * m4/utimecmp.m4 (gl_UTIMECMP):
6844         * m4/utimens.m4 (gl_UTIMENS):
6845         * m4/xalloc.m4 (gl_XALLOC):
6846         * m4/xgetcwd.m4 (gl_XGETCWD):
6847         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6848         * m4/xreadlink.m4 (gl_XREADLINK):
6849         * m4/xstrtod.m4 (gl_XSTRTOD):
6850         * m4/yesno.m4 (gl_YESNO):
6851         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6852         to get the necessary .h files and whatnot.
6853
6854 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6855             Bruno Haible  <bruno@clisp.org>
6856
6857         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6858         /bin/sh understanding of '!' conditional negation.
6859
6860 2006-08-21  Jim Meyering  <jim@meyering.net>
6861
6862         * modules/openat (Depends-on): Really alphabetize.
6863
6864         * modules/acl (Depends-on): Add error and quote.
6865
6866         * check-module (find_included_lib_files): Add at-func.c to the
6867         ok-to-include-more-than-once white list.
6868
6869         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6870
6871 2006-08-21  Bruno Haible  <bruno@clisp.org>
6872
6873         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6874         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6875         Reported by Martin Lambers <marlam@marlam.de>.
6876
6877 2006-08-21  Bruno Haible  <bruno@clisp.org>
6878
6879         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6880         specify an installation location, don't emit a noinst_LIBRARIES or
6881         noinst_LTLIBRARIES assignment.
6882
6883 2006-08-21  Bruno Haible  <bruno@clisp.org>
6884
6885         BeOS portability.
6886         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6887         BeOS has mbrtowc() but no <wctype.h>.
6888
6889 2006-08-21  Bruno Haible  <bruno@clisp.org>
6890
6891         BeOS portability.
6892         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6893         exist.
6894
6895 2006-08-21  Bruno Haible  <bruno@clisp.org>
6896
6897         BeOS portability.
6898         * lib/mbchar.h: Include <wctype.h> only if it exists.
6899
6900 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6901
6902         Remove files that are no longer needed by their respective modules.
6903         * m4/obstack.m4: Remove.
6904         * m4/strerror_r.m4: Remove.
6905         * m4/uint32_t.m4: Remove.
6906         * m4/uintptr_t.m4: Remove.
6907         * m4/ullong_max.m4: Remove.
6908         * m4/xstrtoimax.m4: Remove.
6909         * m4/xstrtoumax.m4: Remove.
6910
6911         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6912         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6913         dependencies now capture this.
6914
6915         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
6916         Do not use AC_LIBSOURCES, since gnulib modules now do this.
6917         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
6918         * m4/human.m4 (gl_HUMAN): Likewise.
6919         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
6920         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
6921
6922         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
6923
6924         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
6925         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
6926         stdint.
6927         * m4/human.m4 (gl_HUMAN): Likewise.
6928         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
6929         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
6930         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6931         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6932         * m4/xstrtol (gl_XSTRTOL): Likewise.
6933
6934         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
6935         AC_TYPE_LONG_LONG_INT.
6936         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
6937         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
6938         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
6939         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
6940
6941         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
6942         on stdbool.
6943
6944         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
6945         (gl_PREREQ_XSTRTOUL): Remove.
6946
6947         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
6948
6949         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
6950         mode.
6951
6952 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6953
6954         Add and change modules to make it easier for coreutils to use
6955         gnulib-tool.
6956         * modules/backupfile (Files): Remove m4/d-ino.m4.
6957         (Depends-on): Add d-ino.
6958         * modules/cycle-check (Depends-on): Add stdint.
6959         (lib_SOURCES): Add cycle-check.h.
6960         * modules/d-ino: New module.
6961         * modules/d-type: New module.
6962         * modules/error (Files): Remove m4/strerror_r.m4.
6963         * modules/filemode (Files): Add m4/st_dm_mode.m4.
6964         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6965         m4/inttypes_h.m4, m4/uintmax_t.m4.
6966         (Depends-on): Add stdint.
6967         (lib_SOURCES): Add fsusage.h.
6968         * modules/getcwd (Files): Remove d-ino.m4.
6969         (Depends-on): Add d-ino.
6970         * modules/getndelim2 (Depends-on): Add stdint.
6971         * modules/glob (Files): Remove m4/d-type.m4.
6972         (Depends-on): Add d-type.
6973         * modules/host-os: New module.
6974         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6975         m4/inttypes_h.m4, m4/uintmax_t.m4.
6976         * Depends-on: Add stdint.
6977         (lib_SOURCES): Add human.h.
6978         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6979         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6980         m4/uintmax_t.m4, m4/ulonglong.m4.
6981         (Depends-on): Add stdint.
6982         (EXTRA_DIST): Add inttostr.h.
6983         * modules/lchmod: New module.
6984         * modules/link-follow: New module.
6985         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6986         (Depends-on): Add lchmod.
6987         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6988         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6989         (Depends-on): Add stdint.
6990         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6991         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6992         (Depends-on): Add stdint.
6993         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6994         * modules/perl: New module.
6995         * modules/regex (Depends-on): Add stdint.
6996         * modules/rmdir-errno: New module.
6997         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6998         m4/intmax_t.m4.
6999         (Depends-on): Add stdint.
7000         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7001         m4/uintmax_t.m4.
7002         (Depends-on): Add stdint.
7003         * modules/unlink-busy: New module.
7004         * modules/utimecmp (Depends-on): Add stdint.
7005         * modules/uptime: New module.
7006         * modules/winsz-ioctl: New module.
7007         * modules/winsz-termios: New module.
7008         * modules/xnanosleep (Depends-on): Add nanosleep.
7009         * modules/ullong_max: Remove.
7010         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
7011         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
7012         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
7013         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
7014         (Depends-on): Add inttypes.
7015         (lib_SOURCES): Add xstrtol.h.
7016         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
7017         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
7018         * MODULES.html.sh: Move 'assert' into the assert section.
7019         Move 'dummy' into the linking section.
7020         Remove ullong_max.
7021         Add section for compatibility checks for POSIX:2001 functions,
7022         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
7023         winsz-ioctl, and winsz-termios into it.
7024         Add lchmod.
7025         Add top-level Misc section and put host-os, perl, and uptime
7026         into it.
7027
7028 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7029
7030         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
7031         now assume the stdint module.  Do not include inttypes.h.
7032         * lib/fsusage.h: Likewise.
7033         * lib/getndelim2.c: Likewise.
7034         * lib/human.h: Likewise.
7035         * lib/inttostr.h: Likewise.
7036         * lib/obstack.c: Likewise.
7037         * lib/regex_internal.h: Likewise.
7038         * lib/tempname.c: Likewise.
7039         * lib/utimecmp.c: Likewise.
7040         * lib/xstrtol.h: Likewise.
7041
7042         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
7043
7044         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
7045         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
7046         * lib/xtime.h: Likewise.
7047
7048 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7049
7050         * modules/openat (Files): Add lib/fchmodat.c.
7051         Fixes problem reported by Jay Youngman.
7052
7053 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7054
7055         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
7056         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
7057
7058 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
7059             Bruno Haible  <bruno@clisp.org>
7060
7061         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
7062         and is a script that invokes bison. Tighten the code. Add comments.
7063
7064 2006-08-18  Jim Meyering  <jim@meyering.net>
7065
7066         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
7067         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
7068         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
7069         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
7070
7071 2006-08-18  Bruno Haible  <bruno@clisp.org>
7072
7073         * modules/bison-i18n: New file.
7074         * MODULES.html.sh (Internationalization functions): Add it.
7075
7076 2006-08-18  Bruno Haible  <bruno@clisp.org>
7077
7078         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
7079         sys/statvfs.h. When getmntinfo was found, check its declaration and
7080         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
7081
7082 2006-08-18  Bruno Haible  <bruno@clisp.org>
7083
7084         * m4/bison-i18n.m4: New file, from bison.
7085
7086 2006-08-18  Bruno Haible  <bruno@clisp.org>
7087
7088         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
7089         (ME_DUMMY): Treat "kernfs" as a dummy.
7090         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
7091
7092 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7093
7094         Update from coreutils.
7095
7096         2006-08-15  Jim Meyering  <jim@meyering.net>
7097
7098         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
7099
7100         2006-01-17  Jim Meyering  <jim@meyering.net>
7101
7102         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
7103
7104         2006-01-11  Jim Meyering  <jim@meyering.net>
7105
7106         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
7107         Check for the lchmod function.
7108
7109 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7110
7111         Update from coreutils.
7112
7113         * lib/__fpending.h: Add copyright notice.
7114         * lib/fprintftime.h: Likewise.
7115         * lib/savedir.c: Use (C) in copyright notice.
7116         * lib/savedir.h: Likewise.
7117
7118         2006-08-15  Jim Meyering  <jim@meyering.net>
7119
7120         * lib/at-func.c: New file, with the logic of all emulated at-functions.
7121         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
7122         in support of the EXPECTED_ERRNO macro.
7123         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
7124         definitions.  Instead, define the appropriate symbols and include
7125         "at-func.c".
7126         * lib/mkdirat.c (mkdirat): Likewise.
7127         * lib/fchmodat.c (fchmodat): Likewise.
7128         (ENOSYS): Remove definition.
7129         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
7130         it.  Don't include "unistd--.h" -- it wasn't ever used.
7131
7132         2006-01-17  Jim Meyering  <jim@meyering.net>
7133
7134         Rewrite fts.c not to change the current working directory,
7135         by using openat, fstatat, fdopendir, etc..
7136
7137         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
7138         (HAVE_OPENAT_SUPPORT): Define.
7139         [_LIBC] (fchdir): Don't undef or define; no longer used.
7140         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
7141         Now, this `function' always succeeds, and consumes its file descriptor
7142         parameter -- so callers must not close such FDs.  Update callers.
7143         (diropen_fd, opendirat, cwd_advance_fd): New functions.
7144         (diropen): Add parameter, SP.  Adjust all callers.
7145         Implement using diropen_fd, rather than open.
7146         (fts_open): Initialize new member, fts_cwd_fd.
7147         Remove fts_rft-setting code.
7148         (fts_close): Close fts_cwd_fd, if necessary.
7149         (__opendir2): Define in terms of opendir or opendirat,
7150         depending on whether the FST_NOCHDIR flag is set.
7151         (fts_build): Since fts_safe_changedir consumes its FD, and since
7152         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
7153         and close the dup'd file descriptor upon failure.
7154         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
7155         (fts_safe_changedir): Tweak semantics to reflect that this function
7156         now calls cwd_advance_fd and hence consumes its FD argument.
7157         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
7158         [struct FTS] (fts_rft): Remove now-unused member.
7159         [struct FTS] (fts_cycle.state): Improve comment.
7160
7161         * lib/openat.c (openat_needs_fchdir): New function.
7162         * lib/openat.h (openat_needs_fchdir): Declare it.
7163
7164 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
7165
7166         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
7167         Problem and fix reported by Pádraig Brady in
7168         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
7169
7170 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7171
7172         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
7173
7174 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7175
7176         * lib/memcoll.c (memcoll): Optimize for the common case where the
7177         arguments are bytewise equal.
7178
7179 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7180
7181         * doc/regexprops-generic.texi: Add a copyright notice.
7182
7183 2006-08-15  Bruno Haible  <bruno@clisp.org>
7184
7185         * modules/tmpdir (License): Change to LGPL.
7186
7187 2006-08-15  Bruno Haible  <bruno@clisp.org>
7188
7189         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
7190         module.
7191
7192 2006-08-14  Simon Josefsson  <jas@extundo.com>
7193
7194         * config/srclist.txt: Add gnupload.
7195
7196 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7197
7198         Change copyright notice from LGPL 2 to GPL 2, since that's the
7199         standard form used in the gnulib repository.
7200         * tests/test-lock.c: Likewise.
7201         * tests/test-stdint.c: Likewise.
7202         * tests/test-tls.c: Likewise.
7203
7204         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
7205         prelude-manager.  User shorter URLs for GNU projects, without '?'.
7206         Add copyright notice.
7207
7208         * check-module: Add copyright notice.  Output a copyright
7209         notice if "--version" is specified.
7210         * modules/COPYING: New file.
7211         * tests/test-getaddrinfo.c: Add copyright notice.
7212         * tests/test-verify.c: Likewise.
7213
7214 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7215
7216         Change copyright notice from LGPL 2 to GPL 2, since that's the
7217         standard form used in the gnulib repository.
7218         * lib/lock.c: LGPL -> GPL.
7219         * lib/lock.h: Likewise.
7220         * lib/strnlen1.c: Likewise.
7221         * lib/strnlen1.h: Likewise.
7222         * lib/tls.c: Likewise.
7223         * lib/tls.h: Likewise.
7224         * lib/tmpdir.c: Likewise.
7225
7226         * lib/TODO: Remove; this belongs only in coreutils.
7227
7228 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7229
7230         Add copyright notices to long-enough files that lack them, since
7231         otherwise the files aren't clearly free.  Use the same notice that
7232         getdate.texi already uses.
7233         * doc/alloca-opt.texi: Add copyright notice.
7234         * doc/alloca.texi: Likewise.
7235         * doc/ctime.texi: Likewise.
7236         * doc/functions.texi: Likewise.
7237         * doc/gcd.texi: Likewise.
7238         * doc/gnulib-tool.texi: Likewise.
7239         * doc/inet_ntoa.texi: Likewise.
7240         * doc/visibility.texi: Likewise.
7241
7242         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
7243         * doc/quote.texi: Add copyright notice.
7244
7245         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
7246         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
7247         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
7248         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
7249         is now obsolete, and give a pointer to the Sun list.
7250         Add copyright notice.
7251
7252 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7253
7254         * config/srclistvars.sh: Add copyright notice.
7255
7256 2006-08-14  Eric Blake  <ebb9@byu.net>
7257
7258         Import the following change from libc:
7259
7260         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
7261
7262         Upstream bug 2997.
7263         * lib/misc/error.c: Add space between program name and message if file
7264         name is missing.
7265
7266 2006-08-12  Karl Berry  <karl@gnu.org>
7267
7268         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
7269         remove, these originate in gnulib now.
7270
7271 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7272
7273         * doc/Makefile (standards.info standards.html standards.dvi):
7274         Also depend on make-stds.texi.
7275
7276 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
7277
7278         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
7279         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
7280
7281         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
7282         in wchar_t.  Problem reported by Eric Blake.
7283
7284         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
7285         LEN is smaller than SIZE.  Suggested by Bruno Haible.
7286         Also, help the compiler to keep LEN in a register.
7287
7288 2006-08-11  Eric Blake  <ebb9@byu.net>
7289
7290         * users.txt: Sort.  Add tar.
7291
7292 2006-08-11  Bruno Haible  <bruno@clisp.org>
7293
7294         * users.txt: New file.
7295
7296 2006-08-11  Bruno Haible  <bruno@clisp.org>
7297
7298         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
7299         before <wchar.h>. Needed for OSF/1 and BSD/OS.
7300
7301 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7302
7303         * modules/snprintf (Depends-on): Remove minmax.
7304         (Maintainer): Add self and Bruno.
7305
7306 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7307
7308         * lib/.cppi-disable: Add snprintf.h, socket_.h.
7309         * lib/snprintf.c: Include <errno.h> and <limits.h>.
7310         (EOVERFLOW): Define if the system does not.
7311         Do not include "minmax.h"; it wasn't used.
7312         (snprintf): Don't assume size_t promotes to an unsigned type.
7313         Fix bug when generated string was too long for the buffer: the
7314         buffer's contents are supposed to be the initial prefix of the
7315         output.  Don't assume vasnprintf returns EOVERFLOW if the size
7316         exceeds INT_MAX; do the check ourselves.
7317
7318         Import the following changes from libc:
7319
7320         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
7321
7322         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
7323         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
7324         set wc to the byte which couldn't be converted.
7325         (re_string_reconstruct): Don't clear valid_raw_len before calling
7326         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
7327         tip_context using re_string_context_at.
7328
7329         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
7330
7331         * lib/posix/regex.h: g++ still cannot handled [restrict].
7332
7333         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
7334
7335         * lib/posix/regex.h: Remove special handling for VMS.
7336
7337 2006-08-10  Jim Meyering  <jim@meyering.net>
7338
7339         * modules/same-inode: New module.
7340         * modules/dev-ino: New module.
7341         * modules/cycle-check: Depend on these modules, rather than simply
7342         including their .h files.
7343         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
7344         required via m4/cycle-check.m4.
7345         * modules/same: Depend on new same-inode module, rather than
7346         including same-inode.h.
7347         * modules/chdir-safer: New file.
7348
7349         * modules/chown (Depends-on): Add stat-macros.
7350
7351 2006-08-10  Jim Meyering  <jim@meyering.net>
7352
7353         * m4/cycle-check.m4: New file.
7354         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
7355         * m4/dev-ino.m4, m4/same-inode.m4: New files.
7356
7357 2006-08-10  Eric Blake  <ebb9@byu.net>
7358
7359         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
7360         in from original proposal.
7361
7362 2006-08-10  Eric Blake  <ebb9@byu.net>
7363         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7364
7365         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
7366         namespace.
7367
7368 2006-08-10  Bruno Haible  <bruno@clisp.org>
7369
7370         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
7371         as well.
7372
7373 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7374
7375         Sync from coreutils.
7376
7377         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
7378
7379         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
7380         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
7381
7382 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7383
7384         * modules/restrict: Remove; no longer needed now that we assume
7385         Autoconf 2.59 or later.
7386         * MODULES.html.sh: Remove 'restrict'.
7387         * modules/argp (Depends-on): Remove 'restrict'.
7388         * modules/base64 (Depends-on): Likewise.
7389         * modules/gc (Depends-on): Likewise.
7390         * modules/getaddrinfo (Depends-on): Likewise.
7391         * modules/glob (Depends-on): Likewise.
7392         * modules/inet_ntop (Depends-on): Likewise.
7393         * modules/inet_pton (Depends-on): Likewise.
7394         * modules/memxor (Depends-on): Likewise.
7395         * modules/regex (Depends-on): Likewise.
7396         * modules/strtok_r (Depends-on): Likewise.
7397         * modules/time_r (Depends-on): Likewise.
7398
7399 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7400
7401         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7402         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7403         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7404         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7405         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7406         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7407         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7408         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7409
7410         Merge from coreutils.
7411         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7412         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7413         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7414         * m4/time_r.m4 (gl_TIME_R): Likewise.
7415
7416 2006-08-09  Karl Berry  <karl@gnu.org>
7417
7418         * config/srclist.txt: no more gettext-tools, per Bruno.
7419
7420 2006-08-08  Eric Blake  <ebb9@byu.net>
7421
7422         * modules/verror: New module.
7423         * MODULES.html.sh: Document it.
7424
7425 2006-08-08  Eric Blake  <ebb9@byu.net>
7426
7427         * lib/verror.h, lib/verror.c: New files.
7428
7429 2006-08-08  Eric Blake  <ebb9@byu.net>
7430
7431         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7432         verror_at_line output complies with GNU Coding Standards even when
7433         file is NULL.
7434
7435 2006-08-07  Bruno Haible  <bruno@clisp.org>
7436
7437         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7438         versions of AIX.
7439         Reported by Ralf Wildenhues.
7440
7441 2006-08-07  Bruno Haible  <bruno@clisp.org>
7442
7443         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7444         in an AC_DEFUN. Needed so that the autoconf snippets can use
7445         AC_REQUIRE.
7446
7447 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7448
7449         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7450         Initialize pkgdata_DATA.
7451         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7452         overriding it.
7453
7454 2006-08-06  Eric Blake  <ebb9@byu.net>
7455
7456         * lib/error.h: Fold in some upstream changes from glibc.
7457         * lib/error.c: Likewise.
7458
7459 2006-08-04  Bruno Haible  <bruno@clisp.org>
7460
7461         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7462         Make the mostlyclean-local rule depend on mostlyclean-generic.
7463         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7464
7465 2006-07-31  Bruno Haible  <bruno@clisp.org>
7466
7467         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7468         <stdlib.h>, <string.h>.
7469
7470 2006-07-30  Bruno Haible  <bruno@clisp.org>
7471
7472         * modules/readlink (License): Change to LGPL.
7473
7474 2006-07-30  Bruno Haible  <bruno@clisp.org>
7475
7476         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7477         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7478         set PKGDATADIR to point to it.
7479
7480 2006-07-30  Bruno Haible  <bruno@clisp.org>
7481
7482         * modules/csharpexec (configure.ac): Comment out macro invocation.
7483         * modules/javaexec (configure.ac): Likewise.
7484         * modules/javacomp-script (configure.ac): Likewise.
7485
7486         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7487
7488 2006-07-30  Bruno Haible  <bruno@clisp.org>
7489
7490         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7491         linked-list.
7492
7493 2006-07-30  Bruno Haible  <bruno@clisp.org>
7494
7495         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7496
7497 2006-07-30  Bruno Haible  <bruno@clisp.org>
7498
7499         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7500         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7501         get removed.
7502
7503 2006-07-29  Bruno Haible  <bruno@clisp.org>
7504
7505         Make it possible for gnulib-tool to work with locally modified or
7506         augmented gnulib repositories.
7507         * gnulib-tool (func_usage): Document --local-dir option.
7508         (local_gnulib_dir): New variable.
7509         Handle --local-dir option.
7510         (func_lookup_file): New function.
7511         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7512         (func_get_description, func_get_filelist, func_get_description,
7513         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7514         func_get_automake_snippet, func_get_include_directive,
7515         func_get_license, func_get_maintainer): Use func_lookup_file.
7516         (func_import, func_create_testdir): Use func_lookup_file.
7517
7518 2006-07-29  Bruno Haible  <bruno@clisp.org>
7519
7520         * modules/setenv (Depends-on): Add unistd.
7521
7522 2006-07-29  Bruno Haible  <bruno@clisp.org>
7523
7524         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7525
7526 2006-07-29  Bruno Haible  <bruno@clisp.org>
7527
7528         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7529
7530 2006-07-29  Bruno Haible  <bruno@clisp.org>
7531
7532         * gnulib-tool (import, update): If there is no Makefile.am, look at
7533         aclocal.m4, instead of bailing out.
7534
7535 2006-07-29  Bruno Haible  <bruno@clisp.org>
7536
7537         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7538         Categorize the options by when they are useful.
7539
7540 2006-07-29  Bruno Haible  <bruno@clisp.org>
7541
7542         * gnulib-tool (func_usage): Document option --no-libtool.
7543         Handle option --no-libtool.
7544         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7545         for changed semantics of $libtool variable.
7546         (func_import): Likewise. If libtool is not used, show this through
7547         an option --no-libtool.
7548         (func_create_testdir): Update.
7549
7550 2006-07-29  Bruno Haible  <bruno@clisp.org>
7551
7552         * gnulib-tool (func_import): Extend error message about missing
7553         --doc-base.
7554
7555 2006-07-29  Bruno Haible  <bruno@clisp.org>
7556
7557         * gnulib-tool (func_import): Don't create the $docbase directory if
7558         there is no file to store there.
7559
7560 2006-07-29  Bruno Haible  <bruno@clisp.org>
7561
7562         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7563         relevant, look for configure.ac there, not in the current directory.
7564         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7565
7566 2006-07-29  Bruno Haible  <bruno@clisp.org>
7567
7568         * gnulib-tool (SORT): New variable.
7569         (func_usage): Undocument --assume-autoconf option.
7570         Remove --assume-autoconf option handling.
7571         (autoconf_minversion): Determine from the contents of configure.ac.
7572         (func_import): Remove autoconf_minversion handling.
7573         Suggested by Eric Blake.
7574
7575 2006-07-29  Bruno Haible  <bruno@clisp.org>
7576
7577         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7578
7579 2006-07-29  Bruno Haible  <bruno@clisp.org>
7580
7581         * config/srclist.txt (*setenv.[ch]): Remove rules.
7582
7583 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7584
7585         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7586
7587 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7588
7589         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7590         arpa/inet.h.
7591
7592 2006-07-28  Simon Josefsson  <jas@extundo.com>
7593
7594         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7595         * modules/inet_pton (Depends-on): Likewise.
7596
7597 2006-07-28  Simon Josefsson  <jas@extundo.com>
7598
7599         * m4/netinet_in_h.m4: New file.
7600
7601 2006-07-28  Simon Josefsson  <jas@extundo.com>
7602
7603         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7604         #include's.
7605
7606 2006-07-28  Simon Josefsson  <jas@extundo.com>
7607
7608         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7609         #include's.
7610
7611 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7612
7613         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7614         setgid on directories only if they set these bits.
7615         * lib/modechange.h: Remove obsolete comment about masks.
7616
7617 2006-07-28  Eric Blake  <ebb9@byu.net>
7618
7619         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7620         macro expansion.
7621
7622 2006-07-28  Bruno Haible  <bruno@clisp.org>
7623
7624         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7625
7626 2006-07-28  Bruno Haible  <bruno@clisp.org>
7627
7628         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7629
7630 2006-07-28  Bruno Haible  <bruno@clisp.org>
7631
7632         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7633         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7634         Define fallbacks.
7635         Avoids link error on FreeBSD 4.x.
7636         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7637
7638         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7639         encoding.
7640         * lib/mbswidth.c (iswcntrl): Likewise.
7641
7642 2006-07-27  Bruno Haible  <bruno@clisp.org>
7643
7644         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7645         test.
7646
7647 2006-07-27  Bruno Haible  <bruno@clisp.org>
7648
7649         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7650         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7651         defined.
7652
7653 2006-07-26  Eric Blake  <ebb9@byu.net>
7654
7655         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7656
7657 2006-07-26  Eric Blake  <ebb9@byu.net>
7658
7659         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7660         like mingw that lack mkstemp.
7661         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7662         avoid compilation warning on mingw.
7663
7664 2006-07-26  Bruno Haible  <bruno@clisp.org>
7665
7666         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7667         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7668         INT_FAST*_MIN, INTPTR_MIN.
7669
7670 2006-07-25  Bruno Haible  <bruno@clisp.org>
7671
7672         * modules/version-etc (Depends-on): Add stdarg.
7673
7674 2006-07-25  Bruno Haible  <bruno@clisp.org>
7675
7676         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7677         complex commands.
7678
7679 2006-07-25  Bruno Haible  <bruno@clisp.org>
7680
7681         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7682         defined in <stdarg.h> or config.h.
7683
7684 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7685
7686         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7687         (gl_STDIO_SAFER): Remove.
7688
7689 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7690
7691         * MODULES.html.sh (File stream based Input/Output):
7692         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7693         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7694         * modules/fopen-safer, modules/tmpfile-safer: New files.
7695         * modules/stdio-safer: Remove.
7696
7697 2006-07-24  Bruno Haible  <bruno@clisp.org>
7698
7699         * modules/tmpdir: New file.
7700         * MODULES.html.sh (File system functions): Add it.
7701
7702 2006-07-24  Bruno Haible  <bruno@clisp.org>
7703
7704         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7705         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7706
7707 2006-07-24  Bruno Haible  <bruno@clisp.org>
7708
7709         * modules/clean-temp: New file.
7710
7711 2006-07-24  Bruno Haible  <bruno@clisp.org>
7712
7713         * m4/tmpdir.m4: New file, from GNU gettext.
7714
7715 2006-07-24  Bruno Haible  <bruno@clisp.org>
7716
7717         * lib/tmpdir.h: New file, from GNU gettext.
7718         * lib/tmpdir.c: New file, from GNU gettext.
7719
7720 2006-07-24  Bruno Haible  <bruno@clisp.org>
7721
7722         * lib/clean-temp.h: New file, from GNU gettext.
7723         * lib/clean-temp.c: New file, from GNU gettext.
7724
7725 2006-07-23  Eric Blake  <ebb9@byu.net>
7726
7727         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7728         (Depends-on): Add binary-io.
7729
7730 2006-07-23  Eric Blake  <ebb9@byu.net>
7731
7732         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7733
7734 2006-07-23  Eric Blake  <ebb9@byu.net>
7735
7736         * lib/tmpfile-safer.c: New file.
7737         * lib/stdio-safer.h (fopen_safer): Add prototype.
7738         * lib/stdio--.h (tmpfile): Make safer.
7739
7740 2006-07-23  Bruno Haible  <bruno@clisp.org>
7741
7742         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7743         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7744         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7745         gl_linked_remove_at): Use it.
7746
7747 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7748         and Simon Josefsson <jas@extundo.com>
7749
7750         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7751
7752         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7753
7754 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7755
7756         * modules/close-stream: New file.
7757         * modules/closeout (Description): Make it clear that it exits
7758         with a diagnostic on error.
7759         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7760         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7761
7762 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7763
7764         * m4/close-stream.m4: New file.
7765
7766 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7767
7768         * lib/close-stream.c, lib/close-stream.h: New files.
7769
7770 2006-07-22  Bruno Haible  <bruno@clisp.org>
7771
7772         Merge from GNU gettext 0.15.
7773
7774         2006-05-01  Bruno Haible  <bruno@clisp.org>
7775
7776                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7777
7778         2006-07-22  Bruno Haible  <bruno@clisp.org>
7779
7780                 * modules/javaversion: New file.
7781                 * MODULES.html.sh (Java): Add javaversion.
7782
7783         2006-03-12  Bruno Haible  <bruno@clisp.org>
7784
7785                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7786
7787         2005-12-04  Bruno Haible  <bruno@clisp.org>
7788
7789                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7790                 (untested).
7791
7792         2006-06-21  Bruno Haible  <bruno@clisp.org>
7793
7794                 Avoid warnings from recent versions of mcs.
7795                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7796                 -o, -L, -r any more. Use options documented since mcs-1.0
7797                 instead. Similarly for -g.
7798
7799         2005-12-04  Bruno Haible  <bruno@clisp.org>
7800
7801                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7802                 .resources, not .resource.
7803
7804         2005-07-09  Bruno Haible  <bruno@clisp.org>
7805
7806                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7807                 add a .dll suffix.
7808                 Reported by Mark Junker <mjscod@gmx.de>.
7809
7810         2006-07-22  Bruno Haible  <bruno@clisp.org>
7811
7812                 * modules/gettext: Upgrade to gettext-0.15.
7813                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7814                 m4/visibility.m4.
7815                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7816
7817 2006-07-22  Bruno Haible  <bruno@clisp.org>
7818
7819         Merge from GNU gettext 0.15.
7820
7821         2006-03-25  Bruno Haible  <bruno@clisp.org>
7822
7823                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7824
7825         2006-07-21  Bruno Haible  <bruno@clisp.org>
7826
7827                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7828                 "1.1".
7829
7830         2006-05-09  Bruno Haible  <bruno@clisp.org>
7831
7832                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7833                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7834                 for the conftestver execution.
7835
7836         2006-05-01  Bruno Haible  <bruno@clisp.org>
7837
7838                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7839                 optional target-version argument. Verify that the compiler
7840                 groks source of the specified source-version, or add -source
7841                 option as necessary. Verify that the compiler produces
7842                 bytecode in the specified target-version, or add -target and
7843                 -source options as necessary. Make the result of the test
7844                 available as variable CONF_JAVAC. Also log error output in
7845                 config.log.
7846
7847         2006-03-11  Bruno Haible  <bruno@clisp.org>
7848
7849                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7850
7851         2006-05-09  Bruno Haible  <bruno@clisp.org>
7852
7853                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7854                 CLASSPATH_SEPARATOR to a semicolon.
7855
7856         2006-03-12  Bruno Haible  <bruno@clisp.org>
7857
7858                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7859                 available as variable CONF_JAVA, for subsequent autoconf
7860                 tests. Also log error output in config.log.
7861
7862         2006-07-19  Bruno Haible  <bruno@clisp.org>
7863
7864                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7865                 that getline works on glibc2 systems. Needed to avoid trouble
7866                 in relocatable.c.
7867                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7868
7869         2005-12-04  Bruno Haible  <bruno@clisp.org>
7870
7871                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7872                 launcher (untested).
7873
7874         2005-12-04  Bruno Haible  <bruno@clisp.org>
7875
7876                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7877
7878         2006-07-22  Bruno Haible  <bruno@clisp.org>
7879
7880                 * gettext.m4: Update from GNU gettext-0.15.
7881                 * nls.m4: Likewise.
7882                 * po.m4: Likewise.
7883                 * inttypes-pri.m4: Likewise.
7884                 * inttypes-h.m4: Renamed from inttypes.m4.
7885                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7886
7887 2006-07-22  Bruno Haible  <bruno@clisp.org>
7888
7889         Merge from GNU gettext 0.15.
7890
7891         2005-07-05  Bruno Haible  <bruno@clisp.org>
7892
7893                 * printf-args.c (printf_fetchargs): Work around broken
7894                 definition of wint_t on mingw.
7895
7896         2005-02-12  Bruno Haible  <bruno@clisp.org>
7897
7898                 * xallocsa.h: Add extern "C" for C++.
7899
7900         2006-05-17  Bruno Haible  <bruno@clisp.org>
7901
7902                 Cygwin portability.
7903                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7904
7905         2006-04-30  Bruno Haible  <bruno@clisp.org>
7906
7907                 * progreloc.c: Include <mach-o/dyld.h> if available.
7908                 (find_executable): Use _NSGetExecutablePath when possible.
7909
7910         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7911
7912                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7913                 function.
7914
7915         2005-12-29  Bruno Haible  <bruno@clisp.org>
7916
7917                 * progreloc.c (set_program_name_and_installdir): Fix
7918                 compilation error.
7919
7920         2005-12-04  Bruno Haible  <bruno@clisp.org>
7921
7922                 Cygwin portability.
7923                 * progreloc.c: Include <windows.h> also on Cygwin.
7924                 (find_executable): Add support for Cygwin.
7925                 (set_program_name_and_installdir): Handle also platforms with
7926                 nonempty EXEEXT.
7927
7928         2006-07-11  Bruno Haible  <bruno@clisp.org>
7929
7930                 * javacomp.c: Fix a comment.
7931                 Reported by Jim Meyering.
7932
7933         2006-04-30  Bruno Haible  <bruno@clisp.org>
7934
7935                 * javacomp.h (compile_java_class): Add source_version,
7936                 target_version arguments.
7937                 * javacomp.c: Rewritten to choose only a compiler that
7938                 respects the specified source_version and target_version.
7939
7940         2006-06-27  Bruno Haible  <bruno@clisp.org>
7941
7942                 Assume correct S_ISDIR macro.
7943                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
7944
7945         2006-07-22  Bruno Haible  <bruno@clisp.org>
7946
7947                 * javaversion.h: New file, from GNU gettext.
7948                 * javaversion.c: New file, from GNU gettext.
7949                 * javaversion.java: New file, from GNU gettext.
7950                 * javaversion.class: New file, from GNU gettext.
7951
7952         2006-05-17  Bruno Haible  <bruno@clisp.org>
7953
7954                 Cygwin portability.
7955                 * javaexec.c (execute_java_class): Test for jview program
7956                 also on Cygwin.
7957
7958         2006-04-09  Bruno Haible  <bruno@clisp.org>
7959
7960                 * fatal-signal.c: Don't include string.h.
7961                 (at_fatal_signal): Use a copying loop instead of memcpy.
7962
7963         2005-12-04  Bruno Haible  <bruno@clisp.org>
7964
7965                 * csharpexec.c: Add support for 'clix' launcher (untested).
7966                 (execute_csharp_using_sscli): New function.
7967                 (execute_csharp_program): Call it.
7968
7969         2006-06-21  Bruno Haible  <bruno@clisp.org>
7970
7971                 Avoid warnings from recent versions of mcs.
7972                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7973                 -o, -L, -r any more. Use options documented since mcs-1.0
7974                 instead. Similarly for -g.
7975
7976         2005-07-09  Bruno Haible  <bruno@clisp.org>
7977
7978                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7979                 add a .dll suffix.
7980                 Reported by Mark Junker <mjscod@gmx.de>.
7981
7982         2006-06-17  Bruno Haible  <bruno@clisp.org>
7983
7984                 * config.charset: Update for NetBSD 3.0.
7985
7986         2006-05-17  Bruno Haible  <bruno@clisp.org>
7987
7988                 Cygwin portability.
7989                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7990
7991         2006-05-16  Bruno Haible  <bruno@clisp.org>
7992
7993                 * localcharset.c [CYGWIN]: Include <windows.h>.
7994                 (get_charset_aliases): For Cygwin, return the same CPxxx
7995                 aliases list as under WIN32.
7996                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7997                 the environment variables. Fall back to GetACP().
7998
7999         2006-04-05  Bruno Haible  <bruno@clisp.org>
8000
8001                 * config.charset: Update Juan Manuel Guerrero's address.
8002
8003         2005-02-12  Bruno Haible  <bruno@clisp.org>
8004
8005                 * allocsa.h: Add extern "C" for C++.
8006
8007         2005-02-10  Bruno Haible  <bruno@clisp.org>
8008
8009                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
8010                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
8011
8012         2006-07-22  Bruno Haible  <bruno@clisp.org>
8013
8014                 * gettext.h: Update to GNU gettext-0.15.
8015
8016 2006-07-22  Bruno Haible  <bruno@clisp.org>
8017
8018         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
8019         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
8020         lib-prefix.m4, longdouble.m4, ssize_t.m4.
8021
8022 2006-07-21  Eric Blake  <ebb9@byu.net>
8023
8024         * modules/stdlib-safer: New file.
8025         * MODULES.html.sh (File stream based Input/Output): Add
8026         stdlib-safer.
8027
8028 2006-07-21  Eric Blake  <ebb9@byu.net>
8029
8030         * lib/stdlib-safer.h: New file from coreutils, required by
8031         stdlib--.h.
8032
8033 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
8034
8035         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
8036
8037 2006-07-20  Bruno Haible  <bruno@clisp.org>
8038
8039         * gnulib-tool: Recognize new option --assume-autoconf.
8040         (autoconf_minversion): New variable.
8041         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
8042
8043 2006-07-20  Bruno Haible  <bruno@clisp.org>
8044
8045         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
8046
8047 2006-07-19  Derek R. Price  <derek@ximbiot.com>
8048
8049         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
8050         Reindent and repaginate.
8051
8052 2006-07-19  Derek Price  <derek@ximbiot.com>
8053
8054         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
8055         Correct grammar.
8056
8057 2006-07-17  Bruno Haible  <bruno@clisp.org>
8058
8059         * modules/list: New file.
8060         * modules/array-list: New file.
8061         * modules/carray-list, modules/carray-list-tests: New files.
8062         * modules/linked-list, modules/linked-list-tests: New files.
8063         * modules/avltree-list, modules/avltree-list-tests: New files.
8064         * modules/rbtree-list, modules/rbtree-list-tests: New files.
8065         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
8066         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
8067         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
8068         * modules/oset: New file.
8069         * modules/array-oset: New file.
8070         * modules/avltree-oset, modules/avltree-oset-tests: New files.
8071         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
8072         * tests/test-carray_list.c: New file.
8073         * tests/test-linked_list.c: New file.
8074         * tests/test-avltree_list.c: New file.
8075         * tests/test-rbtree_list.c: New file.
8076         * tests/test-linkedhash_list.c: New file.
8077         * tests/test-avltreehash_list.c: New file.
8078         * tests/test-rbtreehash_list.c: New file.
8079         * tests/test-avltree_oset.c: New file.
8080         * tests/test-rbtree_oset.c: New file.
8081         * MODULES.html.sh (Container data structures): New section.
8082
8083 2006-07-17  Bruno Haible  <bruno@clisp.org>
8084
8085         * m4/gl_list.m4: New file.
8086
8087 2006-07-17  Bruno Haible  <bruno@clisp.org>
8088
8089         * lib/gl_list.h: New file.
8090         * lib/gl_list.c: New file.
8091         * lib/gl_array_list.h: New file.
8092         * lib/gl_array_list.c: New file.
8093         * lib/gl_carray_list.h: New file.
8094         * lib/gl_carray_list.c: New file.
8095         * lib/gl_linked_list.h: New file.
8096         * lib/gl_linked_list.c: New file.
8097         * lib/gl_anylinked_list1.h: New file.
8098         * lib/gl_anylinked_list2.h: New file.
8099         * lib/gl_avltree_list.h: New file.
8100         * lib/gl_avltree_list.c: New file.
8101         * lib/gl_anyavltree_list1.h: New file.
8102         * lib/gl_anyavltree_list2.h: New file.
8103         * lib/gl_rbtree_list.h: New file.
8104         * lib/gl_rbtree_list.c: New file.
8105         * lib/gl_anyrbtree_list1.h: New file.
8106         * lib/gl_anyrbtree_list2.h: New file.
8107         * lib/gl_anytree_list1.h: New file.
8108         * lib/gl_anytree_list2.h: New file.
8109         * lib/gl_linkedhash_list.h: New file.
8110         * lib/gl_linkedhash_list.c: New file.
8111         * lib/gl_anyhash_list1.h: New file.
8112         * lib/gl_anyhash_list2.h: New file.
8113         * lib/gl_avltreehash_list.h: New file.
8114         * lib/gl_avltreehash_list.c: New file.
8115         * lib/gl_rbtreehash_list.h: New file.
8116         * lib/gl_rbtreehash_list.c: New file.
8117         * lib/gl_anytreehash_list1.h: New file.
8118         * lib/gl_anytreehash_list2.h: New file.
8119
8120         * lib/gl_oset.h: New file.
8121         * lib/gl_oset.c: New file.
8122         * lib/gl_array_oset.h: New file.
8123         * lib/gl_array_oset.c: New file.
8124         * lib/gl_avltree_oset.h: New file.
8125         * lib/gl_avltree_oset.c: New file.
8126         * lib/gl_rbtree_oset.h: New file.
8127         * lib/gl_rbtree_oset.c: New file.
8128         * lib/gl_anytree_oset.h: New file.
8129
8130 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8131
8132         * m4/mkancesdirs.m4: New file.
8133         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
8134         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
8135         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
8136         it.
8137
8138 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8139
8140         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
8141         * lib/mkancesdirs.h: New files.
8142         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
8143         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
8144         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
8145         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
8146         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
8147         callers changed.  Revamp internals significantly, by not
8148         attempting to create directories that are temporarily more
8149         permissive than the final results.  Do not attempt to use
8150         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
8151         This removes some race conditions, fixes some bugs, and simplifies
8152         things.  Use new dirchownmod function to do owner and mode changes.
8153         * lib/mkdir-p.h: Likewise.
8154         * lib/modechange.c (octal_to_mode): New function.
8155         (struct mode_change): New member mentioned.
8156         (make_node_op_equals): New arg mentioned.  All callers changed.
8157         (mode_compile): Keep track of which mode bits the user has explicitly
8158         mentioned.
8159         (mode_adjust): New arg DIR, so that we implement the X op correctly.
8160         New arg PMODE_BITS, to keep track of which mode bits the user
8161         mentioned; it treats S_ISUID and S_ISGID speciall.
8162         All callers changed.
8163         * lib/modechange.h: Likewise.
8164
8165 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8166
8167         * MODULES.html.sh: Add mkancestors.
8168         * modules/mkancesdirs: New module.
8169         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
8170         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
8171         The chdir-safer and afs files are now orphans; I'll remove them
8172         unless someone speaks up.
8173         Add lib/dirchownmod.c, lib/dirchownmod.h.
8174         (Depends-on): Remove alloca, chown, save-cwd, dirname.
8175         Add lchown, mkancesdirs.
8176         (Maintainer): Add self.
8177
8178 2006-07-15  Karl Berry  <karl@gnu.org>
8179
8180         * gnulib-tool: help message wording/arrangement.
8181
8182 2006-07-14  Simon Josefsson  <jas@extundo.com>
8183
8184         * doc/gnulib.texi (Libtool and Windows): New section.
8185
8186 2006-07-12  Simon Josefsson  <jas@extundo.com>
8187
8188         * modules/gendocs (License): Fix license, approved by Karl.
8189
8190 2006-07-12  Eric Blake  <ebb9@byu.net>
8191
8192         * MODULES.html.sh: Add gendocs.
8193
8194 2006-07-11  Eric Blake  <ebb9@byu.net>
8195
8196         * modules/fdl: New module, to install doc/fdl.texi.
8197         * MODULES.html.sh: Add new section for documentation modules.
8198         * gnulib-tool: Avoid space-tab.
8199         (--doc-base): New option, to manage files from doc.
8200
8201 2006-07-11  Eric Blake  <ebb9@byu.net>
8202
8203         * m4/absolute-header.m4: Fix comments to match recent change.
8204
8205 2006-07-11  Eric Blake  <ebb9@byu.net>
8206
8207         * gnulib-tool: List --doc-base before --tests-base.
8208
8209 2006-07-11  Derek R. Price  <derek@ximbiot.com>
8210
8211         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
8212
8213 2006-07-11  Bruno Haible  <bruno@clisp.org>
8214
8215         * README: Mention where to put documentation.
8216
8217 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8218
8219         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
8220
8221 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8222
8223         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
8224         to stdint.m4.
8225
8226 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8227
8228         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
8229         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
8230         "no/such/file/stdint.h" when there is no such file, so that
8231         the resulting C code can be parsed by dodgy compilers.
8232         Problems reported by Bob Proulx.
8233
8234 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8235
8236         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
8237         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8238         macros into the GNU _D_EXACT_NAMLEN.
8239         * lib/savedir.c:  Likewise.
8240         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
8241
8242 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8243         and Paul Eggert  <eggert@cs.ucla.edu>
8244
8245         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
8246         * m4/savedir.m4:
8247         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8248         macros into the GNU _D_EXACT_NAMLEN.
8249
8250 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8251
8252         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
8253         around the absolute name, to work around a problem with the HP-UX
8254         11.23 native C compiler, reported by Bob Proulx.
8255
8256 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8257
8258         * doc/maintain.texi, make-stds.texi: Sync from
8259         <http://savannah.gnu.org/projects/gnustandards>.
8260
8261 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8262
8263         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
8264
8265 2006-07-09  Jim Meyering  <jim@meyering.net>
8266
8267         * m4/glob.m4: Remove a doubled word in a comment.
8268
8269 2006-07-09  Jim Meyering  <jim@meyering.net>
8270
8271         * lib/argp-pv.c: Remove a doubled word in a comment.
8272         * lib/check-version.c (check_version): Likewise.
8273         * lib/javacomp.c (compile_java_class): Likewise.
8274
8275 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
8276
8277         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
8278         for the benefit of people using Autoconf 2.60.  If you want to
8279         support older Autoconf versions you can copy m4/onceonly_2_57.m4
8280         (or m4/onceonly.m4, if pre-2.57) manually.
8281
8282 2006-07-08  Jim Meyering  <jim@meyering.net>
8283
8284         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
8285         comment.
8286         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
8287         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
8288         comment.
8289
8290 2006-07-08  Jim Meyering  <jim@meyering.net>
8291
8292         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
8293
8294 2006-07-07  Simon Josefsson  <jas@extundo.com>
8295
8296         * tests/test-crc.c: Change expected crc value, the test vector
8297         were probably computed using the old broken crc.c?
8298
8299 2006-07-06  Simon Josefsson  <jas@extundo.com>
8300
8301         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
8302         now the canonical place for the M4 file).
8303
8304         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
8305         from the sys_socket dependency now.
8306
8307         * modules/inet_pton (Files): Ditto.
8308
8309         * modules/inet_ntop (Files): Ditto.
8310
8311 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8312
8313         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
8314         not gl_PREREQ_GETUSERSHELL.
8315
8316 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8317
8318         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
8319         with only one argument, for Autoconf 2.60.
8320         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
8321         expand to nothing, so add a shell command to avoid syntax error.
8322         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8323
8324 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8325
8326         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
8327
8328 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8329
8330         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
8331         no longer needed.  Check for isblank decl.
8332         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
8333         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
8334         of existence.
8335
8336 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8337
8338         * lib/getloadavg.c: Use __VMS, not VMS.
8339         * lib/getopt.c: Likewise.
8340         * lib/getpagesize.h: Likewise.
8341         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
8342         and probably does not work.
8343
8344 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8345
8346         * lib/.cppi-disable: Add wcwidth.
8347         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
8348         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
8349         (ISGRAPH): Remove.  All uses changed to isgraph.
8350         (FOLD) [!defined _LIBC]: Remove special case.
8351         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
8352         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
8353         HAVE_ISBLANK.
8354         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
8355         case.
8356
8357 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8358
8359         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
8360         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
8361         brackets.  Other minor changes to suppress some compiler
8362         warnings.
8363
8364 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8365         and Paul Eggert  <eggert@cs.ucla.edu>
8366
8367         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
8368         of invoking obsolescent AC_HEADER_DIRENT macro.
8369         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
8370         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
8371         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
8372         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
8373         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
8374         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8375         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
8376         * m4/readdir.m4: Remove; no longer needed.
8377
8378 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8379         and Paul Eggert  <eggert@cs.ucla.edu>
8380
8381         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
8382         Don't worry about this obsolete case any more.
8383         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8384         directories.
8385         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8386         worry about this obsolete case any more.
8387         * lib/fts.c: Likewise.
8388         * lib/getcwd.c: Likewise.
8389         * lib/glob.h: Likewise.
8390         * lib/savedir.c: Likewise.
8391
8392 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8393
8394         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8395         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8396         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8397         needed.
8398         All uses removed.
8399         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8400         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8401         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8402         needed.
8403         * m4/getdate.m4 (gl_GETDATE): Likewise.
8404         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8405         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8406         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8407         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8408         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8409         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8410         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8411         needed.
8412
8413 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8414
8415         * lib/memcasecmp.c: Include <limits.h>.
8416         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8417         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8418         Don't assume isdigit succeeds only on '0' through '9'.
8419
8420 2006-07-05  Eric Blake  <ebb9@byu.net>
8421
8422         * modules/getaddrinfo (Depends-on): Add snprintf.
8423
8424 2006-07-05  Eric Blake  <ebb9@byu.net>
8425
8426         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8427         to avoid 'header present but could not be compiled' on cygwin.
8428
8429 2006-07-05  Eric Blake  <ebb9@byu.net>
8430
8431         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8432         missing from netdb.h.
8433         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8434
8435 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8436
8437         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8438         no longer needed.
8439         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8440         * m4/getdate.m4 (gl_GETDATE): Likewise.
8441         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8442         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8443         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8444         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8445         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8446
8447 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8448
8449         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8450         All uses of is_space replaced by isspace.
8451         * lib/exit.h: Don't talk about STDC_HEADERS.
8452         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8453         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8454         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8455         replaced by isprint etc.
8456         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8457         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8458         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8459         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8460         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8461         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8462
8463 2006-07-05  Bruno Haible  <bruno@clisp.org>
8464
8465         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8466         the function exists, before testing against AIX.
8467         Reported by Martin Lambers <marlam@marlam.de>.
8468
8469 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8470
8471         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8472         From Mark D. Baushke.
8473
8474 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8475
8476         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8477         to the absolute name, not just one, to bypass Sun C 5.8's
8478         "warning: #include of /usr/include/... may be non-portable".
8479
8480 2006-07-04  Eric Blake  <ebb9@byu.net>
8481
8482         * modules/dirname-tests: New test module.
8483         * tests/test-dirname.c: New file, replacing dirname.c
8484         TEST_DIRNAME section that was recently deleted.
8485
8486 2006-07-04  Bruno Haible  <bruno@clisp.org>
8487
8488         Assume ANSI C header files and <ctype.h> functions.
8489         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8490         (mbsnwidth): Use isprint, iscntrl instead.
8491
8492 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8493
8494         Merge from coreutils.
8495         * MODULES.html.sh: Add xstrtold.
8496         * modules/xstrtold: New file.
8497         * modules/cycle-check (Files): Add lib/same-inode.h.
8498         * modules/dirname (Files): Add m4/double-slash-root.m4.
8499         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8500         * modules/mkdir-p (Files): Add lib/same-inode.h.
8501         * modules/same (Files): Add lib/same-inode.h.
8502
8503 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8504
8505         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8506         This is to keep the terminology clean; POSIX talks about
8507         "absolute pathnames", not "full pathnames", but the GNU
8508         Coding Standards say to use "path" for something else;
8509         so use "absolute" to keep both sides happy.
8510         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8511         Set gl_absolute_header, not gl_full_header_path.
8512         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8513         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8514         All uses changed.
8515
8516         Merge from coreutils.
8517
8518         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8519
8520         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8521         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8522         want to require the building of c-strtod.o.
8523         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8524         needs -lm directly.
8525         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8526
8527         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8528
8529         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8530         --as-needed option if available.  Problem reported by Albert Chin in
8531         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8532         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8533         cc merely issues a bunch of annoying warnings for --as-needed
8534         (this problem was reported by Bob Proulx).  Also, try linking with
8535         -lm to detect a bug in binutils 2.16 (this problem was reported
8536         by Ralf Wildenhues).
8537
8538         2006-06-18  Jim Meyering  <jim@meyering.net>
8539
8540         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8541         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8542         macro.
8543         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8544         also check for glibc-2.4's abort-inducing bug.
8545
8546         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8547         Low-probability clean-up should be to use rmdir to get rid of
8548         the just-created directory, not unlink.
8549
8550         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8551         configure fail, and request a bug report to inform us about it.
8552         Add a comment that, barring reports to the contrary, in 2007 we'll
8553         assume ftruncate is universally available.
8554
8555         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8556
8557         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8558
8559         2006-03-12  Jim Meyering  <jim@meyering.net>
8560
8561         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8562         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8563         * m4/same.m4 (gl_SAME): Likewise.
8564         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8565
8566         2006-03-11  Eric Blake  <ebb9@byu.net>
8567
8568         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8569         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8570         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8571         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8572
8573 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8574
8575         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8576         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8577         reported by Mark D. Baushke, one in
8578         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8579
8580         Merge from coreutils.
8581
8582         * lib/.cppi-disable: Add stdint_.h.
8583         * lib/.cvsignore: Add stdint.h.
8584
8585         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8586
8587         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8588         both double and long double versions.
8589         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8590         * lib/xstrtold.c: New file.
8591         * lib/xstrtod.h (xstrtold): New decl.
8592
8593         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8594
8595         * lib/filemode.c (setst): Remove.
8596         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8597         (arguably) clearer, and the generated code is a bit smaller on my
8598         Debian GNU/Linux stable x86 host.
8599
8600         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8601
8602         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8603         Assume that filemode.h includes sys/types.h and sys/stat.h.
8604         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8605         (ftypelet): Reorder to put common cases first, for efficiency.
8606         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8607         to do 'M'.
8608         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8609         of 10, for compatibility with FreeBSD.  All callers changed.
8610         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8611         types that can't be deduced solely from st_mode.  First arg is now a
8612         const pointer.
8613         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8614         (strmode): Renamed from mode_string.
8615         (filemodestring): New decl.
8616         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8617         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8618         needed.
8619         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8620
8621         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8622
8623         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8624         fsusage.h now does that.  Include fsusage.h first, to test interface.
8625         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8626         at most one method (the old code could have generated decls that
8627         didn't conform to C89, not that this was ever exercised).
8628         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8629
8630         2006-03-19  Jim Meyering  <jim@meyering.net>
8631
8632         Work even in a chroot where d_ino values for entries in "/"
8633         don't match the stat.st_ino values for the same names.
8634         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8635         number, iterate through all entries again, using lstat instead.
8636         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8637         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8638
8639         * lib/getcwd.c (__getcwd): Clarify a comment.
8640         Use memcpy in place of a call to strcpy.
8641
8642         2006-03-12  Jim Meyering  <jim@meyering.net>
8643
8644         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8645         matches that of the current directory (which we're about to chdir ".."
8646         out of), then save the dev-ino of the parent, instead.
8647
8648         * lib/same-inode.h (SAME_INODE): New file/macro.
8649         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8650         Include "same-inode.h", instead.
8651         * lib/same.c: Likewise.
8652         * lib/cycle-check.h: Include "same-inode.h".
8653         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8654         * lib/cycle-check.c (SAME_INODE): Remove definition.
8655         * lib/root-dev-ino.h: Include "same-inode.h".
8656
8657         2006-03-11  Eric Blake  <ebb9@byu.net>
8658
8659         * lib/same.c (same_name): s/base_name/last_component/
8660         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8661         * lib/filenamecat.c (file_name_concat): Likewise.
8662
8663         2006-03-11  Eric Blake  <ebb9@byu.net>,
8664                     Paul Eggert  <eggert@cs.ucla.edu>
8665
8666         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8667         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8668         drive prefix.
8669         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8670         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8671         (last_component): New method.
8672         * lib/dirname.c (dir_len): Determine when drive letters need a
8673         subsequent slash.  Preserve // when it is special.
8674         (dir_name): Don't append dot when drive letter is absolute.
8675         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8676         * lib/basename.c (base_name): New semantics - malloc the result.
8677         Preserve // when it is special.  Preserve relative files that look
8678         like drive letters.
8679         (base_len): Preserve // when it is special.
8680         (last_component): New method, similar to old base_name semantics.
8681         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8682         base_name.  Strip redundant slashes from ///.
8683
8684 2006-07-03  Jim Meyering  <jim@meyering.net>
8685
8686         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8687         macro is used before the first cycle_check call.
8688
8689 2006-07-03  Eric Blake  <ebb9@byu.net>
8690
8691         * modules/dirname (Depends-on): Add xstrndup.
8692
8693 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8694
8695         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8696         test cases, so that config.log is a bit easier to follow.
8697
8698 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8699
8700         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8701         both are 64 bits, since this seems to be the tradition, and this
8702         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8703         we ever run into a host that prefers long long to long in this
8704         case, we'll need another configure-time test.  Problem reported by
8705         Jim Meyering.
8706
8707 2006-07-02  Eric Blake  <ebb9@byu.net>
8708
8709         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8710
8711 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8712
8713         * modules/inttypes (Depends-on): No longer depends on stdint.
8714         * modules/stdint (Description): Say more about assumptions.
8715         Say that the fast types might differ.  Say macros are used.
8716         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8717         (Makefile.am): Revise list of substituted symbols to match
8718         new stdint.m4.
8719         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8720         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8721         * tests/test-stdint.c (verify_same_types)
8722         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8723         the code conforms to C99/C89.
8724         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8725         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8726
8727 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8728
8729         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8730         but fix a bug, by requiring at least 64 bits.
8731         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8732         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8733         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8734         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8735
8736         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8737         changes.  Make 2.59 a prerequisite.  Check and substitute for
8738         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8739         inttypes.h.  Do not use special include files; just use the
8740         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8741         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8742         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8743         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8744         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8745         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8746         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8747         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8748         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8749         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8750         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8751         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8752         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8753         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8754         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8755         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8756         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8757         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8758         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8759         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8760         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8761         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8762         not check for things that C99 does not require, e.g., int8_t.  If
8763         a test isn't needed unless <stdint.h> isn't working, and is
8764         unlikely to be needed for any other reason, then don't do it
8765         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8766         size_t, since we assume C89 freestanding at least.  Do not check
8767         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8768         the right thing even if the types are not defined.  Instead use:
8769         (gl_STDINT_TYPE_PROPERTIES): New macro.
8770         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8771         testing whether <sys/types.h> clashes, as Autoconf does this for
8772         us now.  All uses removed.
8773         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8774         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8775         (gl_CHECK_TYPE_SAME):
8776         Remove; no longer needed.
8777         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8778         exists, since we'll return 0 anyway in that case.
8779         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8780
8781 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8782
8783         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8784         possible collision with system files.
8785         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8786         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8787         WCHAR_MIN and WCHAR_MAX in this case.
8788         (<stddef.h>): Do not include; no longer needed.
8789         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8790         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8791         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8792         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8793         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8794         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8795         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8796         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8797         !defined(__c99))]: Include in this case too, since it's harmless
8798         now.
8799         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8800         dangerous to do so.
8801         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8802         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8803         (_STDINT_MIN, _STDINT_MAX): New macros.
8804         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8805         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8806         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8807         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8808         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8809         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8810         macros, not typedefs; this simplifies things quite a bit.
8811         Use long int for all types narrower than int64_t.
8812         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8813         Define in terms of long long int or int64_t or long int,
8814         not int64_t or int32_t.  This saves some compile-time testing.
8815         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8816         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8817         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8818         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8819         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8820         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8821         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8822         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8823         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8824         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8825         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8826         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8827         undef any previous version and define our own version, for
8828         simplicity and consistency with the new macros for types.
8829         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8830         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8831         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8832         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8833         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8834         @WINT_T_SUFFIX@ to keep things simple here.
8835         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8836         Simplify by assuming typical 8/16/32/64 host, since we're
8837         already doing that elsewhere anyway.
8838         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8839         and assume long long int is 64 bits if available.  This
8840         speeds up 'configure'.
8841
8842 2006-07-01  Eric Blake  <ebb9@byu.net>
8843
8844         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8845         Reported by Andreas Buening.
8846
8847 2006-07-01  Eric Blake  <ebb9@byu.net>
8848
8849         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8850
8851 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8852
8853         * lib/getaddrinfo.c: fixed typo
8854
8855 2006-06-29  Jim Meyering  <jim@meyering.net>
8856
8857         * modules/strftime (Maintainer): Add my name, since with the
8858         FPRINTFTIME changes strftime.c has forked from glibc.
8859
8860 2006-06-29  Eric Blake  <ebb9@byu.net>
8861
8862         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8863
8864 2006-06-29  Eric Blake  <ebb9@byu.net>
8865
8866         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8867
8868 2006-06-29  Eric Blake  <ebb9@byu.net>
8869
8870         * lib/stat_.h: New file.
8871
8872 2006-06-29  Eric Blake  <ebb9@byu.net>
8873
8874         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8875         unused static function.
8876
8877 2006-06-29  Eric Blake  <ebb9@byu.net>
8878
8879         * doc/functions.texi (Function Portability): Document missing lstat
8880         on mingw.
8881
8882 2006-06-29  Eric Blake  <ebb9@byu.net>
8883
8884         * MODULES.html.sh: Add sys_stat.
8885         * modules/sys_stat: New module.
8886         * modules/mkstemp (Depends-on): Add sys_stat.
8887
8888 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8889
8890         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8891
8892 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8893
8894         * m4/c-bs-a.m4: Removed.
8895
8896 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8897
8898         * lib/strftime.c: Assume strftime() exists.
8899
8900 2006-06-29  Derek Price  <derek@ximbiot.com>
8901
8902         * modules/c-bs-a: Removed - \a is C89.
8903         * MODULES.html.sh: Remove c-bs-a.
8904
8905 2006-06-29  Bruno Haible  <bruno@clisp.org>
8906
8907         * modules/wcwidth (License): Change to LGPL.
8908
8909 2006-06-28  Simon Josefsson  <jas@extundo.com>
8910
8911         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8912         on _WIN32.
8913
8914         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
8915         getnameinfo.
8916
8917 2006-06-28  Simon Josefsson  <jas@extundo.com>
8918
8919         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
8920
8921 2006-06-28  Simon Josefsson  <jas@extundo.com>
8922
8923         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
8924         functions there.  It will succeed on Windows XP, but on Windows
8925         2000 and (presumably) earlier, it will fail, and use the internal
8926         re-implementation.
8927         (use_win32_p): New function.
8928         (getaddrinfo): Use strtoul on servname, to support numeric ports.
8929         Support AI_NUMERICSERV to disable getservbyname.
8930         (getnameinfo): New function, only supports
8931         NI_NUMERICHOST|NI_NUMERICSERV for now.
8932
8933         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
8934         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
8935         getnameinfo.
8936
8937 2006-06-28  Eric Blake  <ebb9@byu.net>
8938
8939         * modules/wcwidth: New file.
8940         * modules/mbchar (Depends-on): Add wcwidth.
8941         * modules/mbswidth (Depends-on): Add wcwidth.
8942         * MODULES.html.sh: Add wcwidth.
8943
8944 2006-06-28  Eric Blake  <ebb9@byu.net>
8945
8946         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
8947         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
8948
8949 2006-06-28  Eric Blake  <ebb9@byu.net>
8950
8951         * lib/xvasprintf.h: Fix comments.
8952
8953 2006-06-28  Eric Blake  <ebb9@byu.net>
8954
8955         * lib/mbchar.h (wcwidth): Include wcwidth.h.
8956         * lib/mbswidth.c (wcwidth): Move from here...
8957         * lib/wcwidth.h: ...to this new file.
8958
8959 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8960
8961         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
8962
8963         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
8964         it's obsolete.
8965         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
8966
8967 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8968
8969         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8970         Autoconf 2.60 says this stuff was obsolete.
8971
8972 2006-06-28  Bruno Haible  <bruno@clisp.org>
8973
8974         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8975
8976 2006-06-28  Bruno Haible  <bruno@clisp.org>
8977
8978         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8979         gt_TYPE_WCHAR_T.
8980
8981 2006-06-28  Bruno Haible  <bruno@clisp.org>
8982
8983         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8984         declaration for wcwidth.
8985         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8986
8987 2006-06-28  Bruno Haible  <bruno@clisp.org>
8988
8989         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8990         (mkdir): Define using _mkdir.
8991
8992 2006-06-28  Bruno Haible  <bruno@clisp.org>
8993
8994         * lib/getaddrinfo.h: Fix POSIX URL.
8995         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8996         _WIN32.
8997         (use_win32_p): Make static.
8998         (getaddrinfo): Reject service name if it is empty or does not consist
8999         solely of decimal digits, or if its value is > 65535.
9000         (getnameinfo): Remove useless casts.
9001
9002 2006-06-27  Simon Josefsson  <jas@extundo.com>
9003
9004         * modules/sys_select: New file, suggested by Bruno Haible, Paul
9005         Eggert and Martin Lambers.
9006
9007 2006-06-27  Simon Josefsson  <jas@extundo.com>
9008
9009         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
9010         Eggert and Martin Lambers.
9011
9012 2006-06-27  Bruno Haible  <bruno@clisp.org>
9013
9014         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
9015         result to 0, not to empty.
9016         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
9017
9018 2006-06-27  Bruno Haible  <bruno@clisp.org>
9019
9020         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
9021
9022 2006-06-26  Simon Josefsson  <jas@extundo.com>
9023
9024         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
9025         present.
9026
9027 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
9028
9029         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
9030         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
9031         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
9032
9033 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
9034
9035         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
9036
9037 2006-06-26  Bruno Haible  <bruno@clisp.org>
9038
9039         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
9040
9041 2006-06-26  Bruno Haible  <bruno@clisp.org>
9042
9043         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
9044
9045 2006-06-26  Bruno Haible  <bruno@clisp.org>
9046
9047         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
9048         SGI C compiler in pre-C99 mode.
9049         Suggested by Mark D. Baushke and Larry Jones.
9050
9051 2006-06-26  Bruno Haible  <bruno@clisp.org>
9052
9053         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
9054         WCHAR_MAX.
9055         Reported by Mark D. Baushke and Larry Jones.
9056
9057 2006-06-26  Bruno Haible  <bruno@clisp.org>
9058
9059         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
9060         in pre-C99 mode.
9061         Suggested by Mark D. Baushke and Larry Jones.
9062
9063 2006-06-23  Simon Josefsson  <jas@extundo.com>
9064             Bruno Haible  <bruno@clisp.org>
9065
9066         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
9067         Emit mostlyclean-local rule.
9068         (func_emit_tests_Makefile_am): Likewise.
9069         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
9070
9071 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
9072
9073         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
9074
9075 2006-06-23  Bruno Haible  <bruno@clisp.org>
9076
9077         * tests/test-stdint.c: Update to match ISO C 99 Technical
9078         Corrigendum 1.
9079
9080 2006-06-23  Bruno Haible  <bruno@clisp.org>
9081
9082         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
9083
9084 2006-06-23  Bruno Haible  <bruno@clisp.org>
9085
9086         * lib/stdint_.h: Treat IRIX like OpenBSD.
9087
9088 2006-06-23  Bruno Haible  <bruno@clisp.org>
9089
9090         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
9091         ISO C 99 Technical Corrigendum 1.
9092
9093 2006-06-22  Simon Josefsson  <jas@extundo.com>
9094
9095         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
9096         MinGW.
9097
9098 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
9099
9100         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
9101         needed.  Some compiler complained about some of them.  Problem reported
9102         by Larry Jones in
9103         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
9104
9105 2006-06-21  Simon Josefsson  <jas@extundo.com>
9106
9107         * tests/test-getaddrinfo.c: New file.
9108
9109         * modules/getaddrinfo-tests: New file.
9110
9111         * MODULES.html.sh: Add inet_pton.
9112
9113         * modules/inet_pton: New file.
9114
9115 2006-06-21  Simon Josefsson  <jas@extundo.com>
9116
9117         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
9118         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
9119         of using the (limited) gnulib implementation on Windows XP.
9120
9121         * m4/inet_pton.m4: New file.
9122
9123 2006-06-21  Simon Josefsson  <jas@extundo.com>
9124
9125         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
9126         variable.
9127
9128         * lib/socket_.h: Don't define WINVER.
9129
9130         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
9131         slightly modified to work in gnulib.
9132
9133 2006-06-21  Simon Josefsson  <jas@extundo.com>
9134
9135         * doc/gnulib.texi (Windows sockets): Add.
9136
9137 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
9138
9139         * lib/read-file.c (fread_file): Start with buffer allocation of
9140         0 bytes rather than 1 byte; this simplifies the code.
9141         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
9142         code to free buffer and save/restore errno.
9143         (internal_read_file): Remove unused local.
9144
9145 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
9146
9147         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
9148         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
9149         Problem reported by Denis Excoffier in
9150         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
9151
9152 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9153
9154         * modules/sys_socket, modules/socklen: Include sys/types since
9155         FreeBSD 4.x's sys/socket.h needs it.
9156
9157 2006-06-19  Simon Josefsson  <jas@extundo.com>
9158
9159         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
9160
9161 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
9162
9163         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
9164
9165 2006-06-19  Bruno Haible  <bruno@clisp.org>
9166
9167         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
9168         and FULL_PATH_INTTYPES_H in angle brackets.
9169         Reported by Mark D. Baushke <mdb@gnu.org>.
9170
9171 2006-06-17  Eric Blake  <ebb9@byu.net>
9172
9173         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
9174         errno.
9175
9176 2006-06-17  Bruno Haible  <bruno@clisp.org>
9177
9178         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
9179         <sys/inttypes.h>.
9180
9181 2006-06-17  Bruno Haible  <bruno@clisp.org>
9182
9183         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
9184         whether errno is declared. Assume <errno.h> declares errno.
9185
9186 2006-06-17  Bruno Haible  <bruno@clisp.org>
9187
9188         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
9189
9190 2006-06-17  Bruno Haible  <bruno@clisp.org>
9191
9192         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
9193         problem on Solaris 2.5.1.
9194
9195 2006-06-16  Eric Blake  <ebb9@byu.net>
9196
9197         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
9198         * lib/unicodeio.c [!defined errno]: Likewise.
9199         * lib/strtol.c [!defined errno]: Likewise.
9200         * lib/strtod.c [!defined errno]: Likewise.
9201
9202 2006-06-15  Eric Blake  <ebb9@byu.net>
9203
9204         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
9205
9206 2006-06-15  Eric Blake  <ebb9@byu.net>
9207
9208         * config/srclist.txt (ssize_t.m4): Lose sync.
9209
9210 2006-06-15  Bruno Haible  <bruno@clisp.org>
9211
9212         * modules/stdint (Files): Include m4/full-header-path.m4,
9213         m4/size_max.m4, m4/wchar_t.m4.
9214         (Makefile.am): Many more substitutions.
9215         * modules/stdint-tests: New file.
9216         * tests/test-stdint.c: New file.
9217
9218 2006-06-15  Bruno Haible  <bruno@clisp.org>
9219
9220         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
9221         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
9222         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
9223         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
9224         gl_CHECK_TYPE_SAME): New macros.
9225
9226 2006-06-15  Bruno Haible  <bruno@clisp.org>
9227
9228         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
9229
9230 2006-06-15  Bruno Haible  <bruno@clisp.org>
9231
9232         * lib/stdint_.h: Rewritten to be fully auto-configured.
9233         Fixes bug on HP-UX/IA64.
9234
9235 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
9236
9237         * lib/getdate.y (__attribute__): Don't define if already defined.
9238         Problem reported by Larry Jones.
9239         * lib/utimens.c (__attribute__): Likewise.
9240
9241 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
9242
9243         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
9244         reported by Andreas Schwab.
9245
9246 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9247             Bruno Haible  <bruno@clisp.org>
9248
9249         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
9250         check for the declaration of strnlen and a run test that exposes the
9251         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
9252         rpl_strndup.
9253
9254 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9255             Bruno Haible  <bruno@clisp.org>
9256
9257         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
9258
9259 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9260
9261         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
9262         compile test, for Tru64 4.0D.
9263
9264 2006-05-28  Karl Berry  <karl@gnu.org>
9265
9266         * config/srclist.txt (printf-args.c): lose sync.
9267
9268 2006-05-26  Martin Lambers  <marlam@marlam.de>
9269
9270         * lib/getpass.c: Updates the test for the native W32 API, and adds
9271         missing includes, thus fixing compilation warnings.
9272
9273 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9274
9275         * lib/exclude.c (exclude_fnmatch): New function.
9276         (excluded_file_name): Call exclude_fnmatch.
9277         * lib/exclude.h (excluded_file_name): New prototype
9278
9279 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
9280
9281         * lib/tempname.c (small_open, large_open): New macros.
9282         (__open, __open64) [!_LIBC]: Remove.
9283         (__gen_tempname): Use small_open and large_open instead of __open
9284         and __open64.  This fixes a portability bug on HP-UX 11.11i
9285         reported by Simon Wing-Tang in
9286         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
9287
9288 2006-05-24  Bruno Haible  <bruno@clisp.org>
9289
9290         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
9291         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
9292         Reported by Thorsten Maerz <torte@netztorte.de> via
9293         Aaron Stone <aaron@serendipity.cx>.
9294
9295 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9296
9297         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
9298         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
9299         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
9300         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
9301         not really conditional on the cache.
9302         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
9303
9304 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9305
9306         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
9307         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
9308         (my_usleep): Don't mishandle maximum value.
9309
9310 2006-05-19  Jim Meyering  <jim@meyering.net>
9311
9312         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
9313
9314 2006-05-17  Bruno Haible  <bruno@clisp.org>
9315
9316         Cygwin portability.
9317         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
9318
9319 2006-05-17  Bruno Haible  <bruno@clisp.org>
9320
9321         * lib/stdint_.h: Fix recognition of Cygwin.
9322
9323 2006-05-15  Bruno Haible  <bruno@clisp.org>
9324
9325         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
9326         on libtool patch by Ralf Wildenhues.
9327
9328 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9329
9330         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
9331         test for C99 conformance; (bool) 0.5 is an integer constant
9332         expression, but (bool) -0.5 is not.  Problem reported by Fedor
9333         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
9334
9335 2006-05-11  Simon Josefsson  <jas@extundo.com>
9336
9337         * m4/xvasprintf.m4: Fix obvious typo.
9338
9339 2006-05-11  Jim Meyering  <jim@meyering.net>
9340
9341         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
9342         James Lemley.
9343
9344 2006-05-10  Simon Josefsson  <jas@extundo.com>
9345
9346         * lib/md4.c: Typo fix, update copyright years.
9347         (K1, K2): Don't use L because it turn computations into 64-bit on
9348         64-bit platforms.
9349
9350 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
9351
9352         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
9353         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
9354         unwanted sign propagation, e.g., on hosts with 64-bit int.
9355         There still are some problems with reeelly weird theoretical hosts
9356         (e.g., 33-bit int) but it's not worth worrying about now.
9357         * lib/sha1.c (rol): Likewise.
9358         (K1, K2, K3, K4): Remove unnecessary L suffix.
9359
9360 2006-05-10  Bruno Haible  <bruno@clisp.org>
9361
9362         * lib/des.c: Cast to avoid warnings.
9363
9364 2006-05-09  Bruno Haible  <bruno@clisp.org>
9365
9366         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
9367         (Depends-on): Depend also on xsize, stdarg.
9368         (configure.ac): Add gl_XVASPRINTF.
9369
9370 2006-05-09  Bruno Haible  <bruno@clisp.org>
9371
9372         * m4/xvasprintf.m4: New file.
9373
9374 2006-05-09  Bruno Haible  <bruno@clisp.org>
9375
9376         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
9377         (EOVERFLOW): Define fallback value.
9378         (xstrcat): New function.
9379         (xvasprintf): Recognize the special case of a string concatenation.
9380
9381 2006-05-08  Eric Blake  <ebb9@byu.net>
9382
9383         * gnulib-tool (func_version): Base copyright year on CVS date.
9384         (func_emit_copyright_notice): New function.
9385         (func_emit_lib_Makefile_am): Use it.
9386         (func_emit_tests_Makefile_am): Likewise.
9387         (func_import): Likewise.
9388
9389 2006-05-08  Bruno Haible  <bruno@clisp.org>
9390
9391         * modules/stdarg: New file.
9392         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9393
9394 2006-05-08  Bruno Haible  <bruno@clisp.org>
9395
9396         * m4/stdarg.m4: New file, from GNU gettext.
9397
9398 2006-05-08  Bruno Haible  <bruno@clisp.org>
9399
9400         * config/srclist.txt (build-aux/config.rpath): different from latest
9401         release.
9402
9403 2006-05-08  Bruno Haible  <bruno@clisp.org>
9404
9405         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9406
9407 2006-05-05  Jim Meyering  <jim@meyering.net>
9408
9409         * m4/warning.m4: New file, derived from bison's file by the same name.
9410
9411 2006-05-03  Bruno Haible  <bruno@clisp.org>
9412
9413         * lib/stdint_.h: Shorter URL.
9414         * lib/inttypes.h: Likewise.
9415
9416 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9417
9418         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9419
9420 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9421
9422         * lib/verify.h: Document the internals better.  Most of this change
9423         was written by Bruno Haible.
9424
9425 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9426
9427         * doc/verify.texi: New file, partly based on a proposal by
9428         Bruno Haible.
9429
9430 2006-05-02  Bruno Haible  <bruno@clisp.org>
9431
9432         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9433         test from here...
9434         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9435
9436 2006-04-29  Bruno Haible  <bruno@clisp.org>
9437
9438         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9439         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9440
9441 2006-04-29  Bruno Haible  <bruno@clisp.org>
9442
9443         * gnulib-tool: Make --update option actually work.
9444
9445 2006-04-29  Bruno Haible  <bruno@clisp.org>
9446
9447         * doc/gcd.texi: New file.
9448         * doc/gnulib.texi: Include it.
9449
9450 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9451
9452         * lib/getdate.y (get_date): When adding relative date, start with the
9453         initial time, not with the result of the first mktime call.
9454
9455 2006-04-25  Bruno Haible  <bruno@clisp.org>
9456
9457         * gnulib-tool (func_import): Output the include directives in three
9458         blocks, sorted separately.
9459         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9460
9461 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9462
9463         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9464         to define main with arguments, for C++.  Reported by Eric Blake.
9465         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9466         Prefer 'int main ()' to 'int main (void)', for C++.
9467         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9468         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9469         for 'main', for C99 and C++.
9470
9471 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9472
9473         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9474         Don't assume that exit status -1 is valid.
9475         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9476         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9477         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9478         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9479         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9480         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9481         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9482         functions can be used without declaring them, or that you can
9483         exit with status -1.
9484         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9485
9486 2006-04-24  Karl Berry  <karl@gnu.org>
9487
9488         * config/srclist.txt (longdouble.m4): sync lost.
9489
9490 2006-04-24  Eric Blake  <ebb9@byu.net>
9491
9492         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9493
9494 2006-04-24  Bruno Haible  <bruno@clisp.org>
9495
9496         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9497         poll() implementation in AIX.
9498         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9499
9500 2006-04-24  Bruno Haible  <bruno@clisp.org>
9501
9502         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9503         assigned exactly once.
9504
9505 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9506             Bruno Haible  <bruno@clisp.org>
9507
9508         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9509         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9510         for AM_CPPFLAGS.
9511
9512 2006-04-23  Bruno Haible  <bruno@clisp.org>
9513
9514         * modules/copy-file: Depend on unistd.
9515         * modules/execute: Likewise.
9516         * modules/fatal-signal: Likewise.
9517         * modules/findprog: Likewise.
9518         * modules/mkdtemp : Likewise.
9519         * modules/pipe: Likewise.
9520         * modules/wait-process: Likewise.
9521
9522 2006-04-23  Bruno Haible  <bruno@clisp.org>
9523
9524         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9525         condition was already detected.
9526         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9527
9528 2006-04-23  Bruno Haible  <bruno@clisp.org>
9529
9530         * lib/copy-file.c: Include <unistd.h> unconditionally.
9531         * lib/execute.c: Likewise.
9532         * lib/fatal-signal.c: Likewise.
9533         * lib/findprog.c: Likewise.
9534         * lib/mkdtemp.c: Likewise.
9535         * lib/pipe.h: Likewise.
9536         * lib/pipe.c: Likewise.
9537         * lib/wait-process.h: Likewise.
9538
9539 2006-04-23  Bruno Haible  <bruno@clisp.org>
9540
9541         * gnulib-tool (func_usage): Fix --import description. Document
9542         --update.
9543         (func_import): Create temporary file in a temporary directory, if
9544         --dry-run is specified. Silence errors from 'grep' when there are no
9545         m4 files in $m4dir.
9546         (func_create_testdir): Silence errors from 'grep' when there are no
9547         m4 files in $m4dir.
9548         Reported by Karl Berry <karl@freefriends.org>.
9549
9550 2006-04-20  Bruno Haible  <bruno@clisp.org>
9551
9552         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9553         one argument, so that the code will be portable to Autoconf 2.60.
9554         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9555         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9556         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9557
9558 2006-04-19  Derek Price  <derek@ximbiot.com>
9559             Eric Blake  <ebb9@byu.net>
9560
9561         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9562         rather than "/full/path.h".  Update comment to match.  Shorten &
9563         generalize m4_translit call via AS_TR_CPP.
9564
9565 2006-04-19  Derek Price  <derek@ximbiot.com>
9566             Eric Blake  <ebb9@byu.net>
9567
9568         * lib/inttypes.h: Correct grammar in comment.
9569
9570 2006-04-18  Derek Price  <derek@ximbiot.com>
9571             Paul Eggert  <eggert@cs.ucla.edu>
9572
9573         * modules/inttypes: New file.
9574         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9575
9576 2006-04-18  Derek Price  <derek@ximbiot.com>
9577             Paul Eggert  <eggert@cs.ucla.edu>
9578
9579         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9580         New files.
9581
9582 2006-04-18  Derek Price  <derek@ximbiot.com>
9583             Paul Eggert  <eggert@cs.ucla.edu>
9584
9585         * lib/inttypes.h: New file.
9586         * lib/strtoimax.c: Assume <inttypes.h>.
9587
9588 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9589
9590         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9591         isn't mounted.  Problem reported by Kir Kolyshkin.
9592
9593 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9594
9595         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9596         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9597         Derek R. Price.
9598         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9599         implementation.
9600
9601 2006-04-12  Eric Blake  <ebb9@byu.net>
9602
9603         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9604         is now done automatically by the corresponding Autoconf macro.
9605
9606 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9607
9608         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9609         time_r.h.
9610
9611 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9612
9613         Merge regex changes from libc, removing some of our
9614         POSIX-conformance changes that were rejected and redoing them in a
9615         less-intrusive way.
9616
9617         * lib/regcomp.c (re_compile_internal, init_dfa):
9618         Length arg is now size_t, not Idx.  All uses changed.
9619         (peek_token): Forward decl now says internal_function.
9620         (__re_error_msgid, __re_error_msgid_idx):
9621         Now static rather than extern with attribute_hidden.
9622         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9623         For some reason libc prefers K&R style defns for external functions.
9624         (regerror) [!defined _LIBC]: Likewise.
9625         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9626         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9627         (build_range_exp, build_collating_symbol):
9628         Use K&R-style defn.
9629         (re_compile_fastmap): Use '\0' to memset, not 0.
9630         (utf8_sb_map): Make the calculations more obvious.
9631         (init_dfa, parse_bracket_exp, build_charclass_op):
9632         Call calloc and cast result, as glibc does.
9633         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9634         (build_range_exp, build_collating_symbol):
9635         Now internal functions.
9636
9637         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9638
9639         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9640         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9641         Don't depend on VMS; depend on __VMS instead, for POSIX
9642         namespace cleanness.
9643         (regoff_t): Define to ssize_t, not long int.
9644
9645         Remove the REG_ macros named below.  Instead, make the old names
9646         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9647         __USE_GNU_REGEX.
9648         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9649         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9650         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9651         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9652         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9653         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9654         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9655         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9656         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9657         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9658         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9659         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9660         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9661         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9662         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9663         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9664         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9665         (REG_NREGS):
9666         Remove.  All uses replaced by the old RE_* names.
9667         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9668         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9669         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9670         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9671         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9672         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9673         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9674         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9675         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9676         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9677         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9678         Don't bother having these macros be independent of each others'
9679         values, since they no longer exist in the POSIX name space.
9680
9681         Rename the following member names back to their old names,
9682         unless !__USE_GNU_REGEX.  All uses changed back.
9683         (buffer): Renamed from re_buffer.
9684         (allocated): Renamed from re_allocated.
9685         (used): Renamed from re_used.
9686         (syntax): Renamed from re_syntax.
9687         (fastmap): Renamed from re_fastmap.
9688         (translate): Renamed from re_translate.
9689         (can_be_null): Renamed from re_can_be_null.
9690         (regs_allocated): Renamed from re_regs_allocated.
9691         (fastmap_accurate): Renamed from re_fastmap_accurate.
9692         (no_sub): Renamed from re_no_sub.
9693         (not_bol): Renamed from re_not_bol.
9694         (not_eol): Renamed from re_not_eol.
9695         (newline_anchor): Renamed from re_newline_anchor.
9696         (num_regs): Renamed from rm_num_regs.
9697         (start): Renamed from rm_start.
9698         (end): Renamed from rm_end.
9699
9700         (free_state): Move up a bit.
9701
9702         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9703         #define to be empty.
9704         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9705         when that is what is intended.
9706         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9707         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9708         (MAX): New macro.
9709         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9710         All uses changed back to re_malloc, etc.  It's now the caller's
9711         responsibility to check for overflow; all callers changed.
9712         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9713         (re_x2nrealloc): Remove.
9714         (free_state): Remove decl.
9715
9716         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9717         (re_set_registers, re_exec):
9718         Use K&R-style defn.
9719
9720         2006-01-31  Roland McGrath  <roland@redhat.com>
9721
9722         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9723         Reported by Mike Frysinger <vapier@gentoo.org>.
9724
9725         2006-01-15  Andreas Jaeger  <aj@suse.de>
9726
9727         [BZ #1950]
9728         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9729         build_wcs_upper_buffer change.
9730         (build_wcs_upper_buffer): Change return type.
9731
9732         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9733
9734         * lib/regex_internal.h: Include <stdint.h> if available.
9735
9736         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9737
9738         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9739
9740         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9741
9742         * lib/regcomp.c: Adjust for changed secondary hash function.
9743
9744         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9745
9746         * lib/regex.h: Pretty printing.
9747         Clean up namespace a bit.
9748
9749         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9750
9751         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9752         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9753
9754         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9755                     Ulrich Drepper  <drepper@redhat.com>
9756
9757         [BZ #1302]
9758         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9759         changed.
9760         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9761
9762         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9763
9764         [BZ #281]
9765         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9766         * lib/regcomp.c: Remove unnecessary uses of
9767         unsigned RE_TRANSLATE_TYPE.
9768         * lib/regex_internal.h: Likewise.
9769         * lib/regex_internal.c: Likewise.
9770         * lib/regexec.c: Likewise.
9771         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9772
9773         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9774
9775         * lib/regexec.c (find_recover_state): Remove unnecessary
9776         initialization.
9777         (transit_state_bkref): Make DFA a const pointer.
9778         (get_subexp): Likewise.
9779         (check_arrival): Likewise.
9780         (update_cur_sifted_state): Likewise.
9781         (re_search_internal): Likewise.
9782         (prune_impossible_nodes): Likewise.
9783         (acquire_init_state_context): Likewise.
9784         (proceed_next_node): Likewise.
9785         (set_regs): Likewise.
9786         (free_fail_stack_return): Likewise.
9787         (check_arrival_expand_ecl): Mark DFA parameter as const.
9788         (check_arrival_expand_ecl_sub): Likewise.
9789         (check_subexp_limits): Likewise.
9790         (sub_epsilon_src_nodes):  Likewise.
9791         (add_epsilon_src_nodes):  Likewise.
9792         (merge_state_array): Likewise.
9793         (update_regs): Likewise.
9794         (build_trtable): Likewise.
9795         (sift_states_backward): Mark MCTX parameter as const.
9796         (build_sifted_states): Likewise.
9797         (update_cur_sifted_state): Likewise.
9798         (sift_states_mkref): Likewise.
9799         (check_arrival_expand_ecl): Mark eclosure as const.
9800         (check_dst_limits_calc_pos_1): Likewise.
9801         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9802         pointer.
9803
9804         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9805
9806         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9807         (transit_state_sb): Likewise.
9808         (transit_state_mb): Likewise.
9809         (sift_states_iter_mb): Likewise.
9810         (check_arrival_add_next_nodes): Likewise.
9811         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9812         [_LIBC] (re_search_2_stub): Use mempcpy.
9813
9814         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9815         mbrtowc for very simple UTF-8 case.
9816
9817         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9818         a pointer-to-const.
9819         (re_acquire_state_context): Likewise.
9820         * lib/regex_internal.h: Adjust prototypes.
9821
9822         * lib/regex.c: Prevent using C++ compilers.
9823
9824         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9825         (re_acquire_state_context): Likewise.
9826
9827 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9828
9829         * modules/regex (Depends-on): Add ssize_t.
9830
9831 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9832
9833         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9834         translation table.
9835
9836 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9837
9838         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9839
9840 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9841             Bruno Haible  <bruno@clisp.org>
9842
9843         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9844         <sys/types.h> and <inttypes.h>.
9845
9846 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9847
9848         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9849         `__error_t_defined', so argp.h will not typedef the former.
9850
9851 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9852
9853         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9854         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9855         glibc names.  Even if glibc is changed to conform to POSIX, the
9856         traditional names will be available anyway, since regex depends on
9857         the extensions module.  Also, fix a longstanding typo in the
9858         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9859         reported by Emanuele Giaquinta.  Also, change sense of cached
9860         variable, so that the message makes sense.
9861
9862 2006-03-24  Simon Josefsson  <jas@extundo.com>
9863
9864         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9865         including some doc fixes.
9866         (base64_encode_alloc): Fix +1 bug on allocation failures.
9867
9868 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9869
9870         * lib/base64.c (base64_encode): Do not read past end of array with
9871         unsanitized input on systems with CHAR_BIT > 8.
9872
9873 2006-03-24  Eric Blake  <ebb9@byu.net>
9874
9875         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9876
9877 2006-03-22  Karl Berry  <karl@gnu.org>
9878
9879         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9880         * config/srclistvars.sh (COREUTILS): new var.
9881
9882 2006-03-17  Jim Meyering  <jim@meyering.net>
9883
9884         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9885         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9886
9887 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9888
9889         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9890         no longer needs it.  Instead, check that regoff_t is as least
9891         as wide as ptrdiff_t.
9892
9893         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9894         so that our regex.h stays compatible with the installed regex.
9895         This is helpful for installers who configure --without-included-regex.
9896         Problem reported by Emanuele Giaquinta.
9897
9898 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9899
9900         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9901         Typedef to long int, not to off_, as POSIX will likely change
9902         in that direction.
9903
9904 2006-03-15  Eric Blake  <ebb9@byu.net>
9905
9906         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9907
9908 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9909
9910         * lib/argp-help.c (validate_uparams): Fix typo
9911         * lib/argp-parse.c (argp_default_options): Consistently begin help
9912         messages with a lowercase letter.
9913
9914 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
9915
9916         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
9917         overrun buffers and shouldn't be used (much as gets shouldn't be
9918         used).
9919         * lib/time_r.c (asctime_r, ctime_r): Likewise.
9920
9921 2006-03-08  Simon Josefsson  <jas@extundo.com>
9922
9923         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
9924         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9925
9926 2006-03-08  Simon Josefsson  <jas@extundo.com>
9927
9928         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
9929         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9930
9931 2006-03-08  Simon Josefsson  <jas@extundo.com>
9932
9933         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
9934         signal that configure disabled the device.
9935
9936 2006-03-08  Simon Josefsson  <jas@extundo.com>
9937
9938         * build-aux/maint.mk: Fix refresh-po, to handle no translated
9939         languages.
9940
9941 2006-03-07  Simon Josefsson  <jas@extundo.com>
9942
9943         * modules/getopt (Depends-on): Add unistd.
9944
9945         * modules/unistd: New file.
9946
9947 2006-03-07  Simon Josefsson  <jas@extundo.com>
9948
9949         * modules/gc-random: New file.
9950
9951 2006-03-07  Simon Josefsson  <jas@extundo.com>
9952
9953         * m4/unistd_h.m4: New file.
9954
9955 2006-03-07  Simon Josefsson  <jas@extundo.com>
9956
9957         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
9958         test to be side-effect free by storing the result in the cache
9959         variable gl_cv_lib_readline, and moving the assignment of
9960         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
9961         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9962
9963 2006-03-07  Simon Josefsson  <jas@extundo.com>
9964
9965         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
9966         error on missing devices (the functions will return an error).
9967
9968         * m4/gc.m4: Move random stuff to gc-random.m4
9969
9970 2006-03-07  Simon Josefsson  <jas@extundo.com>
9971
9972         * lib/unistd_.h: New file.
9973
9974 2006-03-07  Simon Josefsson  <jas@extundo.com>
9975
9976         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9977
9978 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9979
9980         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9981         Problem reported by Juan Manuel Guerrero.
9982
9983 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9984
9985         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9986         the unistd module.
9987         * lib/getlogin_r.c: Likewise.
9988         * lib/getlogin_r.h: Likewise.
9989         * lib/glob.c: Likewise.
9990         * lib/pagealign_alloc.c: Likewise.
9991         * lib/unistd_.h: Remove; no longer needed.
9992
9993 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9994
9995         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9996         Add unistd.
9997         * modules/c-stack (Depends-on): Add unistd.
9998         * modules/getlogin_r: Likewise.
9999         * modules/glob: Likewise.
10000         * modules/pagealign_alloc: Likewise.
10001         * modules/unistd (Files): Remove lib/unistd_.h.
10002         (EXTRA_DIST): Remove.
10003         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
10004         need unistd_.h.
10005         (MOSTLYCLEANFILES): Remove unistd.h-t.
10006
10007 2006-03-03  Simon Josefsson  <jas@extundo.com>
10008
10009         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
10010
10011 2006-03-03  Simon Josefsson  <jas@extundo.com>
10012
10013         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
10014         libidn and bison.
10015
10016 2006-03-03  Simon Josefsson  <jas@extundo.com>
10017
10018         * build-aux/maint.mk: Add indent target.
10019
10020 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
10021
10022         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
10023         our replacement poll.h in any case, to avoid a differing
10024         declaration from a system header.  Seen on AIX.
10025
10026 2006-03-01  Simon Josefsson  <jas@extundo.com>
10027
10028         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
10029         <kasal@ucw.cz>.
10030
10031 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10032
10033         * modules/gettime (Depends-on): Add extensions module.
10034         * modules/nanosleep (Depends-on): Likewise.
10035         * modules/settime (Depends-on): Likewise.
10036
10037 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10038
10039         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
10040         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
10041         pedantically.
10042         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
10043         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
10044
10045         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
10046         not "==".  Reported by Ralf Wildenhues.
10047
10048 2006-03-01  Karl Berry  <karl@gnu.org>
10049
10050         * doc/Copyright/request-*: new files, synced from gnuorg.
10051
10052 2006-03-01  Karl Berry  <karl@gnu.org>
10053
10054         * config/srclist.txt (Copyright/*): new entries.
10055
10056 2006-02-28  Simon Josefsson  <jas@extundo.com>
10057
10058         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
10059
10060 2006-02-27  Simon Josefsson  <jas@extundo.com>
10061
10062         * lib/base64.h: Indent #define's.  From Jim Meyering
10063         <jim@meyering.net>.
10064
10065 2006-02-27  Jim Meyering  <jim@meyering.net>
10066
10067         Revert the change of 2006-02-24, so these files can continue
10068         to be sync'd from gettext.
10069         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
10070         of `config.h'.
10071
10072 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
10073
10074         * modules/intprops: New file.
10075         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
10076         Add intprops.
10077         * modules/getloadavg (Files): Remove lib/intprops.h.
10078         (Depends-on): Add intprops.
10079         * modules/human: Likewise.
10080         * modules/inttostr: Likewise.
10081         * modules/openat: Likewise.
10082         * modules/sig2str: Likewise.
10083         * modules/userspec: Likewise.
10084         * modules/utimecmp: Likewise.
10085         * modules/xnanosleep: Likewise.
10086         * modules/xstrtol: Likewise.
10087
10088 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
10089
10090         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
10091         * modules/lock-tests (TESTS): Use $(EXEEXT).
10092         * modules/tls-tests: Likewise.
10093         * modules/argp-tests: Likewise.
10094         (check_PROGRAMS): New var, replacing...
10095         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
10096
10097 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10098
10099         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
10100         `config.h'.
10101
10102 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
10103
10104         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
10105
10106 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10107
10108         Sync from coreutils.
10109         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
10110         gl_CHDIR_SAFER.
10111
10112 2006-02-22  Jim Meyering  <jim@meyering.net>
10113
10114         Sync from coreutils.
10115         * m4/chdir-safer.m4: New file.
10116
10117 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
10118
10119         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
10120         AT_FDCWD exceeds INT_MAX.
10121         * lib/openat.h (AT_FDCWD): Likewise.
10122
10123 2006-02-17  Eric Blake  <address@hidden>
10124
10125         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
10126
10127 2006-02-16  Simon Josefsson  <jas@extundo.com>
10128
10129         * modules/getaddrinfo (Depends-on): Add sys_socket.
10130
10131 2006-02-15  Simon Josefsson  <jas@extundo.com>
10132
10133         * build-aux/maint.mk: Add dsyntax-check rule.
10134
10135 2006-02-15  Eric Blake  <ebb9@byu.net>
10136
10137         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
10138         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
10139         'present but cannot compile' warnings on cygwin.
10140         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
10141         use ws2tcpip.h if sys/socket.h works.
10142         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
10143         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
10144
10145 2006-02-14  Simon Josefsson  <jas@extundo.com>
10146
10147         * modules/maintainer-makefile (Files): Rename.
10148
10149         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
10150         and (the local) Makefile.cfg to maint-cfg.mk.
10151
10152         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
10153         to the latter.
10154
10155         * modules/maintainer-makefile: New module.
10156
10157         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
10158         severaly stripped to make it possible to build it up from scratch
10159         with reliable tests.
10160
10161         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
10162         fixes to permit overriding the default actions when configure and
10163         makefile are not available.
10164
10165 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
10166
10167         Sync from coreutils.
10168         * modules/lstat (Depends-on): Don't depend on xalloc.
10169         (License): Change from GPL to LGPL, since this is now simply a
10170         replacement for a libc function.
10171
10172 2006-02-14  Jim Meyering  <jim@meyering.net>
10173
10174         Sync from coreutils.
10175
10176         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
10177         failure on deficient systems, and simplify gnulib lgpl dependencies.
10178         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
10179         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
10180
10181         * lib/xalloc-die.c: Remove unused definition of N_.
10182
10183 2006-02-14  Jim Meyering  <jim@meyering.net>
10184
10185         Sync from coreutils.
10186         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
10187         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
10188         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
10189         double-quote uses of that variable, to accommodate the rare case in
10190         which getmntent is available in none of the libraries checked.  This
10191         happens at least on FreeBSD 5.0.
10192
10193 2006-02-13  Simon Josefsson  <jas@extundo.com>
10194
10195         * gnulib-tool (Usage): Fix --import, from
10196         karl@freefriends.org (Karl Berry).
10197
10198 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10199
10200         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
10201
10202 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
10203
10204         * lib/argp-namefrob.h: Restore changes accidentally lost during the
10205         "autoupdate" on 2005-12-12.
10206
10207 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10208
10209         * modules/closeout (Depends-on): Remove atexit.
10210
10211 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10212
10213         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
10214         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
10215
10216 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
10217
10218         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
10219         __EXTENSIONS__ if this causes compilation to fail.  Problem
10220         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
10221         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
10222
10223 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
10224
10225         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
10226         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
10227         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
10228         All uses changed.
10229
10230 2006-01-26  Simon Josefsson  <jas@extundo.com>
10231
10232         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
10233         prototype is visible on mingw32.
10234
10235         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
10236         for mingw32.
10237
10238         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
10239         mingw32).
10240
10241 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
10242
10243         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
10244         attempt to open for write; this always fails, at least on POSIX
10245         hosts.  This reinstates the 2006-01-09 change, which was
10246         inadvertently removed.
10247
10248 2006-01-26  Bruno Haible  <bruno@clisp.org>
10249
10250         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
10251         Reported by Paul Eggert.
10252
10253 2006-01-26  Bruno Haible  <bruno@clisp.org>
10254             Paul Eggert  <eggert@cs.ucla.edu>
10255
10256         * lib/stdbool_.h (_Bool)
10257         [(! (defined __cplusplus || defined __BEOS__)
10258           && !defined __GNUC__
10259           && !(defined __HP_cc || defined __xlc__
10260                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
10261                || defined __sgi))]:
10262         #define to signed char in these cases too; this simplifies
10263         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
10264         etc., separately) and makes it more conservative.
10265
10266 2006-01-25  Simon Josefsson  <jas@extundo.com>
10267
10268         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
10269         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
10270         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
10271
10272 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10273
10274         * lib/argp-namefrob.h: Bugfix. Remove stray #
10275
10276 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
10277
10278         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
10279         so that we test the test.
10280         Check for yet another HP-UX cc bug involving *bool |= bool.
10281
10282 2006-01-25  Karl Berry  <karl@gnu.org>
10283
10284         * config/srclist.txt (vasnprintf.c): sync lost.
10285
10286 2006-01-25  Jim Meyering  <jim@meyering.net>
10287
10288         Sync from the stable (b5) branch of coreutils:
10289
10290         * lib/fts.c (fts_children): Don't let close() clobber errno from
10291         failed fchdir().
10292
10293         * lib/fts.c (fts_stat): When following a symlink-to-directory,
10294         don't necessarily interpret stat-fails+lstat-succeeds as indicating
10295         a dangling symlink.  That can also happen at least for ELOOP.
10296         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
10297         FYI, this bug predates the inclusion of fts.c in coreutils.
10298
10299         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
10300         in their own block, so pre-c99 compilers don't object.
10301
10302         Avoid the double-free (first in fts_read, second in fts_close) that
10303         would occur when an `active' directory is made inaccessible (e.g.,
10304         via chmod a-x) during a traversal.
10305         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10306         before returning.  Reproduce this failure by
10307         mkdir -p a/b; cd a; chmod a-x . b
10308         Reported by Stavros Passas.
10309
10310 2006-01-25  Jim Meyering  <jim@meyering.net>
10311
10312         * lib/fileblocks.c: Remove more useless parentheses.
10313         * lib/readutmp.h: Likewise.
10314
10315 2006-01-25  Bruno Haible  <bruno@clisp.org>
10316
10317         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
10318         warnings.
10319         Reported by Paul Eggert.
10320
10321 2006-01-25  Bruno Haible  <bruno@clisp.org>
10322
10323         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
10324         rid of a trap command. For Solaris sh.
10325         Reported by Mark D. Baushke <mdb@gnu.org>.
10326
10327 2006-01-24  Simon Josefsson  <jas@extundo.com>
10328
10329         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
10330         Bruno.
10331
10332 2006-01-24  Karl Berry  <karl@gnu.org>
10333
10334         * config/srclist.txt (argp-namefrob.h): sync lost.
10335
10336 2006-01-24  Jim Meyering  <jim@meyering.net>
10337
10338         * modules/openat (Files): Add lib/intprops.h.
10339         From Mark D. Baushke.
10340
10341 2006-01-24  Jim Meyering  <jim@meyering.net>
10342
10343         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
10344         Reported by Mark D. Baushke.
10345
10346 2006-01-24  Jim Meyering  <jim@meyering.net>
10347
10348         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
10349
10350 2006-01-24  Bruno Haible  <bruno@clisp.org>
10351
10352         * modules/strnlen (Maintainer): Change from glibc to all.
10353
10354 2006-01-24  Bruno Haible  <bruno@clisp.org>
10355
10356         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
10357         Patch by Paul Eggert.
10358
10359 2006-01-24  Bruno Haible  <bruno@clisp.org>
10360
10361         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
10362         already has it.
10363         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
10364         2005-11-26.
10365
10366         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
10367         'signed char' to avoid problems with the built-in _Bool type.
10368         Reported by Paul Eggert on 2005-11-26.
10369
10370 2006-01-24  Bruno Haible  <bruno@clisp.org>
10371
10372         * gnulib-tool (func_import): Avoid constructing complicated sed
10373         expressions inside backquote.
10374         Report and solution by Mark D. Baushke <mdb@gnu.org>.
10375
10376 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
10377
10378         These changes imported from libc.
10379         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
10380         test and two separate function calls.
10381         * lib/strndup.c (__strndup): Add libc_hidden_def.
10382
10383 2006-01-23  Simon Josefsson  <jas@extundo.com>
10384
10385         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10386         Remove the test_*_SOURCES variable: automake infers it by default.
10387         * modules/tls-tests: Likewise.
10388
10389 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10390
10391         Work around porting bugs reported by Dieter in
10392         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10393         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10394         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10395         Include "getopt.h" first, to check interface.
10396         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10397         !HAVE_DECL_GETENV.
10398         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10399         (__strndup): Revert to K&R-style function dfns, the glibc style.
10400         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10401         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10402         Include strnlen.h first, to get prototype properly.
10403         (strnlen): Renamed from __strnlen.
10404         Remove weak alias.
10405
10406 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10407
10408         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10409
10410 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10411
10412         * config/srclist.txt: Adjust to reflect glibc reorganization.
10413         This affects only comments.
10414
10415 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10416
10417          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10418          Reported by Bruce Korb <bkorb@gnu.org>.
10419
10420 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10421
10422         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10423         to pacify gcc -Wswitch-default.
10424
10425 2006-01-22  Bruno Haible  <bruno@clisp.org>
10426
10427         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10428         temporary buffer for sprintf, take into account the precision also
10429         for 'd', 'i', 'u', 'o', 'x', 'X'.
10430
10431 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10432
10433         * modules/argp-tests: New module
10434         * tests/test-argp.c: New file
10435         * tests/test-argp-2.sh: New file
10436
10437 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10438
10439         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10440         (__argp_base_name): Removed
10441         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10442         typo.
10443         (__argp_base_name): Provide macro definition or extern declaration
10444         depending on the configuration
10445
10446 2006-01-20  Simon Josefsson  <jas@extundo.com>
10447
10448         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10449
10450 2006-01-20  Simon Josefsson  <jas@extundo.com>
10451
10452         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10453
10454 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10455
10456         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10457         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10458         Suggested by Bruno Haible.
10459
10460 2006-01-20  Karl Berry  <karl@gnu.org>
10461
10462         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10463         until changes propagate, I guess.
10464
10465 2006-01-19  Simon Josefsson  <jas@extundo.com>
10466
10467         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10468
10469 2006-01-19  Simon Josefsson  <jas@extundo.com>
10470
10471         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10472
10473 2006-01-19  Simon Josefsson  <jas@extundo.com>
10474
10475         * gnulib-tool: Set check_PROGRAMS.
10476
10477         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10478         modules/des-tests, modules/gc-arcfour-tests,
10479         modules/gc-arctwo-tests, modules/gc-des-tests,
10480         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10481         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10482         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10483         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10484         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10485         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10486         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10487         test_*_SOURCES.
10488
10489 2006-01-18  Simon Josefsson  <jas@extundo.com>
10490
10491         * modules/socklen (Depends-on): Depend on sys_socket.
10492
10493 2006-01-18  Simon Josefsson  <jas@extundo.com>
10494
10495         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10496         modules/des-tests, modules/gc-arcfour-tests,
10497         modules/gc-arctwo-tests, modules/gc-des-tests,
10498         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10499         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10500         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10501         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10502         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10503         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10504         $(EXEEXT) to automake TESTS variable, for mingw32.
10505
10506 2006-01-17  Simon Josefsson  <jas@extundo.com>
10507
10508         * modules/socklen (Include): Need sys/socket.h.
10509
10510 2006-01-17  Bruno Haible  <bruno@clisp.org>
10511
10512         * modules/ssize_t (Include): Add <sys/types.h>.
10513
10514 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10515
10516         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10517         it's not portable and it doesn't work with cross-compiles.
10518         Problem reported by Bruno Haible.  Fix missing-$ typo in
10519         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10520         -zignore from being used with Sun's C compiler.
10521
10522 2006-01-12  Simon Josefsson  <jas@extundo.com>
10523
10524         * lib/base64.c: Fix warning, reported by Bruno Haible
10525         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10526
10527 2006-01-12  Bruno Haible  <bruno@clisp.org>
10528
10529         * modules/ldd: New file.
10530         * build-aux/ldd.sh.in: New file.
10531         * MODULES.html.sh (Support for building libraries and executables): Add
10532         ldd.
10533
10534 2006-01-12  Bruno Haible  <bruno@clisp.org>
10535
10536         * m4/ldd.m4: New file.
10537
10538 2006-01-12  Bruno Haible  <bruno@clisp.org>
10539
10540         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10541         endless loop while replacing $auxdir with build-aux.
10542
10543 2006-01-11  Simon Josefsson  <jas@extundo.com>
10544
10545         * lib/stdint_.h (SIZE_MAX): Add missing (.
10546
10547 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10548
10549         Sync from coreutils.
10550         * lib/md5.c: Fix commentary typos.
10551         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10552         * lib/md5.h (__attribute__): Remove; unused.
10553         * lib/sha1.c: Fix commentary to match md5 better.
10554         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10555         so that we don't need to worry about alignment.  All uses changed.
10556         This merges the 2005-10-28 md5 change into sha1.
10557
10558 2006-01-11  Jim Meyering  <jim@meyering.net>
10559
10560         Sync from coreutils.
10561         * lib/md5.c (OP): Fix spacing.
10562
10563 2006-01-11  Bruno Haible  <bruno@clisp.org>
10564
10565         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10566         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10567         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10568
10569 2006-01-11  Bruno Haible  <bruno@clisp.org>
10570
10571         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10572         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10573         the "early" section as well.
10574
10575 2006-01-11  Bruno Haible  <bruno@clisp.org>
10576
10577         Avoid "ar: no archive members specified" error on MacOS X.
10578         * gnulib-tool (func_modules_add_dummy): New function.
10579         (func_import, func_create_testdir): Invoke it.
10580
10581 2006-01-11  Bruno Haible  <bruno@clisp.org>
10582
10583         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10584         with $auxdir in AC_CONFIG_FILES statements.
10585
10586 2006-01-11  Bruno Haible  <bruno@clisp.org>
10587
10588         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10589         Initialize also noinst_HEADERS to empty.
10590
10591 2006-01-11  Bruno Haible  <bruno@clisp.org>
10592
10593         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10594         variables.
10595         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10596         autoreconf.
10597
10598 2006-01-11  Bruno Haible  <bruno@clisp.org>
10599
10600         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10601         overridable by the user.
10602         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10603
10604 2006-01-10  Simon Josefsson  <jas@extundo.com>
10605
10606         * modules/sys_socket: New file.
10607
10608 2006-01-10  Simon Josefsson  <jas@extundo.com>
10609
10610         * m4/sys_socket_h.m4: New file.
10611
10612 2006-01-10  Simon Josefsson  <jas@extundo.com>
10613
10614         * lib/socket_.h: New file.
10615
10616 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10617
10618         * modules/readutmp (Maintainer): Add myself.
10619
10620 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10621
10622         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10623         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10624         People who are still concerned with buggy memcmp implementations
10625         can invoke gl_FUNC_MEMCMP themselves.
10626
10627 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10628
10629         * lib/regex_internal.h (BITSET_WORD_BITS):
10630         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10631         preprocessor mishandles large unsigned values as if they were signed.
10632         Problem reported by Claudio Fontana in
10633         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10634
10635 2006-01-10  Jim Meyering  <jim@meyering.net>
10636
10637         Avoid the double-free (first in fts_read, second in fts_close) that
10638         would occur when an `active' directory is made inaccessible (e.g.,
10639         via chmod a-x) during a traversal.
10640         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10641         before returning.  Reproduce this failure by
10642         mkdir -p a/b; cd a; chmod a-x . b
10643         Reported by Stavros Passas.
10644
10645         Sync from coreutils.
10646         * lib/sha1.c: Tweak grammar in a comment.
10647
10648 2006-01-10  Jim Meyering  <jim@meyering.net>
10649
10650         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10651         Patch by Joerg Sonnenberger.
10652
10653 2006-01-10  Bruno Haible  <bruno@clisp.org>
10654
10655         * modules/readutmp: Depend on module free.
10656         * modules/strtok_r: Depend on module restrict.
10657
10658 2006-01-10  Bruno Haible  <bruno@clisp.org>
10659
10660         * modules/gettext (configure.ac): Add an invocation of
10661         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10662
10663 2006-01-10  Bruno Haible  <bruno@clisp.org>
10664
10665         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10666         Reported by Werner Lemberg <wl@gnu.org>.
10667
10668 2006-01-10  Bruno Haible  <bruno@clisp.org>
10669
10670         * lib/localcharset.c: Update from GNU gettext.
10671
10672 2006-01-10  Bruno Haible  <bruno@clisp.org>
10673
10674         * lib/argp.h (__const): Remove macro. Use const instead.
10675         * lib/argp-fmtstream.h (__const): Likewise.
10676         * lib/glob_.h (__const): Remove macro.
10677         * lib/glob-libc.h: Use const instead of __const.
10678
10679 2006-01-10  Bruno Haible  <bruno@clisp.org>
10680
10681         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10682         variable.
10683         Needed to avoid an automake error regarding the 'gettext' module.
10684
10685 2006-01-09  Simon Josefsson  <jas@extundo.com>
10686
10687         * modules/inet_ntop (Depends-on): Add restrict.
10688
10689 2006-01-09  Simon Josefsson  <jas@extundo.com>
10690
10691         * modules/gc-rijndael-tests (License): Put under LGPL.
10692
10693         * modules/gc-des-tests (License): Likewise.
10694
10695         * modules/gc-arcfour-tests (License): Likewise.
10696
10697         * modules/gc-arctwo-tests (License): Likewise.
10698
10699         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10700
10701         * modules/gc-hmac-sha1-tests (Files): Likewise.
10702
10703         * modules/gc-hmac-md5-tests (License): Likewise.
10704
10705         * modules/gc-sha1-tests (License): Likewise.
10706
10707         * modules/gc-md5-tests (License): Likewise.
10708
10709         * modules/gc-md4-tests (License): Likewise.
10710
10711         * modules/gc-md2-tests (License): Likewise.
10712
10713         * modules/gc-tests (License): Likewise.
10714
10715         * modules/des-tests (License): Likewise.
10716
10717         * modules/md4-tests (License): Likewise.
10718
10719         * modules/md2-tests (License): Likewise.
10720
10721 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10722
10723         Sync from coreutils:
10724
10725         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10726         * modules/lib-ignore: New file.
10727         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10728         chdir-safer.m4, lchmod.m4.
10729         * modules/openat: Add mkdirat.c, openat-priv.h.
10730
10731 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10732
10733         Sync from coreutils.
10734         * m4/lib-ignore.m4: New file.
10735         * m4/lchmod.m4: New file.
10736
10737 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10738
10739         Sync from coreutils.
10740         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10741         for write access: POSIX says that must fail.
10742         * lib/fts.c (diropen): Likewise.
10743         * lib/save-cwd.c (save_cwd): Likewise.
10744         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10745         well, for minor improvements on hosts that lack O_DIRECTORY.
10746         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10747         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10748         Fall back on chown if open failed with EACCES.
10749
10750         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10751         Report an error at compile-time if only a 1-second nominal clock
10752         resolution is found.
10753
10754         * lib/lchmod.h: New file.
10755         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10756         (make_dir_parents): Use lchown rather than chown, and
10757         lchmod rather than chmod.
10758
10759         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10760         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10761         "proc" reported by n0dalus.
10762
10763         * lib/mountlist.c: Include <limits.h>.
10764         (dev_from_mount_options)
10765         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10766         New function.  It no longer assumes "dev=" has the System V meaning
10767         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10768         (read_file_system_list)
10769         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10770         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10771         dev= in that case.
10772
10773         * lib/posixtm.h (PDS_PRE_2000): New macro.
10774         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10775         allow_century.  All usages changed.  Reject dates outside the range
10776         1969-1999 if PDS_PRE_2000 is used.
10777
10778 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10779
10780         Sync from coreutils.
10781         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10782         (Time of day items): Mention the possibility of leap seconds.
10783         Problem reported by Dr. David Alan Gilbert.
10784
10785 2006-01-09  Jim Meyering  <jim@meyering.net>
10786
10787         Sync from coreutils.
10788
10789         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10790
10791         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10792
10793         * lib/modechange.c (mode_compile): Reject an invalid mode string
10794         that starts with an octal digit.  From Andreas Gruenbacher.
10795
10796         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10797         and dup to open_safer and dup_safer, respectively.
10798         (openat_permissive): Fix typo in comment.
10799
10800         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10801         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10802         (_): Remove; no longer needed.
10803         (openat): Renamed from rpl_openat; no need for rpl_openat
10804         since openat.h renames openat for us.
10805         Replace most of the body with a call to openat_permissive,
10806         to avoid duplicate code.
10807         Port to (probably hypothetical) environments were mode_t is
10808         wider than int.
10809         (openat_permissive): Require mode arg, so that we can check
10810         types better.  Put it just after flags.  Change cwd failure
10811         indicator from pointer-to-bool to pointer-to-errno-value.
10812         All callers changed.
10813         Invoke openat_save_fail and/or openat_restore_fail if
10814         cwd_errno is null, so that openat can call us.
10815         (openat_permissive, fdopendir, fstatat, unlinkat):
10816         Simplify errno handling to avoid some duplicate code,
10817         as it's OK to set errno on success.
10818         * lib/openat.h: Revamp code so that function macros depend on
10819         __OPENAT_PREFIX only, not also on AT_FDCWD.
10820         (openat_ro): Remove.  Caller changed to use openat_permissive.
10821         (openat_permissive): Now a macro, if not a function.
10822         (openat_restore_fail, openat_save_fail): Now always functions,
10823         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10824
10825         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10826         and openat.c.
10827         * lib/mkdirat.c: Include openat-priv.h.
10828         Remove definitions of macros defined therein.
10829         * lib/openat.c: Likewise.
10830
10831         * lib/mkdirat.c (mkdirat): New file and function.
10832         * lib/openat.h (mkdirat): Declare.
10833
10834         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10835
10836         * lib/openat.h (openat_permissive): Declare.
10837         (openat_ro): Define.
10838
10839         * lib/openat.c (EXPECTED_ERRNO): New macro.
10840         (openat_permissive): New function -- used in remove.c rewrite.
10841         (all functions): Set errno just before returning, only if there
10842         was an actual failure.
10843         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10844
10845         Emulate openat-family functions using Linux's procfs, if possible.
10846         Idea and some code based on Ulrich Drepper's glibc changes.
10847
10848         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10849         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10850         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10851         before falling back on save_cwd and restore_cwd.
10852         (fdopendir, fstatat, unlinkat): Likewise.
10853
10854         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10855         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10856
10857         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10858         as second argument to va_arg.  Otherwise, some versions of gcc
10859         warn that `if this code is reached, the program will abort'.
10860
10861 2006-01-09  Jim Meyering  <jim@meyering.net>
10862
10863         Sync from coreutils.
10864         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10865         Require openat-priv.h.
10866
10867 2006-01-09  Bruno Haible  <bruno@clisp.org>
10868
10869         * modules/strnlen (Include): Use strnlen.h.
10870
10871 2006-01-09  Bruno Haible  <bruno@clisp.org>
10872
10873         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10874
10875 2006-01-09  Bruno Haible  <bruno@clisp.org>
10876
10877         * lib/sysexit_.h (EX_OK): New macro.
10878         Suggested by Martin Lambers <marlam@marlam.de>.
10879
10880 2006-01-09  Bruno Haible  <bruno@clisp.org>
10881
10882         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10883         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10884
10885 2006-01-09  Bruno Haible  <bruno@clisp.org>
10886
10887         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10888         numbers.
10889
10890 2006-01-09  Bruno Haible  <bruno@clisp.org>
10891
10892         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10893         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10894         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10895         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10896
10897 2006-01-09  Bruno Haible  <bruno@clisp.org>
10898
10899         * build-aux/javacomp.sh.in: New file, moved from lib/.
10900         * modules/javacomp-script (Files): Update.
10901         (configure.ac): Add AC_CONFIG_FILES invocation.
10902         (EXTRA_DIST): Remove variable.
10903
10904         * build-aux/javaexec.sh.in: New file, moved from lib/.
10905         * modules/javaexec (Files): Update.
10906         (configure.ac): Add AC_CONFIG_FILES invocation.
10907         (EXTRA_DIST): Remove javaexec.sh.in.
10908
10909         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10910         * modules/csharpcomp-script (Files): Update.
10911         (configure.ac): Add AC_CONFIG_FILES invocation.
10912         (EXTRA_DIST): Remove variable.
10913
10914         * build-aux/csharpexec.sh.in: New file, moved from lib/.
10915         * modules/csharpexec (Files): Update.
10916         (configure.ac): Add AC_CONFIG_FILES invocation.
10917         (EXTRA_DIST): Remove csharpexec.sh.in.
10918
10919 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10920
10921         Sync from coreutils.
10922
10923         Add POSIX ACL support
10924         * lib/acl.h (copy_acl, set_acl): Add declarations.
10925         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
10926         systems other than Linux.
10927         (chmod_or_fchmod): New function: use fchmod when possible,
10928         and chmod otherwise.
10929         (file_has_acl): Add a POSIX ACL implementation, with a
10930         Linux-specific subcase.
10931         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
10932         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
10933         acls are unsupported.
10934         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
10935         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
10936         are unsupported.
10937
10938 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
10939
10940         Sync from coreutils.
10941         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
10942
10943 2006-01-07  Bruno Haible  <bruno@clisp.org>
10944
10945         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
10946         gl_EARLY.
10947
10948 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10949
10950         * lib/strftime.c (tzname): Don't declare if it is already #defined.
10951         Problem reported for Mingw by Mark Junker.
10952
10953 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
10954
10955         * README: Gnulib normally doesn't generate a tarball.
10956
10957 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
10958
10959         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
10960         long int, not int, for nanosecond counts, so that people who are
10961         used to POSIX struct timespec won't be surprised.  Reported by Jim
10962         Meyering.
10963
10964 2005-12-28  Bruno Haible  <bruno@clisp.org>
10965
10966         * build-aux/config.rpath: Update from GNU gettext.
10967
10968 2005-12-16  Jim Meyering  <jim@meyering.net>
10969
10970         * modules/fprintftime: New module.
10971         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10972
10973 2005-12-16  Jim Meyering  <jim@meyering.net>
10974
10975         * m4/fprintftime.m4: New file.
10976
10977 2005-12-16  Jim Meyering  <jim@meyering.net>
10978
10979         * lib/fprintftime.c, lib/fprintftime.h: New files.
10980
10981 2005-12-15  Simon Josefsson  <jas@extundo.com>
10982
10983         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10984         new m4/socklen.m4.
10985
10986 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10987
10988         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10989         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10990
10991 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10992
10993         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10994         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10995         struct uparams is valid. Fall back to the default values if it is
10996         not.
10997
10998 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10999
11000         * modules/argp (Files): Add argp-pin.c
11001         (Depends-on): dirname
11002         (lib_SOURCES): Add argp-pin.c
11003
11004 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11005
11006         * m4/argp.m4:  Check if program_invocation_name and
11007         program_invocation_short_name are declared and define appropriate
11008         macros if they are not.
11009
11010 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11011
11012         * lib/argp-help.c (__argp_base_name): New function
11013         (__argp_short_program_name): Rewrite using __argp_base_name
11014         * lib/argp-namefrob.h: Define program_invocation_name and
11015         program_invocation_short_name if requested
11016         (__argp_base_name): Add prototype
11017         * lib/argp-parse.c (argp_def): Use gettext wrappers
11018         (argp_default_parser): Use __argp_base_name
11019         * lib/argp-pin.c: New file. Defines program_invocation_name and
11020         program_invocation_short_name on systems that lack them.
11021
11022 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11023
11024         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
11025         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11026         porting problem reported by Georg Schwarz in
11027         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11028
11029 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11030
11031         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
11032         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11033         porting problem reported by Georg Schwarz in
11034         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11035
11036 2005-12-05  Bruno Haible  <bruno@clisp.org>
11037
11038         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
11039         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
11040         Reported by Mark Junker <mjscod@gmx.de>.
11041
11042 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
11043
11044         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
11045         Use implementation from Albert Chin, with some
11046         comments/corrections by Stepan Kasal and myself.
11047
11048 2005-12-02  Bruno Haible  <bruno@clisp.org>
11049
11050         * gnulib-tool (func_import): Accept GPLed build tool modules when
11051         --lgpl is given.
11052         * modules/csharpcomp-script: New file.
11053         * modules/csharpcomp: Depend on it.
11054         * modules/javacomp-script: New file.
11055         * modules/javacomp: Depend on it.
11056         Suggested by Simon Josefsson.
11057
11058 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
11059
11060         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
11061         statement, to work around an HP-UX 10.20 compiler bug reported by
11062         Peter O'Gorman.
11063
11064 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11065
11066         * modules/savedir (Depends-on): Add openat.
11067
11068 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11069
11070         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
11071         (uintmax_t) [defined uintmax_t]: Do not declare.
11072         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
11073         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
11074         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
11075         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
11076         sake of portability to weird hosts that C allows (though we don't
11077         know of any practical examples).
11078
11079         * lib/savedir.h (fdsavedir): New decl.
11080         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
11081         contains most of the former guts of savedir.
11082         (savedir): Use savedirstream.
11083         Include "openat.h".
11084
11085 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
11086
11087         * modules/obstack (Files): Add m4/ulonglong.m4.
11088         Problem reported by Davide Angelocola.
11089
11090 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
11091
11092         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
11093         coreutils no longer futzes with rounding modes.
11094
11095 2005-11-14  Jim Meyering  <jim@meyering.net>
11096
11097         * lib/mkstemp-safer.c: Include <config.h>, required for possible
11098         replacement of mkstemp.
11099
11100 2005-11-10  Simon Josefsson  <jas@extundo.com>
11101
11102         * lib/readline.c: Remove EOL.
11103
11104 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11105
11106         * modules/gethrxtime (Depends-on): Add gettime.
11107
11108 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11109
11110         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
11111         or gettimeofday; no longer needed.
11112
11113 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11114
11115         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
11116         time business.
11117         (gethrxtime) [! (HAVE_NANOUPTIME
11118         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
11119         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
11120         our own approximation.
11121
11122 2005-11-08  Eric Blake  <ebb9@byu.net>
11123
11124         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
11125
11126 2005-11-08  Eric Blake  <ebb9@byu.net>
11127
11128         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
11129
11130 2005-11-04  Bruno Haible  <bruno@clisp.org>
11131
11132         * gnulib-tool: Implement --update mode.
11133
11134 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
11135
11136         Fix porting problem reported by Theodoros V. Kalamatianos.
11137         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
11138         Don't assume that futimes failing means we must fail.
11139
11140 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
11141
11142         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
11143         variables to suggest the intended function of the PATH_MAX check.
11144
11145 2005-10-30  Kean Johnston  <jkj@sco.com>
11146
11147         Trivial changes to support SCO systems.
11148         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
11149         as PATH_MAX.
11150         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
11151         where __ptr is null when no I/O is pending.
11152
11153 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
11154
11155         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
11156         leave errno alone.  Problem reported by Dmitry V. Levin.
11157
11158 2005-10-28  Simon Josefsson  <jas@extundo.com>
11159
11160         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
11161         Test more.
11162
11163         * tests/test-gc-md2.c, tests/test-md2.c: New files.
11164
11165         * modules/md2, modules/md2-tests: New files.
11166
11167 2005-10-28  Simon Josefsson  <jas@extundo.com>
11168
11169         * m4/inet_ntop.m4: More tests.
11170
11171         * m4/gc-md2.m4, md2.m4: New file.
11172
11173 2005-10-28  Simon Josefsson  <jas@extundo.com>
11174
11175         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
11176         "restrict" keywords, as per POSIX.  Protect the function
11177         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
11178         Don't use K&R prototypes.  Check the sprintf return values.
11179         Re-define EAFNOSUPPORT if not present.  Indent.
11180
11181         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
11182         suggested by Bruno Haible <bruno@clisp.org>.
11183
11184         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
11185
11186         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
11187
11188         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
11189         libgcrypt).
11190
11191         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
11192
11193         * lib/md2.h, lib/md2.c: New files.
11194
11195 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
11196
11197         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
11198         errno alone.  Problem reported by Frederic Jolliton.
11199
11200 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
11201
11202         * modules/verify (License): Change from GPL to LGPL.  This is a
11203         tiny module and there are apparently near-equivalents that are
11204         under the BSD license.
11205
11206 2005-10-24  Simon Josefsson  <jas@extundo.com>
11207
11208         * modules/sha1: Relicense to LGPL.
11209
11210 2005-10-24  Simon Josefsson  <jas@extundo.com>
11211
11212         * lib/md4.h: Shrink buffer size, now that we changed the type.
11213
11214 2005-10-23  Simon Josefsson  <jas@extundo.com>
11215
11216         * gnulib-tool (func_import): Fix --tests-base.
11217
11218 2005-10-22  Simon Josefsson  <jas@extundo.com>
11219
11220         * modules/arcfour (Depends-on): Need stdint.
11221
11222 2005-10-22  Simon Josefsson  <jas@extundo.com>
11223
11224         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
11225         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
11226
11227 2005-10-22  Simon Josefsson  <jas@extundo.com>
11228
11229         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
11230         suggested by Bruno Haible <bruno@clisp.org>.
11231
11232 2005-10-22  Simon Josefsson  <jas@extundo.com>
11233
11234         * lib/crc.h: Include stddef.h, for size_t.
11235
11236 2005-10-22  Simon Josefsson  <jas@extundo.com>
11237
11238         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
11239         arcfour_context struct (simplify test vector testing in GNU
11240         Shishi).
11241
11242 2005-10-21  Simon Josefsson  <jas@extundo.com>
11243
11244         * modules/des, modules/des-tests: New files.
11245
11246         * modules/gc-des, modules/gc-des-tests: New files.
11247
11248         * tests/test-des.c, tests/test-gc-des.c: New file.
11249
11250 2005-10-21  Simon Josefsson  <jas@extundo.com>
11251
11252         * modules/arctwo, modules/arctwo-tests: New files.
11253
11254         * tests/test-arctwo.c: New file.
11255
11256         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
11257
11258         * tests/test-gc-arctwo.c: New file.
11259
11260 2005-10-21  Simon Josefsson  <jas@extundo.com>
11261
11262         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
11263         Bruno Haible <bruno@clisp.org>.
11264
11265         * m4/gc-des.m4: New file.
11266
11267 2005-10-21  Simon Josefsson  <jas@extundo.com>
11268
11269         * m4/arctwo.m4: New file.
11270
11271         * m4/gc-arctwo.m4: New file.
11272
11273 2005-10-21  Simon Josefsson  <jas@extundo.com>
11274
11275         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
11276         block.
11277
11278 2005-10-21  Simon Josefsson  <jas@extundo.com>
11279
11280         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
11281         <bruno@clisp.org>.
11282
11283         * lib/hmac-sha1.c (hmac_sha1): Likewise.
11284
11285         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
11286         Bruno Haible <bruno@clisp.org>.
11287
11288         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
11289         <bruno@clisp.org>.
11290
11291 2005-10-21  Simon Josefsson  <jas@extundo.com>
11292
11293         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
11294
11295 2005-10-21  Simon Josefsson  <jas@extundo.com>
11296
11297         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
11298
11299 2005-10-21  Simon Josefsson  <jas@extundo.com>
11300
11301         * lib/des.h, lib/des.c: New files.
11302
11303         * lib/gc-gnulib.c: Support DES.c
11304
11305 2005-10-21  Simon Josefsson  <jas@extundo.com>
11306
11307         * lib/arctwo.h, lib/arctwo.c: New files.
11308
11309         * lib/gc-gnulib.c: Support ARCTWO.
11310
11311 2005-10-21  Simon Josefsson  <jas@extundo.com>
11312
11313         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
11314         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11315
11316 2005-10-21  Simon Josefsson  <jas@extundo.com>
11317
11318         * gnulib-tool (func_import, func_create_testdir): Define automake
11319         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
11320         Makefile.am snippet),
11321         suggested by Bruno Haible <bruno@clisp.org>.
11322
11323         * modules/gc (Makefile.am): Use it.
11324
11325 2005-10-21  Bruno Haible  <bruno@clisp.org>
11326
11327         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
11328         patch.
11329
11330 2005-10-19  Simon Josefsson  <jas@extundo.com>
11331
11332         * tests/test-gc-rijndael.c: New file.
11333
11334         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
11335
11336 2005-10-19  Simon Josefsson  <jas@extundo.com>
11337
11338         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
11339         interface too.
11340
11341 2005-10-19  Simon Josefsson  <jas@extundo.com>
11342
11343         * tests/test-gc-arcfour.c: New file.
11344
11345         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
11346
11347 2005-10-19  Simon Josefsson  <jas@extundo.com>
11348
11349         * modules/gc-md4, modules/gc-md4-tests: New file.
11350
11351         * tests/test-gc-md4.c: New file.
11352
11353 2005-10-19  Simon Josefsson  <jas@extundo.com>
11354
11355         * m4/gc-md4.m4: New file.
11356
11357 2005-10-19  Simon Josefsson  <jas@extundo.com>
11358
11359         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
11360         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
11361         <kasal@ucw.cz>.
11362
11363 2005-10-19  Simon Josefsson  <jas@extundo.com>
11364
11365         * m4/gc-arcfour.m4: New file.
11366
11367         * m4/gc-rijndael.m4: New file.
11368
11369 2005-10-19  Simon Josefsson  <jas@extundo.com>
11370
11371         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
11372
11373 2005-10-19  Simon Josefsson  <jas@extundo.com>
11374
11375         * lib/gc-gnulib.c: Support ARCFOUR.
11376
11377 2005-10-19  Simon Josefsson  <jas@extundo.com>
11378
11379         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
11380         support.
11381
11382         * lib/gc.h: Add ECB enum type.
11383
11384         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11385
11386 2005-10-18  Simon Josefsson  <jas@extundo.com>
11387
11388         * tests/test-md5.c: New file.
11389
11390         * modules/md5-tests: New file.
11391
11392 2005-10-18  Simon Josefsson  <jas@extundo.com>
11393
11394         * tests/test-md4.c: New file.
11395
11396         * modules/md4, modules/md4-tests: New files.
11397
11398 2005-10-18  Simon Josefsson  <jas@extundo.com>
11399
11400         * m4/md4.m4: New file.
11401
11402 2005-10-18  Simon Josefsson  <jas@extundo.com>
11403
11404         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11405
11406 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11407
11408         * gnulib-tool (func_create_testdir): Omit the second check whether
11409         BUILT_SOURCES in nonempty.
11410
11411 2005-10-17  Simon Josefsson  <jas@extundo.com>
11412
11413         * tests/test-rijndael.c: New file.
11414
11415 2005-10-17  Simon Josefsson  <jas@extundo.com>
11416
11417         * modules/sha1: Depend on stdint instead of md5.
11418
11419         * modules/md5: Depend on stdint, remove uint32_t.
11420
11421 2005-10-17  Simon Josefsson  <jas@extundo.com>
11422
11423         * modules/gc-sha1-tests: New file.
11424
11425         * tests/test-gc-sha1.c: New file.
11426
11427 2005-10-17  Simon Josefsson  <jas@extundo.com>
11428
11429         * m4/md5.m4: Remove call to uint32_t.m4.
11430
11431 2005-10-17  Simon Josefsson  <jas@extundo.com>
11432
11433         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11434
11435         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11436         md5.h.
11437
11438         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11439
11440         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11441
11442 2005-10-17  Simon Josefsson  <jas@extundo.com>
11443
11444         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11445
11446 2005-10-17  Simon Josefsson  <jas@extundo.com>
11447
11448         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11449
11450 2005-10-17  Simon Josefsson  <jas@extundo.com>
11451
11452         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11453
11454         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11455
11456 2005-10-17  Bruno Haible  <bruno@clisp.org>
11457
11458         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11459         that it can also be used in a test.
11460
11461 2005-10-16  Bruno Haible  <bruno@clisp.org>
11462
11463         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11464         TESTS_ENVIRONMENT, so that individual tests can augment it.
11465
11466         * gnulib-tool (func_create_testdir): Use an intermediate target for
11467         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11468         macros, like $(ALLOCA_H), which cannot be passed through the command
11469         line.
11470
11471 2005-10-15  Simon Josefsson  <jas@extundo.com>
11472
11473         * modules/rijndael-tests: New file.
11474
11475         * modules/rijndael: New file.
11476
11477 2005-10-15  Simon Josefsson  <jas@extundo.com>
11478
11479         * m4/rijndael.m4: New file.
11480
11481 2005-10-15  Simon Josefsson  <jas@extundo.com>
11482
11483         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11484
11485         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11486
11487 2005-10-14  Simon Josefsson  <jas@extundo.com>
11488
11489         * tests/test-arcfour.c: New file.
11490
11491         * modules/arcfour, modules/arcfour-tests: New files.
11492
11493 2005-10-14  Simon Josefsson  <jas@extundo.com>
11494
11495         * m4/arcfour.m4: New file.
11496
11497 2005-10-14  Simon Josefsson  <jas@extundo.com>
11498
11499         * lib/arcfour.h, lib/arcfour.c: New files.
11500
11501 2005-10-14  Roland McGrath  <roland@redhat.com>
11502
11503         Import from libc.  [BZ #1331]
11504         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11505         macro argument.
11506         Reported by Matej Vela <vela@debian.org>.
11507
11508 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11509
11510         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11511         include <wchar.h>; no longer needed.
11512
11513 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11514
11515         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11516
11517 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11518         and  Ulrich Drepper  <drepper@redhat.com>
11519
11520         Import from libc.
11521         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11522         instead of inline stream orientation test and two separate
11523         function calls.  Pay no attention to USE_IN_LIBIO.
11524
11525 2005-10-13  Simon Josefsson  <jas@extundo.com>
11526
11527         * modules/gc-hmac-md5-tests: New file.
11528
11529         * tests/test-gc-hmac-sha1.c: New file.
11530
11531         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11532
11533         * modules/gc-hmac-md5-tests: New file.
11534
11535         * tests/test-gc-md5.c: New file.
11536
11537         * modules/gc-md5-tests: New file.
11538
11539 2005-10-13  Simon Josefsson  <jas@extundo.com>
11540
11541         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11542         Move memory allocation outside of loop.
11543
11544 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11545
11546         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11547         intermediate directory is in a read-only file system.  Problem
11548         reported by Eric Blake.
11549
11550 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11551
11552         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11553
11554 2005-10-12  Simon Josefsson  <jas@extundo.com>
11555
11556         * tests/test-hmac-sha1.c: New file.
11557
11558         * modules/hmac-sha1-tests: New file.
11559
11560         * modules/hmac-sha1: New file.
11561
11562 2005-10-12  Simon Josefsson  <jas@extundo.com>
11563
11564         * modules/gc-sha1: New file.
11565
11566 2005-10-12  Simon Josefsson  <jas@extundo.com>
11567
11568         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11569
11570         * tests/test-gc-pbkdf2-sha1.c: New file.
11571
11572 2005-10-12  Simon Josefsson  <jas@extundo.com>
11573
11574         * modules/gc-md5, modules/gc-hmac-md5: New files.
11575
11576         * modules/gc (Files): Remove md5, memxor and hmac files.
11577
11578 2005-10-12  Simon Josefsson  <jas@extundo.com>
11579
11580         * m4/gc-pbkdf2-sha1.m4: New file.
11581
11582         * m4/gc-hmac-sha1.m4: New file.
11583
11584         * m4/gc-sha1: New file.
11585
11586         * m4/hmac-sha1.m4: New file.
11587
11588 2005-10-12  Simon Josefsson  <jas@extundo.com>
11589
11590         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11591
11592         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11593
11594 2005-10-12  Simon Josefsson  <jas@extundo.com>
11595
11596         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11597         suggested by Bruno Haible <bruno@clisp.org>.
11598
11599 2005-10-12  Simon Josefsson  <jas@extundo.com>
11600
11601         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11602
11603 2005-10-12  Simon Josefsson  <jas@extundo.com>
11604
11605         * lib/gc-pbkdf2-sha1.c: New file.
11606
11607         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11608
11609 2005-10-12  Simon Josefsson  <jas@extundo.com>
11610
11611         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11612
11613         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11614
11615 2005-10-12  Simon Josefsson  <jas@extundo.com>
11616
11617         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11618         GC_USE_HMAC_MD5, respectively.
11619
11620         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11621         (gc_md5): Fix typo.
11622
11623         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11624
11625         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11626
11627         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11628
11629 2005-10-12  Bruno Haible  <bruno@clisp.org>
11630
11631         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11632         Reported by Stepan Kasal <kasal@ucw.cz>.
11633
11634 2005-10-11  Simon Josefsson  <jas@extundo.com>
11635
11636         * tests/test-crc.c: New file.
11637
11638         * modules/crc, modules/crc-tests: New files.
11639
11640 2005-10-11  Simon Josefsson  <jas@extundo.com>
11641
11642         * m4/crc.m4: New file.
11643
11644 2005-10-11  Simon Josefsson  <jas@extundo.com>
11645
11646         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11647
11648         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11649
11650         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11651
11652 2005-10-11  Simon Josefsson  <jas@extundo.com>
11653
11654         * lib/crc.h, lib/crc.c: New files.
11655
11656         * lib/gc.h (gc_hash_buffer): Add doc.
11657
11658 2005-10-11  Bruno Haible  <bruno@clisp.org>
11659
11660         * modules/c-strcasestr: New file.
11661         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11662
11663 2005-10-11  Bruno Haible  <bruno@clisp.org>
11664
11665         * modules/c-strcase: New file.
11666         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11667
11668 2005-10-11  Bruno Haible  <bruno@clisp.org>
11669
11670         * lib/strcasecmp.c: Include limits.h.
11671         (strcasecmp): Avoid integer overflow on exotic platforms.
11672         * lib/strncasecmp.c: Include limits.h.
11673         (strncasecmp): Avoid integer overflow on exotic platforms.
11674         Reported by Paul Eggert.
11675
11676 2005-10-11  Bruno Haible  <bruno@clisp.org>
11677
11678         * lib/c-strcasestr.h: New file, from GNU gettext.
11679         * lib/c-strcasestr.c: New file, from GNU gettext.
11680
11681 2005-10-11  Bruno Haible  <bruno@clisp.org>
11682
11683         * lib/c-strcase.h: New file, from GNU gettext.
11684         * lib/c-strcasecmp.c: New file, from GNU gettext.
11685         * lib/c-strncasecmp.c: New file, from GNU gettext.
11686
11687 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11688
11689         * modules/mempcpy (License): GPL -> LGPL.
11690         * modules/strchrnul (License): Likewise.
11691         * modules/sysexits (License): Likewise.
11692
11693 2005-10-08  Simon Josefsson  <jas@extundo.com>
11694
11695         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11696
11697 2005-10-07  Simon Josefsson  <jas@extundo.com>
11698
11699         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11700
11701 2005-10-06  Simon Josefsson  <jas@extundo.com>
11702
11703         * tests/test-hmac-md5.c: New file.
11704
11705         * modules/hmac-md5-tests: New file.
11706
11707         * modules/hmac-md5: New file.
11708
11709 2005-10-06  Simon Josefsson  <jas@extundo.com>
11710
11711         * m4/hmac-md5.m4: New file.
11712
11713         * m4/memxor.m4: Require gl_C_RESTRICT.
11714
11715 2005-10-06  Simon Josefsson  <jas@extundo.com>
11716
11717         * lib/memxor.c (memxor): Avoid casts and warnings.
11718
11719 2005-10-06  Simon Josefsson  <jas@extundo.com>
11720
11721         * lib/hmac-md5.c: New file.
11722
11723         * lib/hmac.h: New file.
11724
11725 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11726
11727         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11728         promotes to int, not unsigned int, to catch the AIX 5.3
11729         compiler bug.
11730
11731 2005-10-05  Simon Josefsson  <jas@extundo.com>
11732
11733         * modules/memxor: New file.
11734
11735         * modules/iconv (Files): Move config.rpath to havelib, it is used
11736         there.
11737
11738         * modules/havelib (Files): Add config.rpath.
11739
11740 2005-10-05  Simon Josefsson  <jas@extundo.com>
11741
11742         * m4/memxor.m4: New file.
11743
11744 2005-10-05  Simon Josefsson  <jas@extundo.com>
11745
11746         * lib/memxor.c (memxor): Fix compiler error.
11747
11748         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11749         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11750
11751         * lib/memxor.h, lib/memxor.c: New files.
11752
11753         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11754         we assume all systems have it, suggested by Jim Meyering
11755         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11756         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11757         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11758         same reasons.
11759
11760 2005-10-05  Simon Josefsson  <jas@extundo.com>
11761
11762         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11763
11764 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11765
11766         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11767         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11768         needed, since the source code now assumes these .h files.
11769
11770 2005-10-05  Derek Price  <derek@ximbiot.com>
11771
11772         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11773
11774 2005-10-05  Bruno Haible  <bruno@clisp.org>
11775
11776         * modules/stdint (License): Change to LGPL.
11777
11778 2005-10-04  Simon Josefsson  <jas@extundo.com>
11779
11780         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11781         D. Baushke" <mdb@gnu.org>.
11782
11783 2005-10-04  Bruno Haible  <bruno@clisp.org>
11784
11785         * lib/verify.h (verify_true): Provide alternative definition for C++.
11786
11787 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11788
11789         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11790         (SSIZE_MAX): New macro, if not already defined.
11791         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11792         than 2 GiB.
11793
11794 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11795
11796         Sync from coreutils.
11797         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11798         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11799         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11800         ULLONG_MAX doesn't work with 2.7.2.1.
11801
11802 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11803
11804         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11805         From Ben Pfaff.
11806
11807         * modules/exclude (Depends-on): Depend on verify.
11808         * modules/strtoimax (Depends-on): Likewise.
11809         * modules/utimecmp (Depends-on): Likewise.
11810
11811 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11812
11813         * lib/exclude.c: Include verify.h.
11814         (verify): Remove.  All callers changed to use verify.h's version.
11815         * lib/strtoimax.c: Likewise.
11816         * lib/utimecmp.c: Likewis.e
11817
11818         Sync from coreutils.
11819         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11820         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11821         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11822         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11823         bother returning ENOSYS if settimeofday or stime fails; just let
11824         them return whatever errno they want to return.
11825         * lib/utimens.c: Include unistd.h, for dup2.
11826         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11827         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11828
11829 2005-10-02  Jim Meyering  <jim@meyering.net>
11830
11831         Sync from coreutils.
11832         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11833         from glibc-2.2.5 that fails for read-only files.
11834
11835 2005-10-02  Jim Meyering  <jim@meyering.net>
11836
11837         Sync from coreutils.
11838         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11839         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11840         `#if HAVE_CONFIG_H'.
11841         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11842         Remove AT_FDCWD test.
11843         Do not consume the fd unless successful.
11844         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11845         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11846         block, so that we don't even try to compile it if settimeofday is
11847         available.  This works around a compilation failure on OSF1 V5.1,
11848         due to stime requiring a `long int*' while tv_sec is `int'.
11849
11850 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11851
11852         Sync from coreutils.
11853         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11854         against `yes', rather than just testing for nonempty.
11855
11856 2005-10-01  Simon Josefsson  <jas@extundo.com>
11857
11858         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11859         and Darwin.
11860
11861         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11862         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11863         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11864         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11865         Check if struct addrinfo is declared.
11866
11867 2005-10-01  Simon Josefsson  <jas@extundo.com>
11868
11869         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11870         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11871         AI_* and EAI_* definitions.  Protect function declarations.
11872
11873 2005-10-01  Jim Meyering  <jim@meyering.net>
11874
11875         Sync from coreutils.
11876
11877         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11878         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11879         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11880         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11881         in the inet and nsl libraries.  Required on Solaris 5.7.
11882
11883 2005-10-01  Jim Meyering  <jim@meyering.net>
11884
11885         Sync from coreutils.
11886         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11887         in the inet and nsl libraries.  Required on Solaris 5.7.
11888
11889 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11890
11891         * lib/getdelim.c (getdelim): Remove unused variables.
11892
11893 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11894
11895         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11896         so that the code works even with ancient cpp.  Portability problem
11897         with GCC 2.7.2.1 reported by Thomas M.Ott.
11898
11899 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11900
11901         * modules/regex (Depends-on): Add strcase.
11902
11903         * modules/gethostname (Licence): Change from GPL to LGPL, since
11904         gethostname.c is a trivial implementation of a standard library
11905         function.
11906         * modules/poll (License): Change from GPL to LGPL, since it's
11907         derived from LGPL code.
11908
11909 2005-09-27  Jim Meyering  <jim@meyering.net>
11910
11911         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11912         HAVE_CONFIG_H.
11913
11914         * lib/intprops.h (signed_type_or_expr__): Define.
11915         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
11916         for unsigned types.
11917
11918 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11919
11920         * lib/verify.h (verify_expr): Remove, replacing with:
11921         (verify_true): New macro that returns true instead of void.
11922         (verify_type__): Remove.
11923         (verify): Use verify_true rather than verify_type__.
11924
11925 2005-09-26  Bruno Haible  <bruno@clisp.org>
11926
11927         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
11928         is necessary.
11929         (lib_SOURCES): Remove mbchar.c.
11930         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
11931         (Files): Add m4/mbrtowc.m4.
11932         * modules/mbiter: Likewise.
11933         * modules/mbuiter: Likewise.
11934
11935 2005-09-26  Bruno Haible  <bruno@clisp.org>
11936
11937         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
11938         compile mbchar.c if they are not both present.
11939         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
11940         * m4/mbiter.m4 (gl_MBITER): Likewise.
11941         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
11942         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
11943         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
11944
11945 2005-09-25  Jim Meyering  <jim@meyering.net>
11946
11947         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
11948         also uses socklen_t.
11949
11950 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
11951
11952         * lib/utimens.c (ENOSYS): Define if not already defined.
11953         (futimens): Support having a null PATH if the file descriptor
11954         is nonnegative.
11955
11956         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
11957         Remove.
11958         (__attribute): Define to empty unless GCC 3.1 or later.
11959         This works around a core dump on OpenBSD 3.4, which has GCC
11960         2.95.3, which dumps core when given __attribute__(()).  It also
11961         simplifies other tests, since we really don't want to bother with
11962         worrying about which ancient version of GCC supported what.
11963         Original problem reported by Yoann Vandoorselaere, with part of
11964         the fix suggested by Derek Price.
11965
11966 2005-09-24  Jim Meyering  <jim@meyering.net>
11967
11968         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11969         so we can once again use a positive bitfield width of 1 -- now we
11970         don't have to explain why we were using a bitfield width of 2.
11971
11972 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11973
11974         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11975         and similarly for the other external symbols.  Problem reported
11976         by James Gallager.
11977
11978         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11979         bug reported by Jim Meyering.
11980
11981         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11982         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11983         not needed, since socklen is a prerequisite module.
11984
11985 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11986
11987         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11988         Problem reported by Eric Blake.
11989         (getaddrinfo): Initialize se so that it's not garbage.
11990         Redo internal storage allocation so that it doesn't make unportable
11991         assumptions about alignment.
11992         Fix a memory leak.
11993
11994         * lib/utimens.c (futimens): Use futimesat if available.
11995         Prefer it to futimes since it doesn't have the futimes bug.
11996
11997         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11998         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11999         Instead, declare a function that returns a pointer to an array,
12000         and use verify_type__ to declare the size of the array.
12001         Problem and germ of a solution reported by Bruno Haible.
12002         (verify_type__): Use 2, not 1, for bitfield size, to avoid
12003         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
12004
12005 2005-09-23  Jim Meyering  <jim@meyering.net>
12006
12007         Sync from coreutils.
12008         Correct build failure (socklen_t not defined) on at least
12009         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
12010         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
12011
12012 2005-09-23  Jim Meyering  <jim@meyering.net>
12013
12014         * modules/getaddrinfo (Depends-on): Add socklen.
12015
12016 2005-09-23  Bruno Haible  <bruno@clisp.org>
12017
12018         * tests/test-verify.c: New file.
12019
12020 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12021
12022         Sync from coreutils.
12023
12024         * modules/argmatch (Depends-on): Add verify.
12025         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
12026         unistd-safer.
12027         * modules/save-cwd (Depends-on): Likewise.
12028
12029         * modules/openat (Files): Add lib/openat-die.c.
12030         (Depends-on): Remove error, exitfail.
12031         Add dirname.
12032
12033         * modules/verify: New file.
12034         * MODULES.html.sh (Diagnostics <assert.h>): New section,
12035         with "verify" module.
12036
12037 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12038
12039         Sync from coreutils.
12040
12041         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
12042         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
12043         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
12044         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
12045         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
12046         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
12047         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
12048         Don't bother checking for string.h, stdlib.h, unistd.h.
12049         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
12050         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
12051         module's job.
12052         * m4/jm-macros.m4 (gl_MACROS): Likewise.
12053         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
12054
12055         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
12056         (gl_GETDATE): Use it.
12057
12058         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
12059
12060 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12061
12062         Sync from coreutils.
12063
12064         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
12065         stat-time.h.
12066         * lib/argmatch.h: Include verify.h
12067         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
12068         (ARGMATCH_ASSERT): Remove; unused.
12069         * lib/canonicalize.c: Assume STDC_HEADERS.
12070         * lib/exclude.c: Include "strcase.h".
12071         * lib/regex_internal.h [!defined _LIBC]: Likewise.
12072         * lib/getusershell.c: Include stdio--.h rather than stdio.h
12073         and stdio-safer.h.
12074         (getusershell): Call fopen, not fopen_safer.
12075         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
12076         Do not include unistd-safer.h.
12077         (save_cwd): Don't call fd_safer; no longer needed
12078         now that we include fcntl--.h.
12079
12080         * lib/getdate.y (relative_time): New type.
12081         (RELATIVE_TIME_0): New constant.
12082         (parser_control): Use relative_time instead of doing it ourselves.
12083         (%union): Add new relative_time rel member.
12084         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
12085         Now typeless.
12086         (relunit, relunit_snumber): Now of type rel.
12087         (zone, rel, relunit, get_date): Adjust to above changes.
12088
12089         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
12090         Do not include unistd-safer.h.
12091         (getloadavg): Don't call fd_safer; no longer needed
12092         now that we include fcntl--.h.
12093
12094         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
12095         (make_dir_parents): Treat ENOSYS like EEXIST.
12096
12097         Improve quality of diagnostics on restore_cwd failure.
12098         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
12099         (make_dir_parents): Last arg is now int * (for errno), not bool *.
12100         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
12101         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
12102         each time through the loop.  Do not diagnose restore_cwd failure;
12103         that is the caller's job (and perhaps the caller does not care).
12104
12105         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
12106         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
12107         If the file already exists but is not a directory, don't bother
12108         to try to make its parents.
12109         Close potential file descriptor leak if we can't chdir("/") (!).
12110         Don't always return true if chdir($PWD) fails; return true only
12111         if the requested action was done successfully (except for the
12112         chdir($PWD)).
12113         Don't log final directory unless we actually made it.
12114         Refactor to avoid duplicate code to fix up permissions.
12115         Don't attempt to fix up parent permissions if chdir($PWD) fails.
12116
12117         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
12118         to make it a bit faster and (I hope) clearer.
12119         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
12120         Fix bug in formats like %2N.
12121
12122         * lib/verify.h: New file.
12123
12124 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12125
12126         Sync from coreutils.
12127         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
12128
12129 2005-09-22  Jim Meyering  <jim@meyering.net>
12130
12131         Sync from coreutils.
12132
12133         * m4/lstat.m4 (gl_FUNC_LSTAT):
12134         Use AC_LIBSOURCES to require lstat.c and lstat.h.
12135         Remove obsolete comment.
12136         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
12137         * m4/xstrtod.m4: Likewise.
12138
12139         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
12140
12141 2005-09-22  Jim Meyering  <jim@meyering.net>
12142
12143         Sync from coreutils.
12144
12145         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
12146
12147         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
12148         the .tm_year member, since otherwise gcc-4.0 would now warn about
12149         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
12150
12151         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
12152         order to avoid an unsuppressible warning from gcc on 64-bit systems.
12153
12154         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
12155         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
12156         when run in a time zone for which daylight savings time is in effect
12157         for the starting date.
12158
12159         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
12160         stop us from restricting permissions of just-created absolute-named
12161         directories.
12162         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
12163         to restore initial working directory.
12164         * lib/mkdir-p.c (make_dir_parents): New parameter:
12165         different_working_dir, to tell caller if/when we change the working
12166         directory and are unable to return to the initial one.
12167         * lib/mkdir-p.h (make_dir_parents): Update prototype.
12168         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
12169         `return false'.  This fixes a bug introduced on 2004-07-30.
12170
12171         * lib/openat.c (fdopendir): Be sure to close the supplied
12172         file descriptor before returning.  This makes our replacement
12173         implementation a little closer to Solaris's, where fdopendir
12174         ties the file descriptor to the returned DIR* pointer.
12175         * lib/openat.c (unlinkat): New function.
12176         * lib/openat.h (unlinkat): Add prototype.
12177         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
12178         (openat_restore_fail): Rename from openat_restore_die.
12179         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
12180
12181         Provide an alternative to exiting immediately upon save_cwd or
12182         restore_cwd failure.  Now, an application can arrange e.g.,
12183         to perform a longjump in that case.
12184         * lib/openat.c: Include dirname.h.
12185         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
12186         (rpl_openat, fdopendir, fstatat): Call openat_save_die
12187         and openat_restore_die rather than calling error directly.
12188         Don't include "error.h" or "exitfail.h"; they're no longer needed.
12189
12190         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
12191         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
12192         define.
12193
12194         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
12195         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
12196                             int utc, int nanoseconds);
12197         Background:
12198         date should not have to allocate a megabyte of virtual memory to
12199         handle a format argument like +%1048575T.  When implemented with
12200         strftime, it must allocate such a buffer, use strftime to fill it
12201         in, print it, then free it.
12202         With fprintftime, it simply prints everything and exits.
12203         With no need for memory allocation, that's one fewer way to fail.
12204         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
12205         optional field width, not before, so we accept %9:z, not %:9z.
12206         (my_strftime): Be sure to use L_('x') for literals.
12207
12208         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
12209         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
12210         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
12211         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
12212         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
12213         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
12214         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
12215         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
12216         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
12217         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
12218         * lib/xgethostname.c, lib/xreadlink.c:
12219         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
12220
12221         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
12222         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
12223         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
12224         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12225         and don't include <sys/file.h>).
12226
12227 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
12228
12229         Sync from coreutils.
12230
12231         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
12232         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
12233         [!LDAV_DONE]: Avoid unused variable warning.
12234
12235 2005-09-21  Bruno Haible  <bruno@clisp.org>
12236
12237         * lib/unicodeio.h (unicode_to_mb): New declaration.
12238
12239 2005-09-20  Derek Price  <derek@ximbiot.com>
12240
12241         * lib/getaddrinfo.c: Don't include <netdb.h> included from
12242         getaddrinfo.h.
12243
12244 2005-09-20  Bruno Haible  <bruno@clisp.org>
12245
12246         * gnulib-tool: Remove trailing slashes from the values specified for
12247         --source-base, --m4-base, --tests-base, --aux-dir.
12248         Suggested by Simon Josefsson <jas@extundo.com>.
12249
12250 2005-09-20  Bruno Haible  <bruno@clisp.org>
12251
12252         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
12253         func_modules_to_filelist, func_import, func_create_testdir): Make all
12254         sorting results locale-independent, so that gnulib-cache.m4 doesn't
12255         change when gnulib-tool is invoked in a different locale.
12256
12257 2005-09-19  Simon Josefsson  <jas@extundo.com>
12258
12259         * m4/socklen.m4: Fix typo.
12260
12261 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12262
12263         Use a consistent style for including <config.h>.
12264         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
12265         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
12266         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
12267         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
12268         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
12269         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
12270         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
12271         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
12272         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
12273         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
12274         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
12275         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
12276         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
12277         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
12278         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
12279         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
12280         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
12281         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
12282         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
12283         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
12284         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
12285         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
12286         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
12287         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
12288         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
12289         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
12290         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
12291         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
12292         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
12293         lib/xstrtoumax.c, lib/yesno.c:
12294         Standardize inclusion of config.h.
12295         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
12296         lib/inttostr.h:  Removed inclusion of config.h from header files.
12297         * lib/inttostr.c:  Adjusted in-tree users.
12298         * lib/timespec.h: Remove superfluous warning to include config.h.
12299         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
12300         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
12301         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
12302         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
12303         config.h with HAVE_CONFIG_H.
12304
12305 2005-09-19  Jim Meyering  <jim@meyering.net>
12306
12307         * modules/pathmax (License): Change to LGPL.
12308
12309 2005-09-19  Derek Price  <derek@ximbiot.com>
12310
12311         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
12312
12313 2005-09-19  Bruno Haible  <bruno@clisp.org>
12314
12315         * gnulib-tool (import): Provide default for --tests-base.
12316
12317 2005-09-19  Bruno Haible  <bruno@clisp.org>
12318
12319         * doc/quote.texi: New file, extracted from gnulib.texi.
12320         * doc/ctime.texi: New file, extracted from gnulib.texi.
12321         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
12322         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
12323         * doc/gnulib.texi: Include them.
12324
12325 2005-09-18  Bruno Haible  <bruno@clisp.org>
12326
12327         Portability fix.
12328         * gnulib-tool (func_readlink): New function.
12329         (func_ln_if_changed): Use it.
12330
12331 2005-09-18  Bruno Haible  <bruno@clisp.org>
12332
12333         * gnulib-tool: Support --with-tests also with --import.
12334         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
12335         (func_import): Use variables $testsbase and $inctests. Emit a
12336         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
12337         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
12338         SUBDIRS += $testsdir.
12339         (func_create_testdir): Update.
12340
12341 2005-09-18  Bruno Haible  <bruno@clisp.org>
12342
12343         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
12344         instead of $dry_run.
12345         (func_cp_if_changed, func_mv_if_changed): Remove functions.
12346         (func_ln_if_changed): Don't handle dry-run here.
12347         (func_import): In dry-run mode, detect more precisely which actions
12348         would be performed, and don't use "...ing" verbs.
12349
12350 2005-09-18  Bruno Haible  <bruno@clisp.org>
12351
12352         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
12353         (func_import): Use join on two temporary files instead of three nested
12354         loops, in order to determine which files are new or old.
12355
12356 2005-09-18  Bruno Haible  <bruno@clisp.org>
12357
12358         * gnulib-tool (func_import): Comment out code that spits out the
12359         new files with --dry-run.
12360
12361 2005-09-18  Bruno Haible  <bruno@clisp.org>
12362
12363         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
12364
12365 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12366
12367         * lib/stat-time.h: New file.
12368         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
12369         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
12370         in a different way.
12371         (timespec_cmp): New function.
12372         * lib/utimecmp.c: Include stat-time.h.
12373         (SYSCALL_RESOLUTION): Depend on whether various struct stat
12374         members exist, not on the obsolescent ST_MTIM_NSEC.
12375         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
12376
12377 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12378
12379         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
12380
12381 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12382
12383         * MODULES.html.sh (File system functions): Add stat-time.
12384         * modules/stat-time: New file.
12385         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12386         is now done in a different way, by the stat-time module.
12387         * modules/utimecmp (Depends-on): Add stat-time.
12388
12389 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12390
12391         * m4/st_mtim.m4: Remove.  Superseded by...
12392         * m4/stat-time.m4: New file.
12393         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12394         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12395
12396 2005-09-15  Derek Price  <derek@ximbiot.com>
12397
12398         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12399
12400 2005-09-15  Derek Price  <derek@ximbiot.com>
12401
12402         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12403         * lib/regex_internal.c: Ditto, using this...
12404         (__GNUC_PREREQ): ...new macro.
12405         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12406         using...
12407         (__GNUC_PREREQ): ...this new macro.
12408
12409         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12410
12411 2005-09-15  Derek Price  <derek@ximbiot.com>
12412             Paul Eggert  <eggert@cs.ucla.edu>
12413
12414         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12415         changes, consolidating in...
12416         * lib/regex_internal.h: ...this file.
12417
12418 2005-09-13  Jim Meyering  <jim@meyering.net>
12419
12420         * lib/canon-host.c: Filter through gnu indent and reword comments
12421         slightly.
12422         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12423
12424 2005-09-13  Derek Price  <derek@ximbiot.com>
12425
12426         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12427         failure.
12428         Reported by Jim Meyering  <jim@meyering.net>.
12429
12430 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12431
12432         * lib/base64.c: Typo.
12433         (base64_encode): Put b64str in initialized data section.
12434
12435 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12436
12437         Merge glibc and coreutils changes into gnulib, plus a few
12438         extra fixes.
12439         * lib/md5.c: Use #error rather than a string.
12440         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12441         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12442         (__attribute__): Define to empty for non recent-GCC.
12443         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12444         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12445         Renamed from their non-__ counterparts, with new macros replacing
12446         them if not _LIBC.  Add __THROW attribute.
12447         (rol): Remove.
12448         (struct md5_ctx): Align buffer if using GCC.
12449         * lib/sha1.h (struct sha1_ctx): Likewise.
12450         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12451         The old name was backwards.
12452         (NOTSWAP): Remove; not used.
12453         (rol): New macro, moved here from md5.h.
12454         (sha1_process_block): Remove a FIXME that doesn't make sense.
12455
12456 2005-09-12  Derek Price  <derek@ximbiot.com>
12457
12458         Return usable errors from canon-host.
12459         * lib/canon-host.h: New file.
12460         * lib/canon-host.c (canon_host): Wrap...
12461         (canon_host_r): ...this new function, which now relies exclusively on
12462         getaddrinfo.
12463         (ch_strerror): New function.
12464         (last_cherror): New global.
12465         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12466         interface.
12467         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12468         void *.
12469         (freeaddrinfo): Free ai->ai_canonname when set.
12470
12471 2005-09-12  Derek Price  <derek@ximbiot.com>
12472
12473         Make canon-host require getaddrinfo.
12474         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12475         AC_LIBSOURCE canon-host.h.  Call...
12476         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12477         gl_GETADDRINFO.
12478         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12479
12480 2005-09-12  Derek Price  <derek@ximbiot.com>
12481
12482         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12483         LGPL.
12484         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12485
12486 2005-09-12  Derek Price  <derek@ximbiot.com>
12487
12488         * lib/gai_strerror.c: Include config.h when available.  Include
12489         getaddrinfo.h before other headers to test interface.
12490         Reported by Larry Jones <lawrence.jones@ugs.com>.
12491
12492 2005-09-12  Derek Price  <derek@ximbiot.com>
12493             Paul Eggert  <eggert@cs.ucla.edu>
12494
12495         * modules/glob (Files): Add glob-libc.h.
12496
12497 2005-09-12  Derek Price  <derek@ximbiot.com>
12498             Paul Eggert  <eggert@cs.ucla.edu>
12499
12500         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12501         glob_.h, glob-libc.h.
12502         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12503
12504 2005-09-12  Derek Price  <derek@ximbiot.com>
12505             Paul Eggert  <eggert@cs.ucla.edu>
12506
12507         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12508         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12509         protecting things that should be done only in gnulib contexts.
12510         * lib/glob_.h: New file, containing only the glob things needed for
12511         gnulib.
12512         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12513         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12514         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12515         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12516         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12517         and to respect the namespace rules better.
12518
12519 2005-09-08  Simon Josefsson  <jas@extundo.com>
12520
12521         * modules/socklen: New file.
12522
12523 2005-09-08  Simon Josefsson  <jas@extundo.com>
12524
12525         * m4/socklen.m4: New file.
12526
12527 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12528
12529         * modules/utimens (Files): Add m4/utimbuf.m4, since
12530         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12531         Reported by Sergey Poznyakoff.
12532
12533 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12534
12535         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12536         definitions, since that's the preferred style in glibc.
12537         Fix a minor spacing issue, and update copyright notice to match
12538         glibc's.
12539
12540 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12541
12542         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12543
12544 2005-09-06  Simon Josefsson  <jas@extundo.com>
12545
12546         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12547         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12548
12549 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12550
12551         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12552         warning.
12553
12554 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12555
12556         * config/srclist.txt: Add glibc bug 1302.
12557
12558 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12559
12560         Change bitset word type from unsigned int to unsigned long int,
12561         as this has better performance on typical 64-bit hosts.
12562         Port bitset code to hosts with unusual word sizes.
12563         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12564         (build_collating_symbol):
12565         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12566         argument is a bitset.  This is merely a style issue, but it makes
12567         it clearer that an entire array is expected.
12568         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12569         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12570         Port to the case where bitset_word is not the same as unsigned int.
12571         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12572         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12573         Likewise.
12574         * lib/regexec.c (check_dst_limits_calc_pos_1,
12575         check_subexp_matching_top):
12576         (build_trtable, group_nodes_into_DFAstates):
12577         Likewise.
12578         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12579         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12580         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12581         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12582         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12583         * lib/regcomp.c (optimize_subexps, lower_subexp):
12584         Work even if bitset_word has holes in its bitwise representation.
12585         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12586         * lib/regexec.c (check_dst_limits_calc_pos_1,
12587         check_subexp_matching_top):
12588         Likewise.
12589         * lib/regex_internal.c (re_string_reconstruct):
12590         Don't assume UCHAR_MAX == 255.
12591         * lib/regex_internal.h (bitset_set_all): Likewise.
12592         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12593         All uses changed.
12594         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12595         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12596         All uses changed.
12597         (BITSET_WORD_MAX): New macro.
12598         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12599         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12600         (bitset_empty, bitset_copy):
12601         Prefer sizeof (bitset) to multiplying it out ourselves.
12602         (bitset_not_merge): Remove; unused.
12603         (bitset_contain): Return bool, not unsigned int with one bit on.
12604         All callers changed.
12605         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12606         alignment than re_node_set; do this by defining a new internal
12607         type struct dests_alloc and using it to allocate memory.
12608
12609 2005-09-05  Bruno Haible  <bruno@clisp.org>
12610
12611         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12612         links.
12613
12614 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12615
12616         * modules/size_max (Makefile.am): Add size_max.h
12617
12618 2005-09-04  Derek Price  <derek@ximbiot.com>
12619
12620         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12621
12622 2005-09-03  Simon Josefsson  <jas@extundo.com>
12623
12624         * gnulib-tool: Fix typo.
12625
12626 2005-09-03  Simon Josefsson  <jas@extundo.com>
12627
12628         * config/srclist.txt: Add glibc bug 1293.
12629
12630 2005-09-03  Derek Price  <derek@ximbiot.com>
12631
12632         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12633         From Larry Jones <lawrence.jones@ugs.com>.
12634
12635 2005-09-02  Simon Josefsson  <jas@extundo.com>
12636
12637         * modules/socklen: New file.
12638
12639 2005-09-02  Simon Josefsson  <jas@extundo.com>
12640
12641         * modules/havelib: New module.
12642
12643         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12644         Use havelib.
12645
12646 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12647
12648         Check for arithmetic overflow when calculating sizes, to prevent
12649         some buffer-overflow issues.  These patches are conservative, in the
12650         sense that when I couldn't determine whether an overflow was possible,
12651         I inserted a run-time check.
12652         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12653         macros.
12654         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12655         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12656         (re_xnrealloc, re_x2nrealloc): New inline functions.
12657         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12658         parse_bracket_exp):
12659         (build_equiv_class, build_charclass): Check for arithmetic overflow
12660         in size expression calculations.
12661         * lib/regex_internal.c (re_string_realloc_buffers):
12662         (build_wcs_upper_buffer, re_node_set_add_intersect):
12663         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12664         (re_dfa_add_node, register_state): Likewise.
12665         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12666         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12667         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12668         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12669
12670 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12671
12672         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12673         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12674
12675 2005-09-02  Bruno Haible  <bruno@clisp.org>
12676
12677         Support for lib vs. lib64 distinction on biarch platforms.
12678         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12679         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12680         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12681
12682 2005-09-02  Bruno Haible  <bruno@clisp.org>
12683
12684         * gnulib-tool (import): In the other first-use case, provide defaults
12685         as well.
12686
12687 2005-09-02  Bruno Haible  <bruno@clisp.org>
12688
12689         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12690         patches not yet found in the latest gettext release.
12691
12692 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12693
12694         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12695         to avoid a collision with bits/local_lim.h in glibc.
12696         All uses changed.  Problem reported by Dmitry V. Levin in
12697         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12698
12699         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12700         bugs in int versus size_t comparisons.
12701         (re_string_context_at): Fix bug where the code assumed that
12702         Idx is signed.
12703
12704         Use bool where appropriate.
12705         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12706         All callers changed.
12707         (calc_eclosure_iter): Likewise, for ROOT arg.
12708         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12709         (build_charclass_op): Likewise, for NON_MATCH arg.
12710         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12711         (re_string_construct_common): Likewise, for ICASE arg.
12712         * lib/regexec.c (re_search_2_stub, re_search_stub):
12713         Likewise, for RET_LEN arg.
12714         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12715         (set_regs): Likewise, for FL_BACKTRACK arg.
12716         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12717         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12718         (calc_eclosure_iter, parse_bracket_exp):
12719         Use bool for internal variables that are booleans.
12720         * lib/regexec.c (re_search_internal, check_matching,
12721         proceed_next_node):
12722         (set_regs, build_sifted_states, sift_states_bkref):
12723         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12724         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12725         (find_collation_sequence_value):
12726         Likewise.
12727         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12728         (re_node_set_compare):
12729         Return bool, not int. All callers changed.
12730         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12731         (build_trtable, check_node_accept): Likewise.
12732         * lib/regex_internal.h: Include stdbool.h.
12733
12734         Fix bugs uncovered when converting to bool.
12735         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12736         failure instead of charging ahead blindly.
12737         * lib/regex_internal.c (register_state): Likewise.
12738         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12739         for freeing internal storage.
12740         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12741         bitset pieces used as boolean, to avoid undefined behavior
12742         on hosts that do int overflow checking.
12743
12744 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12745
12746         * config/srclist.txt: Add glibc bugs 1285-1287.
12747
12748 2005-09-01  Jim Meyering  <jim@meyering.net>
12749
12750         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12751         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12752         Require gl_STAT_MACROS, too.
12753
12754 2005-09-01  Bruno Haible  <bruno@clisp.org>
12755
12756         * gnulib-tool (import): In the first-use case, provide defaults.
12757
12758 2005-09-01  Bruno Haible  <bruno@clisp.org>
12759
12760         * gnulib-tool (func_import): Remove the .tmp files.
12761
12762 2005-09-01  Bruno Haible  <bruno@clisp.org>
12763
12764         * gnulib-tool (func_import): Fix handling of symbolic links.
12765
12766 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12767
12768         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12769         old glibc regex code mishandles strings longer than 2**31 bytes.
12770         This patch fixes this when the regex code is used in gnulib
12771         (i.e., outside glibc).
12772
12773         This patch should not affect the use of the regex code inside
12774         glibc.  No doubt this problem also needs to be handled for glibc
12775         as well, but the result will be an incompatible change to the
12776         glibc ABI, and the old ABI will have to be supported too.  That
12777         can be the the subject for another patch.
12778
12779         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12780         governing whether the rest of this patch is active.  By default,
12781         the macro is disabled and the patch has no effect.
12782         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12783         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12784         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12785         (re_match_2, re_set_registers): Use the new types.
12786         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12787         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12788         New macros.
12789         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12790         (re_string_context_at, bin_tree_t, re_dfastate_t):
12791         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12792         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12793         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12794         (re_string_char_size_at, re_string_wchar_at):
12795         (re_string_elem_size_at):
12796         Use the new types and macros to port to 64-bit hosts.
12797         Use unsigned types for internal values, so that the code
12798         mostly works even for arrays larger than SSIZE_MAX.
12799         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12800         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12801         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12802         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12803         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12804         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12805         (calc_inveclosure, parse_dup_op, build_range_exp):
12806         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12807         (fetch_number, create_token_tree, mark_opt_subexp):
12808         Likewise.
12809         * lib/regex_internal.c (re_string_construct_common,
12810         create_ci_newstate):
12811         (create_cd_newstate, re_string_allocate, re_string_construct):
12812         (re_string_realloc_buffers, build_wcs_upper_buffer):
12813         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12814         (re_string_reconstruct, re_string_peek_byte_case):
12815         (re_string_fetch_byte_case, re_string_context_at):
12816         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12817         (re_node_set_init_copy, re_node_set_add_intersect):
12818         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12819         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12820         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12821         (re_acquire_state, re_acquire_state_context, register_state):
12822         Likewise.
12823         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12824         search_cur_bkref_entry):
12825         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12826         (re_search_internal, re_search_2_stub, re_search_stub)
12827         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12828         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12829         (update_cur_sifted_state, check_dst_limits):
12830         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12831         (check_subexp_limits, sift_states_bkref, merge_state_array):
12832         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12833         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12834         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12835         (expand_bkref_cache, check_node_accept_bytes):
12836         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12837         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12838         (acquire_init_state_context, check_halt_node_context):
12839         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12840         (sift_states_backward, clean_state_log_if_needed):
12841         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12842         (find_recover_state, transit_state_sb, transit_state_mb):
12843         (transit_state_bkref, build_trtable, match_ctx_clean):
12844         Likewise.
12845         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12846         to work around an assumption that REG_MISSING is negative.
12847
12848         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12849         (seek_collating_symbol_entry) [defined _LIBC]:
12850         (lookup_collation_sequence_value) [defined _LIBC]:
12851         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12852         Use prototypes rather than old-style function definitions.
12853         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12854         (transit_state_sb) [0]:
12855         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12856
12857         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12858         rm_eo.
12859
12860         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12861         (optimize_subexps, lower_subexp):
12862         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12863         since the signed shift might overflow.  Use 1u<<31 instead.
12864         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12865         Likewise.
12866         * lib/regexec.c (check_dst_limits_calc_pos_1,
12867         check_subexp_matching_top): Likewise.
12868
12869         * lib/regcomp.c (optimize_subexps, lower_subexp):
12870         Use CHAR_BIT rather than 8, for clarity.
12871         * lib/regexec.c (check_dst_limits_calc_pos_1):
12872         (check_subexp_matching_top): Likewise.
12873         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12874         have to worry about portability issues when shifting it left.
12875         Remove no-longer-needed test for table_size > 0.
12876         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12877         in a word, as the resulting behavior is undefined.
12878         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12879         in one case, a <= should have been an <, and in another case the
12880         whole test was missing.
12881         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12882         the standard name CHAR_BIT.
12883         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12884         this is not true on one's complement and signed-magnitude hosts.
12885
12886         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12887         next_last_offset.
12888         (struct re_dfa_t): Remove unused member states_alloc.
12889         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12890
12891 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12892
12893         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12894         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12895         and large-file glibc and in 32-bit large-file Solaris.
12896
12897 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12898
12899         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12900         lengths fit in regoff_t; this isn't true if regoff_t is the same
12901         width as size_t.
12902         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12903         (= START + RANGE) instead of RANGE.  This avoids overflow
12904         problems when regoff_t is the same width as size_t.
12905         All callers changed.
12906         (re_search_2_stub): Check for overflow when adding the
12907         sizes of the two strings.
12908         (re_search_stub): Check for overflow when adding START
12909         to RANGE; if it occurs, substitute the extreme value.
12910
12911 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12912
12913         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
12914
12915 2005-08-31  Jim Meyering  <jim@meyering.net>
12916
12917         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
12918         a pointer-to-const.
12919         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
12920         (register_state): Likewise.
12921         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
12922         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12923         (group_nodes_into_DFAstates): Likewise.
12924
12925 2005-08-31  Jim Meyering  <jim@meyering.net>
12926
12927         * check-module: Add a FIXME comment.
12928
12929 2005-08-31  Eric Blake  <ebb9@byu.net>
12930
12931         * modules/unistd-safer (Files): Add unistd--.h.
12932         * modules/stdio-safer (Files): Add stdio--.h.
12933
12934 2005-08-31  Derek Price  <derek@ximbiot.com>
12935
12936         * lib/getdelim.c (getdelim): Return EOF on EOF.
12937         Reported by Larry Jones <lawrence.jones@ugs.com>.
12938
12939 2005-08-31  Bruno Haible  <bruno@clisp.org>
12940
12941         Avoid unnecessary diffs in the generated lib/Makefile.am.
12942         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
12943         the generated files.
12944         (func_import): Don't set cmd.
12945
12946 2005-08-31  Bruno Haible  <bruno@clisp.org>
12947
12948         * lib/strstr.c: Include <stddef.h>, for NULL.
12949         * lib/strcasestr.c: Likewise.
12950         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
12951
12952 2005-08-31  Bruno Haible  <bruno@clisp.org>
12953
12954         * gnulib-tool: New option --macro-prefix.
12955         (func_import): Use macro_prefix.
12956         (import): Handle option --macro-prefix.
12957
12958 2005-08-31  Bruno Haible  <bruno@clisp.org>
12959
12960         * gnulib-tool (import): Rename most ac_* variables to cached_*.
12961         Also use new variables cached_lgpl, cached_libtool.
12962
12963 2005-08-31  Bruno Haible  <bruno@clisp.org>
12964
12965         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
12966         always instantiating them.
12967
12968 2005-08-31  Bruno Haible  <bruno@clisp.org>
12969
12970         * gnulib-tool (func_import): Read the previous cached settings
12971         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12972         earlier added by gnulib but are now dropped. Warn when a gnulib file
12973         overwrites a non-gnulib file.
12974
12975 2005-08-31  Bruno Haible  <bruno@clisp.org>
12976
12977         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12978         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12979         projects that don't keep autogenerated files in CVS. Put into
12980         actioncmd only the specified modules, not the transitive closure.
12981
12982 2005-08-31  Bruno Haible  <bruno@clisp.org>
12983
12984         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12985         Create directories that shall be filled.
12986         (import): Don't look for gl_* macros in configure.ac. Recurse across
12987         all directories containing a gnulib-cache.m4 files, if meaningful.
12988
12989 2005-08-31  Bruno Haible  <bruno@clisp.org>
12990
12991         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12992         (import): Set seen_libtool when we see gl_LIBTOOL.
12993
12994 2005-08-31  Bruno Haible  <bruno@clisp.org>
12995
12996         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12997         declaration macro definitions from generated gnulib.m4.
12998
12999 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
13000
13001         * lib/iconvme.h: Add prototype for iconv_alloc.
13002
13003 2005-08-29  Simon Josefsson  <jas@extundo.com>
13004
13005         * lib/iconvme.c: Fix errno.
13006
13007 2005-08-29  Bruno Haible  <bruno@clisp.org>
13008
13009         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
13010         that it works when the directory contains spaces.
13011
13012 2005-08-29  Bruno Haible  <bruno@clisp.org>
13013
13014         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
13015
13016 2005-08-29  Bruno Haible  <bruno@clisp.org>
13017
13018         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
13019         Emit more advice.
13020
13021 2005-08-29  Bruno Haible  <bruno@clisp.org>
13022         and Stepan Kasal  <kasal@ucw.cz>
13023
13024         * check-module: If more parameters are given, check each of them
13025         separately; add more exceptions, as noted by Jim Meyering.
13026         (check_module): New procedure.
13027         (%exempt_header): Now contains all exceptions.
13028
13029 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
13030
13031         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
13032
13033 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13034
13035         * lib/iconvme.c: Split iconv_string into iconv_alloc.
13036
13037 2005-08-28  Bruno Haible  <bruno@clisp.org>
13038
13039         * m4/gnulib-tool.m4: New file.
13040
13041 2005-08-27  Jim Meyering  <jim@meyering.net>
13042
13043         * modules/unistd-safer (Files): Add pipe-safer.c.
13044         * modules/fcntl-safer (Files): Add creat-safer.c.
13045
13046 2005-08-27  Jim Meyering  <jim@meyering.net>
13047
13048         * m4/stdlib-safer.m4: New file.  From coreutils.
13049         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
13050         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
13051         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
13052         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
13053         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
13054
13055 2005-08-27  Jim Meyering  <jim@meyering.net>
13056
13057         * lib/fopen-safer.c: Merge minor changes from coreutils.
13058         * lib/dup-safer.c: Likewise.
13059         * lib/fd-safer.c: Likewise.
13060
13061         Merge from coreutils.
13062         * lib/stdio--.h: New file.
13063         * lib/stdlib--.h: New file.
13064         * lib/mkstemp-safer.c: New file.
13065
13066         GNU tar needs these.
13067         * lib/pipe-safer.c: New file.
13068         * lib/creat-safer.c: New file.
13069         * lib/fcntl--.h (creat): Define to creat_safer.
13070         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
13071         * lib/unistd--.h (pipe): Define to pipe_safer.
13072         * lib/unistd-safer.h: Declare pipe_safer.
13073
13074 2005-08-26  Simon Josefsson  <jas@extundo.com>
13075
13076         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
13077         Haible <bruno@clisp.org>.
13078
13079 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
13080
13081         * lib/regex_internal.h: Remove all references to
13082         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
13083         or better.
13084         (bitset_not, bitset_merge, bitset_not_merge):
13085         (bitset_mask, re_string_allocate, re_string_construct):
13086         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
13087         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
13088         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
13089         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
13090         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13091         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13092         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
13093         (re_acquire_state_context):
13094         Remove unnecessary forward decls.
13095         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
13096         Put __attribute at function definition,
13097         now that the function decl has been removed.
13098         * lib/regex_internal.c (re_string_peek_byte_case):
13099         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
13100         Likewise.
13101
13102 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
13103
13104         * m4/regex.m4: Add AC_PREREQ(2.50).
13105         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
13106
13107 2005-08-25  Simon Josefsson  <jas@extundo.com>
13108
13109         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
13110         __fsetlocking.
13111
13112 2005-08-25  Simon Josefsson  <jas@extundo.com>
13113
13114         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
13115         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
13116         GLIBC specific code.
13117
13118 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13119
13120         Make regex safe for g++.  This fixes one real bug (an "err"
13121         that should have been "*err").  g++ problem reported by
13122         Sam Steingold.
13123         * lib/regex_internal.h (re_calloc): New macro, consistent with
13124         re_malloc etc.  All callers of calloc changed to use re_calloc.
13125         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
13126         not int.  All callers changed.
13127         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
13128         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
13129         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
13130         (find_recover_state): Change "err" to "*err"; this fixes what
13131         appears to be a real bug.
13132         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
13133         versus int.
13134
13135 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13136
13137         * modules/regex (Depends-on): Add malloc, since the code
13138         assumes that !malloc(0) means failure.
13139
13140 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13141
13142         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
13143
13144         alloca modernization/simplification for regex.
13145         * lib/regex.c: Remove portability cruft for alloca.  This no longer
13146         needs to be at the start of the file, and can be moved into
13147         regex_internal.h and simplified.
13148         * lib/regex_internal.h: Include <alloca.h>.
13149         (__libc_use_alloca) [!defined _LIBC]: New macro.
13150         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
13151         now works outside glibc.
13152
13153 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13154
13155         * config/srclist.txt: Add glibc bugs 1241, 1245.
13156
13157 2005-08-25  Jim Meyering  <jim@meyering.net>
13158
13159         * lib/open-safer.c: Include <config.h>.
13160         Otherwise, we'd lose LARGEFILE support in any file using
13161         e.g. "fcntl--.h"
13162
13163 2005-08-25  Bruno Haible  <bruno@clisp.org>
13164
13165         * m4/minmax.m4: Require autoconf 2.52.
13166         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
13167         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
13168         alternatives of translit over the alphabet.
13169         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
13170
13171 2005-08-24  Simon Josefsson  <jas@extundo.com>
13172
13173         * tests/test-getpass.c: New file.
13174
13175 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13176
13177         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
13178         for GNU regex features.
13179
13180 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13181
13182         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
13183         * lib/regex.h (regerror): Likewise.
13184
13185         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
13186         requires this.  (The code never needed it.)
13187
13188         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
13189         All uses of recently-renamed identifiers changed to use the new,
13190         POSIX-compliant names.  The code will build and run just fine
13191         without these changes, but it's better to eat our own dog food
13192         and use the standard-conforming names.
13193
13194         * lib/regex.h: Fix a multitude of POSIX name space violations.
13195         These changes have an effect only for programs that define
13196         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
13197         do not change anything for programs compiled in the normal way.
13198         Also, there is no effect on the ABI.
13199
13200         (_REGEX_SOURCE): New macro.
13201         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
13202         defined and _GNU_SOURCE is not; this fixes a name space violation.
13203
13204         Rename the following macros to obey POSIX requirements.
13205         The old names are still visible as macros if _REGEX_SOURCE is defined.
13206         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
13207         RE_BACKSLASH_ESCAPE_IN_LISTS.
13208         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
13209         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
13210         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
13211         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
13212         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
13213         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
13214         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
13215         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
13216         (REG_INTERVALS): renamed from RE_INTERVALS.
13217         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
13218         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
13219         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
13220         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
13221         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
13222         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
13223         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
13224         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
13225         RE_UNMATCHED_RIGHT_PAREN_ORD.
13226         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
13227         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
13228         (REG_DEBUG): renamed from RE_DEBUG.
13229         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
13230         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
13231         unusual, since we can't clash with the POSIX REG_ICASE.
13232         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
13233         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
13234         (REG_NO_SUB): renamed from RE_NO_SUB.
13235         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
13236         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
13237         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
13238         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
13239         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
13240         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
13241         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
13242         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
13243         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
13244         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
13245         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
13246         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
13247         RE_SYNTAX_POSIX_MINIMAL_BASIC.
13248         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
13249         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
13250         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
13251         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
13252         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
13253         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
13254         (REG_FIXED): Renamed from REGS_FIXED.
13255         (REG_NREGS): Renamed from RE_NREGS.
13256
13257         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
13258         of other REG_* macros, since POSIX says the user is allowed to
13259         #undef these macros selectively.
13260
13261         (reg_errcode_t): Update comment stating what other tables need
13262         to be consistent.
13263
13264         Rename the following enum values to obey POSIX requirements.
13265         The old names are still visible as macros.
13266         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
13267         is not defined, since GNU is supposed to be a superset of POSIX as
13268         much as possible, and since we want reg_errcode_t to be a signed
13269         type for implementation consistency.
13270         (_REG_NOERROR): Renamed from REG_NOERROR.
13271         (_REG_NOMATCH): Renamed from REG_NOMATCH.
13272         (_REG_BADPAT): Renamed from REG_BADPAT.
13273         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
13274         (_REG_ECTYPE): Renamed from REG_ECTYPE.
13275         (_REG_EESCAPE): Renamed from REG_EESCAPE.
13276         (_REG_ESUBREG): Renamed from REG_ESUBREG.
13277         (_REG_EBRACK): Renamed from REG_EBRACK.
13278         (_REG_EPAREN): Renamed from REG_EPAREN.
13279         (_REG_EBRACE): Renamed from REG_EBRACE.
13280         (_REG_BADBR): Renamed from REG_BADBR.
13281         (_REG_ERANGE): Renamed from REG_ERANGE.
13282         (_REG_ESPACE): Renamed from REG_ESPACE.
13283         (_REG_BADRPT): Renamed from REG_BADRPT.
13284         (_REG_EEND): Renamed from REG_EEND.
13285         (_REG_ESIZE): Renamed from REG_ESIZE.
13286         (_REG_ERPAREN): Renamed from REG_ERPAREN.
13287         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
13288         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
13289         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
13290         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
13291
13292         (_REG_RE_NAME, _REG_RM_NAME): New macros.
13293         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
13294         changed.  But support the old name if the new one is not defined
13295         and if _REGEX_SOURCE.
13296
13297         Change the following member names in struct re_pattern_buffer.
13298         The old names are still supported if !_REGEX_SOURCE.
13299         The new names are always supported, regardless of _REGEX_SOURCE.
13300         (re_buffer): Renamed from buffer.
13301         (re_allocated): Renamed from allocated.
13302         (re_used): Renamed from used.
13303         (re_syntax): Renamed from syntax.
13304         (re_fastmap): Renamed from fastmap.
13305         (re_translate): Renamed from translate.
13306         (re_can_be_null): Renamed from can_be_null.
13307         (re_regs_allocated): Renamed from regs_allocated.
13308         (re_fastmap_accurate): Renamed from fastmap_accurate.
13309         (re_no_sub): Renamed from no_sub.
13310         (re_not_bol): Renamed from not_bol.
13311         (re_not_eol): Renamed from not_eol.
13312         (re_newline_anchor): Renamed from newline_anchor.
13313
13314         Change the following member names in struct re_registers.
13315         The old names are still supported if !_REGEX_SOURCE.
13316         The new names are always supported, regardless of _REGEX_SOURCE.
13317         (rm_num_regs): Renamed from num_regs.
13318         (rm_start): Renamed from start.
13319         (rm_end): Renamed from end.
13320
13321         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
13322         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
13323         Prepend __ to parameter names.
13324
13325         Undo yesterday's changes.
13326
13327 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13328
13329         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
13330         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
13331         lib/regex.c.
13332
13333 2005-08-24  Jim Meyering  <jim@meyering.net>
13334
13335         Sync from coreutils.
13336         * m4/fcntl-safer.m4: New file.
13337
13338         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
13339         and object files for this module.
13340
13341 2005-08-24  Jim Meyering  <jim@meyering.net>
13342
13343         Sync from coreutils.
13344         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
13345
13346 2005-08-24  Jim Meyering  <jim@meyering.net>
13347
13348         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
13349         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
13350
13351 2005-08-24  Jim Meyering  <jim@meyering.net>
13352
13353         * modules/fcntl-safer: New module.
13354         * modules/fts (Depends-on): Add fcntl-safer.
13355         * MODULES.html.sh (File descriptor based Input/Output):
13356         Add fcntl-safer.
13357
13358 2005-08-24  Bruno Haible  <bruno@clisp.org>
13359
13360         Support for unit test modules.
13361         * modules/README: Mention tests modules.
13362         * modules/TEMPLATE-TESTS: New file.
13363         * gnulib-tool: New options --extract-tests-module, --with-tests and
13364         --tests-base (unused for the moment).
13365         (testsbase, inctests): New variables.
13366         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
13367         (func_verify_module): Exclude TEMPLATE-TESTS.
13368         (func_verify_nontests_module, func_verify_tests_module): New functions.
13369         (func_get_dependencies): Add implicit dependency for tests modules.
13370         (func_get_tests_module): New function.
13371         (func_modules_transitive_closure): When --with-tests was specified,
13372         include the unit tests as well, unless explicitly avoided.
13373         (func_emit_lib_Makefile_am): Ignore the tests modules here.
13374         (func_emit_tests_Makefile_am): New function.
13375         (func_create_testdir): When --with-tests was specified, emit a
13376         tests/ directory.
13377         * MODULES.html.sh (Future developments): Update.
13378
13379 2005-08-24  Bruno Haible  <bruno@clisp.org>
13380
13381         * modules/tls-tests: New file.
13382         * tests/test-tls.c: New file, from GNU gettext.
13383
13384 2005-08-24  Bruno Haible  <bruno@clisp.org>
13385
13386         * modules/lock-tests: New file.
13387         * tests/test-lock.c: New file, from GNU gettext.
13388
13389 2005-08-24  Bruno Haible  <bruno@clisp.org>
13390
13391         * lib/lock.h: Add multiple inclusion guard.
13392         * lib/tls.h: Add multiple inclusion guard.
13393
13394 2005-08-24  Bruno Haible  <bruno@clisp.org>
13395
13396         * gnulib-tool: Add support for the --aux-dir option to
13397         --create-testdir, --create-megatestdir, --test, --megatest.
13398         (func_create_testdir, func_create_megatestdir): Optionally emit a
13399         AC_CONFIG_AUX_DIR directive.
13400         (create-testdir, create-megatestdir, test, megatest): Provide a
13401         default value for $auxdir.
13402
13403 2005-08-24  Bruno Haible  <bruno@clisp.org>
13404
13405         * gnulib-tool (import): Use compound statement instead of subshell
13406         where possible.
13407
13408 2005-08-24  Bruno Haible  <bruno@clisp.org>
13409
13410         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13411
13412 2005-08-24  Bruno Haible  <bruno@clisp.org>
13413
13414         * gnulib-tool (func_version): Update.
13415
13416 2005-08-24  Bruno Haible  <bruno@clisp.org>
13417
13418         * gnulib-tool (func_import, func_create_testdir,
13419         func_create_megatestdir): Quote all autoconf macro arguments.
13420
13421 2005-08-24  Bruno Haible  <bruno@clisp.org>
13422
13423         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13424         option --force, because --force causes the aclocal.m4 of each
13425         subdirectory to be newer than the corresponding config.h.in.
13426
13427 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13428
13429         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13430         All contents moved to gl_REGEX.
13431         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13432         assume that it does.
13433
13434 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13435
13436         * lib/regex.h (REG_NOSYS)
13437         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13438         Define, since POSIX requires it as of 2001.
13439         (_REG_ENOSYS)
13440         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13441         New private symbol, used to keep the enum signed in all cases.
13442         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13443         Youngman in
13444         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13445
13446         * lib/regex_internal.c (re_string_skip_chars, register_state):
13447         (calc_state_hash):
13448         Remove forward decls; no longer needed now that we use prototypes.
13449         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13450         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13451         (clean_state_log_if_needed): Likewise.
13452
13453 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13454
13455         * config/srclist.txt: Add glibc bugs 1231-1233.
13456
13457 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13458
13459         Fix problems reported by Sam Steingold in
13460         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13461         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13462         assumed that reg_errcode_t is a signed type, which is not
13463         necessarily true if _XOPEN_SOURCE is not defined.
13464         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13465         since some compilers warn about it otherwise.
13466
13467 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13468
13469         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13470         (init_word_char, create_initial_state, duplicate_node_closure):
13471         (fetch_token, peek_token_bracket, build_range_exp):
13472         (build_collating_symbol): Remove forward decls; no longer needed
13473         now that we use prototypes.
13474
13475         * lib/regcomp.c:
13476         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13477         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13478         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13479         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13480         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13481         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13482         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13483         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13484         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13485         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13486         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13487         (build_charclass, build_charclass_op, fetch_number, create_tree):
13488         (create_token_tree, mark_opt_subexp, duplicate_tree):
13489         Use prototypes rather than old-style definitions.
13490
13491         * lib/regex_internal.c:
13492         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13493         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13494         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13495         (re_string_reconstruct, re_string_peek_byte_case):
13496         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13497         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13498         (re_node_set_init_copy, re_node_set_add_intersect):
13499         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13500         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13501         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13502         (re_acquire_state, re_acquire_state_context, register_state):
13503         (create_ci_newstate, create_cd_newstate, free_state):
13504         Likewise.
13505         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13506         re_search_2):
13507         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13508         (re_search_internal, prune_impossible_nodes):
13509         (acquire_init_state_context, check_matching, static):
13510         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13511         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13512         (update_regs, sift_states_backward, build_sifted_states):
13513         (clean_state_log_if_needed, merge_state_array):
13514         (update_cur_sifted_state, add_epsilon_src_nodes):
13515         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13516         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13517         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13518         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13519         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13520         (check_arrival, check_arrival_add_next_nodes):
13521         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13522         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13523         (check_node_accept_bytes, check_node_accept, extend_buffers):
13524         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13525         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13526         (sift_ctx_init):
13527         Likewise.
13528
13529         * lib/regex_internal.h:
13530         (re_string_allocate, re_string_construct, re_string_reconstruct):
13531         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13532         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13533         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13534         (re_string_context_at, re_string_peek_byte_case):
13535         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13536         is defined, since we now use prototypes always.
13537
13538         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13539         C89 or better.  All uses removed.
13540
13541 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13542
13543         * config/srclist.txt: Add glibc bugs 1220-1227.
13544
13545 2005-08-20  Jim Meyering  <jim@meyering.net>
13546
13547         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13548         of unused local, dfa.
13549
13550 2005-08-20  Bruno Haible  <bruno@clisp.org>
13551
13552         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13553
13554 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13555
13556         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13557         (re_node_set_insert_last, re_dfa_add_node):
13558         Rename local variables to avoid GCC shadowing warnings.
13559
13560 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13561
13562         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13563         [defined lint]: Suppress bogus uninitialized-variable warnings.
13564
13565         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13566         and let the caller return REG_ESPACE if out of space.  This
13567         removes an uninitialied-variable warning with GCC 4.0.1, and also
13568         avoids taking the address of a local variable.  All callers
13569         changed.
13570
13571 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13572
13573         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13574         $LIBCSRC/posix/regexec.c.
13575         Add glibc bug 1217 for regcomp.c.
13576
13577 2005-08-19  Jim Meyering  <jim@meyering.net>
13578
13579         * lib/regexec.c (proceed_next_node): Redo local variables to
13580         avoid GCC shadowing warnings.
13581
13582 2005-08-18  Bruno Haible  <bruno@clisp.org>
13583
13584         * lib/strstr.c (strstr): Fix return value in multibyte case.
13585         * lib/strcasestr.c (strcasestr): Likewise.
13586
13587 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13588
13589         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13590
13591 2005-08-17  Jim Meyering  <jim@meyering.net>
13592
13593         Make the %s format (seconds since the epoch) work for a negative
13594         number and when used with a zero-padded field width, e.g. %015s.
13595
13596         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13597         label so that it precedes the code to set `digits'.  Otherwise,
13598         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13599         print `00-22'.  Now, it prints `-0022', as it should.
13600
13601 2005-08-17  Bruno Haible  <bruno@clisp.org>
13602
13603         * modules/strstr (Files): Add m4/mbrtowc.m4.
13604         (Depends-on): Add mbuiter.
13605
13606 2005-08-17  Bruno Haible  <bruno@clisp.org>
13607
13608         * modules/strcasestr: New file.
13609         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13610         strcasestr.
13611
13612 2005-08-17  Bruno Haible  <bruno@clisp.org>
13613
13614         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13615
13616 2005-08-17  Bruno Haible  <bruno@clisp.org>
13617
13618         * modules/mbuiter: New file.
13619         * MODULES.html.sh (Extended multibyte and wide character utilities):
13620         Add mbuiter.
13621
13622 2005-08-17  Bruno Haible  <bruno@clisp.org>
13623
13624         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13625         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13626
13627 2005-08-17  Bruno Haible  <bruno@clisp.org>
13628
13629         * m4/strcasestr.m4: New file.
13630
13631 2005-08-17  Bruno Haible  <bruno@clisp.org>
13632
13633         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13634         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13635
13636 2005-08-17  Bruno Haible  <bruno@clisp.org>
13637
13638         * lib/strcasestr.h: New file.
13639         * lib/strcasestr.c: New file.
13640
13641 2005-08-17  Bruno Haible  <bruno@clisp.org>
13642
13643         * lib/strcasecmp.c: Use mbuiter.h.
13644
13645 2005-08-17  Bruno Haible  <bruno@clisp.org>
13646
13647         * lib/mbuiter.h: New file.
13648
13649 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13650
13651         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13652         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13653         and gl_GETOPT are both invoked via different paths (as happens
13654         with GNU tar CVS because it uses both argp and getopt), the former
13655         wins.
13656
13657 2005-08-16  Bruno Haible  <bruno@clisp.org>
13658
13659         * modules/tls: New file.
13660         * MODULES.html.sh (Multithreading): Add tls.
13661
13662 2005-08-16  Bruno Haible  <bruno@clisp.org>
13663
13664         * modules/strnlen1: New file.
13665         * MODULES.html.sh (String handling): Add strnlen1.
13666
13667 2005-08-16  Bruno Haible  <bruno@clisp.org>
13668
13669         * modules/strcase (Files): Add m4/mbrtowc.m4.
13670         (Depends-on): Add strnlen1, mbchar.
13671
13672 2005-08-16  Bruno Haible  <bruno@clisp.org>
13673
13674         * modules/mbiter: New file.
13675         * MODULES.html.sh (Extended multibyte and wide character utilities):
13676         Add mbiter.
13677
13678 2005-08-16  Bruno Haible  <bruno@clisp.org>
13679
13680         * modules/mbfile: New file.
13681         * MODULES.html.sh (Extended multibyte and wide character utilities):
13682         Add mbfile.
13683
13684 2005-08-16  Bruno Haible  <bruno@clisp.org>
13685
13686         * modules/mbchar: New file.
13687         * MODULES.html.sh (Extended multibyte and wide character utilities):
13688         New section.
13689
13690 2005-08-16  Bruno Haible  <bruno@clisp.org>
13691
13692         * m4/tls.m4: New file, from GNU gettext.
13693
13694 2005-08-16  Bruno Haible  <bruno@clisp.org>
13695
13696         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13697         always.
13698         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13699
13700 2005-08-16  Bruno Haible  <bruno@clisp.org>
13701
13702         * m4/mbiter.m4: New file.
13703
13704 2005-08-16  Bruno Haible  <bruno@clisp.org>
13705
13706         * m4/mbfile.m4: New file.
13707
13708 2005-08-16  Bruno Haible  <bruno@clisp.org>
13709
13710         * m4/mbchar.m4: New file.
13711
13712 2005-08-16  Bruno Haible  <bruno@clisp.org>
13713
13714         * lib/tls.h: New file, from GNU gettext.
13715         * lib/tls.c: New file, from GNU gettext.
13716
13717 2005-08-16  Bruno Haible  <bruno@clisp.org>
13718
13719         * lib/strnlen1.h: New file.
13720         * lib/strnlen1.c: New file.
13721
13722 2005-08-16  Bruno Haible  <bruno@clisp.org>
13723
13724         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13725         (mbi_init): Update.
13726         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13727         NUL byte, not after it.
13728
13729 2005-08-16  Bruno Haible  <bruno@clisp.org>
13730
13731         * lib/strcase.h (strcasecmp): Add note in comments.
13732         * lib/strncasecmp.c: Use code from strcasecmp.c.
13733         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13734         (strcasecmp): Work correctly in multibyte locales.
13735
13736 2005-08-16  Bruno Haible  <bruno@clisp.org>
13737
13738         * lib/mbiter.h: New file.
13739
13740 2005-08-16  Bruno Haible  <bruno@clisp.org>
13741
13742         * lib/mbfile.h: New file.
13743
13744 2005-08-16  Bruno Haible  <bruno@clisp.org>
13745
13746         * lib/mbchar.h: New file.
13747         * lib/mbchar.c: New file.
13748
13749 2005-08-16  Bruno Haible  <bruno@clisp.org>
13750
13751         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13752         the valid ones. Makes the comparison operations transitive:
13753         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13754         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13755
13756 2005-08-15  Simon Josefsson  <jas@extundo.com>
13757
13758         * modules/ssize_t (License): Change to 'unlimited'.
13759
13760         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13761
13762 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13763
13764         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13765         Add comments for each pending glibc patch.
13766
13767 2005-08-15  Bruno Haible  <bruno@clisp.org>
13768
13769         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13770         __cplusplus is defined.
13771
13772 2005-08-14  Jim Meyering  <jim@meyering.net>
13773
13774         Sync from coreutils.
13775
13776         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13777         Use the hash-table-based cycle-detection code not just when
13778         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13779         Reported by James Youngman in
13780         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13781         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13782         FTS_TIGHT_CYCLE_CHECK.
13783         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13784         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13785         once again.
13786         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13787         * lib/fts.c (fd_safer): Remove decl.
13788         Include fcntl--.h rather than unistd-safer.h
13789         (fts_safe_changedir): Don't call fd_safer; no longer needed
13790         now that we include fcntl--.h.
13791
13792 2005-08-12  Simon Josefsson  <jas@extundo.com>
13793
13794         * modules/getndelim2: Use ssize_t module.
13795         * modules/getnline: Likewise.
13796         * modules/safe-read: Likewise.
13797         * modules/xreadlink: Likewise.
13798
13799         * modules/ssize_t: New file.
13800
13801 2005-08-12  Simon Josefsson  <jas@extundo.com>
13802
13803         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13804
13805 2005-08-12  Simon Josefsson  <jas@extundo.com>
13806
13807         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13808         ssize_t.
13809
13810 2005-08-12  Simon Josefsson  <jas@extundo.com>
13811
13812         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13813         readline, getdelim and check_version.
13814         (Support for systems lacking ISO C 99: Sizes of integer types):
13815         Add size_max.
13816
13817 2005-08-12  Bruno Haible  <bruno@clisp.org>
13818
13819         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13820
13821 2005-08-11  Simon Josefsson  <jas@extundo.com>
13822
13823         * modules/readline: New file.
13824
13825         * modules/strnlen (Files): Add strnlen.h.
13826
13827 2005-08-11  Simon Josefsson  <jas@extundo.com>
13828
13829         * m4/readline.m4: New file.
13830
13831 2005-08-11  Simon Josefsson  <jas@extundo.com>
13832
13833         * lib/readline.h, readline.c: New file.
13834
13835 2005-08-11  Simon Josefsson  <jas@extundo.com>
13836
13837         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13838         gl_AVOID.
13839
13840 2005-08-11  Bruno Haible  <bruno@clisp.org>
13841
13842         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13843
13844 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13845
13846         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13847
13848 2005-08-10  Simon Josefsson  <jas@extundo.com>
13849
13850         * tests/test-iconvme.c: New file.
13851
13852 2005-08-10  Simon Josefsson  <jas@extundo.com>
13853
13854         * m4/strnlen.m4: New file.
13855
13856         * m4/strndup.m4: Don't check for strnlen declaration, done in
13857         strnlen.m4.
13858
13859 2005-08-10  Simon Josefsson  <jas@extundo.com>
13860
13861         * lib/strndup.c: Use strnlen.h.
13862
13863         * lib/strnlen.h: New file.
13864
13865 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13866
13867         * README: Typos.
13868
13869 2005-08-02  Simon Josefsson  <jas@extundo.com>
13870
13871         * modules/readline: New file.
13872
13873 2005-08-02  Simon Josefsson  <jas@extundo.com>
13874
13875         * modules/getdelim: New file.
13876
13877         * modules/getline: Rewrite, don't use getndelim2.
13878
13879 2005-08-02  Simon Josefsson  <jas@extundo.com>
13880
13881         * m4/getline.m4: Separate out getdelim stuff into separate module.
13882
13883         * m4/getdelim.m4: New file.
13884
13885 2005-08-02  Simon Josefsson  <jas@extundo.com>
13886
13887         * lib/getline.h, getline.c: Rewrite.
13888
13889         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13890
13891 2005-07-31  Bruno Haible  <bruno@clisp.org>
13892
13893         * lib/lock.h (gl_lock_initializer): New macro.
13894         (gl_lock_define_initialized): Use it.
13895         (gl_rwlock_initializer): New macro.
13896         (gl_rwlock_define_initialized): Use it.
13897         (gl_recursive_lock_initializer): New macro.
13898         (gl_recursive_lock_define_initialized): Use it.
13899
13900 2005-07-30  Karl Berry  <karl@gnu.org>
13901
13902         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13903         Report from Ben Pfaff, regarding getopt.
13904
13905 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13906
13907         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13908         normal way.
13909         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13910         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13911         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13912         (gl_GETOPT): Use the new macros.  Most of the implementation
13913         is moved to the new macros.  This is for programs like Emacs
13914         that don't want all the functionality of gl_GETOPT.
13915
13916 2005-07-26  Bruno Haible  <bruno@clisp.org>
13917
13918         * m4/lock.m4: Update from GNU gettext.
13919
13920 2005-07-26  Bruno Haible  <bruno@clisp.org>
13921
13922         * lib/lock.h: Update from GNU gettext.
13923         * lib/lock.c: Update from GNU gettext.
13924
13925 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
13926
13927         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
13928         obsolescent AC_TRY_RUN.  Include the default includes files, for
13929         'exit'.
13930
13931 2005-07-24  Bruno Haible  <bruno@clisp.org>
13932
13933         * modules/visibility: New file.
13934         * MODULES.html.sh (Misc): Add visibility.
13935
13936 2005-07-24  Bruno Haible  <bruno@clisp.org>
13937
13938         * m4/visibility.m4: New file.
13939
13940 2005-07-24  Bruno Haible  <bruno@clisp.org>
13941
13942         * doc/visibility.texi: New file.
13943
13944 2005-07-22  Bruno Haible  <bruno@clisp.org>
13945
13946         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
13947         $(ALLOCA_H), redundant through BUILT_SOURCES.
13948         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
13949         redundant through BUILT_SOURCES.
13950         * modules/byteswap (Makefile.am): Remove explicit dependency on
13951         $(BYTESWAP_H), redundant through BUILT_SOURCES.
13952         * modules/fnmatch (Makefile.am): Remove explicit dependency on
13953         $(FNMATCH_H), redundant through BUILT_SOURCES.
13954         * modules/getopt (Makefile.am): Remove explicit dependency on
13955         $(GETOPT_H), redundant through BUILT_SOURCES.
13956         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
13957         redundant through BUILT_SOURCES.
13958         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
13959         redundant through BUILT_SOURCES.
13960         * modules/stdbool (Makefile.am): Remove explicit dependency on
13961         $(STDBOOL_H), redundant through BUILT_SOURCES.
13962         * modules/stdint (Makefile.am): Remove explicit dependency on
13963         $(STDINT_H), redundant through BUILT_SOURCES.
13964         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
13965         Remove explicit dependency on $(SYSEXITS_H).
13966         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13967
13968 2005-07-18  Simon Josefsson  <jas@extundo.com>
13969
13970         * lib/check-version.c (check_version): Accept identical versions too.
13971
13972 2005-07-18  Bruno Haible  <bruno@clisp.org>
13973
13974         * modules/lock: New file.
13975         * MODULES.html.sh (Multithreading): New section.
13976
13977 2005-07-18  Bruno Haible  <bruno@clisp.org>
13978
13979         * m4/lock.m4: New file, from GNU gettext.
13980
13981 2005-07-18  Bruno Haible  <bruno@clisp.org>
13982
13983         * lib/lock.h: New file, from GNU gettext.
13984         * lib/lock.c: New file, from GNU gettext.
13985
13986 2005-07-18  Bruno Haible  <bruno@clisp.org>
13987
13988         * lib/lock.h (gl_once_t): New type.
13989         (gl_once_define, gl_once): New macros.
13990         * lib/lock.c (fresh_once): New variable.
13991         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13992         functions.
13993
13994 2005-07-16  Simon Josefsson  <jas@extundo.com>
13995
13996         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13997         workaround, suggested by Bruno.
13998
13999 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14000
14001         * modules/xalloc (Depends-on): Add xalloc-die.
14002         * modules/xvasprintf (Depends-on): Add xalloc-die.
14003
14004 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14005
14006         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
14007         with a minor change.
14008
14009 2005-07-15  Bruno Haible  <bruno@clisp.org>
14010
14011         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
14012         When using lib/poll.c, define poll as rpl_poll.
14013
14014 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
14015
14016         * modules/argp (Depends-on): Remove unlocked-io.
14017
14018 2005-07-14  Derek Price  <derek@ximbiot.com>
14019
14020         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
14021         for glob symlink bug.
14022
14023 2005-07-14  Bruno Haible  <bruno@clisp.org>
14024
14025         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
14026         Instead, test for *_unlocked function declarations directly.
14027
14028 2005-07-11  Simon Josefsson  <jas@extundo.com>
14029
14030         * modules/size_max: New file.
14031
14032         * modules/xsize: Depend on size_max module for size_max.m4.
14033
14034 2005-07-11  Simon Josefsson  <jas@extundo.com>
14035
14036         * lib/size_max.h: New file.
14037
14038 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
14039
14040         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
14041         copyright symbol and the year.
14042         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
14043         (version_etc_va): Use parameterized copyright notice.
14044         Reword to conform to the current GNU coding standards.
14045
14046 2005-07-11  Karl Berry  <karl@gnu.org>
14047
14048         * doc/gnulib.texi (Quoting): new node.
14049         (Initial import): more info, from Patrice.
14050
14051 2005-07-11  Bruno Haible  <bruno@clisp.org>
14052
14053         * gnulib-tool (func_usage): Document option --avoid.
14054         (Command line options): Handle --avoid.
14055         (func_acceptable): New function.
14056         (func_modules_transitive_closure): Use it.
14057
14058 2005-07-11  Bruno Haible  <bruno@clisp.org>
14059
14060         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
14061         Reported by Jim Meyering.
14062
14063 2005-07-10  Bruno Haible  <bruno@clisp.org>
14064
14065         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
14066         Needed when size_t is smaller than 'unsigned int'.
14067         Reported by Paul Eggert.
14068
14069 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14070
14071         * modules/argp (Depends-on): Add unlocked-io
14072
14073 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14074
14075         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
14076         block of defines.
14077
14078 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
14079
14080         * config/srclist.txt: Comment out regcomp.c, since we have a porting
14081         fix now.
14082
14083 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
14084         and Paul Eggert  <eggert@cs.ucla.edu>
14085
14086         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
14087         in wint_t, not wchar_t.  Remove now-unnecessary cast.
14088
14089 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14090
14091         * modules/regex (Files): Add lib/regex_internal.c,
14092         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
14093         (Depends-on): Add extensions.
14094         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
14095
14096 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14097
14098         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
14099         pathconf.
14100         * m4/same.m4 (gl_SAME): Likewise.
14101         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
14102
14103         * m4/regex.m4: Adjust to new libc regex implementation.
14104         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
14105         all the .c and .h parts of (the new) regex.
14106         Quote the m4 stuff better.
14107         Check for RE_ICASE bug of old gnulib.
14108         Check for REG_STARTEND of recent libc.
14109         Rename local variables from jm_* to gl_*.
14110         Quote operand of "test -f".
14111         Say "recent enough" version of libc, not "version 2".
14112         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
14113         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
14114         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
14115         Remove check for btowc, isascii.
14116         Require AM_LANGINFO_CODESET.
14117
14118 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14119
14120         * lib/regex.c, regex.h: Sync from libc.
14121         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
14122         * lib/regexec.c:
14123         New files, synced from libc, except that regex_internal.h
14124         currently has a small porting fix.
14125
14126 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14127
14128         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
14129         regex_internal.c, regexec.c.
14130         Add regex_internal.h too, but as a comment, since the libc version
14131         is currently broken in gnulib mode.
14132
14133 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14134
14135         Support programs like Emacs that use gnulib but not gettext.
14136         * MODULES.html.sh (Internationalization functions): Add gettext-h.
14137         * modules/gettext-h: New file.
14138         * modules/gettext (Files): Remove lib/gettext.h.
14139         (Depends-on): Add gettext-h.
14140         (Makefile.am): Remove lib_SOURCES.
14141         * modules/argmatch, modules/c-stack, modules/closeout:
14142         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
14143         * modules/execute, modules/file-type, modules/getaddrinfo:
14144         * modules/getopt, modules/human, modules/javacomp:
14145         * modules/javaexec, modules/mkdir-p, modules/obstack:
14146         * modules/openat, modules/pagealign_alloc, modules/pipe:
14147         * modules/quotearg, modules/regex, modules/rpmatch:
14148         * modules/unicodeio, modules/userspec, modules/version-etc:
14149         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
14150         * modules/xsetenv:
14151         Depend on gettext-h, not gettext.
14152
14153 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14154
14155         * gnulib-tool (func_import): Add support for 'public domain' license.
14156         * modules/alloca, modules/atexit, modules/memmove:
14157         Now public domain, not GPL.
14158         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
14159         * modules/realloc, modules/strerror, modules/strtod:
14160         Now LGPL, not GPL.
14161
14162 2005-07-05  Bruno Haible  <bruno@clisp.org>
14163
14164         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
14165         autoconf CVS. Needed for mingw.
14166
14167 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14168
14169         Remove the dependency of the strftime module on the tzset module.
14170         * modules/strftime (Depends-on): Remove dependency on tzset.
14171
14172 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14173
14174         Remove the dependency of the strftime module on the tzset module.
14175         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
14176         gl_FUNC_TZSET_CLOBBER.
14177
14178 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14179
14180         Remove the dependency of the strftime module on the tzset module.
14181         * lib/strftime.c (my_strftime)
14182         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
14183         Copy the input structure, to work around some of the bug with
14184         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
14185         Solaris releases, you should also use the tzset module, but we won't
14186         require it as a dependency any more since we don't want LGPLed code
14187         to depend on GPLed code.
14188
14189 2005-07-02  Jim Meyering  <jim@meyering.net>
14190
14191         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
14192         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
14193         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
14194         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
14195
14196 2005-07-02  Jim Meyering  <jim@meyering.net>
14197
14198         * lib/backupfile.c (backup_args): Change a `0' to NULL.
14199
14200 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14201
14202         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
14203         declares only 'struct timespec;' (!).
14204
14205 2005-07-01  Jim Meyering  <jim@meyering.net>
14206
14207         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
14208         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
14209         * lib/save-cwd.c, tempname.c:
14210         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
14211         and don't include <sys/file.h>).
14212
14213 2005-06-29  Jim Meyering  <jim@meyering.net>
14214
14215         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
14216         type name.  Use the variable name instead.
14217         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
14218         Likewise.
14219
14220 2005-06-28  Simon Josefsson  <jas@extundo.com>
14221
14222         * modules/check-version (Files): Add check-version.m4.
14223
14224 2005-06-28  Simon Josefsson  <jas@extundo.com>
14225
14226         * m4/check-version.m4: New file, suggested by Jim Meyering
14227         <jim@meyering.net>.
14228
14229 2005-06-28  Simon Josefsson  <jas@extundo.com>
14230
14231         * lib/check-version.h, lib/check-version.c: New files.
14232
14233 2005-06-28  Simon Josefsson  <jas@extundo.com>
14234
14235         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
14236         collision with global variable.  Better indentation.  Don't
14237         increment buffer pointer beyond buffer end.  Based on comments
14238         from Paul Eggert <eggert@cs.ucla.edu>.
14239
14240         * lib/base64.h: Indent.
14241
14242 2005-06-28  Simon Josefsson  <jas@extundo.com>
14243
14244         * doc/gnulib.texi (Library version handling): New section.
14245
14246 2005-06-28  Jim Meyering  <jim@meyering.net>
14247
14248         * check-module (find_included_lib_files): Hard-code another
14249         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
14250         but modules/fts-lgpl (correctly) does not list those files.
14251
14252         * modules/canonicalize (Files): Add lib/pathmax.h.
14253
14254 2005-06-25  Simon Josefsson  <jas@extundo.com>
14255
14256         * modules/check-version: New file.
14257
14258 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
14259
14260         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
14261         initializer of struct addrinfo, as an indication that we don't
14262         care how many members the structure has.
14263
14264 2005-06-24  Derek Price  <derek@ximbiot.com>
14265         and Bruno Haible  <bruno@clisp.org>
14266
14267         Remove stat module & update lstat.
14268         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
14269         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
14270         * m4/stat.m4: Remove this file.
14271
14272 2005-06-24  Derek Price  <derek@ximbiot.com>
14273         and Bruno Haible  <bruno@clisp.org>
14274
14275         Remove stat module & update lstat.
14276         * lib/stat.c: Remove this file...
14277         (slash_aware_lstat): ...moving this content and its support...
14278         * lib/lstat.c (rpl_lstat): ...into here.
14279         * lib/lstat.h: New file.
14280
14281 2005-06-24  Derek Price  <derek@ximbiot.com>
14282         and Bruno Haible  <bruno@clisp.org>
14283
14284         Remove stat module & update lstat.
14285         * config/srclist.txt (libc sources): Remove stat.
14286
14287 2005-06-24  Derek Price  <derek@ximbiot.com>
14288         and Bruno Haible  <bruno@clisp.org>
14289
14290         Remove stat module & update lstat.
14291         * MODULES.html.sh (stat): Remove.
14292         * MODULES.html: Regenerated.
14293         * modules/lstat (Description): Correct function name.
14294         (Files): Add "lstat.h".
14295         (Depends-on): Remove stat, add xalloc, stat-macros.
14296         * modules/stat: Remove this file.
14297         (Include): Add "lstat.h", remove <sys/stat.h>.
14298
14299 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
14300
14301         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
14302         (ranged_convert): Don't save conversion in a temporary struct.
14303         This causes a warning with GCC 4.0.0, and anyway in the typical
14304         case it's not worth the extra 100 bytes or so of code.
14305         (ranged_convert, __mktime_internal): When calling a function via a
14306         pointer P, use P () rather than (*P) (), as we now assume C89 or
14307         better.
14308
14309 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14310
14311         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
14312         "who -r" failed to give output.  Problem reported by Tim Waugh.
14313
14314         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
14315         (xcalloc): Use it to avoid needless tests.
14316         Problem reported by Jim Meyering.
14317
14318 2005-06-20  Derek Price  <derek@ximbiot.com>
14319
14320         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
14321         unnecessary for Autoconfs > 2.59c.
14322
14323 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14324
14325         * lib/argp.h (__option_is_short): Check upper limit of
14326         __key. Isprint() requires its argument to have the value
14327         of an unsigned char or EOF.
14328
14329 2005-06-16  Jim Meyering  <jim@meyering.net>
14330
14331         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
14332         when either N or S is zero.
14333
14334 2005-06-16  Derek Price  <derek@ximbiot.com>
14335
14336         * m4/bison.m4: Declare YACC & YFLAGS precious.
14337
14338 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
14339
14340         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
14341         multibyte string or pattern, fall back on unibyte matching.
14342         Problem reported by James Youngman.
14343
14344 2005-06-08  Bruno Haible  <bruno@clisp.org>
14345
14346         * modules/csharpcomp: New file.
14347         * MODULES.html.sh (C#): Add csharpcomp.
14348
14349 2005-06-08  Bruno Haible  <bruno@clisp.org>
14350
14351         * m4/csharpcomp.m4: New file, from GNU gettext.
14352
14353 2005-06-08  Bruno Haible  <bruno@clisp.org>
14354
14355         * lib/csharpcomp.h: New file, from GNU gettext.
14356         * lib/csharpcomp.c: New file, from GNU gettext.
14357         * lib/csharpcomp.sh.in: New file, from GNU gettext.
14358
14359 2005-06-08  Bruno Haible  <bruno@clisp.org>
14360
14361         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
14362         warning on mingw.
14363
14364 2005-06-07  Derek Price  <derek@ximbiot.com>
14365
14366         Sync from CVS.
14367         * lib/glob_.h: Indent nested #ifdef.
14368
14369 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14370
14371         Sync from coreutils.
14372         Use "file name" when talking about file names, instead of "filename"
14373         or "path", as per the GNU coding standards.
14374         * lib/mkdir-p.c: Renamed from makepath.c.
14375         (make_dir_parents): Renamed from make_path.  All callers changed.
14376         * lib/mkdir-p.h: Likewise.  All includers changed.
14377         * lib/filenamecat.c: Renamed from path-concat.c.
14378         (file_name_concat): Renamed from path_concat.  All callers changed.
14379         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
14380         * lib/filenamecat.h: Likewise.  All includers changed.
14381         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
14382         in comments or local variable names.
14383         * lib/basename.c: Likewise.
14384         * lib/canonicalize.c, canonicalize.h: Likewise.
14385         * lib/dirname.c, dirname.h: Likewise.
14386         * lib/euidaccess.c: Likewise.
14387         * lib/exclude.c: Likewise
14388         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14389         * lib/fsusage.c, fsuage.h: Likewise.
14390         * lib/fts.c, fts_.h: Likewise.
14391         * lib/getcwd.c: Likewise.
14392         * lib/getloadavg.c: Likewise.
14393         * lib/mkstemp.c: Likewise.
14394         * lib/mountlist.c, mountlist.h: Likewise.
14395         * lib/openat.c, openat.h: Likewise.
14396         * lib/readlink-stub.c: Likewise.
14397         * lib/readutmp.c, readutmp.h: Likewise.
14398         * lib/rename.c: Likewise.
14399         * lib/rmdir.c: Likewise.
14400         * lib/same.c: Likewise.
14401         * lib/savedir.c: Likewise.
14402         * lib/stripslash.c: Likewise.
14403         * lib/tempname.c: Likewise.
14404         * lib/xreadlink.c: Likewise.
14405         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14406         All uses changed.
14407         * lib/exclude.h: Likewise.
14408
14409         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14410         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14411         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14412         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14413         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14414         files have been getting away with it for years (MORE/BSD 4.3
14415         is extinct now).
14416         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14417         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14418
14419         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14420         Define to 256, not 255, as per modern POSIX.
14421
14422 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14423
14424         Sync from coreutils.
14425         Use "file name" when talking about file names, instead of "filename"
14426         or "path", as per the GNU coding standards.
14427         * MODULES.html.sh: mkdir-p renamed from makepath.
14428         filenamecat renamed from path-concat.
14429         * modules/filenamecat: Renamed from modules/path-concat.
14430         (Files): filenamecat.h and filenamecat.c renamed from
14431         path-concat.h and path-concat.c.
14432         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14433         (Include): filenamecat.h, not path-concat.h.
14434         * modules/mkdir-p: Renamed from modules/makepath.
14435         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14436         makepath.c.
14437         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14438         (Include): mkdir-p.h, not makepath.h.
14439
14440 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14441
14442         Sync from coreutils.
14443         * m4/mkdir-p.m4: Renamed from makepath.m4.
14444         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14445         Rename files from makepath.c to mkdir-p.c, and from
14446         makepath.h to mkdir-p.h.
14447         * m4/filenamecat.m4: Renamed from path-concat.m4.
14448         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14449         Rename files from path-concat.c to filenamecat.c,
14450         and from path-concat.h to filenamecat.h.
14451         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14452         "file name" in local variables or comments.
14453         * m4/rename.m4: Likewise.
14454
14455 2005-06-01  Bruno Haible  <bruno@clisp.org>
14456
14457         * modules/csharpexec: New file.
14458         * MODULES.html.sh (C#): New section.
14459
14460 2005-06-01  Bruno Haible  <bruno@clisp.org>
14461
14462         * m4/csharp.m4: New file, from GNU gettext.
14463         * m4/csharpexec.m4: New file, from GNU gettext.
14464
14465 2005-06-01  Bruno Haible  <bruno@clisp.org>
14466
14467         * lib/csharpexec.h: New file, from GNU gettext.
14468         * lib/csharpexec.c: New file, from GNU gettext.
14469         * lib/csharpexec.sh.in: New file, from GNU gettext.
14470
14471 2005-05-31  Derek Price  <derek@ximbiot.com>
14472             Paul Eggert  <eggert@cs.ucla.edu>
14473
14474         Sync from cvs.
14475         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14476
14477 2005-05-31  Derek Price  <derek@ximbiot.com>
14478             Paul Eggert  <eggert@cs.ucla.edu>
14479
14480         Sync from cvs.
14481         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14482
14483 2005-05-29  Derek Price  <derek@ximbiot.com>
14484
14485         * config/srclist.txt (glob_.h, glob.c): Add these files.
14486
14487 2005-05-29  Derek Price  <derek@ximbiot.com>
14488
14489         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14490         * modules/glob: New file.
14491         * modules/getlogin_r: Add link to POSIX spec in description.
14492
14493 2005-05-29  Derek Price  <derek@ximbiot.com>
14494             Paul Eggert  <eggert@cs.ucla.edu>
14495
14496         * m4/glob.m4: New file.
14497
14498 2005-05-29  Derek Price  <derek@ximbiot.com>
14499             Paul Eggert  <eggert@cs.ucla.edu>
14500
14501         * lib/glob_.h, lib/glob.c: New files.
14502
14503 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14504
14505         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14506         * modules/fts-lgpl (Depends-on): Remove gettext.
14507
14508 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14509
14510         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14511         and don't require gt_INTTYPES_PRI.
14512
14513 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14514
14515         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14516
14517         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14518         the configuration hassle isn't worth it.
14519         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14520         (LONGEST_MODIFIER, PRIuMAX): Remove.
14521
14522 2005-05-27  Bruno Haible  <bruno@clisp.org>
14523
14524         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14525
14526 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14527
14528         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14529         _POSIX_PTHREAD_SEMANTICS for Solaris.
14530
14531 2005-05-25  Derek Price  <derek@ximbiot.com>
14532
14533         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14534
14535 2005-05-25  Derek Price  <derek@ximbiot.com>
14536             Paul Eggert  <eggert@cs.ucla.edu>
14537
14538         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14539         * lib/getlogin_r.c, getlogin_r.h: New files.
14540
14541 2005-05-25  Bruno Haible  <bruno@clisp.org>
14542             Derek Price  <derek@ximbiot.com>
14543
14544         * lib/getlogin_r.h: Simplify API documentation.
14545
14546 2005-05-23  Derek Price  <derek@ximbiot.com>
14547
14548         * modules/minmax (Files): Add m4/minmax.m4.
14549         (configure.ac): Add gl_MINMAX.
14550
14551 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14552
14553         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14554         so that unistd-safer.h (GPL'ed code) need not be included.
14555
14556 2005-05-22  Bruno Haible  <bruno@clisp.org>
14557
14558         * m4/minmax.m4: New file.
14559         Based on a patch by Derek Price <derek@ximbiot.com>.
14560
14561 2005-05-22  Bruno Haible  <bruno@clisp.org>
14562
14563         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14564         (INT64_MIN): Fix definition.
14565         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14566
14567         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14568         NEED_SIGNED_INT_TYPES.
14569
14570         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14571         HAVE_SYSTEM_INTTYPES.
14572
14573 2005-05-22  Bruno Haible  <bruno@clisp.org>
14574
14575         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14576         Also include <sys/param.h> if it defines MIN, MAX.
14577         Based on a patch by Derek Price <derek@ximbiot.com>.
14578
14579 2005-05-21  Jim Meyering  <jim@meyering.net>
14580
14581         * modules/fts (Files): Add m4/inttypes-pri.m4.
14582         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14583
14584 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14585
14586         New fts module.
14587         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14588         (setup_dir, free_dir): New functions.
14589         (enter_dir, leave_dir): Define trivial
14590         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14591         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14592         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14593         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14594         Move to fts-cycle.c.
14595         (fts_open): Use setup_dir.
14596         (fts_close): Use free_dir.
14597         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14598         This adds a label and some gotos, but the alternatives were messier.
14599         Check for memory allocation failure when entering a dir.
14600         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14601         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14602         (FTS): New member fts_cycle, that is a union that contains the
14603         old active_dir_ht and cycle_state.  All uses changed to mention
14604         fts_cycle.ht and fts_cycle.state.
14605         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14606         fts.c, with the following changes:
14607         (setup_dir, free_dir): New functions.
14608         (enter_dir): Now returns bool.  Return true if successful, false
14609         if memory exhausted.  All callers changed.
14610         Do not bother partly cleaning up on
14611         memory allocation failure; that is free_dir's job.
14612         However, free ad if hash_insert fails, to avoid memory leak.
14613         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14614         fts->fts_options to see which union member to use.
14615
14616 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14617
14618         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14619         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14620
14621 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14622
14623         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14624
14625 2005-05-20  Jim Meyering  <jim@meyering.net>
14626
14627         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14628         Now a macro, to pacify GCC.
14629
14630 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14631
14632         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14633         of -1.
14634
14635 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14636
14637         * lib/chown.c (rpl_chown): Return -1 on failure.
14638
14639 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14640
14641         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14642         Don't check for stddef.h.
14643         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14644         don't use its results.
14645         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14646         since we include them unconditionally.  Don't require
14647         AM_STDBOOL_H, since stdbool is a prerequisite.
14648         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14649         since we assume C89 or better.
14650         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14651         as we don't use their results.
14652         Don't check for fchdir, memmove, memset, strrchr, as we use
14653         them unconditionally.
14654         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14655         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14656
14657 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14658
14659         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14660         Include <stddef.h> unconditionally, since we assume C89 now.
14661         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14662         * lib/fts.c: Include fts_.h first, to check interface.
14663         Do not include intprops.h; no longer needed.
14664         Include cycle-check.h and hash.h, since fts_.h no longer does.
14665         Remove unnecessary casts of closedir to void.
14666         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14667         decide whether to decrement nlinks.
14668         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14669         (FTS): Use struct hash_table * instead of Hash_table, so that
14670         we no longer need to include hash.h here.
14671
14672 2005-05-18  Jim Meyering  <jim@meyering.net>
14673
14674         * modules/dirfd (License): Change to LGPL.  Most of the code
14675         is already in the public domain.
14676
14677 2005-05-18  Jim Meyering  <jim@meyering.net>
14678
14679         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14680         Reported by Yoann Vandoorselaere.
14681
14682 2005-05-17  Jim Meyering  <jim@meyering.net>
14683
14684         * m4/fts.m4: New file, from coreutils.
14685
14686 2005-05-17  Jim Meyering  <jim@meyering.net>
14687
14688         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14689
14690 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14691
14692         Sync from coreutils.
14693         * m4/unlinkdir.m4: New file.
14694
14695 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14696
14697         Sync from coreutils.
14698         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14699         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14700         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14701         White space changes only.
14702         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14703         special.
14704         * lib/yesno.c: Include getline.h, not ctype.h.
14705         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14706         Use getline to remove arbitrary restriction on response length.
14707
14708 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14709
14710         * config/srclist-update: Spell out "Street" in FSF postal
14711         mail address; this is the style the FSF seems to prefer.
14712
14713         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14714         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14715         this updates FSF postal mail address.
14716
14717         Sync from coreutils.
14718         * modules/unlinkdir: New file.
14719         * modules/yesno (Depends-on): Add getline.
14720         * MODULES.html.sh (File system functions): Add unlinkdir.
14721
14722 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14723
14724         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14725         lib/strsep.h:
14726         Change the initial comment to refer to GPL, not LGPL.
14727         gnulib-tool will change it to LGPL as needed.
14728
14729         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14730         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14731         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14732         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14733         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14734         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14735         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14736         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14737         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14738         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14739         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14740         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14741         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14742         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14743         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14744         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14745         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14746         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14747         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14748         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14749         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14750         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14751         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14752         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14753         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14754         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14755         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14756         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14757         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14758         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14759         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14760         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14761         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14762         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14763         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14764         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14765         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14766         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14767         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14768         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14769         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14770         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14771         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14772         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14773         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14774         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14775         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14776         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14777         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14778         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14779         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14780         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14781         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14782         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14783         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14784         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14785         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14786         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14787         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14788         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14789         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14790         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14791         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14792         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14793         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14794         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14795         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14796         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14797         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14798         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14799         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14800         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14801         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14802         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14803         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14804         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14805         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14806         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14807         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14808         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14809         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14810         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14811         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14812         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14813         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14814         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14815         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14816         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14817         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14818         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14819         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14820         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14821         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14822         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14823         lib/yesno.c, lib/yesno.h:
14824         Update FSF postal mail address.
14825
14826 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14827
14828         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14829         tests/test-memmem.c, tests/test-stpncpy.c:
14830         Update FSF postal mail address.
14831
14832 2005-05-13  Bruno Haible  <bruno@clisp.org>
14833
14834         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14835         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14836         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14837         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14838         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14839         Add support for 64-bit integers in the MSVC compiler.
14840
14841 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14842
14843         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14844
14845 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14846
14847         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14848
14849 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14850
14851         * doc/getdate.texi (General date syntax): Don't say that date
14852         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14853         Problem reported by Nic Ferrier.
14854
14855 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14856
14857         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14858         specified in ai_socktype. Fix invalid ai_protocol
14859         check. ai_protocol is usually set to 0 or depending on
14860         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14861         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14862         ai_socktype / ai_protocol in the returned addrinfo structure.
14863
14864 2005-05-10  Simon Josefsson  <jas@extundo.com>
14865
14866         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14867         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14868
14869 2005-05-10  Karl Berry  <karl@gnu.org>
14870
14871         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14872         (from http://www.gnu.org/licenses).
14873         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14874         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14875         fdl.texi suffices.
14876
14877 2005-05-10  Karl Berry  <karl@gnu.org>
14878
14879         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14880         (COPYING.DOC): remove.
14881
14882         * config/srclist-update: new FSF address.
14883
14884 2005-05-10  Derek Price  <derek@ximbiot.com>
14885
14886         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14887         possible.
14888
14889 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14890             Bruno Haible  <bruno@clisp.org>
14891
14892         * modules/inet_ntop: New file.
14893         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14894         inet_ntop.
14895
14896 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14897             Bruno Haible  <bruno@clisp.org>
14898
14899         * m4/inet_ntop.m4: New file.
14900
14901 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14902             Bruno Haible  <bruno@clisp.org>
14903
14904         * lib/inet_ntop.h: New file.
14905         * lib/inet_ntop.c: New file, from glibc with modifications.
14906
14907 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14908
14909         * modules/time_r (License): Change to LGPL.
14910         * modules/extensions (License): Change to LGPL.  Actually,
14911         the license is more permissive than that, but currently gnulib-tool
14912         doesn't know how to handle more-permissive licenses.
14913
14914         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
14915         Problem reported by Dave Love.
14916
14917 2005-05-08  Jim Meyering  <jim@meyering.net>
14918
14919         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
14920         blank.
14921
14922 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14923
14924         * modules/argmatch (Depends-on): Add stdbool.
14925         * modules/backupfile (Depends-on): Likewise.
14926         * modules/chdir-long (Depends-on): Likewise.
14927         * modules/closeout (Depends-on): Likewise.
14928         * modules/cycle-check (Depends-on): Likewise.
14929         * modules/dirname (Depends-on): Likewise.
14930         * modules/fnmatch (Depends-on): Likewise.
14931         * modules/fsusage (Depends-on): Likewise.
14932         * modules/fwriteerror (Depends-on): Likewise.
14933         * modules/getcwd (Depends-on): Likewise.
14934         * modules/getloadavg (Depends-on): Likewise.
14935         * modules/hard-locale (Depends-on): Likewise.
14936         * modules/makepath (Depends-on): Likewise.
14937         * modules/mountlist (Depends-on): Likewise.
14938         * modules/nanosleep (Depends-on): Likewise.
14939         * modules/posixtm (Depends-on): Likewise.
14940         * modules/quotearg (Depends-on): Likewise.
14941         * modules/readtokens (Depends-on): Likewise.
14942         * modules/readtokens0 (Depends-on): Likewise.
14943         * modules/readutmp (Depends-on): Likewise.
14944         * modules/save-cwd (Depends-on): Likewise.
14945         * modules/strftime (Depends-on): Likewise.
14946         * modules/userspec (Depends-on): Likewise.
14947         * modules/utimecmp (Depends-on): Likewise.
14948         * modules/xgetcwd (Depends-on): Likewise.
14949         * modules/xnanosleep (Depends-on): Likewise.
14950         * modules/xstrtod (Depends-on): Likewise.
14951         * modules/yesno (Depends-on): Likewise.
14952
14953 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14954
14955         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
14956         needless checks.
14957
14958 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14959
14960         Merge from coreutils.  Among other things,
14961         add bulletproofing for cases where stdin, stdout, or stderr are closed.
14962         * lib/fd-safer.c: New file.
14963         * lib/fcntl-safer.h, open-safer.c: Remove.
14964         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
14965         * lib/dup-safer.c: Include unistd-safer.h first.
14966         Don't include errno.h.
14967         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14968         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14969         * lib/file-type.c: Rely on file-type.h change.
14970         * lib/getloadavg.c: Include unistd-safer.h.
14971         (getloadavg): Use safer open.
14972         * lib/getusershell.c: Include "stdio-safer.h".
14973         (getusershell): Use safer fopen.
14974         * lib/long-options.c (long_options): Use NULL rather than 0.
14975         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14976         'free'.
14977         * lib/modechange.c: Likewise.
14978         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14979         (MODE_DONE): New constant.
14980         (struct mode_change): Remove 'next' member.
14981         (make_node_op_equals): New function; like the old one of the
14982         same name, except it allocates an array.
14983         (mode_compile, mode_create_from_ref): Use it.
14984         (mode_compile): Allocate result as an array, not a linked list.
14985         Parse octal string ourself, so that we catch mistakes like "+0".
14986         (mode_adjust): Arg is an array, not a linked list.
14987         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14988         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14989         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14990         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14991         Remove.  This is now stat-macros.h's job.
14992         (talloc): Remove.  All callers replaced by xalloc, so that
14993         our invokers don't have to worry about reporting memory failures.
14994         (make_node_op_equals): Remove.
14995         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14996         New constants.
14997         (struct mode_change): Moved here from modechange.h.
14998         (mode_append_entry): Remove.
14999         (mode_compile): Remove MASKED_OPS arg, since it encouraged
15000         apps to have incorrect behavior.  Use simpler algorithm for head
15001         and tail.  Don't futz with umask; that's now the job of mode_adjust.
15002         Detect more invalid usages rather than having somewhat-random behavior.
15003         Don't insert an "a=" action, as that leads to incorrect behavior.
15004         (mode_compile, mode_create_from_ref): Return NULL on error instead
15005         of an enum, since now there's only one way to have an error.  All
15006         callers changed.
15007         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
15008         at the correct time.  Simplify calculation of "+u" and its ilk.
15009         Don't mishandle "+X".
15010         (mode_free): Remove "register" and localize decls.
15011         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15012         (struct mode_change): Move to modechange.c; callers don't
15013         need to see this stuff.
15014         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
15015         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
15016         (mode_change, mode_adjust): Reflect the new signatures noted above.
15017         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
15018         that might redefine system include files.
15019         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
15020         (my_usleep): Use NULL rather than (void *) 0.
15021         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
15022         Use siginterrupt to specify that system calls should be interrupted.
15023         (rpl_nanosleep): Move initialization of suspended closer to call of
15024         my_usleep.
15025         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
15026         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
15027         (desirable_utmp_entry): New function.
15028         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
15029         using x2nrealloc, to simplify logic.
15030         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
15031         size calculation.  Do not assume utmp file is a regular file.
15032         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
15033         (READ_UTMP_CHECK_PIDS): New constant.
15034         * lib/save-cwd.c: Include unistd-safer.h.
15035         (save_cwd): Use fd_safer.
15036         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
15037         [!_LIBC] Include "stat-macros.h" instead.
15038         * lib/unistd-safer.h (fd_safer): New decl.
15039
15040 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15041
15042         * modules/getloadavg (Depends-on): Add unistd-safer.
15043         * modules/getusershell (Depends-on): Add stdio-safer.
15044         * modules/lstat (Depends-on): Remove xalloc.
15045         * modules/mkstemp (Depends-on): Add stat-macros.
15046         * modules/modechange (Depends-on): Remove xstrtol.
15047         Add stat-macros, xalloc.
15048         * modules/save-cwd (Depends-on): Add unistd-safer.
15049         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
15050         * modules/unistd-safer (Files): Add lib/fd-safer.c
15051         (Makefile.am): Remove lib_SOURCES.
15052
15053         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
15054         Remove fcntl-safer; unistd-safer supersedes it.
15055
15056 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15057
15058         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
15059         AC_HEADER_STAT.
15060         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
15061         (gl_PREREQ_CHOWN): Remove.
15062         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
15063         it.  Don't require AC_HEADER_STAT.
15064         (gl_PREREQ_LSTAT): Remove.
15065         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
15066         Don't require AC_HEADER_STAT.
15067         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
15068         (gl_PREREQ_RMDIR): Remove.
15069         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
15070         mention stat-macros.h or AC_HEADER_STAT, since we'll make
15071         the stat-macros module a prerequisite.
15072         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
15073         * m4/filemode.m4 (gl_FILEMODE): Likewise.
15074         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
15075         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
15076         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
15077         variable names.
15078         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
15079         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
15080         variable prefixes.
15081         * m4/fcntl-safer.m4: Remove.
15082         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
15083         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
15084         Invoke gl_PREREQ_FD_SAFER.
15085         (gl_PREREQ_FD_SAFER): New macro.
15086         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
15087         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
15088         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
15089         Remove duplicate call to AC_LIBOBJ(readutmp).
15090         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
15091
15092         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
15093         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
15094
15095 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15096
15097         * MODULES.html.sh (Misc): Add byteswap.
15098
15099 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15100
15101         * modules/getcwd (Depends-on): Add extensions.
15102         * modules/openat (Depends-on): Likewise.
15103
15104 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15105
15106         * modules/byteswap: New file.
15107
15108 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15109
15110         * m4/byteswap.m4: New file.
15111
15112 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15113
15114         * lib/byteswap_.h: New file.
15115
15116 2005-04-25  Karl Berry  <karl@gnu.org>
15117
15118         * m4/gettext.m4: Update from GNU gettext 0.14.4.
15119
15120 2005-04-25  Albert Chin  <china@thewrittenword.com>
15121
15122         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
15123         Toolkit C bug.
15124
15125 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
15126
15127         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
15128         (func_ln_if_changed) Remove forcibly for no error message
15129         in case file does not exist.
15130
15131 2005-04-19  Simon Josefsson  <jas@extundo.com>
15132
15133         * gnulib-tool (Options): Make --symlink mean --symbolic.
15134
15135 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
15136
15137         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
15138
15139 2005-04-16  Simon Josefsson  <jas@extundo.com>
15140
15141         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
15142
15143 2005-04-15  Simon Josefsson  <jas@extundo.com>
15144
15145         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
15146
15147 2005-04-15  Simon Josefsson  <jas@extundo.com>
15148
15149         * gnulib-tool: Rename --symlink to --symbolic.
15150
15151 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
15152
15153         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
15154         symbolic links to files instead of copying/moving.  Add --aux-dir,
15155         specifying directory relative --dir where auxiliary build tools
15156         are placed.
15157
15158 2005-04-14  Bruno Haible  <bruno@clisp.org>
15159
15160         * modules/allocsa (License): Change to LGPL.
15161         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
15162
15163 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15164
15165         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
15166         that "UTC +1 second" continues to work.  Problem reported
15167         by Dmitry V. Levin.
15168         (relunit_snumber): New rule.
15169         (relunit): Use it.
15170
15171 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
15172
15173         * lib/getdate.y (universal_time_zone_table): New constant.
15174         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
15175         universal_time_zone_table.
15176         (lookup_zone): Prefer universal_time_zone_table to
15177         local_time_zone_table, so that "GMT" time stamps are allowed in
15178         London during the summer.  Problem reported by Ian Abbott.
15179
15180 2005-04-12  Jim Meyering  <jim@meyering.net>
15181
15182         * lib/human.c (humblock): Set *options even when returning due to
15183         xstrtoumax conversion failure.  Thanks to a used-uninitialized
15184         warning from gcc-4.
15185
15186 2005-04-09  Jim Meyering  <jim@meyering.net>
15187
15188         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
15189         -Wuninitialized: initialize tm0.tm_year.
15190
15191 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
15192
15193         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
15194         count, since there's no maximum.  All uses changed.
15195         Add member dsts_seen.
15196         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
15197         not being INT_MAX.
15198         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
15199         Use pc_rels_seen to decide whther a date is absolute.
15200
15201         * lib/getdate.y (number): Don't overwrite year.
15202         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
15203         check.
15204
15205 2005-04-02  Simon Josefsson  <jas@extundo.com>
15206
15207         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
15208         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
15209
15210 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
15211
15212         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
15213         where no absolute path name can be longer than PATH_MAX.
15214
15215 2005-03-27  Jim Meyering  <jim@meyering.net>
15216
15217         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
15218
15219 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
15220
15221         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
15222         "one's complement" -> "ones' complement" in comment, as per Knuth.
15223         "value of type" -> "type or expression" in comment.
15224         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
15225
15226 2005-03-26  Jim Meyering  <jim@meyering.net>
15227
15228         Comment nits.
15229         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
15230         Correct typos: s/or/of/.
15231
15232 2005-03-26  Jim Meyering  <jim@meyering.net>
15233
15234         * modules/check-include-files: Move to ../ and rename to...
15235         * check-module: ...this.
15236
15237 2005-03-25  Jim Meyering  <jim@meyering.net>
15238
15239         * modules/xvasprintf (Files): Add xalloc.h.
15240
15241 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
15242
15243         * modules/gettext (Files): config/config.rpath ->
15244         build-aux/config.rpath
15245         * modules/iconv (Files): Likewise.
15246         Problem reported by Oskar Liljeblad.
15247
15248 2005-03-23  Jim Meyering  <jim@meyering.net>
15249
15250         * modules/check-include-files: New script to check for
15251         missing dependencies, multiple includes, etc.
15252
15253         * modules/c-strtold (Depends-on): Add xalloc.
15254         * modules/c-strtod (Depends-on): Add xalloc.
15255         * modules/hash (Depends-on): Add xalloc.
15256         (Files): Remove lib/xalloc.h.
15257
15258         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
15259         * modules/userspec (Files): Add lib/inttostr.h.
15260
15261 2005-03-23  Jim Meyering  <jim@meyering.net>
15262
15263         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
15264
15265 2005-03-22  Jim Meyering  <jim@meyering.net>
15266
15267         * modules/stat-macros: New module.
15268         * modules/canonicalize, modules/euidaccess, modules/file-type,
15269         * modules/filemode, modules/lchown, modules/makepath,
15270         * modules/rmdir, modules/stat: Depend on new stat-macros module
15271         rather than listing lib/stat-macros.h manually.
15272         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
15273
15274 2005-03-22  Jim Meyering  <jim@meyering.net>
15275
15276         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
15277
15278 2005-03-22  Bruno Haible  <bruno@clisp.org>
15279
15280         * config/srclist.txt: Replace target directory 'config' with
15281         'build-aux'.
15282         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
15283         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
15284         ../build-aux/.
15285
15286 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
15287
15288         * modules/chdir-long (Depends-on): Add mempcpy.
15289
15290         * modules/acl, modules/backupfile, modules/c-strtod,
15291         modules/c-strtold, modules/canon-host, modules/canonicalize,
15292         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
15293         modules/exclude, modules/exitfail, modules/file-type,
15294         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
15295         modules/getdate, modules/getline, modules/getpagesize,
15296         modules/getpass, modules/getugroups, modules/group-member,
15297         modules/hard-locale, modules/hash, modules/human, modules/idcache,
15298         modules/inttostr, modules/long-options, modules/makepath,
15299         modules/md5, modules/memcasecmp, modules/memcoll,
15300         modules/modechange, modules/mountlist, modules/path-concat,
15301         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
15302         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
15303         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
15304         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
15305         modules/strftime, modules/strndup, modules/strverscmp,
15306         modules/timespec, modules/unlocked-io, modules/userspec,
15307         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
15308         modules/yesno:
15309         Remove lib_SOURCES line from Makefile.am section, as this is now
15310         done automatically by the corresponding Autoconf macro.
15311
15312 2005-03-21  Jim Meyering  <jim@meyering.net>
15313
15314         Changes imported from coreutils.
15315
15316         * lib/cycle-check.c: Don't include xalloc.h.
15317
15318         * lib/path-concat.c: Don't include assert.h.
15319         (path_concat): Remove assertion that would have triggered
15320         for ABASE starting with more than one slash.
15321         Reported by Andreas Schwab.
15322
15323         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
15324         properly when ABASE is an absolute file name.
15325         Correct the description of this function.
15326         Include <assert.h>.
15327         Add an assertion and a test driver.
15328         This fixes a bug introduced on 2004-07-02.
15329         Andreas Schwab reported the resulting failure of cp --parents:
15330         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
15331
15332 2005-03-21  Jim Meyering  <jim@meyering.net>
15333
15334         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
15335         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
15336
15337 2005-03-21  Jim Meyering  <jim@meyering.net>
15338         and  Paul Eggert  <eggert@cs.ucla.edu>
15339
15340         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
15341         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
15342         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
15343         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
15344         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
15345         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
15346         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
15347         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
15348         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
15349         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
15350         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
15351         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
15352         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
15353         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
15354         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
15355         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
15356         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
15357         for these modules.
15358
15359 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
15360
15361         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
15362         (which shouldn't happen), generate nothing instead of returning 0
15363         immediately, so that nstrftime (NULL, ...) doesn't return 0.
15364
15365 2005-03-16  Bruno Haible  <bruno@clisp.org>
15366
15367         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
15368         HAVE_LONGLONG_64BIT.
15369
15370 2005-03-16  Bruno Haible  <bruno@clisp.org>
15371
15372         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
15373         HAVE_LONGLONG_64BIT.
15374
15375 2005-03-16  Bruno Haible  <bruno@clisp.org>
15376
15377         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
15378         HAVE_LONGLONG_64BIT.
15379
15380 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15381
15382         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15383         reliably distinguish strftime failure from empty output on POSIX
15384         hosts.
15385
15386 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15387
15388         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15389         (iconv_string): Don't guess a size-zero buffer, as that might cause
15390         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15391         result would be 'too large', where 'too large' is (heuristically)
15392         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15393         overflow concerns.  This will prevent some unwanted malloc failures
15394         when the inputs are very large.
15395
15396 2005-03-15  Karl Berry  <karl@gnu.org>
15397
15398         * config/srclist.txt (config.rpath): from gettext.
15399         * config/config.rpath: update.
15400
15401 2005-03-15  Bruno Haible  <bruno@clisp.org>
15402
15403         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15404         to 'negate'.
15405
15406         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15407         variable.
15408
15409         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15410         results.
15411
15412 2005-03-14  Simon Josefsson  <jas@extundo.com>
15413
15414         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15415         <fx@gnu.org>.
15416
15417 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15418
15419         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15420         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15421         intprops.h.
15422         * lib/strtol.c: Likewise.
15423
15424 2005-03-14  Jim Meyering  <jim@meyering.net>
15425
15426         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15427         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15428         to be nonzero so that we (and caller) can detect the difference
15429         between a valid zero-length expansion and an error return, even
15430         when the underlying strftime fails before writing anything into
15431         that location.
15432
15433 2005-03-14  Bruno Haible  <bruno@clisp.org>
15434
15435         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15436         Update from GNU gettext 0.14.3.
15437
15438 2005-03-10  Jim Meyering  <jim@meyering.net>
15439
15440         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15441
15442 2005-03-10  Jim Meyering  <jim@meyering.net>
15443
15444         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15445         so that this module works on systems without fchdir.
15446
15447 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15448
15449         Factor int-properties macros into a single file, except for
15450         glibc-related files.
15451         * lib/intprops.h: New file.
15452         * lib/getloadavg.c: Include it instead of limits.h.
15453         (INT_STRLEN_BOUND): Remove.
15454         * lib/human.c: Include intprops.h.
15455         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15456         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15457         302/1000.
15458         * lib/inttostr.h: Include intprops.h instead of limits.h.
15459         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15460         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15461         for consistency with intprops.h.
15462         (time_t_is_integer, twos_complement_arithmetic): Use them.
15463         * lib/sig2str.h: Include <signal.h>, intprops.h.
15464         (INT_STRLEN_BOUND): Remove.
15465         * lib/strftime.c (TYPE_SIGNED): Remove.
15466         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15467         * lib/strtol.c: Adjust comments to match intprops.h.
15468         * lib/userspec.c: Include intprops.h.
15469         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15470         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15471         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15472         instead of rolling our own expressions.
15473         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15474
15475         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15476         instead of int.
15477         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15478         the right thing even if adding 1900 would overflow.  Similarly
15479         for tm_mon + 1 and tm_yday + 1.
15480         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15481         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15482         (DO_SIGNED_NUMBER): New macro.
15483         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15484
15485 2005-03-07  Bruno Haible  <bruno@clisp.org>
15486
15487         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15488
15489 2005-03-07  Bruno Haible  <bruno@clisp.org>
15490
15491         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15492
15493 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15494
15495         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15496         (func_import): Only replace files via --import when they have actually
15497         changed.
15498
15499 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15500
15501         * m4/mmap-anon.m4: New file.
15502         * m4/pagealign_alloc.m4: New file.
15503
15504 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15505             Bruno Haible  <bruno@clisp.org>
15506
15507         * modules/pagealign_alloc: New file.
15508         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15509
15510 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15511             Bruno Haible  <bruno@clisp.org>
15512
15513         * lib/pagealign_alloc.h: New file.
15514         * lib/pagealign_alloc.c: New file.
15515
15516 2005-03-03  Bruno Haible  <bruno@clisp.org>
15517
15518         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15519         Use an all-permissive copyright notice, recommended by RMS.
15520
15521 2005-03-02  Bruno Haible  <bruno@clisp.org>
15522
15523         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15524         of AIX, the replacement has to be done only after <string.h> is
15525         included, therefore not in config.h. stpncpy.h does the replacement,
15526         and stpncpy.c uses it.
15527
15528 2005-03-02  Bruno Haible  <bruno@clisp.org>
15529
15530         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15531         stpncpy.c uses it.
15532
15533 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15534
15535         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15536         The workaround isn't strictly needed for POSIX conformance, and
15537         it's too much of a pain to configure and maintain.  We'll ask
15538         people to fix their kernels instead.
15539         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15540         (NANOSLEEP_BUG_WORKAROUND): Remove.
15541         (xnanosleep): Remove the workaround.
15542
15543 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15544
15545         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15546         Reported by Derek Price.
15547         (Include): Add "timespec.h".
15548
15549         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15550
15551 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15552
15553         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15554         to detect nanosleep bug.
15555
15556 2005-03-01  Bruno Haible  <bruno@clisp.org>
15557
15558         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15559
15560 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15561
15562         * modules/gethrxtime: New file.
15563         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15564         (Depends-on): Add gethrxtime.
15565         (configure.ac): Add gl_XNANOSLEEP.
15566         (Makefile.am): Remove lib_SOURCES line.
15567
15568 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15569
15570         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15571         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15572
15573 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15574
15575         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15576         * lib/timespec.h (gettime): Return void, since it always
15577         succeeds now.  All uses changed.
15578         * lib/gettime.c (gettime) Likewise.
15579         [HAVE_NANOTIME]: Prefer nanotime.
15580         Assume gettimeofday succeeds, as POSIX requires.
15581         Assime time () succeeds, since other code already does.
15582         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15583         (timespec_subtract): Remove.
15584         (NANOSLEEP_BUG_WORKAROUND): New constant.
15585         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15586         things considerably.  Use it only on GNU/Linux hosts, since the
15587         workaround shouldn't be needed elsewhere.
15588
15589 2005-02-24  Bruno Haible  <bruno@clisp.org>
15590
15591         * modules/gettext (Files): Add m4/glibc2.m4.
15592
15593 2005-02-24  Bruno Haible  <bruno@clisp.org>
15594
15595         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15596         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15597         * m4/progtest.m4:
15598         Update from GNU gettext 0.14.2.
15599         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15600
15601 2005-02-24  Bruno Haible  <bruno@clisp.org>
15602
15603         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15604         * lib/config.charset: Update from GNU gettext 0.14.2.
15605
15606 2005-02-24  Bruno Haible  <bruno@clisp.org>
15607
15608         * lib/gettext.h: Update from GNU gettext 0.14.2.
15609
15610 2005-02-23  Simon Josefsson  <jas@extundo.com>
15611
15612         * m4/iconvme.m4: New file.
15613
15614 2005-02-23  Jim Meyering  <jim@meyering.net>
15615
15616         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15617         change.
15618         Thanks to Bruno Haible for catching it.
15619
15620 2005-02-22  Simon Josefsson  <jas@extundo.com>
15621
15622         * modules/iconvme: New file.
15623
15624         * MODULES.html.sh: Add iconvme.
15625
15626 2005-02-22  Simon Josefsson  <jas@extundo.com>
15627
15628         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15629
15630 2005-02-22  Simon Josefsson  <jas@extundo.com>
15631
15632         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15633
15634 2005-02-22  Jim Meyering  <jim@meyering.net>
15635
15636         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15637         s/ifndef/ifdef/.
15638
15639 2005-02-20  Neil Conway  <neilc@samurai.com>
15640
15641         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15642         returned by OSX/Darwin if the specified buffer is not large
15643         enough for the hostname.
15644
15645 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15646
15647         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15648         pass it to _help, otherwise the latter coredumps trying to
15649         dereference state.root_argp.
15650
15651 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15652
15653         * modules/chdir-long (Depends-on): Add memrchr.
15654         * modules/memrchr (Files): Add lib/memrchr.h.
15655         (Include): "memrchr.h".
15656
15657 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15658
15659         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15660
15661 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15662
15663         * lib/memrchr.h: New file.
15664         * lib/chdir-long.c: Include it.
15665         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15666         Don't bother including stddef.h.
15667
15668 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15669
15670         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15671         inclusion.
15672         Include <sys/types.h>, for dev_t.
15673         (ME_DUMMY, ME_REMOTE): Move from here....
15674         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15675         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15676         Dmitry V. Levin.
15677         Include mountlist.h first, to test the interface.
15678
15679 2005-01-29  Bruno Haible  <bruno@clisp.org>
15680
15681         * lib/progname.c (program_name): Initialize.
15682         Needed when linking statically on MacOS X.
15683
15684 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15685
15686         Sync from coreutils.
15687         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15688         (Depends-on): Add c-strtod.
15689         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15690
15691 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15692
15693         Sync from coreutils.
15694         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15695
15696         Remove files that are specific to coreutils.
15697         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15698
15699 2005-01-28  Bruno Haible  <bruno@clisp.org>
15700
15701         * modules/javacomp: New file.
15702         * MODULES.html.sh (Java): Add javacomp.
15703
15704 2005-01-28  Bruno Haible  <bruno@clisp.org>
15705
15706         * m4/javacomp.m4: New file, from GNU gettext.
15707
15708 2005-01-28  Bruno Haible  <bruno@clisp.org>
15709
15710         * lib/javacomp.sh.in: New file, from GNU gettext.
15711         * lib/javacomp.h: New file, from GNU gettext.
15712         * lib/javacomp.c: New file, from GNU gettext.
15713
15714 2005-01-26  Simon Josefsson  <jas@extundo.com>
15715
15716         * lib/gai_strerror.c: Use GPL in header.
15717
15718 2005-01-26  Bruno Haible  <bruno@clisp.org>
15719
15720         * modules/javaexec: New file.
15721         * MODULES.html.sh (Java): Add javaexec.
15722
15723 2005-01-26  Bruno Haible  <bruno@clisp.org>
15724
15725         * m4/javaexec.m4: New file, from GNU gettext.
15726
15727 2005-01-26  Bruno Haible  <bruno@clisp.org>
15728
15729         * lib/javaexec.sh.in: New file, from GNU gettext.
15730         * lib/javaexec.h: New file, from GNU gettext.
15731         * lib/javaexec.c: New file, from GNU gettext.
15732
15733 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15734
15735         * modules/lchown (Depends-on): Remove lchown.h
15736
15737 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15738
15739         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15740         must be defined if the header file was not found, in order
15741         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15742
15743 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15744
15745         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15746         initializers for struct pentry_state.
15747         (__argp_error): Check return value of __asprintf
15748         (__argp_failure): Translate error message
15749
15750         * lib/argp-parse.c: Removed braces around the expansion of N_()
15751
15752 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15753
15754         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15755         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15756         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15757         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15758         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15759         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15760         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15761         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15762         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15763         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15764         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15765         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15766         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15767         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15768         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15769         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15770         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15771         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15772         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15773         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15774         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15775         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15776         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15777         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15778         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15779         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15780         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15781         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15782         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15783         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15784         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15785         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15786         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15787         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15788         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15789         Use an all-permissive copyright notice, recommended by RMS.
15790
15791 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15792
15793         * modules/chdir-long (Depends-on): Remove mempcpy.
15794
15795 2005-01-21  Jim Meyering  <jim@meyering.net>
15796
15797         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15798         same value as for Solaris 9.
15799
15800         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15801         component length.  This included changing the parameter to be
15802         of type `char *' rather than `char const *'.
15803         * lib/chdir-long.h (chdir_long): Update prototype.
15804
15805         * lib/openat.c (fdopendir, fstatat): New functions.
15806         * lib/openat.h: Include headers required for use of DIR and struct
15807         stat.
15808         [AT_SYMLINK_NOFOLLOW]: Define.
15809         (fdopendir, fstatat): Add prototypes.
15810
15811 2005-01-21  Bruno Haible  <bruno@clisp.org>
15812
15813         * modules/classpath: New file.
15814         * MODULES.html.sh (Java): Add classpath.
15815
15816 2005-01-21  Bruno Haible  <bruno@clisp.org>
15817
15818         * lib/classpath.h: New file, from GNU gettext.
15819         * lib/classpath.c: New file, from GNU gettext.
15820
15821 2005-01-20  Simon Josefsson  <jas@extundo.com>
15822
15823         * modules/version-etc-fsf: New file.
15824
15825 2005-01-20  Simon Josefsson  <jas@extundo.com>
15826
15827         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15828         * lib/version-etc.c: Remove version_etc_copyright.
15829         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15830         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15831
15832 2005-01-20  Simon Josefsson  <jas@extundo.com>
15833
15834         * lib/base64.h (isbase64): Add.
15835
15836         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15837         using a unsigned prototype, don't inline.
15838         (base64_decode): Use it.
15839
15840 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15841
15842         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15843         it.
15844
15845 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15846
15847         * lib/save-cwd.c (save_cwd): Remove code to support the case
15848         where fchdir is missing or flaky.
15849
15850 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15851
15852         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15853
15854 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15855
15856         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15857         AC_LIBSOURCES now does this.
15858         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15859         with new ullong_max module.
15860
15861 2005-01-19  Bruno Haible  <bruno@clisp.org>
15862
15863         * modules/sh-quote: New file.
15864         * MODULES.html.sh (Executing programs): Add sh-quote.
15865
15866 2005-01-19  Bruno Haible  <bruno@clisp.org>
15867
15868         * lib/sh-quote.h: New file, from GNU gettext.
15869         * lib/sh-quote.c: New file, from GNU gettext.
15870
15871 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15872
15873         Merge from coreutils.
15874         * m4/ullong_max.m4: New file.
15875         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15876         (gl_MACROS): Assume localeconv exists.
15877
15878 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15879
15880         Merge changes from coreutils, as described below in several
15881         changelogs dated today.
15882
15883         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15884         (O_DIRECTORY): Remove; not needed here, since "." must be
15885         a directory.  All uses removed.
15886         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15887         universal on Suns, and we also need to test for IRIX.
15888         Revamp code to use 'if' rather than '#if'.
15889         Avoid unnecessary comparison of cwd->desc to 0.
15890
15891         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15892         for known valid error numbers rather than observed invalid ones.
15893
15894 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15895
15896         * modules/ullong_max: New file.
15897
15898         * modules/chdir-long, modules/openat: New files.
15899         * modules/save-cwd (Depends-on): Depend on chdir-long.
15900         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15901
15902 2005-01-18  Jim Meyering  <jim@meyering.net>
15903
15904         Merge from coreutils.
15905         * m4/chdir-long.m4, m4/openat.m4: New files.
15906         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15907         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15908         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15909         is sane and DOES follow symlinks.  Besides, testing 20 different
15910         systems found no broken chown implementations.
15911         Prompted by a change in rsync's copy of this macro.
15912         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15913
15914         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
15915
15916         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
15917         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
15918         NULL-means-set-to-current-time semantics.
15919         Remove temporary file immediately, rather than waiting
15920         for configure's at-exit trap code to do it.
15921
15922 2005-01-18  Jim Meyering  <jim@meyering.net>
15923
15924         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15925
15926         * lib/utimens.c (futimens): Account for the fact that futimes
15927         can also fail with errno == ENOSYS or errno == ENOENT.
15928         Patch from Dmitry V. Levin.
15929
15930         Change the name of the robust chdir function from chdir to chdir_long.
15931         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
15932         (restore_cwd): Use chdir_long, not chdir.
15933         * lib/chdir-long.c: Renamed from chdir.c.
15934         * lib/chdir-long.h: Renamed from chdir.h.
15935         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
15936         Hurd.
15937
15938 2005-01-18  Bruno Haible  <bruno@clisp.org>
15939
15940         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
15941         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
15942         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
15943         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
15944         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
15945         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
15946         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
15947         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
15948         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
15949         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
15950         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
15951         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
15952         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
15953         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
15954         Use an all-permissive copyright notice, recommended by RMS.
15955
15956 2005-01-18  Bob Proulx  <bob@proulx.com>
15957
15958         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
15959         simplify offsetof() macro construct to avoid compile failure with
15960         native HP-UX 11.0 ANSI C compiler.
15961
15962 2005-01-17  Bruno Haible  <bruno@clisp.org>
15963
15964         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
15965         redundant because stpncpy.m4 takes care of it.
15966
15967 2005-01-17  Bruno Haible  <bruno@clisp.org>
15968
15969         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15970
15971 2005-01-17  Bruno Haible  <bruno@clisp.org>
15972
15973         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15974         used.
15975
15976 2005-01-17  Bruno Haible  <bruno@clisp.org>
15977
15978         * lib/fwriteerror.h (fwriteerror): Change specification to include
15979         fclose.
15980         * lib/fwriteerror.c: Include <stdbool.h>.
15981         (fwriteerror): At the end, close the file stream. Record whether
15982         stdout was already closed.
15983
15984 2005-01-17  Bruno Haible  <bruno@clisp.org>
15985
15986         * lib/execute.c (environ): Declare if needed.
15987         * lib/pipe.c (environ): Likewise.
15988         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15989
15990 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15991
15992         * modules/argp: Depend on vsnprintf
15993
15994 2005-01-10  Jim Meyering  <jim@meyering.net>
15995
15996         * modules/closeout (Depends-on): Add atexit.
15997
15998 2005-01-06  Bruno Haible  <bruno@clisp.org>
15999
16000         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
16001
16002 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16003
16004         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
16005         definitions to be after all include files, to avoid collisions.
16006         Problem reported by Bob Proulx.
16007
16008 2005-01-04  Jim Meyering  <jim@meyering.net>
16009
16010         Changes imported from coreutils.
16011         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
16012         as the mkstemp template, use a temporary directory and an
16013         8.3-friendly template to avoid trouble on systems like DJGPP.
16014         Reported by Juan M. Guerrero via Stepan Kasal.
16015         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
16016         close. Remove the temporary directory right away, rather than waiting
16017         for configure's at-exit trap code to do it.
16018         Suggestion from Stepan Kasal.
16019
16020 2005-01-01  Simon Josefsson  <jas@extundo.com>
16021
16022         * gnulib-tool: Print #include directives when --import'ing.
16023
16024 2004-12-28  Simon Josefsson  <jas@extundo.com>
16025
16026         * tests/test-base64.c: Include required header files.  Remove
16027         unused variables.
16028
16029 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16030
16031         * modules/error (Depends-on): Remove gettext.
16032
16033 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16034
16035         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
16036         not needed.  This removes a dependency on the gettext module.
16037         [defined _LIBC]: Do not include <libintl.h>; not needed.
16038
16039 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16040
16041         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
16042         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
16043
16044 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16045
16046         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
16047         HAVE_DECL_STRTOLD.
16048
16049 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16050
16051         * modules/getdate (Depends-on): Remove alloca-opt.
16052
16053 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16054
16055         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
16056
16057 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16058
16059         * lib/argp-parse.c: Include <stddef.h>.
16060         (alignof, alignto): New macros.
16061         (parser_init): Don't assume that void * is aligned sufficiently
16062         for struct option.
16063
16064         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
16065         need to extend the stack.
16066         (YYINITDEPTH): New macro, so that the initial stack isn't overly
16067         large.
16068
16069 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16070
16071         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
16072
16073 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16074
16075         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
16076         (2004-10-24) change.  Apparently this was a false alarm.
16077
16078         * modules/getdate: Depend on alloca-opt, not alloca.
16079
16080 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16081
16082         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
16083         Remove now-obsolete comment about AIX.
16084         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
16085         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
16086         (YYMAXDEPTH): New macro.
16087
16088 2004-12-18  Simon Josefsson  <jas@extundo.com>
16089
16090         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
16091
16092 2004-12-18  Bruno Haible  <bruno@clisp.org>
16093
16094         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
16095
16096 2004-12-18  Bruno Haible  <bruno@clisp.org>
16097
16098         * lib/fatal-signal.c (fatal_signals): Make non-const.
16099         (init_fatal_signals): New function.
16100         (uninstall_handlers, install_handlers): Ignore signals that were set to
16101         SIG_IGN.
16102         (at_fatal_signal): Call init_fatal_signals.
16103         (init_fatal_signal_set): Likewise. Ignore signals that were set to
16104         SIG_IGN.
16105         Reported by Paul Eggert.
16106
16107 2004-12-18  Bruno Haible  <bruno@clisp.org>
16108
16109         * doc/alloca.texi: New file.
16110         * doc/alloca-opt.texi: New file.
16111
16112 2004-12-17  Jim Meyering  <jim@meyering.net>
16113
16114         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
16115         Otherwise, install-sh could exit with improper exit status when
16116         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
16117
16118 2004-12-16  Simon Josefsson  <jas@extundo.com>
16119
16120         * tests/test-base64.c: Add license.
16121
16122 2004-12-15  Stepan Kasal  <address@hidden>
16123
16124         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
16125
16126 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
16127
16128         * modules/getcwd (Files): Add m4/d-ino.m4.
16129         Suggested by Mark D. Baushke.
16130
16131 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
16132
16133         * lib/getdate.y (textint): New member "negative".
16134         (time_zone_hhmm): New function.
16135         Expect 14 shift-reduce conflicts, not 13.
16136         (o_colon_minutes): New rule.
16137         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
16138         (yylex): Set the "negative" member of signed numbers.
16139
16140 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
16141
16142         * doc/getdate.texi (Time of day items, Time zone items):
16143         Describe new formats +00:00, UTC+00:00.
16144
16145 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16146
16147         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
16148         spurious "-l"s.  Problem reported by Stepan Kasal.
16149
16150 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
16151
16152         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
16153         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
16154
16155 2004-12-04  Simon Josefsson  <jas@extundo.com>
16156
16157         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
16158         Vandoorselaere <yoann@prelude-ids.org>.
16159
16160 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16161
16162         Changes imported from coreutils.
16163         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
16164         exist.
16165         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
16166
16167 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16168
16169         Changes imported from coreutils.
16170         * lib/hard-locale.c: Assume <locale.h> exists.
16171         Include "strdup.h".
16172         (GLIBC_VERSION): New macro.
16173         (hard_locale): Assume setlocale exists.
16174         Rewrite to avoid #ifdef.
16175         Use strdup rather than malloc + strcpy.
16176         * lib/human.c: Assume <locale.h> exists.
16177         (human_readable): Assume localeconv exists.
16178
16179 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16180
16181         * modules/hard-locale (Depends-on): Add strdup.
16182
16183 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
16184
16185         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
16186         convert T2, not T.  (Imported from libc.)
16187
16188 2004-11-30  Simon Josefsson  <jas@extundo.com>
16189
16190         * modules/restrict (License): Change to LGPL.
16191
16192 2004-11-30  Simon Josefsson  <jas@extundo.com>
16193
16194         * m4/restrict.m4: Add copyright and copying conditions.
16195
16196 2004-11-30  Simon Josefsson  <jas@extundo.com>
16197
16198         * m4/base64.m4: New file.
16199
16200 2004-11-30  Simon Josefsson  <jas@extundo.com>
16201
16202         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
16203         base64.
16204
16205         * tests/test-base64.c: New file.
16206
16207         * modules/base64: New file.
16208
16209 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16210
16211         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
16212         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
16213
16214         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
16215
16216 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16217
16218         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
16219         (__getcwd.c): Don't restore errno; glibc doesn't.
16220         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
16221         first, falling back to our code only if its results look suspicious.
16222         Ensure that the resulting buffer is only as large as necessary.
16223
16224         * lib/readutmp.c: Include readutmp.h first.
16225         Include <errno.h>, since readutmp.h no longer does that.
16226         * lib/readutmp.h: Don't include <errno.h>,
16227         <sys/param.h>, <time.h>; not needed to establish interface.
16228         (errno): Remove decl.
16229         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
16230         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
16231         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
16232
16233 2004-11-28  Simon Josefsson  <jas@extundo.com>
16234
16235         * lib/base64.h, base64.c: New file.
16236
16237 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
16238
16239         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
16240
16241 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
16242
16243         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
16244         (Depends-on): Remove pathmax, same.  Add mempcpy.
16245         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
16246         (Makefile.am): Append getcwd.h to lib_SOURCES.
16247         (Include): Add getcwd.h.
16248         (Maintainer): Change from Jim Meyering to "all, glibc",
16249         since getdate now uses intended-for-glibc code.
16250         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
16251         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
16252
16253 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16254
16255         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
16256         HP's ANSI C compiler.
16257         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
16258         Declaring int functions causes warnings on some modern systems and
16259         shouldn't be needed to compile on ancient ones.
16260         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
16261         defined.
16262
16263         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
16264         with the following changes.
16265         (__set_errno): Parenthesize properly.
16266         Include <stdbool.h>.
16267         (MIN, MAX, MATCHING_INO): New macros.
16268         (__getcwd): Define with prototype, not K&R form.
16269         Use heuristics to allocate default buffer on stack if possible.
16270         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
16271         behavior, and to avoid the PATH_MAX limit when computing
16272         ../../../../...
16273         Use MATCHING_INO to compare inode number to file.
16274         Check for arithmetic overflow in size calculations.
16275         Fix bug in reallocation of dot array that caused getcwd to fail
16276         on directories nested deeper than 75.
16277         Be more careful about saving errno on error.
16278         Do not use realloc; use only free+malloc, as this is a bit
16279         more flexible and avoids a needless copy operation.
16280         Do not inspect st_dev and st_ino for symbolic links; POSIX
16281         doesn't specify the latter.
16282         Check for closedir errors.
16283         Avoid needless casts.
16284         Use "#ifdef weak_alias" around weak_alias, to be like other
16285         glibc code.
16286         The following changes to getcwd.c have effect only when used in
16287         gnulib; they have no effect inside glibc proper.
16288         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
16289         as alloca isn't used.
16290         (alloca, __alloca): Likewise.
16291         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
16292         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16293         unconditionally, as gnulib assumes C89 or better.
16294         Do not include <sys/param.h>.
16295         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
16296         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
16297         better.
16298         (NULL) [!defined NULL]: Remove; we assume C89 or better.
16299         Include <dirent.h> in a way that is compatible with modern Autoconf.
16300         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
16301         New macros, if not already defined.
16302         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
16303         Use "_LIBC", not "defined _LIBC", for consistency.
16304         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
16305         a mempcpy module.
16306         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
16307         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
16308         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
16309         credit only to Jim Meyering and adjust the copyright dates.
16310         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
16311         <stdlib.h>, <unistd.h>, "pathmax.h".
16312         Instead, include "xgetcwd.h" (first) and "getcwd.h".
16313         (INITIAL_BUFFER_SIZE): Remove.
16314         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
16315
16316 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16317
16318         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
16319         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
16320         Use the _ONCE methods, for efficiency.
16321         Check for fcntl.h.  In test program, include <errno.h>
16322         and <fcntl.h> if available.  Remove old K&R cruft from
16323         test program.  Check for common errors in GNU/Linux,
16324         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
16325         don't do AC_LIBOBJ, as that's getcwd.m4's job.
16326         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
16327         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
16328         name accordingly.
16329         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
16330         accommodate new getcwd.c.
16331         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
16332         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
16333         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
16334         that's all we need now.
16335
16336 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16337
16338         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
16339         argp-parse.c depends on getopt internals, that means we should
16340         always use our getopt, to be on the safe side.
16341         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
16342         order not to spoil the result of an eventual previous invocation
16343         of gl_GETOPT_SUBSTITUTE.
16344
16345 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16346
16347         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
16348         redefinition warnings. To avoid them, include the defines
16349         in `#if !defined __need_getopt ... #endif'. The only place
16350         where __getopt_argv_const is used is in definitions
16351         of getopt_long and getopt_long_only below, which are as well
16352         protected by `#ifndef __need_getopt'.
16353         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
16354         __need_getopt after including <stdio.h> and <unistd.h> These
16355         headers might have defined it.
16356
16357 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16358
16359         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
16360
16361 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16362
16363         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
16364         (futimens): New function, which uses futimes if available.
16365         (futimens, utimens): Support timespec==NULL, with same semantics
16366         as utime and utimens.
16367         * lib/utimens.h (futimens): New decl.
16368
16369 2004-11-23  Jim Meyering  <jim@meyering.net>
16370
16371         * lib/getopt_.h: Remove trailing blanks.
16372
16373 2004-11-23  Jim Meyering  <jim@meyering.net>
16374
16375         * lib/__fpending.c: Add comment.
16376
16377 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
16378
16379         * modules/canonicalize (Depends-on): Add xreadlink.
16380         Problem reported by James Youngman.
16381
16382 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16383
16384         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16385         New macros.
16386         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16387         optopt): Use them instead of invoking ## directly; otherwise, the
16388         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16389
16390 2004-11-19  Bruno Haible  <bruno@clisp.org>
16391
16392         * lib/strtok_r.c: Move comments from here...
16393         * lib/strtok_r.h: ... to here.
16394
16395 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16396
16397         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16398         implementations that mishandle size_t overflow.
16399
16400 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16401
16402         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16403         might fail.  Problem reported by Yoann Vandoorselaere.
16404         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16405         implementations that mishandle size_t overflow.
16406
16407 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16408
16409         * modules/canon-host (Depends-on): Add strdup.
16410
16411 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16412
16413         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16414
16415 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16416
16417         * lib/canon-host.c: Include "strdup.h".
16418         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16419         Use strdup instead of malloc/strcpy to duplicate strings.
16420
16421         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16422         (human_space_before_unit): New constant.
16423         * lib/human.c (human_readable): Support it.
16424
16425         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16426         (xgetcwd): Set errno correctly when failing.
16427         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16428         the failure is actually due to a PATH_MAX problem.
16429
16430         Further getopt changes to make it more likely that glibc will
16431         buy the changes back.
16432         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16433         (getopt): Use it, so to preserve glibc semantic
16434         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16435         when compiling for libc.
16436         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16437         (getopt_long, getopt_long_only): Use it.
16438
16439         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16440         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16441         (getopt): Argv is now char * const *, as per standard.
16442         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16443         not char *__getopt_argv_const *.
16444         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16445         _getopt_long_only_r): Likewise.
16446         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16447         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16448         _getopt_long_r, _getopt_long_only_r): Likewise.
16449         * lib/getopt_.h (__getopt_argv_const): Remove.
16450         (getopt): Argv is now char * const *, as per standard.
16451
16452         * lib/getdate.y (tORDINAL): New token.
16453         (day, relunit): Allow it for relative times.
16454         (relative_time_table): Use tORDINAL for ordinals.
16455
16456 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16457
16458         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16459         Document that "second" isn't allowed as an ordinal number.
16460
16461 2004-11-16  Jim Meyering  <jim@meyering.net>
16462
16463         * modules/closeout (Depends-on): Add fpending.
16464
16465 2004-11-15  Jim Meyering  <jim@meyering.net>
16466
16467         * lib/closeout.c: Include "__fpending.h" once again.
16468         Include <stdbool.h>.
16469         (close_stdout): Don't fail just because stdout was closed initially,
16470         since some programs don't write to stdout in the normal course of
16471         operation (other than --version and --help), and we don't want this
16472         function to make e.g. `touch file >&-' fail.
16473         But do fail if it was closed and someone has tried to write to it.
16474         E.g., `printf foo >&-' must fail.
16475
16476 2004-11-13  Jim Meyering  <jim@meyering.net>
16477
16478         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16479
16480 2004-11-12  Simon Josefsson  <jas@extundo.com>
16481
16482         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16483         small doc fix is still pending.
16484
16485 2004-11-11  Simon Josefsson  <jas@extundo.com>
16486
16487         * modules/strtok_r: New file.
16488
16489         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16490         strtok_r.
16491
16492 2004-11-11  Simon Josefsson  <jas@extundo.com>
16493
16494         * m4/strtok_r.m4: New file.
16495
16496         * m4/getopt.m4: Replace opterr.
16497
16498 2004-11-11  Simon Josefsson  <jas@extundo.com>
16499
16500         * lib/strtok_r.h, strtok_r.c: New file.
16501
16502 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16503
16504         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16505         of replacing opterr, getopt, etc.  This should handle the
16506         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16507
16508 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16509
16510         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16511         we can stop lying to compilers about the constness of argv when we
16512         are compiled outside glibc.
16513         (getopt, getopt_long, getopt_long_only): Use it.
16514         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16515         _getopt_internal, getopt): Likewise.
16516         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16517         _getopt_long_only_r): Likewise.
16518         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16519         _getopt_long_r, _getopt_long_only_r): Likewise.
16520
16521         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16522         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16523         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16524         the other external symbols.
16525         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16526         declaration, since the above renaming now works around collisions.
16527
16528 2004-11-11  Jim Meyering  <jim@meyering.net>
16529
16530         * lib/linebreak.c: Remove trailing blanks.
16531         * lib/alloca_.h: Likewise.
16532         * lib/acosl.c: Likewise.
16533         * lib/euidaccess.c: Likewise.
16534         * lib/allocsa.h: Likewise.
16535
16536 2004-11-10  Simon Josefsson  <jas@extundo.com>
16537
16538         * m4/getaddrinfo.m4: New file.
16539
16540 2004-11-10  Simon Josefsson  <jas@extundo.com>
16541
16542         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16543
16544 2004-11-10  Simon Josefsson  <jas@extundo.com>
16545
16546         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16547         getaddrinfo.
16548
16549         * modules/getaddrinfo: New file.
16550
16551 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16552
16553         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16554
16555 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16556
16557         * lib/mktime.c (SHR): New macro, which is a portable
16558         substitute for >> that should work even on Crays.
16559         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16560         Problem reported by Mark D. Baushke in
16561         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16562         * lib/getdate.y (SHR): Likewise.
16563         (tm_diff): Use it.
16564         * lib/strftime.c (SHR): Likewise.
16565         (tm_diff): Use it.
16566         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16567         quote_these_too, so that right shifts are well defined.  All uses
16568         changed.
16569
16570 2004-11-10  Jim Meyering  <jim@meyering.net>
16571
16572         Ensure that no close failure goes unreported.
16573         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16574         return early when it seems there's nothing to flush.
16575         Don't include __fpending.h.
16576
16577 2004-11-10  Jim Meyering  <jim@meyering.net>
16578
16579         * modules/closeout (Depends-on): Remove fpending.
16580
16581 2004-11-10  Jim Meyering  <jim@meyering.net>
16582
16583         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16584
16585 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16586
16587         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16588         gl_FUNC_STRFTIME.
16589         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16590         and AC_REQUIRE when possible, to avoid duplicate checks.
16591         Check for <wchar.h>.
16592
16593 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16594
16595         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16596
16597 2004-11-09  Bruno Haible  <bruno@clisp.org>
16598
16599         * m4/sockpfaf.m4: New file.
16600
16601 2004-11-05  Bruno Haible  <bruno@clisp.org>
16602
16603         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16604         Reported by Mark D. Baushke <mdb@cvshome.org>.
16605
16606 2004-11-04  Bruno Haible  <bruno@clisp.org>
16607
16608         2004-09-11  Bruno Haible  <bruno@clisp.org>
16609                 * allocsa.valgrind: New file.
16610         2004-02-06  Bruno Haible  <bruno@clisp.org>
16611                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16612                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16613                 Reported by Christopher Seip <chris.seip@hp.com>.
16614
16615 2004-11-04  Bruno Haible  <bruno@clisp.org>
16616
16617         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16618         (Makefile.am): Distribute it.
16619
16620 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16621
16622         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16623         with errno == ERANGE if the buffer is too small.
16624         Problem reported by Mark D. Baushke.
16625
16626 2004-11-03  Albert Chin  <china@thewrittenword.com>
16627             Paul Eggert  <eggert@cs.ucla.edu>
16628
16629         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16630         equivalent, substitute $ac_type for equivalent type rather than
16631         blindly using uint32_t *always* which won't work if uint32_t is not
16632         available.  Define _UINT32_T to work around typedef of uint32_t if
16633         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16634         2.5.1.
16635
16636 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16637
16638         * m4/jm-macros.m4: Sync from coreutils.
16639         (gl_MACROS): Check for mbrlen, for pathchk.
16640         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16641
16642 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16643
16644         * lib/xreadlink.c (MAXSIZE): New macro.
16645         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16646         size does not exceed MAXSIZE.  Avoid cast.
16647         As suggested by Mark D. Baushke in
16648         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16649         if readlink fails with buffer size just under MAXSIZE, try again
16650         with MAXSIZE.
16651
16652 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16653
16654         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16655
16656 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16657         and  Paul Eggert  <eggert@cs.ucla.edu>
16658
16659         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16660         (get_date): Overparenthesize to avoid GCC warning.
16661
16662 2004-11-02  Bruno Haible  <bruno@clisp.org>
16663
16664         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16665         returns void.
16666
16667 2004-11-02  Bruno Haible  <bruno@clisp.org>
16668
16669         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16670         function returns void.
16671
16672 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16673
16674         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16675         fflush_unlocked, flockfile, funlockfile, funlockfile,
16676         fputs_unlocked, putc_unlocked.
16677
16678 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16679
16680         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16681         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16682         already declared.
16683
16684 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16685
16686         * modules/getdate (Files): Add doc/getdate.texi.
16687         (Depends-on): Add setenv, xalloc.
16688
16689 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16690
16691         * lib/getdate.y: Add support for TZ="foo" within a date string.
16692         Fix some bugs near time_t boundaries.  Reject dates with
16693         out-of-range components, e.g., "Sept 31".
16694         Include <stdlib.h>, "setenv.h", "xalloc.h".
16695         (ISDIGIT_LOCALE): Remove; unused.
16696         Note that the TZ and time functions used here are not reentrant.
16697         (mktime_ok, get_tz): New functions.
16698         (TZBUFSIZE): New constant.
16699         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16700         This requires that we sometimes generate our own TZ="XXX..." setting.
16701
16702 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16703
16704         * doc/getdate.texi: New file, from coreutils with modifications for
16705         the new TZ parsing.
16706
16707 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16708
16709         * lib/mktime.c (not_equal_tm): Remove redundant check.
16710
16711 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16712
16713         * modules/regex (lib_SOURCES): Add regex.c.
16714         Reported by James Youngman in
16715         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16716
16717 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16718
16719         * lib/getdate.y: Use Bison 1.875 features, and some minor
16720         code cleanups.  This change does not affect semantics.
16721         Don't include <stdlib.h>; no longer needed.
16722         Don't include unlocked-io.h; only the "#if TEST" code uses
16723         stdio, and performance isn't crucial there.
16724         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16725         Bison 1.875 features as described below.
16726         All uses of "PC." replaced by "pc->".
16727         (YYSTYPE): Add a forward declaration.
16728         (yylex, yyerror): Use full prototypes in forward decls.
16729         Use "%pure-parser" rather than obsolescent "%pure_parser".
16730         Use %parse-param and %lex-param instead of obsolescent
16731         YYPARSE_PARAM and YYLEX_PARAM.
16732         (meridian_table, month_and_day_table, time_units_table,
16733         relative_time_table, time_zone_table, military_table,
16734         lookup_zone, lookup_word, get_date):
16735         Use NULL instead of 0 where appropriate.
16736         (to_hour): Avoid abort (), to avoid a dependency on
16737         stdlib.h.
16738         (yyerror, yylex): Now accepts parser_control * arg.
16739         (main) [TEST]: Use '\0' rather than 0 for char.
16740
16741 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16742
16743         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16744
16745 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16746
16747         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16748         It's now the caller's responsibility to handle the case where
16749         !HAVE_GETPAGESIZE && !defined getpagesize.
16750
16751         * lib/mktime.c (leapyear): Arg is long int, not int.
16752
16753 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16754
16755         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16756
16757 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16758
16759         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16760         missing.  Problem reported by James Youngman.
16761
16762 2004-10-16  Simon Josefsson  <jas@extundo.com>
16763
16764         * gnulib-tool: Fix comments.  Fix parse problem.
16765         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16766
16767 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16768
16769         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16770         implementation of getopt_long.  Problem reported by Alexander Taler in:
16771         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16772
16773 2004-10-15  Bruno Haible  <bruno@clisp.org>
16774
16775         * gnulib-tool: Untabify. Initialize supplied_libname.
16776         (func_usage): More homogenous output.
16777         (func_modules_transitive_closure, func_modules_to_filelist,
16778         func_emit_lib_Makefile_am): New functions.
16779         (func_import): New function, extracted from big case statement. Use
16780         func_get_license, func_modules_transitive_closure,
16781         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16782         opt_lgpl. Don't use test -a, as it's not portable.
16783         (func_create_testdir): Use func_modules_transitive_closure,
16784         func_modules_to_filelist, func_emit_lib_Makefile_am.
16785
16786 2004-10-15  Bruno Haible  <bruno@clisp.org>
16787
16788         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16789
16790 2004-10-15  Bruno Haible  <bruno@clisp.org>
16791
16792         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16793         the portions belonging to each module.
16794         Suggested by Derek Robert Price <derek@ximbiot.com>.
16795
16796 2004-10-12  Simon Josefsson  <jas@extundo.com>
16797
16798         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16799         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16800         to real functions.
16801
16802 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16803
16804         * modules/vsnprintf: New file.
16805
16806 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16807
16808         * m4/vsnprintf.m4: New file.
16809
16810 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16811
16812         * lib/vsnprintf.h: New file.
16813         * lib/vsnprintf.c: New file.
16814
16815 2004-10-11  Bruno Haible  <bruno@clisp.org>
16816
16817         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16818         vsnprintf.
16819
16820 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16821
16822         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16823
16824 2004-10-07  Bruno Haible  <bruno@clisp.org>
16825
16826         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16827         fits into the provided buffer.
16828
16829 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16830
16831         * lib/diacrit.c, diacrit.h: Add GPL notice.
16832
16833         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16834         notice.
16835         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16836         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16837         This avoids a potential constant-folding bug.
16838
16839 2004-10-05  Bruno Haible  <bruno@clisp.org>
16840
16841         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16842         for the declaration of strsep.
16843
16844 2004-10-05  Bruno Haible  <bruno@clisp.org>
16845
16846         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16847
16848 2004-10-04  Simon Josefsson  <jas@extundo.com>
16849
16850         * modules/memmem: New file.
16851         * tests/test-memmem.c: New file.
16852         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16853
16854 2004-10-04  Simon Josefsson  <jas@extundo.com>
16855
16856         * m4/memmem.m4: New file.
16857
16858 2004-10-04  Simon Josefsson  <jas@extundo.com>
16859
16860         * lib/memmem.h: New file.
16861         * lib/memmem.c: New file, taken from glibc.
16862
16863 2004-10-04  Simon Josefsson  <jas@extundo.com>
16864
16865         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16866         '#ifdef USE_UNLOCKED_IO'.
16867
16868 2004-10-04  Simon Josefsson  <jas@extundo.com>
16869
16870         * config/srclist.txt: Add memmem from glibc.
16871
16872 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16873
16874         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16875
16876         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16877         modules/exclude, modules/getdate, modules/getline,
16878         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16879         modules/getusershell, modules/linebuffer, modules/md5,
16880         modules/mountlist, modules/posixtm, modules/readtokens,
16881         modules/readutmp, modules/regex, modules/sha1,
16882         modules/version-etc, modules/yesno:
16883         Remove dependency on unlocked-io.
16884
16885 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16886
16887         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16888
16889         * m4/unlocked-io.m4: Add copyright notice.
16890         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16891
16892 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16893
16894         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16895         * lib/xmalloc.c (xmemdup): Likewise.
16896         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16897         XFREE): Remove these long-obsolescent macros.
16898         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16899         * lib/xstrdup.c: Remove.
16900
16901         * lib/regex.c (re_comp): Cast gettext return value to char *,
16902         Problem reported by Martin Neitzel via Mark D. Baushke.
16903
16904 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16905
16906         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16907         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16908         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16909         regex.c, sha1.c, version-etc.c, yesno.c:
16910         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16911         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16912         the includer's responsibility.
16913
16914         Sync from coreutils.
16915
16916         * lib/modechange.c (mode_compile): Don't decrement a pointer that
16917         points to the start of a string, as the C Standard says the
16918         resulting behavior is undefined.
16919
16920         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
16921         simple -> simple_backups, numbered_existing ->
16922         numbered_existing_backups, numbered -> numbered_backups
16923         to avoid shadowing problems.  All uses changed.
16924         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
16925         * lib/backupfile.c (check_extension, numbered_backup):
16926         Rename locals to avoid shadowing 'basename'.
16927         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
16928         once.
16929
16930         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
16931         * lib/.cvsignore: Add getopt.h.
16932
16933 2004-10-04  Bruno Haible  <bruno@clisp.org>
16934
16935         * modules/README: New file.
16936         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
16937         not a module.
16938
16939 2004-10-02  Jim Meyering  <jim@meyering.net>
16940
16941         * lib/dirfd.h, getpagesize.h: Add copyright notice.
16942
16943 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16944
16945         * modules/strsep: New file.
16946
16947 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16948
16949         * m4/strsep.m4: New file.
16950
16951 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16952
16953         * lib/strsep.h: New file.
16954         * lib/strsep.c: New file.
16955
16956 2004-10-01  Simon Josefsson  <jas@extundo.com>
16957
16958         * lib/snprintf.c (snprintf): Handle size==0.
16959
16960 2004-10-01  Simon Josefsson  <jas@extundo.com>
16961             Bruno Haible  <bruno@clisp.org>
16962
16963         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
16964         (snprintf): Declare 'args'.
16965
16966 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16967
16968         * lib/snprintf.c: Remove comments as to why each header is needed.
16969
16970 2004-10-01  Bruno Haible  <bruno@clisp.org>
16971
16972         * MODULES.html.sh: Add strsep.
16973
16974 2004-09-30  Simon Josefsson  <jas@extundo.com>
16975
16976         * modules/snprintf: New file.
16977
16978 2004-09-30  Simon Josefsson  <jas@extundo.com>
16979
16980         * m4/snprintf.m4: New file.
16981
16982 2004-09-30  Simon Josefsson  <jas@extundo.com>
16983
16984         * lib/snprintf.h, lib/snprintf.c: New files.
16985
16986 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16987
16988         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16989         (hol_entry_help): Never translate an empty string.
16990         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16991         * lib/argp.h (OPTION_NO_TRANS): New option.
16992
16993 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16994
16995         * modules/argp (Maintainer): Replace Simon Josefsson
16996         by Sergey Poznyakoff.
16997
16998 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16999
17000         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
17001         changes merged back into glibc.
17002
17003 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17004
17005         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
17006
17007 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17008
17009         * lib/xvasprintf.c: Include xalloc.h.
17010         (xvasprintf): Use xalloc_die, not xmalloc_die.
17011
17012 2004-09-29  Bruno Haible  <bruno@clisp.org>
17013
17014         * modules/alloca-opt: New file, derived from modules/alloca.
17015         * modules/allocsa: Depend on alloca-opt instead of alloca.
17016         * modules/setenv: Likewise.
17017         * modules/vasnprintf: Likewise.
17018         * MODULES.html.sh: Add alloca-opt.
17019
17020 2004-09-28  Simon Josefsson  <jas@extundo.com>
17021
17022         * gnulib-tool: New parameter --lgpl, to asseert that modules are
17023         LGPL, and to replace license template from GPL to LGPL.
17024
17025 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17026
17027         * modules/dummy: Change license to LGPL.
17028
17029 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17030
17031         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
17032
17033 2004-09-24  Simon Josefsson  <jas@extundo.com>
17034
17035         * modules/minmax (License): Change from GPL to LGPL.
17036
17037 2004-09-23  Simon Josefsson  <jas@extundo.com>
17038
17039         * gnulib-tool (--import): Typo.
17040
17041 2004-09-23  Simon Josefsson  <jas@extundo.com>
17042
17043         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
17044
17045 2004-09-22  Bruno Haible  <bruno@clisp.org>
17046
17047         * modules/*: Add 'License' field.
17048         * gnulib-tool: Accept --extract-license option.
17049         (func_get_license): New function.
17050
17051 2004-09-21  Bruno Haible  <bruno@clisp.org>
17052
17053         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
17054         Reported by Simon Josefsson.
17055
17056 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17057
17058         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
17059         gl_AC_TYPE_LONG_LONG.
17060
17061 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17062
17063         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
17064
17065 2004-09-18  Simon Josefsson  <jas@extundo.com>
17066         and  Paul Eggert  <eggert@cs.ucla.edu>
17067
17068         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
17069         calls with autoreconf.  Define GL_LIB.
17070
17071 2004-09-14  Karl Berry  <karl@gnu.org>
17072
17073         * config/srclist.txt: unsync setenv.c, sigh.
17074
17075 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17076
17077         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
17078         Problem reported by Bruno Haible in:
17079         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
17080
17081 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17082
17083         * config/srclist.txt: Comment out argp-pvh.c.
17084
17085 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
17086
17087         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
17088         in case some system header has #define'd it.  Problem reported by
17089         Soeren D. Schulze in
17090         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
17091
17092 2004-09-09  Karl Berry  <karl@gnu.org>
17093
17094         * regex.[ch]: delete from the root.  These were supposed to be
17095                 synced with emacs cvs, but this has not happened for about
17096                 a year, and anyway nothing else uses emacs regex.[ch].
17097                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
17098                 lib/regex[.ch] is untouched.
17099
17100 2004-09-09  Bruno Haible  <bruno@clisp.org>
17101
17102         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
17103
17104 2004-09-09  Bruno Haible  <bruno@clisp.org>
17105
17106         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
17107         modifications.
17108         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
17109
17110 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
17111
17112         * modules/xvasprintf: New file.
17113         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
17114
17115 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
17116
17117         * lib/xvasprintf.h: New file.
17118         * lib/xvasprintf.c: New file.
17119         * lib/xasprintf.c: New file.
17120
17121 2004-09-08  Bruno Haible  <bruno@clisp.org>
17122
17123         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
17124
17125 2004-09-08  Bruno Haible  <bruno@clisp.org>
17126
17127         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
17128         length is > INT_MAX.
17129         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
17130         more.
17131
17132 2004-09-08  Bruno Haible  <bruno@clisp.org>
17133
17134         * lib/stdint_.h: New file, taken from GNU clisp.
17135
17136 2004-09-08  Bruno Haible  <bruno@clisp.org>
17137             Oskar Liljeblad  <oskar@osk.mine.nu>
17138
17139         * modules/stdint: New file.
17140         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
17141
17142 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17143
17144         Import from coreutils.
17145         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
17146         strings on unbounded length.  alloca's performance benefits aren't
17147         that important here.
17148         (V_STRDUP): Remove.
17149         (parse_with_separator): New function, with most of the internals
17150         of the old parse_user_spec.  Allow user to omit both user and group,
17151         for compatibility with FreeBSD.
17152         Clone only the user name, not the entire spec.
17153         Do not set *uid, *gid unless entirely successful.
17154         Avoid memory leak in some failing cases.
17155         Fix regression for USER.GROUP reported by Dmitry V. Levin in
17156         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
17157         (parse_user_spec): Rewrite to use parse_with_separator.
17158
17159 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17160
17161         * modules/userspec: Don't depend on alloca.
17162
17163 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17164
17165         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
17166
17167 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
17168
17169         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
17170         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
17171         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
17172
17173 2004-08-16  Simon Josefsson  <jas@extundo.com>
17174
17175         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
17176         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
17177         Add --dry-run for --import.
17178         Let user provided command line parameters override configure.ac
17179         settings.
17180
17181 2004-08-12  Simon Josefsson  <jas@extundo.com>
17182
17183         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
17184         as discussed with Paul Eggert in threads rooted at
17185         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
17186         and
17187         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
17188         Before, the test was empty, and relied on ELIDE_CODE in source
17189         code.)
17190         (gl_PREREQ_GETOPT): New macro.
17191         (gl_GETOPT): Use them.
17192
17193 2004-08-12  Simon Josefsson  <jas@extundo.com>
17194
17195         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
17196         * lib/getopt_.h: Renamed from getopt.h.
17197
17198 2004-08-12  Simon Josefsson  <jas@extundo.com>
17199
17200         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
17201         Change default library name from libfoo to libgnu.
17202         Now, if you have a configure.ac that says:
17203                 gl_SOURCE_BASE(gl)
17204                 gl_M4_BASE(gl/m4)
17205                 gl_MODULES(error getopt etcetera)
17206                 gl_INIT
17207         you can import all you need by running:
17208                 ../gnulib/gnulib-tool --import
17209
17210         * modules/getopt (Files): Rename getopt.h to getopt_.h.
17211         (Makefile.am): Rewrite, use logic from argz.
17212         (Include): Use <getopt.h> instead of "getopt.h".
17213
17214 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17215
17216         * modules/argp (Files): Add m4/unlocked-io.m4.
17217         (Depends-on): Add extensions.
17218
17219 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17220
17221         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
17222         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
17223         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
17224         Check for program_invocation_name, program_invocation_short_name,
17225         flockfile, funlockfile, features.h, _getopt_long_only_r.
17226
17227 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17228
17229         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
17230         its complicated substitute.
17231         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
17232         and program_invocation_name.
17233         (__argp_basename) [!_LIBC]: Remove; the only use was
17234         replaced by its body.
17235         (__argp_short_program_name): Change condition from
17236         !defined __argp_short_program_name to
17237         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
17238         to match argp-namefrob.h.
17239         (__argp_failure): Don't assume strerror_r returns char *.
17240         * lib/argp-parse.c (N_): Define unconditionally.
17241         (argp_default_options): Fill out initializers with 0 to avoid
17242         gcc warnings.
17243
17244 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17245
17246         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
17247         getopt1.c.
17248
17249 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17250
17251         Merge from coreutils.
17252
17253         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
17254
17255         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
17256         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
17257
17258 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17259
17260         Merge from coreutils.
17261
17262         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
17263         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
17264         for Reliant Unix 5.43.
17265
17266         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
17267         (union fooround): Use uintmax_t, not long int.
17268         The rest is a merge from libc:
17269         [defined _LIBC]: Include <shlib-compat.h>.
17270         (_obstack) [defined _LIBC]: Remove after 2.3.4.
17271
17272         * lib/settime.c (settime): Recode to avoid warning with
17273         Sun Forte C 6U2.
17274
17275         * lib/strverscmp.c: Convert to UTF-8.
17276
17277 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17278
17279         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17280         m4/uintmax_t.m4.
17281
17282 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17283
17284         * modules/xalloc-die: New file.
17285         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
17286
17287         * modules/md5 (Files): Add m4/uint32_t.m4.
17288         * modules/sha1: Renamed from modules/sha.
17289         (Files):
17290         Rename lib/sha.h to lib/sha1.h.
17291         Rename lib/sha.c to lib/sha1.c.
17292         Rename m4/sha.m4 to m4/sha1.m4.
17293         (lib_SOURCES): Likewise.
17294         (configure.ac): Rename gl_SHA to gl_SHA1.
17295         (Include): sha.h -> sha1.h.
17296
17297 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17298
17299         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
17300         * m4/sha1.m4: Renamed from sha.m4.
17301         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
17302
17303 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17304
17305         * lib/obstack.h (obstack_empty_p):
17306         Don't assume that chunk->contents is suitably aligned.
17307         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
17308         Likewise. Problem reported by Benno in
17309         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
17310
17311         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
17312         readable.  This could be improved further but it'd take some work.
17313
17314 2004-08-08  Simon Josefsson  <jas@extundo.com>
17315
17316         * modules/xgethostname (Depends-on): Remove exit and error (not
17317         used).
17318
17319         * modules/getpass-gnu: Add getpass.h.
17320         (Depends-on): Add stdbool.
17321         * modules/getpass: Add getpass.h.
17322
17323 2004-08-08  Simon Josefsson  <jas@extundo.com>
17324
17325         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
17326         Check getpass declaration.
17327
17328 2004-08-08  Simon Josefsson  <jas@extundo.com>
17329
17330         * lib/xgethostname.c: Don't include error.h (not used).
17331
17332         * lib/getpass.h: Add.
17333         * lib/getpass.c: Include getpass.h first.
17334
17335 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
17336
17337         * lib/xalloc-die.c: New file.
17338         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
17339         All uses removed.
17340         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
17341         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
17342         xalloc-die.c.
17343         (_, N_, xalloc_die): Move to xalloc-die.c.
17344         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
17345         so that we needn't mess with xalloc_msg_memory_exhausted.
17346
17347         * lib/sha1.h: Renamed from sha.h.
17348         (SHA1_H): Renamed from _SHA_H.
17349         (sha1_ctx): Renamed from sha_ctx.
17350         (sha1_init_ctx): Renamed from sha_init_ctx.
17351         (sha1_process_block): Renamed from sha_process_block.
17352         (sha1_process_bytes): Renamed from sha_process_bytes.
17353         (sha1_finish_ctx): Renamed from sha_finish_ctx.
17354         (sha1_read_ctx): Renamed from sha_read_ctx.
17355         (sha1_stream): Renamed from sha_stream.
17356         (sha1_buffer): Renamed from sha_buffer.
17357         * lib/sha1.c: Likewise; renamed from sha.c.
17358         Do not include <sys/types.h>.
17359         Include <stddef.h> rather than <stdlib.h>.
17360
17361 2004-08-08  Bruno Haible  <bruno@clisp.org>
17362
17363         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
17364         FILESYSTEM_PREFIX_LEN.
17365         * lib/progreloc.c: Likewise.
17366         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
17367
17368 2004-08-06  Simon Josefsson  <jas@extundo.com>
17369
17370         * modules/progname (Depends-on): Don't depend on stdbool.
17371
17372 2004-08-06  Simon Josefsson  <jas@extundo.com>
17373
17374         * modules/getsubopt: New file.
17375         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17376         getsubopt.
17377
17378 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17379
17380         More merge from coreutils.
17381
17382         * m4/utimens.m4, m4/utimecmp.m4: New files.
17383         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17384         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17385         prereq.m4, sha.m4: Import changes from coreutils.
17386
17387 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17388
17389         More merge from coreutils.
17390         * modules/raise, modules/readtokens0, modules/utimens:
17391         * modules/utimecmp, module/xnanosleep: New files.
17392         * modules/strftime: Add lib/strftime.h.
17393         Change include from <time.h> to "strftime.h".
17394         * modules/yesno: Add lib/yesno.h.
17395         * modules/backupfile: Remove lib/addext.c.
17396         * modules/euidaccess: Add stat-macros.h.
17397         * modules/canonicalize, modules/euidaccess,
17398         modules/filemode, modules/lchown, modules/makepath,
17399         modules/rmdir, modules/stat: Likewise.
17400
17401 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17402
17403         Merge from tar.
17404         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17405         SIZE_MAX is a valid preprocessor constant.
17406         (__argp_basename): Change from "#ifndef _LIBC"
17407         to "#ifndef __argp_short_program_name", so that
17408         we don't compile these functions for tar.
17409
17410         More merges from coreutils.
17411         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17412         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17413         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17414         * lib/addext.c: Remove; no longer needed.
17415         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17416         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17417         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17418         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17419         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17420         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17421         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17422         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17423         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17424         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17425         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17426         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17427         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17428         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17429         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17430         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17431         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17432         Import changes from coreutils.
17433
17434 2004-08-05  Simon Josefsson  <jas@extundo.com>
17435
17436         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17437
17438 2004-08-05  Simon Josefsson  <jas@extundo.com>
17439
17440         * m4/getsubopt.m4: New file.
17441
17442 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17443
17444         Merge from coreutils.
17445
17446         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17447         * m4/getcwd-path-max.m4: New files.
17448
17449         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17450         FILESYSTEM_PREFIX_LEN ->
17451         FILE_SYSTEM_PREFIX_LEN.
17452         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17453         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17454         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17455         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17456
17457         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17458         prerequisite modules now handle the DOS stuff.
17459         Don't check for unistd.h.
17460
17461 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17462
17463         Merge from coreutils.
17464
17465         * lib/.gdb-history: Remove; this doesn't belong here.
17466
17467         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17468         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17469         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17470         * lib/getcwd.c: New files.
17471
17472         * lib/dirname.h: Include <stdbool.h>.
17473         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17474         for consistency with POSIX terminology.  All uses changed.
17475         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17476         (strip_trailing_slashes): Use bool for booleans.
17477         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17478
17479         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17480         sometimes returns a positive errno value even when it succeeds.
17481         (print_errno_message) [!LIBC]: Fall back on strerror if
17482         __strerror_r fails.
17483
17484         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17485         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17486         (longest_relative_suffix): New function.
17487         (path_concat): Use it.  Assume first argument is not NULL.
17488         Port to DOS.  Omit redundant separators.
17489         Report an error instead of returning NULL.
17490         Use mempcpy instead of memcpy.
17491         (xpath_concat): Remove: not declared or used.
17492
17493         * lib/same.h: Include <stdbool.h>
17494         (same_name): Return bool, not int.
17495         * lib/same.c (same_name): Likewise.
17496         (errno): Don't declare; we assume C89 or better now.
17497
17498         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17499         if not already defined.
17500
17501         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17502         * lib/dup-safer.c (errno): Likewise.
17503
17504 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17505
17506         Merge from coreutils.
17507         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17508         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17509         * modules/path-concat: Don't depend on strdup.
17510
17511 2004-08-03  Simon Josefsson  <jas@extundo.com>
17512
17513         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17514         * lib/progname.h: Don't include stdbool.h.
17515
17516 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17517
17518         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17519         * MODULES.html.sh (func_all_modules): Remove fatal.
17520
17521 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17522
17523         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17524
17525 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17526
17527         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17528         working.
17529
17530 2004-08-02  Simon Josefsson  <jas@extundo.com>
17531
17532         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17533         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17534         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17535
17536 2004-08-01  Simon Josefsson  <jas@extundo.com>
17537
17538         * lib/xgetdomainname.c: Include stdlib.h, for free().
17539
17540 2004-07-19  Bruno Haible  <bruno@clisp.org>
17541
17542         * MODULES.html.sh (func_all_modules): Add dummy.
17543
17544 2004-07-16  Simon Josefsson  <jas@extundo.com>
17545
17546         * modules/dummy: New file.
17547
17548 2004-07-16  Simon Josefsson  <jas@extundo.com>
17549
17550         * lib/dummy.c: New file.
17551
17552 2004-07-16  Bruno Haible  <bruno@clisp.org>
17553
17554         * lib/backupfile.h: Add extern "C" for C++.
17555         * lib/closeout.h: Likewise.
17556         * lib/copy-file.h: Likewise.
17557         * lib/findprog.h: Likewise.
17558         * lib/full-write.h: Likewise.
17559         * lib/pathname.h: Likewise.
17560         * lib/progname.h: Likewise.
17561         * lib/stpcpy.h: Likewise.
17562         * lib/stpncpy.h: Likewise.
17563         * lib/strcase.h: Likewise.
17564         * lib/strstr.h: Likewise.
17565         * lib/xalloc.h: Likewise.
17566
17567         * lib/mbswidth.h: Add extern "C" for C++.
17568         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17569
17570 2004-07-13  Robert Millan  <robertmh@gnu.org>
17571
17572         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17573
17574 2004-07-09  Simon Josefsson  <jas@extundo.com>
17575
17576         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17577         failed without this.)
17578
17579 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17580
17581         * modules/chown (Files): Add lib/fchown-stub.c, since
17582         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17583
17584 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17585
17586         * lib/fchown-stub.c: New file.
17587
17588 2004-06-24  Jim Meyering  <jim@meyering.net>
17589
17590         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17591
17592 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17593
17594         * modules/argz: Omit "#include".
17595
17596         * MODULES.html.sh (func_all_modules): Add calloc, to match
17597         2004-06-01 addition of calloc module.
17598
17599 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17600
17601         * m4/argz.m4: New file, which is autoupdated from libtool.
17602
17603 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17604
17605         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17606         libtool.
17607
17608 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17609
17610         * config/srclist-update: Don't insist on "USA." before the
17611         close-comment, as libtool omits the period and puts the */ on a
17612         separate line.
17613         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17614         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17615
17616 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17617
17618         * modules/argz: New file.
17619         * MODULES.html.sh (func_all_modules): Add argz.
17620
17621 2004-06-12  Jim Meyering  <jim@meyering.net>
17622         and  Paul Eggert  <eggert@cs.ucla.edu>
17623
17624         * modules/hash (Files): Add lib/xalloc.h.
17625         * modules/pipe (Depends-on): Add wait-process.
17626         * modules/stat (Depends-on): Add xalloc.
17627         * modules/userspec (Files): Add lib/userspec.h.
17628         * modules/xstrto
17629
17630         Upgrade from gettext-0.13.
17631         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17632         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17633         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17634
17635 2004-06-10  Jim Meyering  <jim@meyering.net>
17636
17637         * lib/calloc.c: New file.
17638
17639 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17640
17641         * lib/getdate.y (yylex): Allow space between sign and number.
17642         Problem reported by Dan Jacobson.
17643
17644 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17645
17646         Merge from coreutils CVS.
17647
17648         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17649         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17650         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17651         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17652         xstrtol.m4: Fix copyright date and/or serial number.
17653
17654         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17655         See if we need an fchown replacement.
17656         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17657         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17658         and use the replacement function if we detect either defect.
17659
17660         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17661         gl_UTIMECMP.
17662
17663 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17664         and  Jim Meyering  <jim@meyering.net>
17665
17666         Merge from coreutils CVS.
17667
17668         * lib/stat-macros.h: New file, with contents from file-type.h
17669         and coreutils' system.h.
17670         * lib/file-type.c: Include "stat-macros.h".
17671         * lib/file-type.h (file_type): Move all macro definitions to new file,
17672         stat-macros.h.
17673
17674         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17675         Wrap old code with this conditional.
17676         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17677         function that does not dereference symlinks.
17678         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17679
17680         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17681         dependency problems.
17682         (xreadlink): Accept new arg SIZE, for efficiency.
17683         All decls and uses changed.
17684         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17685
17686         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17687         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17688
17689         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17690         sysexits.h.
17691
17692 2004-06-01  Jim Meyering  <jim@meyering.net>
17693
17694         * m4/calloc.m4: New file.
17695
17696 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17697
17698         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17699         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17700         Also, fix a typo in a diagnostic.
17701
17702 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17703
17704         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17705         or AC_FUNC_REALLOC.
17706
17707 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17708
17709         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17710         macros to be defined.
17711         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17712         the allocator returns NULL because the requested size is zero.
17713
17714 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17715
17716         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17717         var.  Add comment explaining why libc still defines it.  This
17718         merges the following patch from glibc:
17719         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17720
17721 2004-05-20  Andreas Schwab  <schwab@suse.de>
17722
17723         * m4/free.m4: Replace free if it not known to work, not the other
17724         way round.
17725
17726 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17727
17728         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17729         present in glibc since revision 1.1 of this file.
17730         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17731         obstack_alignment_mask, obstack_alloc, obstack_base,
17732         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17733         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17734         obstack_grow0, obstack_init, obstack_int_grow,
17735         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17736         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17737         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17738         nonexistent functions.
17739
17740 2004-05-18  Karl Berry  <karl@gnu.org>
17741
17742         * config/srclist.txt: break link for vasnprintf.c.
17743
17744 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17745
17746         Port obstack to the AS/400, where pointers are 16 bytes wide and
17747         you cannot cast an integer to a valid pointer.  This patch is
17748         currently waiting to be integrated into glibc; see
17749         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17750
17751         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17752         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17753         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17754         (struct obstack): temp member is now a union of a pointer and
17755         an integer, instead of an integer.  All integer uses changed.
17756         This does not affect the physical layout of struct obstack,
17757         except on hosts (like the AS/400) where the size or alignment of
17758         void * is greater than that of ptrdiff_t.
17759         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17760         __STDC__)]: Store temporary in pointer member of union, not
17761         integer member.
17762         * lib/obstack.c: Include <stddef.h>, for offsetof.
17763         (struct fooalign): Remove; it doesn't need a name.
17764         (union fooround): Change double to long double, and add void *.
17765         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17766         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17767         not a macro.  Hence the values are always int; so remove all
17768         casts-to-int in uses.
17769
17770 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17771
17772         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17773         we can get this patch merged into glibc.
17774
17775 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17776             Paul Eggert  <eggert@cs.ucla.edu>
17777
17778         * m4/argp: Depend on alloca.
17779
17780 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17781             Paul Eggert  <eggert@cs.ucla.edu>
17782
17783         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17784         freecoding.
17785
17786 2004-05-17  Bruno Haible  <bruno@clisp.org>
17787
17788         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17789         precision that consists of a '.' followed by an empty digit string.
17790         Patch by Tor Lillqvist <tml@iki.fi>.
17791
17792 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17793
17794         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17795         for backward compatibility with older code.  We need our own
17796         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17797         it under some other name, and our alloca.h will define it.
17798
17799 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17800             Derek Price  <derek@ximbiot.com>
17801
17802         * lib/alloca.c: Include <alloca.h>, to get our interface.
17803         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17804         include <alloca.h> first.  Use C89 prototype for alloca; this
17805         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17806         Use #elif for simplicity, since we can assume C89 now.
17807         Don't try to source the system alloca.h since it will not be found
17808         and to prevent recursively including its replacement.
17809         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17810         * lib/regex.c: Likewise.
17811
17812 2004-05-16  Derek Price  <derek@ximbiot.com>
17813             Paul Eggert  <eggert@cs.ucla.edu>
17814
17815         getline cleanup.  This changes the getndelim2 API: both order of
17816         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17817         no delimiter).
17818
17819         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17820         interface does that.
17821         (getline): Always use getdelim, so that we don't have two
17822         copies of this code.
17823         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17824         if available.
17825         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17826         (GETNDELIM2_MAXIMUM): New macro.
17827         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17828         instead of the old practice of delim2==0.  All callers changed.
17829         Return -1 on overflow, instead of returning junk.
17830         Do not set *linesize unless allocation succeeds.
17831         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17832         that we include sys/types.h.
17833         * lib/getnline.h: Likewise.
17834         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17835         (getndelim2): Reorder arguments.
17836         * lib/getnline.c (getnline, getndelim):
17837         Don't discard the NMAX argument.
17838         (getnline): Invoke getndelim, to avoid code duplication.
17839         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17840         of (size_t) -1 by callers of the getnline family.
17841
17842 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17843
17844         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17845         Check for gettimeofday.
17846         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17847         Check for settimeofday, stime.
17848
17849 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17850
17851         * lib/nanosleep.c (suspended): Change its type from int to
17852         sig_atomic_t volatile.
17853         (first_call): Make it private to rpl_nanosleep, and have it
17854         be zero initially as that's a bit faster.
17855         (my_usleep): Round up fractional times instead of truncating them,
17856         as this is the usual meaning for 'sleep'.
17857
17858         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17859         doesn't work.
17860         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17861         (ENOSYS): Define if not defined.
17862         (settime): Fall back on stime if it exists and settimeofday fails.
17863         But don't bother with fallbacks if a method fails with errno == EPERM.
17864
17865 2004-05-11  Jim Meyering  <jim@meyering.net>
17866
17867         Prior to this change, the save_cwd caller required read access to the
17868         current directory on most systems (ones with the fchdir function).
17869
17870         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17871         fails, try write-only, and finally, resort to using xgetcwd.
17872
17873 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17874
17875         * lib/obstack.c, obstack.h: Import changes from libc.
17876
17877 2004-04-28  Bruno Haible  <bruno@clisp.org>
17878
17879         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17880         also implicitly appends .exe to executables.
17881         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17882         accepts Windows pathnames.
17883         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17884         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17885         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17886         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17887         Reported by Derek Robert Price <derek@ximbiot.com>.
17888
17889 2004-04-21  Karl Berry  <karl@gnu.org>
17890
17891         * config/srclist.txt (localcharset.c): break sync.
17892
17893 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17894
17895         * m4/host-os.m4: Add a copyright notice.
17896
17897 2004-04-20  Jim Meyering  <jim@meyering.net>
17898
17899         Change UTILS_ to gl_ in AC_DEFINE'd names.
17900         Change utils_- and jm_-prefixed variables, too.
17901         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17902         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17903         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17904
17905         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17906         Don't emit trailing blanks.
17907         Also rename jm_-prefixed variables to have gl_ prefix.
17908
17909         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17910         Also rename jm_-prefixed variables to have gl_ prefix.
17911
17912         * m4/jm-macros.m4: Reflect the renamings.
17913         * m4/prereq.m4: Likewise.
17914
17915 2004-04-20  Jim Meyering  <jim@meyering.net>
17916
17917         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
17918         memory.
17919
17920 2004-04-20  Jim Meyering  <jim@meyering.net>
17921             Bruno Haible  <bruno@clisp.org>
17922
17923         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
17924         memory when realloc fails.
17925
17926 2004-04-19  Jim Meyering  <jim@meyering.net>
17927
17928         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
17929         now that readutmp.c may call `free (0)'.
17930
17931 2004-04-19  Bruno Haible  <bruno@clisp.org>
17932
17933         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
17934         * m4/inttypes_h.m4: Likewise.
17935         * m4/stdint_h.m4: Likewise.
17936         * m4/intmax_t.m4: Likewise.
17937         * m4/uintmax_t.m4: Likewise.
17938
17939 2004-04-18  Jim Meyering  <jim@meyering.net>
17940
17941         * m4/prereq.m4: Don't forbid jm_ prefix.
17942
17943         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
17944         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
17945         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
17946         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
17947         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
17948         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
17949         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
17950         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
17951         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
17952         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
17953         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
17954         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
17955         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
17956         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
17957         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
17958         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
17959         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
17960         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
17961         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
17962
17963 2004-04-18  Jim Meyering  <jim@meyering.net>
17964
17965         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
17966         failure, don't leak memory and do call END_UTMP_ENT.
17967
17968 2004-04-16  Jim Meyering  <jim@meyering.net>
17969
17970         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17971         coreutils' stat program.
17972         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17973
17974 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17975
17976         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17977         C89.
17978         (CHAR_BIT): Remove, since we assume C89.
17979         Include <stdint.h> if available, as per current Autoconf CVS advice.
17980
17981 2004-03-31  Jim Meyering  <jim@meyering.net>
17982
17983         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17984         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17985         * m4/xalloc.m4: Likewise.
17986
17987 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17988
17989         Merge from coreutils.
17990
17991         * m4/inttostr.m4: New file.
17992         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17993         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17994         Require gl_CLOCK_TIME.
17995         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17996
17997 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17998
17999         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
18000         not bool, to be more consistent with Unix conventions.
18001         Suggested by Bruno Haible.
18002
18003         Merge from coreutils.
18004
18005         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
18006         * lib/umaxtostr.c: New files.
18007
18008         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
18009         the usual <time.h> dance.
18010         (get_date): Change signature to support fractional time stamps.
18011         All callers changed.
18012         * lib/getdate.y: Include "getdate.h" first, as we can now
18013         assume C89 and don't need to worry about 'const'.
18014         Similarly, include "unlocked-io.h" near start, not in middle.
18015         Include <limits.h>.
18016         (textint.value): Use long int rather than int.
18017         (textint.digits): Use size_t rather than int.
18018         (BILLION, LOG10_BILLION): New constants.
18019         (parser_control): New member rel_ns.  Members day_ordinal,
18020         time_zone, month, day, hour, minutes, rel_year, rel_month,
18021         rel_day, rel_hour, rel_minutes, rel_seconds
18022         are now long int, not int.  Member seconds is now struct timespec,
18023         not int.  New member timespec_seen.  Members dates_seen, days_seen,
18024         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
18025         not int.
18026         (%union.intval): Now long int, not int.
18027         New member timespec.
18028         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
18029         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
18030         (spec): Now is a timespec or an item list.
18031         (timespec, items): New nonterminals.
18032         (time, rel, relunit, number, get_date):
18033         Add support for fractional seconds.
18034         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
18035         (gmtime, localtime, mktime): Remove decls; not needed with C89.
18036         (to_hour): First arg is now long int, not int.
18037         (to_year): Returns long int, not int.
18038         Don't treat year -70 like 70.
18039         (tm_diff): Returns long int, not int.
18040         (lookup_word): Use bool instead of int when appropriate.
18041         (yylex): Use size_t for count, not int.
18042         Detect overflow when parsing large integer constants.
18043         Add support for fractions.
18044         (get_date): Make pointers 'const' if possible.
18045         Use more-portable code to detect integer overflow.
18046         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
18047         Don't use ctime; it's not reliable if the year has >4 digits.
18048
18049         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
18050         This is for compatibility with BSD.
18051
18052         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
18053         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
18054         From coreutils' system.h.
18055
18056         * lib/userspec.c: Don't include "posixver.h".
18057         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
18058         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
18059         compatible extension.  Simplify code by removing a boolean int
18060         that was always nonzero if a string was nonnull.
18061
18062 2004-03-30  Jim Meyering  <jim@meyering.net>
18063
18064         Merge from coreutils.
18065
18066         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
18067         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
18068         on some systems one must include <grp.h> before it.
18069         Reported by Christian Krackowizer.
18070
18071 2004-03-30  Jim Meyering  <jim@meyering.net>
18072
18073         Merge from coreutils.
18074
18075         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
18076
18077         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
18078         an empty input stream.
18079
18080         * lib/readtokens.c: Include <stdbool.h>.
18081         (readtoken): Use `size_t' rather than int/long.
18082         All callers adjusted.
18083         Use `bool' rather than `int' where appropriate.
18084         Use memset rather than an explicit loop.
18085         Use x2nrealloc rather than xrealloc.
18086         Allow the use of `\0' as a delimiter.
18087         (readtokens): Likewise.
18088         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
18089
18090 2004-03-30  Jim Meyering  <jim@meyering.net>
18091
18092         * m4/realloc.m4: Remove file, since now it does no more than
18093         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
18094         the `configure.ac' section of module/realloc.
18095         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
18096
18097 2004-03-30  Bruno Haible  <bruno@clisp.org>
18098
18099         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
18100         nonnull.
18101
18102 2004-03-29  Paul Eggert  <eggert@twinsun.com>
18103
18104         Merge changes to getloadavg.c from coreutils and Emacs.
18105
18106         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
18107         Define to an expression, not to the empty string.
18108         Include cloexec.h and xalloc.h.
18109         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
18110         Use set_cloexec_flag rather than rolling our own.
18111         * lib/cloexec.c, lib/cloexec.h: New files.
18112
18113 2004-03-29  Paul Eggert  <eggert@twinsun.com>
18114
18115         * m4/cloexec.m4: New file.
18116
18117 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18118
18119         * lib/getopt.h: Sync with libc CVS.
18120
18121 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18122             Bruno Haible  <bruno@clisp.org>
18123
18124         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
18125         mbswidth.
18126
18127 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18128             Bruno Haible  <bruno@clisp.org>
18129
18130         * lib/mbswidth.h: Include <wchar.h> only if
18131         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
18132         <wchar.h>.
18133         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
18134
18135 2004-03-09  Paul Eggert  <eggert@twinsun.com>
18136
18137         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
18138         Sync with libc CVS.
18139         * lib/getopt_int.h: New file, also synced from libc.
18140
18141 2004-03-09  Paul Eggert  <eggert@twinsun.com>
18142
18143         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
18144         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
18145         Bring back getopt.c, getopt.h, getopt1.c.
18146
18147 2004-03-07  Paul Eggert  <eggert@twinsun.com>
18148
18149         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
18150         All uses changed.  Check for sa_sigaction member; this fixes
18151         a bug first reported by Jason Andrade in
18152         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
18153
18154 2004-03-07  Paul Eggert  <eggert@twinsun.com>
18155
18156         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
18157         '#if' expressions.  Unlike the code it replaces, it does not
18158         depend on (defined _SC_PAGESIZE).  However, it does depend on
18159         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
18160         first reported by Jason Andrade in
18161         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
18162
18163 2004-02-25  Simon Josefsson  <jas@extundo.com>
18164
18165         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
18166
18167 2004-02-25  Simon Josefsson  <jas@extundo.com>
18168
18169         * lib/strdup.h: New file.
18170         * lib/strdup.c: Include it.
18171         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
18172         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
18173
18174 2004-02-23  Karl Berry  <karl@gnu.org>
18175
18176         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
18177         (from fencepost.gnu.org:/gd/gnuorg).
18178
18179 2004-02-23  Karl Berry  <karl@gnu.org>
18180
18181         * config/srclistvars.sh (GNUORG) [karl]: redefine.
18182         * config/srclist.txt: add maintain/standards documents.
18183
18184 2004-02-18  Bruno Haible  <bruno@clisp.org>
18185
18186         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
18187         Reported by Derek Robert Price <derek@ximbiot.com>.
18188
18189 2004-02-16  Karl Berry  <karl@gnu.org>
18190
18191         * config/mkinstalldirs, install-sh: update from automake.
18192
18193 2004-02-06  Karl Berry  <karl@gnu.org>
18194
18195         * m4/po.m4: update from gettext 0.14.1.
18196
18197 2004-02-06  Karl Berry  <karl@gnu.org>
18198
18199         * lib/config.charset: update from gettext 0.14.1.
18200
18201 2004-02-05  Paul Eggert  <eggert@twinsun.com>
18202
18203         Add comments and code, prompted by suggestions from Bruno Haible
18204         for sh-quote.
18205         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
18206         describing the enum quoting_style values.
18207         * lib/quotearg.c (quotearg_alloc): New function.
18208         (quotearg_buffer_restyled): Treat lone { and } as special.
18209         Treat = as special.  Work around bug with older shells
18210         that "see" a '\' that is really the 2nd byte of a multibyte char.
18211         Quote empty string with shell_quoting_style.
18212
18213 2004-02-03  Bruno Haible  <bruno@clisp.org>
18214
18215         * m4/pipe.m4: New file, from GNU gettext.
18216
18217 2004-02-03  Bruno Haible  <bruno@clisp.org>
18218
18219         * lib/pipe.h: New file, from GNU gettext.
18220         * lib/pipe.c: New file, from GNU gettext.
18221
18222 2004-01-27  Bruno Haible  <bruno@clisp.org>
18223
18224         * m4/execute.m4: New file, from GNU gettext.
18225
18226 2004-01-27  Bruno Haible  <bruno@clisp.org>
18227
18228         * lib/execute.h: New file, from GNU gettext.
18229         * lib/execute.c: New file, from GNU gettext.
18230         * lib/w32spawn.h: New file, from GNU gettext.
18231
18232 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18233
18234         Merge from diffutils.
18235
18236         * lib/file-type.c (file_type): Add typed memory objects.
18237         * lib/file-type.h (S_TYPEISTMO): New macro.
18238
18239         * lib/c-stack.h (c_stack_action): Remove argv argument.
18240         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
18241         (die): Don't calculate message unless segv_action returns.
18242         (get_stack_location, min_address_from_argv, max_address_from_argv,
18243         volatile stack_base, volatile_stack_size): Remove.
18244         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
18245         that every segmentation violation is a stack overflow.  (Ouch!)
18246         See Debian bug 136249 (still outstanding) for more info about why
18247         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
18248
18249 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18250
18251         Exit-status fix from coreutils.
18252
18253         Use exit_failure consistently in place of EXIT_FAILURE,
18254         so that program exit statuses are consistent on failure.
18255
18256         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
18257         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
18258         * lib/argmatch.h: Comment fix to match the above.
18259         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
18260         Now a macro referring to exit_failure, instead of a separate
18261         variable.  Include "exitfail.h" to get it.
18262         * lib/xstrtol.h: Include "exitfail.h".
18263         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
18264
18265         * lib/long-options.c (parse_long_options): Use prototype
18266         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
18267         for clarity.
18268
18269 2004-01-21  Jim Meyering  <jim@meyering.net>
18270
18271         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
18272         so as not to conflict with a different-sized __mktime_internal
18273         function in GNU libc.
18274         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
18275         Problem building statically-linked `ls' reported by Michael Brunnbauer.
18276
18277 2004-01-20  Karl Berry  <karl@gnu.org>
18278
18279         * config/config.guess: update from config.
18280
18281         * config/srclistvars.sh: GNUWWWLICENSES for karl.
18282
18283 2004-01-20  Bruno Haible  <bruno@clisp.org>
18284
18285         Safer stack allocation.
18286         * lib/setenv.c: Include allocsa.h.
18287         (alloca): Remove fallback definition.
18288         (freea): Remove macro.
18289         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
18290         instead of freea.
18291
18292 2004-01-20  Bruno Haible  <bruno@clisp.org>
18293
18294         * m4/eealloc.m4: New file, from GNU gettext.
18295
18296 2004-01-20  Bruno Haible  <bruno@clisp.org>
18297
18298         * m4/allocsa.m4: New file, from GNU gettext.
18299
18300 2004-01-20  Bruno Haible  <bruno@clisp.org>
18301
18302         * lib/xallocsa.h: New file, from GNU gettext.
18303         * lib/xallocsa.c: New file, from GNU gettext.
18304
18305 2004-01-20  Bruno Haible  <bruno@clisp.org>
18306
18307         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
18308
18309 2004-01-20  Bruno Haible  <bruno@clisp.org>
18310
18311         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
18312         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
18313         specially.
18314
18315 2004-01-20  Bruno Haible  <bruno@clisp.org>
18316
18317         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
18318         patch.
18319
18320 2004-01-20  Bruno Haible  <bruno@clisp.org>
18321
18322         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
18323
18324 2004-01-20  Bruno Haible  <bruno@clisp.org>
18325
18326         * lib/eealloc.h: New file.
18327
18328 2004-01-20  Bruno Haible  <bruno@clisp.org>
18329
18330         * lib/binary-io.h: Avoid warnings on Cygwin.
18331
18332 2004-01-20  Bruno Haible  <bruno@clisp.org>
18333
18334         * lib/allocsa.h: New file, from GNU gettext.
18335         * lib/allocsa.c: New file, from GNU gettext.
18336
18337 2004-01-18  Karl Berry  <karl@gnu.org>
18338
18339         * doc/gpl.texi, doc/lgpl.texi: new files.
18340
18341 2004-01-18  Karl Berry  <karl@gnu.org>
18342
18343         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
18344         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
18345
18346 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18347
18348         Merge from coreutils.
18349
18350         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
18351         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
18352         (gl_DEFAULT_POSIX2_VERSION): Move
18353         the documentation from 'configure' into 'config.hin',
18354         so that 'configure --help' isn't burdened by it and
18355         we don't have to worry about its formatting there.
18356         Reword the documentation so that it's more succinct
18357         and can be run together into a single paragraph.
18358         * m4/same.m4 (gl_SAME): Check for pathconf.
18359
18360 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18361
18362         Merge from coreutils.
18363
18364         * lib/posixver.c: Include posixver.h.
18365
18366         * lib/same.c: Include <stdbool.h>, <limits.h>.
18367         (_POSIX_NAME_MAX): Define if not defined.
18368         (MIN): New macro.
18369         (same_name): If file names are silently truncated, report
18370         that the file names are the same if they are the same after
18371         the silent truncation.
18372
18373         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
18374         conversion function.
18375         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
18376         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
18377         longer needed.
18378
18379 2004-01-15  Jim Meyering  <jim@meyering.net>
18380
18381         Merge from coreutils.
18382
18383         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18384         if no library is required.
18385         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18386         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18387         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18388         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18389         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18390         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18391         value, $ac_cv_search_crypt, if it's "none required".
18392         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18393         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18394         not gl_FUNC_GETLOADAVG.
18395         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18396         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18397
18398 2004-01-15  Jim Meyering  <jim@meyering.net>
18399
18400         Merge from coreutils.
18401
18402         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18403         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18404         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18405
18406         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18407         optional configure-time default.
18408
18409         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18410
18411         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18412
18413 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18414
18415         Merge from coreutils.
18416
18417         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18418         value, $ac_cv_search_nanosleep, if it's "none required".
18419
18420 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18421
18422         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18423         with like-named macro in fnmatch.c.
18424         (EXT): Use an internal constant instead.
18425
18426         Merge fnmatch patches from glibc.
18427         * lib/fnmatch.c (mbsinit): Remove define.
18428         Add libc_hidden_ver (__fnmatch, fnmatch).
18429         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18430         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18431
18432 2004-01-14  Karl Berry  <karl@gnu.org>
18433
18434         * config/install-sh: update from automake.
18435
18436 2004-01-13  Karl Berry  <karl@gnu.org>
18437
18438         * config/install-sh: update from automake.
18439
18440 2004-01-09  Karl Berry  <karl@gnu.org>
18441
18442         * config/install-sh: update from automake.
18443
18444 2004-01-05  Karl Berry  <karl@gnu.org>
18445
18446         * config/config.{sub,guess}: update from config.
18447
18448 2003-12-31  Karl Berry  <karl@gnu.org>
18449
18450         * config/depcomp: update from automake.
18451
18452 2003-12-14  Karl Berry  <karl@gnu.org>
18453
18454         * lib/config.charset: update from gettext-runtime.
18455
18456 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18457
18458         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18459         Bug reported by Alfred M. Szmidt.
18460
18461 2003-12-03  Bruno Haible  <bruno@clisp.org>
18462
18463         * m4/gettext.m4: Upgrade from gettext-0.13.
18464         * m4/po.m4: Upgrade from gettext-0.13.
18465         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18466         * m4/intmax.m4: New file, from gettext-0.13.
18467         * m4/printf-posix.m4: New file, from gettext-0.13.
18468
18469 2003-11-29  Karl Berry  <karl@gnu.org>
18470
18471         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18472
18473 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18474             Bruno Haible  <bruno@clisp.org>
18475
18476         * lib/printf-parse.h: Don't include sys/types.h.
18477         (ARG_NONE): New macro.
18478         (char_directive): Change type of *arg_index fields to size_t.
18479         * lib/printf-parse.c: Don't include sys/types.h.
18480         (SSIZE_MAX): Remove macro.
18481         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18482         Remove unnecessary overflow check.
18483         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18484         fields.
18485
18486 2003-11-25  Bruno Haible  <bruno@clisp.org>
18487
18488         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18489
18490 2003-11-25  Bruno Haible  <bruno@clisp.org>
18491
18492         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18493         gt_TYPE_SSIZE_T.
18494
18495 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18496
18497         * modules/alloca: Remove dependency on xalloc.
18498
18499 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18500
18501         * lib/alloca.c: Remove dependency on xalloc module.
18502         (xalloc_die): Remove.
18503         (memory_full) [!defined emacs]: New macro.
18504         [!defined emacs]: Don't include xalloc.h.
18505         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18506         address arithmetic overflows.  Change datatypes a bit to avoid
18507         unnecessary casts.
18508
18509 2003-11-22  Jim Meyering  <jim@meyering.net>
18510
18511         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18512         s/size/size_t/.
18513
18514 2003-11-21  Karl Berry  <karl@gnu.org>
18515
18516         * config/config.{sub,guess}: update from config.
18517
18518 2003-11-18  Karl Berry  <karl@gnu.org>
18519
18520         * config/config.{sub,guess}: update from config.
18521
18522         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18523
18524 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18525
18526         * README: Mention that S+T cannot overflow if S is the size of
18527         an existing object and T is sufficiently small.
18528
18529 2003-11-17  Jim Meyering  <jim@meyering.net>
18530
18531         On systems without utime and without a utimes function capable of
18532         dealing with a NULL struct utimbuf* argument, this utime replacement
18533         could -- in unusual circumstances -- leak a file descriptor.
18534         * lib/utime.c: Include <unistd.h> and <errno.h>.
18535         (utime_null): Be sure to close `fd' and to preserve errno.
18536         Reported by Geoff Collyer via Arnold Robbins.
18537
18538 2003-11-17  Bruno Haible  <bruno@clisp.org>
18539
18540         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18541         (Depends-on): Add xsize.
18542
18543 2003-11-17  Bruno Haible  <bruno@clisp.org>
18544
18545         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18546
18547 2003-11-17  Bruno Haible  <bruno@clisp.org>
18548
18549         * lib/vasnprintf.c (alloca): Remove fallback definition.
18550         (freea): Remove definition.
18551         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18552         Reported by Paul Eggert.
18553
18554 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18555             Bruno Haible  <bruno@clisp.org>
18556
18557         Protect against address arithmetic overflow.
18558         * lib/printf-args.h: Include stddef.h.
18559         (arguments): Change type of field 'count' to size_t.
18560         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18561         'unsigned int' where appropriate.
18562         * lib/printf-parse.h: Include sys/types.h.
18563         (char_directive): Change type of *arg_index fields to ssize_t.
18564         (char_directives): Change type of fields 'count', max_*_length to
18565         size_t.
18566         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18567         (SSIZE_MAX): Define fallback value.
18568         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18569         instead of 'int' where appropriate. Check a_allocated, d_allocated
18570         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18571         * lib/vasnprintf.c: Include xsize.h.
18572         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18573         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18574         overflow. Avoid wraparound when converting a width or precision from
18575         decimal to binary.
18576
18577 2003-11-16  Bruno Haible  <bruno@clisp.org>
18578
18579         Update from GNU gettext.
18580         * lib/printf-parse.c: Generalize to it can be compiled for wide
18581         strings.
18582         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18583         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18584         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18585         SNPRINTF): New macros.
18586         Don't include <alloca.h> if the file is used inside libintl.
18587         (local_wcslen): New function, for Solaris 2.5.1.
18588         (VASNPRINTF): Use it instead of wcslen.
18589
18590 2003-11-16  Bruno Haible  <bruno@clisp.org>
18591
18592         * lib/xsize.h (xmax): New function.
18593         (xsum, xsum3, xsum4): Declare as "pure" functions.
18594
18595 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18596
18597         * modules/xalloc (Files): Undo latest change, since xalloc.h
18598         no longer needs SIZE_MAX or PTRDIFF_MAX.
18599
18600 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18601
18602         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18603         gl_PTRDIFF_MAX.
18604
18605 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18606
18607         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18608         "return", to pacify some unknown compiler.  Problem reported
18609         by Joerg Schilling.
18610
18611 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18612
18613         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18614         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18615         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18616         heuristic is just as accurate as far as we know, and it removes a
18617         dependency on size_max.m4 and ptrdiff_max.m4.
18618
18619 2003-11-11  Bruno Haible  <bruno@clisp.org>
18620
18621         * modules/xsize (Files): Add m4/size_max.m4.
18622         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18623
18624 2003-11-11  Bruno Haible  <bruno@clisp.org>
18625
18626         * m4/size_max.m4: New file.
18627         * m4/ptrdiff_max.m4: New file.
18628         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18629         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18630         (gl_XALLOC): Invoke it.
18631
18632 2003-11-11  Bruno Haible  <bruno@clisp.org>
18633
18634         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18635         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18636         defined.
18637
18638 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18639
18640         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18641         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18642         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18643         From Bruno Haible.
18644         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18645         not (size_t) -1, since it's defined here.
18646
18647 2003-11-09  Karl Berry  <karl@gnu.org>
18648
18649         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18650
18651 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18652
18653         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18654         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18655         Reject sizes of exactly SIZE_MAX bytes.
18656         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18657         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18658
18659 2003-11-05  Bruno Haible  <bruno@clisp.org>
18660
18661         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18662         SIZE_MAX defined in <limits.h> on Solaris.
18663
18664 2003-11-04  Jim Meyering  <jim@meyering.net>
18665
18666         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18667         variable names, rather than @VAR@.
18668         * modules/poll: Likewise.
18669
18670 2003-11-04  Bruno Haible  <bruno@clisp.org>
18671
18672         * modules/xsize: New file.
18673         * modules/linebreak: Depend on xsize.
18674         * MODULES.html.sh (func_all_modules): Add xsize.
18675
18676 2003-11-04  Bruno Haible  <bruno@clisp.org>
18677
18678         * m4/xsize.m4: New file.
18679
18680 2003-11-04  Bruno Haible  <bruno@clisp.org>
18681
18682         * lib/xsize.h: New file.
18683         * lib/linebreak.c: Include xsize.h.
18684         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18685         argument for overflow.
18686         Suggested by Paul Eggert.
18687
18688 2003-11-03  Karl Berry  <karl@gnu.org>
18689
18690         * config/config.{guess,sub}: update from config.
18691
18692 2003-11-03  Jim Meyering  <jim@meyering.net>
18693
18694         * modules/userspec (lib_SOURCES): Add userspec.h.
18695         (Include): Add "userspec.h".
18696         Improve description.
18697
18698 2003-11-03  Jim Meyering  <jim@meyering.net>
18699
18700         * lib/userspec.c: Include "userspec.h".
18701         * lib/userspec.h: New file.
18702
18703 2003-11-03  Bruno Haible  <bruno@clisp.org>
18704
18705         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18706
18707 2003-11-03  Bruno Haible  <bruno@clisp.org>
18708
18709         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18710         available, to avoid (extremely rare) race condition.
18711         Suggested by Paul Eggert.
18712
18713 2003-11-02  Karl Berry  <karl@gnu.org>
18714
18715         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18716
18717 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18718
18719         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18720         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18721         (read_filesystem_list): Set and use me_type_malloced.
18722         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18723         whatever the type happens to be), for brevity and consistency.
18724         Check for size calculation overflow on Alphas running OSF/1.
18725
18726 2003-10-31  Jim Meyering  <jim@meyering.net>
18727
18728         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18729
18730         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18731
18732 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18733             Bruno Haible  <bruno@clisp.org>
18734
18735         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18736         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18737
18738 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18739
18740         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18741         netbsd*-gnu*.  Suggested by Robert Millan.
18742
18743 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18744
18745         * modules/group-member: Depend on stdbool.
18746
18747 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18748
18749         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18750
18751 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18752
18753         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18754         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18755         after the 'gnu' in these cases.  This fixes some bugs in the
18756         previous change, and is based on suggestions by Robert Millan.
18757
18758 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18759
18760         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18761         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18762         no longer needed.
18763         * lib/quotearg.c (quotearg_n_options): Use it.
18764         * lib/group-member.c: Include <stdbool.h>.
18765         (free_group_info): Arg is now const *; don't free arg.
18766         (get_group_info): Now returns bool and accepts struct group_info *,
18767         rather than returning a malloc'ed struct group_info *.
18768         All uses changed.  Check for overflow in internal size calculation.
18769
18770         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18771         rather than xmalloc/xrealloc.
18772         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18773         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18774         conformance bug: the old code used a pointer after freeing the
18775         storage that it addressed.
18776         * lib/hash.c (hash_initialize): Simplify the code by using
18777         xalloc_oversized rather than doing it by hand.
18778         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18779         the buffer preserved.  Use free and xmalloc instead.
18780         * lib/quotearg.c (quotearg_n_options): Likewise.
18781         Use a simpler test for size overflow.  Don't use xalloc_oversized
18782         because unsigned int might be wider than size_t (!); this suggests
18783         that we should switch from unsigned int to size_t for slot numbers.
18784
18785 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18786
18787         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18788         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18789         NetBSD kernels.  Requested by Richard Stallman.
18790
18791 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18792
18793         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18794         to allocate the returned structure.  Do not allocate a subarray,
18795         as x2nrealloc will do that.
18796         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18797         instead of xnrealloc.
18798         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18799
18800 2003-10-27  Bruno Haible  <bruno@clisp.org>
18801
18802         * lib/stdbool_.h: Better support for BeOS.
18803
18804 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18805
18806         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18807         now uses inline.
18808
18809 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18810
18811         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18812         callers that want to do their own size-overflow checking.  Include
18813         <stdbool.h>, since xalloc_oversized returns bool.
18814         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18815         to use xalloc_oversized.
18816
18817         Add two functions x2realloc, x2nrealloc, for programs that grow
18818         arrays dynamically by doubling their sizes.
18819         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18820         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18821         New functions.
18822
18823         Port to C99 semantics for 'inline' of external functions.
18824         Bug reported by Bruno Haible.
18825         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18826         with the old contents of xnmalloc.
18827         (xnmalloc, xmalloc): Use it.
18828         (xnrealloc_inline): New static inline function,
18829         with the old contents of xnrealloc.
18830         (xnrealloc, xrealloc): Use it.
18831
18832         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18833         that.
18834
18835 2003-10-26  Karl Berry  <karl@gnu.org>
18836
18837         * config/srclist.txt (COPYING.DOC): no longer available from
18838         /gd/gnuorg; don't know where the ultimate source is.
18839
18840 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18841
18842         Fix several address-calculation bugs in the hash modules,
18843         plus some minor code cleanup.
18844
18845         * lib/hash.h: Include <stdbool.h>, for bool.
18846         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18847         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18848         hash_get_n_entries, hash_get_max_bucket_length,
18849         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18850         hash_rehash): Use size_t rather than unsigned.
18851         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18852         hash_get_n_buckets_used, hash_get_n_entries,
18853         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18854         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18855         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18856         Likewise.
18857         (SIZE_MAX): Define if not defined.
18858         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18859         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18860         hash_print):
18861         Use const * when possible.
18862         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18863         (check_tuning): Fix bug: if tuning parameters were very close to
18864         0 or 1, rounding errors could have caused subscript violations.
18865         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18866         (hash_initialize): Add 'fail:' label
18867         to free table and return NULL, and use it to simplify code.
18868         Use calloc rather than clearing the storage ourself.
18869         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18870         buffer size calculations.
18871         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18872         Include <stddef.h>, for size_t.
18873         * lib/hash-pjw.c (hash_pjw): Likewise.
18874         Switch to method described by Bruno Haible.
18875         Include <limits.h>, for CHAR_BIT.
18876         (SIZE_BITS): New macro.
18877
18878 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18879
18880         * m4/getline.m4 (AM_FUNC_GETLINE):
18881         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18882         hosts.  Problem reported by Derek Robert Price in
18883         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18884         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18885         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18886
18887 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18888
18889         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18890         ceiling the allocation at NMAX bytes rather than silently
18891         discarding input bytes before NMAX is reached.  This makes
18892         a difference only if NMAX exceeds SIZE_MAX / 2.
18893
18894         * lib/obstack.c: Merge from glibc.
18895         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18896         Add libc_hidden_def (_obstack_newchunk).
18897         (_obstack_free) [! defined _LIBC]: Remove.
18898         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18899         a clone of the function body.
18900         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18901         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18902
18903         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18904         glibc.
18905         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18906         arg to memcpy.
18907
18908         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18909         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18910         Don't use lvalue casts, as GCC plans to remove support for them
18911         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18912         was also present in the non-GCC version, indicating that this
18913         code had always been buggy and had never been widely used.
18914         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
18915         Use the fast variant of each macro, rather than copying the
18916         definiens of the fast variant; that way, we'll be more likely to
18917         catch future bugs in the fast variants.
18918
18919 2003-10-20  Bruno Haible  <bruno@clisp.org>
18920
18921         * modules/wait-process: New file.
18922         * MODULES.html.sh (func_all_modules): Add wait-process.
18923
18924 2003-10-20  Bruno Haible  <bruno@clisp.org>
18925
18926         * m4/wait-process.m4: New file.
18927
18928 2003-10-20  Bruno Haible  <bruno@clisp.org>
18929
18930         * lib/wait-process.h: New file, from GNU gettext.
18931         * lib/wait-process.c: New file, from GNU gettext.
18932
18933 2003-10-19  Jim Meyering  <jim@meyering.net>
18934
18935         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
18936         HPUX 10.20.
18937
18938 2003-10-18  Karl Berry  <karl@gnu.org>
18939
18940         * config/config.guess: update from config.
18941
18942 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18943
18944         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
18945         (getgroups): First arg is int, not size_t.
18946         Don't let 'free' mangle errno.
18947
18948 2003-10-16  Paul Eggert  <eggert@twinsun.com>
18949
18950         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
18951
18952 2003-10-16  Karl Berry  <karl@gnu.org>
18953
18954         * config/config.{guess,sub}: update from config.
18955
18956 2003-10-16  Jim Meyering  <jim@meyering.net>
18957
18958         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
18959         memcpy.
18960
18961 2003-10-15  Paul Eggert  <eggert@twinsun.com>
18962
18963         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
18964         (SIZE_MAX): Remove.
18965         (new_exclude, add_exclude_file): Initial size no longer needs to
18966         be a power of 2.
18967         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18968         our own address arithmetic overflow checking.
18969
18970         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18971         (fnmatch): Do not alloca more than 2000 wide characters;
18972         instead, use malloc for large buffers.
18973         Check for address arithmetic overflow, and return -1
18974         with errno set to ENOMEM in that case.
18975         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18976         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18977         instead, return -1.  Check for address arithmetic overflow.
18978
18979 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18980
18981         Handle invalid suffixes and overflow independently, so that
18982         callers can treat them independently as needed.  Fix some bugs in
18983         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18984         suffix for a human-readable blocksize.  The major caller-visible
18985         change is the addition of a new
18986         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18987         that both overflow and suffix chars were found.
18988
18989         * lib/human.c (humblock): Don't check separately for invalid suffix
18990         char; that is xstrtoumax's job (now that its bug is fixed).
18991         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18992         INTMAX_MAX]: New macros.
18993         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18994         TYPE_MAXIMUM): New macros.
18995         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18996         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18997         if overflow occurs, as it's what __strtol does and it's more useful
18998         in practice.
18999         (__xstrtol): If __strtol reports some error other than ERANGE,
19000         reflect it to the caller as LONGINT_INVALID.  If it reports
19001         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
19002         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
19003         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
19004         value.
19005         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
19006         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
19007         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
19008         [defined UINTMAX_MAX]: New macros.
19009
19010 2003-10-14  Bruno Haible  <bruno@clisp.org>
19011
19012         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
19013
19014 2003-10-14  Bruno Haible  <bruno@clisp.org>
19015
19016         * m4/sig_atomic_t: New file, from GNU gettext.
19017         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
19018
19019 2003-10-14  Bruno Haible  <bruno@clisp.org>
19020
19021         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
19022         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
19023         Also use volatile where needed.
19024
19025 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19026
19027         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
19028         Change maintainer from Bruno Haible to 'all'.
19029
19030 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19031
19032         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
19033
19034 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19035
19036         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
19037         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
19038         and define in terms of the other primitives.
19039         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
19040         (SIZE_MAX): Define if not already defined.
19041         (array_size_overflow): New function.
19042         (xalloc_die): Abort instead of exiting if 'error' returns.
19043         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
19044         (xmalloc, xrealloc): Use them.
19045         (xcalloc): Check for address arithmetic overflow.
19046         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
19047         a bit faster than strcpy.
19048
19049 2003-10-10  Simon Josefsson  <jas@extundo.com>
19050
19051         * modules/argp (Depends-on): Add restrict and strcase.
19052
19053 2003-10-10  Simon Josefsson  <jas@extundo.com>
19054
19055         * m4/argp.m4: Add AC_C_INLINE.
19056
19057 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19058
19059         Merge getpass from libc, plus a few fixes.
19060
19061         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
19062         Include <stdbool.h>.
19063         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
19064         __fsetlocking to empty.
19065         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
19066         do include <bits/libc-lock.h>.
19067         Do not include <fcntl.h>; not needed.
19068         [_LIBC]: Include <wchar.h>.
19069         (NOTCANCEL_MODE): New macro.
19070         (flockfile, funlockfile) [_LIBC]: New macros.
19071         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
19072         [!_LIBC]: New macros.
19073         (call_fclose): New function.
19074         (getpass): Use it.  Save tty stream separately; this simplifies the
19075         code and makes it more reliable if stdin happens to equal stdout.
19076         Invoke __fsetlocking on tty.
19077         Handle thread cancellation if needed.
19078         Namespace cleanup (use __tcgetattr, __getline).
19079         Use bool for Booleans.
19080         [USE_IN_LIBIO]: Handle wide streams.
19081         [!_LIBC]: Unconditionally do the fseek, since we don't know what
19082         stream might go where.
19083
19084         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
19085         doesn't have to include <stdio.h> before us.
19086         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
19087         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
19088         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
19089         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
19090         if not declared, so that we can use getpass.c code from libc without
19091         rewriting it.
19092         (flockfile, ftrylockfile, funlockfile): New macros.
19093
19094 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19095
19096         * modules/getpass: Depend on stdbool.
19097
19098 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19099
19100         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
19101
19102 2003-10-07  Karl Berry  <karl@gnu.org>
19103
19104         * config/config.{guess,sub}: update from config.
19105
19106 2003-10-06  Jim Meyering  <jim@meyering.net>
19107             Bruno Haible  <bruno@clisp.org>
19108
19109         This lets translators provide better translations for the
19110         "Written by ..." part of --version output.
19111         * lib/version-etc.h: Include stdarg.h.
19112         (version_etc_copyright): Declare as readonly.
19113         (version_etc): Make this function variadic with a NULL-terminated list
19114         of author name strings.
19115         (version_etc_va): New declaration.
19116         * lib/version-etc.c: Include stdarg.h, stdlib.h.
19117         (version_etc_copyright): Declare as readonly.
19118         (version_etc_va): New function. Provide a different translatable string
19119         for each possible number of authors < 10. Abbreviate when there are 10
19120         authors or more.
19121         (version_etc): Make this function variadic. Call version_etc_va.
19122         Suggestion from Gary V. Vaughan.
19123
19124         * lib/long-options.h (parse_long_options): Change prototype: the
19125         authors string is moved to the end and becomes variadic.
19126         * lib/long-options.c: Include stdarg.h.
19127         (parse_long_options): Make this function variadic, too.
19128         Call version_etc_va, not version_etc.
19129
19130 2003-10-06  Bruno Haible  <bruno@clisp.org>
19131
19132         * modules/version-etc-2: Remove file.
19133         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
19134
19135 2003-10-06  Bruno Haible  <bruno@clisp.org>
19136
19137         * modules/fatal-signal: New file.
19138         * MODULES.html.sh (func_all_modules): Add fatal-signal.
19139
19140 2003-10-06  Bruno Haible  <bruno@clisp.org>
19141
19142         * m4/fatal-signal.m4: New file.
19143         * m4/signalblocking.m4: New file, from GNU gettext.
19144
19145 2003-10-06  Bruno Haible  <bruno@clisp.org>
19146
19147         * lib/version-etc-2.h: Remove file.
19148         * lib/version-etc-2.c: Remove file.
19149
19150 2003-10-06  Bruno Haible  <bruno@clisp.org>
19151
19152         * lib/fatal-signal.h: New file, from GNU gettext.
19153         * lib/fatal-signal.c: New file, from GNU gettext.
19154
19155 2003-10-05  Paul Eggert  <eggert@twinsun.com>
19156
19157         * README: Rework advice for preventing empty .o files.
19158         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
19159         not <sys/types.h>.
19160
19161 2003-10-04  Karl Berry  <karl@gnu.org>
19162
19163         * lib/argp*: update from libc.
19164
19165 2003-10-04  Karl Berry  <karl@gnu.org>
19166
19167         * config/config.{guess,sub}: update from config.
19168
19169 2003-10-02  Bruno Haible  <bruno@clisp.org>
19170
19171         * modules/lchown (Include): Add lchown.h.
19172         * modules/time_r (Include): Use "..." syntax.
19173         * modules/xgetdomainname (Include): Add xgetdomainname.h.
19174
19175 2003-10-01  Simon Josefsson  <jas@extundo.com>
19176
19177         * MODULES.html.sh (func_all_modules): Move gethostname from section
19178         'based on' to section 'lacking' POSIX:2001.
19179
19180 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
19181
19182         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
19183         to output mode on the same stream.
19184
19185 2003-09-29  Paul Eggert  <eggert@twinsun.com>
19186
19187         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
19188         Fix arg typo in previous patch.
19189
19190 2003-09-28  Jim Meyering  <jim@meyering.net>
19191
19192         * lib/error.c: Correct cpp indentation.
19193
19194 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19195
19196         * modules/free: New file.
19197
19198 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19199
19200         * m4/free.m4: New file.
19201
19202 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19203
19204         * lib/minmax.h (MIN, MAX)
19205         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
19206         Omit the special code that used __typeof__, since we worry that
19207         it could be more trouble than it's worth.  See:
19208         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
19209         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
19210
19211         * lib/free.c: New file.
19212
19213 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
19214
19215         Trivial fixes to Makefile.am parts of module listings.
19216         * modules/strstr: Append strstr.h to lib_SOURCES.
19217         * modules/strcase: Likewise, for strcase.h.
19218
19219 2003-09-27  Karl Berry  <karl@gnu.org>
19220
19221         * config/mkinstalldirs: update from automake.
19222
19223 2003-09-26  Paul Eggert  <eggert@twinsun.com>
19224
19225         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
19226         (error_tail): Do not loop, reallocating temporary buffer, since
19227         the output cannot contain more wide characters than the input
19228         contains bytes, the size must be big enough already.  This avoids
19229         one potential size overflow calculation.  Check for size overflow
19230         when calculating temporary buffer size.  Free temporary buffer
19231         when done, if it was allocated with malloc; this plugs a memory
19232         leak.  Remove casts from void * to pointers, that are no longer
19233         needed now that we're assuming C89 or better.
19234
19235         Merge error changes from glibc.
19236
19237         * lib/error.c, error.h: Update copyright notice header to match glibc.
19238         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
19239         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
19240         Disable cancellation while printing error.
19241         * lib/error.h: Prepend __ to parameter names.
19242
19243 2003-09-26  Jim Meyering  <jim@meyering.net>
19244
19245         * lib/error.c (error_tail): Move some declarations
19246         into inner scope where the local variables are used.
19247
19248 2003-09-26  Bruno Haible  <bruno@clisp.org>
19249
19250         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
19251         stpncpy().
19252         Don't define stpncpy through config.h; it's now done through stpncpy.h.
19253
19254 2003-09-26  Bruno Haible  <bruno@clisp.org>
19255
19256         * lib/stpncpy.h (gnu_stpncpy): New declaration.
19257         (stpncpy): Define as alias for gnu_stpncpy.
19258         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
19259
19260 2003-09-25  Simon Josefsson  <jas@extundo.com>
19261
19262         * lib/xgetdomainname.h: New file.
19263         * lib/xgetdomainname.c: New file.
19264
19265 2003-09-25  Simon Josefsson  <jas@extundo.com>
19266             Bruno Haible  <bruno@clisp.org>
19267
19268         * modules/getdomainname: New file.
19269         * modules/xgetdomainname: New file.
19270         * MODULES.html.sh (func_all_modules): Add getdomainname,
19271         xgetdomainname.
19272
19273 2003-09-25  Simon Josefsson  <jas@extundo.com>
19274             Bruno Haible  <bruno@clisp.org>
19275
19276         * m4/getdomainname.m4: New file.
19277
19278 2003-09-25  Simon Josefsson  <jas@extundo.com>
19279             Bruno Haible  <bruno@clisp.org>
19280
19281         * lib/getdomainname.h: New file.
19282         * lib/getdomainname.c: New file.
19283
19284 2003-09-25  Karl Berry  <karl@gnu.org>
19285
19286         * lib/argp-fmtstream.c, argp-help.c: update from libc.
19287
19288 2003-09-25  Karl Berry  <karl@gnu.org>
19289
19290         * config/install-sh: update from automake.
19291
19292 2003-09-25  Bruno Haible  <bruno@clisp.org>
19293
19294         * modules/version-etc-2: New file, from modules/version-etc with
19295         modifications.
19296         * MODULES.html.sh (func_all_modules): Add version-etc-2.
19297
19298 2003-09-25  Bruno Haible  <bruno@clisp.org>
19299
19300         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
19301         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
19302
19303 2003-09-24  Simon Josefsson  <jas@extundo.com>
19304
19305         * modules/xgethostname: Add xgethostname.h.
19306
19307 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19308
19309         * lib/linebuffer.c (freebuffer): Don't free the argument, just
19310         the buffer associated with the argument.  Bug reported by
19311         Simon Josefsson.
19312
19313 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19314
19315         * README: Document assumptions that 'int' is at least 32 bits
19316         wide, that integer arithmetic is 2's complement without overflow,
19317         that there are no holes in integer values, that adding sizes of
19318         two nonoverlapping objects can't overflow, and that all-bits-zero
19319         yields scalar zero.  Fix spelling and capitalization typos.
19320
19321 2003-09-19  Karl Berry  <karl@gnu.org>
19322
19323         * lib/argp.h: update from libc.
19324
19325 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19326
19327         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
19328         to avoid spurious warnings like "AC_RUN_IFELSE was called before
19329         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
19330
19331 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19332
19333         * gnulib-tool: Use "test -h", not "test -L", for portability
19334         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
19335         (tags_regexp): Remove, since \| doesn't conform to POSIX.
19336         (sed_extract_prog): Issue s commands one-by-one, rather than
19337         using \| in one s command.
19338
19339 2003-09-16  Paul Eggert  <eggert@twinsun.com>
19340
19341         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
19342         input error, instead of returning NULL the next time we are called
19343         (and therefore losing track of errno).
19344
19345 2003-09-16  Bruno Haible  <bruno@clisp.org>
19346
19347         * gnulib-tool (func_create_testdir): Warn about duplicated
19348         dependencies.
19349
19350 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19351
19352         * modules/argmatch, modules/fatal, modules/obstack,
19353         modules/xalloc, modules/xgethostname: Sort dependencies by
19354         importance, not alphabetically.
19355
19356 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19357
19358         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
19359         fails, so that the caller gets the proper errno.
19360
19361         * lib/readutmp.c (read_utmp): Likewise.
19362         Check for fstat error.  Close stream and free storage
19363         when failing.
19364
19365 2003-09-14  Karl Berry  <karl@gnu.org>
19366
19367         * config/srclist.txt (strdup.c): disable for c89 changes.
19368
19369 2003-09-14  Jim Meyering  <jim@meyering.net>
19370
19371         * lib/getloadavg.c: Correct cpp indentation.
19372         * lib/strdup.c: Likewise.
19373         * lib/vasnprintf.c: Likewise.
19374
19375 2003-09-14  Bruno Haible  <bruno@clisp.org>
19376
19377         * modules/fwriteerror: New file.
19378         * MODULES.html.sh (func_all_modules): Add fwriteerror.
19379
19380 2003-09-14  Bruno Haible  <bruno@clisp.org>
19381
19382         * lib/fwriteerror.h: New file.
19383         * lib/fwriteerror.c: New file.
19384
19385 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19386
19387         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19388         modules/xgethostname, modules/xalloc: Depend on exit.
19389
19390 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19391
19392         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19393
19394         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19395         and AC_MINIX, too, so that their extensions are available.
19396
19397         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19398         This macro has been superseded by gl_BACKUPFILE.
19399
19400         More patches to assume C89 or better.
19401
19402         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19403
19404         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19405         unconditionally.
19406         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19407         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19408         Include <string.h>, <stdlib.h> unconditionally.
19409         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19410         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19411         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19412         headers or for string.h.
19413         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19414         or strtoul.
19415
19416         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19417         headers.
19418         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19419         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19420         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19421         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19422         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19423         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19424         memcpy, memset.
19425         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19426         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19427         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19428         strtol.
19429         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19430         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19431         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19432         strtoul.
19433
19434 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19435
19436         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19437         * lib/obstack.c [!defined _LIBC]: Likewise.
19438         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19439         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19440         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19441
19442         More changes to assume C89 or better.
19443
19444         * lib/error.c (error_tail): Assume vprintf.
19445
19446         * lib/argmatch.c (getenv): Remove decl.
19447         * lib/progreloc.c (get_full_program_name): Define via prototype.
19448         * lib/setenv.c (clearenv): Likewise.
19449         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19450         needed.
19451         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19452         (malloc, memcpy): Remove decls.
19453         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19454         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19455         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19456         (memcpy): Remove macro.
19457         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19458         (__P): Remove.  All uses removed.
19459         (PTR): Remove.  All uses changed to void *.
19460         (CHAR_BIT, NULL): Remove.
19461         (spaces, zeros, memset_space, memset_zero)
19462         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19463         Remove.
19464         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19465         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19466         Define with prototype.
19467         Remove now-unnecessary prototype decl.
19468         (extra_args_spec): Assume ANSI C.  All uses changed.
19469         (extra_args_spec_iso): Remove.
19470         (my_strftime, emacs_strftimeu): Define via prototype.
19471         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19472         unconditionally.
19473         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19474         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19475         (strtoul, strtol): Remove decls.
19476         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19477         LONG_MAX): Remove.
19478         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19479         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19480         (LOCALE_PARAM_PROTO): New macro.
19481         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19482         (INTERNAL (strtol), strtol): Define with a prototype.
19483         (PARAMS): Remove.  All uses removed.
19484         * lib/tempname.c: Include <string.h> unconditionally.
19485         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19486         * lib/xgethostname.c (main): Define with a prototype.
19487         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19488         Include <stdlib.h> unconditionally.
19489         (calloc, malloc, realloc, free): Remove decls.
19490         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19491         Include <stdlib.h> unconditionally.  Sort include file names.
19492         (strtod): Remove.
19493         (xstrtod): Define with a prototype.
19494         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19495         (strtol, strtoul): Remove decls.
19496
19497 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19498
19499         More patches to assume C89 or better.
19500         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19501         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19502         string.h, memchr, STDC_HEADERS.
19503
19504 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19505
19506         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19507         Include <stdlib.h>, <string.h> unconditionally.
19508         Remove now-unnecessary cast to char *.
19509         * lib/strnlen.c: Include <string.h> unconditionally.
19510         * lib/yesno.c (yesno): Define with a prototype.
19511
19512 2003-09-11  Bruno Haible  <bruno@clisp.org>
19513
19514         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19515
19516 2003-09-10  Jim Meyering  <jim@meyering.net>
19517
19518         * lib/error.c: Correct indentation of cpp directives.
19519
19520 2003-09-10  Bruno Haible  <bruno@clisp.org>
19521
19522         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19523         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19524         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19525         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19526         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19527         <stdlib.h> and <string.h> checks.
19528         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19529         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19530
19531 2003-09-10  Bruno Haible  <bruno@clisp.org>
19532
19533         * lib/strcspn.c: Include <string.h> unconditionally.
19534         * lib/strpbrk.c: Include <string.h> unconditionally.
19535         * lib/strstr.c: Include <string.h> unconditionally.
19536         * lib/unicodeio.c: Include <string.h> unconditionally.
19537         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19538         * lib/unsetenv.c: Likewise.
19539         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19540         * lib/yesno.c: Include <stdlib.h> unconditionally.
19541         (rpmatch): Add prototype.
19542
19543 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19544
19545         More patches to assume C89 or better.
19546         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19547         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19548         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19549         or for string.h.
19550         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19551         stdlib.h.
19552         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19553         C headers.
19554         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19555         string.h.
19556         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19557         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19558         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19559         or for string.h.
19560         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19561         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19562         C headers.
19563         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19564         memcpy.
19565         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19566         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19567         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19568         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19569         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19570         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19571         string.h, free.
19572         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19573         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19574         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19575         C headers, or for string.h.
19576         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19577         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19578         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19579         headers, memory.h, stdlib.h, string.h, strings.h.
19580         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19581         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19582         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19583         strchr.
19584         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19585         headers, memory.h, string.h.
19586         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19587         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19588         free.
19589         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19590         headers.
19591         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19592         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19593         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19594         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19595         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19596
19597 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19598
19599         More K&R removal.
19600
19601         * lib/acosl.c (main): Use a prototype.
19602         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19603         tanl.c: Likewise.
19604
19605         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19606
19607         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19608         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19609         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19610         with a prototype.
19611         * lib/getopt.c (const): Remove macro.
19612         Include <string.h> unconditionally.
19613         (my_index): Remove; all uses changed to strchr.
19614         (strlen): Remove decl.
19615         (exchange): Remove forward decl; no longer needed.
19616         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19617         Define with prototype.
19618         * lib/getopt1.c (const): Remove macro.
19619         (getopt_long, getopt_long_only, main): Define with prototype.
19620
19621         * lib/getugroups.c: Include <string.h> unconditionally.
19622
19623         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19624         (getusershell, setusershell, endusershell, readname, main):
19625         Define with prototypes.
19626
19627         * lib/group-member.c: Include group-member.h first.
19628         Include <stdlib.h> unconditionally.
19629
19630         * lib/hard-locale.c: Include hard-locale.h first.
19631         Include <stdlib.h>, <string.h> unconditionally.
19632
19633         * lib/hash.c (free, malloc): Remove decls.
19634         Include <stdlib.h> unconditionally.
19635
19636         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19637         (getenv): Do not declare.
19638
19639         * lib/idcache.c: Include <string.h> unconditionally.
19640
19641         * lib/long-options.c: Include long-options.h first, to test interface.
19642         Include <stdlib.h> unconditionally.
19643
19644         * lib/makepath.c: Include makepath.h first, to test interface.
19645         Include <stdlib.h> and <string.h> unconditionally.
19646
19647         * lib/linebuffer.c: Include <stdlib.h>.
19648         (free): Remove decl.
19649
19650         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19651         stddef.h. rpl_malloc returns void *, not char *.
19652         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19653         prototype.
19654
19655         * lib/md5.h: Include <limits.h> unconditionally.
19656         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19657         (__P): Remove; all uses removed.
19658         * lib/md5.c: Include "md5.h" first.
19659         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19660         md5_buffer, md5_process_bytes, md5_process_block):
19661         Define with prototypes.
19662         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19663         * lib/sha.c: Include "sha.h" first.
19664         Include <stdlib.h>, <string.h> unconditionally.
19665
19666         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19667         * lib/memcmp.c (__ptr_t): Likewise.
19668         * lib/memrchr.c (__ptr_t): Likewise.
19669         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19670         Include <string.h> unconditionally.
19671         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19672         * lib/memchr.c: Include <stdlib.h> unconditionally.
19673         * lib/memchr.c (LONG_MAX): Remove.
19674         * lib/memrchr.c (LONG_MAX): Likewise.
19675         * lib/memchr.c (__memchr): Define via a prototype.
19676         * lib/memrchr.c (__memrchr): Likewise.
19677         * lib/memcmp.c (__P): Remove, and remove all uses.
19678         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19679         Remove forward decls; no longer needed.
19680         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19681         Use types required by C89 in prototype.
19682
19683         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19684         * lib/savedir.c: Likewise.
19685         * lib/mkdir.c (free): Remove decl.
19686         * lib/rmdir.c (rmdir): Define with a prototype.
19687         * lib/savedir.c: Include savedir.h first, to test interface.
19688
19689         * lib/mktime.c (STDC_HEADERS): Remove.
19690         Include <stdlib.h>, <string.h> unconditionally.
19691
19692         * lib/modechange.c: Include <stdlib.h> unconditionally.
19693         (malloc): Remove decl.
19694
19695         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19696         (free): Remove decl.
19697
19698         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19699         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19700         (This type really should be intptr_t, but that's a C99ism.)
19701         (_obstack_memcpy): Remove: all uses changed to memcpy.
19702         Include <string.h> unconditionally.
19703         (struct obstack): Assume __STDC__ for types of members
19704         chunkfun, freefun, extra_arg.
19705         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19706         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19707         obstack_begin, obstack_specify_allocation,
19708         obstack_specify_allocation_with_arg, obstack_chunkfun,
19709         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19710         Remove unprototyped decls and the macros that use them.
19711         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19712         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19713         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19714         (defined __STDC__ && __STDC__)]:
19715         Remove nonprototyped code.
19716         Include <stdlib.h> unconditionally.
19717         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19718         _obstack_allocated_p, _obstack_free, obstack_free,
19719         _obstack_memory_used, print_and_abort):
19720         Define using prototypes.
19721         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19722         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19723         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19724         obstack_next_free, obstack_object_size, obstack_room) [0]:
19725         Remove unused, unprototyped code.
19726
19727         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19728
19729         * lib/physmem.c (physmem_total, physmem_available, main): Define
19730         with prototypes.
19731
19732         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19733         (main): Define with a prototype.
19734
19735         * lib/posixver.c (getenv): Remove decl.
19736
19737         * lib/putenv.c (malloc): Returns void *, not char *.
19738         Include <string.h> unconditionally.
19739         (strchr, memcpy, NULL): Do not define.
19740
19741         * lib/readtokens.c: Include readtokens.h first, to test interface.
19742         Include <stdlib.h>, <string.h> unconditionally.
19743         (init_tokenbuffer): Define with a prototype.
19744
19745         * lib/regex.c (PARAMS): Remove.  All uses removed.
19746         All uses of _RE_ARGS removed, too.
19747         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19748         unconditionally.
19749         (bzero): Assume memset exists.
19750         (memcmp, memcpy, NULL): Remove.
19751         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19752         char, or assignments to local vars of type signed char.
19753         (init_syntax_once, PREFIX(extract_number_and_incr),
19754         PREFIX(print_partial_compiled_pattern),
19755         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19756         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19757         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19758         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19759         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19760         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19761         wcs_compile_range, byte_compile_range, truncate_wchar,
19762         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19763         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19764         count_mbs_length, wcs_re_match_2_internal,
19765         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19766         PREFIX(alt_match_null_string_p),
19767         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19768         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19769         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19770         now-unnecessary declaration, if any.
19771         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19772         regcomp, regexec):
19773         Remove now-unnecessary casts among pointer types.
19774         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19775
19776         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19777         (free): Remove decl.
19778
19779         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19780
19781         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19782         (free): Remove decl.
19783
19784         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19785         * lib/xgetcwd.c: Likewise.
19786
19787         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19788         (free): Remove decl.
19789
19790         * lib/strchrnul.c (strchrnul): Define with a prototype.
19791         Fix bug: c_in was not converted to char before searching.
19792
19793         The following changes are not K&R related:
19794
19795         * lib/group-member.h: Include <sys/types.h>, so that this file is
19796         self-contained.
19797         * lib/makepath.h: Likewise.
19798
19799         * lib/getusershell.c (readname, default_index, line_size, readname):
19800         Use size_t, not int, for sizes.
19801         (readname): If the size overflows, report an error instead of
19802         looping forever.
19803
19804 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19805
19806         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19807         libc.
19808
19809 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19810
19811         * README: New section: portability guidelines.
19812
19813 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19814
19815         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19816         C89 spec.
19817
19818 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19819
19820         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19821
19822 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19823
19824         Assume C89 or better; remove K&R cruft.
19825         A few of these changes were first proposed by Derek Robert Price
19826         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19827
19828         * lib/addext.c: Include <string.h> unconditionally.
19829         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19830         Don't declare getenv or malloc.
19831
19832         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19833         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19834         (NULL): Remove.
19835         (find_stack_direction, alloca): Use prototypes.
19836
19837         * lib/atexit.c (atexit): Define using a prototype.
19838
19839         * lib/basename.c, dirname.c, stripslash.c:
19840         Include <string.h> unconditionally.
19841
19842         * lib/bcopy.c: Include <stddef.h>.
19843         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19844
19845         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19846
19847         * lib/error.h (error, error_at_line, error_print_progname)
19848         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19849         * lib/error.c: Include error.h first, to check interface.
19850         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19851         (VA_START): Remove; all uses changeed to va_start.
19852         (exit, strerror): Remove decls.
19853         (error_print_progname): Prototype uncondionally.
19854         Don't include <errno.h>; no longer needed.
19855         (private_strerror): Remove.
19856         (error_tail): Always define.
19857         (error, error_at_line): Assume C89 or better; always use prototypes.
19858         * lib/fatal.c: Include "fatal.h" first, to test interface.
19859         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19860         (VA_START): Remove; all uses changed to va_start.
19861         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19862         this case.
19863         (exit): Remove decl.
19864         (fatal): Prototype unconditionally.  Assume va_start works.
19865         Abort at end, to pacify gcc.
19866
19867         * lib/euidaccess.c (main): Define with a prototype.
19868
19869         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19870
19871         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19872
19873         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19874         prototypes.
19875         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19876         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19877         (getenv): Remove decl.
19878         (fnmatch): Define using a prototype.
19879         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19880         (FCT): Define using a prototype.
19881
19882         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19883
19884         * lib/gethostname.c: Include <stddef.h>.
19885         (gethostname): Define with prototype.  Length is size_t, not int.
19886
19887 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19888
19889         Assume C89 or better; remove K&R cruft.
19890         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19891         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19892         string.h, getenv, malloc.
19893         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19894         headers.
19895         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19896         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19897         do not check for strerror.
19898         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19899         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19900         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19901         do not check for doprnt or vprintf.
19902         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19903         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19904
19905 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19906
19907         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19908         getversion.c should have been removed then, but was accidentally
19909         preserved.
19910
19911         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19912         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19913
19914 2003-09-08  Karl Berry  <karl@gnu.org>
19915
19916         * config/config.sub, config.guess, srclistvars.sh: update from savannah
19917                 config, forget about prep.
19918
19919         * config/depcomp, missing: update from automake.
19920
19921 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19922
19923         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
19924         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19925
19926 2003-09-07  Paul Eggert  <eggert@twinsun.com>
19927
19928         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
19929         copy_tm_result.  Bug reported by Simon Josefsson in
19930         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
19931
19932 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19933
19934         * m4/time_r.m4: New file.
19935         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
19936         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
19937         is. Check for timegm declaration.
19938         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
19939         Do not check for gmtime_r.
19940         Replace mktime if __mktime_internal does not exist and if mktime
19941         hasn't been replaced already.
19942
19943 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19944
19945         * lib/time_r.c, lib/time_r.h: New files.
19946
19947         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
19948         __localtime_r.
19949         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
19950         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
19951
19952         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
19953         __gmtime_r.
19954         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
19955         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
19956         Include <time_r.h>.
19957
19958         * lib/timegm.c: Switch to glibc implementation, with the following
19959         changes:
19960         [defined HAVE_CONFIG_H]: Include <config.h>.
19961         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
19962         (__mktime_internal) [!defined _LIBC]: New decl.
19963         (__gmtime_r) [!defined _LIBC]: New macro and function.
19964         (timegm): Use a prototype, since gnulib assumes C89.
19965         Do not bother declaring tmp to be const, as it's not really usefu.
19966         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19967         (timegm): Declare only if HAVE_DECL_TIMEGM.
19968
19969 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19970
19971         * MODULES.html.sh (func_all_modules): Add time_r.
19972         * modules/time_r: New file.
19973         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19974         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19975
19976 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19977
19978         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19979         Bug reported by Lute Kamstra in
19980         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19981
19982         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19983         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19984         course with correspondingly smaller numbers for tomorrow and
19985         yesterday.  From Tadayoshi Funaba.  Originally installed into
19986         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19987         coreutils merge?).
19988
19989 2003-08-31  Simon Josefsson  <jas@extundo.com>
19990
19991         * modules/timegm: New file.
19992         * MODULES.html.sh (func_all_modules): Add timegm.
19993
19994 2003-08-31  Simon Josefsson  <jas@extundo.com>
19995
19996         * m4/timegm.m4: New file.
19997
19998 2003-08-31  Simon Josefsson  <jas@extundo.com>
19999
20000         * lib/timegm.h: New file.
20001         * lib/timegm.c: New file.  Based on
20002         wget-1.8.2/src/http.c:mktime_from_utc.
20003
20004 2003-08-31  Karl Berry  <karl@gnu.org>
20005
20006         * lib/argp.h: update from libc.
20007
20008 2003-08-28  Bruno Haible  <bruno@clisp.org>
20009
20010         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
20011         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
20012         followed by '#define fnmatch fnmatch_posix' gives an error.
20013
20014 2003-08-28  Bruno Haible  <bruno@clisp.org>
20015
20016         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
20017         warning on QNX, which defines O_BINARY to 000000.
20018
20019 2003-08-27  Jim Meyering  <jim@meyering.net>
20020
20021         * m4/mkstemp.m4: Require that the system mkstemp be able to create
20022         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
20023         would fail after 32.  Reported by Danny Levinson.  Details here:
20024         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
20025
20026 2003-08-24  Bruno Haible  <bruno@clisp.org>
20027
20028         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
20029         MSVC7 <stdio.h> is included later.
20030
20031 2003-08-22  Simon Josefsson  <jas@extundo.com>
20032
20033         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
20034
20035 2003-08-20  Karl Berry  <karl@gnu.org>
20036
20037         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
20038
20039 2003-08-20  Bruno Haible  <bruno@clisp.org>
20040
20041         * modules/progname: New file.
20042         * MODULES.html.sh (func_all_modules): Add progname.
20043
20044 2003-08-20  Bruno Haible  <bruno@clisp.org>
20045
20046         * lib/progname.h: New file, from GNU gettext.
20047         * lib/progname.c: New file, from GNU gettext.
20048         * lib/progreloc.c: New file, from GNU gettext.
20049
20050 2003-08-19  Jim Meyering  <jim@meyering.net>
20051
20052         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
20053         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
20054
20055 2003-08-19  Bruno Haible  <bruno@clisp.org>
20056
20057         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
20058         more.
20059
20060 2003-08-19  Bruno Haible  <bruno@clisp.org>
20061
20062         * lib/xstrdup.c: Assume <string.h> exists.
20063
20064 2003-08-18  Paul Eggert  <eggert@twinsun.com>
20065
20066         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
20067         in makefile rules.
20068
20069 2003-08-18  Jim Meyering  <jim@meyering.net>
20070
20071         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
20072         * m4/lib-ld.m4: Likewise.
20073
20074 2003-08-18  Jim Meyering  <jim@meyering.net>
20075
20076         * lib/setenv.h: Indent nested cpp directive.
20077         * lib/vasnprintf.c: Remove trailing blanks.
20078
20079 2003-08-17  Simon Josefsson  <jas@extundo.com>
20080
20081         * modules/xstrndup: New file.
20082         * MODULES.html.sh (func_all_modules): Add xstrndup.
20083
20084 2003-08-17  Simon Josefsson  <jas@extundo.com>
20085
20086         * modules/argp: Fix autoconf macro name. Add more dependencies.
20087
20088 2003-08-17  Simon Josefsson  <jas@extundo.com>
20089
20090         * m4/xstrndup.m4: New file.
20091
20092 2003-08-17  Simon Josefsson  <jas@extundo.com>
20093
20094         * m4/argp.m4: New file.
20095
20096 2003-08-17  Simon Josefsson  <jas@extundo.com>
20097             Bruno Haible  <bruno@clisp.org>
20098
20099         * lib/xstrndup.h: New file.
20100         * lib/xstrndup.c: New file.
20101
20102 2003-08-17  Bruno Haible  <bruno@clisp.org>
20103
20104         * modules/strndup (Files, Include): Add lib/strndup.h.
20105
20106 2003-08-17  Bruno Haible  <bruno@clisp.org>
20107
20108         * modules/euidaccess (Files): Add lib/euidaccess.h.
20109
20110 2003-08-17  Bruno Haible  <bruno@clisp.org>
20111
20112         * lib/strndup.h: New file.
20113
20114 2003-08-17  Bruno Haible  <bruno@clisp.org>
20115
20116         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
20117         like AC_GNU_SOURCE.
20118         * modules/extensions (configure.ac): Comment out the invocation of
20119         gl_USE_SYSTEM_EXTENSIONS.
20120
20121 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20122
20123         Merges from coreutils, etc.
20124         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
20125         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
20126         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
20127         fixing a typo.
20128         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
20129         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
20130
20131 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20132
20133         Document merge from coreutils.
20134         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
20135         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
20136         * modules/utime: Add m4/utimes-null.m4.
20137
20138 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20139
20140         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
20141         space, undoing this 2003-08-12 change:
20142         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
20143
20144 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20145
20146         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
20147         strtoul.c from libc, undoing this 2003-08-12 change:
20148         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
20149
20150 2003-08-16  Jim Meyering  <jim@meyering.net>
20151
20152         Merges from coreutils.
20153         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
20154         prefix.  Adjust cache variables similarly.  Create 500 rather than
20155         just 300 files, to exercise bug on Darwin6.5, too.
20156         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
20157         $missing_dir.
20158         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
20159         AM_SYS_POSIX_TERMIOS.
20160         Reported by mkc@mathdogs.com.
20161         Also change use of $am_cv_sys_posix_termios
20162         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
20163         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
20164         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
20165         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
20166         in /proc/mounts until it finds one with matching device number.  This
20167         is unnecessary when the FILE argument *is* a mount point.  No stat call
20168         is necessary in that case.  So, disable the statvfs-testing code on
20169         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
20170         as RedHat bug# 84846.
20171         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
20172         to 1MB, so as not to render systems with no stack size limit (e.g.,
20173         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
20174         Include <unistd.h>.  On some systems,
20175         it is required for the definition of _SC_PAGESIZE.
20176
20177 2003-08-16  Jim Meyering  <jim@meyering.net>
20178
20179         Merge from coreutils.
20180         * lib/xstrtoimax.c: #else #if -> #elif.
20181         * lib/xstrtoumax.c: Likewise.
20182
20183 2003-08-16  Jim Meyering  <jim@meyering.net>
20184
20185         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
20186         * m4/utimes.m4: Removed.
20187         * m4/utimes-null.m4: Renamed from utimes.m4.
20188
20189         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
20190         to 1MB, so as not to render systems with no stack size limit (e.g.,
20191         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
20192         Include <unistd.h>.  On some systems,
20193         it is required for the definition of _SC_PAGESIZE.
20194
20195 2003-08-16  Jim Meyering  <jim@meyering.net>
20196         and Paul Eggert  <eggert@cs.ucla.edu>
20197
20198         Merges from coreutils, etc.
20199
20200         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
20201         using the latest version from cvs.  This avoids problems with #line
20202         directives using a vendor (Sun) compiler.
20203         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
20204         Don't set GETGROUPS_LIB here; now it's
20205         done via getgroups.m4's wrapper function.
20206         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
20207         rather than just in sh-util/configure.in, so that the
20208         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
20209         same.
20210         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
20211         AC_FUNC_GETLOADAVG where to find getloadavg.c.
20212         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
20213         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
20214         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
20215         Remove code that is now done by the newly-required macros.
20216         Append $(EXEEXT) to DF_PROG.
20217         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
20218         Do not invoke or require the following here,
20219         since prereq.m4 or some gnulib .m4 now does this for us:
20220         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
20221         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
20222         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
20223         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
20224         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
20225         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
20226         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
20227         AC_FUNC_OBSTACK.
20228         Do not replace the following functions, as this is now the job
20229         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
20230         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
20231         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
20232         atexit getpass, strdup, getpagesize.
20233         Replace 'raise'.
20234         Do not check for the following functions, as this is now the job
20235         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
20236         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
20237         setregid.
20238         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
20239         Check for sys/sysctl.h.
20240         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
20241         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
20242         of checking for ssize_t ourselves.
20243
20244         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
20245         Require every macro that gnulib/modules/* suggests for us.
20246         (jm_PREREQ_ADDEXT): New macro.
20247         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
20248         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
20249
20250         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
20251         (gl_PHYSMEM): Use it.
20252         Also check for `table' function.
20253         Check for new headers and functions.
20254         Add check for sys/sysmp.h.
20255         With suggestions from Kaveh Ghazi.
20256         Ignore headers that are present but cannot be compiled.  This
20257         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
20258         C 5.4.
20259
20260 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20261
20262         Document merge from coreutils.
20263         * modules/userspec: Depend on posixver.
20264         * modules/strftime: Depend on tzset.
20265
20266 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20267
20268         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
20269         rather than tab, after '#' in shell-script copyright notices.
20270         Suggested by Bruno Haible.
20271
20272 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20273
20274         * config/srclist-update: Use three spaces, rather than tab, after '#'
20275         in shell-script copyright notices.  Suggested by Bruno Haible.
20276         Remove unnecessary parenthesization in regular expression.
20277
20278 2003-08-15  Jim Meyering  <jim@meyering.net>
20279
20280         Merge from coreutils.
20281         * lib/xgethostname.c: Include <stdlib.h>.
20282         (xghostname): Don't exit for anything other than memory-related
20283         failure; just return NULL.
20284         * lib/userspec.c: Include "posixver.h".
20285         (parse_user_spec): Accept `.' as a separator only
20286         in pre-POSIX-200112 mode.
20287         * lib/strtoimax.c: Use #elif rather than #else #if.
20288         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
20289         Remove function, now that we can rely on a working tzset function.
20290         [!_LIBC]: Ensure that the required autoconf test has been run.
20291         [!defined _NL_CURRENT && HAVE_STRFTIME]:
20292         Use underlying_strftime for %r.
20293         * lib/sha.c: Merge in some clean-up and optimization changes from
20294         glibc.
20295         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
20296         Ensure that it is a multiple of 64.
20297         Rearrange loop exit tests so as to avoid performing an
20298         additional fread after encountering an error or EOF.
20299         * lib/realloc.c: Update copyright date.
20300
20301 2003-08-15  Jim Meyering  <jim@meyering.net>
20302         and Paul Eggert  <eggert@twinsun.com>
20303
20304         Merge from coreutils.
20305         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
20306         member but strut utmpx does not.  Needed for AIX 4.3.3.
20307         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
20308
20309 2003-08-15  Jim Meyering  <jim@meyering.net>
20310         and Paul Eggert  <eggert@cs.ucla.edu>
20311
20312         Merges from coreutils, etc.
20313         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
20314         Require gl_FUNC_TZSET_CLOBBER.
20315         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
20316         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
20317         members.
20318
20319 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20320
20321         Help the merge from coreutils.
20322         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
20323         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
20324         * m4/tzset.m4: Use it too.
20325
20326 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20327
20328         * modules/tzset: New file.
20329
20330 2003-08-14  Jim Meyering  <jim@meyering.net>
20331
20332         Merges from coreutils.
20333         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
20334         variable names, rather than @FNMATCH_H@.
20335         * modules/alloca: Likewise for $(ALLOCA_H).
20336
20337         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
20338         the three copies of the literal target, `fnmatch.h'.
20339         * modules/alloca (alloca.h): Likewise.
20340
20341 2003-08-14  Jim Meyering  <jim@meyering.net>
20342
20343         Merge from coreutils.
20344         * m4/tzset.m4: New file.
20345         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
20346         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
20347         otherwise, AIX 5.1 systems would end up using the latter.
20348         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
20349         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
20350         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
20351         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
20352
20353 2003-08-14  Jim Meyering  <jim@meyering.net>
20354
20355         Merge from coreutils.
20356         * lib/obstack.h: Whitespace changes.
20357         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
20358         and xcalloc return values.
20359         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
20360         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
20361         hang on OSF/1 5.1 for DIR on both local and remote file systems.
20362         Reported by (and fix confirmed by) Nelson H. F. Beebe.
20363         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20364         error from mntctl.
20365         Use mntctl's return value to drive the entry-processing loop, since
20366         we can't rely on the value of the vmt_length member in the last
20367         entry.  On some systems doing so could result in exhausting
20368         virtual memory.  Based in part on a patch from Mike Jetzer.
20369
20370 2003-08-14  Jim Meyering  <jim@meyering.net>
20371         and Paul Eggert  <eggert@twinsun.com>
20372
20373         Merges from coreutils, plus other fixes.
20374         * lib/physmem.c: Merge in portability changes from gcc/libiberty
20375         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
20376         for credits and details.  Thanks to Kaveh Ghazi for helping
20377         to keep these files in sync.
20378         (ARRAY_SIZE): Define it.
20379         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
20380         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
20381         (memcasecmp): Don't assume size_t fits in unsigned int.
20382         Remove casts and duplicate code.
20383         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20384         (memcpy): Remove definition.
20385         Merge in some clean-up and optimization changes from glibc.
20386         [BLOCKSIZE]: Move definition to top of file.
20387         Ensure that it is a multiple of 64.
20388         Rearrange loop exit tests so as to avoid performing an
20389         additional fread after encountering an error or EOF.
20390         * lib/md5.h (md5_uintptr): Define.
20391         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20392         return to the initial working directory.  Preserve errno
20393         for caller.
20394         * lib/idcache.c: Include "xalloc.h".
20395         (xmalloc, xrealloc): Remove decls.
20396         (getuser): Remove casts no longer required in C89.
20397         * lib/human.c: Include stdio.h, for sprintf.
20398         * lib/group-member.c: Include "xalloc.h".
20399         (xmalloc, xrealloc): Remove decls.
20400         (get_group_info): Remove casts no longer required in C89.
20401         * lib/getusershell.c (readname): Remove casts no longer required in
20402         C89.
20403         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20404         * lib/getline.c: Whitespace fix, from coreutils.
20405
20406 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20407
20408         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20409         Check for isascii.
20410
20411         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20412         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20413         Undo previous (whitespace-only) change.
20414
20415 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20416
20417         * lib/exclude.c: Include <ctype.h>
20418         (IN_CTYPE_DOMAIN): New macro.
20419         (is_space): New fn.
20420         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20421         and empty lines.
20422
20423         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20424         Undo previous (whitespace-only) change.
20425
20426 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20427
20428         * config/srclist-update: Change update back to the old behavior,
20429         leaving whitespace alone.  Use one 'sed' command rather than a
20430         pipeline.
20431         (fixlicense): Now a variable, not a function.
20432         (remove_trailing_blanks): Remove.
20433         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20434         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20435         Undo previous (whitespace-only) change.
20436
20437 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20438
20439         Merge from coreutils.
20440         * modules/euidaccess: Add lib_SOURCES, include for new
20441         file euidaccess.h
20442
20443 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20444
20445         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20446         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20447         Normalize leading white space and remove trailing white space.
20448
20449         Merge from coreutils
20450         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20451
20452         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20453         0.12.1.  These files are now being upgraded automatically by
20454         ../config/srclist-update.
20455
20456 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20457
20458         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20459         Normalize leading white space and remove trailing white space.
20460         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20461         notice, as per ../config/srclist-update.
20462
20463         Merge from coreutils.
20464         * lib/euidaccess.h: New file.
20465         * lib/euidaccess.c: Include it.
20466         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20467         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20468         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20469
20470 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20471
20472         * config/srclist-update: Add copyright notice.
20473         (remove_id_lines, remove_trailing_blanks): New constants.
20474         (fixfile): Use them to normalize spacing a bit in copied files.
20475         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20476         Normalize leading white space and remove trailing white space.
20477
20478         * config/texinfo.tex: Sync with texinfo.
20479
20480         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20481         strtoul.c from libc, to merge coreutils whitespace changes.
20482
20483         * config/srclist.txt: Get the following m4 files from gettext:
20484         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20485         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20486         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20487         wint_t.m4.
20488
20489 2003-08-12  Karl Berry  <karl@gnu.org>
20490
20491         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20492         been made.
20493
20494 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20495
20496         * modules/gnu-source, m4/gnu-source.m4:
20497         Remove; we're assuming Autoconf 2.54 or later now.
20498         Suggested by Bruno Haible.
20499         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20500
20501 2003-08-11  Bruno Haible  <bruno@clisp.org>
20502
20503         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20504
20505 2003-08-11  Bruno Haible  <bruno@clisp.org>
20506
20507         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20508         (vasnprintf): Use it instead of wcslen.
20509
20510 2003-08-11  Bruno Haible  <bruno@clisp.org>
20511
20512         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20513         value to ensure that _Bool promotes to int. Use #define for _Bool when
20514         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20515
20516 2003-08-10  Karl Berry  <karl@gnu.org>
20517
20518         * lib/regex.h: update from libc (whitespace fix).
20519
20520 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20521
20522         Merge some files from coreutils.  These changes were
20523         originally made by Jim Meyering.
20524         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20525         many older Unixes require this.
20526         * lib/alloca.c (alloca): Remove cast to argument of free;
20527         no longer needed in C89.
20528         * lib/alloca_.h, regex.h: Fix white space to match
20529         what GNU indent does.
20530
20531 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20532
20533         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20534         apparently Emacs's Unicode mode got confused before my 2003-08-05
20535         checkin.
20536
20537 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20538
20539         * m4/extensions.m4: New file.
20540         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20541         Require gl_USE_SYSTEM_EXTENSIONS.
20542         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20543         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20544
20545 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20546
20547         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20548         * modules/extensions, modules/gnu-source: New files.
20549         * modules/timespec, modules/unlocked-io: Depend on extensions.
20550
20551 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20552
20553         * modules/restrict: New file.
20554         * MODULES.html.sh (func_all_modules): Add restrict.
20555         * modules/regex: Depend on restrict.
20556
20557 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20558
20559         * m4/restrict.m4: New file.
20560         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20561
20562 2003-08-07  Bruno Haible  <bruno@clisp.org>
20563
20564         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20565         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20566
20567 2003-08-07  Bruno Haible  <bruno@clisp.org>
20568
20569         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20570         makes the module 'getndelim2' compatible with the module 'getline'.
20571
20572 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20573
20574         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20575         byte with "\201" to avoid glitches when editing that source file
20576         with multi-gnome-terminal.
20577
20578 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20579
20580         * lib/bumpalloc.h: Remove.
20581
20582 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20583
20584         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20585         * modules/bumpalloc: Remove.
20586
20587 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20588
20589         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20590         GNU coding style.
20591
20592         Merge from coreutils.
20593         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20594         1. From glibc.
20595         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20596         from Karl Berry, implemented by Jim Meyering.
20597         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20598         from Dmitry V. Levin.
20599         Remove anachronistic cast of xrealloc.
20600         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20601         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20602         type. Otherwise, it wouldn't compile with at least /bin/cc on
20603         ymp-cray-unicos9.0.2.X.
20604         Combine two mostly-identical uses of alloca into one.
20605         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20606
20607 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20608
20609         [From Emacs.]
20610
20611         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20612         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20613         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20614         obsolete NLIST_NAME_UNION.
20615         [__GNU__]: Undef BSD and FSCALE.
20616         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20617
20618 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20619
20620         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20621         an enum type, so that it's guaranteed to promote to int.  See:
20622         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20623
20624 2003-08-03  Karl Berry  <karl@gnu.org>
20625
20626         * config/depcomp: update from automake.
20627
20628 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20629
20630         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20631         (strerror): Don't assume that a printable int fits in 14 bytes.
20632
20633 2003-07-31  Bruno Haible  <bruno@clisp.org>
20634
20635         * modules/getpass-gnu: New file.
20636         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20637
20638 2003-07-31  Bruno Haible  <bruno@clisp.org>
20639
20640         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20641
20642 2003-07-24  Karl Berry  <karl@gnu.org>
20643
20644         * config/missing: update from automake.
20645
20646 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20647             Bruno Haible  <bruno@clisp.org>
20648
20649         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20650         * lib/getline.c (getline, getdelim): Likewise.
20651         Remove _GNU_SOURCE define; now it's defined in config.h through
20652         m4/getline.m4.
20653
20654 2003-07-23  Karl Berry  <karl@gnu.org>
20655
20656         * config/config.sub: update from prep.
20657
20658 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20659
20660         * modules/xalloc (Depends-on): Add exitfail.
20661         * modules/xmemcoll: Likewise.
20662
20663 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20664
20665         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20666         over-parenthesization in macros.
20667
20668         Sync with coreutils.
20669
20670         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20671         required by C99.
20672
20673         Use `exit_failure' for xalloc and xmemcoll instead of their own
20674         private exit-failure variables.
20675         * lib/xalloc.h (xalloc_exit_failure): Remove.
20676         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20677         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20678         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20679         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20680         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20681
20682 2003-07-20  Jim Meyering  <jim@meyering.net>
20683
20684         * modules/closeout (Depends-on): Add exitfail.
20685         Suggestion from Bruno Haible.
20686
20687 2003-07-19  Karl Berry  <karl@gnu.org>
20688
20689         * config/config.sub: update from prep.
20690
20691 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20692
20693         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20694         Remove.
20695         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20696         to test that it can stand by itself.  Include "exitfail.h".
20697         Clients should set exit_failure instead.
20698         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20699
20700 2003-07-18  Bruno Haible  <bruno@clisp.org>
20701
20702         * modules/getndelim2: New file.
20703         * modules/getline: Share files with module getndelim2.
20704         * modules/getnline: Depend on getndelim2 instead of sharing files with
20705         it. Add getnline.c to lib_SOURCES.
20706         * MODULES.html.sh (func_all_modules): Add getndelim2.
20707
20708 2003-07-18  Bruno Haible  <bruno@clisp.org>
20709
20710         * m4/getndelim2.m4: New file.
20711         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20712         invoke gl_PREREQ_GETNDELIM2.
20713         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20714         gl_PREREQ_GETNDELIM2.
20715         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20716         gl_GETNDELIM2.
20717
20718 2003-07-18  Bruno Haible  <bruno@clisp.org>
20719
20720         * lib/getndelim2.h: New file.
20721         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20722         getndelim2.h.
20723         (getndelim2): Make non-static. Change return type to ssize_t.
20724         * lib/getline.h: Change argument names.
20725         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20726         * lib/getnline.c: Include getndelim2.h.
20727
20728 2003-07-18  Andreas Schwab  <schwab@suse.de>
20729
20730         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20731
20732 2003-07-17  Karl Berry  <karl@gnu.org>
20733
20734         * config/config.sub: update from prep.
20735
20736 2003-07-17  Bruno Haible  <bruno@clisp.org>
20737
20738         * modules/getnline: New file.
20739         * modules/getline: Add lib/getndelim2.c to source file list.
20740         * MODULES.html.sh (func_all_modules): Add getnline.
20741
20742 2003-07-17  Bruno Haible  <bruno@clisp.org>
20743
20744         * m4/getnline.m4: New file.
20745
20746 2003-07-17  Bruno Haible  <bruno@clisp.org>
20747
20748         * m4/Makefile.am.in: Remove file.
20749         * m4/Makefile.am: Remove file.
20750         * m4/Makefile.in: Remove file.
20751
20752 2003-07-17  Bruno Haible  <bruno@clisp.org>
20753
20754         * lib/getnline.h: New file.
20755         * lib/getnline.c: New file.
20756         * lib/getndelim2.c: New file, extracted from getline.c.
20757         (getndelim2): Renamed from getdelim2, with added nmax argument.
20758         * lib/getline.c: Include getndelim2.c.
20759         (getdelim2): Moved out to getndelim2.c.
20760         (getline, getdelim): Update.
20761
20762 2003-07-17  Bruno Haible  <bruno@clisp.org>
20763
20764         * lib/Makefile.am: Remove file.
20765         * lib/Makefile.in: Remove file.
20766
20767 2003-07-17  Bruno Haible  <bruno@clisp.org>
20768
20769         * configure.in: Remove file.
20770         * Makefile.in: Remove file.
20771
20772 2003-07-17  Bruno Haible  <bruno@clisp.org>
20773
20774         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20775
20776 2003-07-16  Karl Berry  <karl@gnu.org>
20777
20778         * config/srclist-update: was running fixlicense twice, which caused
20779                 texinfo.tex to be nullified for some reason.  Simplify,
20780                 $gplsrc is no longer needed as far as I can see?
20781
20782 2003-07-16  Jim Meyering  <jim@meyering.net>
20783
20784         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20785
20786 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20787
20788         * config/srclist.txt: Get the following files from gettext-runtime/intl
20789         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20790         ref-del.sin.  From Bruno Haible.
20791         * config/srclist-update (fixfile): Change grep pattern again, since the
20792         previous fix didn't work (there was another trailing $).  Use
20793         '[$]' to escape the $s.
20794
20795 2003-07-15  Karl Berry  <karl@gnu.org>
20796
20797         * lib/vasnprintf.c: update from gettext.
20798
20799 2003-07-15  Karl Berry  <karl@gnu.org>
20800
20801         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20802         gets expanded when surrounded by '$'.
20803
20804 2003-07-15  Jim Meyering  <jim@meyering.net>
20805
20806         * modules/save-cwd: Don't depend on error.  From Derek Price.
20807
20808 2003-07-15  Jim Meyering  <jim@meyering.net>
20809
20810         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20811
20812 2003-07-14  Simon Josefsson  <jas@extundo.com>
20813
20814         * modules/mempcpy: New file.
20815         * MODULES.html.sh (func_all_modules): Add mempcpy.
20816
20817 2003-07-14  Simon Josefsson  <jas@extundo.com>
20818
20819         * m4/mempcpy.m4: New file.
20820
20821 2003-07-14  Simon Josefsson  <jas@extundo.com>
20822
20823         * lib/mempcpy.h: New file.
20824         * lib/mempcpy.c: New file.
20825
20826 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20827
20828         * modules/getdate, modules/posixtm: Depend on mktime.
20829
20830 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20831
20832         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20833         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20834         unicodeio.c, unicodeio.h, unlocked-io.h:
20835         Switch from LGPL to GPL.
20836
20837 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20838
20839         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20840         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20841         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20842         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20843         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20844         updated automatically by ../config/srclist-update.  This changes
20845         their license from LPGL to GPL.
20846
20847 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20848
20849         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20850         assumed to refer to the root of the most recent stable gettext version.
20851         * config/srclistvars.sh: Add defaults for eggert.
20852         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20853         Match "This program" as well as "The program".  This is needed
20854         for gettext.
20855
20856 2003-07-14  Jim Meyering  <jim@meyering.net>
20857
20858         Don't emit diagnostics.  Let callers do that.
20859         * lib/save-cwd.c: Don't include "error.h".
20860         (save_cwd): Don't call error.  Ensure that errno is valid
20861         when returning nonzero.
20862
20863         * lib/save-cwd.h (restore_cwd): Update prototype.
20864         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20865         Simplify.  Don't call error upon failure.  Let callers do that.
20866         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20867         when auditing is enabled.  But don't bother updating the #if.
20868
20869 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20870
20871         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20872         it breaks C++ compilation.
20873         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20874
20875 2003-07-10  Simon Josefsson  <jas@extundo.com>
20876
20877         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20878
20879 2003-07-10  Jim Meyering  <jim@meyering.net>
20880
20881         * m4/clock_time.m4: Remove trailing blank.
20882         * m4/intmax_t.m4: Likewise.
20883
20884 2003-07-10  Jim Meyering  <jim@meyering.net>
20885
20886         * lib/vasnprintf.c: Remove trailing blanks.
20887         Make cpp indentation consistent.
20888
20889 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20890
20891         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20892         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20893         Switch from LGPL to GPL.
20894
20895 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20896
20897         * config/srclist.txt: Sort sublists.  Add
20898         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20899         that differ from gnulib for one reason or another; we'd like this list
20900         to be smaller but for now let's document what we have.
20901
20902 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20903
20904         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20905         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20906         and sweeter "eval x=$x".
20907         * config/srclist.txt: Get lib/argp* from glibc.
20908
20909 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20910
20911         * lib/mktime.c: Fix some boundary cases and remove need for floating
20912         point.
20913
20914         Issue a compile-time diagnostic if time_t is floating point, or if
20915         two's complement arithmetic is not in effect, or if arithmetic
20916         right shift does not propagate the sign.  These assumptions were
20917         all in the original code but they weren't checked.
20918
20919         (TIME_T_MIDPOINT, verify): New macros.
20920         (__isleap): Remove; it has integer overflow problems.
20921         (leapyear): New function, without those problems.
20922         (ydhms_tm_diff): Remove; splitting into two parts.
20923         (ydhms_diff): New function, containing the arithmetic part of
20924         the old ydhms_tm_diff function.  Issue a compile-time
20925         diagnostic if we are not using C99 integer division.
20926         Avoid casts when possible.
20927         (guess_time_tm): New function, containing the checking part of
20928         the old ydhms_tm_diff function.  Return the new value, rather than
20929         the difference between it and the old.  Accept a new argument T
20930         so that *T specifies the old value.  Check for overflow in the result.
20931
20932         (__mktime_internal): Use a time_t offset, not a long int offset.
20933         This undoes the 2003-06-04 change, which is no longer needed now
20934         that we have better overflow checking.
20935         (localtime_offset): Likewise.
20936
20937         (__mktime_internal): Avoid harmful overflow on hosts where time_t
20938         and long are 64-bit but int is only 32-bit.
20939         (ydhms_diff): Use long int to store year1 and yday1.
20940         Issue a compile-time diagnostic if long int is not wide enough.
20941
20942         (__mktime_internal): Use long int to store adjusted year and yday.
20943         Use plain C rather than preprocessor commands, if that doesn't
20944         affect efficiency.
20945         Check for overflow (and try to repair) after each probe
20946         rather than checking only at the very end.  This avoids some bugs
20947         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
20948         does not equal GMT offset at maximum time).
20949         Use integer to check for overflow rather than floating point; this
20950         is more portable to non-IEEE hosts, and is a tad faster.
20951         When we detect that we are oscillating between two values,
20952         don't check whether tm_isdst has the requested value, since
20953         we already know the answer.  When tm_isdst has the wrong value,
20954         use a different heuristic to find the right one, based on the
20955         extreme values actually observed in practice in tz2003a,
20956         rather than the (overly optimistic) "previous 3 calendar quarters".
20957
20958         (not_equal_tm, print_tm, check_result): Use "const T" rather than
20959         "T const" to accommodate glibc style.
20960         (check_result): Use less-confusing report format.  "long" -> "long int.
20961         (main): Likewise.
20962         Don't loop if the iteration overflows time_t.
20963         Allow a negative step in the iteration.
20964
20965 2003-07-06  Karl Berry  <karl@gnu.org>
20966
20967         * config/depcomp: update from automake.
20968         * config/config.sub: update from prep.
20969
20970 2003-07-03  Karl Berry  <karl@gnu.org>
20971
20972         * config/config.guess: update from prep.
20973
20974 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20975
20976         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20977         xreadlink.c now includes it unconditionally.
20978
20979 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20980
20981         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20982         having it depend on HAVE_SYS_TYPES_H.
20983
20984 2003-07-01  Bruno Haible  <bruno@clisp.org>
20985
20986         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20987         <sys/types.h> should be sufficient.
20988         Reported by Paul Eggert.
20989
20990 2003-06-26  Karl Berry  <karl@gnu.org>
20991
20992         * config/depcomp: update from automake.
20993
20994 2003-06-26  Bruno Haible  <bruno@clisp.org>
20995
20996         * modules/human: Depend on module stdbool.
20997
20998 2003-06-25  Bruno Haible  <bruno@clisp.org>
20999
21000         * modules/readlink: New file.
21001         * modules/xreadlink: Depend on it.
21002         * MODULES.html.sh (func_all_modules): Add readlink.
21003
21004 2003-06-25  Bruno Haible  <bruno@clisp.org>
21005
21006         * m4/readlink.m4: New file.
21007
21008 2003-06-25  Bruno Haible  <bruno@clisp.org>
21009
21010         * lib/readlink.c: New file.
21011
21012 2003-06-22  Karl Berry  <karl@gnu.org>
21013
21014         * config/srclist.txt: update mkinstalldirs from automake.
21015         * config/mkinstalldirs: update.
21016
21017 2003-06-22  Bruno Haible  <bruno@clisp.org>
21018
21019         Portability to mingw32.
21020         * m4/ssize_t.m4: New file, from GNU gettext.
21021         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
21022         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
21023
21024 2003-06-22  Bruno Haible  <bruno@clisp.org>
21025
21026         * modules/safe-read: Add m4/ssize_t.m4.
21027         * modules/xreadlink: Add m4/ssize_t.m4.
21028
21029 2003-06-20  Bruno Haible  <bruno@clisp.org>
21030
21031         Assume C89, so PARAMS isn't needed.
21032         * lib/unicodeio.h (PARAMS): Remove.
21033         * lib/unicodeio.c: Don't use PARAMS.
21034
21035 2003-06-18  Karl Berry  <karl@gnu.org>
21036
21037         * config/config.{guess,sub}: update from prep.
21038
21039 2003-06-18  Jim Meyering  <jim@meyering.net>
21040
21041         Merge changes from coreutils.
21042         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
21043         Remove explicit declarations of xmalloc and realloc.
21044         Include xalloc.h.
21045         (read_utmp): Remove anachronistic cast of xmalloc.
21046
21047 2003-06-17  Paul Eggert  <eggert@twinsun.com>
21048
21049         Assume C89, so PARAMS isn't needed.
21050         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
21051         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
21052         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
21053         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
21054         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
21055         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
21056         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
21057         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
21058         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
21059         lib/xstrtod.h, lib/xstrtol.h: Likewise.
21060         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
21061         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
21062         no longer needed. Anyway, config.h should always be included before any
21063         other file.
21064
21065 2003-06-11  Simon Josefsson  <jas@extundo.com>
21066
21067         * modules/sysexits: New file.
21068         * MODULES.html.sh (func_all_modules): Add sysexits.
21069
21070 2003-06-11  Simon Josefsson  <jas@extundo.com>
21071
21072         * lib/sysexit_.h: New file.
21073
21074 2003-06-11  Derek Price  <derek@ximbiot.com>
21075
21076         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
21077         necessary.
21078
21079 2003-06-11  Bruno Haible  <bruno@clisp.org>
21080
21081         * m4/sysexits.m4: New file.
21082
21083 2003-06-10  Simon Josefsson  <jas@extundo.com>
21084
21085         * lib/argp.h: New file, from glibc.
21086         * lib/argp-ba.c: New file, from glibc.
21087         * lib/argp-eexst.c: New file, from glibc.
21088         * lib/argp-fmtstream.c: New file, from glibc.
21089         * lib/argp-fmtstream.h: New file, from glibc.
21090         * lib/argp-fs-xinl.c: New file, from glibc.
21091         * lib/argp-help.c: New file, from glibc.
21092         * lib/argp-namefrob.h: New file, from glibc.
21093         * lib/argp-parse.c: New file, from glibc.
21094         * lib/argp-pv.c: New file, from glibc.
21095         * lib/argp-pvh.c: New file, from glibc.
21096         * lib/argp-xinl.c: New file, from glibc.
21097
21098 2003-06-10  Simon Josefsson  <jas@extundo.com>
21099
21100         * modules/strchrnul: New file.
21101
21102 2003-06-10  Simon Josefsson  <jas@extundo.com>
21103
21104         * modules/argp: New file.
21105
21106 2003-06-10  Simon Josefsson  <jas@extundo.com>
21107
21108         * m4/strchrnul.m4: New file.
21109
21110 2003-06-10  Simon Josefsson  <jas@extundo.com>
21111
21112         * lib/strchrnul.h: New file.
21113         * lib/strchrnul.c: New file.
21114
21115 2003-06-10  Bruno Haible  <bruno@clisp.org>
21116
21117         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
21118
21119 2003-06-07  Karl Berry  <karl@gnu.org>
21120
21121         * config/config.{guess,sub}: update from prep.
21122
21123 2003-06-07  Jim Meyering  <jim@meyering.net>
21124
21125         * modules/strtod: Use $(...) notation, not @...@ for
21126         AC_REPLACE'd variables.
21127         * modules/localcharset: Likewise.
21128
21129 2003-06-07  Jim Meyering  <jim@meyering.net>
21130
21131         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
21132         in place of my name in the copyright comment.
21133         Remove definition and uses of __P.
21134
21135         From coreutils.
21136         * lib/stat.c: Don't declare xmalloc explicitly.
21137         Instead, include "xalloc.h".
21138         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
21139         xrealloc, and xcalloc return values.
21140         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
21141         Improve comment.
21142         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
21143
21144 2003-06-07  Bruno Haible  <bruno@clisp.org>
21145
21146         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
21147         avoid AC_CONFIG_LINKS.
21148         * modules/fnmatch (Makefile.am): Use explicit creation rule for
21149         fnmatch.h, to avoid AC_CONFIG_LINKS.
21150         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
21151
21152 2003-06-07  Bruno Haible  <bruno@clisp.org>
21153
21154         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
21155         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
21156         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
21157         directory.
21158         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
21159         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
21160         directory.
21161
21162 2003-06-06  Jim Meyering  <jim@meyering.net>
21163
21164         Merge from coreutils.
21165         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
21166         Consolidate declarations and initializations of *_base* locals.
21167
21168         Merge from coreutils.
21169         This avoids a core dump on systems without GNU putenv,
21170         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
21171         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
21172         (unsetenv): New static function, from GNU libc.
21173         (rpl_putenv): Use it.
21174
21175         * lib/modechange.c: Remove trailing blanks.
21176
21177         Merge from coreutils.
21178         * lib/fsusage.c: Remove declaration of statfs.
21179         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
21180
21181         * lib/posixtm.c: Include <stdbool.h> unconditionally.
21182
21183 2003-06-06  Jim Meyering  <jim@meyering.net>
21184
21185         * lib/stdbool_.h: Renamed from stdbool.h.in.
21186
21187 2003-06-06  Jim Meyering  <jim@meyering.net>
21188             Bruno Haible  <bruno@clisp.org>
21189
21190         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
21191         Adjust Makefile.am snippet not to redirect directly to target.
21192         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
21193
21194 2003-06-05  Paul Eggert  <eggert@twinsun.com>
21195
21196         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
21197         mismatch, look in future quarters as well as past.  This fixes a
21198         bug when processing fall-backwards gaps immediately after a long
21199         period of daylight-saving time.
21200
21201         * lib/mktime.c: Assume freestanding C89 or better.
21202         (HAVE_LIMITS_H): Remove.  Assume it's 1.
21203         (__P): Remove; not used.
21204         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
21205         (mktime, not_equal_tm, print_tm, check_result,
21206         main): Use prototypes.  Use const * where appropriate.
21207         (main): Fix typo in testing code that uncovered by above changes.
21208         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
21209
21210 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21211
21212         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
21213         locale.h, localeconv.  This merges changes from coreutils.
21214
21215         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
21216         It can be removed after the next Autoconf is released.
21217         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
21218         needed.
21219
21220 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21221
21222         * lib/mktime.c: Fix Debian bug 177940
21223         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
21224         (localtime_offset): Now long int, not time_t, because we want it
21225         to be guaranteed to be signed.  All uses changed.
21226         (__mktime_internal): If overflow would occur when adding offset,
21227         don't add it.
21228
21229         Merge 'human' changes from coreutils.  Rewrite to support
21230         locale-specific notations like thousands separators.
21231         * lib/human.c: Simplify authorship notice.
21232         Include human.h immediately after config.h.
21233         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
21234         <limits.h>: Do not include, since human.h does.
21235         (SIZE_MAX, UINTMAX_MAX): New macros.
21236         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
21237         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
21238         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
21239         (power_letter): Renamed from suffixes.
21240         (generate_suffix_backwards): Remove.
21241         (adjust_value): Now takes int style (because of human.h changes)
21242         and long double value (for greater precision on some platforms).
21243         (group_number): New function.
21244         (human_readable): Use it.  Use integer options, not enum.
21245         Put the options before the sizes in the arg list.
21246         Support all the new options.
21247         The old human_readable function has been removed;
21248         use inttostr.h instead.
21249         (human_readable, default_block_size, humblock):
21250         Use uintmax_t, not int, for block sizes.
21251         (human_readable_inexact, block_size_types): Remove.
21252         (block_size_opts): New constant.
21253         (human_options): Renamed from human_block_size, with new signature
21254         that allows block sizes up to UINTMAX_MAX.  All callers changed.
21255         * lib/human.h: Add copyright and authorship notice.
21256         Include <limits.h> and <stdbool.h> unconditionally.
21257         (PARAMS): Remove.  All uses removed.
21258         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
21259         (enum human_inexact_style): Remove tag; now a nameless enum.
21260         (human_floor, human_ceiling, human_round_to_even): Now have
21261         values 2, 0, 1 rather than -1, 1, 0.
21262         (human_group_digits, human_suppress_point_zero, human_autoscale,
21263         human_base_1024, human_SI, human_B): New constants.
21264         (human_readable_inexact, human_block_size): Remove.
21265         (human_readable): Size args are now uintmax_t, not int.
21266         (human_options): New decl.
21267
21268         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
21269         unnecessary now that we assume C89 or better.  This change
21270         imported from coreutils.
21271
21272         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21273         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
21274         in the 2003-05-30 sync from glibc.
21275
21276         .h files should stand alone, but we shouldn't include <sys/types.h>
21277         if we can get away with just <stddef.h>.
21278
21279         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
21280         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
21281         rather than <sys/types.h>, as we merely need size_t.
21282         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
21283         to get size_t.
21284         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
21285         Include <stdio.h>, to get FILE.
21286         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
21287         memcasecmp.h has included <stddef.h> and all we need is size_t.
21288         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
21289         our interface, instead of including <sys/types.h>
21290
21291 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21292
21293         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
21294         now, as glibc mktime is buggy on non-glibc systems.
21295
21296 2003-06-03  Karl Berry  <karl@gnu.org>
21297
21298         * config/config.sub: update from prep.
21299
21300 2003-06-02  Paul Eggert  <eggert@twinsun.com>
21301
21302         [from coreutils]
21303         Fix some minor time-related bugs with POSIX time arguments.
21304         Some valid time stamps were being rejected (notably -1, and
21305         time stamps before 1900 on 64-bit hosts).  And some invalid
21306         time stamps were being accepted, e.g. September 31.
21307
21308         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
21309         that we can return (time_t) -1 successfully.
21310         * lib/posixtm.c: Likewise.
21311         [HAVE_STDBOOL_H]: Include <stdbool.h>.
21312         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
21313         (t): Remove static var.
21314         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
21315         of static var.  All uses changed.
21316         (year): Do not reject years before 1900; they can occur with
21317         64-bit time_t.
21318         (posix_time_parse): Do not check for out-of-range components;
21319         that is now the caller's responsibility, since our checks were
21320         only approximations.
21321         (posixtime): Use mktime to check for out-of-range components,
21322         since it knows them exactly.
21323         If mktime returns (time_t) -1, check whether an error actually occurred
21324         by invoking localtime on -1.
21325         (main) [TEST_POSIXTIME]: Check for input data errors, and report
21326         posixtime failures better.
21327         Improve the test data (in comments only).
21328
21329 2003-06-02  Karl Berry  <karl@gnu.org>
21330
21331         * config/mkinstalldirs (version): new variable.
21332         (--version): new option.
21333         (usage): improve message.
21334
21335 2003-05-30  Karl Berry  <karl@gnu.org>
21336
21337         * lib/mktime.c: update from libc.
21338
21339 2003-05-30  Bruno Haible  <bruno@clisp.org>
21340
21341         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
21342         * config/config.rpath: Upgrade to gettext-0.12.1.
21343
21344 2003-05-30  Bruno Haible  <bruno@clisp.org>
21345
21346         * m4/gettext.m4: Upgrade to gettext-0.12.1.
21347         * m4/nls.m4: New file, from gettext-0.12.1.
21348         * m4/po.m4: New file, from gettext-0.12.1.
21349         * m4/progtest.m4: Upgrade to gettext-0.12.1.
21350
21351 2003-05-30  Bruno Haible  <bruno@clisp.org>
21352
21353         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
21354         * lib/localcharset.h: Likewise.
21355         * lib/localcharset.c: Likewise.
21356
21357 2003-05-29  Karl Berry  <karl@gnu.org>
21358
21359         * config/config.rpath: update from gettext.
21360
21361 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21362
21363         Assume the headers required for C89 freestanding compilers.
21364         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
21365         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
21366         * m4/human.m4 (gl_HUMAN): Likewise.
21367         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
21368         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
21369         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21370         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
21371         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21372         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
21373
21374 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21375
21376         Assume the headers required for C89 freestanding compilers.
21377         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
21378         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
21379         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
21380         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
21381         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
21382         define, since <limits.h> is guaranteed to do that.
21383         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21384         * lib/exclude.c: Include <stdbool.h> unconditionally.
21385         * lib/tempname.c: Include <stddef.h> unconditionally.
21386         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21387         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21388         <stddef.h> does that.
21389         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21390         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21391         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21392         needed.
21393         * lib/xstrtol.c: Likewise.
21394         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21395         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21396
21397         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21398         warnings on some platforms.
21399
21400         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21401         arbitrarily.
21402
21403 2003-05-26  Jim Meyering  <jim@meyering.net>
21404
21405         Merge in a change from coreutils:
21406         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21407         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21408         that condition, rather than `-1' which is slightly misleading.
21409         Change the name of the cache variable to have the gl_ prefix.
21410         Prompted by a patch from Richard Dawe for DJGPP.
21411
21412 2003-05-24  Karl Berry  <karl@gnu.org>
21413
21414         * config/config.guess: update from prep.
21415
21416 2003-05-22  Karl Berry  <karl@gnu.org>
21417
21418         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21419
21420 2003-05-20  Karl Berry  <karl@gnu.org>
21421
21422         * config/config.guess: update from prep.
21423
21424 2003-05-18  Karl Berry  <karl@gnu.org>
21425
21426         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21427         might actually be set by the user.
21428
21429         * config/depcomp, install-sh, mdate-sh: update from automake.
21430
21431 2003-05-17  Bruno Haible  <bruno@clisp.org>
21432
21433         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21434         invalid expansion for AC_EGREP_CPP.
21435         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21436         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21437         Suggested by Akim Demaille <akim@epita.fr> in
21438         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21439
21440 2003-05-12  Jim Meyering  <jim@meyering.net>
21441
21442         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21443         the space-padded-by-default conversion specifiers, %e, %k, %l.
21444
21445 2003-05-12  Bruno Haible  <bruno@clisp.org>
21446
21447         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21448         the string is longer than 4 KB.
21449
21450 2003-05-11  Karl Berry  <karl@gnu.org>
21451
21452         * config/config.{guess,sub}: update from prep.
21453
21454 2003-05-09  Bruno Haible  <bruno@clisp.org>
21455
21456         * modules/error: Add m4/strerror_r.m4 to file list.
21457
21458 2003-05-03  Bruno Haible  <bruno@clisp.org>
21459
21460         Upgrade to Unicode-4.0.
21461         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21462         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21463         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21464         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21465         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21466         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21467         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21468         Change width of U+E0100..U+E01EF from 1 to 0.
21469
21470 2003-04-25  Jim Meyering  <jim@meyering.net>
21471
21472         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21473         of type size_t, not int.
21474
21475 2003-04-25  Bruno Haible  <bruno@clisp.org>
21476
21477         * lib/copy-file.c: Include <stddef.h>, for size_t.
21478
21479 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21480
21481         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21482         code which expansion is under static control.  Patch imported from
21483         Akim Demaille's patch to Bison; see
21484         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21485
21486 2003-04-14  Bruno Haible  <bruno@clisp.org>
21487
21488         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21489
21490 2003-04-11  Jim Meyering  <jim@meyering.net>
21491
21492         Merge changes from Coreutils.
21493
21494         2003-03-22  Jim Meyering  <jim@meyering.net>
21495
21496         * lib/strftime.c (widen): Cast alloca return value to proper type.
21497
21498         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21499
21500         From GNU libc.
21501         * lib/strftime.c (my_strftime): Handle very large width
21502         specifications for numeric values correctly.  Improve checks for
21503         overflow.
21504
21505         2003-01-19  Jim Meyering  <jim@meyering.net>
21506
21507         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21508         definitions.
21509         (nl_get_alt_digit) [! defined my_strftime]: Define.
21510         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21511         _nl_get_alt_digit and _nl_get_walt_digit.
21512
21513         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21514         libc. These changes have no effect outside of _LIBC.
21515
21516 2003-04-10  Bruno Haible  <bruno@clisp.org>
21517
21518         * modules/findprog: New file.
21519         * MODULES.html.sh (func_all_modules): Add it.
21520
21521 2003-04-10  Bruno Haible  <bruno@clisp.org>
21522
21523         * m4/findprog.m4: New file.
21524         * m4/eaccess.m4: New file.
21525
21526 2003-04-10  Bruno Haible  <bruno@clisp.org>
21527
21528         * lib/findprog.h: New file, from GNU gettext.
21529         * lib/findprog.c: New file, from GNU gettext.
21530
21531 2003-04-05  Jim Meyering  <jim@meyering.net>
21532
21533         Merge changes from Coreutils.
21534
21535         * lib/exclude.h (PARAMS): Remove definition and uses.
21536         * lib/exclude.c: Remove uses of `PARAMS'.
21537
21538         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21539         Add test-cases for DOS filenames. Declare program_name.
21540         (main): Set up program_name.  Patch by Rich Dawe.
21541
21542         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21543         error from mntctl.
21544         Use mntctl's return value to drive the entry-processing loop, since
21545         we can't rely on the value of the vmt_length member in the last
21546         entry.  On some systems doing so could result in exhausting
21547         virtual memory.  Based in part on a patch from Mike Jetzer.
21548
21549 2003-04-04  Bruno Haible  <bruno@clisp.org>
21550
21551         * modules/linebreak: New file.
21552         * MODULES.html.sh (func_all_modules): Add it.
21553
21554 2003-04-04  Bruno Haible  <bruno@clisp.org>
21555
21556         * m4/linebreak.m4: New file.
21557
21558 2003-04-04  Bruno Haible  <bruno@clisp.org>
21559
21560         * lib/linebreak.h: New file, from GNU gettext.
21561         * lib/linebreak.c: New file, from GNU gettext with slight
21562         modifications.
21563         * lib/lbrkprop.h: New file, from GNU gettext.
21564
21565 2003-04-03  Bruno Haible  <bruno@clisp.org>
21566
21567         * modules/utf8-ucs4: New file.
21568         * modules/utf16-ucs4: New file.
21569         * modules/ucs4-utf8: New file.
21570         * modules/ucs4-utf16: New file.
21571         * MODULES.html.sh (func_all_modules): Add them.
21572
21573 2003-04-03  Bruno Haible  <bruno@clisp.org>
21574
21575         * m4/utf-ucs4.m4: New file.
21576         * m4/ucs4-utf.m4: New file.
21577
21578 2003-04-03  Bruno Haible  <bruno@clisp.org>
21579
21580         * lib/utf8-ucs4.h: New file, from GNU gettext.
21581         * lib/utf16-ucs4.h: New file, from GNU gettext.
21582         * lib/ucs4-utf8.h: New file, from GNU gettext.
21583         * lib/ucs4-utf16.h: New file, from GNU gettext.
21584
21585 2003-04-02  Bruno Haible  <bruno@clisp.org>
21586
21587         * modules/binary-io: New file.
21588         * MODULES.html.sh (func_all_modules): Add it.
21589
21590 2003-04-02  Bruno Haible  <bruno@clisp.org>
21591
21592         * lib/binary-io.h: New file, from GNU gettext.
21593
21594 2003-04-01  Bruno Haible  <bruno@clisp.org>
21595
21596         * modules/pathname: New file.
21597         * MODULES.html.sh (func_all_modules): Add it.
21598
21599 2003-04-01  Bruno Haible  <bruno@clisp.org>
21600
21601         * lib/pathname.h: New file, from GNU gettext.
21602         * lib/concatpath.c: New file, from GNU gettext.
21603
21604 2003-03-30  Bruno Haible  <bruno@clisp.org>
21605
21606         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21607
21608 2003-03-30  Bruno Haible  <bruno@clisp.org>
21609
21610         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21611         function chown() doesn't exist.
21612
21613 2003-03-28  Bruno Haible  <bruno@clisp.org>
21614
21615         * modules/copy-file: New file.
21616         * MODULES.html.sh (func_all_modules): Add it.
21617
21618 2003-03-28  Bruno Haible  <bruno@clisp.org>
21619
21620         * m4/copy-file.m4: New file.
21621
21622 2003-03-28  Bruno Haible  <bruno@clisp.org>
21623
21624         * lib/copy-file.h: New file, from GNU gettext.
21625         * lib/copy-file.c: New file, from GNU gettext.
21626
21627 2003-03-18  Jim Meyering  <jim@meyering.net>
21628
21629         * lib/quote.c (quote_n): Fix typo in comment.
21630
21631 2003-03-18  Bruno Haible  <bruno@clisp.org>
21632
21633         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21634         checking.
21635         * m4/onceonly_2_57.m4: Likewise.
21636
21637 2003-03-17  Bruno Haible  <bruno@clisp.org>
21638
21639         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21640         (m4_quote): Remove macro.
21641         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21642
21643 2003-03-14  Jim Meyering  <jim@meyering.net>
21644
21645         Merge changes from Coreutils.
21646         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21647         to be const, in order to avoid warnings.
21648         (obstack_room): Likewise.
21649         (obstack_empty_p): Likewise.
21650
21651 2003-03-14  Bruno Haible  <bruno@clisp.org>
21652
21653         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21654         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21655
21656 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21657
21658         Merge changes from Bison.
21659         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21660         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21661         when compiling Bison 1.875's `bitset bset = obstack_alloc
21662         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21663         * lib/hash.c: Include <stdbool.h> unconditionally.
21664
21665 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21666
21667         * m4/onceonly.m4 (m4_quote): New macro.
21668         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21669         Quote AC_FOREACH variable-expansions properly.
21670
21671 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21672
21673         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21674
21675 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21676
21677         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21678         Reported by Bruce Becker; see:
21679         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21680
21681 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21682             Bruno Haible  <bruno@clisp.org>
21683
21684         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21685         Reported by John Hughes, see
21686         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21687
21688 2003-02-20  Bruno Haible  <bruno@clisp.org>
21689
21690         * MODULES.html.sh (func_all_modules): Add poll.
21691
21692 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21693
21694         * modules/poll: New file.
21695
21696 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21697
21698         * lib/poll_.h: New file.
21699         * lib/poll.c: New file.
21700
21701 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21702
21703         * m4/poll.m4: New file.
21704
21705 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21706
21707         * modules/mathl: New file.
21708
21709 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21710
21711         * lib/mathl.h: New file.
21712         * lib/acosl.c: New file.
21713         * lib/asinl.c: New file.
21714         * lib/atanl.c: New file.
21715         * lib/ceill.c: New file.
21716         * lib/cosl.c: New file.
21717         * lib/expl.c: New file.
21718         * lib/floorl.c: New file.
21719         * lib/frexpl.c: New file.
21720         * lib/ldexpl.c: New file.
21721         * lib/logl.c: New file.
21722         * lib/sincosl.c: New file.
21723         * lib/sinl.c: New file.
21724         * lib/sqrtl.c: New file.
21725         * lib/tanl.c: New file.
21726         * lib/trigl.c: New file.
21727         * lib/trigl.h: New file.
21728
21729 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21730
21731         * m4/mathl.m4: New file.
21732
21733 2003-02-18  Bruno Haible  <bruno@clisp.org>
21734
21735         * MODULES.html.sh (func_all_modules): Add mathl.
21736
21737 2003-02-17  Bruno Haible  <bruno@clisp.org>
21738
21739         * modules/mkdtemp: New module.
21740         * MODULES.html.sh (func_all_modules): Add it.
21741
21742 2003-02-17  Bruno Haible  <bruno@clisp.org>
21743
21744         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21745
21746 2003-02-17  Bruno Haible  <bruno@clisp.org>
21747
21748         * lib/mkdtemp.h: New file, from GNU gettext.
21749         * lib/mkdtemp.c: New file, from GNU gettext.
21750
21751 2003-02-02  Jim Meyering  <jim@meyering.net>
21752
21753         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21754         e.g. glibc-2.2.93.
21755
21756 2003-01-31  Bruno Haible  <bruno@clisp.org>
21757
21758         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21759         'rpl_rename'.
21760         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21761         'rpl_strnlen'.
21762         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21763         'rpl_strtod'.
21764         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21765         'rpl_utime'.
21766
21767 2003-01-31  Bruno Haible  <bruno@clisp.org>
21768
21769         * lib/rename.c: #undef rename before defining rpl_rename.
21770         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21771
21772 2003-01-30  Bruno Haible  <bruno@clisp.org>
21773
21774         * modules/vasnprintf, modules/vasprintf: New modules.
21775         * MODULES.html.sh (func_all_modules): Add them.
21776
21777 2003-01-30  Bruno Haible  <bruno@clisp.org>
21778
21779         * m4/signed.m4: New file, from GNU gettext.
21780         * m4/longdouble.m4: New file, from GNU gettext.
21781         * m4/wchar_t.m4: New file, from GNU gettext.
21782         * m4/wint_t.m4: New file, from GNU gettext.
21783         * m4/vasnprintf.m4: New file.
21784         * m4/vasprintf.m4: New file.
21785
21786 2003-01-30  Bruno Haible  <bruno@clisp.org>
21787
21788         * lib/printf-args.h: New file, from GNU gettext.
21789         * lib/printf-args.c: New file, from GNU gettext.
21790         * lib/printf-parse.h: New file, from GNU gettext.
21791         * lib/printf-parse.c: New file, from GNU gettext.
21792         * lib/vasnprintf.h: New file, from GNU gettext.
21793         * lib/vasnprintf.c: New file, from GNU gettext.
21794         * lib/asnprintf.c: New file, from GNU gettext.
21795         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21796         * lib/vasprintf.c: New file, from GNU gettext.
21797         * lib/asprintf.c: New file, from GNU gettext.
21798
21799 2003-01-29  Bruno Haible  <bruno@clisp.org>
21800
21801         * modules/stpncpy: New module.
21802         * MODULES.html.sh (func_all_modules): Add it.
21803
21804 2003-01-29  Bruno Haible  <bruno@clisp.org>
21805
21806         * m4/stpncpy.m4: New file.
21807
21808 2003-01-29  Bruno Haible  <bruno@clisp.org>
21809
21810         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21811         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21812
21813 2003-01-28  Bruno Haible  <bruno@clisp.org>
21814
21815         * modules/c-ctype: New module.
21816         * MODULES.html.sh (func_all_modules): Add it.
21817
21818 2003-01-28  Bruno Haible  <bruno@clisp.org>
21819
21820         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21821         Paul Eggert.
21822         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21823         Paul Eggert.
21824
21825 2003-01-27  Bruno Haible  <bruno@clisp.org>
21826
21827         * modules/xsetenv: New module.
21828         * MODULES.html.sh (func_all_modules): Add it.
21829
21830 2003-01-27  Bruno Haible  <bruno@clisp.org>
21831
21832         * lib/xsetenv.h: New file, from GNU gettext.
21833         * lib/xsetenv.c: New file, from GNU gettext.
21834
21835 2003-01-23  Jim Meyering  <jim@meyering.net>
21836
21837         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21838         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21839
21840 2003-01-23  Bruno Haible  <bruno@clisp.org>
21841
21842         * modules/minmax: New module.
21843         * MODULES.html.sh (func_all_modules): Add it.
21844
21845 2003-01-23  Bruno Haible  <bruno@clisp.org>
21846
21847         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21848         Eggert.
21849
21850 2003-01-22  Bruno Haible  <bruno@clisp.org>
21851
21852         * modules/exit: New module.
21853         * MODULES.html.sh (func_all_modules): Add it.
21854
21855 2003-01-22  Bruno Haible  <bruno@clisp.org>
21856
21857         * lib/exit.h: New file, from GNU gettext.
21858
21859 2003-01-19  Bruno Haible  <bruno@clisp.org>
21860
21861         * gnulib-tool: Recognize option --extract-maintainer.
21862         (func_get_maintainer): New function.
21863         * modules/*: Add Maintainer entry.
21864
21865 2003-01-16  Jim Meyering  <jim@meyering.net>
21866
21867         * m4/regex.m4: The `regex' struct is both input and output.
21868         Initialize it before each use.  Patch by Tim Waugh.
21869
21870 2003-01-16  Bruno Haible  <bruno@clisp.org>
21871
21872         * MODULES.html.sh: Add a table of contents. Add the module name as
21873         leftmost column. Add hyperlinks.
21874
21875 2003-01-15  Bruno Haible  <bruno@clisp.org>
21876
21877         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21878
21879 2003-01-15  Bruno Haible  <bruno@clisp.org>
21880
21881         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21882         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21883         suffix.
21884
21885 2003-01-15  Bruno Haible  <bruno@clisp.org>
21886
21887         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21888
21889 2003-01-15  Bruno Haible  <bruno@clisp.org>
21890
21891         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21892         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21893
21894 2003-01-14  Jim Meyering  <jim@meyering.net>
21895
21896         * lib/same.c (same_name): Tweak a comment.
21897
21898 2003-01-14  Bruno Haible  <bruno@clisp.org>
21899
21900         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21901         when a string comparison is sufficient.
21902
21903 2003-01-14  Bruno Haible  <bruno@clisp.org>
21904
21905         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21906         'unsigned int'.
21907
21908 2003-01-14  Bruno Haible  <bruno@clisp.org>
21909
21910         * lib/hash-pjw.c: Add comment about low quality of this function.
21911
21912 2003-01-13  Bruno Haible  <bruno@clisp.org>
21913
21914         * modules/stpcpy: Distribute lib/stpcpy.h.
21915         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
21916
21917 2003-01-13  Bruno Haible  <bruno@clisp.org>
21918
21919         * modules/*: Add a description.
21920         * modules/strpbrk: Fix Makefile.am snippet.
21921         * modules/strtoimax: Fix dependencies.
21922         * modules/strtoumax: Likewise.
21923
21924 2003-01-13  Bruno Haible  <bruno@clisp.org>
21925
21926         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
21927         * modules/alloca (Makefile.am): All object files depend on alloca.h.
21928         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
21929
21930 2003-01-13  Bruno Haible  <bruno@clisp.org>
21931
21932         * gnulib-tool (func_create_testdir): Store config/* files in the main
21933         directory.
21934         * config.rpath: Move to ...
21935         * config/config.rpath: ... here.
21936         * modules/gettext: Contains config/config.rpath, not config.rpath.
21937         * modules/iconv: Likewise.
21938
21939 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21940
21941         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21942         to avoid collisions with libcurses and libreadline.
21943
21944         * m4/getstr.m4: Remove.
21945         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
21946
21947 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21948
21949         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21950         to avoid collisions with libcurses and libreadline.
21951
21952         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
21953         * lib/getstr.h, getstr.c: Remove.
21954         * lib/getline.c: Include "getline.h", to check interface.
21955         Move body of old getstr.c here: this defines MIN_CHUNK and
21956         declares getdelim2, which is renamed from getstr.
21957         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21958
21959         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
21960         All uses changed.
21961         * lib/linebuffer.h: Likewise.
21962         (readline): Remove backward-compatibility macro.
21963
21964 2003-01-12  Paul Eggert  <eggert@twinsun.com>
21965
21966         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21967         to avoid collisions with libcurses and libreadline.
21968         * getstr: Remove.
21969         * MODULES.html.sh: Remove getstr.
21970         * modules/getline: Depend on unlocked-io, not getstr.
21971
21972 2003-01-12  Jim Meyering  <jim@meyering.net>
21973
21974         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21975
21976 2003-01-10  Bruno Haible  <bruno@clisp.org>
21977
21978         * modules/alloca: Change Makefile.am requirements. Simplify Include
21979         requirements. Add lib/alloca_.h to file list.
21980
21981 2003-01-10  Bruno Haible  <bruno@clisp.org>
21982
21983         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21984
21985 2003-01-10  Bruno Haible  <bruno@clisp.org>
21986
21987         * lib/alloca_.h: New file.
21988         * lib/getdate.y: Unconditionally include alloca.h.
21989         * lib/makepath.c: Likewise.
21990         * lib/setenv.c: Likewise.
21991         * lib/userspec.c: Likewise.
21992
21993 2003-01-09  Karl Berry  <karl@gnu.org>
21994
21995         * MODULES.html.sh: include `dirname $0` in PATH, to find
21996         gnulib-tool.
21997
21998 2003-01-09  Bruno Haible  <bruno@clisp.org>
21999
22000         * modules/stdbool: Change configure.ac, Makefile.am requirements.
22001         Simplify Include requirements. Add lib/stdbool.h.in to file list.
22002
22003 2003-01-09  Bruno Haible  <bruno@clisp.org>
22004
22005         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
22006
22007 2003-01-09  Bruno Haible  <bruno@clisp.org>
22008
22009         * lib/stdbool.h.in: New file.
22010
22011 2003-01-09  Bruno Haible  <bruno@clisp.org>
22012
22013         * gnulib-tool (func_all_modules): Ignore files ending in ~.
22014         * MODULES.html.sh: Likewise.
22015
22016 2003-01-08  Jim Meyering  <jim@meyering.net>
22017
22018         * lib/full-write.c: Undefine and define-away `const' after inclusion
22019         of errno.h, not before.  Suggestion from Bruno Haible.
22020
22021 2003-01-08  Bruno Haible  <bruno@clisp.org>
22022
22023         * modules/full-read: Depend on full-write.
22024
22025 2003-01-08  Bruno Haible  <bruno@clisp.org>
22026
22027         * lib/safe-read.c: Include specification header first, to ensure its
22028         selfcontainedness.
22029         * lib/full-write.c: Likewise.
22030
22031 2003-01-07  Jim Meyering  <jim@meyering.net>
22032
22033         * lib/full-write.c: Rework so that it may serve to define full_read,
22034         too.
22035         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
22036
22037 2003-01-07  Bruno Haible  <bruno@clisp.org>
22038
22039         * lib/strtoimax.c: Include <stdint.h> as an alternative to
22040         <inttypes.h>.
22041         * lib/xstrtol.h: Likewise.
22042         * lib/xstrtoimax.c: Likewise.
22043         * lib/xstrtoumax.c: Likewise.
22044         * lib/human.h: Likewise.
22045
22046         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
22047         on systems that have <inttypes.h> but not <stdint.h>.
22048
22049 2003-01-07  Bruno Haible  <bruno@clisp.org>
22050
22051         * MODULES.html.sh: Add copyright notice.
22052         (missed_files): Omit CVS directory entries.
22053         (func_module): Make it work with sed-3.02.
22054         * MODULES.txt: Remove file.
22055
22056 2003-01-06  Jim Meyering  <jim@meyering.net>
22057
22058         * lib/version-etc.c: Update year in translatable copyright string.
22059
22060 2003-01-03  Karl Berry  <karl@gnu.org>
22061
22062         * config/config.{guess,sub}: update from prep.
22063
22064 2003-01-02  Karl Berry  <karl@gnu.org>
22065
22066         * doc/COPYING.DOC: belatedly updated to 1.2.
22067
22068 2003-01-01  Karl Berry  <karl@gnu.org>
22069
22070         * gnulib-tool (func_verify_module): report module name $module in
22071         error message, not $1.
22072         * gnulib-tool (create-testdir): don't complain if destdir couldn't
22073         be created, only if it doesn't exist.
22074         * gnulib-tool (last_checkin_date): don't expand the $Date here.
22075
22076 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22077
22078         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
22079
22080 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22081
22082         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
22083         memcmp if strcoll doesn't work.
22084
22085 2002-12-31  Bruno Haible  <bruno@clisp.org>
22086
22087         * lib/utime.c (utime_null): No need to call ftruncate if the file was
22088         nonempty.
22089
22090 2002-12-31  Bruno Haible  <bruno@clisp.org>
22091
22092         * lib/memcoll.c (STRCOLL): New macro.
22093         (memcoll): Use it.
22094
22095 2002-12-31  Bruno Haible  <bruno@clisp.org>
22096
22097         * lib/localcharset.h: New file.
22098         * lib/localcharset.c: Include it.
22099         * lib/unicodeio.c: Likewise.
22100
22101 2002-12-31  Bruno Haible  <bruno@clisp.org>
22102
22103         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
22104         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
22105
22106 2002-12-31  Bruno Haible  <bruno@clisp.org>
22107
22108         * lib/getline.h: Include <stddef.h>, for size_t.
22109
22110         * lib/unicodeio.h: Include <stddef.h>, for size_t.
22111         * lib/unicodeio.c: Don't include <stddef.h>.
22112
22113 2002-12-31  Bruno Haible  <bruno@clisp.org>
22114
22115         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
22116         HAVE_TM_ZONE.
22117
22118 2002-12-24  Karl Berry  <karl@gnu.org>
22119
22120         * config/config.guess: update from prep.
22121
22122 2002-12-24  Bruno Haible  <bruno@clisp.org>
22123
22124         General infrasructure.
22125         * m4/README: Rewritten.
22126         * m4/onceonly.m4: New file.
22127         * m4/onceonly_2_57.m4: New file.
22128
22129         Module atexit.
22130         * m4/atexit.m4: New file.
22131
22132         Module strtod.
22133         * m4/strtod.m4: New file.
22134
22135         Module strtol.
22136         * m4/strtol.m4: New file.
22137
22138         Module strtoul.
22139         * m4/strtoul.m4: New file.
22140
22141         Module memchr.
22142         * m4/memchr.m4: New file.
22143
22144         Module memcmp.
22145         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
22146         (jm_FUNC_MEMCMP): Invoke it.
22147
22148         Module memcpy.
22149         * m4/memcpy.m4: New file.
22150
22151         Module memmove.
22152         * m4/memmove.m4: New file.
22153
22154         Module memset.
22155         * m4/memset.m4: New file.
22156
22157         Module strcspn.
22158         * m4/strcspn.m4: New file.
22159
22160         Module strpbrk.
22161         * m4/strpbrk.m4: New file.
22162
22163         Module strstr.
22164         * m4/strstr.m4: New file.
22165
22166         Module strerror.
22167         * m4/strerror.m4: New file.
22168
22169         Module mktime.
22170         * m4/mktime.m4: Renamed from jm-mktime.m4.
22171         (gl_PREREQ_MKTIME): New macro.
22172         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
22173
22174         Module malloc.
22175         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
22176         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
22177         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
22178
22179         Module realloc.
22180         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
22181         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
22182         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
22183
22184         Module strftime.
22185         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
22186         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
22187         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
22188         gl_TM_GMTOFF.
22189         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
22190
22191         Module xalloc.
22192         * m4/xalloc.m4: New file.
22193
22194         Module alloca.
22195         * m4/alloca.m4: New file.
22196
22197         Module putenv.
22198         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
22199         (jm_FUNC_PUTENV): Invoke it.
22200
22201         Module setenv.
22202         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
22203         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
22204         when invoked twice.
22205         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
22206         gt_FUNC_SETENV.
22207
22208         Module memrchr.
22209         * m4/memrchr.m4: New file.
22210
22211         Module stpcpy.
22212         * m4/stpcpy.m4: New file.
22213
22214         Module strcase.
22215         * m4/strcase.m4: New file.
22216
22217         Module strdup.
22218         * m4/strdup.m4: New file.
22219
22220         Module strnlen.
22221         * m4/strnlen.m4: New file.
22222
22223         Module strndup.
22224         * m4/strndup.m4: New file.
22225
22226         Module xstrtod.
22227         * m4/xstrtod.m4: New file.
22228
22229         Module xstrtol.
22230         * m4/xstrtol.m4: New file.
22231
22232         Module getdate.
22233         * m4/getdate.m4: New file.
22234
22235         Module unlocked-io.
22236         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
22237         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
22238         * m4/jm-glibc-io.m4n: Remove file.
22239
22240         Module long-options.
22241         * m4/long-options.m4: New file.
22242
22243         Module md5.
22244         * m4/md5.m4: New file.
22245
22246         Module sha.
22247         * m4/sha.m4: New file.
22248
22249         Module getstr.
22250         * m4/getstr.m4: New file.
22251
22252         Module getline.
22253         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
22254         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
22255         <sys/types.h>, for size_t. Use the function name gnu_getline, not
22256         simply getline. Infoke gl_PREREQ_GETLINE.
22257
22258         Module obstack.
22259         * m4/obstack.m4: New file.
22260
22261         Module hash.
22262         * m4/hash.m4: New file.
22263
22264         Module readtokens.
22265         * m4/readtokens.m4: New file.
22266
22267         Module strverscmp.
22268         * m4/strverscmp.m4: New file.
22269
22270         Module stdbool.
22271         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
22272         OSF/1.
22273
22274         Module strtoll.
22275         * m4/strtoll.m4: New file.
22276
22277         Module strtoull.
22278         * m4/strtoull.m4: New file.
22279
22280         Module strtoimax.
22281         * m4/strtoimax.m4: New file.
22282
22283         Module strtoumax.
22284         * m4/strtoumax.m4: New file.
22285
22286         Module xstrtoimax.
22287         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
22288         jm_AC_PREREQ_XSTRTOIMAX.
22289         Moved the strtol prerequisites to strtol.m4.
22290         Moved the strtoll prerequisites to strtoll.m4.
22291         Moved the strtoimax prerequisites to strtoimax.m4.
22292
22293         Module xstrtoumax.
22294         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
22295         jm_AC_PREREQ_XSTRTOUMAX.
22296         Moved the strtoul prerequisites to strtoul.m4.
22297         Moved the strtoull prerequisites to strtoull.m4.
22298         Moved the strtoumax prerequisites to strtoumax.m4.
22299
22300         Module chown.
22301         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
22302         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
22303
22304         Module dup2.
22305         * m4/dup2.m4: New file.
22306
22307         Module ftruncate.
22308         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
22309         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
22310
22311         Module getgroups.
22312         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
22313         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
22314
22315         Module gettimeofday.
22316         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
22317         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
22318         gl_PREREQ_GETTIMEOFDAY.
22319
22320         Module mkdir.
22321         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
22322         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
22323
22324         Module mkstemp.
22325         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
22326         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
22327         jm_AC_TYPE_UINTMAX_T.
22328         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
22329
22330         Module stat.
22331         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
22332         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
22333
22334         Module lstat.
22335         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
22336         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
22337
22338         Module timespec.
22339         * m4/timespec.m4 (gl_TIMESPEC): New macro.
22340         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
22341         * m4/st_mtim.m4: Indentation.
22342
22343         Module nanosleep.
22344         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
22345         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
22346         gl_PREREQ_NANOSLEEP.
22347
22348         Module regex.
22349         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
22350         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
22351         (gl_REGEX): New macro.
22352
22353         Module rename.
22354         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
22355         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
22356
22357         Module rmdir.
22358         * m4/rmdir.m4: New file.
22359
22360         Module utime.
22361         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
22362         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
22363         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
22364
22365         Module dirname.
22366         * m4/dirname.m4: New file.
22367
22368         Module getopt.
22369         * m4/getopt.m4: New file.
22370
22371         Module unistd-safer.
22372         * m4/unistd-safer.m4: New file.
22373
22374         Module fnmatch.
22375         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
22376         declaration.
22377         (gl_PREREQ_FNMATCH_EXTRA): New macro.
22378         (gl_FUNC_FNMATCH_POSIX): New macro.
22379         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
22380         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
22381         simply fnmatch.
22382
22383         Module exclude.
22384         * m4/exclude.m4: New file.
22385
22386         Module human.
22387         * m4/human.m4: New file.
22388
22389         Module acl.
22390         * m4/acl.m4: Nop.
22391
22392         Module backupfile.
22393         * m4/backupfile.m4: New file.
22394         * m4/d-ino.m4: Indentation.
22395
22396         Module fsusage.
22397         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22398         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22399         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22400
22401         Module dirfd.
22402         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22403         requirements.
22404
22405         Module euidaccess.
22406         * m4/euidaccess.m4: New file.
22407
22408         Module file-type.
22409         * m4/file-type.m4: New file.
22410
22411         Module fileblocks.
22412         * m4/fileblocks.m4: New file.
22413
22414         Module filemode.
22415         * m4/filemode.m4: New file.
22416
22417         Module isdir.
22418         * m4/isdir.m4: New file.
22419
22420         Module lchown.
22421         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22422         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22423
22424         Module makepath.
22425         * m4/makepath.m4: New file.
22426
22427         Module modechange.
22428         * m4/modechange.m4: New file.
22429
22430         Module mountlist.
22431         * m4/mountlist.m4: New file.
22432         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22433         Indentation.
22434
22435         Module path-concat.
22436         * m4/path-concat.m4: New file.
22437
22438         Module pathmax.
22439         * m4/pathmax.m4: New file.
22440
22441         Module same.
22442         * m4/same.m4: New file.
22443
22444         Module save-cwd.
22445         * m4/save-cwd.m4: New file.
22446
22447         Module savedir.
22448         * m4/savedir.m4: New file.
22449
22450         Module xgetcwd.
22451         * m4/xgetcwd.m4: New file.
22452         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22453
22454         Module xreadlink.
22455         * m4/xreadlink.m4: New file.
22456
22457         Module safe-read.
22458         * m4/safe-read.m4: New file.
22459
22460         Module safe-write.
22461         * m4/safe-write.m4: New file.
22462
22463         Module closeout.
22464         * m4/closeout.m4: New file.
22465
22466         Module stdio-safer.
22467         * m4/stdio-safer.m4: New file.
22468
22469         Module getpass.
22470         * m4/getpass.m4: New file.
22471
22472         Module getugroups.
22473         * m4/getugroups.m4: New file.
22474
22475         Module group-member.
22476         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22477         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22478
22479         Module idcache.
22480         * m4/idcache.m4: New file.
22481
22482         Module userspec.
22483         * m4/userspec.m4: New file.
22484
22485         Module gettime.
22486         * m4/clock_time.m4: New file.
22487         * m4/gettime.m4: New file.
22488
22489         Module settime.
22490         * m4/settime.m4: New file.
22491
22492         Module posixtm.
22493         * m4/posixtm.m4: New file.
22494
22495         Module gethostname.
22496         * m4/gethostname.m4: New file.
22497
22498         Module canon-host.
22499         * m4/canon-host.m4: New file.
22500
22501         Module gettext.
22502         * m4/codeset.m4: New file, from gettext-0.11.5.
22503         * m4/gettext.m4: New file, from gettext-0.11.5.
22504         * m4/glibc21.m4: New file, from gettext-0.11.5.
22505         * m4/iconv.m4: New file, from gettext-0.11.5.
22506         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22507         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22508         * m4/inttypes.m4: New file, from gettext-0.11.5.
22509         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22510         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22511         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22512         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22513         * m4/lib-link.m4: New file, from gettext-0.11.5.
22514         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22515         * m4/progtest.m4: New file, from gettext-0.11.5.
22516         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22517         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22518         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22519
22520         Module localcharset.
22521         * m4/localcharset.m4: New file.
22522
22523         Module hard-locale.
22524         * m4/hard-locale.m4: New file.
22525
22526         Module mbswidth.
22527         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22528         onceonly macros.
22529         * m4/mbrtowc.m4: Add comment.
22530
22531         Module memcasecmp.
22532         * m4/memcasecmp.m4: New file.
22533
22534         Module memcoll.
22535         * m4/memcoll.m4: New file.
22536
22537         Module unicodeio.
22538         * m4/unicodeio.m4: New file.
22539
22540         Module rpmatch.
22541         * m4/rpmatch.m4: New file.
22542
22543         Module yesno.
22544         * m4/yesno.m4: New file.
22545
22546         Module exitfail.
22547         * m4/exitfail.m4: New file.
22548
22549         Module c-stack.
22550         * m4/c-stack.m4 (gl_C_STACK): New macro.
22551         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22552
22553         Module error.
22554         * m4/error.m4 (gl_ERROR): New macro.
22555         (jm_PREREQ_ERROR): Use onceonly macros.
22556
22557         Module fatal.
22558         * m4/fatal.m4: New file.
22559
22560         Module getloadavg.
22561         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22562         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22563
22564         Module getpagesize.
22565         * m4/getpagesize.m4: New file.
22566
22567         Module getusershell.
22568         * m4/getusershell.m4: New file.
22569
22570         Module physmem.
22571         * m4/physmem.m4: New file.
22572
22573         Module posixver.
22574         * m4/posixver.m4: New file.
22575
22576         Module quotearg.
22577         * m4/quotearg.m4: New file.
22578
22579         Module quote.
22580         * m4/quote.m4: New file.
22581
22582         Module readutmp.
22583         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22584
22585         Module sig2str.
22586         * m4/sig2str.m4: New file.
22587
22588         Other.
22589         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22590         ulonglong.m4.
22591         * m4/intmax_t.m4: New file.
22592         * m4/d-type.m4: Indentation.
22593         * m4/jm-macros.m4: Update.
22594         * m4/prereq.m4 (jm_PREREQ): Update.
22595         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22596         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22597         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22598         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22599         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22600         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22601         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22602         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22603         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22604         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22605         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22606         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22607         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22608         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22609         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22610         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22611         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22612         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22613         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22614
22615 2002-12-24  Bruno Haible  <bruno@clisp.org>
22616
22617         * MODULES.txt: Update according to m4/ changes.
22618
22619         Module gettext.
22620         * config.rpath: New file, from gettext-0.11.5.
22621
22622         * modules/*: New module descriptions.
22623         * gnulib-tool: New file.
22624         * MODULES.html.sh: New file.
22625
22626 2002-12-21  Karl Berry  <karl@gnu.org>
22627
22628         * doc/fdl.texi: update to version 1.2.
22629
22630 2002-12-19  Karl Berry  <karl@gnu.org>
22631
22632         * config/config.guess: update from prep.
22633
22634 2002-12-18  Bruno Haible  <bruno@clisp.org>
22635
22636         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22637         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22638
22639 2002-12-17  Bruno Haible  <bruno@clisp.org>
22640
22641         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22642         stdlib.h, string.h.
22643
22644 2002-12-17  Bruno Haible  <bruno@clisp.org>
22645
22646         * lib/canon-host.c (strdup): Remove unused declaration.
22647
22648         * lib/fsusage.c: Include full_read.h.
22649         (get_fs_usage): Use full_read instead of safe_read.
22650
22651         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22652
22653 2002-12-12  Karl Berry  <karl@gnu.org>
22654
22655         * config/config.guess: update from prep.
22656
22657 2002-12-11  Bruno Haible  <bruno@clisp.org>
22658
22659         * m4/setenv.m4: New file, from gettext-0.11.5.
22660
22661 2002-12-11  Bruno Haible  <bruno@clisp.org>
22662
22663         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22664         not unsetenv().
22665         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22666         modifications:
22667
22668         2002-12-11  Bruno Haible  <bruno@clisp.org>
22669
22670                 * setenv.c (alloca): Fall back to malloc.
22671                 (freea): New macro.
22672                 (setenv): Use freea() to free memory allocated with alloca().
22673
22674         2002-11-13  Bruno Haible  <bruno@clisp.org>
22675
22676                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22677                 function declarations.
22678                 * unsetenv.c (unsetenv): Likewise.
22679
22680         2002-03-04  Bruno Haible  <bruno@clisp.org>
22681
22682                 Portability to AIX 4.3.3.
22683                 * unsetenv.c: New file, extracted from setenv.c.
22684                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22685
22686         2001-12-20  Bruno Haible  <bruno@clisp.org>
22687
22688                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22689                 use malloc instead. For SunOS 4.
22690
22691         2001-12-11  Bruno Haible  <bruno@clisp.org>
22692
22693                 * setenv.c: Declare alloca.
22694                 (compar_fn_t): New typedef.
22695                 (KNOWN_VALUE, STORE_VALUE): Use it.
22696
22697         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22698         setenv.h.
22699
22700 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22701
22702         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22703         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22704         Choose values that are less likely to collide with system fnmatch
22705         options.
22706         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22707         defined (e.g., a pure POSIX system).
22708         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22709         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22710
22711 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22712
22713         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22714         a pain in practice to deal with generated m4 files.  This change
22715         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22716
22717         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22718         and jm-glibc-io.m4, as they are no longer a special case.
22719         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22720         kludge and the auto-generation stuff.  Check only whether the
22721         functions are declared, not whether they exist, since older hosts
22722         that don't declare the functions can't use the optimization anyway.
22723
22724 2002-12-06  Jim Meyering  <jim@meyering.net>
22725
22726         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22727
22728         Merge in changes from libc's misc/error.c, in preparation
22729         for the merge of gnulib's changes back into libc.
22730
22731         * lib/error.c (_): Define only if not already defined.
22732         Move definition to follow all #include directives.
22733         Include unlocked-io.h only if !_LIBC.
22734         [_LIBC]: Include <libio/libioP.h>.
22735         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22736         (fflush): Tweak definition to use INTUSE.
22737         (putc): Define.
22738
22739 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22740
22741         * lib/alloca.c [defined emacs]: Include "lisp.h".
22742         (xalloc_die) [defined emacs]: New macro.
22743         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22744         [! defined emacs]: Include <xalloc.h>.
22745         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22746         (pointer): Typedef to POINTER_TYPE *.
22747         (malloc): Remove decl; we now always use xmalloc.
22748         (alloca): Use old-style definition, since Emacs needs this.
22749         Check for arithmetic overflow when computing combined size.
22750
22751 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22752
22753         Do not generate unlocked-io.h automatically, since it's easier to
22754         maintain it by hand.
22755
22756         * lib/unlocked-io.h: New file, from GNU diffutils,
22757         but with proper copyright notice and attribution.
22758         * lib/gen-uio: Remove.
22759         * lib/Makefile.am: Add copyright notice.
22760         (libfetish_a_SOURCES): Add unlocked-io.h.
22761         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22762         (DISTCLEANFILES, io_functions): Remove macros.
22763         (EXTRA_DIST): Remove gen_uio.
22764         (unlocked-io.h): Remove rule.
22765
22766 2002-12-04  Jim Meyering  <jim@meyering.net>
22767
22768         Reflect the fact that stat.c and lstat.c are no longer generated.
22769         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22770         (DISTCLEANFILES): Likewise.
22771         (EXTRA_DIST): Likewise.
22772         (all_local): Don't depend on stat.c or lstat.c.
22773         (stat.c, lstat.c): Remove rules.
22774         (EXTRA_DIST): Remove xstat.in.
22775
22776         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22777         * lib/stat.c: New file.  Contents mostly from xstat.in.
22778         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22779         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22780
22781         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22782         too.
22783         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22784
22785 2002-12-03  Jim Meyering  <jim@meyering.net>
22786
22787         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22788         but not semantics, to minimize the differences between these two files.
22789         (safe_read): Change comment to mention SAFE_READ_ERROR.
22790
22791         * lib/safe-read.c (IS_EINTR): Define.
22792         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22793
22794 2002-12-02  Jim Meyering  <jim@meyering.net>
22795
22796         * lib/safe-read.c (EINTR): Define.
22797         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22798         (INT_MAX): Provide fallback.
22799         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22800
22801         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22802
22803 2002-12-02  Bruno Haible  <bruno@clisp.org>
22804
22805         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22806         Define, taken from safe-read.c.
22807         (INT_MAX): Provide fallback.
22808         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22809         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22810
22811         * lib/safe-read.c (EINTR): Remove definition.
22812         (safe_read): Don't use EINTR if it is absent.
22813
22814 2002-12-01  Jim Meyering  <jim@meyering.net>
22815
22816         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22817         zero.
22818         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22819
22820 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22821
22822         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22823         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22824         with `if (! (value < limit)) abort ();', for readability.
22825
22826 2002-11-26  Karl Berry  <karl@gnu.org>
22827
22828         * lib/strdup.c: copy from libc again, with jim's ok.
22829         * lib/.cppi-disable: re-add strdup.c
22830
22831 2002-11-25  Karl Berry  <karl@gnu.org>
22832
22833         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22834         instead of "strtol.c".
22835
22836 2002-11-25  Karl Berry  <karl@gnu.org>
22837
22838         * config/install-sh: update from automake for variable quoting, $0 in
22839         error msgs, etc.
22840
22841         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22842         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22843         entry.
22844
22845 2002-11-25  Jim Meyering  <jim@meyering.net>
22846
22847         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22848
22849 2002-11-24  Karl Berry  <karl@gnu.org>
22850
22851         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22852         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22853
22854 2002-11-24  Jim Meyering  <jim@meyering.net>
22855
22856         Update from coreutils:
22857
22858         * lib/mktime.c: Merge in changes from libc.
22859
22860         Avoid a link-time failure on some Linux systems.
22861         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22862         (otherwise).
22863         (__mon_yday): Declare with the STATIC attribute.
22864         (__mktime_internal): Likewise.
22865         Based on a report from Greg Schafer.
22866
22867 2002-11-23  Jim Meyering  <jim@meyering.net>
22868
22869         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22870         Use `unsigned', not `int', as type of index.
22871
22872         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22873
22874         * lib/fsusage.c: Remove unneeded parentheses around operands of
22875         `defined'.
22876
22877 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22878
22879         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22880         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22881         so that we can be included first.
22882         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22883         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22884         No need to include stddef.h or sys/types.h any more.
22885         Surround local include files with "", not "<>".
22886         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22887         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22888         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22889         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22890         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22891         (ISPRINT): Remove; no longer needed now that we assume C89.
22892
22893         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22894         Preserve errno.
22895
22896         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22897         quotearg_char): Use SIZE_MAX rather than
22898         (size_t) -1 when we are talking about "infinity".
22899
22900         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22901
22902 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22903
22904         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22905         hint that one should use `if (! x) abort ();' rather than `assert
22906         (x);', and anyway it's one less thing to worry about configuring.
22907         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22908         hash_rehash, hash_insert): Use abort rather than assert.
22909
22910 2002-11-22  Bruno Haible  <bruno@clisp.org>
22911
22912         * lib/safe-read.h: Assume C89. Add comments.
22913         (safe_read): Change return type to size_t.
22914         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
22915         byte counts > SSIZE_MAX correctly.
22916         * lib/safe-write.h: New file.
22917         * lib/safe-write.c: New file.
22918         * lib/full-read.h: New file.
22919         * lib/full-read.c: New file.
22920         * lib/full-write.h: Assume C89. Add comments.
22921         * lib/full-write.c: Include safe-write.h.
22922         (full_write): Rewritten to use safe_write.
22923         Suggested by Jim Meyering and Paul Eggert.
22924
22925 2002-11-21  Jim Meyering  <jim@meyering.net>
22926
22927         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
22928
22929         Merge in changes from the coreutils.
22930
22931         2002-09-25  Paul Eggert  <eggert@twinsun.com>
22932         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
22933         <stdint.h>.
22934         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
22935         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
22936         int.  Work more efficiently if X is the same width as uintmax_t.
22937         Do not compare X to -1, to avoid bogus compiler warning.
22938         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
22939         Don't assume that f_frsize and f_bsize are the same type.
22940
22941         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
22942         warning on FreeBSD.
22943
22944         * lib/makepath.c (make_path): Restore umask *before* creating the final
22945         component.
22946         (make_path): Minor reformatting.
22947
22948         * lib/xmalloc.c: Adjust to work with new autoconf macros,
22949         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
22950         HAVE_MALLOC/HAVE_REALLOC.
22951
22952         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
22953         dummy ones.  At least on GNU/Linux systems, `auto' means something
22954         else.
22955         From Michael Stone.
22956
22957 2002-11-21  Bruno Haible  <bruno@clisp.org>
22958
22959         Remove case insensitive option matching.
22960         * lib/argmatch.h (argcasematch): Remove declaration.
22961         (ARGCASEMATCH): Remove macro.
22962         (__xargmatch_internal): Remove case_sensitive argument.
22963         (XARGMATCH): Update.
22964         (XARGCASEMATCH): Remove macro.
22965         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
22966         case_sensitive argument.
22967         (argcasematch): Remove function.
22968         (__xargmatch_internal): Remove case_sensitive argument.
22969         (main): Use XARGMATCH instead of XARGCASEMATCH.
22970
22971         * lib/xmalloc.c: Change compile-time error message. Add comment about
22972         required autoconf version.
22973
22974 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22975
22976         Merge argmatch cleanups from Bison.  Assume C89.
22977
22978         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22979         Include stdlib.h, for EXIT_FAILURE.
22980         Always include <string.h>, since we assume C89.
22981         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22982         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22983         Include <stddef.h> instead, since it's all we need for size_t.
22984         (PARAMS): Remove.  All uses removed.
22985         (ARRAY_CARDINALITY): Do not bother to #undef.
22986         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22987         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22988         Remove unnecessary parentheses.
22989         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22990         Insert necessary parentheses.
22991         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22992         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22993
22994 2002-11-19  Bruno Haible  <bruno@clisp.org>
22995
22996         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22997         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22998
22999         * lib/mbswidth.h (PARAMS): Remove macro.
23000         (mbswidth, mbsnwidth): Use ANSI C function declarations.
23001         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
23002
23003         * lib/gcd.h (PARAMS): Remove macro.
23004         (gcd): Use ANSI C function declarations.
23005         * lib/gcd.c (gcd): Likewise.
23006
23007 2002-11-15  Bruno Haible  <bruno@clisp.org>
23008
23009         * lib/strcspn.c: Include <stddef.h>.
23010         (strcspn): Use ANSI C function declaration. Change return type to
23011         size_t. Use NULL.
23012         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
23013         (strpbrk): Use NULL.
23014         * lib/strpbrk.h (PARAMS): Remove macro.
23015         (strpbrk): Use ANSI C function declaration.
23016         * lib/strstr.c: Don't include <sys/types.h>.
23017         * lib/strstr.h (PARAMS): Remove macro.
23018         (strstr): Use ANSI C function declarations.
23019
23020 2002-11-14  Karl Berry  <karl@gnu.org>
23021
23022         * config/mkinstalldirs: `do' on separate line, instead of
23023         `for var; do'.
23024
23025 2002-11-06  Bruno Haible  <bruno@clisp.org>
23026
23027         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
23028         * lib/gcd.c (gcd): Likewise.
23029
23030 2002-11-05  Bruno Haible  <bruno@clisp.org>
23031
23032         * lib/gcd.h: New file, from gettext-0.11.5.
23033         * lib/gcd.c: New file, from gettext-0.11.5.
23034
23035 2002-11-05  Bruno Haible  <bruno@clisp.org>
23036
23037         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23038         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23039         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23040         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23041
23042         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
23043         <libintl.h>.
23044         * lib/makepath.c: Include gettext.h instead of <locale.h> and
23045         <libintl.h>.
23046
23047         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
23048         * lib/human.c: Include gettext.h instead of <libintl.h>.
23049         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
23050         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
23051         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
23052         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
23053         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
23054         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
23055         (textdomain): Remove definition.
23056         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
23057
23058         * lib/long-options.c: Remove include of <libintl.h> and definition of
23059         _.
23060         * lib/same.c: Remove include of <libintl.h> and definition of _.
23061
23062 2002-11-04  Owen Taylor  <otaylor@redhat.com>
23063
23064         * lib/config.charset: A few additions for Solaris.
23065
23066 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23067
23068         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
23069         * lib/localcharset.c (locale_charset): Declare as extern "C".
23070
23071 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23072
23073         * lib/config.charset: msdos in uk_UA uses CP1125.
23074
23075 2002-11-04  Bruno Haible  <bruno@clisp.org>
23076
23077         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
23078         * lib/strcase.h: New file, from GNU gettext-0.11.5.
23079         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
23080         * lib/strstr.h: New file, from GNU gettext-0.11.5.
23081         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
23082
23083 2002-11-04  Bruno Haible  <bruno@clisp.org>
23084
23085         * lib/localcharset.c (locale_charset): Don't return an empty string.
23086
23087 2002-11-04  Bruno Haible  <bruno@clisp.org>
23088
23089         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
23090         aliases.
23091
23092 2002-11-04  Bruno Haible  <bruno@clisp.org>
23093
23094         * lib/config.charset: Update for newest glibc. Add canonical names
23095         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
23096
23097 2002-11-04  Bruno Haible  <bruno@clisp.org>
23098
23099         * lib/config.charset: Add support for NetBSD.
23100
23101 2002-11-04  Bruno Haible  <bruno@clisp.org>
23102
23103         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
23104
23105 2002-11-01  Bruno Haible  <bruno@clisp.org>
23106
23107         * configure.in: Add AC_CONFIG_AUX_DIR call.
23108         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
23109         test/Makefile.
23110         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
23111
23112 2002-09-28  Karl Berry  <karl@gnu.org>
23113
23114         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
23115         installed automake until the next release, since changes have been
23116         made.
23117
23118 2002-09-25  Karl Berry  <karl@gnu.org>
23119
23120         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
23121         * lib/getopt*: copy from libc/posix.
23122         * lib/gettext.h: copy from gettext.
23123         * lib/.cppi-disable: add strdup.c, gettext.h.
23124
23125 2002-09-25  Karl Berry  <karl@gnu.org>
23126
23127         * config/srclist.txt: enable gettext.h check.
23128         * config/config.{guess,sub}: update from prep.
23129         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
23130                 from automake 1.6.3.
23131         See srclist*.
23132
23133 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
23134
23135         * regex.c (PATFETCH): Remove the translating fetch.
23136         (PATFETCH_RAW): Rename to PATFETCH.
23137         (set_image_of_range): New fun.
23138         (SET_RANGE_TABLE_WORK_AREA): Use it.
23139         (regex_compile): Don't translate the pattern chars so eagerly.
23140         Only do it when inserting an `exactn' bytecode or when handling
23141         a char-range.
23142         (mutually_exclusive_p): Avoid empty statement.
23143
23144 2002-07-06  Jim Meyering  <meyering@lucent.com>
23145
23146         * m4/README: Don't mention Makefile.am.in.
23147         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
23148
23149 2002-07-01  Jim Meyering  <meyering@lucent.com>
23150
23151         * lib/c-stack.c: Include sys/time.h.
23152         From Volker Borchert.
23153
23154 2002-06-26  Paul Eggert  <eggert@twinsun.com>
23155
23156         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
23157
23158 2002-06-26  Paul Eggert  <eggert@twinsun.com>
23159
23160         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
23161         New macro.  Use it uniformly instead of
23162         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
23163         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
23164         reported by Vin Shelton.
23165
23166 2002-06-22  Paul Eggert  <eggert@twinsun.com>
23167
23168         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
23169         Do not assume SA_SIGINFO behavior.
23170         Bug reported by Jim Meyering on NetBSD 1.5.2.
23171
23172 2002-06-22  Jim Meyering  <meyering@lucent.com>
23173
23174         * m4/c-stack.m4: New file, from diffutils-2.8.2.
23175         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
23176
23177         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
23178         now that configure.ac uses AC_GNU_SOURCE.
23179         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
23180         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
23181
23182         Update to latest tools.  Suggestions from Paul Eggert.
23183         * m4/stdbool.m4: New file, from diffutils-2.8.2.
23184         * m4/gnu-source.m4: Update from diffutils-2.8.2.
23185         * m4/fnmatch.m4: Likewise.
23186         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
23187         to AC_HEADER_STDBOOL
23188
23189 2002-06-22  Jim Meyering  <meyering@lucent.com>
23190
23191         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
23192         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
23193
23194 2002-06-22  Jim Meyering  <meyering@lucent.com>
23195
23196         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
23197
23198         * lib/exitfail.c, exitfail.h: Likewise.
23199         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
23200
23201         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
23202         of fnmatch.h.
23203         (EXTRA_DIST): Add fnmatch_loop.c.
23204         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
23205
23206         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
23207         * lib/fnmatch.c: Update from diffutils-2.8.2.
23208         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
23209         * lib/fnmatch.h: Remove file.
23210
23211 2002-06-21  Jim Meyering  <meyering@lucent.com>
23212
23213         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
23214         * m4/mbrtowc.m4: Likewise.
23215
23216         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
23217         * m4/mbswidth.m4: Reflect name change:
23218         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
23219         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23220
23221         * m4/lib-link.m4: Update from gettext-0.11.2.
23222         * m4/gettext.m4: Likewise.
23223
23224         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
23225         From Alfred M. Szmidt.
23226
23227 2002-06-18  Paul Eggert  <eggert@twinsun.com>
23228
23229         * lib/file-type.h: Report an error if neither S_ISREG nor
23230         S_IFREG is defined, instead of using a test specific to glibc
23231         2.2.  This should be safe, since POSIX requires S_ISREG and
23232         Unix Version 7 had S_IFREG.  We don't need to check for
23233         <sys/types.h> since we don't use any symbols that it defines.
23234
23235 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
23236
23237         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
23238         $@-t, so that each temporary file name is unique and valid in the first
23239         8 characters, for operation under DOS.
23240
23241 2002-06-15  Paul Eggert  <eggert@twinsun.com>
23242
23243         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
23244
23245 2002-06-15  Jim Meyering  <meyering@lucent.com>
23246
23247         Work even with DJGPP 2.03, which lacks support for symlinks.
23248         From Richard Dawe.
23249         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
23250         is defined.
23251         * lib/lchown.c (S_ISLNK): Likewise.
23252
23253 2002-06-15  Jim Meyering  <meyering@lucent.com>
23254
23255         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
23256         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
23257         have been included before this file.
23258
23259 2002-06-14  Jim Meyering  <meyering@lucent.com>
23260
23261         * lib/file-type.h: Use the version from diffutils-2.8.2.
23262         * lib/file-type.c: Likewise.
23263
23264 2002-06-07  Jim Meyering  <meyering@lucent.com>
23265
23266         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
23267         They're needed at least for NetBSD 1.5.2.
23268         ($statxfs_includes): Include those same headers.
23269         ($statxfs_includes): Include sys/vfs.h if available.
23270         ($statxfs_includes): Likewise for sys/statvfs.h.
23271         Check for the following members in both structs statfs and statvfs:
23272         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
23273
23274 2002-06-01  Jim Meyering  <meyering@lucent.com>
23275
23276         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
23277         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
23278
23279 2002-05-28  Jim Meyering  <meyering@lucent.com>
23280
23281         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
23282         Reported by Volker Borchert.
23283
23284 2002-05-27  Jim Meyering  <meyering@lucent.com>
23285
23286         Fix a problem seen only on nonconforming systems whereby ls.c's
23287         use of localtime, and then of gettimeofday would cause trouble:
23288         the localtime call used to initialize rpl_gettimeofday's save
23289         mechanism would clobber ls's current local time information so
23290         that in any long listing the first file would always be listed
23291         with date 1970-01-01.  Analysis by Volker Borchert.
23292
23293         * lib/gettimeofday.c (localtime): Undefine.
23294         (rpl_localtime): New function.
23295
23296 2002-05-27  Jim Meyering  <meyering@lucent.com>
23297
23298         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
23299         localtime.
23300
23301         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
23302         use the replacement function; it wouldn't resolve at link time.
23303         Reported by Volker Borchert.
23304
23305 2002-05-22  Jim Meyering  <meyering@lucent.com>
23306
23307         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
23308         file-type.h.
23309         * lib/file-type.h: New file.
23310         * lib/file-type.c (file_type): New file/function.  Extracted from
23311         diffutils.
23312
23313 2002-04-30  Jim Meyering  <meyering@lucent.com>
23314
23315         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
23316
23317 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23318
23319         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
23320
23321 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23322
23323         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
23324         Do not check for alloca.h (no longer used) or stdbool.h (was never
23325         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
23326
23327 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23328
23329         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
23330
23331 2002-04-29  Jim Meyering  <meyering@lucent.com>
23332
23333         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
23334         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
23335         Use AC_FUNC_STRNLEN here instead.
23336
23337         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
23338         With autoconf-2.53a, it's part of AC_PROG_CC.
23339
23340 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23341
23342         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
23343         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
23344
23345 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23346
23347         * lib/sig2str.h, lib/sig2str.c: New files.
23348         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
23349
23350 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23351
23352         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
23353         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
23354         of 127, since 64 is the largest conceivable number for ancient
23355         nonstandard hosts.
23356         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
23357
23358 2002-04-28  Jim Meyering  <meyering@lucent.com>
23359
23360         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
23361
23362 2002-04-24  Jim Meyering  <meyering@lucent.com>
23363
23364         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
23365         (jm_PREREQ): Use it.
23366
23367         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
23368         mach/mach.h fcntl.h.
23369         Check for this function: setlocale.
23370
23371 2002-04-24  Jim Meyering  <meyering@lucent.com>
23372
23373         * lib/gettext.h: New file, from Gettext.
23374         * lib/Makefile.am (INCLUDES): Remove -I../intl.
23375         (libfetish_a_SOURCES): Add gettext.h.
23376
23377 2002-04-16  Jim Meyering  <meyering@lucent.com>
23378
23379         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
23380         ut_pid, ut_id, ut_exit.
23381
23382 2002-04-16  Jim Meyering  <meyering@lucent.com>
23383
23384         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23385         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23386         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23387
23388 2002-04-12  Jim Meyering  <meyering@lucent.com>
23389
23390         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23391         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23392         existence of the getmntinfo function.  Needed for Darwin 5.3.
23393
23394         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23395         This is necessary at least on Darwin 5.3.
23396
23397         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23398         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23399         strnlen.o in the library, and that makes some versions of ranlib
23400         object.
23401
23402 2002-04-12  Jim Meyering  <meyering@lucent.com>
23403
23404         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23405
23406 2002-04-09  Jim Meyering  <meyering@lucent.com>
23407
23408         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23409         to be more precise.  Rather than saying we're checking whether the
23410         function `works', say what we're testing.
23411         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23412         Reported by Bruno Haible.
23413
23414 2002-03-10  Jim Meyering  <meyering@lucent.com>
23415
23416         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23417         Suggestion from Santiago Vila.
23418
23419 2002-03-08  Jim Meyering  <meyering@lucent.com>
23420
23421         * lib/rename.c: Mention that this wrapper is needed also on
23422         mips-dec-ultrix4.4 systems.
23423
23424 2002-03-02  Jim Meyering  <meyering@lucent.com>
23425
23426         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23427         not HAVE_CLOCK_SETTIME.
23428
23429 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23430
23431         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23432         Check for clock_settime.
23433
23434 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23435
23436         * lib/nanosleep.h: Rename to....
23437         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23438
23439         * lib/gettime.c: New file.
23440         * lib/settime.c: New file.
23441         * lib/stime.c: Remove.
23442
23443         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23444         timespec.h.  Remove nanosleep.h.
23445
23446 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23447
23448         * m4/acl.m4: New file.
23449         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23450         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23451
23452 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23453
23454         * lib/acl.c, lib/acl.h: New files.
23455         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23456
23457 2002-02-24  Jim Meyering  <meyering@lucent.com>
23458
23459         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23460         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23461         cause trouble.  Reported by Nelson Beebe.
23462
23463 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23464
23465         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23466         compilers that don't know that xalloc_die never returns.
23467
23468 2002-02-20  Jim Meyering  <meyering@lucent.com>
23469
23470         * lib/getdate.c: Regenerate using bison-1.33.
23471
23472 2002-02-17  Jim Meyering  <meyering@lucent.com>
23473
23474         * config/config.guess (main): Don't use `head -1'; it's no longer
23475         portable. Use `sed 1q' instead.
23476
23477 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23478
23479         * m4/codeset.m4: Upgrade to gettext-0.11.
23480         * m4/gettext.m4: Upgrade to gettext-0.11.
23481         * m4/glibc21.m4: Upgrade to gettext-0.11.
23482         * m4/iconv.m4: Upgrade to gettext-0.11.
23483         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23484         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23485         * m4/lib-ld.m4: New file, from gettext-0.11.
23486         * m4/lib-link.m4: New file, from gettext-0.11.
23487         * m4/lib-prefix.m4: New file, from gettext-0.11.
23488         * m4/progtest.m4: Upgrade to gettext-0.11.
23489
23490 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23491
23492         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23493         (jm_PREREQ): Use it.
23494
23495 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23496
23497         * lib/posixver.c, lib/posixver.h: New files.
23498         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23499
23500 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23501             Bruno Haible  <bruno@clisp.org>
23502
23503         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23504         (fwrite_success_callback): New declaration.
23505         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23506         print_unicode_char. Call failure callback instead of error.
23507         (fwrite_success_callback): New function.
23508         (exit_failure_callback): New function.
23509         (fallback_failure_callback): New function.
23510         (print_unicode_char): Call unicode_to_mb.
23511
23512 2002-01-26  Jim Meyering  <meyering@lucent.com>
23513
23514         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23515         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23516
23517 2002-01-26  Jim Meyering  <meyering@lucent.com>
23518
23519         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23520
23521 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23522
23523         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23524
23525 2002-01-22  Jim Meyering  <meyering@lucent.com>
23526
23527         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23528         Otherwise, some versions of automake would omit the rule that makes
23529         Makefile from Makefile.in.
23530
23531 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23532
23533         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23534         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23535         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23536         (memcoll): Set errno to zero if there is no error.
23537
23538         * lib/quotearg.c (quotearg_buffer_restyled):
23539         Fix bug with quoting buffers containing NUL when backslashing escapes.
23540         This bug was exposed by the other changes in this patch.
23541         (quotearg_n_options): New arg ARGSIZE.
23542         All callers changed.
23543         (quoting_options_from_style): New function.
23544         (quotearg_n_style): Use it.
23545         (quotearg_n_style_mem): New function.
23546
23547         * lib/quotearg.h (quotearg_n_style_mem): New function.
23548
23549 2002-01-19  Jim Meyering  <meyering@lucent.com>
23550
23551         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23552         Remove useless quotes: DF_PROG="df".
23553         * m4/strnlen.m4: New file.
23554
23555 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23556
23557         * lib/backupfile.c (ISDIGIT): Comment fix.
23558         * lib/getdate.y (ISDIGIT): Likewise.
23559         * lib/posixtm.c (ISDIGIT, year): Likewise.
23560         * lib/strverscmp.c (ISDIGIT): Likewise.
23561         * lib/userspec.c (ISDIGIT): Likewise.
23562
23563 2002-01-16  Jim Meyering  <meyering@lucent.com>
23564
23565         * lib/getdate.y: Add three semicolons, each just before a closing
23566         brace. Bison (as of version 1.31) no longer papers over that mistake.
23567
23568 2002-01-05  Jim Meyering  <meyering@lucent.com>
23569
23570         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23571
23572 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23573
23574         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23575         not silently exit merely because the output buffer happens to
23576         have nothing pending.
23577
23578 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23579
23580         See the big note in ../ChangeLog.
23581         * lib/human.c (suffixes): Prefer K to k for 1024.
23582         (generate_suffix_backwards): New function.
23583         (human_readable_inexact): Use it.
23584         * lib/xstrtol.c (__xstrtol): If there is no number but there
23585         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23586         Accept 'K' as well as 'k'.
23587
23588 2001-12-15  Jim Meyering  <meyering@lucent.com>
23589
23590         * lib/regex.h (__restrict_arr): Update from libc.
23591
23592         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23593         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23594         (STREQ): Define.
23595
23596 2001-12-14  Jim Meyering  <meyering@lucent.com>
23597
23598         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23599         Suggestion from Bruno Haible.
23600
23601 2001-12-10  Jim Meyering  <meyering@lucent.com>
23602
23603         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23604         xrealloc, Instead, include "xalloc.h".
23605         (initbuffer): Don't cast xmalloc return value to char*.
23606         (readline): Reword comment.
23607         Don't cast xrealloc return value to char*
23608         Return NULL, not 0.
23609
23610 2001-12-09  Jim Meyering  <meyering@lucent.com>
23611
23612         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23613         about `signed and unsigned type in conditional expression'.
23614         * lib/posixtm.c (posix_time_parse): Likewise.
23615
23616         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23617
23618         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23619         to avoid a pedantic warning.
23620
23621         * lib/getstr.c: Don't include assert.h.
23622         (getstr): Remove warning-evoking assertions.
23623         Return -1 if offset parameter is out of bounds.
23624         Change the type of a local from int to size_t.
23625
23626         * lib/strftime.c (my_strftime_localtime_r): Include this function
23627         definition in the `#if ! HAVE_TM_GMTOFF' block.
23628
23629         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23630         Include xalloc.h instead.
23631
23632 2001-12-02  Jim Meyering  <meyering@lucent.com>
23633
23634         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23635         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23636         included.
23637
23638         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23639         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23640
23641 2001-11-30  Akim Demaille  <akim@epita.fr>
23642
23643         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23644         before being defined.
23645
23646 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23647
23648         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23649         First arg is int, not unsigned.
23650         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23651         (SIZE_MAX, UINT_MAX): New macros.
23652         (quotearg_n_options): Abort if N is negative.
23653         Avoid overflow check on hosts where size_t is 64 bits and int
23654         is 32 bits, as overflow is impossible there.
23655         Fix off-by-one typo that caused unnecessary reallocation.
23656
23657 2001-11-27  Jim Meyering  <meyering@lucent.com>
23658
23659         * lib/tempname.c: Merge with version from libc.
23660         * lib/regex.c: Likewise.
23661
23662         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23663         systems for which STDC_HEADERS is 0, it was not included, resulting in
23664         a warning about an integer-to-pointer conversion problem with getenv.
23665         Reported by Volker Borchert.
23666
23667 2001-11-26  Jim Meyering  <meyering@lucent.com>
23668
23669         * lib/gtod.h: Remove file.
23670         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23671         * lib/gettimeofday.c: Don't include gtod.h.
23672         (GTOD_init): Remove function.
23673         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23674         Suggestion from Volker Borchert.
23675
23676 2001-11-23  Jim Meyering  <meyering@lucent.com>
23677
23678         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23679         it.
23680         * lib/hash.c (struct hash_table): Define it here instead.
23681
23682 2001-11-22  Jim Meyering  <meyering@lucent.com>
23683
23684         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23685
23686 2001-11-20  Jim Meyering  <meyering@lucent.com>
23687
23688         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23689         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23690
23691 2001-11-19  Jim Meyering  <meyering@lucent.com>
23692
23693         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23694         directory.  Use "conftestXXXXXX" as the template.
23695         Suggestion from Paul Eggert.
23696
23697         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23698         immediately, so the test doesn't mistakenly hit the max-open-files
23699         limit.
23700
23701 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23702
23703         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23704         (TEMPORARIES): New macro.
23705         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23706         removes an artificial limitation (e.g. HP-UX 10.20, where
23707         TMP_MAX is 17576).
23708
23709 2001-11-18  Jim Meyering  <meyering@lucent.com>
23710
23711         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23712
23713 2001-11-18  Jim Meyering  <meyering@lucent.com>
23714
23715         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23716         on SunOS 4.
23717
23718         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23719         files will be created before anything else.
23720
23721 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23722
23723         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23724         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23725
23726 2001-11-17  Jim Meyering  <meyering@lucent.com>
23727
23728         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23729         Prompted by a report from Bob Proulx.
23730
23731         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23732         Instead, require UTILS_FUNC_MKSTEMP.
23733
23734 2001-11-17  Jim Meyering  <meyering@lucent.com>
23735
23736         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23737         Now, that's done as part of AC_FUNC_STRTOD.
23738
23739 2001-11-17  Jim Meyering  <meyering@lucent.com>
23740
23741         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23742         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23743         rather than group writable.  Patch by Juan F. Codagnone.
23744
23745         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23746         xrealloc, Instead, include "xalloc.h".
23747
23748         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23749         Remove explicit declarations of xmalloc, xrealloc,
23750         and xstrdup.  Instead, include "xalloc.h".
23751
23752         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23753         unlocked-io.h.
23754         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23755         Likewise.
23756         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23757
23758         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23759         Reported by Padraig Brady.
23760
23761         * lib/mkstemp.c: #undef mkstemp.
23762         Include config.h.
23763         (rpl_mkstemp): Rename from mkstemp.
23764         Protoize.
23765
23766 2001-11-16  Jim Meyering  <meyering@lucent.com>
23767
23768         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23769         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23770         determine the amount of total physical memory, use pstat_getstatic.
23771         HPUX-11 doesn't define _SC_PHYS_PAGES.
23772         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23773         If sysconf couldn't be used to determine the amount of available
23774         physical memory, use both pstat_getstatic and pstat_getdynamic.
23775         Based on a patch from Bob Proulx.
23776
23777 2001-11-10  Jim Meyering  <meyering@lucent.com>
23778
23779         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23780         (jm_PREREQ): Use it.
23781
23782 2001-11-09  Jim Meyering  <meyering@lucent.com>
23783
23784         * m4/jm-macros.m4: Require autoconf-2.52f.
23785         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23786         Use these AC_-prefixed names, not the AM_-prefixed ones.
23787
23788         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23789
23790 2001-11-05  Jim Meyering  <meyering@lucent.com>
23791
23792         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23793
23794 2001-11-04  Jim Meyering  <meyering@lucent.com>
23795
23796         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23797         $DEFS.
23798
23799 2001-11-03  Jim Meyering  <meyering@lucent.com>
23800
23801         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23802         of AC_DEFUN.
23803
23804         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23805         know the name of the variable in the macro definition.
23806
23807 2001-11-03  Jim Meyering  <meyering@lucent.com>
23808
23809         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23810         in argmatch_to_argument call.
23811
23812         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23813         argument.
23814
23815         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23816         e.g., a fault due to an attempt to free a NULL pointer.
23817
23818 2001-11-01  Jim Meyering  <meyering@lucent.com>
23819
23820         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23821         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23822
23823 2001-11-01  Jim Meyering  <meyering@lucent.com>
23824
23825         * lib/dirfd.c, lib/dirfd.h: New files.
23826         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23827
23828         * lib/hash.c (hash_print) [TESTING]: Clean up.
23829
23830 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23831
23832         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23833         to avoid a warning if -Wall.
23834
23835 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23836
23837         * README: New file
23838         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23839         (per RMS's instructions, this is now the canonical source)
23840         * lgpl/, gpl/: New directories.
23841
23842 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23843
23844         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23845
23846 2001-10-21  Jim Meyering  <meyering@lucent.com>
23847
23848         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23849         this code would end up calling gettext even in packages built
23850         with --disable-nls.
23851         * lib/getopt.c (_): Likewise.
23852         * lib/regex.c (_): Likewise.
23853
23854 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23855
23856         * m4/error.m4 (jm_PREREQ_ERROR):
23857         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23858         AC_FUNC_STRERROR_R does that.
23859         Check for strerror declaration.
23860
23861         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23862         are supposed to have them these days.
23863         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23864         Merge changes from latest Autoconf CVS.
23865         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23866         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23867         POSIX decided to standardize on the int flavor of strerror_r.
23868
23869 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23870
23871         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23872         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23873         Use strerror_r that is only a macro, even if it is not a function.
23874         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23875         (private_strerror): Use prototypes, not old-style function definition.
23876         (print_errno_message): New function.
23877         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23878         char*-flavored one.
23879         (error_tail, error, error_at_line): Use it.
23880
23881 2001-10-11  Jim Meyering  <meyering@lucent.com>
23882
23883         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23884         and quote_n (1, ... to avoid clobbering a buffer.
23885
23886 2001-10-05  Jim Meyering  <meyering@lucent.com>
23887
23888         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23889         hash-pjw.h.
23890         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23891         * lib/hash-pjw.h: New file.
23892
23893 2001-09-30  Jim Meyering  <meyering@lucent.com>
23894
23895         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23896         `struct fsstat' has the `f_fstypename' member.
23897         Use that to define FS_TYPE, which is now used to make
23898         the getfsstat link test tighter.
23899
23900 2001-09-30  Jim Meyering  <meyering@lucent.com>
23901
23902         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23903         Include <sys/ucred.h>, for Apple Darwin.
23904         Include sys/mount.h and sys/fs_types.h only if available.
23905         (FS_TYPE): Define.
23906         (read_filesystem_list): Use FS_TYPE.
23907
23908 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23909
23910         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23911         a boolean context.
23912
23913 2001-09-29  Jim Meyering  <meyering@lucent.com>
23914
23915         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23916         [one-argument getmntent function]): Include stdio.h before mntent.h.
23917         SunOS 4.1.x needs it for the declaration of `FILE'.
23918         Patch by Volker Borchert.
23919
23920         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
23921         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
23922         sys/fs_types.h, and make the link-test for getfsstat guard #include
23923         directives with appropriate #if HAVE_*_H tests so that we can
23924         detect getfsstat on Apple Darwin1.3.7 systems.
23925         Reported by Nelson Beebe.
23926         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
23927
23928 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23929
23930         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23931         #defines strtoimax.  Also treat the other strto* functions
23932         like strtoimax.
23933
23934         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23935         Check for strtoul and strtoumax,
23936         as those declarations are made even in the signed case.
23937         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
23938         Likewise, for strtol and strtoimax.
23939
23940 2001-09-28  Paul Eggert  <eggert@twinsun.com>
23941
23942         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
23943         #defines strtoimax.  Also treat the other strto* functions
23944         like strtoimax.
23945
23946         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
23947         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
23948         (strtoimax, strtoumax): Do not declare if already defined as a macro.
23949
23950 2001-09-26  Jim Meyering  <meyering@lucent.com>
23951
23952         Most macros in unlocked-io.h had the wrong number of arguments.
23953         * lib/gen-uio: New script.
23954         (USE_UNLOCKED_IO): Define to 1 if not already defined.
23955         * lib/unlocked-io.hin: Remove file.
23956         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
23957         rather than trying to embed it here.
23958         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
23959         Reported by Padraig Brady.
23960
23961 2001-09-25  Volker Borchert  <bt@teknon.de>
23962
23963         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
23964         `result'.
23965
23966 2001-09-24  Jim Meyering  <meyering@lucent.com>
23967
23968         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23969
23970 2001-09-23  Jim Meyering  <meyering@lucent.com>
23971
23972         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23973         instead of the mere test for existence of mntent.h.  The latter
23974         would get a false-positive on AIX 3.4 systems.
23975         In the outer getmntent if-block, don't die if neither of the getmntent
23976         tests succeeds.  Instead, just fall through and continue with the
23977         remaining tests.
23978
23979 2001-09-23  Jim Meyering  <meyering@lucent.com>
23980
23981         * lib/mountlist.c: Remove useless parentheses in #if directives.
23982         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23983         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23984
23985 2001-09-22  Jim Meyering  <meyering@lucent.com>
23986
23987         * m4/gettext.m4: New file.  From gettext.
23988         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23989         * m4/progtest.m4: Likewise
23990         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23991         * m4/glibc21.m4: Likewise.
23992
23993         * m4/libintl.m4: Remove.  No longer used.
23994
23995 2001-09-22  Jim Meyering  <meyering@lucent.com>
23996
23997         * lib/localcharset.c: Update from latest gettext.
23998         * lib/config.charset: Likewise.
23999
24000 2001-09-20  Jim Meyering  <meyering@lucent.com>
24001
24002         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
24003         strtoimax.
24004         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
24005         strtoumax.
24006
24007 2001-09-20  Jim Meyering  <meyering@lucent.com>
24008
24009         * lib/xstrtol.c (strtoimax): Guard declaration with
24010         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
24011         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
24012         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
24013         (strtoumax): Likewise, for completeness (it wasn't necessary).
24014
24015 2001-09-17  Paul Eggert  <eggert@twinsun.com>
24016
24017         * lib/strtoimax.c (HAVE_LONG_LONG):
24018         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
24019         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
24020         to work around bug in IBM C compiler.
24021
24022 2001-09-17  Jim Meyering  <meyering@lucent.com>
24023
24024         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
24025         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
24026         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
24027         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
24028         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
24029         whenever the right hand side need not be expanded by the shell.
24030
24031 2001-09-16  Paul Eggert  <eggert@twinsun.com>
24032
24033         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
24034         library.  It's not correct, as some older glibcs are buggy.
24035         fnmatch wasn't fixed until glibc 2.2.
24036
24037         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
24038         special shell magic here.
24039
24040 2001-09-16  Jim Meyering  <meyering@lucent.com>
24041
24042         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
24043         * m4/jm-macros.m4: Require it.
24044
24045 2001-09-16  Jim Meyering  <meyering@lucent.com>
24046
24047         * lib/mkdir.c: New file.
24048
24049 2001-09-15  Jim Meyering  <meyering@lucent.com>
24050
24051         * m4/jm-macros.m4: Check for help2man.
24052
24053 2001-09-11  Jim Meyering  <meyering@lucent.com>
24054
24055         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
24056         The body, by Paul Eggert, was moved here from configure.in.
24057         * m4/jm-macros.m4: Require UTILS_HOST_OS.
24058
24059 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24060
24061         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
24062         (jm_PREREQ): Use it.
24063
24064 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24065
24066         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
24067         Use ssize_t, not int, to store result of readlink.
24068         Check for ssize_t overflow as well as size_t overflow,
24069         as POSIX says the result of readlink is implementation-defined
24070         when ssize_t overflows.
24071         Remove unnecessary cast to char*.
24072         Use free+malloc instead of realloc, as the storage doesn't need
24073         to be preserved and it's clearer and can be more efficient that way.
24074         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
24075         * lib/xreadlink.h (xreadlink): Update prototype.
24076
24077 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24078
24079         * lib/xgetcwd.c: Revert some of the previous change; intead,
24080         fix the HAVE_GETCWD_NULL code to behave more like the
24081         !HAVE_GETCWD_NULL code used to.
24082
24083         Include "xalloc.h".
24084         (xgetcwd): Do not return NULL when memory is exhausted; instead,
24085         invoke xalloc_die.
24086
24087 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24088
24089         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
24090         sys/param.h, as pathmax.h includes them.
24091
24092 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24093
24094         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
24095         (jm_PREREQ_XGETCWD): New macro.
24096
24097         * m4/getcwd.m4: New file.
24098
24099 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24100
24101         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
24102         like the HAVE_GETCWD_NULL code.
24103         Include pathmax.h if not HAVE_GETCWD.
24104         Do not include xalloc.h.
24105         (INITIAL_BUFFER_SIZE): New symbol.
24106         Do not use xmalloc / xrealloc, since the caller is responsible for
24107         handling errors.  Preserve errno around `free' during failure.
24108         Do not overrun buffer when using getwd.
24109
24110 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24111
24112         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
24113         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
24114         getcwd (NULL, 0).
24115
24116 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24117
24118         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
24119         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
24120         spotted by Jim Meyering.
24121
24122 2001-09-03  Jim Meyering  <meyering@lucent.com>
24123
24124         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
24125         failure.
24126
24127 2001-09-02  Jim Meyering  <meyering@lucent.com>
24128
24129         * lib/error.c: Update from GNU libc.
24130
24131 2001-09-01  Jim Meyering  <meyering@lucent.com>
24132
24133         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
24134         Used by df.
24135
24136 2001-09-01  Jim Meyering  <meyering@lucent.com>
24137
24138         * lib/xreadlink.c: New file.
24139         * lib/xreadlink.h: New file.
24140         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
24141         xreadlink.h.
24142
24143         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
24144         doesn't conflict with sparc Solaris 7's definition in
24145         /usr/include/sys/int_types.h.
24146
24147         * lib/exclude.c: Use `""', not `<>' to #include non-system header
24148         files.
24149         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
24150         and strncasecmp as r-values.  Unixware didn't have declarations.
24151
24152 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24153
24154         * lib/xstrtol.h: Add copyright notice.
24155         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
24156         LONGINT_INVALID_SUFFIX_CHAR.
24157
24158 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24159
24160         * lib/xstrtol.c (strtoimax): New decl.
24161
24162 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24163
24164         * lib/xgetcwd.c: Don't include pathmax.h.
24165         Include stdlib.h and unistd.h if available.
24166         Include xalloc.h.
24167         (xmalloc, xstrdup, free): Remove decls.
24168         (xgetcwd): Don't assume sizes fit in unsigned.
24169         Check for overflow when computing sizes.
24170         Simplify reallocation code.
24171
24172 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24173
24174         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
24175         a directory's st_size can have an arbitrary value, so the old
24176         usage could waste an arbitrary amount of memory.  All uses
24177         changed.
24178         * lib/savedir.h: Update prototype.
24179
24180 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24181
24182         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
24183
24184         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
24185         old strtoimax.c.
24186
24187         Also, make the following further changes to make this file's
24188         configuration more similar to that of strtol.c:
24189         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
24190         (strtoumax, uintmax_t, strtoull, strtol): Remove.
24191         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
24192         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
24193         changed to signed values.
24194
24195         And make the following changes as well:
24196         Fix copyright notice, as 1999 was missing.
24197         (verify): New macro.
24198         (strtoimax): Check sizes at compile-time, not run-time.
24199         Prefer strtol to strtoll if both work.
24200         (main): Remove; it was not that useful and was a pain to maintain.
24201
24202         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
24203
24204 2001-08-31  Jim Meyering  <meyering@lucent.com>
24205
24206         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
24207         Use an initial, malloc'd, buffer of length 128 rather than
24208         a statically allocated one of length 1024.
24209
24210 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24211
24212         Simplify code, partly by assuming autoconf 2.52 semantics.
24213
24214         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
24215
24216         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
24217         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
24218         All uses removed.
24219         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
24220         Move AC_REQUIRE to next-to-top level, to avoid confusion.
24221         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
24222         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
24223         jm_AC_HEADER_INTTYPES_H.
24224         * m4/jm-macros.m4 (jm_MACROS): Likewise.
24225
24226         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
24227
24228         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24229         Quote first arg of AC_DEFUN.
24230         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
24231         since they are needed to parse the include file even if we need
24232         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
24233         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
24234         but with opposite signedness.
24235
24236 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24237
24238         Merge 'exclude' changes from tar 1.13.22.
24239         This fixes one or two unlikely storage allocation overflow bugs,
24240         but doesn't change user-visible behavior otherwise.
24241
24242 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24243
24244         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
24245         (jm_PREREQ_EXCLUDE): New macro.
24246
24247 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24248
24249         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
24250         tm to be declared.
24251
24252 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24253
24254         * lib/hash.c: Remove '2001' from copyright notice.
24255
24256 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24257
24258         * lib/full-write.h: New file.
24259         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
24260         * lib/full-write.c: Correct credits, as cccp.c no longer
24261         exists and anyway it was so heavily changed from the old cccp
24262         code as to be unrecognizable.  Include full-write.h.
24263         (full_write) Return size_t, with short writes meaning failure.
24264         All callers changed.  This fixes a bug with large buffers
24265         on 64-bit hosts.
24266         * lib/utime.c: Include full-write.h.
24267
24268 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24269
24270         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
24271         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
24272         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
24273         Include if available.
24274         (<xalloc.h>): Include
24275         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
24276         (verify): New macro.  Use it to verify that EXCLUDE macros do not
24277         collide with FNM macros.
24278         (struct patopts): New struct.
24279         (struct exclude): Use it, as exclude patterns now come with options.
24280         (new_exclude): Support above changes.
24281         (new_exclude, add_exclude_file):
24282         Initial size must now be a power of two to simplify overflow checking.
24283         (free_exclude, fnmatch_no_wildcards): New function.
24284         (excluded_filename): No longer requires options arg, as the options
24285         are determined by add_exclude.  Now returns bool, not int.
24286         (excluded_filename, add_exclude):
24287         Add support for the fancy new exclusion options.
24288         (add_exclude, add_exclude_file): Now takes int options arg.
24289         Check for arithmetic overflow when computing sizes.
24290         (add_exclude_file): xrealloc might modify errno, so don't
24291         realloc until after errno might be used.
24292
24293         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
24294         New macros.
24295         (free_exclude): New decl.
24296         (add_exclude, add_exclude_file): Now takes int options arg.
24297         (excluded_filename): No longer requires options arg, as the options
24298         are determined by add_exclude.  Now returns bool, not int.
24299
24300 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24301
24302         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
24303
24304 2001-08-27  Jim Meyering  <meyering@lucent.com>
24305
24306         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
24307
24308         * lib/version-etc.c (N_): Remove definition.
24309         Revert most of last change.
24310         Instead, simply don't mark the `Copyright...' string for translation.
24311         Based on advice from Paul Eggert.
24312
24313         * lib/strtoxmax.c: Tweak comment.
24314
24315 2001-08-26  Jim Meyering  <meyering@lucent.com>
24316
24317         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
24318
24319         * m4/xstrtoimax.m4: New file.
24320         * m4/xstrtoumax.m4: Add comments explaining why we
24321         AC_REPLACE_FUNCS(strtol).
24322
24323 2001-08-26  Jim Meyering  <meyering@lucent.com>
24324
24325         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
24326         of copyright with `%s' so translators don't get an untranslated
24327         message in 2002.
24328         (COPYRIGHT_YEAR): Define.
24329         (version_etc): Use fprintf rather than fputs.
24330         Suggestion from Ulrich Drepper.
24331
24332         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
24333
24334         * lib/strtoll.c: New file, from GNU libc.
24335         * lib/xstrtoimax.c: New file.
24336
24337         * lib/xstrtol.h: Add xstrtoimax.
24338         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
24339         * lib/strtoimax.c: New file.  Likewise, but first define
24340         STRTOUXMAX_SIGNED.
24341
24342         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
24343         ...
24344         * lib/strtoxmax.c: ... then renamed to this.
24345
24346 2001-08-18  Paul Eggert  <eggert@twinsun.com>
24347
24348         * m4/inttypes.m4: Add AC_PREREQ(2.13).
24349         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
24350         (jm_AC_TYPE_INTMAX_T): New macro.
24351         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
24352
24353         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
24354
24355         * m4/longlong.m4: Renamed from ulonglong.m4.
24356         * m4/inttypes.m4: Renamed from inttypes_h.m4.
24357         * m4/uintmax_t.m4: Removed.
24358
24359 2001-08-13  Paul Eggert  <eggert@twinsun.com>
24360
24361         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
24362         Port to Solaris 8, where 'sed' requires a space after the 'r'
24363         command, and where sh dislikes "$/".  Clean up the spacing a bit.
24364         Redirect output to $tmp just once.
24365
24366 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
24367
24368         * lib/addext.c (<errno.h>): Include.
24369         (errno): Declare if not defined.
24370         (addext): Work correctly when pathconf returns -1 and leaves
24371         errno alone because there is no limit.  Also, work even if
24372         pathconf returns a value greater than SIZE_MAX.
24373
24374 2001-08-12  Jim Meyering  <meyering@lucent.com>
24375
24376         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
24377         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
24378         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
24379         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
24380         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
24381         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
24382         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24383         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24384         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24385         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24386         utime.m4, utimes.m4, xstrtoumax.m4:
24387         Quote the first argument in each use of AC_DEFUN.
24388
24389 2001-08-12  Jim Meyering  <meyering@lucent.com>
24390
24391         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24392         Simply `return getcwd (NULL, 0);'.
24393         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24394         Use 1300 as initial value for length, not PATH_MAX.
24395
24396         * lib/pathmax.h: Clean up cpp syntax.
24397
24398 2001-08-12  Jim Meyering  <meyering@lucent.com>
24399
24400         * lib/gettimeofday.c: New file.
24401         * lib/gtod.h: New file.
24402         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24403
24404 2001-08-05  Jim Meyering  <meyering@lucent.com>
24405
24406         * m4/jm-macros.m4: Require autoconf-2.52.
24407
24408 2001-08-04  Jim Meyering  <meyering@lucent.com>
24409
24410         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24411         stmt, to get in sync with glibc.
24412
24413 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24414
24415         The following changes are from gettext 0.10.39 as maintained by
24416         Bruno Haible.
24417
24418         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24419         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24420         with inverted sense.  All uses changed.
24421
24422         * lib/mbswidth.c: Don't include <limits.h>.
24423         Include <stdlib.h> and <string.h> unconditionally.
24424         (iswcntrl, mbsinit, ISCNTRL): New macros.
24425         (mbsnwidth): Use K&R style function declarations.
24426         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24427         can optimize it when MB_CUR_MAX == 1.
24428         The width of control characters is zero, not 1.
24429
24430 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24431
24432         The following changes are from gettext 0.10.39 as maintained by
24433         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24434
24435         * m4/codeset.m4: Upgrade to serial AM1.
24436         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24437         all uses changed.  Quote first arg of AC_DEFUN.
24438         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24439
24440         * m4/iconv.m4: Upgrade to serial AM2.
24441         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24442         Add --with-libconv-prefix.
24443         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24444         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24445         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24446         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24447         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24448
24449         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24450         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24451         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24452         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24453         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24454         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24455         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24456         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24457         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24458
24459         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24460         string.h any more.
24461
24462         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24463         not the default value.
24464
24465         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24466         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24467         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24468         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24469         Also check for iswcntrl, used for wcwidth fallback.
24470         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24471         to Autoconf 2.13.
24472
24473 2001-08-03  Jim Meyering  <meyering@lucent.com>
24474
24475         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24476         as it was in the original.  Reported by Paul Eggert.
24477
24478 2001-07-16  Jim Meyering  <meyering@lucent.com>
24479
24480         * m4/gettimeofday.m4: New file.
24481         Prompted by a report from Bernhard Baehr.
24482
24483 2001-07-15  Jim Meyering  <meyering@lucent.com>
24484
24485         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24486         stuff. Now it's in ../Makefile.cfg.
24487
24488 2001-07-15  Jim Meyering  <meyering@lucent.com>
24489
24490         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24491         (BUILT_SOURCES): Add unlocked-io.h.
24492         (io_functions): Define.
24493         (unlocked-io.h): New rule.
24494         (DISTCLEANFILES): Add unlocked-io.h.
24495         (all-local): Depend on unlocked-io.h, to ensure it is created.
24496
24497         * lib/unlocked-io.hin: New file
24498
24499         * lib/regex.c: Update from glibc.
24500
24501 2001-07-05  Jim Meyering  <meyering@lucent.com>
24502
24503         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24504         recommendation.
24505         (libfetish_a_SOURCES): Put all .h files here instead.
24506         Remove a thus-exposed (better checks in automake) duplicate and
24507         two unnecessary .h files.
24508
24509 2001-07-04  Jim Meyering  <meyering@lucent.com>
24510
24511         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24512         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24513         distcheck failure.
24514
24515 2001-07-02  Jim Meyering  <meyering@lucent.com>
24516
24517         The following changes were prompted by suggestions from Bruno Haible.
24518
24519         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24520         is now generated.
24521         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24522         definition of EXTRA_DIST.
24523         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24524         ensure that the generated file is created/updated whenever the list
24525         of $(unlocked_functions) is changed.
24526         (jm-glibc-io.m4): New rule.
24527         (unlocked-io.h): New rule -- currently unused.
24528
24529 2001-06-24  Jim Meyering  <meyering@lucent.com>
24530
24531         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24532         unmatched right bracket, rather than kludging it with an extra,
24533         falsely-matching quote in a comment.  Patch by Akim Demaille.
24534
24535 2001-06-11  Jim Meyering  <meyering@lucent.com>
24536
24537         * lib/regex.c: Update from GNU libc.
24538
24539 2001-05-27  Jim Meyering  <meyering@lucent.com>
24540
24541         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24542         Check for ut_type in struct utmp.
24543
24544 2001-05-27  Jim Meyering  <meyering@lucent.com>
24545
24546         * lib/readutmp.h (UT_TYPE): Define.
24547
24548 2001-05-24  Jim Meyering  <meyering@lucent.com>
24549
24550         * lib/argmatch.c: Include "quote.h".
24551         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24552         quote function.  Reported by Göran Uddeborg.
24553
24554 2001-05-22  Jim Meyering  <meyering@lucent.com>
24555
24556         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24557         now that we use the package-supplied version unconditionally.
24558         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24559
24560 2001-05-21  Jim Meyering  <meyering@lucent.com>
24561
24562         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24563         shell syntax errors.
24564
24565 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24566
24567         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24568
24569 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24570
24571         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24572         Don't bother to check library strftime, since
24573         we'll be using our own my_strftime function anyway.
24574         Define my_strftime instead of strftime.
24575
24576 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24577
24578         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24579         which is not yet declared.
24580
24581 2001-05-15  Jim Meyering  <meyering@lucent.com>
24582
24583         * m4/regex.m4: Use proper quoting so brackets appear in the test
24584         program.
24585         Reported by, and with help from, Bruno Haible.
24586
24587 2001-05-13  Jim Meyering  <meyering@lucent.com>
24588
24589         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24590         undefined.
24591
24592 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24593
24594         dirname code cleanup.  base_name now behaves more compatibly
24595         with POSIX basename when given file names that have trailing
24596         slashes, and similarly for dir_name.  Add new primitives
24597         base_len and dir_len.  Put the directory-name-related decls
24598         into dirname.h.
24599
24600         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24601         * lib/backupfile.c (base_name): Likewise.
24602         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24603         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24604         * lib/makepath.c (strip_trailing_slashes): Likewise.
24605         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24606         ISSLASH): Likewise.
24607         * lib/rename.c (strip_trailing_slashes): Likewise.
24608         * lib/same.c (base_name): Likewise.
24609         * lib/stripslash.c (ISSLASH): Likewise.
24610
24611         * lib/addext.c: Include <dirname.h> after size_t is defined.
24612         * lib/backupfile.c: Likewise.
24613
24614         * lib/addext.c (addext): Use base_len to trim redundant
24615         trailing slashes instead of doing it ourselves.
24616         But do not trim the last slash if it is not redundant.
24617
24618         * lib/backupfile.c (find_backup_file_name,
24619         max_backup_version): Use base_len instead of rolling it ourselves.
24620         Handle the case of "" and (on DOS) "C:" correctly.
24621
24622         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24623         needed. Include <string.h>, <dirname.h>.
24624         (base_name): Allow file names ending in slashes, other than names
24625         that are all slashes.  In this case, return the basename followed
24626         by the slashes.  This is more general, and can be used in places
24627         where the original base_name purposely had an assertion failure.
24628         (base_len): New function.
24629
24630         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24631         Do not include <assert.h>; no longer needed.
24632         Include xalloc.h.
24633         (memrchr): Remove decl.
24634         (dir_name_r): Remove.
24635         (dir_len): Renamed from dirlen.  All callers changed.
24636         Rewrite in terms of base_name, for simplicity and consistency.
24637         (dir_name): Never return NULL.  All callers changed.
24638         Do not include <stdlib.h> in test program; no longer needed.
24639         return 0; is fine for test program.
24640
24641         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24642         New macros.
24643         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24644
24645         * lib/path-concat.c (path_concat): Use base_len to compute
24646         base length, not strlen; this means we cannot rely on memcpy
24647         to null-terminate.
24648
24649         * lib/same.c (STREQ): Remove.
24650         (same_name): Handle the case where the basename ends in trailing '/'.
24651
24652         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24653         a slash was stripped.  Do not strip the last slash after a
24654         file system prefix.
24655
24656 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24657
24658         * lib/Makefile.am (libfetish_a_SOURCES):
24659         Add strftime.c, since we now compile it on all hosts.
24660
24661         * lib/strftime.c (my_strftime):
24662         Define to nstrftime if emacs, but only if my_strftime is not defined.
24663         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24664         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24665         Add one more extra argument: a nanoseconds value.
24666         All uses changed.
24667         (ns): New macro.
24668         (my_strftime function): Add %N format.
24669         (emacs_strftimeu): Renamed from emacs_strftime,
24670         with extra ut argument.
24671
24672 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24673
24674         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24675
24676 2001-04-21  Jim Meyering  <meyering@lucent.com>
24677
24678         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24679         doesn't interfere.
24680
24681 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24682
24683         * m4/ftruncate.m4: Check for chsize.
24684         Link with ftruncate.o unconditionally if ftruncate is missing.
24685         This was required when cross-compiling to i586-mingw32msvc.
24686
24687 2001-04-08  Jim Meyering  <meyering@lucent.com>
24688
24689         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24690         recomputed; that's necessary when the offset spans a DST transition.
24691         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24692
24693 2001-04-02  Jim Meyering  <meyering@lucent.com>
24694
24695         * lib/regex.h, regex.c: Update from GNU libc.
24696
24697 2001-03-24  Jim Meyering  <meyering@lucent.com>
24698
24699         * m4/jm-macros.m4: Require autoconf-2.49d.
24700
24701 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24702
24703         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24704
24705 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24706
24707         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24708
24709 2001-03-17  Jim Meyering  <meyering@lucent.com>
24710
24711         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24712         now that the version in autoconf is equivalent.
24713         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24714
24715         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24716         Suggestion from Akim Demaille.
24717
24718         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24719         (jm_PREREQ_TEMPNAME): New function.
24720
24721 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24722
24723         * lib/tempname.c (uint64_t): Define to uintmax_t if
24724         not defined, and if UINT64_MAX is not defined.
24725         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24726         Reported by John David Anglin.
24727
24728 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24729
24730         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24731         resolve alias if codeset is empty.
24732         * lib/config.charset (BeOS): Use wildcard syntax.
24733
24734 2001-03-13  Jim Meyering  <meyering@lucent.com>
24735
24736         * lib/path-concat.c (path_concat)
24737         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24738         concatenating e.g., `C:' and `foo'.
24739         From Bruno Haible.
24740
24741 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24742
24743         * lib/localcharset.c (locale_charset): Don't use
24744         setlocale(LC_CTYPE,NULL). Don't return NULL.
24745         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24746
24747 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24748
24749         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24750         support for DOS/DJGPP.
24751
24752 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24753
24754         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24755         lacks mkstemp.  Compile our own tempname.c if we compile our own
24756         mkstemp.c, as mkstemp relies on tempname.
24757
24758 2001-03-01  Jim Meyering  <meyering@lucent.com>
24759
24760         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24761         AH_VERBATIM really does output its argument verbatim.
24762
24763 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24764
24765         * lib/Makefile.am (libfetish_a_SOURCES):
24766         Add dup-safer.c, fopen-safer.c.
24767         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24768
24769         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24770         * lib/unistd-safer.h: New files.
24771
24772 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24773
24774         The mkstemp replacement is taken from glibc 2.2.2, with some
24775         portability fixes for use outside glibc, as follows:
24776
24777         * lib/tempname.c (struct_stat64): New macro.
24778         (direxists, __gen_tempname): Use it.
24779         This avoids a portability problem with Solaris 8.
24780
24781         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24782         (<stddef.h>, <stdint.h>, <string.h>):
24783         Include only if STDC_HEADERS || _LIBC.
24784         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24785         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24786         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24787         (__set_errno): Define this macro if <errno.h> doesn't.
24788         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24789         Define these macros if <stdio.h> doesn't.
24790         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24791         Define these macros if <sys/stat.h>
24792         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24793         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24794         __xstat64): Define if not _LIBC.
24795         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24796         (__gen_tempname): Invoke gettimeofday only if
24797         HAVE_GETTIMEOFDAY || _LIBC;
24798         otherwise, fall back on plain "time".
24799         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24800
24801         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24802
24803         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24804
24805 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24806
24807         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24808
24809 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24810
24811         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24812         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24813         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24814         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24815
24816 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24817
24818         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24819         Remove workaround macros for hosts that have mbrtowc but not
24820         mbstate_t, as we now insist on proper declarations for both
24821         before using mbrtowc.
24822
24823 2001-02-17  Jim Meyering  <meyering@lucent.com>
24824
24825         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24826         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24827         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24828         UnixWare 7.1.1.
24829
24830         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24831         rather than AC_CACHE_VAL.
24832
24833 2001-02-17  Jim Meyering  <meyering@lucent.com>
24834
24835         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24836         around included file name.
24837
24838         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24839
24840         * lib/strftime.c: Update from GNU libc (the only changes were to
24841         comments).
24842
24843 2001-02-17  Jim Meyering  <meyering@lucent.com>
24844
24845         * lib/regex.c: Update from libc.
24846
24847 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24848
24849         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24850         clash.
24851
24852 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24853
24854         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24855         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24856         Reported by Mark Hounschell via Paul Eggert.
24857
24858 2001-02-07  Jim Meyering  <meyering@lucent.com>
24859
24860         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24861
24862 2001-02-05  Jim Meyering  <meyering@lucent.com>
24863
24864         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24865         it includes the patch required for `large file' support with at least
24866         HP-UX's 10.20 /bin/cc.
24867
24868 2001-02-03  Jim Meyering  <meyering@lucent.com>
24869
24870         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24871         AS_IF, now that it works once again (mysteriously).
24872         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24873
24874 2001-01-30  Jim Meyering  <meyering@lucent.com>
24875
24876         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24877         * m4/chown.m4: Rename conftestchown to conftest.chown.
24878         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24879         s/conftestdir2/conftest.d2/.
24880         * m4/utimes.m4: s/conftestdata/conftest.data/
24881         Inspired by Pavel Roskin's change in autoconf.
24882
24883 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24884
24885         * lib/config.charset: Update for FreeBSD 4.2.
24886
24887 2001-01-27  Jim Meyering  <meyering@lucent.com>
24888
24889         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24890         a use of AS_IF.
24891         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24892
24893 2001-01-26  Jim Meyering  <meyering@lucent.com>
24894
24895         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24896         quotearg.c includes it.
24897
24898 2001-01-26  Jim Meyering  <meyering@lucent.com>
24899
24900         * lib/quotearg.c: Include stddef.h.
24901         * lib/quote.c: Include stddef.h.
24902         Reported by Axel Kittenberger.
24903
24904         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24905         line in double quotes so that it evokes a better diagnostic.
24906         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24907         Reported by Axel Kittenberger.
24908
24909 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24910
24911         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24912         as if it was a `charset'.
24913
24914 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24915
24916         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
24917         has const.
24918
24919 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
24920
24921         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
24922         to avoid a warning.  Add back 'const' to inptr.
24923
24924 2001-01-20  Jim Meyering  <meyering@lucent.com>
24925
24926         Be sure that headers are checked before used in code compiled
24927         for the type checks.
24928         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
24929         In place of that, invoke jm_CHECK_ALL_TYPES.
24930         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
24931         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
24932         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
24933         The check for ssize_t was mistakenly run before the test for unistd.h.
24934
24935         The configure-time check for stdbool.h was missing.
24936         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
24937         (jm_PREREQ_HASH): New function.
24938
24939 2001-01-17  Jim Meyering  <meyering@lucent.com>
24940
24941         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
24942         for autoconf-2.49c.
24943         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
24944
24945 2001-01-16  Jim Meyering  <meyering@lucent.com>
24946
24947         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
24948         From Bruno Haible.
24949
24950 2001-01-14  Jim Meyering  <meyering@lucent.com>
24951
24952         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
24953         foo and bar.  Create conftestdir/ in the script, not in the C code.
24954         Remove directories in the script, not in the C code.
24955         Remove conftestdir{,2} before trying to create the directory.
24956         Make the entire configure script fail if the mkdir fails.
24957
24958 2001-01-14  Jim Meyering  <meyering@lucent.com>
24959
24960         * lib/rename.c: New file.  From Volker Borchert.
24961         Include stdlib.h, string.h or strings.h, and xalloc.h.
24962         Use strip_trailing_slashes rather than open-coding it.
24963
24964 2001-01-03  Paul Eggert  <eggert@twinsun.com>
24965
24966         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24967
24968 2001-01-03  Jim Meyering  <meyering@lucent.com>
24969
24970         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24971         of local `inptr' to avoid warning with some system declarations of
24972         iconv.
24973
24974 2001-01-02  Volker Borchert  <bt@teknon.de>
24975
24976         * m4/rename.m4: New file.
24977         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24978
24979 2001-01-01  Jim Meyering  <meyering@lucent.com>
24980
24981         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24982         even on systems with utmpx.h.  It's necessary for the declaration of
24983         utmp's ut_user member.  Reported by Andreas Jaeger.
24984
24985         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24986         available. They are required for the declarations of getgrgid and
24987         getpwuid resp.
24988         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24989         Reported by Andreas Jaeger.
24990
24991 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24992
24993         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24994         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24995         so `make install' also works in VPATH builds.
24996
24997 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24998
24999         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
25000         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
25001         can be used in subdirectories.
25002
25003 2000-12-29  Paul Eggert  <eggert@twinsun.com>
25004
25005         * lib/modechange.c: Do not assume that mode_t uses the
25006         traditional octal encoding.  E.g. "chmod 1 FOO" should set
25007         the other-execute bit of FOO even if S_IXOTH != 1.
25008
25009         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
25010         WOTH, XOTH, ALLM): New macros.
25011         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
25012          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
25013         Use them.
25014         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
25015         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
25016         (mode_compile):
25017         No need to use uintmax_t; unsigned long is long enough.
25018         Don't bother to get suffix since we don't use it.
25019
25020 2000-12-26  Jim Meyering  <meyering@lucent.com>
25021
25022         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
25023         better with autoheader.
25024
25025 2000-12-24  Jim Meyering  <meyering@lucent.com>
25026
25027         * lib/hash.c (is_prime): Return explicit boolean values.
25028         (hash_get_first): Return NULL to appease Irix5.6's 89.
25029         Reported by Nelson Beebe.
25030
25031 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
25032
25033         * lib/localcharset.c (locale_charset): Add support for Win32.
25034
25035 2000-12-18  Paul Eggert  <eggert@twinsun.com>
25036
25037         * lib/physmem.h, lib/physmem.c: New files.
25038
25039         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
25040         (noinst_HEADERS): Add physmem.h.
25041
25042         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
25043         't' for compatibility with Solaris 8 sort.
25044
25045 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
25046
25047         * lib/config.charset: Add support for BeOS.
25048
25049 2000-12-17  Jim Meyering  <meyering@lucent.com>
25050
25051         * m4/dos.m4 (jm_AC_DOS): New file and macro.
25052         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
25053
25054 2000-12-16  Jim Meyering  <meyering@lucent.com>
25055
25056         This bug had a serious impact on chown: `chown N:M FILE' (for integer
25057         N and M) would have treated it like `chown N:N FILE'.
25058
25059         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
25060
25061 2000-12-16  Jim Meyering  <meyering@lucent.com>
25062
25063         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
25064         SHELLS_FILE to a file name that's useful on djgpp systems.
25065         Include stdlib.h.
25066         (ADDITIONAL_DEFAULT_SHELLS): Define.
25067         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
25068         Based mostly on a patch from Prashant TR.
25069
25070 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
25071
25072         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
25073         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
25074         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
25075
25076 2000-12-08  Andreas Schwab  <schwab@suse.de>
25077
25078         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
25079         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
25080
25081 2000-12-07  Jim Meyering  <meyering@lucent.com>
25082
25083         * lib/stripslash.c (ISSLASH): Define.
25084         (strip_trailing_slashes): Use ISSLASH rather than comparing against
25085         `/'.
25086         From Prashant TR.
25087
25088         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
25089         (dir_name_r): Declare this function as static.
25090         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
25091         manifest itself on a name containing a mix of slashes and
25092         backslashes.
25093         Make this function work with names starting with a DOS-style
25094         drive letter and colon prefix.
25095         (dir_name): Append `.' if necessary.
25096         Based mostly on patches from Prashant TR and Eli Zaretskii.
25097
25098         * lib/dirname.h (dir_name_r): Remove prototype.
25099
25100 2000-12-06  Paul Eggert  <eggert@twinsun.com>
25101
25102         * m4/off_t-format.m4: Remove this file.
25103         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
25104
25105 2000-12-06  Jim Meyering  <meyering@lucent.com>
25106
25107         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
25108         replacement strtoull, we may well need the replacement strtoul, too.
25109         Check for declarations of strtoul and strtoull.
25110         Check for strtol.  Mainly as a cue to cause automake to include
25111         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
25112         Check for limits.h -- strtol.c needs it.
25113
25114 2000-12-05  Jim Meyering  <meyering@lucent.com>
25115
25116         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
25117
25118 2000-12-04  Jim Meyering  <meyering@lucent.com>
25119
25120         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
25121         Also include memory.h, stdlib.h, unistd.h if appropriate.
25122         Reported by Andreas Jaeger (conflicting declaration of malloc).
25123
25124 2000-12-02  Jim Meyering  <meyering@lucent.com>
25125
25126         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
25127         * m4/jm-macros.m4 (jm_MACROS): require it.
25128
25129 2000-12-02  Jim Meyering  <meyering@lucent.com>
25130
25131         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
25132
25133 2000-12-01  Paul Eggert  <eggert@twinsun.com>
25134
25135         * lib/memrchr.c: Include <config.h> before any system include file.
25136
25137 2000-11-30  Jim Meyering  <meyering@lucent.com>
25138
25139         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
25140
25141 2000-11-30  Jim Meyering  <meyering@lucent.com>
25142
25143         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
25144
25145 2000-11-29  Paul Eggert  <eggert@twinsun.com>
25146
25147         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
25148
25149 2000-11-26  Jim Meyering  <meyering@lucent.com>
25150
25151         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
25152
25153 2000-11-22  Paul Eggert  <eggert@twinsun.com>
25154
25155         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
25156         size of (size_t) -1; it's not portable.
25157
25158 2000-11-17  Jim Meyering  <meyering@lucent.com>
25159
25160         * lib/strstr.c: Update from GNU libc.
25161
25162 2000-11-17  Akim Demaille  <akim@epita.fr>
25163
25164         * lib/obstack.h: Formatting changes.
25165         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
25166         prevent type checking.
25167         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
25168         cast the value to (void *): assigning a `foo *' to a `void *'
25169         variable is valid.
25170         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
25171
25172 2000-11-16  Jim Meyering  <meyering@lucent.com>
25173
25174         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
25175
25176 2000-11-11  Jim Meyering  <meyering@lucent.com>
25177
25178         * lib/error.c: Add a couple #includes, merging from GNU libc version.
25179
25180 2000-11-10  Jim Meyering  <meyering@lucent.com>
25181
25182         * lib/obstack.h: Update from GNU libc.
25183         * lib/obstack.c: Likewise.
25184
25185 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
25186
25187         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
25188
25189 2000-11-06  Paul Eggert  <eggert@twinsun.com>
25190
25191         * lib/getusershell.c (setusershell): Use rewind rather than
25192         fseek/fseeko, to avoid configuration hassles with fseeko.
25193         Don't bother opening SHELLS_FILE if shellstream is NULL;
25194         it's not necessary.
25195
25196 2000-11-05  Jim Meyering  <meyering@lucent.com>
25197
25198         * lib/makepath.h (make_dir): Declare.
25199         * lib/makepath.c (make_dir): Remove `static' attribute.
25200         Tweak a comment.
25201
25202 2000-11-04  Jim Meyering  <meyering@lucent.com>
25203
25204         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
25205
25206 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
25207
25208         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
25209         last one in a bucket, advance to the next bucket.
25210
25211 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
25212
25213         * lib/fnmatch.c: Do not comment out all the code if we are using
25214         the GNU C library, because in some cases we are replacing buggy
25215         code in the GNU C library itself.
25216
25217 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
25218
25219         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
25220         (regex_compile): Catch bogus \(\1\).
25221
25222 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25223
25224         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
25225         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
25226         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
25227
25228 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25229
25230         * lib/error.h, getline.h, modechange.h:
25231         Remove "2000" from Copyright line, as the file hasn't been
25232         changed this year other than in the copyright notice.
25233
25234         * lib/xalloc.h: Add "2000" to Copyright line, as this file
25235         was changed this year.
25236
25237 2000-10-29  Jim Meyering  <meyering@lucent.com>
25238
25239         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
25240         renaming.
25241         * m4/ls-mntd-fs.m4: Likewise
25242
25243 2000-10-29  Jim Meyering  <meyering@lucent.com>
25244
25245         * lib/xstat.in: Fix grammar in comment.
25246
25247 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
25248
25249         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
25250         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
25251         doesn't define __restrict_arr.
25252
25253 2000-10-28  Jim Meyering  <meyering@lucent.com>
25254
25255         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
25256         (jm_PREREQ_MEMCHR): New function.
25257
25258 2000-10-28  Jim Meyering  <meyering@lucent.com>
25259
25260         * lib/memchr.c: Update from libc.
25261         Adjust for portability:
25262         [HAVE_STDLIB_H]: Include stdlib.h.
25263         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
25264         Undef __memchr, too.
25265         [!weak_alias]: Define __memchr to memchr.
25266
25267         * lib/regex.c: Update from libc.
25268         * lib/regex.h: Likewise.
25269         * lib/getopt1.c: Likewise.
25270         * lib/memcmp.c: Likewise.
25271
25272         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
25273         Avoid using fseek, when possible -- it's broken by design.
25274         Patch by Ulrich Drepper.
25275
25276 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
25277
25278         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
25279         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
25280         Giving in to popular pressure to shut up the compiler with casts.
25281
25282 2000-10-26  Jim Meyering  <meyering@lucent.com>
25283
25284         * lib/strftime.c: Update from libc.
25285
25286 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
25287
25288         * regex.c: More `unsigned char' -> `re_char' changes.
25289         Also change several `int' into `re_wchar_t'.
25290         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
25291         (PUSH_FAILURE_POINTER): Don't cast any more.
25292         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
25293         We want GCC to complain, since this piece of code makes
25294         re_match non-reentrant, which *should* be fixed.
25295         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
25296         (EXTEND_BUFFER): Use RETALLOC.
25297         (SET_LIST_BIT): Don't cast.
25298         (re_wchar_t): New type.
25299         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
25300         that those two functions will always properly return.
25301         (IMMEDIATE_QUIT_CHECK): Cast to void.
25302         (analyse_first): Use recursion rather than an explicit stack.
25303         (re_compile_fastmap): Can't fail anymore.
25304         (re_search_2): Don't check re_compile_fastmap for failure.
25305         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
25306         Now also sets the new value (passed in a new argument).
25307         (re_match_2_internal): Use it.
25308         Also, use a new var `reg' of type size_t when looping through regs
25309         rather than reuse the inappropriate `mcnt'.
25310
25311 2000-10-25  Jim Meyering  <meyering@lucent.com>
25312
25313         * lib/obstack.c: Update from libc.
25314
25315 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
25316
25317         * regex.c (regex_compile): Change the way of handling a range from
25318         a char less than 256 to a char not less than 256.
25319
25320 2000-10-24  Andrew Innes  <andrewi@gnu.org>
25321
25322         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
25323         NT-Emacs only.
25324         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
25325         so that re_search functions only quit when callers expect them to.
25326
25327 2000-10-23  Jim Meyering  <meyering@lucent.com>
25328
25329         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
25330         wrong.  That set_locale call must not have any side effects.
25331         From Paul Eggert.
25332
25333 2000-10-22  Jim Meyering  <meyering@lucent.com>
25334
25335         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
25336         [CYCLIC]: Remove now-unused definition.
25337
25338         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
25339         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
25340         Suggestion from Ulrich Drepper.
25341
25342 2000-10-21  Jim Meyering  <meyering@lucent.com>
25343
25344         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
25345         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
25346         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
25347
25348 2000-10-21  Jim Meyering  <meyering@lucent.com>
25349
25350         * lib/dirname.c (memrchr): Declare if necessary.
25351         (dir_name): Remove the restriction that there be no
25352         trailing slashes.  Now, this code skips past them, effectively
25353         ignoring them.
25354         [TEST_DIRNAME] (main): New unit tests.
25355
25356         * lib/memrchr.c: New file from GNU libc.
25357         Undef __memrchr, too.
25358         [!weak_alias]: Define __memrchr to memrchr.
25359         Guard weak_alias use with `#ifdef weak_alias'.
25360
25361 2000-10-21  Jim Meyering  <meyering@lucent.com>
25362
25363         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
25364         (dir_name): Use dir_name_r.
25365         * lib/dirname.h (dir_name_r): Declare it.
25366
25367 2000-10-17  Jim Meyering  <meyering@lucent.com>
25368
25369         * lib/quote.h (PARAMS): Define and use.
25370         Reported by Akim Demaille.
25371
25372         * lib/getopt.c: Update from libc.
25373
25374 2000-10-16  Jim Meyering  <meyering@lucent.com>
25375
25376         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
25377         setlocale.
25378         From Jan Fedak.
25379
25380 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
25381
25382         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25383
25384 2000-09-25  Jim Meyering  <meyering@lucent.com>
25385
25386         * lib/md5.h (rol): Define (from GnuPG).
25387
25388         * lib/sha.c: Give credit (GnuPG) where due.
25389         (M): Use rol rather than open-coding it.
25390         Add a FIXME comment.
25391
25392 2000-09-21  Jim Meyering  <meyering@lucent.com>
25393
25394         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25395         Reported by Michael Stone.
25396
25397 2000-09-20  Jim Meyering  <meyering@lucent.com>
25398
25399         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25400         (noinst_HEADERS): Add sha.h.
25401         Based on code from Scott G. Miller and from GnuPG.
25402
25403 2000-09-18  Jim Meyering  <meyering@lucent.com>
25404
25405         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25406         LIBS. Otherwise, everyone ends up linking with -lelf for some
25407         configurations.
25408         Reported by Mike Stone.
25409
25410 2000-09-15  Jim Meyering  <meyering@lucent.com>
25411
25412         * lib/regex.c: Update from libc.
25413
25414 2000-09-10  Jim Meyering  <meyering@lucent.com>
25415
25416         * lib/getopt.c (_getopt_internal): Update from glibc.
25417
25418 2000-09-09  Jim Meyering  <meyering@lucent.com>
25419
25420         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25421         think it should be used as a general replacement for isascii.
25422         * lib/fnmatch.c: Likewise.
25423         * lib/mbswidth.c: Likewise
25424         * lib/regex.c: Likewise.
25425
25426         Don't use atoi.
25427         * lib/userspec.c: Include sys/param.h and limits.h.
25428         Include xstrtol.h.
25429         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25430         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25431         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25432         UID, GID.  Check range.
25433
25434 2000-09-06  Jim Meyering  <meyering@lucent.com>
25435
25436         * lib/getopt.c (_getopt_internal): Update from glibc.
25437
25438 2000-08-30  Jim Meyering  <meyering@lucent.com>
25439
25440         * lib/strftime.c: Merge in changes from GNU libc.
25441
25442 2000-08-26  Jim Meyering  <meyering@lucent.com>
25443
25444         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25445         * m4/fpending.m4: New file.
25446
25447 2000-08-26  Jim Meyering  <meyering@lucent.com>
25448
25449         * lib/closeout.c: Include "__fpending.h".
25450         (close_stdout_status): Return right away if there's nothing to flush.
25451
25452         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25453         * lib/__fpending.c: New file.
25454         * lib/__fpending.h: New file.
25455
25456 2000-08-20  Jim Meyering  <meyering@lucent.com>
25457
25458         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25459         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25460         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25461
25462 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25463
25464         Improve fileutils installation on systems where running
25465         programs (like install) can't be unlinked.
25466         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25467         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25468
25469 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25470
25471         Standardize on "memory exhausted" instead of "Memory exhausted"
25472         or "virtual memory exhausted".
25473         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25474         "virtual memory exhausted".
25475         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25476         our own message.
25477         * lib/userspec.c (parse_user_spec): Likewise.
25478         * lib/bumpalloc.h: comment fix
25479         * lib/same.c, userspec.c: Include xalloc.h.
25480
25481         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25482         not char *const and pointing to a constant array.
25483         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25484         (xrealloc): Comment fix.
25485
25486         * lib/userspec.c (parse_user_spec):
25487         Don't translate a message until just before returning,
25488         to avoid unnecessary translation.
25489
25490 2000-08-07  Jim Meyering  <meyering@lucent.com>
25491
25492         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25493         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25494         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25495         getgroups.c, gethostname.c, getopt.h, group-member.c,
25496         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25497         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25498         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25499         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25500         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25501         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25502         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25503         yesno.c: Back out Copyright date changes for each file with no change
25504         this year.  This eases coordination with other programs using the same
25505         source code modules.  From Paul Eggert.
25506
25507 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25508
25509         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25510         not char, for compatibility with glibc 2.1.3 strftime.c.
25511
25512 2000-08-03  Greg McGary  <greg@mcgary.org>
25513
25514         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25515         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25516         (EXTEND_BUFFER): Use them.
25517
25518 2000-08-01  Jim Meyering  <meyering@lucent.com>
25519
25520         * lib/dirname.c (ISSLASH): Define.
25521         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25522         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25523         both `\' and `/' may be use as path separators.
25524         Based on a patch from Prashant TR.
25525
25526 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25527
25528         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25529         slot vector a constant, since it might get modified.
25530
25531 2000-07-31  Jim Meyering  <meyering@lucent.com>
25532
25533         * lib/xmalloc.c: Use `virtual memory exhausted', not
25534         `Memory exhausted'.
25535         * lib/obstack.c (print_and_abort): Likewise.
25536
25537 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25538
25539         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25540         buffer, so that the caller can always quote one small
25541         component of a "memory exhausted" message in slot 0.
25542         From a suggestion by Jim Meyering.
25543
25544 2000-07-30  Jim Meyering  <meyering@lucent.com>
25545
25546         * lib/makepath.c (make_path): Quote the other instance, too.
25547
25548         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25549         (STATIC_BUF_SIZE): Define.
25550         (quotearg_n_options): Use only statically allocated storage when
25551         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25552         than STATIC_BUF_SIZE.
25553
25554 2000-07-29  Jim Meyering  <meyering@lucent.com>
25555
25556         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25557         * lib/dirname.c (dir_name): Likewise.
25558
25559         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25560         `/'.
25561
25562         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25563         (dir_name): Assert that there are no trailing slashes.
25564
25565 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25566
25567         * lib/mbswidth.h (mbswidth): Add a flags argument.
25568         (mbswidth): New declaration.
25569         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25570         * lib/mbswidth.c (mbswidth): Add a flags argument.
25571         (mbsnwidth): New function.
25572
25573 2000-07-24  Jim Meyering  <meyering@lucent.com>
25574
25575         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25576
25577 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25578
25579         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25580
25581 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25582
25583         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25584         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25585         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25586         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25587         invoke multibyte primitives.
25588
25589 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25590
25591         * lib/quotearg.c:
25592         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25593         so that mbstate_t is always defined.
25594
25595         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25596         be 1 in at least one GCC installation, and this configuration
25597         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25598         performance on hosts that have mbrtowc but have only unibyte
25599         locales, but I assume these hosts are rare.
25600
25601 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25602
25603         * lib/mbswidth.c (_XOPEN_SOURCE):
25604         Don't define; this causes problems on Solaris 7.
25605         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25606
25607 2000-07-23  Jim Meyering  <meyering@lucent.com>
25608
25609         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25610         too: getgrgid, getpwuid, getuid.
25611
25612 2000-07-23  Jim Meyering  <meyering@lucent.com>
25613
25614         * lib/basename.c (base_name): Add an assertion.
25615
25616 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25617
25618         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25619         shadow its mbsinit function.
25620
25621 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25622
25623         * lib/mbswidth.h: New file.
25624         * lib/mbswidth.c: New file.
25625         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25626         (noinst_HEADERS): Add mbswidth.h.
25627
25628 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25629
25630         * lib/config.charset: Add support for FreeBSD. Improve support for
25631         HP-UX and IRIX 6.
25632
25633 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25634
25635         * m4/mbswidth.m4: New file.
25636         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25637
25638 2000-07-15  Jim Meyering  <meyering@lucent.com>
25639
25640         * lib/makepath.c: Include quote.h.
25641         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25642         corresponding argument in a `quote (...)' call.
25643         Give better diagnostics.
25644
25645         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25646         (noinst_HEADERS): Add quote.h.
25647
25648         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25649         from tar's src/misc.c.
25650         * lib/quote.h: New file.  Prototypes for same.
25651
25652 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25653
25654         From a suggestion by Bruno Haible.
25655         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25656         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25657         to decide whether to define the BeOS workaround macro;
25658         this adjusts to the change to AC_MBSTATE_T.
25659
25660 2000-07-14  Jim Meyering  <meyering@lucent.com>
25661
25662         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25663         jm_AC_TYPE_UINTMAX_T.
25664
25665 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25666
25667         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25668
25669         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25670         quotearg_buffer_restyled): Add support for
25671         clocale_quoting_style.  Undo previous change to
25672         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25673         and "{RIGHT QUOTATION MARK}" msgids.
25674
25675 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25676
25677         From a suggestion by Bruno Haible.
25678         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25679         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25680         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25681         and mbstate_t, to a single-part test that simply defines mbstate_t.
25682         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25683         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25684
25685 2000-07-10  Jim Meyering  <meyering@lucent.com>
25686
25687         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25688
25689         * m4/gnu-source.m4: Output to confdefs.h directly.
25690         Suggestion from Akim Demaille.
25691
25692 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25693
25694         The old behavior of quoting `like this' doesn't look good with
25695         newer, ISO-style fonts.  See:
25696         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25697
25698         Instead, quote "like this" by default.  Let the translator
25699         tailor the locale-specific quoting behavior by providing
25700         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25701
25702         * lib/quotearg.c (N_): New macro.
25703         (gettext_default): New function.
25704         (quotearg_buffer_restyled): Use
25705         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25706         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25707
25708 2000-07-09  Jim Meyering  <meyering@lucent.com>
25709
25710         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25711         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25712
25713         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25714         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25715
25716 2000-07-09  Jim Meyering  <meyering@lucent.com>
25717
25718         * lib/Most files: Update copyright dates to include 2000.
25719
25720 2000-07-08  Jim Meyering  <meyering@lucent.com>
25721
25722         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25723         if not defined.
25724         (xgethostname): Remove now-unnecessary #ifdef.
25725         Move declaration of `err' into loop where it's used.
25726
25727 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25728         and Bruno Haible  <haible@clisp.cons.org>
25729
25730         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25731         only if the test for an object-type mbstate_t fails.  This
25732         prevents us from mistakenly reporting that mbstate_t is a
25733         system object type after we "#define mbstate_t int" to work
25734         around its lack.
25735
25736 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25737         and Bruno Haible  <haible@clisp.cons.org>
25738
25739         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25740
25741 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25742
25743         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25744         to strerror_r.
25745         Include <ctype.h> for use of isalpha.
25746
25747 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25748
25749         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25750         by allocating a larger buffer. Test the gethostname return value for
25751         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25752         returns an error and ENAMETOOLONG isn't defined.
25753
25754 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25755
25756         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25757         dimension.
25758
25759 2000-07-04  Jim Meyering  <meyering@lucent.com>
25760
25761         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25762         of the deprecated AC_CHECKING.
25763
25764 2000-07-04  Jim Meyering  <meyering@lucent.com>
25765
25766         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25767         Reported by Bruno Haible.
25768
25769 2000-07-04  Jim Meyering  <meyering@lucent.com>
25770
25771         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25772         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25773         lacks mbrtowc.
25774
25775 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25776
25777         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25778         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25779
25780 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25781         and Bruno Haible  <haible@clisp.cons.org>
25782
25783         * lib/quotearg.c (mbrtowc):
25784         Assign to *pwc, and return 1 only if result is nonzero.
25785         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25786
25787 2000-07-03  Jim Meyering  <meyering@lucent.com>
25788
25789         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25790
25791 2000-07-03  Jim Meyering  <meyering@lucent.com>
25792
25793         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25794         This is necessary to get a definition of e.g., UTMP_FILE on
25795         HP-UX 10.20.
25796         From Bob Proulx.
25797
25798 2000-07-02  Jim Meyering  <meyering@lucent.com>
25799
25800         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25801
25802         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25803         AC_LIBOBJ(function_name).
25804         * m4/chown.m4: Likewise.
25805         * m4/fnmatch.m4: Likewise.
25806         * m4/ftruncate.m4: Likewise.
25807         * m4/getgroups.m4: Likewise.
25808         * m4/getline.m4: Likewise.
25809         * m4/group-member.m4: Likewise.
25810         * m4/jm-macros.m4: Likewise.
25811         * m4/lstat.m4: Likewise.
25812         * m4/malloc.m4: Likewise.
25813         * m4/memcmp.m4: Likewise.
25814         * m4/nanosleep.m4: Likewise.
25815         * m4/putenv.m4: Likewise.
25816         * m4/realloc.m4: Likewise.
25817         * m4/regex.m4: Likewise.
25818         * m4/stat.m4: Likewise.
25819         * m4/strftime.m4: Likewise.
25820
25821 2000-07-02  Jim Meyering  <meyering@lucent.com>
25822
25823         * lib/quotearg.c (mbstate_t): Don't define here.
25824
25825 2000-07-02  Jim Meyering  <meyering@lucent.com>
25826
25827         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25828
25829 2000-07-01  Jim Meyering  <meyering@lucent.com>
25830
25831         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25832
25833 2000-07-01  Jim Meyering  <meyering@lucent.com>
25834
25835         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25836         problem.
25837
25838 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25839
25840         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25841         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25842
25843 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25844
25845         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25846         per change in ../m4/ls-mntd-fs.m4.
25847         (read_filesystem_list): Ignore symbolic links.
25848
25849 2000-06-29  Jim Meyering  <meyering@lucent.com>
25850
25851         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25852         for declaration of strcmp.
25853
25854         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25855
25856         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25857         Avoid warning by casting result to `char *' to remove `const'.
25858
25859 2000-06-28  Jim Meyering  <meyering@lucent.com>
25860
25861         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25862         included by quotearg.c, for which we perform this test.  From
25863         Bruno Haible.
25864
25865 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25866
25867         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25868         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25869         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25870
25871 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25872
25873         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25874
25875 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25876
25877         savedir now sets errno on failure and invokes xmalloc to get memory.
25878         Fix a couple of other minor bugs while we're at it.
25879
25880         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25881         (NAMLEN): Remove macro.
25882         (malloc, realloc): Remove decls.
25883         (stpcpy): Likewise.
25884         ("xalloc.h"): Include.
25885         (NAME_SIZE_DEFAULT): New macro.
25886         (savedir): Use xmalloc / xrealloc to allocate memory.
25887         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25888         Skip "" directory entries.
25889         Use strlen to calculate directory entry length, since the old method
25890         is rarely used these days and isn't worth supporting.
25891         Don't use a pointer after freeing it.
25892         Check for integer overflow when calculating allocation size.
25893         Use memcpy to copy entries, instead of stpcpy.
25894         Set errno properly when returning NULL.
25895         Check for readdir error.
25896
25897 2000-06-26  Jim Meyering  <meyering@lucent.com>
25898
25899         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25900
25901 2000-06-25  Jim Meyering  <meyering@lucent.com>
25902
25903         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25904         Linux header bug when _XOPEN_SOURCE is defined to 500.
25905
25906 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25907
25908         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25909         deficiency.
25910
25911 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25912
25913         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
25914         Include xalloc.h.
25915         Don't include <stdlib.h>.  Don't declare malloc, realloc.
25916
25917 2000-06-24  Jim Meyering  <meyering@lucent.com>
25918
25919         * m4/strerror_r.m4: Revive this file -- to try out an experimental
25920         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
25921         for which strerror does return char*, but which lacks a conveniently
25922         accessible declaration of the function.  If the compile-test says
25923         strerror_r doesn't work, then resort to a `run'-test that works on
25924         BeOS and segfaults on DEC Unix.
25925
25926 2000-06-24  Jim Meyering  <meyering@lucent.com>
25927
25928         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
25929
25930 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25931
25932         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
25933         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
25934
25935 2000-06-23  Paul Eggert  <eggert@twinsun.com>
25936
25937         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
25938         (mbrtowc, mbstate_t): Define substitutes if
25939         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
25940         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
25941         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
25942
25943 2000-06-23  Jim Meyering  <meyering@lucent.com>
25944
25945         * m4/afs.m4: Add missing AC_MSG_RESULT.
25946         Reported by Bruno Haible.
25947
25948         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
25949         Suggestion from Bruno Haible.
25950
25951 2000-06-23  Jim Meyering  <meyering@lucent.com>
25952
25953         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
25954
25955 2000-06-21  Jim Meyering  <meyering@lucent.com>
25956
25957         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
25958
25959 2000-06-21  Jim Meyering  <meyering@lucent.com>
25960
25961         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
25962         (noinst_HEADERS): Add getstr.h.
25963
25964         * lib/getline.c (getstr): Move into a separate file.
25965         * lib/getstr.c (getstr): New file, extracted from getline.c, with
25966         the following changes: new parameter, delim2; both delim[12]
25967         parameters have type `int', not `char'.  The latter would lose
25968         with 8-bit delimiters.
25969         * lib/getstr.h: New file.
25970
25971 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25972
25973         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25974         than 1024, return a memory chunk of least possible size, instead
25975         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25976         Use free/xmalloc instead of xrealloc to avoid copying for very long
25977         paths.
25978
25979 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25980
25981         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25982         the empty string.
25983
25984 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25985
25986         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25987         address, not strdup.  Include <stdlib.h> and don't declare free().
25988
25989 2000-06-19  Jim Meyering  <meyering@lucent.com>
25990
25991         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25992
25993 2000-06-18  Jim Meyering  <meyering@lucent.com>
25994
25995         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25996
25997         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25998         `checking whether...' message to be consistent with that of the
25999         lstat test.
26000
26001 2000-06-18  Jim Meyering  <meyering@lucent.com>
26002
26003         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
26004         Besides, these days every porting target provides a mkdir function.
26005
26006         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
26007         needed. (this snippet comes from src/system.h).
26008
26009 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
26010
26011         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
26012
26013 2000-06-15  Paul Eggert  <eggert@twinsun.com>
26014
26015         * lib/human.c (adjust_value): New function.
26016         (human_readable_inexact): Apply rounding style even when
26017         printing approximate values.
26018
26019 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26020
26021         * lib/human.c (human_readable_inexact): Allow an input block
26022         size that is not a multiple of the output block size, and vice versa.
26023         Reported by Piergiorgio Sartor.
26024
26025 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26026
26027         * lib/getdate.y (get_date): Apply relative times after time
26028         zone indicator, not before.  Reported by Todd A. Jacobs.
26029
26030 2000-06-13  Jim Meyering  <meyering@lucent.com>
26031
26032         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
26033
26034         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
26035
26036 2000-06-12  Paul Eggert  <eggert@twinsun.com>
26037
26038         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
26039
26040 2000-06-12  Jim Meyering  <meyering@lucent.com>
26041
26042         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
26043         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
26044         optional argument.
26045         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
26046         the optional argument, `lib'.
26047
26048 2000-06-08  Jim Meyering  <meyering@lucent.com>
26049
26050         * m4/largefile.m4: Remove file (now that it's part of autoconf).
26051
26052 2000-06-04  Paul Eggert  <eggert@twinsun.com>