Define ENABLE_RELOCATABLE also for libraries.
[gnulib.git] / ChangeLog
1 2007-03-03  Bruno Haible  <bruno@clisp.org>
2
3         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
4         ENABLE_RELOCATABLE here.
5         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
6
7 2007-03-03  Bruno Haible  <bruno@clisp.org>
8
9         * modules/rbtreehash-list-tests (Depends-on): Add progname.
10         * tests/test-rbtreehash_list.c: Include progname.h.
11         (main): Call set_program_name.
12
13         * modules/rbtree-oset-tests (Depends-on): Add progname.
14         * tests/test-rbtree_oset.c: Include progname.h.
15         (main): Call set_program_name.
16
17         * modules/rbtree-list-tests (Depends-on): Add progname.
18         * tests/test-rbtree_list.c: Include progname.h.
19         (main): Call set_program_name.
20
21         * modules/linked-list-tests (Depends-on): Add progname.
22         * tests/test-linked_list.c: Include progname.h.
23         (main): Call set_program_name.
24
25 2007-03-03  Bruno Haible  <bruno@clisp.org>
26
27         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
28         All uses of __restrict changed to _Restrict_.
29         * lib/glob_.h (__restrict): Remove macro.
30
31 2007-03-02  Bruno Haible  <bruno@clisp.org>
32
33         * modules/gettext (configure.ac): Require gettext infrastructure
34         from version 0.16.1.
35
36 2007-03-02  Bruno Haible  <bruno@clisp.org>
37
38         * modules/linkedhash-list-tests (Depends-on): Add progname.
39         * tests/test-linkedhash_list.c: Include progname.h.
40         (main): Call set_program_name.
41
42         * modules/carray-list-tests (Depends-on): Add progname.
43         * tests/test-carray_list.c: Include progname.h.
44         (main): Call set_program_name.
45
46         * modules/avltreehash-list-tests (Depends-on): Add progname.
47         * tests/test-avltreehash_list.c: Include progname.h.
48         (main): Call set_program_name.
49
50         * modules/avltree-oset-tests (Depends-on): Add progname.
51         * tests/test-avltree_oset.c: Include progname.h.
52         (main): Call set_program_name.
53
54         * modules/avltree-list-tests (Depends-on): Add progname.
55         * tests/test-avltree_list.c: Include progname.h.
56         (main): Call set_program_name.
57
58         * modules/array-oset-tests (Depends-on): Add progname.
59         * tests/test-array_oset.c: Include progname.h.
60         (main): Call set_program_name.
61
62         * modules/array-list-tests (Depends-on): Add progname.
63         * tests/test-array_list.c: Include progname.h.
64         (main): Call set_program_name.
65
66         * modules/argp-tests (Depends-on): Add progname.
67         * tests/test-argp.c: Include argp.h first. Include progname.h.
68         (main): Call set_program_name.
69
70 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
71
72         * doc/gnulib-tool.texi (Initial import): Reword description of
73         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
74         limited effect even if defined after the first system include.
75
76 2007-03-01  Bruno Haible  <bruno@clisp.org>
77
78         * build-aux/config.libpath: Update to libtool-1.5.22.
79         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
80
81 2007-03-01  Bruno Haible  <bruno@clisp.org>
82
83         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
84         foo_CFLAGS.
85         Reported by Ralf Wildenhues.
86
87 2007-03-01  Bruno Haible  <bruno@clisp.org>
88
89         * build-aux/install-reloc: Remove object files left over by some
90         compilers.
91         Reported by Ralf Wildenhues.
92
93 2007-03-01  Bruno Haible  <bruno@clisp.org>
94
95         * build-aux/install-reloc: Break long lines.
96
97 2007-03-01  Bruno Haible  <bruno@clisp.org>
98
99         * doc/relocatable.texi: Document that it may not work on OpenBSD.
100         Reported by Ralf Wildenhues.
101
102 2007-03-01  Bruno Haible  <bruno@clisp.org>
103
104         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
105         include ordering constraints.
106
107 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
108
109         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
110         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
111         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
112         as another example.
113         * lib/time_.h: Fix misspelling.
114         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
115         Require gl_HEADER_TIME_H_DEFAULTS.
116         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
117         * m4/time_r.m4 (gl_TIME_R): Likewise.
118         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
119
120 2007-03-01  Bruno Haible  <bruno@clisp.org>
121
122         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
123         * m4/utimens.m4 (gl_UTIMENS): Likewise.
124
125 2007-03-01  Jim Meyering  <jim@meyering.net>
126
127         * modules/xreadlink (Maintainer): Add my name.
128         * modules/xreadlink-with-size (Depends-on): Alphabetize.
129
130 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
131             Bruno Haible  <bruno@clisp.org>
132
133         * build-aux/install-reloc: Compile also c-ctype.c.
134         * build-aux/relocatable.sh.in: New file.
135         * doc/relocatable.texi: New file.
136         * doc/relocatable-maint.texi: New file.
137         * doc/gnulib.texi: Include relocatable-maint.texi.
138         * lib/progreloc.c: Include unistd.h unconditionally.
139         * lib/relocwrapper.c: Include unistd.h unconditionally.
140         Include c-ctype.h.
141         (add_dotbin): Use c_tolower.
142         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
143         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
144         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
145         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
146         to m4/relocatable-lib.m4.
147         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
148         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
149         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
150         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
151         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
152         * modules/relocatable: New file.
153         * modules/relocatable-lib: New file.
154         * modules/relocatable-script: New file.
155
156 2007-02-28  Bruno Haible  <bruno@clisp.org>
157
158         Import --enable-relocatable infrastructure.
159         * build-aux/config.libpath: New file, from GNU gettext.
160         * build-aux/install-reloc: New file, from GNU gettext.
161         * build-aux/reloc-ldflags: New file, from GNU gettext.
162         * lib/relocatable.h: New file, from GNU gettext.
163         * lib/relocatable.c: New file, from GNU gettext.
164         * lib/relocwrapper.c: New file, from GNU gettext.
165         * m4/relocatable.m4: New file, from GNU gettext.
166
167 2007-02-28  Bruno Haible  <bruno@clisp.org>
168
169         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
170
171         * modules/xreadlink: New file, from GNU gettext with modifications.
172         * lib/xreadlink.c: New file, from GNU gettext.
173         * lib/xreadlink.h: Add comments.
174         (xreadlink): New declaration.
175
176         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
177         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
178         lib/xreadlink-with-size.c.
179         (configure.ac): Remove gl_XREADLINK invocation.
180         (Makefile.am): Augment lib_SOURCES.
181         * m4/xreadlink.m4: Remove file.
182         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
183         (xreadlink_with_size): Renamed from xreadink.
184         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
185         * modules/canonicalize (Depends-on): Replace xreadlink with
186         xreadlink-with-size.
187         * lib/canonicalize.c (canonicalize_filename_mode): Update.
188
189 2007-02-25  Jim Meyering  <jim@meyering.net>
190
191         * build-aux/announce-gen: When complaining about excess arguments,
192         list them.
193
194 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
195
196         * README: Document signed integer overflow situation more
197         accurately.
198
199 2007-02-25  Bruno Haible  <bruno@clisp.org>
200
201         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
202         'a' or 'A' conversion.
203
204 2007-02-25  Bruno Haible  <bruno@clisp.org>
205
206         * modules/filename: Renamed from modules/pathname.
207         (Files): Replace lib/pathname.h with lib/filename.h. Replace
208         lib/concatpath.c with lib/concat-filename.c.
209         (Makefile.am): Update.
210         (Include): Replace pathname.h with filename.h.
211         * lib/filename.h: Renamed from lib/pathname.h.
212         (concatenated_filename): Renamed from concatenated_pathname.
213         * lib/concat-filename.c: Renamed from lib/concatpath.c.
214         (concatenated_filename): Renamed from concatenated_pathname.
215         * lib/findprog.c: Include filename.h instead of pathname.h.
216         (find_in_path): Update.
217         * lib/javacomp.c: Include filename.h instead of pathname.h.
218         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
219         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
220         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
221         is_oldgcj_14_13_usable, is_javac_usable): Update.
222         * lib/javaexec.c: Include filename.h instead of pathname.h.
223         (execute_java_class): Update.
224         * modules/findprog: Update.
225         * modules/javacomp: Update.
226         * modules/javaexec: Update.
227         * MODULES.html.sh (File system functions): Add 'filename', remove
228         'pathname'.
229
230 2007-02-25  Bruno Haible  <bruno@clisp.org>
231
232         * modules/printf-frexpl-tests: New file.
233         * tests/test-printf-frexpl.c: New file.
234
235         * modules/printf-frexpl: New file.
236         * lib/printf-frexpl.h: New file.
237         * lib/printf-frexpl.c: New file.
238         * m4/printf-frexpl.m4: New file.
239
240 2007-02-25  Bruno Haible  <bruno@clisp.org>
241
242         * modules/printf-frexp-tests: New file.
243         * tests/test-printf-frexp.c: New file.
244
245         * modules/printf-frexp: New file.
246         * lib/printf-frexp.h: New file.
247         * lib/printf-frexp.c: New file.
248         * m4/printf-frexp.m4: New file.
249
250 2007-02-25  Bruno Haible  <bruno@clisp.org>
251
252         Assume automake >= 1.10 for the tests.
253         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
254         * modules/arctwo-tests: Likewise.
255         * modules/argp-tests: Likewise.
256         * modules/avltree-list-tests: Likewise.
257         * modules/avltree-oset-tests: Likewise.
258         * modules/avltreehash-list-tests: Likewise.
259         * modules/carray-list-tests: Likewise.
260         * modules/crc-tests: Likewise.
261         * modules/des-tests: Likewise.
262         * modules/gc-arcfour-tests: Likewise.
263         * modules/gc-arctwo-tests: Likewise.
264         * modules/gc-des-tests: Likewise.
265         * modules/gc-hmac-md5-tests: Likewise.
266         * modules/gc-hmac-sha1-tests: Likewise.
267         * modules/gc-md2-tests: Likewise.
268         * modules/gc-md4-tests: Likewise.
269         * modules/gc-md5-tests: Likewise.
270         * modules/gc-pbkdf2-sha1-tests: Likewise.
271         * modules/gc-rijndael-tests: Likewise.
272         * modules/gc-sha1-tests: Likewise.
273         * modules/gc-tests: Likewise.
274         * modules/getaddrinfo-tests: Likewise.
275         * modules/hmac-md5-tests: Likewise.
276         * modules/hmac-sha1-tests: Likewise.
277         * modules/linked-list-tests: Likewise.
278         * modules/linkedhash-list-tests: Likewise.
279         * modules/lock-tests: Likewise.
280         * modules/md2-tests: Likewise.
281         * modules/md4-tests: Likewise.
282         * modules/md5-tests: Likewise.
283         * modules/rbtree-list-tests: Likewise.
284         * modules/rbtree-oset-tests: Likewise.
285         * modules/rbtreehash-list-tests: Likewise.
286         * modules/read-file-tests: Likewise.
287         * modules/rijndael-tests: Likewise.
288         * modules/stdint-tests: Likewise.
289         * modules/tls-tests: Likewise.
290
291 2007-02-24  Bruno Haible  <bruno@clisp.org>
292
293         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
294         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
295         function; instead check whether isnan with a double argument links.
296         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
297         function; instead check whether isnan with a 'long double' argument
298         links.
299         Reported by Eric Blake <ebb9@byu.net>.
300
301 2007-02-24  Bruno Haible  <bruno@clisp.org>
302
303         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
304         defined.
305         * lib/isnanl.c: Remove all code. Just include isnan.c.
306         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
307
308 2007-02-25  Jim Meyering  <jim@meyering.net>
309
310         Avoid conflicting types for 'unsetenv' on FreeBSD.
311         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
312         conflicting with FreeBSD's (5.0 and 6.1) function declaration
313         in stdlib.h.
314
315 2007-02-24  Bruno Haible  <bruno@clisp.org>
316
317         * modules/isnanl-nolibm-tests: New file.
318         * tests/test-isnanl.c: New file.
319
320         * modules/isnanl-nolibm: New file.
321         * lib/isnanl.h: New file.
322         * lib/isnanl.c: New file.
323         * m4/isnanl.m4: New file.
324
325 2007-02-24  Bruno Haible  <bruno@clisp.org>
326
327         * modules/isnan-nolibm-tests: New file.
328         * tests/test-isnan.c: New file.
329
330         * modules/isnan-nolibm: New file.
331         * lib/isnan.h: New file.
332         * lib/isnan.c: New file.
333         * m4/isnan.m4: New file.
334
335 2007-02-24  Bruno Haible  <bruno@clisp.org>
336
337         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
338         assume that an exponent fits in 20 bits.
339
340 2007-02-24  Jim Meyering  <jim@meyering.net>
341
342         * m4/regex.m4: Update the description of the configure-time option,
343         --without-included-regex, to state accurately what the defaults are,
344         and perhaps to give people an idea why using this option is risky.
345
346 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
347
348         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
349         loops on small arguments.  This attempts to avoid the problem
350         Bruno Haible reported for AIX 4.3.2 in
351         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
352
353 2007-02-23  Bruno Haible  <bruno@clisp.org>
354
355         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
356         Needed for help2man.
357
358 2007-02-23  Karl Berry  <karl@gnu.org>
359
360         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
361         exists, foo.h should be cvs-ignored, not committed.
362
363 2007-02-23  Eric Blake  <ebb9@byu.net>
364
365         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
366         * lib/stat-time.h (includes): Likewise.
367         * lib/utimecmp.c (includes): Likewise.
368         * lib/utimens.h (includes): Likewise.
369         * lib/getdate.y (includes): Also include "timespec.h" for use
370         internal to the module.
371         * modules/utimens (Depends-on): Revert yesterday's patch.
372         * modules/nanosleep (Depends-on): Add missing dependency.
373
374 2007-02-22  Bruno Haible  <bruno@clisp.org>
375
376         * lib/glob.c: Don't include getlogin_r.h.
377
378 2007-02-22  Jim Meyering  <jim@meyering.net>
379
380         * modules/utimens (Depends-on): Add timespec, required for
381         utimens.h's inclusion of timespec.h.
382
383 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
384
385         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
386         long unreadable paths in GNU/Linux.  Problem reported by Andreas
387         Schwab in
388         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
389         I'll try to think of a better way to fix the Solaris problem.
390
391         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
392         like glibc; on Solaris 10, it fails with errno == EINVAL.
393         POSIX says the behavior is unspecified if the first argument is NULL,
394         so play it safe and never pass NULL to the system getcwd.
395
396 2007-02-21  Jim Meyering  <jim@meyering.net>
397
398         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
399         of gettimeofday.  It would conflict with the one now always
400         provided via sys_time_.h.  Reported by Matthew Woehlke, as
401         an IRIX 6.5 build failure.
402
403 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
404
405         Minor fixups to port to Solaris 10 with Sun C 5.8.
406         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
407         * modules/getcwd (Depends-on): Add dirfd.
408         * lib/putenv.c (putenv): #undef it.
409         (rpl_putenv): New decl.
410         (malloc, free): Include <stdlib.h> rather than prototyping separately.
411
412 2007-02-20  Bruno Haible  <bruno@clisp.org>
413
414         * modules/stdio-tests: New file.
415         * tests/test-stdio.c: New file.
416
417         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
418         (Depends-on): Add stdio.
419         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
420         (Include): Use <stdio.h> instead of vsnprintf.h.
421         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
422         HAVE_DECL_VSNPRINTF.
423         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
424
425         * modules/snprintf (Files): Remove lib/snprintf.h.
426         (Depends-on): Add stdio.
427         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
428         (Include): Use <stdio.h> instead of snprintf.h.
429         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
430         HAVE_DECL_SNPRINTF.
431         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
432         * lib/getaddrinfo.c: Likewise.
433
434         * modules/stdio: New file.
435         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
436         * lib/snprintf.h: Remove file.
437         * lib/vsnprintf.h: Remove file.
438         * lib/.cppi-disable: Remove snprintf.h.
439         * m4/stdio_h.m4: New file.
440         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
441
442 2007-02-20  Jim Meyering  <jim@meyering.net>
443
444         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
445         used by e.g., mingw.  From Bruno Haible.
446
447 2007-02-19  Bruno Haible  <bruno@clisp.org>
448
449         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
450         warnings.
451         Reported by Ben Pfaff <blp@cs.stanford.edu>.
452
453 2007-02-19  Bruno Haible  <bruno@clisp.org>
454
455         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
456         from mingw users.
457
458 2007-02-19  Bruno Haible  <bruno@clisp.org>
459
460         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
461         warnings.
462         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
463
464 2007-02-19  Jim Meyering  <jim@meyering.net>
465
466         Don't use FD after a successful "fdopendir (fd)".
467         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
468         Reset it by calling dirfd on the just-obtained DIR*.
469
470         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
471         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
472
473 2007-02-18  Bruno Haible  <bruno@clisp.org>
474
475         * lib/readlink.c: Include <unistd.h>.
476         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
477         HAVE_READLINK.
478         * modules/readlink (Depends-on): Add unistd.
479         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
480         (Include): Add <unistd.h>.
481
482         * lib/getlogin_r.h: Remove file.
483         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
484         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
485         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
486         HAVE_DECL_GETLOGIN_R.
487         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
488         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
489         (Include): Use <unistd.h> instead of getlogin_r.h.
490
491         * lib/getcwd.h: Remove file.
492         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
493         * lib/xgetcwd.c: Likewise.
494         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
495         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
496         * modules/getcwd (Files): Remove lib/getcwd.h.
497         (Depends-on): Add unistd.
498         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
499         (Include): Use <unistd.h> instad of getcwd.h.
500
501         * lib/ftruncate.c: Include <unistd.h> first.
502         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
503         Set HAVE_FTRUNCATE.
504         * modules/ftruncate (Depends-on): Add unistd.
505         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
506
507         * lib/fchdir.c: Include <unistd.h> first.
508         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
509         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
510         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
511         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
512         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
513
514         * lib/dup2.c: Include <unistd.h> first.
515         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
516         HAVE_DUP2.
517         * modules/dup2 (Depends-on): Add unistd.
518         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
519
520         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
521         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
522         REPLACE_CHOWN. Don't define chown as a macro here.
523         * modules/chown (Depends-on): Add unistd.
524         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
525
526         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
527         Add definition for GL_LINK_WARNING.
528         (chown, dup2): New declarations.
529         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
530         link warning.
531         (ftruncate): New declaration.
532         (getcwd): New declaration, taken from old getcwd.h.
533         (getlogin_r): New declaration, taken from old getlogin_r.h.
534         (readlink): New declaration.
535         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
536         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
537         (gl_PREREQ_UNISTD): Remove macro.
538         (gl_UNISTD_MODULE_INDICATOR): New macro.
539         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
540         many new variables. Don't set UNISTD_H.
541         * modules/unistd (Description): Change.
542         (Depends-on): Add link-warning.
543         (configure.ac): Update.
544         (Makefile.am): Create unistd.h always. Substitute many new variables
545         into it.
546
547 2007-02-18  Bruno Haible  <bruno@clisp.org>
548
549         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
550         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
551         HAVE_GETSUBOPT.
552         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
553         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
554         * lib/getsubopt.h: Remove file.
555         * modules/getsubopt (Files): Remove lib/getsubopt.h.
556         (Depends-on): Add stdlib.
557         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
558         (Includes): Use <stdlib.h> instead of getsubopt.h.
559         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
560         Set HAVE_GETSUBOPT.
561         * lib/getsubopt.c: Don't include getsubopt.h.
562
563 2007-02-18  Bruno Haible  <bruno@clisp.org>
564
565         * modules/fchdir (Depends-on): Add dup2.
566
567 2007-02-18  Bruno Haible  <bruno@clisp.org>
568
569         * lib/stdlib_.h: Handle glibc's special invocation convention
570         specially.
571
572 2007-02-18  Bruno Haible  <bruno@clisp.org>
573
574         * modules/stdlib-tests: New file.
575         * tests/test-stdlib.c: New file.
576
577         * modules/mkstemp (Files): Remove lib/mkstemp.h.
578         (Depends-on): Add stdlib.
579         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
580         (Includes): Use <stdlib.h> instead of mkstemp.h.
581         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
582         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
583         * lib/mkstemp.c: Don't include mkstemp.h.
584         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
585         * lib/stdlib--.h: Don't include mkstemp.h.
586
587         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
588         (Depends-on): Add stdlib.
589         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
590         (Includes): Use <stdlib.h> instead of mkdtemp.h.
591         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
592         HAVE_MKDTEMP.
593         * lib/mkdtemp.c: Don't include mkdtemp.h.
594         * lib/clean-temp.c: Don't include mkdtemp.h.
595
596         * modules/exit (Files): Remove lib/exit.h.
597         (Depends-on): Add stdlib.
598         (Makefile.am): Remove lib_SOURCES.
599         (Include): Use <stdlib.h> instead of exit.h.
600         * lib/argmatch.c: Don't include exit.h.
601         * lib/execute.c: Likewise.
602         * lib/pagealign_alloc.c: Likewise.
603         * lib/pipe.c: Likewise.
604         * lib/wait-process.c: Likewise.
605         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
606         * lib/exitfail.c: Likewise.
607         * lib/savewd.c: Likewise.
608         * lib/xsetenv.c: Likewise.
609
610         * modules/stdlib: New file.
611         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
612         and extra comments about mkstemp().
613         * lib/exit.h: Remove file.
614         * lib/mkdtemp.h: Remove file.
615         * lib/mkstemp.h: Remove file.
616         * m4/stdlib_h.m4: New file.
617         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
618
619 2007-02-18  Bruno Haible  <bruno@clisp.org>
620
621         * modules/math-tests: New file.
622         * tests/test-math.c: New file.
623
624         * modules/math: New file.
625         * modules/mathl (Files): Remove lib/mathl.h.
626         (Depends-on): Add math.
627         (Makefile.am): Don't mention mathl.h.
628         (Include): Use <math.h> instead of mathl.h.
629         * lib/math_.h: New file.
630         * lib/mathl.h: Remove file.
631         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
632         mathl.h.
633         * lib/asinl.c: Likewise.
634         * lib/atanl.c: Likewise.
635         * lib/ceill.c: Likewise.
636         * lib/cosl.c: Likewise.
637         * lib/expl.c: Likewise.
638         * lib/floorl.c: Likewise.
639         * lib/frexpl.c: Likewise.
640         * lib/ldexpl.c: Likewise.
641         * lib/logl.c: Likewise.
642         * lib/sincosl.c: Likewise.
643         * lib/sinl.c: Likewise.
644         * lib/sqrtl.c: Likewise.
645         * lib/tanl.c: Likewise.
646         * lib/trigl.c: Likewise.
647         * m4/math_h.m4: New file.
648         * MODULES.html.sh (Mathematics): Add math.
649
650 2007-02-17  Bruno Haible  <bruno@clisp.org>
651
652         * modules/wctype-tests: New file.
653         * tests/test-wctype.c: New file.
654
655         * modules/wchar-tests: New file.
656         * tests/test-wchar.c: New file.
657
658         * modules/unistd-tests: New file.
659         * tests/test-unistd.c: New file.
660
661         * modules/time-tests: New file.
662         * tests/test-time.c: New file.
663
664         * modules/sysexits-tests: New file.
665         * tests/test-sysexits.c: New file.
666
667         * modules/sys_time-tests: New file.
668         * tests/test-sys_time.c: New file.
669
670         * modules/sys_stat-tests: New file.
671         * tests/test-sys_stat.c: New file.
672
673         * modules/sys_socket-tests: New file.
674         * tests/test-sys_socket.c: New file.
675
676         * modules/sys_select-tests: New file.
677         * tests/test-sys_select.c: New file.
678
679         * modules/string-tests: New file.
680         * tests/test-string.c: New file.
681
682         * modules/stdbool-tests: New file.
683         * tests/test-stdbool.c: New file.
684
685         * modules/netinet_in-tests: New file.
686         * tests/test-netinet_in.c: New file.
687
688         * modules/inttypes-tests: New file.
689         * tests/test-inttypes.c: New file.
690
691         * modules/fcntl-tests: New file.
692         * tests/test-fcntl.c: New file.
693
694         * modules/byteswap-tests: New file.
695         * tests/test-byteswap.c: New file.
696
697         * modules/arpa_inet-tests: New file.
698         * tests/test-arpa_inet.c: New file.
699
700 2007-02-17  Bruno Haible  <bruno@clisp.org>
701
702         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
703         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
704         if the corresponding module is not enabled. Emit link warnings if
705         the function is used nevertheless.
706         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
707         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
708         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
709         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
710         * modules/inttypes (Depends-on): Add link-warning.
711         (Makefile.am): Copy the contents of build-aux/link-warning.h into
712         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
713         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
714         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
715         * modules/imaxdiv (configure.ac): Likewise.
716         * modules/strtoimax (configure.ac): Likewise.
717         * modules/strtoumax (configure.ac): Likewise.
718
719 2007-02-17  Bruno Haible  <bruno@clisp.org>
720
721         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
722         gl_STRING_MODULE_INDICATOR_DEFAULTS.
723         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
724         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
725
726 2007-02-17  Bruno Haible  <bruno@clisp.org>
727
728         * modules/link-warning: New file.
729         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
730         * lib/string_.h (GL_LINK_WARNING): Remove definition.
731         * modules/string (Depends-on): Add link-warning.
732         (Makefile.am): Copy the contents of build-aux/link-warning.h into
733         string.h.
734         * MODULES.html.sh (Support for building libraries and executables): Add
735         link-warning.
736
737 2007-02-17  Bruno Haible  <bruno@clisp.org>
738
739         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
740         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
741         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
742         long lines.
743
744 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
745             Bruno Haible  <bruno@clisp.org>
746
747         * modules/tmpfile: New file.
748         * lib/tmpfile.c: New file.
749         * m4/tmpfile.m4: New file.
750         * MODULES.html.sh (func_all_modules): New section "Input/output".
751
752 2007-02-15  Bruno Haible  <bruno@clisp.org>
753
754         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
755         (supports_delete_on_close): New function.
756         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
757
758 2007-02-14  Bruno Haible  <bruno@clisp.org>
759
760         * modules/mbspcasecmp-tests: New file.
761         * tests/test-mbspcasecmp.sh: New file.
762         * tests/test-mbspcasecmp.c: New file.
763
764         New module mbspcasecmp.
765         * modules/mbspcasecmp: New file.
766         * lib/mbspcasecmp.c: New file.
767         * lib/string_.h (strncasecmp): Change warning message.
768         (mbspcasecmp): New declaration.
769         * m4/mbspcasecmp.m4: New file.
770         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
771         GNULIB_MBSPCASECMP.
772         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
773         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
774
775 2007-02-14  Bruno Haible  <bruno@clisp.org>
776
777         * modules/mbsncasecmp-tests: New file.
778         * tests/test-mbsncasecmp.sh: New file.
779         * tests/test-mbsncasecmp.c: New file.
780
781         New module mbsncasecmp.
782         * modules/mbsncasecmp: New file.
783         * lib/mbsncasecmp.c: New file.
784         * lib/string_.h (mbsncasecmp): New declaration.
785         * m4/mbsncasecmp.m4: New file.
786         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
787         GNULIB_MBSNCASECMP.
788         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
789         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
790
791 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
792
793         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
794         Verify that it doesn't overlap with our flags.
795         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
796         do not have the desired effect in multibyte locales; instead, use
797         mbscasecmp.
798         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
799         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
800         we don't require GNU fnmatch ourselves (if our users require it, they
801         should do so explicitly).
802
803         Fix regex code so it doesn't rely on strcasecmp.
804         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
805         Otherwise, include gnulib's langinfo.h.
806         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
807         undesirable behavior in non-C locales.  Instead, rely on localecharset.
808         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
809         * modules/regex (FILES): Remove m4/codeset.m4.
810         (Depends-on): Add localcharset.  Remove strcase.
811
812 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
813
814         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
815         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
816
817 2007-02-13  Bruno Haible  <bruno@clisp.org>
818
819         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
820         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
821
822 2007-02-12  Bruno Haible  <bruno@clisp.org>
823
824         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
825         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
826         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
827         time warning rather than a link error.
828
829 2007-02-12  Bruno Haible  <bruno@clisp.org>
830
831         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
832         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
833         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
834
835 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
836
837         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
838         args, not 2.
839
840 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
841
842         New module 'time', so that apps can include <time.h> as per
843         POSIX and GNU instead of separate include files like time_r.h
844         and timegm.h.  This implementation tries out a simpler approach
845         for replacing decls in standard include files (as compared to
846         the string module), somewhat as an experiment.
847
848         * config/srclist.txt: Comment out mktime.c for now.
849         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
850         since it doesn't apply any more.  Use generic wording instead.
851         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
852         'time'.
853         * lib/time_.h, m4/time_h.m4, modules/time: New files.
854         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
855         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
856         Don't include <sys/types.h>; no longer needed since we assume C89.
857         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
858         * lib/strftime.c: Likewise.
859         * lib/time_r.c: Likewise.
860         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
861         * lib/nanosleep.c: Include <time.h> first, to check interface.
862         * lib/strptime.c: Likewise.
863         * lib/time_r.c: Likewise.
864         * lib/timegm.c: Likewise.
865         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
866         needed.
867         * lib/timegm.c: Don't include timegm.h; no longer needed.
868         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
869         time.h now handles any problems in that area.
870         (struct timespec, nanosleep): Remove; time.h now arranges for these.
871         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
872         that time.h defines struct timespec.
873         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
874         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
875         handles that.
876         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
877         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
878         needed.  Set REPLACE_LOCALTIME.
879         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
880         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
881         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
882         nanosleep; time_h.m4 now does that.  Don't require
883         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
884         module handles this now.
885         * modules/getdate (Depends-on): Remove timespec.  Add time.
886         * modules/nanosleep (Depends-on): Likewise.
887         * modules/stat-time (Depends-on): Likewise.
888         * modules/nanosleep (Include): Include time.h, not timespec.h.
889         * modules/strptime (Files): Remove lib/strptime.h.
890         (Depends-on): Add extensions, time.
891         (Include): Include time.h, not strptime.h.
892         * modules/time_r (Files): Remove lib/time_r.h.
893         (Depends-on): Add time.
894         (Include): Include time.h, not time_r.h.
895         * modules/timegm: Likewise.
896         * modules/timespec (Description): Now does timespec-related decls
897         of our own, instead of struct timespec itself.
898         (Depends-on): Add time; remove extensions.
899         (Maintainer): Add self.
900         * modules/utimecmp (Depends-on): Add time; remove timespec.
901         * modules/utimens (Depends-on): Likewise.
902         * modules/xnanosleep (Depends-on): Likewise.
903
904 2007-02-11  Bruno Haible  <bruno@clisp.org>
905
906         * lib/c-strstr.c: Include allocsa.h.
907         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
908         * lib/c-strcasestr.c: Include allocsa.h.
909         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
910         * lib/strcasestr.c: Include allocsa.h.
911         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
912         * lib/mbsstr.c: Include allocsa.h.
913         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
914         allocsa/freesa instead of malloc/free.
915         * lib/mbscasestr.c: Include allocsa.h.
916         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
917         allocsa/freesa instead of malloc/free.
918         * modules/c-strstr (Depends-on): Add allocsa.
919         * modules/c-strcasestr (Depends-on): Likewise.
920         * modules/strcasestr (Depends-on): Likewise.
921         * modules/mbsstr (Depends-on): Likewise.
922         * modules/mbscasestr (Depends-on): Likewise.
923
924 2007-02-11  Bruno Haible  <bruno@clisp.org>
925
926         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
927
928         * modules/mbsspn-tests: New file.
929         * tests/test-mbsspn.sh: New file.
930         * tests/test-mbsspn.c: New file.
931
932 2007-02-11  Bruno Haible  <bruno@clisp.org>
933
934         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
935
936         * modules/mbspbrk-tests: New file.
937         * tests/test-mbspbrk.sh: New file.
938         * tests/test-mbspbrk.c: New file.
939
940 2007-02-11  Bruno Haible  <bruno@clisp.org>
941
942         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
943         unneeded cast.
944
945         * modules/mbscspn-tests: New file.
946         * tests/test-mbscspn.sh: New file.
947         * tests/test-mbscspn.c: New file.
948
949 2007-02-11  Bruno Haible  <bruno@clisp.org>
950
951         * modules/mbscasecmp-tests: New file.
952         * tests/test-mbscasecmp.sh: New file.
953         * tests/test-mbscasecmp.c: New file.
954
955 2007-02-11  Bruno Haible  <bruno@clisp.org>
956
957         Ensure O(n) worst-case complexity of mbscasestr.
958         * lib/mbscasestr.c: Include stdbool.h.
959         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
960         functions.
961         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
962         the bookkeeping indicates that it's worth it.
963         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
964
965         * modules/mbscasestr-tests: New file.
966         * tests/test-mbscasestr1.c: New file.
967         * tests/test-mbscasestr2.sh: New file.
968         * tests/test-mbscasestr2.c: New file.
969         * tests/test-mbscasestr3.sh: New file.
970         * tests/test-mbscasestr3.c: New file.
971         * tests/test-mbscasestr4.sh: New file.
972         * tests/test-mbscasestr4.c: New file.
973         * m4/locale-tr.m4: New file.
974
975 2007-02-11  Bruno Haible  <bruno@clisp.org>
976
977         Ensure O(n) worst-case complexity of mbsstr.
978         * lib/mbsstr.c: Include stdbool.h.
979         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
980         functions.
981         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
982         bookkeeping indicates that it's worth it.
983         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
984
985         * modules/mbsstr-tests: New file.
986         * tests/test-mbsstr1.c: New file.
987         * tests/test-mbsstr2.sh: New file.
988         * tests/test-mbsstr2.c: New file.
989         * tests/test-mbsstr3.sh: New file.
990         * tests/test-mbsstr3.c: New file.
991         * m4/locale-fr.m4: New file.
992
993 2007-02-11  Bruno Haible  <bruno@clisp.org>
994
995         * lib/mbsrchr.c (mbsrchr): Fix bug.
996
997         * modules/mbsrchr-tests: New file.
998         * tests/test-mbsrchr.sh: New file.
999         * tests/test-mbsrchr.c: New file.
1000
1001 2007-02-11  Bruno Haible  <bruno@clisp.org>
1002
1003         * lib/mbschr.c (mbschr): Fix bug.
1004
1005         * modules/mbschr-tests: New file.
1006         * tests/test-mbschr.sh: New file.
1007         * tests/test-mbschr.c: New file.
1008         * m4/locale-zh.m4: New file.
1009
1010 2007-02-11  Bruno Haible  <bruno@clisp.org>
1011
1012         Support for copying multibyte string iterators.
1013         * lib/mbiter.h: Include <string.h>.
1014         (mbiter_multi_copy): New function.
1015         (mbi_copy): New macro.
1016         * lib/mbuiter.h: Include <string.h>.
1017         (mbuiter_multi_copy): New function.
1018         (mbui_copy): New macro.
1019
1020 2007-02-11  Bruno Haible  <bruno@clisp.org>
1021
1022         New module mbslen.
1023         * modules/mbslen: New file.
1024         * lib/mbslen.c: New file.
1025         * lib/string_.h (mbslen): New declaration.
1026         * m4/mbslen.m4: New file.
1027         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1028         GNULIB_MBSLEN.
1029         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
1030         * MODULES.html.sh (Internationalization functions): Add mbslen.
1031
1032 2007-02-11  Bruno Haible  <bruno@clisp.org>
1033
1034         Ensure O(n) worst-case complexity of strcasestr substitute.
1035         * lib/strcasestr.c: Include stdbool.h.
1036         (knuth_morris_pratt): New function.
1037         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
1038         bookkeeping indicates that it's worth it.
1039         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
1040
1041         * modules/strcasestr-tests: New file.
1042         * tests/test-strcasestr.c: New file.
1043
1044 2007-02-11  Bruno Haible  <bruno@clisp.org>
1045
1046         Ensure O(n) worst-case complexity of c_strcasestr.
1047         * lib/c-strcasestr.c: Include stdbool.h, string.h.
1048         (knuth_morris_pratt): New function.
1049         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
1050         the bookkeeping indicates that it's worth it.
1051         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
1052
1053         * modules/c-strcasestr-tests: New file.
1054         * tests/test-c-strcasestr.c: New file.
1055
1056 2007-02-11  Bruno Haible  <bruno@clisp.org>
1057
1058         Ensure O(n) worst-case complexity of c_strstr.
1059         * lib/c-strstr.c: Include stdbool.h, string.h.
1060         (knuth_morris_pratt): New function.
1061         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
1062         bookkeeping indicates that it's worth it.
1063         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
1064
1065         * lib/c-strstr.c: Complete rewrite for maintainability.
1066
1067         * modules/c-strstr-tests: New file.
1068         * tests/test-c-strstr.c: New file.
1069
1070 2007-02-11  Bruno Haible  <bruno@clisp.org>
1071
1072         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
1073         5.2.1 and earlier, whereby \055 was treated just like the range
1074         delimiter '-'.
1075         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1076
1077 2007-02-08  Bruno Haible  <bruno@clisp.org>
1078
1079         * modules/regex (Depends-on): Add stdbool.
1080         Reported by Dalibor Topic <robilad@kaffe.org>.
1081
1082 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
1083
1084         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
1085         Prefer returning from main to exiting from it.
1086         Remove unnecessary parens after sizeof.
1087
1088 2007-02-05  Bruno Haible  <bruno@clisp.org>
1089
1090         New module mbssep.
1091         * modules/mbssep: New file.
1092         * lib/mbssep.c: New file.
1093         * lib/string_.h (strsep): Add a conditional link warning.
1094         (mbssep): New declaration.
1095         * m4/mbssep.m4: New file.
1096         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1097         GNULIB_MBSSEP.
1098         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
1099         * MODULES.html.sh (Internationalization functions): Add mbssep.
1100
1101 2007-02-05  Bruno Haible  <bruno@clisp.org>
1102
1103         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
1104         Optimize search in case of 1 delimiter.
1105
1106 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1107
1108         * lib/acl.h: Include sys/types.h before sys/acl.h.
1109
1110 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1111
1112         Merge upstream fix for glibc bugzilla #3957:
1113
1114         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
1115
1116         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
1117         bit for RE_HAT_LISTS_NOT_NEWLINE.
1118         (build_charclass_op): Remove bogus comment.
1119
1120 2007-02-05  Simon Josefsson  <simon@josefsson.org>
1121
1122         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
1123
1124 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1125
1126         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
1127         * lib/memmem.c [!defined _LIBC]: Include config.h.
1128
1129 2007-02-04  Bruno Haible  <bruno@clisp.org>
1130
1131         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
1132         warning message.
1133
1134 2007-02-04  Bruno Haible  <bruno@clisp.org>
1135
1136         New module mbstok_r.
1137         * modules/mbstok_r: New file.
1138         * lib/mbstok_r.c: New file.
1139         * lib/string_.h (strtok_r): Change argument names to match the
1140         comments. Add a conditional link warning.
1141         (mbstok_r): New declaration.
1142         * m4/mbstok_r.m4: New file.
1143         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1144         GNULIB_MBSTOK_R.
1145         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
1146         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
1147
1148 2007-02-04  Bruno Haible  <bruno@clisp.org>
1149
1150         New module mbsspn.
1151         * modules/mbsspn: New file.
1152         * lib/mbsspn.c: New file.
1153         * lib/string_.h (strspn): Add a conditional link warning.
1154         (mbsspn): New declaration.
1155         * m4/mbsspn.m4: New file.
1156         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1157         GNULIB_MBSSPN.
1158         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
1159         * MODULES.html.sh (Internationalization functions): Add mbsspn.
1160
1161 2007-02-04  Bruno Haible  <bruno@clisp.org>
1162
1163         New module mbspbrk.
1164         * modules/mbspbrk: New file.
1165         * lib/mbspbrk.c: New file.
1166         * lib/string_.h (strpbrk): Add a conditional link warning.
1167         (mbspbrk): New declaration.
1168         * m4/mbspbrk.m4: New file.
1169         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1170         GNULIB_MBSPBRK.
1171         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
1172         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
1173
1174 2007-02-04  Bruno Haible  <bruno@clisp.org>
1175
1176         New module mbscspn.
1177         * modules/mbscspn: New file.
1178         * lib/mbscspn.c: New file.
1179         * lib/string_.h (strcspn): Add a conditional link warning.
1180         (mbscspn): New declaration.
1181         * m4/mbscspn.m4: New file.
1182         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1183         GNULIB_MBSCSPN.
1184         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
1185         * MODULES.html.sh (Internationalization functions): Add mbscspn.
1186
1187 2007-02-04  Bruno Haible  <bruno@clisp.org>
1188
1189         New module mbscasestr, reduced goal of strcasestr.
1190         * modules/mbscasestr: New file.
1191         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
1192         (mbscasestr): Renamed from strcasestr.
1193         * lib/strcasestr.c: Don't include mbuiter.h.
1194         (strcasestr): Remove support for multibyte locales.
1195         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
1196         Change the conditional link warning.
1197         (mbscasestr): New declaration.
1198         * m4/mbscasestr.m4: New file.
1199         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
1200         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
1201         REPLACE_STRCASESTR.
1202         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
1203         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
1204         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
1205         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
1206         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
1207         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
1208         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
1209         (Depends-on): Remove mbuiter.
1210         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
1211
1212 2007-02-04  Bruno Haible  <bruno@clisp.org>
1213
1214         Simplify handling of strncasecmp.
1215         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
1216         the conditional link warning.
1217         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
1218         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
1219         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
1220         * modules/strcase (configure.ac): Don't invoke
1221         gl_STRING_MODULE_INDICATOR.
1222         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
1223
1224 2007-02-04  Bruno Haible  <bruno@clisp.org>
1225
1226         New module mbscasecmp, reduced goal of strcasecmp.
1227         * modules/mbscasecmp: New file.
1228         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
1229         (mbscasecmp): Renamed from strcasecmp.
1230         * lib/strcasecmp.c: Don't include mbuiter.h.
1231         (strcasecmp): Remove support for multibyte locales.
1232         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
1233         Change the conditional link warning.
1234         (mbscasecmp): New declaration.
1235         * m4/mbscasecmp.m4: New file.
1236         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
1237         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
1238         REPLACE_STRCASECMP.
1239         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
1240         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1241         GNULIB_MBSCASECMP.
1242         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
1243         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
1244         * modules/strcase (Files): Remove m4/mbrtowc.m4.
1245         (Depends-on): Remove mbuiter.
1246         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
1247
1248 2007-02-04  Bruno Haible  <bruno@clisp.org>
1249
1250         New module mbsstr. Remove module strstr.
1251         * modules/mbsstr: New file.
1252         * modules/strstr: Remove file.
1253         * lib/mbsstr.c: Renamed from lib/strstr.c.
1254         (mbsstr): Renamed from strstr.
1255         * lib/string_.h (strstr): Remove declaration. Change the conditional
1256         link warning.
1257         (mbsstr): New declaration.
1258         * m4/mbsstr.m4: New file.
1259         * m4/strstr.m4: Remove file.
1260         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
1261         REPLACE_STRSTR.
1262         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
1263         Don't initialize GNULIB_STRSTR.
1264         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
1265         substitute GNULIB_STRSTR and REPLACE_STRSTR.
1266         * MODULES.html.sh (Internationalization functions): Add mbsstr.
1267         (Support for systems lacking ANSI C 89): Remove strstr.
1268
1269 2007-02-04  Bruno Haible  <bruno@clisp.org>
1270
1271         New module mbsrchr.
1272         * modules/mbsrchr: New file.
1273         * lib/mbsrchr.c: New file.
1274         * lib/string_.h (strrchr): Add a conditional link warning.
1275         (mbsrchr): New declaration.
1276         * m4/mbsrchr.m4: New file.
1277         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1278         GNULIB_MBSRCHR.
1279         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
1280         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
1281
1282 2007-02-04  Bruno Haible  <bruno@clisp.org>
1283
1284         New module mbschr.
1285         * modules/mbschr: New file.
1286         * lib/mbschr.c: New file.
1287         * lib/string_.h (strchr): Add a conditional link warning.
1288         (mbschr): New declaration.
1289         * m4/mbschr.m4: New file.
1290         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1291         GNULIB_MBSCHR.
1292         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
1293         * MODULES.html.sh (Internationalization functions): Add mbschr.
1294
1295 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1296
1297         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
1298
1299         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
1300
1301 2007-02-04  Bruno Haible  <bruno@clisp.org>
1302
1303         New module description section 'configure.ac-early'.
1304         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
1305         (func_get_autoconf_early_snippet): New function.
1306         (func_import, func_create_testdir): Use it. Remove special cases for
1307         modules 'extensions' and 'lock'.
1308         * modules/extensions (configure.ac-early): Require
1309         gl_USE_SYSTEM_EXTENSIONS.
1310         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
1311
1312 2007-02-04  Bruno Haible  <bruno@clisp.org>
1313
1314         Make use of gcj-4.3's -fsource and -ftarget option.
1315         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
1316         and if so try the options -fsource and -ftarget.
1317         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
1318         source_version, ftarget_option, target_version arguments.
1319         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
1320         (is_envjavac_oldgcj_14_14_usable): Renamed from
1321         is_envjavac_gcj_14_14_usable.
1322         (is_envjavac_oldgcj_14_13_usable): Renamed from
1323         is_envjavac_gcj_14_13_usable.
1324         (is_gcj_present): Update.
1325         (is_gcj_43, is_gcj43_usable): New functions.
1326         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
1327         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
1328         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
1329         try the options -fsource and -ftarget.
1330
1331 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
1332
1333         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
1334         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
1335         larger value.
1336
1337 2007-02-03  Jim Meyering  <jim@meyering.net>
1338
1339         Give tools a better chance to allocate space for very large buffers.
1340         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
1341
1342         Make pwd and readlink work also when run with an unreadable parent dir
1343         on systems with openat support.
1344         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
1345         provided getcwd function, even when we have openat support.
1346         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
1347
1348 2007-02-02  Bruno Haible  <bruno@clisp.org>
1349
1350         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1351         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
1352         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
1353         portability problems if one of these functions is only used on specific
1354         platforms.
1355         Reported by Paul Eggert.
1356
1357 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
1358
1359         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
1360         is causing more trouble than it's curing.
1361         * lib/regex_internal.h (__mempcpy): Remove.
1362         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
1363         (and make the code a tad smaller to boot).
1364         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
1365
1366 2007-02-02  Jim Meyering  <jim@meyering.net>
1367
1368         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
1369         section, not in the Makefile.am: one.
1370
1371 2007-02-02  Eric Blake  <ebb9@byu.net>
1372
1373         * lib/strchrnul.c: Always include config.h first.
1374
1375         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
1376         gnulib strstr is not necessary here.
1377
1378 2007-02-02  Simon Josefsson  <simon@josefsson.org>
1379
1380         * m4/socklen.m4: Fix typo.
1381
1382 2007-02-02  Eric Blake  <ebb9@byu.net>
1383
1384         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
1385         * modules/netinet_in (Makefile.am): Likewise.
1386
1387 2007-02-01  Bruno Haible  <bruno@clisp.org>
1388
1389         * lib/string_.h (GL_LINK_WARNING): New macro.
1390         (strcasecmp, strstr, strcasestr): If provided by the system,
1391         conditionally define as a macro that leads to a warning instead of to
1392         an error.
1393         (strncasecmp): Conditionally define as a macro that leads to a warning.
1394
1395 2007-02-01  Karl Berry  <karl@gnu.org>
1396
1397         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
1398
1399 2007-02-01  Bruno Haible  <bruno@clisp.org>
1400
1401         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
1402         renamings.
1403
1404 2007-02-01  Eric Blake  <ebb9@byu.net>
1405
1406         * modules/regex (Depends-on): Revert dependence on mempcpy.
1407         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
1408         module's definition of mempcpy.
1409         Reported by Paul Eggert.
1410
1411 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
1412
1413         * lib/string_.h: If the gnulib module XYZ is not present, undefine
1414         the symbol XYZ before redefining it.  This fixes a problem with
1415         programs that don't use XYZ, when compiled on systems that define
1416         XYZ to something else.
1417
1418 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
1419
1420         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
1421         occurs when "mkdir -m foo" creates a setgid directory that is (1)
1422         writeable to group or other and (2) is intended to have a special
1423         mode bit that is set or cleared.  In such a case, the directory
1424         should be neither group- nor other-writeable until the special
1425         mode bits are right.
1426
1427 2007-01-31  Eric Blake  <ebb9@byu.net>
1428
1429         * modules/mountlist (Depends-on): Add strstr.
1430
1431         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
1432         bug.
1433         * modules/string (Makefile.am): Remove redundant replacement.
1434         * modules/regex (Depends-on): Add mempcpy.
1435
1436 2007-01-31  Bruno Haible  <bruno@clisp.org>
1437
1438         New module description field 'Link'.
1439         * gnulib-tool (func_usage): Document --extract-link-directive.
1440         (sed_extract_prog): Recognize 'Link' directive.
1441         (func_get_link_directive): New function.
1442         (func_import): Show summary of link directives.
1443         Handle --extract-link-directive option.
1444         * modules/acl (Link): New section.
1445         * modules/clock-time (Link): New section.
1446         * modules/euidaccess (Link): New section.
1447         * modules/gettext (Link): New section.
1448         * modules/iconv (Link): New section.
1449         * modules/lock (Link): New section.
1450         * modules/nanosleep (Link): New section.
1451         * modules/readline (Link): New section.
1452
1453 2007-01-27  Bruno Haible  <bruno@clisp.org>
1454
1455         Enforce the use of gnulib modules for unportable <string.h> functions.
1456         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
1457         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
1458         (gl_HEADER_STRING_H_BODY): Require it.
1459         * lib/string_.h: If the gnulib module XYZ is not present, redefine
1460         the symbol XYZ to one that gives a link error.
1461         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
1462         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
1463         * modules/mempcpy (configure.ac): Likewise.
1464         * modules/memrchr (configure.ac): Likewise.
1465         * modules/stpcpy (configure.ac): Likewise.
1466         * modules/stpncpy (configure.ac): Likewise.
1467         * modules/strcase (configure.ac): Likewise.
1468         * modules/strcasestr (configure.ac): Likewise.
1469         * modules/strchrnul (configure.ac): Likewise.
1470         * modules/strdup (configure.ac): Likewise.
1471         * modules/strndup (configure.ac): Likewise.
1472         * modules/strnlen (configure.ac): Likewise.
1473         * modules/strpbrk (configure.ac): Likewise.
1474         * modules/strsep (configure.ac): Likewise.
1475         * modules/strstr (configure.ac): Likewise.
1476         * modules/strtok_r (configure.ac): Likewise.
1477
1478 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
1479
1480         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
1481
1482 2007-01-30  Jim Meyering  <jim@meyering.net>
1483
1484         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
1485
1486 2007-01-29  Bruno Haible  <bruno@clisp.org>
1487
1488         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
1489         * lib/execute.c: Likewise.
1490         * lib/pipe.c: Likewise.
1491         * lib/printf-args.h: Likewise.
1492         * lib/printf-args.c: Likewise.
1493         * lib/printf-parse.c: Likewise.
1494         * lib/vasnprintf.c: Likewise.
1495
1496 2007-01-29  Eric Blake  <ebb9@byu.net>
1497
1498         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
1499         declaration.
1500
1501 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
1502
1503         * lib/strptime.h (strptime): Use 'restrict' for args where
1504         POSIX requires this.
1505         * lib/strptime.c (strptime): Likewise.
1506         Change license notice from LGPL to GPL, since gnulib-tool will
1507         change this as needed.
1508         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
1509         defined.
1510         Include "strptime.h" first, to check interface.
1511         Do not #undef _LIBC and _NL_CURRENT.
1512         Do not include <stdlib.h>; no longer needed.
1513         Include "time_r.h" and declare ptime_locale_status
1514         only if _LIBC is not defined.
1515         (__P): Remove unused macro.
1516         (match_string): Bring back glibc version, but use it only if _LIBC
1517         is defined.
1518         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
1519         Remove unnecessary assertion and abort() call.
1520         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
1521         * m4/strptime.m4: Fix serial number comment.
1522         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
1523         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
1524         (Depends-on): Add time_r.
1525
1526 2007-01-29  Bruno Haible  <bruno@clisp.org>
1527
1528         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1529         strptime.
1530         * modules/strptime (Depends-on): Add stdbool.
1531         * lib/strptime.h: Include <time.h> always. Add comments.
1532
1533 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
1534
1535         * modules/strptime: New file.
1536         * lib/strptime.h: New file.
1537         * lib/strptime.c: New file.
1538         * m4/strptime.m4: New file.
1539
1540 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1541
1542         * MODULES.html.sh: New module mpsort.
1543         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
1544
1545         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
1546         a circularity problem with HP-UX ia64 reported by Bob Proulx in
1547         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
1548         All uses changed.
1549         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
1550         All uses changed.
1551         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
1552         to _Restrict_.
1553         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
1554         the parameter matches the prototype.
1555
1556 2007-01-28  Jim Meyering  <jim@meyering.net>
1557
1558         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
1559         sys/time.h here, reverting that part of the previous patch:
1560         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
1561
1562 2007-01-28  Bruno Haible  <bruno@clisp.org>
1563
1564         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
1565         value of $(SYS_TIME_H).
1566         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
1567         remove it conditionally, too. [added by Jim Meyering]
1568         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
1569         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1570         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
1571         GETTIMEOFDAY_REPLACEMENT to 1.
1572
1573 2007-01-28  Bruno Haible  <bruno@clisp.org>
1574
1575         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
1576         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
1577         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
1578         Set UNISTD_H instead of UNISTD_H2.
1579         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
1580
1581 2007-01-28  Bruno Haible  <bruno@clisp.org>
1582
1583         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
1584         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
1585
1586 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1587
1588         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
1589         (func_create_testdir): Ensure C locale for `grep' and `tr'
1590         character ranges.
1591         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
1592         ACLOCAL_AMFLAGS parsing state machine.
1593
1594 2007-01-27  Bruno Haible  <bruno@clisp.org>
1595
1596         * modules/unistr/base: Update.
1597
1598 2007-01-27  Bruno Haible  <bruno@clisp.org>
1599
1600         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
1601         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
1602         * modules/unistr/u32-mbtouc-unsafe: Renamed from
1603         modules/unistr/u32-mbtouc.
1604         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
1605         * lib/unistr.h: Update.
1606         * lib/linebreak.c: Update.
1607         * modules/unistr/u32-mbtouc: Renamed from
1608         modules/unistr/u32-mbtouc-safe.
1609         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
1610         * lib/unistr.h: Update.
1611         * lib/unistr/u32-to-u8.c: Update.
1612         * lib/unistr/u32-to-u16.c: Update.
1613
1614 2007-01-27  Bruno Haible  <bruno@clisp.org>
1615
1616         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
1617         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
1618         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
1619         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
1620         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
1621         * modules/unistr/u16-mbtouc-unsafe: Renamed from
1622         modules/unistr/u16-mbtouc.
1623         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
1624         * lib/unistr.h: Update.
1625         * lib/linebreak.c: Update.
1626         * modules/linebreak: Update.
1627         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
1628         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
1629         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
1630         * modules/unistr/u16-mbtouc: Renamed from
1631         modules/unistr/u16-mbtouc-safe.
1632         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
1633         * lib/unistr.h: Update.
1634         * lib/unistr/u16-to-u8.c: Update.
1635         * modules/unistr/u16-to-u8: Update.
1636         * lib/unistr/u16-to-u32.c: Update.
1637         * modules/unistr/u16-to-u32: Update.
1638
1639 2007-01-27  Bruno Haible  <bruno@clisp.org>
1640
1641         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
1642         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
1643         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
1644         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
1645         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
1646         * modules/unistr/u8-mbtouc-unsafe: Renamed from
1647         modules/unistr/u8-mbtouc.
1648         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
1649         * lib/unistr.h: Update.
1650         * lib/striconveh.c: Update.
1651         * modules/striconveh: Update.
1652         * lib/linebreak.c: Update.
1653         * modules/linebreak: Update.
1654         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
1655         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
1656         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
1657         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
1658         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
1659         * lib/unistr.h: Update.
1660         * lib/striconveh.c: Update.
1661         * modules/striconveh: Update.
1662         * lib/unistr/u8-to-u16.c: Update.
1663         * modules/unistr/u8-to-u16: Update.
1664         * lib/unistr/u8-to-u32.c: Update.
1665         * modules/unistr/u8-to-u32: Update.
1666
1667 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1668
1669         Sync from Libtool.
1670         * lib/argz.c: Do not include strings.h nor memory.h, include
1671         string.h unconditionally.  Patch by Simon Josefsson.
1672
1673 2007-01-27  Bruno Haible  <bruno@clisp.org>
1674
1675         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
1676         from gl_HEADER_STRING_H_BODY.
1677         (gl_HEADER_STRING_H_BODY): Require it.
1678         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
1679         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
1680         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
1681         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
1682         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1683         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
1684         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
1685         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
1686         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
1687         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
1688         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
1689         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
1690         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
1691         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
1692         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1693
1694 2007-01-27  Bruno Haible  <bruno@clisp.org>
1695
1696         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
1697         check_PROGRAMS into noinst_PROGRAMS.
1698         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
1699         check_PROGRAMS in this case.
1700         (func_import): Set for_test to false.
1701         (func_create_testdir): Set for_test to true.
1702
1703 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1704             Bruno Haible  <bruno@clisp.org>
1705
1706         * modules/strcasestr (Files): Remove lib/strcasestr.h.
1707         (Depends-on): Add string.
1708         (Includes): Use <string.h> instead of strcasestr.h.
1709         * modules/string (Makefile.am): Also substitute the value of
1710         REPLACE_STRCASESTR.
1711         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
1712         assume strcasestr is declared in <string.h> not <strings.h>. Also
1713         set REPLACE_STRCASESTR.
1714         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
1715         REPLACE_STRCASESTR.
1716         * lib/strcasestr.h: Remove file.
1717         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
1718         * lib/string_.h (strcasestr): New declaration.
1719
1720 2007-01-27  Bruno Haible  <bruno@clisp.org>
1721
1722         * lib/string_.h: Use 'extern'.
1723
1724 2007-01-27  Jim Meyering  <jim@meyering.net>
1725
1726         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
1727         of set-but-not-used local, "q".
1728
1729         * lib/mempcpy.c: Include <config.h> before <string.h>.
1730         This fixes a compilation error on HP-UX, due to the system's
1731         "restrict"-using mempcpy prototype.
1732
1733 2007-01-26  Bruno Haible  <bruno@clisp.org>
1734
1735         Small optimization.
1736         * lib/javacomp.c: Include c-strstr.h.
1737          (is_envjavac_gcj): Use c_strstr instead of strstr.
1738         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
1739
1740 2007-01-26  Bruno Haible  <bruno@clisp.org>
1741
1742         * MODULES.html.sh (Unicode string functions): Add the new modules.
1743
1744         * modules/uniconv/u32-strconv-to-locale: New file.
1745         * lib/uniconv/u32-strconv-to-locale.c: New file.
1746
1747         * modules/uniconv/u16-strconv-to-locale: New file.
1748         * lib/uniconv/u16-strconv-to-locale.c: New file.
1749
1750         * modules/uniconv/u8-strconv-to-locale: New file.
1751         * lib/uniconv/u8-strconv-to-locale.c: New file.
1752
1753         * modules/uniconv/u32-strconv-from-locale: New file.
1754         * lib/uniconv/u32-strconv-from-locale.c: New file.
1755
1756         * modules/uniconv/u16-strconv-from-locale: New file.
1757         * lib/uniconv/u16-strconv-from-locale.c: New file.
1758
1759         * modules/uniconv/u8-strconv-from-locale: New file.
1760         * lib/uniconv/u8-strconv-from-locale.c: New file.
1761
1762         * modules/uniconv/u32-strconv-to-enc: New file.
1763         * lib/uniconv/u32-strconv-to-enc.c: New file.
1764         * modules/uniconv/u32-strconv-to-enc-tests: New file.
1765         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
1766
1767         * modules/uniconv/u16-strconv-to-enc: New file.
1768         * lib/uniconv/u16-strconv-to-enc.c: New file.
1769         * lib/uniconv/u-strconv-to-enc.h: New file.
1770         * modules/uniconv/u16-strconv-to-enc-tests: New file.
1771         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
1772
1773         * modules/uniconv/u8-strconv-to-enc: New file.
1774         * lib/uniconv/u8-strconv-to-enc.c: New file.
1775         * modules/uniconv/u8-strconv-to-enc-tests: New file.
1776         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
1777
1778         * modules/uniconv/u32-strconv-from-enc: New file.
1779         * lib/uniconv/u32-strconv-from-enc.c: New file.
1780         * modules/uniconv/u32-strconv-from-enc-tests: New file.
1781         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
1782
1783         * modules/uniconv/u16-strconv-from-enc: New file.
1784         * lib/uniconv/u16-strconv-from-enc.c: New file.
1785         * modules/uniconv/u16-strconv-from-enc-tests: New file.
1786         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
1787
1788         * modules/uniconv/u8-strconv-from-enc: New file.
1789         * lib/uniconv/u8-strconv-from-enc.c: New file.
1790         * lib/uniconv/u-strconv-from-enc.h: New file.
1791         * modules/uniconv/u8-strconv-from-enc-tests: New file.
1792         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
1793
1794         * modules/uniconv/u32-conv-from-enc: New file.
1795         * lib/uniconv/u32-conv-from-enc.c: New file.
1796         * modules/uniconv/u32-conv-from-enc-tests: New file.
1797         * tests/uniconv/test-u32-conv-from-enc.c: New file.
1798
1799         * modules/uniconv/u16-conv-from-enc: New file.
1800         * lib/uniconv/u16-conv-from-enc.c: New file.
1801         * lib/uniconv/u-conv-from-enc.h: New file.
1802         * modules/uniconv/u16-conv-from-enc-tests: New file.
1803         * tests/uniconv/test-u16-conv-from-enc.c: New file.
1804
1805         * modules/uniconv/u8-conv-from-enc: New file.
1806         * lib/uniconv/u8-conv-from-enc.c: New file.
1807         * modules/uniconv/u8-conv-from-enc-tests: New file.
1808         * tests/uniconv/test-u8-conv-from-enc.c: New file.
1809
1810         * modules/uniconv/base: New file.
1811         * lib/uniconv.h: New file.
1812
1813 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
1814
1815         * doc/gnulib-tool.texi (Initial import): Update to match current
1816         behavior with strdup module.
1817         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
1818         * lib/memmem.h: Remove; all uses removed.  This is now done
1819         by <string.h>.
1820         * lib/mempcpy.h: Likewise.
1821         * lib/memrchr.h: Likewise.
1822         * lib/stpcpy.h: Likewise.
1823         * lib/stpncpy.h: Likewise.
1824         * lib/strcase.h: Likewise.
1825         * lib/strchrnul.h: Likewise.
1826         * lib/strdup.h: Likewise.
1827         * lib/strndup.h: Likewise.
1828         * lib/strnlen.h: Likewise.
1829         * lib/strpbrk.h: Likewise.
1830         * lib/strsep.h: Likewise.
1831         * lib/strstr.h: Likewise.
1832         * lib/strtok_r.h: Likewise.
1833         * lib/string_.h: New file.
1834         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
1835         Rely on <string.h> instead.
1836         * lib/canon-host.c: Likewise.
1837         * lib/chdir-long.c: Likewise.
1838         * lib/concatpath.c: Likewise.
1839         * lib/exclude.c: Likewise.
1840         * lib/fchdir.c: Likewise.
1841         * lib/getaddrinfo.c: Likewise.
1842         * lib/getcwd.c: Likewise.
1843         * lib/getsubopt.c: Likewise.
1844         * lib/glob.c: Likewise.
1845         * lib/hard-locale.c: Likewise.
1846         * lib/iconvme.c: Likewise.
1847         * lib/javacomp.c: Likewise.
1848         * lib/mempcpy.c: Likewise.
1849         * lib/memrchr.c: Likewise.
1850         * lib/regex_internal.h: Likewise.
1851         * lib/stpncpy.c: Likewise.
1852         * lib/strcasecmp.c: Likewise.
1853         * lib/strchrnul.c: Likewise.
1854         * lib/strdup.c: Likewise.
1855         * lib/striconv.c: Likewise.
1856         * lib/striconveh.c: Likewise.
1857         * lib/striconveha.c: Likewise.
1858         * lib/strncasecmp.c: Likewise.
1859         * lib/strndup.c: Likewise.
1860         * lib/strnlen.c: Likewise.
1861         * lib/strsep.c: Likewise.
1862         * lib/strstr.c: Likewise.
1863         * lib/strtok_r.c: Likewise.
1864         * lib/userspec.c: Likewise.
1865         * lib/w32spawn.h: Likewise.
1866         * lib/xstrndup.c: Likewise.
1867         * lib/mountlist.c (strstr): Remove decl.
1868         * m4/string_h.m4: New file.
1869         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
1870         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
1871         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
1872         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
1873         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
1874         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
1875         Set REPLACE_STRCASECMP if necessary.
1876         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
1877         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
1878         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
1879         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
1880         HAVE_DECL_STRDUP if necessary.
1881         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
1882         since gl_FUNC_STRNDUP does that now.
1883         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
1884         Check for decl here...
1885         (gl_PREREQ_STRNLEN): ... not here.
1886         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
1887         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
1888         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
1889         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
1890         necessary.
1891         * modules/string: New file.
1892         * modules/memmem (Files): Remove special-purpose include file.
1893         (Depends-on): Add string.
1894         (Include): Include <string.h>, not the removed file.
1895         * modules/mempcpy: Likewise.
1896         * modules/memrchr: Likewise.
1897         * modules/stpcpy: Likewise.
1898         * modules/stpncpy: Likewise.
1899         * modules/strcase: Likewise.
1900         * modules/strchrnul: Likewise.
1901         * modules/strdup: Likewise.
1902         * modules/strndup: Likewise.
1903         * modules/strnlen: Likewise.
1904         * modules/strpbrk: Likewise.
1905         * modules/strsep: Likewise.
1906         * modules/strstr: Likewise.
1907         * modules/strtok_r: Likewise.
1908         * tests/test-dirname.c: Don't include "strdup.h", since
1909         <string.h> now suffices.
1910         * tests/test-memmem.c: Don't include "memmem.h", since
1911         <string.h> now suffices.
1912
1913 2007-01-25  Bruno Haible  <bruno@clisp.org>
1914
1915         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
1916         *resultp is 0.
1917
1918         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
1919         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
1920         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
1921         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
1922
1923         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
1924         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
1925         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
1926         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
1927         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
1928         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
1929
1930 2007-01-24  Bruno Haible  <bruno@clisp.org>
1931
1932         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
1933         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
1934         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
1935         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
1936         gl_FUNC_FTS_CORE.
1937         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
1938         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
1939         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1940         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
1941         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
1942         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
1943         gl_FUNC_FCHOWNAT.
1944         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
1945         gl_FUNC_STRFTIME.
1946         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
1947         Reported by Ralf Wildenhues.
1948
1949 2007-01-24  Bruno Haible  <bruno@clisp.org>
1950
1951         Drop AC_REQUIRE calls that are redundant with the module dependencies.
1952         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
1953         gl_GETADDRINFO.
1954         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
1955         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
1956         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
1957
1958 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
1959
1960         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
1961         Don't use 'exit'; just return from 'main'.
1962         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
1963
1964         * lib/fnmatch_.h: Readjust white space and comments to match
1965         glibc, to avoid spurious diffs.
1966
1967 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
1968
1969         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
1970         2004-12-01 change by Jakub Jelinek, since this code won't compile
1971         if !LIBC.  Problem reported by Bob Proulx.
1972
1973 2007-01-23  Bruno Haible  <bruno@clisp.org>
1974
1975         * lib/striconveh.c: Include c-strcaseeq.h.
1976         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
1977         * modules/striconveh (Depends-on): Add c-strcaseeq.
1978
1979 2007-01-23  Bruno Haible  <bruno@clisp.org>
1980
1981         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
1982
1983         * modules/c-strcaseeq: New file.
1984         * lib/c-strcaseeq.h: New file.
1985
1986         * modules/streq: New file.
1987         * lib/streq.h: New file.
1988
1989 2007-01-23  Bruno Haible  <bruno@clisp.org>
1990
1991         * modules/striconveha-tests: New file.
1992         * tests/test-striconveha.c: New file.
1993
1994         * lib/striconveha.h: Include <stdbool.h>.
1995         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
1996         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
1997         (mem_iconveha_notranslit): Renamed from mem_iconveha.
1998         (mem_iconveha): New function.
1999         (str_iconveha_notranslit): Renamed from str_iconveha.
2000         (str_iconveha): New function.
2001         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
2002         c-strcase.
2003
2004 2007-01-23  Bruno Haible  <bruno@clisp.org>
2005
2006         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
2007         encodings without forgiving before trying any encoding with handler.
2008         (str_iconveha): Try all encodings without forgiving before trying any
2009         encoding with handler.
2010
2011 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2012
2013         Import the following changes from libc.
2014
2015         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
2016
2017         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
2018
2019         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
2020
2021         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
2022         normal_bracket label.
2023
2024         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
2025
2026         [BZ #361]
2027         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
2028         to normal_bracket after fetching the next character.
2029
2030 2007-01-22  Bruno Haible  <bruno@clisp.org>
2031
2032         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
2033         argument.
2034         * lib/striconveh.c (iconv_carefully_1): New function.
2035         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
2036         argument.
2037         (str_cd_iconveh): Update.
2038         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
2039         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
2040         * tests/test-striconveh.c (MAGIC): New macro.
2041         (new_offsets): New function.
2042         (main): Test call with and without offsets.
2043
2044 2007-01-22  Bruno Haible  <bruno@clisp.org>
2045
2046         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
2047         * modules/sys_select (Makefile.am): Likewise.
2048         * modules/sys_socket (Makefile.am): Likewise.
2049         * modules/sys_time (Makefile.am): Likewise.
2050
2051 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
2052
2053         * modules/gettimeofday (License): Change from GPL to LGPL, since
2054         gettimeofday is a library function.
2055
2056 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2057
2058         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
2059
2060 2007-01-21  Bruno Haible  <bruno@clisp.org>
2061
2062         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
2063
2064 2007-01-21  Bruno Haible  <bruno@clisp.org>
2065
2066         * modules/striconveha: New file.
2067         * lib/striconveha.h: New file.
2068         * lib/striconveha.c: New file.
2069         * MODULES.html.sh (Internationalization functions): Add striconveha.
2070         * lib/striconv.c (str_iconv): Optimize the case of an empty input
2071         string.
2072         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
2073
2074 2007-01-21  Bruno Haible  <bruno@clisp.org>
2075
2076         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
2077         * lib/striconveh.c (str_iconveh): Likewise.
2078
2079 2007-01-21  Bruno Haible  <bruno@clisp.org>
2080
2081         * lib/striconveh.h (mem_iconveh): New declaration.
2082         * lib/striconveh.c (mem_iconveh): New function.
2083         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
2084
2085 2007-01-21  Bruno Haible  <bruno@clisp.org>
2086
2087         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
2088
2089         * lib/striconveh.h (mem_cd_iconveh): Change specification.
2090         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
2091         original result buffer.
2092         (str_cd_iconveh): Update.
2093         * tests/test-striconveh.c (main): Update.
2094
2095         * lib/striconv.h (mem_cd_iconv): Change specification.
2096         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
2097         result buffer.
2098         (str_cd_iconv): Update.
2099         * tests/test-striconv.c (main): Update.
2100
2101 2007-01-21  Bruno Haible  <bruno@clisp.org>
2102
2103         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
2104
2105 2007-01-20  Jim Meyering  <jim@meyering.net>
2106
2107         * lib/userspec.c (parse_with_separator): If a user or group string
2108         starts with "+", skip the corresponding name-to-ID look-up, since
2109         such a look-up must fail: user and group names may not include "+".
2110
2111 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
2112
2113         * lib/poll.c: Include sys/time.h and time.h unconditionally,
2114         since we now assume the sys_time module.
2115         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
2116         check for sys/time.h; no longer needed.
2117         * modules/poll (Depends-on): Depend on sys_time.
2118
2119 2007-01-18  Bruno Haible  <bruno@clisp.org>
2120
2121         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
2122         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2123
2124         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
2125         gettimeofday.
2126
2127         * tests/test-gettimeofday.c: Include <time.h>.
2128         (dummy): Remove variable.
2129
2130         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
2131         gl_HEADER_SYS_TIME_H.
2132         (gl_HEADER_SYS_TIME_H): New macro.
2133
2134         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
2135         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2136         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
2137         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
2138         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2139         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
2140         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
2141         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2142         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
2143         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
2144         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2145
2146         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
2147         last change; it caused a compilation error when cross-compiling to
2148         Cygwin.
2149
2150 2007-01-18  Jim Meyering  <jim@meyering.net>
2151
2152         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
2153         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
2154         than the race-prone "test -d sys || mkdir sys".
2155         (configure.ac): Use AC_PROG_MKDIR_P.
2156         * modules/sys_select: Likewise.
2157         * modules/sys_socket: Likewise.
2158         * modules/sys_time: Likewise.
2159
2160 2007-01-18  Eric Blake  <ebb9@byu.net>
2161
2162         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
2163         replace gettimeofday.
2164         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
2165         name, to avoid infinite recursion.
2166
2167 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
2168
2169         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
2170         module sys_time.
2171         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
2172         assume timespec.h defines struct timeval.
2173         * lib/settime.c: Likewise.
2174         * lib/utimens.c: Likewise.
2175         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
2176         since we now assume the gettimeofday module.
2177         * lib/tempname.c (__gen_tempname): Likewise.
2178         * lib/gettimeofday.h: Remove.
2179         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
2180         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
2181         Include <time.h>, for 'time()'.
2182         (localtime_buffer_addr): Also use this workaround if
2183         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
2184         to simplify the uses.  All uses changed.
2185         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
2186         that #undef is inside {}, and 'const' follows type name consistently.
2187         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
2188         (gettimeofday): Do not use the maximum possible value for
2189         tv->tv_usec, since that might break usages other than ls.c.
2190         Instead, we'll leave ls.c alone.  This undoes today's patch
2191         by Bruno.  Add a compile-time warning for 1s-clock resolution;
2192         we've never observed the problem but might as well keep the
2193         canary.
2194         * lib/nanosleep.c: Include timespec.h first, for interface check.
2195         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
2196         now assume the sys_time module.
2197         * lib/tempname.c: Likewise.
2198         * lib/timespec.h: Likewise.
2199         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
2200         needed.
2201         * lib/strftime.c: Likewise.
2202         * lib/timespec.h: Likewise.
2203         * lib/posixtm.c: Include posixtm.h first, for interface check.
2204         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
2205         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
2206         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
2207         * lib/sys_time_.h: New file.
2208         * lib/timespec.h (struct timespec): Use long int, not long.
2209         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
2210         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
2211         Remove obsolescent call to AC_HEADER_TIME.
2212         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
2213         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
2214         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2215         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
2216         Likewise.
2217         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
2218         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
2219         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
2220         into the sys_time module.  Check for gettimeofday just once.
2221         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
2222         for gettimeofday signature to just check the signature.  Merely
2223         compile it, since linking doesn't test signature.  Improve test for
2224         whether gettimeofday.o is actually needed.
2225         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
2226         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
2227         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
2228         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2229         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
2230         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
2231         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
2232         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
2233         than worrying about sys/time.h.
2234         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2235         Don't bother worrying about TIME_WITH_SYS_TIME.
2236         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
2237         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
2238         * m4/sys_time_h.m4: New file.
2239         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
2240         Don't include sys/time.h.  Return from main rather than exiting.
2241         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
2242         all uses changed.
2243         * modules/gethrxtime (Depends-on): Add sys_time.
2244         * modules/gettime (Depends-on): Likewise.
2245         * modules/gettimeofday (Depends-on): Likewise.
2246         * modules/nanosleep (Depends-on): Likewise.
2247         * modules/settime (Depends-on): Likewise.
2248         * modules/tempname (Depends-on): Likewise.
2249         * modules/utimens (Depends-on): Likewise.
2250         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
2251         (Include:) Change back to <sys/time.h>.
2252         (Maintainer:) Add self.
2253         * modules/sys_time: New file.
2254         * modules/tempname (Depends-on): Add gettimeofday.
2255         * tests/test-gettimeofday.c: Include <sys/time.h>
2256         rather than gettimeofday.h.
2257
2258 2007-01-17  Bruno Haible  <bruno@clisp.org>
2259
2260         * gnulib-tool (func_get_license): Revert last patch. Instead, let
2261         the license default to GPL.
2262         (func_create_testdir): Don't complain if a module is LGPL and its
2263         tests module depends on GPLed modules.
2264
2265 2007-01-17  Bruno Haible  <bruno@clisp.org>
2266
2267         * lib/gettimeofday.c (gettimeofday): Add code for the case
2268         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
2269         maximum possible value for tv->tv_usec, rather than the minimum one.
2270
2271 2005-10-08  Martin Lambers  <marlam@marlam.de>
2272 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2273 2007-01-16  Bruno Haible  <bruno@clisp.org>
2274
2275         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
2276         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
2277         gl_FUNC_GETTIMEOFDAY.
2278         (Include): Add gettimeofday.h.
2279         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
2280         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
2281         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
2282         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
2283         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
2284         * lib/gettimeofday.h: New file.
2285         * lib/gettimeofday.c: Include <sys/timeb.h>.
2286         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
2287         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2288         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
2289         fall back on time().
2290
2291         * tests/test-gettimeofday.c: New file.
2292         * modules/gettimeofday-tests: New file.
2293
2294 2007-01-16  Eric Blake  <ebb9@byu.net>
2295
2296         * modules/fnmatch (Depends-on): Depend on wchar.
2297         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
2298         * m4/fnmatch.m4: Likewise.
2299         * modules/mbchar (Makefile.am): Assume <wchar.h>.
2300         * m4/mbchar.m4: Likewise.
2301         * modules/mbswidth (Depends-on): Depend on wchar.
2302         * lib/mbswidth.c: Assume <wchar.h>.
2303         * m4/mbswidth.m4: Likewise.
2304         * modules/quotearg (Depends-on): Depend on wchar.
2305         * lib/quotearg.c: Assume <wchar.h>.
2306         * m4/quotearg.m4: Likewise.
2307         * modules/regex (Depends-on): Depend on wchar.
2308         * lib/regex_internal.h: Assume <wchar.h>.
2309         * m4/regex.m4: Likewise.
2310         * modules/stdint (Depends-on): Depend on wchar.
2311         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
2312         * m4/stdint.m4: Likewise.
2313         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
2314         * modules/strftime (Depends-on): Depend on wchar.
2315         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
2316         * modules/strtol (Depends-on): Depend on wchar.
2317         * lib/strtol.c: Assume <wchar.h>.
2318         * modules/wcwidth (Depends-on): Depend on wchar.
2319         * lib/wcwidth.h: Assume <wchar.h>.
2320         * m4/wcwidth.m4: Likewise.
2321
2322 2007-01-16  Bruno Haible  <bruno@clisp.org>
2323
2324         * modules/csharpexec-script: New, created from...
2325         * modules/csharpexec: ... this.
2326
2327 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
2328
2329         * modules/javaexec-script: New, created from...
2330         * modules/javaexec: ... this.
2331
2332 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2333
2334         * modules/poll (Dependencies): Add sys_select.
2335
2336 2007-01-15  Jim Meyering  <jim@meyering.net>
2337
2338         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
2339         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
2340         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
2341         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
2342
2343 2007-01-15  Bruno Haible  <bruno@clisp.org>
2344
2345         * modules/striconveh: New file.
2346         * lib/striconveh.h: New file.
2347         * lib/striconveh.c: New file.
2348         * MODULES.html.sh (Internationalization functions): Add striconveh.
2349
2350         * modules/striconveh-tests: New file.
2351         * tests/test-striconveh.c: New file.
2352
2353 2007-01-15  Bruno Haible  <bruno@clisp.org>
2354
2355         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
2356         not from GNU libiconv or GNU libc.
2357
2358 2007-01-15  Bruno Haible  <bruno@clisp.org>
2359
2360         * doc/gnulib-intro.texi (Copyright): Explain the different license
2361         terms for module descriptions, autoconf macros, tests, documentation.
2362
2363 2007-01-14  Bruno Haible  <bruno@clisp.org>
2364
2365         * modules/striconv-tests: New file.
2366         * tests/test-striconv.c: New file.
2367
2368 2007-01-14  Bruno Haible  <bruno@clisp.org>
2369
2370         * modules/iconv-tests: New file.
2371         * tests/test-iconv.c: New file.
2372
2373 2007-01-14  Bruno Haible  <bruno@clisp.org>
2374
2375         * gnulib-tool (func_get_license): For test modules, use the license of
2376         the main module.
2377
2378 2007-01-14  Bruno Haible  <bruno@clisp.org>
2379
2380         * modules/iconv (Include): Clarify that <iconv.h> can only be included
2381         if iconv is found to exist.
2382
2383 2007-01-14  Bruno Haible  <bruno@clisp.org>
2384
2385         * modules/c-ctype-tests: New file.
2386         * tests/test-c-ctype.c: New file.
2387
2388 2007-01-14  Bruno Haible  <bruno@clisp.org>
2389
2390         * modules/binary-io-tests: New file.
2391         * tests/test-binary-io.sh: New file.
2392         * tests/test-binary-io.c: New file.
2393
2394 2007-01-14  Bruno Haible  <bruno@clisp.org>
2395
2396         * modules/array-oset-tests: New file.
2397         * tests/test-array_oset.c: New file.
2398
2399 2007-01-14  Bruno Haible  <bruno@clisp.org>
2400
2401         * modules/array-list-tests: New file.
2402         * tests/test-array_list.c: New file.
2403
2404 2007-01-14  Bruno Haible  <bruno@clisp.org>
2405
2406         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
2407         and make.
2408         Reported by Simon Josefsson in
2409         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
2410
2411 2007-01-14  Bruno Haible  <bruno@clisp.org>
2412
2413         * modules/allocsa-tests: New file.
2414         * tests/test-allocsa.c: New file.
2415
2416 2007-01-14  Bruno Haible  <bruno@clisp.org>
2417
2418         * modules/fchdir (Depends-on): Add absolute-header.
2419         * modules/unistd (Depends-on): Likewise.
2420
2421 2006-12-30  Bruno Haible  <bruno@clisp.org>
2422
2423         * modules/fchdir: New file.
2424         * modules/unistd (Files): Add lib/unistd_.h.
2425         (Makefile.am): Generate unistd.h from unistd_.h.
2426         * lib/fchdir.c: New file.
2427         * lib/dirent_.h: New file.
2428         * lib/unistd_.h: New file.
2429         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
2430         * m4/fchdir.m4: New file.
2431         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
2432         (gl_HEADER_UNISTD): Invoke it.
2433         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
2434         function.
2435         * lib/backupfile.c (opendir, closedir): Undefine.
2436         * lib/chown.c (open, close): Undefine.
2437         * lib/clean-temp.c (open, close): Undefine.
2438         * lib/copy-file.c (open, close): Undefine.
2439         * lib/execute.c (open, close): Undefine.
2440         * lib/fsusage.c (open, close): Undefine.
2441         * lib/gc-gnulib.c (open, close): Undefine.
2442         * lib/getcwd.c (opendir, closedir): Undefine.
2443         * lib/glob.c (opendir, closedir): Undefine.
2444         * lib/javacomp.c (open, close): Undefine.
2445         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
2446         * lib/openat-proc.c (open, close): Undefine.
2447         * lib/pagealign_alloc.c (open, close): Undefine.
2448         * lib/pipe.c (open, close): Undefine.
2449         * lib/progreloc.c (open, close): Undefine.
2450         * lib/savedir.c (opendir, closedir): Undefine.
2451         * lib/utime.c (open, close): Undefine.
2452         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
2453
2454 2007-01-10  Bruno Haible  <bruno@clisp.org>
2455
2456         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
2457
2458 2007-01-12  Eric Blake  <ebb9@byu.net>
2459
2460         Provide a robust <wchar.h>.  Further simplifications are now
2461         possible in other modules, but not included here.
2462         * modules/wchar: New module.
2463         * m4/wchar.m4: New file.
2464         * lib/wchar_.h: Likewise.
2465         * modules/mbchar (Depends-on): Depend on wchar, as the first use
2466         of the new module.
2467         * MODULES.html.sh (Extended multibyte and wide character utilities):
2468         New section.
2469
2470 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
2471
2472         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
2473         to a reasonable default for memory allocation.
2474         (xreadlink): Don't allocate a huge buffer, to work around a buggy
2475         file system that reports garbage st_size values for symlinks.
2476         Problem reported by Liyang Hu.
2477
2478 2007-01-11  Simon Josefsson  <simon@josefsson.org>
2479
2480         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
2481         Emacs .#* auto-save files).
2482
2483 2007-01-11  Bruno Haible  <bruno@clisp.org>
2484
2485         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
2486         directory.
2487
2488 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
2489
2490         Use @...@ consistently in lib/wctype_.h.
2491         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
2492         on it being set to 1 or 0.
2493         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
2494         go back to AC_SUBSTing it.
2495         * modules/wctype (Makefile.am): Undo previous change.
2496
2497 2007-01-10  Eric Blake  <ebb9@byu.net>
2498
2499         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
2500         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
2501         * modules/wctype (Makefile.am): Likewise.
2502         Reported by Chris McGuire.
2503
2504 2007-01-10  Jim Meyering  <jim@meyering.net>
2505
2506         fts.c: a small readability/maintainability improvement
2507         * lib/fts.c (fts_read): Make this code slightly more readable and
2508         maintainable by hoisting the "sp->fts_cur = p" assignments to
2509         immediately follow the statements that set P.  Derived from
2510         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
2511
2512 2007-01-10  Eric Blake  <ebb9@byu.net>
2513
2514         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
2515         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
2516         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2517         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
2518         Reported by Chris McGuire.
2519
2520 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2521
2522         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
2523         in sed script.
2524
2525 2007-01-09  Bruno Haible  <bruno@clisp.org>
2526
2527         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
2528         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
2529         variables.
2530         (func_module): Use them.
2531
2532 2007-01-09  Bruno Haible  <bruno@clisp.org>
2533
2534         * modules/unistr/base: New file.
2535         * lib/unistr.h: New file.
2536
2537         * modules/unistr/u8-to-u16: New file.
2538         * lib/unistr/u8-to-u16.c: New file.
2539
2540         * modules/unistr/u8-to-u32: New file.
2541         * lib/unistr/u8-to-u32.c: New file.
2542
2543         * modules/unistr/u16-to-u8: New file.
2544         * lib/unistr/u16-to-u8.c: New file.
2545
2546         * modules/unistr/u16-to-u32: New file.
2547         * lib/unistr/u16-to-u32.c: New file.
2548
2549         * modules/unistr/u32-to-u8: New file.
2550         * lib/unistr/u32-to-u8.c: New file.
2551
2552         * modules/unistr/u32-to-u16: New file.
2553         * lib/unistr/u32-to-u16.c: New file.
2554
2555         * modules/unistr/u8-check: New file.
2556         * modules/unistr/u16-check: New file.
2557         * modules/unistr/u32-check: New file.
2558         * lib/unistr/u8-check.c: New file.
2559         * lib/unistr/u16-check.c: New file.
2560         * lib/unistr/u32-check.c: New file.
2561
2562         * modules/unistr/u8-chr: New file.
2563         * modules/unistr/u16-chr: New file.
2564         * modules/unistr/u32-chr: New file.
2565         * lib/unistr/u8-chr.c: New file.
2566         * lib/unistr/u16-chr.c: New file.
2567         * lib/unistr/u32-chr.c: New file.
2568
2569         * modules/unistr/u8-cmp: New file.
2570         * modules/unistr/u16-cmp: New file.
2571         * modules/unistr/u32-cmp: New file.
2572         * lib/unistr/u8-cmp.c: New file.
2573         * lib/unistr/u16-cmp.c: New file.
2574         * lib/unistr/u32-cmp.c: New file.
2575
2576         * modules/unistr/u8-cpy: New file.
2577         * modules/unistr/u16-cpy: New file.
2578         * modules/unistr/u32-cpy: New file.
2579         * lib/unistr/u8-cpy.c: New file.
2580         * lib/unistr/u16-cpy.c: New file.
2581         * lib/unistr/u32-cpy.c: New file.
2582         * lib/unistr/u-cpy.h: New file.
2583
2584         * modules/unistr/u8-cpy-alloc: New file.
2585         * modules/unistr/u16-cpy-alloc: New file.
2586         * modules/unistr/u32-cpy-alloc: New file.
2587         * lib/unistr/u8-cpy-alloc.c: New file.
2588         * lib/unistr/u16-cpy-alloc.c: New file.
2589         * lib/unistr/u32-cpy-alloc.c: New file.
2590         * lib/unistr/u-cpy-alloc.h: New file.
2591
2592         * modules/unistr/u8-endswith: New file.
2593         * modules/unistr/u16-endswith: New file.
2594         * modules/unistr/u32-endswith: New file.
2595         * lib/unistr/u8-endswith.c: New file.
2596         * lib/unistr/u16-endswith.c: New file.
2597         * lib/unistr/u32-endswith.c: New file.
2598         * lib/unistr/u-endswith.h: New file.
2599
2600         * modules/unistr/u8-mblen: New file.
2601         * modules/unistr/u16-mblen: New file.
2602         * modules/unistr/u32-mblen: New file.
2603         * lib/unistr/u8-mblen.c: New file.
2604         * lib/unistr/u16-mblen.c: New file.
2605         * lib/unistr/u32-mblen.c: New file.
2606
2607         * modules/unistr/u8-mbtouc: New file.
2608         * modules/unistr/u16-mbtouc: New file.
2609         * modules/unistr/u32-mbtouc: New file.
2610         * lib/unistr/u8-mbtouc.c: New file.
2611         * lib/unistr/u16-mbtouc.c: New file.
2612         * lib/unistr/u32-mbtouc.c: New file.
2613
2614         * modules/unistr/u8-mbtouc-safe: New file.
2615         * modules/unistr/u16-mbtouc-safe: New file.
2616         * modules/unistr/u32-mbtouc-safe: New file.
2617         * lib/unistr/u8-mbtouc-safe.c: New file.
2618         * lib/unistr/u16-mbtouc-safe.c: New file.
2619         * lib/unistr/u32-mbtouc-safe.c: New file.
2620
2621         * modules/unistr/u8-move: New file.
2622         * modules/unistr/u16-move: New file.
2623         * modules/unistr/u32-move: New file.
2624         * lib/unistr/u8-move.c: New file.
2625         * lib/unistr/u16-move.c: New file.
2626         * lib/unistr/u32-move.c: New file.
2627         * lib/unistr/u-move.h: New file.
2628
2629         * modules/unistr/u8-next: New file.
2630         * modules/unistr/u16-next: New file.
2631         * modules/unistr/u32-next: New file.
2632         * lib/unistr/u8-next.c: New file.
2633         * lib/unistr/u16-next.c: New file.
2634         * lib/unistr/u32-next.c: New file.
2635
2636         * modules/unistr/u8-prev: New file.
2637         * modules/unistr/u16-prev: New file.
2638         * modules/unistr/u32-prev: New file.
2639         * lib/unistr/u8-prev.c: New file.
2640         * lib/unistr/u16-prev.c: New file.
2641         * lib/unistr/u32-prev.c: New file.
2642
2643         * modules/unistr/u8-set: New file.
2644         * modules/unistr/u16-set: New file.
2645         * modules/unistr/u32-set: New file.
2646         * lib/unistr/u8-set.c: New file.
2647         * lib/unistr/u16-set.c: New file.
2648         * lib/unistr/u32-set.c: New file.
2649         * lib/unistr/u-set.h: New file.
2650
2651         * modules/unistr/u8-startswith: New file.
2652         * modules/unistr/u16-startswith: New file.
2653         * modules/unistr/u32-startswith: New file.
2654         * lib/unistr/u8-startswith.c: New file.
2655         * lib/unistr/u16-startswith.c: New file.
2656         * lib/unistr/u32-startswith.c: New file.
2657         * lib/unistr/u-startswith.h: New file.
2658
2659         * modules/unistr/u8-stpcpy: New file.
2660         * modules/unistr/u16-stpcpy: New file.
2661         * modules/unistr/u32-stpcpy: New file.
2662         * lib/unistr/u8-stpcpy.c: New file.
2663         * lib/unistr/u16-stpcpy.c: New file.
2664         * lib/unistr/u32-stpcpy.c: New file.
2665         * lib/unistr/u-stpcpy.h: New file.
2666
2667         * modules/unistr/u8-stpncpy: New file.
2668         * modules/unistr/u16-stpncpy: New file.
2669         * modules/unistr/u32-stpncpy: New file.
2670         * lib/unistr/u8-stpncpy.c: New file.
2671         * lib/unistr/u16-stpncpy.c: New file.
2672         * lib/unistr/u32-stpncpy.c: New file.
2673         * lib/unistr/u-stpncpy.h: New file.
2674
2675         * modules/unistr/u8-strcat: New file.
2676         * modules/unistr/u16-strcat: New file.
2677         * modules/unistr/u32-strcat: New file.
2678         * lib/unistr/u8-strcat.c: New file.
2679         * lib/unistr/u16-strcat.c: New file.
2680         * lib/unistr/u32-strcat.c: New file.
2681         * lib/unistr/u-strcat.h: New file.
2682
2683         * modules/unistr/u8-strchr: New file.
2684         * modules/unistr/u16-strchr: New file.
2685         * modules/unistr/u32-strchr: New file.
2686         * lib/unistr/u8-strchr.c: New file.
2687         * lib/unistr/u16-strchr.c: New file.
2688         * lib/unistr/u32-strchr.c: New file.
2689
2690         * modules/unistr/u8-strcmp: New file.
2691         * modules/unistr/u16-strcmp: New file.
2692         * modules/unistr/u32-strcmp: New file.
2693         * lib/unistr/u8-strcmp.c: New file.
2694         * lib/unistr/u16-strcmp.c: New file.
2695         * lib/unistr/u32-strcmp.c: New file.
2696
2697         * modules/unistr/u8-strcpy: New file.
2698         * modules/unistr/u16-strcpy: New file.
2699         * modules/unistr/u32-strcpy: New file.
2700         * lib/unistr/u8-strcpy.c: New file.
2701         * lib/unistr/u16-strcpy.c: New file.
2702         * lib/unistr/u32-strcpy.c: New file.
2703         * lib/unistr/u-strcpy.h: New file.
2704
2705         * modules/unistr/u8-strcspn: New file.
2706         * modules/unistr/u16-strcspn: New file.
2707         * modules/unistr/u32-strcspn: New file.
2708         * lib/unistr/u8-strcspn.c: New file.
2709         * lib/unistr/u16-strcspn.c: New file.
2710         * lib/unistr/u32-strcspn.c: New file.
2711         * lib/unistr/u-strcspn.h: New file.
2712
2713         * modules/unistr/u8-strdup: New file.
2714         * modules/unistr/u16-strdup: New file.
2715         * modules/unistr/u32-strdup: New file.
2716         * lib/unistr/u8-strdup.c: New file.
2717         * lib/unistr/u16-strdup.c: New file.
2718         * lib/unistr/u32-strdup.c: New file.
2719         * lib/unistr/u-strdup.h: New file.
2720
2721         * modules/unistr/u8-strlen: New file.
2722         * modules/unistr/u16-strlen: New file.
2723         * modules/unistr/u32-strlen: New file.
2724         * lib/unistr/u8-strlen.c: New file.
2725         * lib/unistr/u16-strlen.c: New file.
2726         * lib/unistr/u32-strlen.c: New file.
2727         * lib/unistr/u-strlen.h: New file.
2728
2729         * modules/unistr/u8-strmblen: New file.
2730         * modules/unistr/u16-strmblen: New file.
2731         * modules/unistr/u32-strmblen: New file.
2732         * lib/unistr/u8-strmblen.c: New file.
2733         * lib/unistr/u16-strmblen.c: New file.
2734         * lib/unistr/u32-strmblen.c: New file.
2735
2736         * modules/unistr/u8-strmbtouc: New file.
2737         * modules/unistr/u16-strmbtouc: New file.
2738         * modules/unistr/u32-strmbtouc: New file.
2739         * lib/unistr/u8-strmbtouc.c: New file.
2740         * lib/unistr/u16-strmbtouc.c: New file.
2741         * lib/unistr/u32-strmbtouc.c: New file.
2742
2743         * modules/unistr/u8-strncat: New file.
2744         * modules/unistr/u16-strncat: New file.
2745         * modules/unistr/u32-strncat: New file.
2746         * lib/unistr/u8-strncat.c: New file.
2747         * lib/unistr/u16-strncat.c: New file.
2748         * lib/unistr/u32-strncat.c: New file.
2749         * lib/unistr/u-strncat.h: New file.
2750
2751         * modules/unistr/u8-strncmp: New file.
2752         * modules/unistr/u16-strncmp: New file.
2753         * modules/unistr/u32-strncmp: New file.
2754         * lib/unistr/u8-strncmp.c: New file.
2755         * lib/unistr/u16-strncmp.c: New file.
2756         * lib/unistr/u32-strncmp.c: New file.
2757
2758         * modules/unistr/u8-strncpy: New file.
2759         * modules/unistr/u16-strncpy: New file.
2760         * modules/unistr/u32-strncpy: New file.
2761         * lib/unistr/u8-strncpy.c: New file.
2762         * lib/unistr/u16-strncpy.c: New file.
2763         * lib/unistr/u32-strncpy.c: New file.
2764         * lib/unistr/u-strncpy.h: New file.
2765
2766         * modules/unistr/u8-strnlen: New file.
2767         * modules/unistr/u16-strnlen: New file.
2768         * modules/unistr/u32-strnlen: New file.
2769         * lib/unistr/u8-strnlen.c: New file.
2770         * lib/unistr/u16-strnlen.c: New file.
2771         * lib/unistr/u32-strnlen.c: New file.
2772         * lib/unistr/u-strnlen.h: New file.
2773
2774         * modules/unistr/u8-strpbrk: New file.
2775         * modules/unistr/u16-strpbrk: New file.
2776         * modules/unistr/u32-strpbrk: New file.
2777         * lib/unistr/u8-strpbrk.c: New file.
2778         * lib/unistr/u16-strpbrk.c: New file.
2779         * lib/unistr/u32-strpbrk.c: New file.
2780         * lib/unistr/u-strpbrk.h: New file.
2781
2782         * modules/unistr/u8-strrchr: New file.
2783         * modules/unistr/u16-strrchr: New file.
2784         * modules/unistr/u32-strrchr: New file.
2785         * lib/unistr/u8-strrchr.c: New file.
2786         * lib/unistr/u16-strrchr.c: New file.
2787         * lib/unistr/u32-strrchr.c: New file.
2788
2789         * modules/unistr/u8-strspn: New file.
2790         * modules/unistr/u16-strspn: New file.
2791         * modules/unistr/u32-strspn: New file.
2792         * lib/unistr/u8-strspn.c: New file.
2793         * lib/unistr/u16-strspn.c: New file.
2794         * lib/unistr/u32-strspn.c: New file.
2795         * lib/unistr/u-strspn.h: New file.
2796
2797         * modules/unistr/u8-strstr: New file.
2798         * modules/unistr/u16-strstr: New file.
2799         * modules/unistr/u32-strstr: New file.
2800         * lib/unistr/u8-strstr.c: New file.
2801         * lib/unistr/u16-strstr.c: New file.
2802         * lib/unistr/u32-strstr.c: New file.
2803         * lib/unistr/u-strstr.h: New file.
2804
2805         * modules/unistr/u8-strtok: New file.
2806         * modules/unistr/u16-strtok: New file.
2807         * modules/unistr/u32-strtok: New file.
2808         * lib/unistr/u8-strtok.c: New file.
2809         * lib/unistr/u16-strtok.c: New file.
2810         * lib/unistr/u32-strtok.c: New file.
2811         * lib/unistr/u-strtok.h: New file.
2812
2813         * modules/unistr/u8-uctomb: New file.
2814         * modules/unistr/u16-uctomb: New file.
2815         * modules/unistr/u32-uctomb: New file.
2816         * lib/unistr/u8-uctomb.c: New file.
2817         * lib/unistr/u16-uctomb.c: New file.
2818         * lib/unistr/u32-uctomb.c: New file.
2819
2820         * MODULES.html.sh (Unicode string functions): Add the new modules.
2821
2822 2007-01-08  Bruno Haible  <bruno@clisp.org>
2823
2824         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
2825         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
2826         subdirectories.
2827
2828 2007-01-08  Karl Berry  <karl@gnu.org>
2829
2830         * doc/error.texi: mention that main() fns must set program_name
2831         when progname is used.
2832
2833 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
2834
2835         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
2836         WCTYPE_H is empty, for the benefit of builds from non-distclean
2837         directories.  Problem reported by Eric Blake in
2838         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
2839
2840 2007-01-08  Bruno Haible  <bruno@clisp.org>
2841
2842         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
2843         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
2844         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
2845         PROVIDE_CANONICALIZE_FILENAME_MODE.
2846         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
2847
2848 2007-01-08  Bruno Haible  <bruno@clisp.org>
2849
2850         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
2851         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
2852         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
2853         * lib/fts.c: Likewise.
2854         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
2855
2856 2006-12-25  Bruno Haible  <bruno@clisp.org>
2857
2858         * modules/utf8-ucs4-safe: New file.
2859         * lib/utf8-ucs4-safe.h: New file.
2860         * lib/unistr/utf8-ucs4-safe.c: New file.
2861
2862         * modules/utf16-ucs4-safe: New file.
2863         * lib/utf16-ucs4-safe.h: New file.
2864         * lib/unistr/utf16-ucs4-safe.c: New file.
2865
2866         * MODULES.html.sh (Unicode string functions): Add the new modules.
2867
2868 2007-01-08  Bruno Haible  <bruno@clisp.org>
2869
2870         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
2871         (Depends-on): Add unitypes.
2872         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2873         (u8_mbtouc_aux): Move out to separate file.
2874         (u8_mbtouc): Use ucs4_t, uint8_t types.
2875         * lib/unistr/utf8-ucs4.c: New file.
2876
2877         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
2878         (Depends-on): Add unitypes.
2879         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
2880         (u16_mbtouc_aux): Move out to separate file.
2881         (u16_mbtouc): Use ucs4_t, uint16_t types.
2882         * lib/unistr/utf16-ucs4.c: New file.
2883
2884         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
2885         (Depends-on): Add unitypes.
2886         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
2887         (u8_uctomb_aux): Move out to separate file.
2888         (u8_uctomb): Use ucs4_t, uint8_t types.
2889         * lib/unistr/ucs4-utf8.c: New file.
2890
2891         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
2892         (Depends-on): Add unitypes.
2893         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
2894         (u16_uctomb_aux): Move out to separate file.
2895         (u16_uctomb): Use ucs4_t, uint16_t types.
2896         * lib/unistr/ucs4-utf16.c: New file.
2897
2898 2006-12-25  Bruno Haible  <bruno@clisp.org>
2899
2900         * modules/unitypes: New file.
2901         * lib/unitypes.h: New file.
2902         * MODULES.html.sh (func_all_modules): New section "Unicode string
2903         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
2904         this section. Add unitypes.
2905
2906 2007-01-08  Bruno Haible  <bruno@clisp.org>
2907
2908         Avoid variable names that conflict with those from libtool.
2909         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
2910         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
2911         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
2912         library_names_spec to acl_library_names_spec, hardcode_* to
2913         acl_hardcode_*.
2914         Reported by Ralf Wildenhues.
2915
2916 2007-01-08  Bruno Haible  <bruno@clisp.org>
2917
2918         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
2919         definition.
2920         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
2921         definition.
2922         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
2923         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
2924         definition.
2925         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
2926         definition.
2927         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
2928         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
2929         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
2930         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
2931         definition.
2932         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
2933         definition.
2934         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
2935         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
2936         GC_USE_<algorithm>.
2937         * lib/gc-libgcrypt.c: Likewise.
2938         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
2939         * modules/gc-arctwo (configure.ac): Likewise.
2940         * modules/gc-des (configure.ac): Likewise.
2941         * modules/gc-hmac-md5 (configure.ac): Likewise.
2942         * modules/gc-hmac-sha1 (configure.ac): Likewise.
2943         * modules/gc-md2 (configure.ac): Likewise.
2944         * modules/gc-md4 (configure.ac): Likewise.
2945         * modules/gc-md5 (configure.ac): Likewise.
2946         * modules/gc-random (configure.ac): Likewise.
2947         * modules/gc-rijndael (configure.ac): Likewise.
2948         * modules/gc-sha1 (configure.ac): Likewise.
2949
2950 2007-01-08  Bruno Haible  <bruno@clisp.org>
2951
2952         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
2953         macro definition.
2954         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
2955         definition.
2956         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
2957         definition.
2958         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
2959         * modules/fcntl-safer (configure.ac): Likewise.
2960         * modules/fopen-safer (configure.ac): Likewise.
2961         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
2962         GNULIB_FWRITEERROR macro definition.
2963
2964 2007-01-08  Bruno Haible  <bruno@clisp.org>
2965
2966         * m4/gnulib-common.m4: New file.
2967         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
2968         (func_get_filelist): Add m4/gnulib-common.m4.
2969
2970 2007-01-08  Bruno Haible  <bruno@clisp.org>
2971
2972         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
2973         command.
2974
2975 2007-01-08  Jim Meyering  <jim@meyering.net>
2976
2977         Use a more robust test for a "can't happen" condition.
2978         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
2979         narrowed the st_size value.  Presuming the "can't happen" condition
2980         is true, that narrowing could conceivably convert an invalid st_size
2981         value into a valid one.  Instead, use a change based on Matthew
2982         Woehlke's original patch.
2983
2984         Slight readability improvement: use an assert-like macro
2985         in place of literal "abort ()" uses.
2986         * lib/fts.c (fts_assert): Define.
2987         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
2988         Use this macro instead of a bare 'abort'.
2989
2990 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
2991
2992         Don't worry about using IRIX 5.3's wctype.h broken definitions;
2993         simply work around them.
2994         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
2995         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
2996         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
2997         declaring.
2998         Don't bother to define as macros, since the standard doesn't require it.
2999         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
3000         longer worry about IRIX 5.3.
3001         (HAVE_WCTYPE_CTMP_BUG): Remove.
3002
3003 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
3004
3005         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
3006         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
3007         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
3008         Problems reported by Georg Schwarz for IRIX 5.3.
3009
3010         * gnulib-tool (autoconf_minversion): Take the maximum version number
3011         found, not the minimum.  Problem reported by James Youngman.
3012
3013 2007-01-03  Karl Berry  <karl@gnu.org>
3014
3015         * doc/error.texi: new file, explaining interaction with progname.
3016         * doc/gnulib.texi: include it.  Update copyright.
3017
3018 2007-01-03  Simon Josefsson  <simon@josefsson.org>
3019
3020         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
3021         AC_CANONICAL_HOST, to improve autobuild outputs.
3022
3023 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
3024             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3025
3026         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
3027         sockets, server sockets, and other file descriptors.  Count errors
3028         to compute the return value.  Reorder the code a bit to be easier
3029         to follow.  Don't set event bits that were not requested (except
3030         POLLERR and POLLHUP).
3031
3032 2007-01-01  Bruno Haible  <bruno@clisp.org>
3033
3034         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
3035
3036 2007-01-03  Jim Meyering  <jim@meyering.net>
3037
3038         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
3039
3040 2007-01-02  Bruno Haible  <bruno@clisp.org>
3041
3042         * modules/settime (Include): Require timespec.h.
3043         * modules/nanosleep (Include): Likewise.
3044
3045 2007-01-01  Bruno Haible  <bruno@clisp.org>
3046
3047         * gnulib-tool (func_emit_copyright_notice): Bump year.
3048         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
3049
3050 2007-01-01  Bruno Haible  <bruno@clisp.org>
3051
3052         Improve support for OpenBSD.
3053         * build-aux/config.rpath (libname_spec): Export.
3054         (library_names_spec): New variable. Export.
3055         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
3056         library_names_spec from the config.rpath output. Locate shared library
3057         through the name pattern in library_names_spec.
3058
3059 2007-01-01  Eric Blake  <ebb9@byu.net>
3060
3061         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
3062
3063 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
3064
3065         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
3066         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
3067         assume the C locale, and avoid an "eval" that could cause trouble.
3068         Problem with SORT reported by Bob Proulx.
3069
3070         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
3071         Define.  Trivial patch from Henning Nielsen Lund, originally
3072         sent to bug-grep@gnu.org today.
3073
3074 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
3075
3076         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
3077         struct stat.  Problem reported by Henning Nielsen Lund.
3078         * lib/acl.c: Include acl.h first, to check interface.  Don't
3079         bother to include sys/types.h and sys/stat.h again.
3080
3081 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
3082
3083         Import the following change from libc; problem reported by
3084         Sven Verdoolaege.
3085
3086         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
3087
3088         [BZ #1373]
3089         * lib/argp.h: Remove __NTH for __argp_usage inline function.
3090
3091 2006-12-28  Jim Meyering  <jim@meyering.net>
3092
3093         * build-aux/announce-gen: Do not assume that the package
3094         builds any of tar.gz, tar.bz2, and .xdelta files.
3095         Suggestion from Simon Josefsson.
3096
3097 2006-12-28  Simon Josefsson  <simon@josefsson.org>
3098
3099         * modules/announce-gen: New file.
3100
3101 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
3102
3103         * lib/mbchar.h: Just include <wctype.h>; the wctype module
3104         handles its gotchas now.
3105         * lib/mbswidth.c: Likewise.
3106         * lib/wcwidth.h: Likewise.
3107         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
3108         and iswcntrl; the wctype module does this stuff now.
3109         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3110         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3111         * modules/mbchar (Depends-on): Add wctype.
3112         * modules/mbswidth (Depends-on): Likewise.
3113         * modules/wcwidth (Depends-on): Likewise.
3114
3115 2006-12-27  Eric Blake  <ebb9@byu.net>
3116
3117         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
3118         module uses more than what <wctype.h> is required to provide.
3119
3120 2006-12-26  Eric Blake  <ebb9@byu.net>
3121
3122         * gnulib-tool (sed_extract_prog): Avoid space-tab.
3123
3124 2006-12-26  Eric Blake  <ebb9@byu.net>
3125
3126         * modules/absolute-header: New module.
3127         * modules/fcntl (Depends-on): Depend on it.
3128         * modules/inttypes (Depends-on): Likewise.
3129         * modules/stdint (Depends-on): Likewise.
3130         * modules/sys_stat (Depends-on): Likewise.
3131         * modules/wctype (Depends-on): Likewise.
3132         * MODULES.html.sh (Support for building libraries and
3133         executables): Document it.
3134
3135 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
3136
3137         * gnulib-tool (SED): Remove, undoing previous change.
3138         The problem was that it broke coreutils on Solaris, because
3139         "sed --posix" leaked into a makefile.
3140         (sed): New alias, if 'alias' and GNU sed.
3141
3142 2006-12-24  Jim Meyering  <jim@meyering.net>
3143
3144         Work around an fchownat bug in glibc-2.4:
3145         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
3146         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
3147         in spite of the -P option.
3148         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
3149         New macros.
3150         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
3151         * modules/openat (Files): Add lib/fchownat.c.
3152         * lib/openat.c (fchownat): Don't define here.  Move to...
3153         * lib/fchownat.c: ...this new file.
3154
3155 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
3156
3157         Fix bug reported by Bruno Haible in
3158         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
3159         where quotearg.c didn't compile on Mac OS X 10.2 because it
3160         lacks <wchar.h> and wint_t.
3161         * lib/wctype_.h (__wctype_wint_t): New type.
3162         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
3163         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
3164         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
3165         Arg is now of type __wctype_wint_t, not wint_t.
3166         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
3167         substitute HAVE_WINT_T.
3168         * modules/wctype (Files): Add m4/wint_t.m4.
3169         (wctype.h): Substitute HAVE_WINT_T.
3170
3171 2006-12-23  Bruno Haible  <bruno@clisp.org>
3172
3173         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
3174
3175 2006-12-23  Bruno Haible  <bruno@clisp.org>
3176
3177         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
3178         S_ISLNK.
3179         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
3180         mingw.
3181
3182 2006-12-22  Bruno Haible  <bruno@clisp.org>
3183
3184         * lib/copy-file.c: Include acl.h.
3185         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
3186         Close the file descriptors only after being done with copy_acl.
3187         * modules/copy-file (Depends-on): Add acl.
3188
3189 2006-12-22  Bruno Haible  <bruno@clisp.org>
3190
3191         * gnulib-tool (SED): New variable.
3192         Use $SED instead of sed everywhere.
3193
3194 2006-12-22  Bruno Haible  <bruno@clisp.org>
3195
3196         * modules/no-c++: New file.
3197         * m4/no-c++.m4: New file.
3198         * MODULES.html.sh (Support for building libraries and executables):
3199         Add no-c++.
3200
3201 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
3202
3203         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3204         Include <limits.h>, and use its INT_MAX to rewrite the
3205         j loop so that it does not overflow 'int'.  Problem reported by
3206         Ralf Wildenhues in
3207         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
3208         Play it safe by shifting left by 1 rather than multiplying by 2,
3209         as GCC is less likely to optimize this away when the value
3210         is signed (when it assumes overflow leads to undefined behavior).
3211         Also, don't assume time_t uses two's complement.
3212
3213 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
3214
3215         * MODULES.html.sh: New module wctype.
3216         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
3217         * lib/fnmatch.c: Don't bother to include <wchar.h> before
3218         <wctype.h>, since the new wctype module should fix this.
3219         * lib/quotearg.c: Include <wctype.h> unconditionally, since
3220         the wctype module should arrange for it.
3221         * lib/regex_internal.h: Likewise.
3222         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
3223         since the wctype module should handle this now.
3224         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
3225         * modules/fnmatch (Depends-on): Add wctype.
3226         * modules/quotearg (Depends-on): Likewise.
3227         * modules/regex (Depends-on): Likewise.
3228
3229 2006-12-19  Bruno Haible  <bruno@clisp.org>
3230
3231         * lib/strdup.h [C++]: Wrap definitions in extern "C".
3232         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
3233
3234 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3235
3236         * modules/savewd (Depends-on): Fix dependency on fcntl.
3237
3238 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
3239
3240         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
3241         conforms to C99, rather than relying on the user's environment
3242         setting of STDINT_H.
3243
3244 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
3245         and Eric Blake  <ebb9@byu.net>
3246
3247         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
3248         This is more consistent with the other defines here.
3249         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
3250         Port to z/OS.  Problem reported by Paul Gilmartin.
3251         Change local vars to use gl_ prefix rather than ac_.
3252         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
3253         with other defines.
3254         * modules/double-slash-root: New module.
3255         * modules/dirname (Files): Remove m4/double-slash-root.m4.
3256         (Depends-on): Add double-slash-root.
3257         * MODULES.html.sh (File system functions): Mention new module.
3258
3259 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
3260
3261         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
3262         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
3263         This is for the benefit of gzip, which doesn't do i18n.
3264
3265 2006-12-12  Jim Meyering  <jim@meyering.net>
3266
3267         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
3268         Reported by Andreas Schwab <schwab@suse.de>.
3269
3270 2006-12-12  Bruno Haible  <bruno@clisp.org>
3271
3272         Merge these changes.
3273         2006-09-05  Bruno Haible  <bruno@clisp.org>
3274         * lib/iconvme.c (iconv_string): No need to save and restore errno when
3275         iconv_alloc succeeded.
3276         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
3277         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
3278         test for " && dest " at the end - dest is always != NULL there. Call
3279         iconv with 4xNULL arguments initially, to reset the state. Call iconv
3280         with 2xNULL arguments, also to flush the state storage. Handle the
3281         IRIX iconv behaviour. Realloc the final result, to throw away unused
3282         memory.
3283
3284 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
3285
3286         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
3287         and fchmodat unconditionally, since glibc 2.4 has them.
3288         Problem reported by Arkadiusz Miskiewicz.
3289
3290 2006-12-10  Bruno Haible  <bruno@clisp.org>
3291
3292         * gnulib-tool (func_import): Show the include files only for those
3293         modules that are copied and specified.
3294         Reported by Karl Berry.
3295
3296 2006-12-08  Jim Meyering  <jim@meyering.net>
3297
3298         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
3299         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
3300
3301         * build-aux/announce-gen: Add two new options, both optional:
3302         --bootstrap-tools=TOOL_LIST
3303               a comma-separated list of tools, e.g.,
3304               autoconf,automake,bison,gnulib
3305         --gnulib-snapshot-date=DATE
3306               if gnulib is in the bootstrap tool list,
3307               then report this as the snapshot date.
3308               If not specified, use the current date/time.
3309               If you specify a date here, be sure it's UTC.
3310
3311 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3312
3313         * tests/test-argp-2.sh: Fix test to match actual output.
3314         (func_compare): Fix sed script to be portable.
3315
3316 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
3317
3318         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
3319         workaround for this case.  It is not autoconfigured now; offhand
3320         it's hard to see how to autoconfigure it.
3321
3322 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
3323
3324         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
3325         a directory that is about to be chowned.  Such a directory's
3326         initial file permissions should permit the owner only and this
3327         should not be changed until after the chown, since the group and
3328         other bits would be incorrect if they granted permission before
3329         the chown.
3330
3331         Fix porting problem for iswctype reported by Georg Schwarz in:
3332         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
3333         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
3334         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
3335         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
3336         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
3337
3338 2006-12-03  Jim Meyering  <jim@meyering.net>
3339
3340         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
3341         p->fts_statp may not yet be defined.
3342         (fts_read): Instead, set it in the caller, once p->fts_statp is
3343         sure to be defined, and corresponds to a top-level directory.
3344         This bug made du -x fail.  Here's the coreutils test case:
3345         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
3346         Reported by Mike Frysinger.
3347
3348 2006-12-01  Jim Meyering  <jim@meyering.net>
3349
3350         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
3351         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
3352         Reported by Simon Josefsson.
3353
3354 2006-11-30  Jim Meyering  <jim@meyering.net>
3355
3356         * m4/warning.m4: Use the all-permissive copyright notice
3357         recommended by RMS (rather than LGPL).
3358         * m4/vararrays.m4: Likewise.
3359         * m4/flexmember.m4: Likewise.
3360
3361 2006-11-29  Bruno Haible  <bruno@clisp.org>
3362
3363         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3364         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
3365         using +=.
3366         Reported by Simon Josefsson <simon@josefsson.org>.
3367
3368 2006-11-28  James Youngman <jay@gnu.org>
3369
3370         * README: Advise users that they might find the bug-gnulib@gnu.org
3371         and autotools-announce@gnu.org mailing lists useful.
3372
3373 2006-11-28  Bruno Haible  <bruno@clisp.org>
3374
3375         * m4/ptrdiff_max.m4: Remove file.
3376
3377 2006-11-21  Bruno Haible  <bruno@clisp.org>
3378
3379         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
3380         _AC_COMPUTE_INT.
3381         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3382         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
3383         _AC_COMPUTE_INT.
3384         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3385         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
3386         _AC_COMPUTE_INT.
3387         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3388
3389 2006-11-28  Jim Meyering  <jim@meyering.net>
3390
3391         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
3392         warning from "gcc -Wshadow" about shadowing the builtin.
3393
3394 2006-11-27  Bruno Haible  <bruno@clisp.org>
3395
3396         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
3397         _AC_COMPUTE_INT.
3398         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
3399
3400 2006-11-27  Bruno Haible  <bruno@clisp.org>
3401             Paul Eggert  <eggert@cs.ucla.edu>
3402
3403         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
3404
3405 2006-11-26  Bruno Haible  <bruno@clisp.org>
3406
3407         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3408         noinst_LTLIBRARIES.
3409
3410 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
3411             Bruno Haible  <bruno@clisp.org>
3412
3413         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
3414         if compiling with "gcc -ansi".
3415
3416 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
3417
3418         Fix some incompatibilities with gcc -ansi -pedantic.
3419         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
3420         if compiling pedantically with GCC, unless it's C99 or later.
3421         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
3422         it mishandles gcc -ansi -pedantic as well.
3423         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
3424         if gcc -pedantic.
3425         * lib/regexec.c (check_node_accept_bytes): Don't use auto
3426         initializers for struct if -pedantic, unless it's C99 or later.
3427
3428 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
3429
3430         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
3431         Don't close an fd more than once. Identical atimes indicate
3432         success, not failure.
3433
3434 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
3435
3436         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
3437
3438 2006-11-23  Jim Meyering  <jim@meyering.net>
3439
3440         * build-aux/announce-gen: New file.  From coreutils.
3441
3442 2006-11-22  Jim Meyering  <jim@meyering.net>
3443
3444         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
3445         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
3446         (fts_read): Use a temporary to narrow the overused st_size member
3447         before using it in a switch statement.  Reported by Matthew Woehlke.
3448
3449         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
3450         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
3451
3452 2006-11-20  Bruno Haible  <bruno@clisp.org>
3453
3454         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
3455         changequote instead of pairs of brackets.
3456         Reported by Andreas Schwab <schwab@suse.de>.
3457
3458 2006-11-21  Jim Meyering  <jim@meyering.net>
3459
3460         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
3461         so as to remain compatible with older compilers.
3462         Patch from Michael Deutschmann.
3463
3464 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3465
3466         * MODULES.html.sh (File system functions): Add openat.
3467
3468         * lib/openat.h (rpl_fstatat): New macro, if
3469         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
3470         (fstatat): Define to rpl_fstatat under the same conditions,
3471         unless COMPILING_FSTATAT.
3472         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
3473         seems to have the bug.
3474         * lib/fstatat.c: New file.
3475         * modules/openat (Files): Add it.
3476
3477 2006-11-20  Bruno Haible  <bruno@clisp.org>
3478
3479         * Makefile: New file.
3480
3481 2006-11-20  Jim Meyering  <jim@meyering.net>
3482
3483         The beginnings of syntax-related checks for gnulib.
3484         * lib/Makefile: New file.
3485         * lib/t-idcache: New script.  Ensure that the two halves of
3486         idcache.c stay in sync.
3487
3488         * lib/idcache.c: Adjust comments in user- and group- portions to
3489         be more accurate, and to be consistent with one another.
3490
3491 2006-11-20  Jim Meyering  <jim@meyering.net>
3492
3493         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
3494         continue using the flexible array member (thus, this module performs
3495         half as many malloc calls), with the addition that...
3496         (getgroup, getuser): Consistently record a non-match via an empty
3497         "name" string, and map an empty string match to a NULL return value.
3498         * modules/idcache (Depends-on): Re-add flexmember.
3499
3500         * lib/idcache.c (getuser): Remove all uses of the register keyword.
3501         (getuidbyname, getgroup, getgidbyname): Likewise.
3502
3503         Use cleaner syntax: NULL rather than 0.
3504         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
3505
3506 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
3507
3508         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
3509         It mishandled the case where the group was missing.
3510         Problem reported by Greg Schafer.
3511         * modules/idcache: Likewise.
3512
3513 2006-11-18  Jim Meyering  <jim@meyering.net>
3514
3515         * check-module (%exempt_header): Add exception for some
3516         conditionally-included headers.
3517
3518         * modules/i-ring (Depends-on): Add verify.
3519         (License): Change to LGPL.
3520
3521 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
3522
3523         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
3524         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
3525         and inttostr.h.  Use snprintf rather than uinttostr, so that
3526         LGPLed code doesn't depend on GPLed.
3527
3528 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
3529
3530         * modules/inline (License): Change from GPL to LGPL.
3531
3532 2006-11-17  Jim Meyering  <jim@meyering.net>
3533
3534         * modules/d-type (License): Switch to LGPL.
3535
3536 2006-11-15  Bruno Haible  <bruno@clisp.org>
3537
3538         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
3539
3540 2006-11-15  Eric Blake  <ebb9@byu.net>
3541
3542         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
3543         the module dependency.
3544
3545 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3546             Bruno Haible  <bruno@clisp.org>
3547
3548         * gnulib-tool (func_create_testdir): Add license consistency check.
3549
3550 2006-11-15  Eric Blake  <ebb9@byu.net>
3551
3552         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
3553         random "(cached)" in configure output.
3554
3555 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3556
3557         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
3558         test for conforming inttypes.h is both announced and cached.
3559
3560         * MODULES.html.sh (seen_modules, seen_files): New variables.
3561         (func_module): Rewrite to use a few less gnulib-tool and sed
3562         invocations.  Avoid a couple of quadratic algorithms for ...
3563         (missed_modules, missed_files): ... these, with ...
3564         (func_append, func_tmpdir): ... these new functions, from
3565         gnulib-tool.  Analogously, install traps for cleanup.
3566
3567         * tests/test-gc.c (main): Remove unused variables.
3568         * tests/test-read-file.c: Include stdlib.h, for 'free'.
3569
3570 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
3571
3572         * modules/inttostr (License): Change to LGPL.
3573
3574 2006-11-14  Eric Blake  <ebb9@byu.net>
3575
3576         * modules/tempname (License): Change to LGPL.
3577
3578 2006-11-14  Eric Blake  <ebb9@byu.net>
3579
3580         * doc/functions.texi (Function Portability): *printf functions on
3581         Cygwin now understand all POSIX size specifiers.
3582
3583 2006-11-14  Bruno Haible  <bruno@clisp.org>
3584
3585         * modules/c-ctype (License): Change to LGPL.
3586
3587 2006-11-12  Bruno Haible  <bruno@clisp.org>
3588
3589         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
3590         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
3591         for GNOME libraries, for which the include files are installed in
3592         subdirectories of $prefix/include.
3593
3594 2006-11-12  Bruno Haible  <bruno@clisp.org>
3595
3596         * m4/lib-link.m4: Require at least autoconf-2.54.
3597         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
3598         name to underscores for the --with option.
3599
3600 2006-11-13  Bruno Haible  <bruno@clisp.org>
3601
3602         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
3603         the tests directory.
3604         Reported by Ralf Wildenhues.
3605
3606 2006-11-13  Bruno Haible  <bruno@clisp.org>
3607
3608         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
3609         (func_emit_initmacro_end): Undo the override here.
3610         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
3611         Works around the famous automake error in coreutils.
3612
3613 2006-11-13  Eric Blake  <ebb9@byu.net>
3614
3615         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
3616         element, not its node.
3617
3618 2006-11-12  Bruno Haible  <bruno@clisp.org>
3619
3620         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
3621         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
3622
3623 2006-11-12  Bruno Haible  <bruno@clisp.org>
3624
3625         * gnulib-tool: New option --local-symlink.
3626         (func_usage): Document it.
3627         (lsymbolic): New variable.
3628         (func_import, func_create_testdir): If --symlink was not specified,
3629         test whether --local-symlink was specified and the file comes from
3630         the local_gnulib_dir.
3631
3632 2006-11-12  Bruno Haible  <bruno@clisp.org>
3633
3634         * gnulib-tool (func_ln): New function.
3635         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
3636
3637 2006-11-12  Bruno Haible  <bruno@clisp.org>
3638
3639         Finish support for source files in subdirectories.
3640         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
3641         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
3642         AUTOMAKE_OPTIONS.
3643         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
3644
3645 2006-11-12  Bruno Haible  <bruno@clisp.org>
3646
3647         * gnulib-tool (func_get_automake_snippet): Synthesize also an
3648         EXTRA_lib_SOURCES augmentation.
3649         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
3650
3651 2006-11-12  Jim Meyering  <jim@meyering.net>
3652
3653         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
3654         file descriptors.  This also averts a failure on systems with
3655         native openat support when a traversed directory lacks "x" access.
3656         * lib/fts_.h: Include "i-ring.h"
3657         (struct FTS) [fts_fd_ring]: New member.
3658         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
3659         (FCHDIR): Add parentheses.
3660         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
3661         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
3662         When descending, rather than simply closing the previous
3663         fts_cwd_fd value, push that file descriptor onto the ring.
3664         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
3665         (fts_open): Initialize the new fd_ring member.
3666         (fts_close): Clear the ring.
3667         (fts_safe_changedir): When possible, use our new fd_ring to skip
3668         the diropen and fstat and dev/ino comparison that would normally
3669         accompany a virtual `chdir ("..")'.
3670
3671         * modules/fts (Depends-on): Add i-ring.
3672         * modules/i-ring: New module.
3673         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
3674         * m4/i-ring.m4: New file.
3675
3676 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3677
3678         * gnulib-tool (func_create_testdir): Fix replacement of
3679         `build-aux' in configure.ac.  Run autotools in gltests
3680         subdirectory.
3681         (func_create_testdir, func_create_megatestdir, test): There is
3682         no need for '--force' in most autotool invocations in a new
3683         tree.  Actually fail the whole test if any of the tools, or the
3684         configure or make stages fail.
3685
3686         Sync from Automake.
3687         * build-aux/gnupload: Revert last change.  Add pointer to upload
3688         instructions of the GNU Maintenance Instructions.
3689         Suggestion by Karl Berry.
3690
3691 2006-11-10  Jim Meyering  <jim@meyering.net>
3692
3693         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
3694
3695 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3696
3697         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
3698         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
3699         (bind_textdomain_codeset) [! ENABLE_NLS]:
3700         Evaluate all the arguments.  That way, callers get compatible behavior
3701         if the arguments have side effects.  Also, it avoids some GCC
3702         diagnostics in some cases; Joel E. Denny reported problems when Bison
3703         was configured with --enable-gcc-warnigs.
3704
3705 2006-11-10  Jim Meyering  <jim@meyering.net>
3706
3707         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
3708         relevant options in CFLAGS (like -O, -fno-inline) are taken into
3709         account.
3710
3711 2006-11-10  Jim Meyering  <jim@meyering.net>
3712
3713         * modules/inline: New file/module.
3714         * modules/xalloc (Files): Remove m4/inline.m4.
3715         (Depends-on): Add inline, instead.
3716         * modules/oset: Likewise.
3717         * modules/list: Likewise.
3718
3719 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
3720
3721         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
3722         Problem reported by Matthew Woehlke.
3723
3724 2006-11-09  Bruno Haible  <bruno@clisp.org>
3725
3726         * lib/tempname.c (gen_tempname): Remove variant that invokes
3727         __gen_tempname.
3728         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
3729         __gen_tempname.
3730
3731 2006-11-08  Bruno Haible  <bruno@clisp.org>
3732
3733         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
3734         to 'yes' instead of 'cross-compiling'.
3735
3736 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
3737
3738         * lib/quotearg.h (quotearg_free): New decl.
3739         * lib/quotearg.c (quotearg_free): New function.
3740         (slot0, nslots, slotvec0, slotvec):
3741         Now file-scope so that quotearg_free can get at them.
3742
3743 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3744
3745         Sync from Automake.
3746         * build-aux/gnupload: Add missing 'gnu' to example URL.
3747         Report by Karl Berry.
3748
3749 2006-11-08  Bruno Haible  <bruno@clisp.org>
3750
3751         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
3752         Suggested by Paul Eggert.
3753
3754 2006-11-08  Jim Meyering  <jim@meyering.net>
3755
3756         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
3757         It's already included if !_LIBC.
3758         (fts_safe_changedir): Add a comment.
3759
3760 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3761
3762         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
3763         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
3764         Matthew Woehlke.
3765
3766         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
3767         definitions up, to avoid colliding with change below.
3768         (static_inline) [HAVE_INLINE]: New macro.
3769         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
3770         Provide extern decls when !HAVE_INLINE.  Do not define unless
3771         static_inline is defined, either by us or by xmalloc.c.  Use
3772         static_inline rather than static inline.
3773         (XCALLOC): Optimize sizeof(T) = 1 case.
3774         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
3775
3776 2006-11-07  Bruno Haible  <bruno@clisp.org>
3777
3778         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
3779         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
3780         AC_C_INLINE.
3781         * modules/xalloc (Files): Add m4/inline.m4.
3782
3783 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3784
3785         * README: Fix typo.
3786         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
3787         (Miscellanous Notes): ...from this.
3788
3789 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
3790
3791         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
3792         Mention that offsetof should be used instead of sizeof.
3793         From Bruno Haible.
3794
3795 2006-11-07  Bruno Haible  <bruno@clisp.org>
3796
3797         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
3798
3799 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3800
3801         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3802         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
3803         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3804         (gl_tree_add_before, gl_tree_add_after):
3805         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
3806         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
3807         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3808         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
3809         (gl_linked_add_after, gl_linked_add_at): Likewise.
3810         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
3811         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
3812         (gl_tree_add_before, gl_tree_add_after): Likewise.
3813         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
3814         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
3815         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
3816
3817 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3818
3819         * lib/gl_oset.h: Use C comment style, not C++ comment style.
3820
3821 2006-11-06  Bruno Haible  <bruno@clisp.org>
3822
3823         * m4/inline.m4: New file.
3824         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
3825         * modules/list (Files): Add m4/inline.m4.
3826         * modules/oset (Files): Likewise.
3827
3828 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
3829
3830         * lib/idcache.c: Include <stddef.h>, for offsetof.
3831         (struct userid.name): Change from char * to a flexible array member.
3832         All uses changed.
3833         * modules/idcache (Depends-on): Add flexmember.
3834
3835         * MODULES.html.sh (Core language properties): New module flexmember.
3836         * modules/flexmember, m4/flexmember.m4: New files.
3837
3838         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
3839         inline functions that are identical with the old xnmalloc_inline,
3840         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
3841         that we can avoid some unnecessary integer multiplications and
3842         divisions in the common case where the element size is known at
3843         compile time.
3844         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
3845         needed.
3846         (xnboundedmalloc): Remove.
3847         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
3848         arguments, for consistency with rest of this header.
3849         (xcharalloc): Rewrite using XNMALLOC.
3850         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
3851         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
3852         versions have been moved to lib/xalloc.h and renamed to be the
3853         non-*_inline versions.
3854         (xmalloc, xrealloc): Implement without reference to the xnmalloc
3855         and xnrealloc functions, since those functions are now inline and
3856         now call us.
3857         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
3858         renaming described above.
3859         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
3860         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
3861         captures the dependency in AC_C_INLINE.
3862
3863         New module canonicalize-lgpl, proposed by Charles Wilson in
3864         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
3865         with a few small changes afterwards.
3866         * MODULES.html.sh (File system functions): New module
3867         canonicalize-lgpl.
3868         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
3869         and canonicalize_file_name.
3870         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
3871         * modules/canonicalize-lgpl: New files.
3872
3873 2006-11-05  Bruno Haible  <bruno@clisp.org>
3874
3875         * gnulib-tool (func_import, func_create_testdir): Create directories
3876         also for files in subdirectories of lib/.
3877
3878 2006-11-05  Bruno Haible  <bruno@clisp.org>
3879
3880         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
3881         ANSI C compliant.
3882
3883 2006-11-03  Bruno Haible  <bruno@clisp.org>
3884
3885         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
3886         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
3887         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
3888         (xnboundedmalloc): New inline function.
3889         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
3890         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
3891         xmalloc.
3892         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
3893         xmalloc.
3894         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
3895         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
3896         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
3897         xmalloc.
3898         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3899         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
3900         xmalloc.
3901         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
3902         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3903         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
3904         xmalloc.
3905         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
3906         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
3907         gl_tree_add_after): Use XMALLOC instead of xmalloc.
3908         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
3909         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
3910         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
3911         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
3912
3913 2006-11-03  Bruno Haible  <bruno@clisp.org>
3914
3915         * lib/c-ctype.h [C++]: Define functions without name mangling.
3916         * lib/fwriteerror.h [C++]: Likewise.
3917         * lib/gcd.h [C++]: Likewise.
3918         * lib/linebreak.h [C++]: Likewise.
3919
3920 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
3921
3922         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
3923         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
3924         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
3925         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3926         Check for functions and headers just once.
3927         Check for declaration of canonicalize_file_name.
3928         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
3929
3930 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3931
3932         * gnulib-tool (func_import): Fix typo in actioncmd.
3933
3934 2006-11-02  Bruno Haible  <bruno@clisp.org>
3935
3936         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
3937         newline sequence in the Makefile.am snippet as a space, like "make"
3938         does.
3939         Reported by Roger Persson <perrog@gmail.com>.
3940
3941 2006-11-01  Bruno Haible  <bruno@clisp.org>
3942
3943         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
3944         already declared in <string.h>.
3945         * lib/strcase.h (strncasecmp): Don't declare it if yes.
3946
3947 2006-11-01  Bruno Haible  <bruno@clisp.org>
3948
3949         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
3950         * lib/strcase.h: Include <string.h>.
3951         (strcasecmp): Define to rpl_strcasecmp here.
3952
3953 2006-11-01  Bruno Haible  <bruno@clisp.org>
3954
3955         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
3956
3957 2006-11-01  Eric Blake  <ebb9@byu.net>
3958
3959         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
3960
3961         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
3962
3963 2006-10-29  Bruno Haible  <bruno@clisp.org>
3964
3965         Make it compile in C++ mode.
3966         * lib/full-write.c (full_rw): Add a cast.
3967
3968 2006-11-01  Bruno Haible  <bruno@clisp.org>
3969
3970         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
3971         be POSIX compliant.
3972         Reported by Roger Persson <perrog@gmail.com>.
3973
3974 2006-11-01  Eric Blake  <ebb9@byu.net>
3975
3976         * lib/getopt_.h: Fix comments.
3977
3978 2006-10-31  Eric Blake  <ebb9@byu.net>
3979
3980         * modules/tmpdir (Depends-on): Add sys_stat.
3981         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
3982         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
3983         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
3984         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
3985         tempname.
3986
3987 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
3988
3989         Avoid some C++ diagnostics reported by Bruno Haible.
3990         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
3991         xmalloc.
3992         (quotearg_alloc): Use xcharalloc rather than xmalloc.
3993         (struct slotvec): Move to top level.
3994         (quotearg_n_options): Rewrite to avoid xmalloc.
3995         * lib/xalloc.h (xcharalloc): New function.
3996         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
3997         [defined __cplusplus]: Add function template that provides result
3998         type propagation.  This part of the change is from Bruno Haible.
3999
4000 2006-10-29  Bruno Haible  <bruno@clisp.org>
4001
4002         Make it compile in C++ mode.
4003         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
4004         * lib/strnlen1.c (strnlen1): Cast memchr result.
4005         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
4006         * lib/clean-temp.c (string_equals, string_hash): Add casts.
4007         (create_temp_dir): Rename local variable 'template'.
4008         (compile_csharp_using_sscli): Add cast.
4009         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
4010         * lib/findprog.c (find_in_path): Likewise.
4011         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
4012         * lib/wait-process.c (register_slave_subprocess): Likewise.
4013
4014 2006-10-22  Bruno Haible  <bruno@clisp.org>
4015
4016         * modules/tsearch: New file.
4017         * lib/tsearch.h: New file.
4018         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
4019         * m4/tsearch.m4: New file.
4020         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
4021
4022 2006-10-29  Eric Blake  <ebb9@byu.net>
4023
4024         * lib/arcfour.c: Assume config.h.
4025         * lib/arctwo.c: Likewise.
4026         * lib/base64.c: Likewise.
4027         * lib/check-version.c: Likewise.
4028         * lib/crc.c: Likewise.
4029         * lib/des.c: Likewise.
4030         * lib/gc-gnulib.c: Likewise.
4031         * lib/gc-libgcrypt.c: Likewise.
4032         * lib/gc-pbkdf2-sha1.c: Likewise.
4033         * lib/getaddrinfo.c: Likewise.
4034         * lib/getdelim.c: Likewise.
4035         * lib/getline.c: Likewise.
4036         * lib/hmac-md5.c: Likewise.
4037         * lib/hmac-sha1.c: Likewise.
4038         * lib/iconvme.c: Likewise.
4039         * lib/md2.c: Likewise.
4040         * lib/md4.c: Likewise.
4041         * lib/memxor.c: Likewise.
4042         * lib/read-file.c: Likewise.
4043         * lib/readline.c: Likewise.
4044         * lib/rijndael-alg-fst.c: Likewise.
4045         * lib/rijndael-api-fst.c: Likewise.
4046         * lib/xgetdomainname.c: Likewise.
4047
4048 2006-10-28  Eric Blake  <ebb9@byu.net>
4049
4050         * lib/xstrndup.c: Assume config.h.
4051
4052 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
4053
4054         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
4055         stat-macros.h is now for our own macros, whereas stat_h is for
4056         macros in the <sys/stat.h> name space.
4057         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
4058         (STAT_MACROS_H): Remove.
4059         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
4060         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
4061         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
4062         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
4063         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
4064         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
4065         Move these macros to ...
4066         * lib/stat_.h: here.  Don't include stat-macros.h.
4067         * lib/canonicalize.c: Don't include stat-macros.h.
4068         * lib/chown.c: Likewise.
4069         * lib/euidaccess.c: Likewise.
4070         * lib/file-type.c: Likewise.
4071         * lib/filemode.c: Likewise.
4072         * lib/glob.c: Likewise.
4073         * lib/isapipe.c: Likewise.
4074         * lib/lchown.c: Likewise.
4075         * lib/lstat.c: Likewise.
4076         * lib/mkdir-p.c: Likewise.
4077         * lib/rmdir.c: Likewise.
4078         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
4079         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
4080         unless mkdir isn't declared, to speed up 'configure'.
4081         Always create sys/stat.h, since it's unlikely any real sys/stat.h
4082         would define all the S_* symbols.
4083         * modules/canonicalize (Depends-on):
4084         Depend on sys_stat, not stat-macros.
4085         * modules/chown: Likewise.
4086         * modules/euidaccess: Likewise.
4087         * modules/filemode: Likewise.
4088         * modules/file-type: Likewise.
4089         * modules/glob: Likewise.
4090         * modules/isapipe: Likewise.
4091         * modules/lchown: Likewise.
4092         * modules/lstat: Likewise.
4093         * modules/mkancesdirs: Likewise.
4094         * modules/rmdir: Likewise.
4095         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
4096         * modules/modechange: Likewise.
4097         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
4098         (configure.ac): Remove gl_STAT_MACROS.
4099         * modules/sys_stat (Depends-on): Remove stat-macros.
4100
4101 2006-10-27  Bruno Haible  <bruno@clisp.org>
4102
4103         * m4/signed.m4: Remove file.
4104         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
4105         invocation.
4106         * modules/vasnprintf (Files): Remove m4/signed.m4.
4107
4108 2006-10-27  Bruno Haible  <bruno@clisp.org>
4109
4110         Update to GNU gettext 0.16.
4111         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
4112         m4/inttypes-h.m4, m4/signed.m4.
4113         * m4/gettext.m4: Update to GNU gettext 0.16.
4114         * m4/intl.m4: New file, from GNU gettext.
4115         * m4/intldir.m4: New file, from GNU gettext.
4116         * config/srclist.txt: Update
4117
4118 2006-10-27  Eric Blake  <ebb9@byu.net>
4119
4120         * MODULES.html.sh: Document tempname.
4121         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
4122         dependencies.
4123         (Files): Move lib/tempname.c...
4124         * modules/tempname: ...to this new module.
4125         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
4126         (gl_PREREQ_TEMPNAME): Move...
4127         * m4/tempname.m4: ...to this new file.
4128         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
4129         * modules/sys_stat (Depends-on): Add stat-macros.
4130         * lib/stat_.h (includes): Pick up stat macros.
4131         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
4132         if stat macros are broken.
4133         * lib/tempname.c (includes): No need to include "stat-macros.h".
4134         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
4135         (direxists, __path_search) [!_LIBC]: Don't compile these in
4136         gnulib; the tmpdir module covers that.
4137         * lib/tempname.h: New file.
4138
4139 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
4140
4141         * COPYING: Explain how gnulib-tool converts licence headers.
4142         Almost all wording by Eric Blake.
4143
4144 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
4145
4146         * lib/mbchar.h (is_basic_table): Make read-only.
4147         * lib/mbchar.c (is_basic_table): Likewise.
4148         Reported by John Darrington.
4149
4150 2006-10-25  Bruno Haible  <bruno@clisp.org>
4151
4152         * lib/progname.h (set_program_name): Undefine before defining.
4153
4154 2006-10-25  Bruno Haible  <bruno@clisp.org>
4155
4156         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
4157         false for non-gcc C++ compilers.
4158         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
4159
4160 2006-10-24  Bruno Haible  <bruno@clisp.org>
4161
4162         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
4163         iconv implementations like Irix iconv.
4164
4165 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4166
4167         * modules/vararrays: New file.
4168         * m4/vararrays.m4: New file, taken from diffutils.
4169         * MODULES.html.sh: New module vararrays.
4170
4171 2006-10-24  Karl Berry  <karl@gnu.org>
4172
4173         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
4174         Don't call GNU Unix.
4175
4176 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4177
4178         * users.txt: Add Libtool.
4179
4180         Sync from Libtool:
4181
4182         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4183
4184         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
4185         to gnulib's policy of including config.h unconditionally.
4186
4187 2006-10-24  Bruno Haible  <bruno@clisp.org>
4188
4189         * modules/wcwidth (Files): Add m4/wint_t.m4.
4190         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
4191         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
4192
4193 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4194
4195         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
4196         to pacify GCC with some -W flags enabled.  Problem reported by
4197         Bruno Haible.
4198
4199 2006-10-24  Jim Meyering  <jim@meyering.net>
4200
4201         * MODULES.html.sh: Remove uinttostr.  It's not a module.
4202         Reported by Karl Berry.
4203
4204 2006-10-23  Bruno Haible  <bruno@clisp.org>
4205
4206         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
4207
4208 2006-10-24  Bruno Haible  <bruno@clisp.org>
4209
4210         * lib/gl_list.h: Use C comment style, not C++ comment style.
4211
4212 2006-10-23  Eric Blake  <ebb9@byu.net>
4213
4214         * lib/getaddrinfo.c (includes): Add missing include.
4215
4216 2006-10-23  Bruno Haible  <bruno@clisp.org>
4217             Paul Eggert  <eggert@cs.ucla.edu>
4218
4219         Ability to rename obstack_free.
4220         * lib/obstack.h (__obstack_free): New macro. Declare instead of
4221         obstack_free.
4222         (obstack_free): Invoke the __obstack_free macro.
4223         * lib/obstack.c (obstack_free): Use __obstack_free macro.
4224
4225 2006-10-23  Bruno Haible  <bruno@clisp.org>
4226             Paul Eggert  <eggert@cs.ucla.edu>
4227
4228         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
4229         __argc, __argv from the declaration. (They are defined as macros on
4230         mingw.)
4231
4232 2006-10-22  Bruno Haible  <bruno@clisp.org>
4233
4234         * doc/gnulib-intro.texi: New file.
4235         * doc/gnulib.texi: Include it.
4236
4237 2006-10-21  Bruno Haible  <bruno@clisp.org>
4238
4239         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
4240         "Introduction", "Miscellanous Notes", "Particular Modules".
4241
4242 2006-10-21  Bruno Haible  <bruno@clisp.org>
4243
4244         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4245         Change mostlyclean-local rule to avoid sh syntax error from bash
4246         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
4247
4248 2006-10-23  Jim Meyering  <jim@meyering.net>
4249
4250         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
4251         in place of snprintf.
4252
4253         * modules/inttostr (Files): Add lib/uinttostr.c.
4254         * lib/uinttostr.c (inttostr): New file/function.
4255         * lib/inttostr.h (uinttostr): Declare.
4256         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
4257         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
4258         Add uinttostr.
4259         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
4260
4261 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
4262
4263         * lib/canonicalize.c (ELOOP): Define if not already defined.
4264         Problem reported by Bruno Haible in
4265         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
4266
4267 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
4268
4269         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
4270         Problem reported by Perry Smith and Ville Laurikari.
4271
4272         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
4273         uses.
4274
4275 2006-10-19  Bruno Haible  <bruno@clisp.org>
4276
4277         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
4278         for mingw.
4279
4280 2006-10-19  Bruno Haible  <bruno@clisp.org>
4281
4282         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
4283         Needed for mingw.
4284
4285 2006-10-19  Bruno Haible  <bruno@clisp.org>
4286
4287         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
4288
4289 2006-10-19  Bruno Haible  <bruno@clisp.org>
4290
4291         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
4292         it.
4293
4294 2006-10-19  Bruno Haible  <bruno@clisp.org>
4295
4296         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
4297         invocation.
4298
4299 2006-10-19  Bruno Haible  <bruno@clisp.org>
4300
4301         * gnulib-tool (func_create_testdir): Don't include ftruncate and
4302         mountlist by default.
4303
4304 2006-10-16  Bruno Haible  <bruno@clisp.org>
4305
4306         * lib/c-strstr.c: Include c-strstr.h.
4307
4308 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4309
4310         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
4311         in a slash.
4312
4313 2006-10-18  Bruno Haible  <bruno@clisp.org>
4314
4315         * lib/lock.h [C++]: Wrap definitions in extern "C".
4316
4317 2006-10-18  Bruno Haible  <bruno@clisp.org>
4318
4319         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
4320         gl_LIBOBJS list.
4321
4322 2006-10-18  Bruno Haible  <bruno@clisp.org>
4323
4324         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
4325
4326 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
4327
4328         * lib/xstrtol.h: Include gettext.h.
4329         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
4330         Problem reported by Eric Blake.
4331         * modules/xstrtol (Depends-on): Add gettext-h.
4332
4333 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
4334
4335         * lib/strftime.c (advance): New macro.
4336         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
4337         incomplete type, so you can't add 0 to it.  Problem and patch
4338         reported by Eelco Dolstra for dietlibc.
4339
4340 2006-10-18  Jim Meyering  <jim@meyering.net>
4341
4342         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
4343         type for a local, and rename it: s/up/user_proc/.
4344
4345 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
4346
4347         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
4348         READ_UTMP_USER_PROCESS.
4349         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
4350
4351 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
4352
4353         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
4354         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
4355
4356 2006-10-17  Eric Blake  <ebb9@byu.net>
4357
4358         * lib/sigprocmask.c (sigprocmask): Fix typo.
4359
4360         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
4361
4362         * modules/clean-temp (Makefile.am): Don't add to make output...
4363         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
4364         config.h.
4365
4366 2006-10-17  Bruno Haible  <bruno@clisp.org>
4367
4368         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
4369         differently if DEFAULT_TEXT_DOMAIN is set.
4370
4371 2006-10-16  Bruno Haible  <bruno@clisp.org>
4372
4373         * lib/clean-temp.c: Include fwriteerror.h.
4374
4375 2006-10-16  Bruno Haible  <bruno@clisp.org>
4376
4377         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
4378
4379 2006-10-16  Bruno Haible  <bruno@clisp.org>
4380
4381         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
4382         * lib/sigprocmask.h: Include <sys/types.h>.
4383         (sigset_t): Use the system's definition if present.
4384
4385 2006-10-17  Eric Blake  <ebb9@byu.net>
4386
4387         * lib/xvasprintf.c (includes): Assume config.h.
4388         * lib/xasprintf.c (includes): Likewise.
4389
4390 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
4391
4392         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
4393         at least as wide as intmax_t.
4394
4395 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
4396
4397         (Imported from Automake.)
4398         * build-aux/gnupload: Update to version 1.1 of directive file.
4399
4400 2006-10-16  Eric Blake  <ebb9@byu.net>
4401
4402         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
4403         match Automake 1.10a.
4404
4405 2006-10-14  Bruno Haible  <bruno@clisp.org>
4406
4407         * modules/sigprocmask: New file.
4408         * lib/sigprocmask.h: New file.
4409         * lib/sigprocmask.c: New file.
4410         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
4411         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
4412         request sigprocmask.o.
4413         (gl_PREREQ_SIGPROCMASK): New macro.
4414         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
4415         (Depends-on): Add sigprocmask.
4416         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
4417         gt_SIGNALBLOCKING. Test for 'raise' only once.
4418         * lib/fatal-signal.c: Include sigprocmask.h.
4419         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
4420         unblock_fatal_signals): Define always.
4421         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
4422         sigprocmask.
4423
4424 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
4425
4426         Sync from Automake.
4427         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
4428         which incorrectly sets the mode of an existing destination
4429         directory.  In some cases the unpatched install-sh could do the
4430         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
4431         system.  We hope this is rare in practice, but it's clearly worth
4432         fixing.  Problem reported by Alex Unleashed in
4433         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
4434         Also, don't bother to check for -m bugs unless we're using -m;
4435         suggested by Stepan Kasal.
4436
4437 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4438
4439         Sync from Automake.
4440         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
4441         `-c' flag, so they appear at the same position as in %FASTDEP%
4442         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
4443         which ignores unknown options only after the first non-option.
4444         Bug report against M4 by Nelson H. F. Beebe.
4445
4446 2006-10-13  Jim Meyering  <jim@meyering.net>
4447
4448         Fix a bug in yesterday's change.
4449         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
4450         p->fts_statp->st_dev would be used uninitialized.
4451         Ensures that we always call fts_stat on the very first entry.
4452         Miklos Szeredi reported that find -xdev stopped working.
4453
4454 2006-10-12  Bruno Haible  <bruno@clisp.org>
4455
4456         * gnulib-tool (func_get_automake_snippet): Append an automatically
4457         computed EXTRA_DIST augmentation.
4458         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
4459         * modules/alloca-opt (Makefile.am): Likewise.
4460         * modules/allocsa (Makefile.am): Likewise.
4461         * modules/arcfour (Makefile.am): Likewise.
4462         * modules/arctwo (Makefile.am): Likewise.
4463         * modules/argmatch (Makefile.am): Likewise.
4464         * modules/argz (Makefile.am): Likewise.
4465         * modules/atexit (Makefile.am): Likewise.
4466         * modules/backupfile (Makefile.am): Likewise.
4467         * modules/byteswap (Makefile.am): Likewise.
4468         * modules/c-strtod (Makefile.am): Likewise.
4469         * modules/c-strtold (Makefile.am): Likewise.
4470         * modules/calloc (Makefile.am): Likewise.
4471         * modules/canon-host (Makefile.am): Likewise.
4472         * modules/canonicalize (Makefile.am): Likewise.
4473         * modules/chdir-long (Makefile.am): Likewise.
4474         * modules/chdir-safer (Makefile.am): Likewise.
4475         * modules/check-version (Makefile.am): Likewise.
4476         * modules/chown (Makefile.am): Likewise.
4477         * modules/cloexec (Makefile.am): Likewise.
4478         * modules/close-stream (Makefile.am): Likewise.
4479         * modules/closeout (Makefile.am): Likewise.
4480         * modules/crc (Makefile.am): Likewise.
4481         * modules/csharpexec (Makefile.am): Likewise.
4482         * modules/cycle-check (Makefile.am): Likewise.
4483         * modules/des (Makefile.am): Likewise.
4484         * modules/dev-ino (Makefile.am): Likewise.
4485         * modules/dirfd (Makefile.am): Likewise.
4486         * modules/dirname (Makefile.am): Likewise.
4487         * modules/dup2 (Makefile.am): Likewise.
4488         * modules/eealloc (Makefile.am): Likewise.
4489         * modules/error (Makefile.am): Likewise.
4490         * modules/euidaccess (Makefile.am): Likewise.
4491         * modules/exclude (Makefile.am): Likewise.
4492         * modules/exitfail (Makefile.am): Likewise.
4493         * modules/fcntl-safer (Makefile.am): Likewise.
4494         * modules/fcntl (Makefile.am): Likewise.
4495         * modules/file-type (Makefile.am): Likewise.
4496         * modules/fileblocks (Makefile.am): Likewise.
4497         * modules/filemode (Makefile.am): Likewise.
4498         * modules/filenamecat (Makefile.am): Likewise.
4499         * modules/fnmatch (Makefile.am): Likewise.
4500         * modules/fopen-safer (Makefile.am): Likewise.
4501         * modules/fpending (Makefile.am): Likewise.
4502         * modules/fprintftime (Makefile.am): Likewise.
4503         * modules/free (Makefile.am): Likewise.
4504         * modules/fsusage (Makefile.am): Likewise.
4505         * modules/ftruncate (Makefile.am): Likewise.
4506         * modules/fts (Makefile.am): Likewise.
4507         * modules/gc-arcfour (Makefile.am): Likewise.
4508         * modules/gc-des (Makefile.am): Likewise.
4509         * modules/gc-hmac-md5 (Makefile.am): Likewise.
4510         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
4511         * modules/gc-md4 (Makefile.am): Likewise.
4512         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4513         * modules/gc-sha1 (Makefile.am): Likewise.
4514         * modules/gc (Makefile.am): Likewise.
4515         * modules/getaddrinfo (Makefile.am): Likewise.
4516         * modules/getcwd (Makefile.am): Likewise.
4517         * modules/getdelim (Makefile.am): Likewise.
4518         * modules/getdomainname (Makefile.am): Likewise.
4519         * modules/getgroups (Makefile.am): Likewise.
4520         * modules/gethostname (Makefile.am): Likewise.
4521         * modules/gethrxtime (Makefile.am): Likewise.
4522         * modules/getline (Makefile.am): Likewise.
4523         * modules/getloadavg (Makefile.am): Likewise.
4524         * modules/getlogin_r (Makefile.am): Likewise.
4525         * modules/getndelim2 (Makefile.am): Likewise.
4526         * modules/getopt (Makefile.am): Likewise.
4527         * modules/getpagesize (Makefile.am): Likewise.
4528         * modules/getpass-gnu (Makefile.am): Likewise.
4529         * modules/getpass (Makefile.am): Likewise.
4530         * modules/getsubopt (Makefile.am): Likewise.
4531         * modules/gettime (Makefile.am): Likewise.
4532         * modules/gettimeofday (Makefile.am): Likewise.
4533         * modules/getugroups (Makefile.am): Likewise.
4534         * modules/getusershell (Makefile.am): Likewise.
4535         * modules/glob (Makefile.am): Likewise.
4536         * modules/group-member (Makefile.am): Likewise.
4537         * modules/hard-locale (Makefile.am): Likewise.
4538         * modules/hash (Makefile.am): Likewise.
4539         * modules/hmac-md5 (Makefile.am): Likewise.
4540         * modules/hmac-sha1 (Makefile.am): Likewise.
4541         * modules/human (Makefile.am): Likewise.
4542         * modules/idcache (Makefile.am): Likewise.
4543         * modules/imaxabs (Makefile.am): Likewise.
4544         * modules/imaxdiv (Makefile.am): Likewise.
4545         * modules/inet_ntop (Makefile.am): Likewise.
4546         * modules/inet_pton (Makefile.am): Likewise.
4547         * modules/intprops (Makefile.am): Likewise.
4548         * modules/inttostr (Makefile.am): Likewise.
4549         * modules/inttypes (Makefile.am): Likewise.
4550         * modules/isapipe (Makefile.am): Likewise.
4551         * modules/javaversion (Makefile.am): Likewise.
4552         * modules/lchmod (Makefile.am): Likewise.
4553         * modules/lchown (Makefile.am): Likewise.
4554         * modules/localcharset (Makefile.am): Likewise.
4555         * modules/long-options (Makefile.am): Likewise.
4556         * modules/lstat (Makefile.am): Likewise.
4557         * modules/malloc (Makefile.am): Likewise.
4558         * modules/mathl (Makefile.am): Likewise.
4559         * modules/mbchar (Makefile.am): Likewise.
4560         * modules/md2 (Makefile.am): Likewise.
4561         * modules/md4 (Makefile.am): Likewise.
4562         * modules/md5 (Makefile.am): Likewise.
4563         * modules/memcasecmp (Makefile.am): Likewise.
4564         * modules/memchr (Makefile.am): Likewise.
4565         * modules/memcmp (Makefile.am): Likewise.
4566         * modules/memcoll (Makefile.am): Likewise.
4567         * modules/memcpy (Makefile.am): Likewise.
4568         * modules/memmem (Makefile.am): Likewise.
4569         * modules/memmove (Makefile.am): Likewise.
4570         * modules/mempcpy (Makefile.am): Likewise.
4571         * modules/memrchr (Makefile.am): Likewise.
4572         * modules/memset (Makefile.am): Likewise.
4573         * modules/memxor (Makefile.am): Likewise.
4574         * modules/mkancesdirs (Makefile.am): Likewise.
4575         * modules/mkdir-p (Makefile.am): Likewise.
4576         * modules/mkdir (Makefile.am): Likewise.
4577         * modules/mkdtemp (Makefile.am): Likewise.
4578         * modules/mkstemp (Makefile.am): Likewise.
4579         * modules/mktime (Makefile.am): Likewise.
4580         * modules/modechange (Makefile.am): Likewise.
4581         * modules/mountlist (Makefile.am): Likewise.
4582         * modules/nanosleep (Makefile.am): Likewise.
4583         * modules/obstack (Makefile.am): Likewise.
4584         * modules/openat (Makefile.am): Likewise.
4585         * modules/pagealign_alloc (Makefile.am): Likewise.
4586         * modules/pathmax (Makefile.am): Likewise.
4587         * modules/physmem (Makefile.am): Likewise.
4588         * modules/poll (Makefile.am): Likewise.
4589         * modules/posixtm (Makefile.am): Likewise.
4590         * modules/posixver (Makefile.am): Likewise.
4591         * modules/putenv (Makefile.am): Likewise.
4592         * modules/quote (Makefile.am): Likewise.
4593         * modules/quotearg (Makefile.am): Likewise.
4594         * modules/raise (Makefile.am): Likewise.
4595         * modules/read-file (Makefile.am): Likewise.
4596         * modules/readline (Makefile.am): Likewise.
4597         * modules/readlink (Makefile.am): Likewise.
4598         * modules/readtokens (Makefile.am): Likewise.
4599         * modules/readutmp (Makefile.am): Likewise.
4600         * modules/realloc (Makefile.am): Likewise.
4601         * modules/regex (Makefile.am): Likewise.
4602         * modules/rename-dest-slash (Makefile.am): Likewise.
4603         * modules/rename (Makefile.am): Likewise.
4604         * modules/rijndael (Makefile.am): Likewise.
4605         * modules/rmdir (Makefile.am): Likewise.
4606         * modules/rpmatch (Makefile.am): Likewise.
4607         * modules/safe-read (Makefile.am): Likewise.
4608         * modules/safe-write (Makefile.am): Likewise.
4609         * modules/same-inode (Makefile.am): Likewise.
4610         * modules/same (Makefile.am): Likewise.
4611         * modules/save-cwd (Makefile.am): Likewise.
4612         * modules/savedir (Makefile.am): Likewise.
4613         * modules/setenv (Makefile.am): Likewise.
4614         * modules/settime (Makefile.am): Likewise.
4615         * modules/sha1 (Makefile.am): Likewise.
4616         * modules/sig2str (Makefile.am): Likewise.
4617         * modules/snprintf (Makefile.am): Likewise.
4618         * modules/stat-macros (Makefile.am): Likewise.
4619         * modules/stat-time (Makefile.am): Likewise.
4620         * modules/stdbool (Makefile.am): Likewise.
4621         * modules/stdint (Makefile.am): Likewise.
4622         * modules/stdlib-safer (Makefile.am): Likewise.
4623         * modules/stpcpy (Makefile.am): Likewise.
4624         * modules/stpncpy (Makefile.am): Likewise.
4625         * modules/strcase (Makefile.am): Likewise.
4626         * modules/strcasestr (Makefile.am): Likewise.
4627         * modules/strchrnul (Makefile.am): Likewise.
4628         * modules/strcspn (Makefile.am): Likewise.
4629         * modules/strdup (Makefile.am): Likewise.
4630         * modules/strerror (Makefile.am): Likewise.
4631         * modules/strftime (Makefile.am): Likewise.
4632         * modules/strndup (Makefile.am): Likewise.
4633         * modules/strnlen (Makefile.am): Likewise.
4634         * modules/strpbrk (Makefile.am): Likewise.
4635         * modules/strsep (Makefile.am): Likewise.
4636         * modules/strstr (Makefile.am): Likewise.
4637         * modules/strtod (Makefile.am): Likewise.
4638         * modules/strtoimax (Makefile.am): Likewise.
4639         * modules/strtok_r (Makefile.am): Likewise.
4640         * modules/strtol (Makefile.am): Likewise.
4641         * modules/strtoll (Makefile.am): Likewise.
4642         * modules/strtoul (Makefile.am): Likewise.
4643         * modules/strtoull (Makefile.am): Likewise.
4644         * modules/strtoumax (Makefile.am): Likewise.
4645         * modules/strverscmp (Makefile.am): Likewise.
4646         * modules/sys_socket (Makefile.am): Likewise.
4647         * modules/sys_stat (Makefile.am): Likewise.
4648         * modules/sysexits (Makefile.am): Likewise.
4649         * modules/time_r (Makefile.am): Likewise.
4650         * modules/timegm (Makefile.am): Likewise.
4651         * modules/timespec (Makefile.am): Likewise.
4652         * modules/tmpfile-safer (Makefile.am): Likewise.
4653         * modules/trim (Makefile.am): Likewise.
4654         * modules/unistd-safer (Makefile.am): Likewise.
4655         * modules/unlinkdir (Makefile.am): Likewise.
4656         * modules/unlocked-io (Makefile.am): Likewise.
4657         * modules/userspec (Makefile.am): Likewise.
4658         * modules/utime (Makefile.am): Likewise.
4659         * modules/utimecmp (Makefile.am): Likewise.
4660         * modules/utimens (Makefile.am): Likewise.
4661         * modules/vasnprintf (Makefile.am): Likewise.
4662         * modules/vasprintf (Makefile.am): Likewise.
4663         * modules/vsnprintf (Makefile.am): Likewise.
4664         * modules/xalloc (Makefile.am): Likewise.
4665         * modules/xgetcwd (Makefile.am): Likewise.
4666         * modules/xnanosleep (Makefile.am): Likewise.
4667         * modules/xreadlink (Makefile.am): Likewise.
4668         * modules/xstrtod (Makefile.am): Likewise.
4669         * modules/xstrtol (Makefile.am): Likewise.
4670         * modules/xstrtold (Makefile.am): Likewise.
4671         * modules/yesno (Makefile.am): Likewise.
4672         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
4673
4674 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4675
4676         * modules/error (Makefile.am): Distribute files through
4677         EXTRA_DIST, not lib_SOURCES.
4678
4679 2006-10-12  Eric Blake  <ebb9@byu.net>
4680
4681         * modules/error (Makefile.am): Distribute files in /lib.
4682         * modules/obstack (Makefile.am): Likewise.
4683
4684 2006-10-12  Bruno Haible  <bruno@clisp.org>
4685
4686         * modules/acl (Makefile.am): Distribute all files in lib/ through
4687         EXTRA_DIST.
4688         * modules/arcfour (Makefile.am): Likewise.
4689         * modules/arctwo (Makefile.am): Likewise.
4690         * modules/argmatch (Makefile.am): Likewise.
4691         * modules/argz (Makefile.am): Likewise.
4692         * modules/atexit (Makefile.am): Likewise.
4693         * modules/backupfile (Makefile.am): Likewise.
4694         * modules/c-strtod (Makefile.am): Likewise.
4695         * modules/c-strtold (Makefile.am): Likewise.
4696         * modules/calloc (Makefile.am): Likewise.
4697         * modules/canon-host (Makefile.am): Likewise.
4698         * modules/canonicalize (Makefile.am): Likewise.
4699         * modules/chdir-long (Makefile.am): Likewise.
4700         * modules/chdir-safer (Makefile.am): Likewise.
4701         * modules/check-version (Makefile.am): Likewise.
4702         * modules/chown (Makefile.am): Likewise.
4703         * modules/cloexec (Makefile.am): Likewise.
4704         * modules/close-stream (Makefile.am): Likewise.
4705         * modules/closeout (Makefile.am): Likewise.
4706         * modules/crc (Makefile.am): Likewise.
4707         * modules/cycle-check (Makefile.am): Likewise.
4708         * modules/des (Makefile.am): Likewise.
4709         * modules/dirfd (Makefile.am): Likewise.
4710         * modules/dirname (Makefile.am): Likewise.
4711         * modules/dup2 (Makefile.am): Likewise.
4712         * modules/euidaccess (Makefile.am): Likewise.
4713         * modules/exclude (Makefile.am): Likewise.
4714         * modules/exitfail (Makefile.am): Likewise.
4715         * modules/fcntl-safer (Makefile.am): Likewise.
4716         * modules/file-type (Makefile.am): Likewise.
4717         * modules/fileblocks (Makefile.am): Likewise.
4718         * modules/filemode (Makefile.am): Likewise.
4719         * modules/filenamecat (Makefile.am): Likewise.
4720         * modules/fnmatch (Makefile.am): Likewise.
4721         * modules/fopen-safer (Makefile.am): Likewise.
4722         * modules/fpending (Makefile.am): Likewise.
4723         * modules/fprintftime (Makefile.am): Likewise.
4724         * modules/free (Makefile.am): Likewise.
4725         * modules/fsusage (Makefile.am): Likewise.
4726         * modules/ftruncate (Makefile.am): Likewise.
4727         * modules/fts (Makefile.am): Likewise.
4728         * modules/gc (Makefile.am): Likewise.
4729         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
4730         * modules/getaddrinfo (Makefile.am): Likewise.
4731         * modules/getcwd (Makefile.am): Likewise.
4732         * modules/getdelim (Makefile.am): Likewise.
4733         * modules/getdomainname (Makefile.am): Likewise.
4734         * modules/getgroups (Makefile.am): Likewise.
4735         * modules/gethostname (Makefile.am): Likewise.
4736         * modules/gethrxtime (Makefile.am): Likewise.
4737         * modules/getline (Makefile.am): Likewise.
4738         * modules/getloadavg (Makefile.am): Likewise.
4739         * modules/getlogin_r (Makefile.am): Likewise.
4740         * modules/getopt (Makefile.am): Likewise.
4741         * modules/getpass (Makefile.am): Likewise.
4742         * modules/getpass-gnu (Makefile.am): Likewise.
4743         * modules/getsubopt (Makefile.am): Likewise.
4744         * modules/gettime (Makefile.am): Likewise.
4745         * modules/gettimeofday (Makefile.am): Likewise.
4746         * modules/getugroups (Makefile.am): Likewise.
4747         * modules/getusershell (Makefile.am): Likewise.
4748         * modules/glob (Makefile.am): Likewise.
4749         * modules/group-member (Makefile.am): Likewise.
4750         * modules/hard-locale (Makefile.am): Likewise.
4751         * modules/hash (Makefile.am): Likewise.
4752         * modules/hmac-md5 (Makefile.am): Likewise.
4753         * modules/hmac-sha1 (Makefile.am): Likewise.
4754         * modules/human (Makefile.am): Likewise.
4755         * modules/idcache (Makefile.am): Likewise.
4756         * modules/imaxabs (Makefile.am): Likewise.
4757         * modules/imaxdiv (Makefile.am): Likewise.
4758         * modules/inet_ntop (Makefile.am): Likewise.
4759         * modules/inet_pton (Makefile.am): Likewise.
4760         * modules/inttostr (Makefile.am): Likewise.
4761         * modules/isapipe (Makefile.am): Likewise.
4762         * modules/lchown (Makefile.am): Likewise.
4763         * modules/long-options (Makefile.am): Likewise.
4764         * modules/lstat (Makefile.am): Likewise.
4765         * modules/malloc (Makefile.am): Likewise.
4766         * modules/mathl (Makefile.am): Likewise.
4767         * modules/mbchar (Makefile.am): Likewise.
4768         * modules/md2 (Makefile.am): Likewise.
4769         * modules/md4 (Makefile.am): Likewise.
4770         * modules/md5 (Makefile.am): Likewise.
4771         * modules/memcasecmp (Makefile.am): Likewise.
4772         * modules/memchr (Makefile.am): Likewise.
4773         * modules/memcmp (Makefile.am): Likewise.
4774         * modules/memcoll (Makefile.am): Likewise.
4775         * modules/memcpy (Makefile.am): Likewise.
4776         * modules/memmem (Makefile.am): Likewise.
4777         * modules/memmove (Makefile.am): Likewise.
4778         * modules/mempcpy (Makefile.am): Likewise.
4779         * modules/memrchr (Makefile.am): Likewise.
4780         * modules/memset (Makefile.am): Likewise.
4781         * modules/memxor (Makefile.am): Likewise.
4782         * modules/mkancesdirs (Makefile.am): Likewise.
4783         * modules/mkdir (Makefile.am): Likewise.
4784         * modules/mkdir-p (Makefile.am): Likewise.
4785         * modules/mkdtemp (Makefile.am): Likewise.
4786         * modules/mkstemp (Makefile.am): Likewise.
4787         * modules/mktime (Makefile.am): Likewise.
4788         * modules/modechange (Makefile.am): Likewise.
4789         * modules/mountlist (Makefile.am): Likewise.
4790         * modules/nanosleep (Makefile.am): Likewise.
4791         * modules/openat (Makefile.am): Likewise.
4792         * modules/pagealign_alloc (Makefile.am): Likewise.
4793         * modules/physmem (Makefile.am): Likewise.
4794         * modules/poll (Makefile.am): Likewise.
4795         * modules/posixtm (Makefile.am): Likewise.
4796         * modules/posixver (Makefile.am): Likewise.
4797         * modules/putenv (Makefile.am): Likewise.
4798         * modules/quote (Makefile.am): Likewise.
4799         * modules/quotearg (Makefile.am): Likewise.
4800         * modules/raise (Makefile.am): Likewise.
4801         * modules/read-file (Makefile.am): Likewise.
4802         * modules/readline (Makefile.am): Likewise.
4803         * modules/readlink (Makefile.am): Likewise.
4804         * modules/readtokens (Makefile.am): Likewise.
4805         * modules/readutmp (Makefile.am): Likewise.
4806         * modules/realloc (Makefile.am): Likewise.
4807         * modules/regex (Makefile.am): Likewise.
4808         * modules/rename (Makefile.am): Likewise.
4809         * modules/rename-dest-slash (Makefile.am): Likewise.
4810         * modules/rijndael (Makefile.am): Likewise.
4811         * modules/rmdir (Makefile.am): Likewise.
4812         * modules/rpmatch (Makefile.am): Likewise.
4813         * modules/safe-read (Makefile.am): Likewise.
4814         * modules/safe-write (Makefile.am): Likewise.
4815         * modules/same (Makefile.am): Likewise.
4816         * modules/save-cwd (Makefile.am): Likewise.
4817         * modules/savedir (Makefile.am): Likewise.
4818         * modules/setenv (Makefile.am): Likewise.
4819         * modules/settime (Makefile.am): Likewise.
4820         * modules/sha1 (Makefile.am): Likewise.
4821         * modules/sig2str (Makefile.am): Likewise.
4822         * modules/snprintf (Makefile.am): Likewise.
4823         * modules/stdlib-safer (Makefile.am): Likewise.
4824         * modules/stpcpy (Makefile.am): Likewise.
4825         * modules/stpncpy (Makefile.am): Likewise.
4826         * modules/strcase (Makefile.am): Likewise.
4827         * modules/strcasestr (Makefile.am): Likewise.
4828         * modules/strchrnul (Makefile.am): Likewise.
4829         * modules/strcspn (Makefile.am): Likewise.
4830         * modules/strdup (Makefile.am): Likewise.
4831         * modules/strerror (Makefile.am): Likewise.
4832         * modules/strftime (Makefile.am): Likewise.
4833         * modules/strndup (Makefile.am): Likewise.
4834         * modules/strnlen (Makefile.am): Likewise.
4835         * modules/strpbrk (Makefile.am): Likewise.
4836         * modules/strsep (Makefile.am): Likewise.
4837         * modules/strstr (Makefile.am): Likewise.
4838         * modules/strtod (Makefile.am): Likewise.
4839         * modules/strtoimax (Makefile.am): Likewise.
4840         * modules/strtok_r (Makefile.am): Likewise.
4841         * modules/strtol (Makefile.am): Likewise.
4842         * modules/strtoll (Makefile.am): Likewise.
4843         * modules/strtoul (Makefile.am): Likewise.
4844         * modules/strtoull (Makefile.am): Likewise.
4845         * modules/strtoumax (Makefile.am): Likewise.
4846         * modules/strverscmp (Makefile.am): Likewise.
4847         * modules/time_r (Makefile.am): Likewise.
4848         * modules/timegm (Makefile.am): Likewise.
4849         * modules/tmpfile-safer (Makefile.am): Likewise.
4850         * modules/unistd-safer (Makefile.am): Likewise.
4851         * modules/unlinkdir (Makefile.am): Likewise.
4852         * modules/userspec (Makefile.am): Likewise.
4853         * modules/utime (Makefile.am): Likewise.
4854         * modules/utimecmp (Makefile.am): Likewise.
4855         * modules/utimens (Makefile.am): Likewise.
4856         * modules/vasnprintf (Makefile.am): Likewise.
4857         * modules/vasprintf (Makefile.am): Likewise.
4858         * modules/vsnprintf (Makefile.am): Likewise.
4859         * modules/xalloc (Makefile.am): Likewise.
4860         * modules/xgetcwd (Makefile.am): Likewise.
4861         * modules/xnanosleep (Makefile.am): Likewise.
4862         * modules/xreadlink (Makefile.am): Likewise.
4863         * modules/xstrtod (Makefile.am): Likewise.
4864         * modules/xstrtol (Makefile.am): Likewise.
4865         * modules/xstrtold (Makefile.am): Likewise.
4866         * modules/yesno (Makefile.am): Likewise.
4867
4868 2006-10-12  Jim Meyering  <jim@meyering.net>
4869
4870         * m4/getloadavg.m4: Revert the change below.
4871
4872         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
4873         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
4874         fail with a symlink, which is what coreutils' ./bootstrap now
4875         creates by default.
4876
4877 2006-10-12  Bruno Haible  <bruno@clisp.org>
4878
4879         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
4880         mingw.
4881         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
4882         MSVC and mingw explicitly.
4883
4884 2006-10-11  Simon Josefsson  <jas@extundo.com>
4885             Bruno Haible  <bruno@clisp.org>
4886
4887         Add support for multiple gnulib-tool invocations in the scope of a
4888         single configure.ac file.
4889         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
4890         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
4891         with the same contents as the _LIBADD variable.
4892         (func_emit_initmacro_start, func_emit_initmacro_end,
4893         func_emit_initmacro_done): New functions.
4894         (func_import, func_create_testdir): Invoke them. Allow the identifiers
4895         gl_LIBOBJS and gl_LTLIBOBJS.
4896
4897 2006-10-11  Bruno Haible  <bruno@clisp.org>
4898
4899         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4900         (func_create_testdir): Don't create po/Makefile.am, don't invoke
4901         autoreconf. Instead, invoke autopoint explicitly but move back the
4902         *.m4 files from gnulib.
4903
4904 2006-10-11  Bruno Haible  <bruno@clisp.org>
4905
4906         * gnulib-tool (func_usage): Make module names after --create-testdir
4907         optional.
4908         (func_create_testdir): If no module was specified, use nearly all
4909         modules.
4910
4911 2006-10-12  Jim Meyering  <jim@meyering.net>
4912
4913         Big performance improvement for fts-based tools that use FTS_NOSTAT.
4914         Avoid spurious inode-mismatch problems on non-POSIX file systems.
4915         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
4916         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
4917         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
4918         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
4919         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
4920         (fts_set_stat_required): New function.
4921         (fts_open): Defer the calls to fts_stat, if possible or requested.
4922         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
4923         into fts_stat itself.
4924         (fts_read): Perform any required (deferred) fts_stat call.
4925         (fts_build): Likewise, for the directory we're about to open and read.
4926         In the readdir loop, carefully decide whether each entry will require
4927         an eventual call to fts_stat, using dirent.d_type info if available.
4928         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
4929         a command line argument into this function.  Update all callers.
4930         Map a return value of FTS_DOT to FTS_D for a command line argument.
4931         * modules/fts (Depends-on): Add d-type.  Alphabetize.
4932         Thanks to Miklos Szeredi for his tenacity and for the initial
4933         bug report about "find" failing on a FUSE-based file system.
4934
4935         * lib/fts.c (fts_open): Use consistent indentation.
4936
4937 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
4938
4939         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
4940         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
4941         reported by Jim Meyering.  All uses of cache variables renamed
4942         to match Autoconf's.
4943         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
4944         the other one.
4945
4946         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
4947         Fix misspelling in diagnostic.
4948
4949 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4950
4951         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
4952         defined.  Problem reported by Matthew Woehlke.
4953
4954         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
4955         Add support for Tandem NonStop R series.
4956         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
4957         Use new macro.
4958
4959         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
4960         (has_trailing_slash): Omit size arg; all callers changed.
4961         Omit 'inline', since it doesn't help performance and we'd
4962         need to configure it.
4963         Don't count //, ///, etc. as having a trailing slash.
4964         As a side effect, this removes a C99ism reported by Matthew Woehlke.
4965         (rpl_rename_dest_slash): On failure, use rename's errno rather
4966         than (in some cases) an incorrect or junk errno.
4967         Simplify code by removing need to compute length; this does
4968         cause it to make two passes instead of one over the file name,
4969         but it's worth it.
4970
4971         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
4972         change, since Autoconf's version may no longer be appropriate now
4973         that we are using CVS Autoconf's version.  Add support for Tandem.
4974
4975 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
4976             Bruno Haible  <bruno@clisp.org>
4977
4978         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
4979         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
4980         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
4981         gl_AC_TYPE_LONG_LONG.
4982
4983         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
4984         instead of HAVE_LONG_LONG.
4985         * lib/printf-args.c (printf_fetchargs): Likewise.
4986         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
4987         * lib/vasnprintf.c (VASNPRINTF): Likewise.
4988         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
4989         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
4990         gl_AC_TYPE_LONG_LONG.
4991
4992 2006-10-11  Bruno Haible  <bruno@clisp.org>
4993
4994         * m4/longlong.m4: Add comments.
4995         * m4/ulonglong.m4: Likewise.
4996
4997 2006-10-10  Bruno Haible  <bruno@clisp.org>
4998
4999         Make it possible to #define stpcpy, strdup to aliases.
5000         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
5001         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
5002
5003 2006-10-10  Bruno Haible  <bruno@clisp.org>
5004
5005         Make it possible to #define gcd to an alias.
5006         * lib/gcd.c: Include config.h.
5007
5008 2006-10-10  Bruno Haible  <bruno@clisp.org>
5009
5010         Make it possible to #define c_isascii to an alias.
5011         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
5012         defined. Undefine the macros before defining them, to avoid gcc
5013         warnings.
5014         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
5015         define NO_C_CTYPE_MACROS early.
5016
5017 2006-10-10  Bruno Haible  <bruno@clisp.org>
5018
5019         Make it possible to #define set_program_name to an alias.
5020         * lib/progname.c: Don't undefine set_program_name; instead, undefine
5021         ENABLE_RELOCATABLE early.
5022
5023 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
5024
5025         Port to Tandem NSK OSS, which has 64-bit signed int but at most
5026         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
5027         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
5028         More generally, don't assume that 64-bit signed int is available
5029         if unsigned int is, and vice versa.
5030         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
5031         unsigned symbols, not on their signed counterparts.
5032         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
5033         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
5034         (UINT64_C, UINTMAX_C):
5035         Likewise.
5036         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
5037         unsigned counterparts.
5038         (Have_long_long, Unsigned): New macros.
5039         (Int): Renamed from INT.
5040         (strtoimax): Use the new macros.
5041         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
5042         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
5043         * modules/inttypes (inttypes.h): Substitute
5044         HAVE_UNSIGNED_LONG_LONG_INT.
5045         * modules/stdint (stdint.h): Likewise.
5046         (Files): Add m4/ulonglong.m4.
5047
5048 2006-10-10  Bruno Haible  <bruno@clisp.org>
5049
5050         Fix a gcc -Wshadow warning.
5051         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
5052         to 'bucket'.
5053         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
5054         gl_linked_indexof_from_to): Likewise.
5055         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
5056         Likewise.
5057         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
5058         Likewise.
5059         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
5060         Reported by Eric Blake.
5061
5062 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
5063
5064         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
5065         for NetBSD.  Problem reported by Bruno Haible.
5066
5067 2006-10-09  Jim Meyering  <jim@meyering.net>
5068
5069         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
5070         Patch from Bruno Haible.
5071
5072 2006-10-09  Jim Meyering  <jim@meyering.net>
5073
5074         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
5075         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
5076         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
5077
5078 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
5079
5080         Don't include <config.h> twice; this doesn't work in some cases,
5081         e.g., when config.h has "#define intmax_t long long int" and
5082         we include <config.h>, <inttypes.h>, <config.h> in that order.
5083         Problem reported by Matthew Woehlke in:
5084         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
5085         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
5086         * lib/fts-cycle.c: Don't include config.h.
5087         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
5088         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
5089         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
5090         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
5091         inttypes.h.
5092         * lib/xstrtoumax.c: Likewise.
5093         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
5094         __strtol and the like, so that this module is more like its siblings.
5095         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
5096         Remove; no longer needed now that we assume gnulib inttypes.h.
5097
5098 2006-10-08  Bruno Haible  <bruno@clisp.org>
5099
5100         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
5101         option.
5102
5103 2006-10-07  Jim Meyering  <jim@meyering.net>
5104
5105         * modules/inttypes (inttypes.h): Revert what seems to have been
5106         an inadvertent part of today's change: use "|", not "/" in the
5107         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
5108
5109 2006-10-07  Bruno Haible  <bruno@clisp.org>
5110
5111         * modules/sublist: New file.
5112
5113 2006-10-07  Bruno Haible  <bruno@clisp.org>
5114
5115         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
5116         * modules/argz (argz.h): Likewise.
5117         * modules/arpa_inet (arpa/inet.h): Likewise.
5118         * modules/byteswap (byteswap.h): Likewise.
5119         * modules/configmake (configmake.h): Likewise.
5120         * modules/fcntl (fcntl.h): Likewise.
5121         * modules/fnmatch (fnmatch.h): Likewise.
5122         * modules/getopt (getopt.h): Likewise.
5123         * modules/glob (glob.h): Likewise.
5124         * modules/inttypes (inttypes.h): Likewise.
5125         * modules/netinet_in (netinet/in.h): Likewise.
5126         * modules/poll (poll.h): Likewise.
5127         * modules/stdbool (stdbool.h): Likewise.
5128         * modules/stdint (stdint.h): Likewise.
5129         * modules/sys_select (sys/select.h): Likewise.
5130         * modules/sys_socket (sys/socket.h): Likewise.
5131         * modules/sys_stat (sys/stat.h): Likewise.
5132         * modules/sysexits (sysexits.h): Likewise.
5133         * modules/unistd (unistd.h): Likewise.
5134         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5135         Add a "DO NOT EDIT" comment to the generated file.
5136         (func_import): Likewise for gnulib-comp.m4.
5137
5138 2006-10-07  Bruno Haible  <bruno@clisp.org>
5139
5140         * lib/gl_sublist.h: New file.
5141         * lib/gl_sublist.c: New file.
5142
5143 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
5144
5145         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
5146         name (relative to the original working directory) and the file
5147         name component (relative to the temporary working directory).  All
5148         callers changed.
5149         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
5150         * lib/mkdir-p.c (make_dir_parents): Likewise.
5151         * lib/mkdir-p.h (make_dir_parents): Likewise.
5152
5153 2006-10-06  Eric Blake  <ebb9@byu.net>
5154
5155         Define several macros for use by the clean-temp module.
5156         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
5157         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
5158         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
5159
5160         * lib/clean-temp.h (close_stream_temp): New declaration.
5161         * lib/clean-temp.c (includes): Pull in headers according to what
5162         other modules are in use.
5163         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
5164
5165 2006-10-06  Bruno Haible  <bruno@clisp.org>
5166
5167         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
5168         instead of fopen, fwriteerror.
5169
5170 2006-10-06  Bruno Haible  <bruno@clisp.org>
5171
5172         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
5173         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
5174         int.
5175         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
5176         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
5177         Return an error indicator.
5178         Suggested by Eric Blake.
5179
5180 2006-10-06  Bruno Haible  <bruno@clisp.org>
5181
5182         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
5183         Reported by Eric Blake.
5184
5185 2006-10-06  Bruno Haible  <bruno@clisp.org>
5186
5187         * modules/closeout (Description): Mention stderr too.
5188
5189 2006-10-06  Bruno Haible  <bruno@clisp.org>
5190         and Paul Eggert  <eggert@cs.ucla.edu>
5191
5192         * lib/closeout.c (close_stdout): Also close stderr.
5193         * lib/closeout.h: Update comment.
5194
5195 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
5196
5197         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
5198         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
5199         * lib/dirchownmod.c: Include lchown.h.
5200         * lib/lchown.c: Don't include files that lchown.h now includes.
5201         Don't declare chown, since lchown.h now does that.
5202         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
5203         (lchown): Define to rpl_chown if lchown is declared but
5204         does not exist.  Declare using a prototype if lchown is not
5205         declared.  Add a copyright notice.
5206         * lib/mkstemp.h: Include <unistd.h>.
5207         * lib/openat.c: Include lchown.h.
5208
5209         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
5210         we now test for that separately.
5211         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
5212         rather than O_NOFOLLOW, when testing whether it's possible to
5213         avoid a race condition reliably.
5214         * lib/savewd.c (savewd_chdir): Likewise.
5215
5216         Remove macros that are no longer needed now that stdint.h is
5217         reliable.
5218         * lib/fsusage.c (UINTMAX_MAX): Remove.
5219         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
5220         * lib/utimecmp.c (SIZE_MAX): Remove.
5221
5222         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
5223
5224         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
5225         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
5226         O_NOATIME works.
5227
5228 2006-10-05  Bruno Haible  <bruno@clisp.org>
5229
5230         * lib/gl_list.h (gl_sortedlist_search_from_to,
5231         gl_sortedlist_indexof_from_to): New declarations.
5232         (gl_list_implementation): New fields sortedlist_search_from_to,
5233         sortedlist_indexof_from_to.
5234         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
5235         inline functions.
5236         * lib/gl_list.c (gl_sortedlist_search_from_to,
5237         gl_sortedlist_indexof_from_to): New functions.
5238         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
5239         function.
5240         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
5241         (gl_array_sortedlist_search_from_to): New function.
5242         (gl_array_list_implementation): Update.
5243         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
5244         function.
5245         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
5246         (gl_carray_sortedlist_search_from_to): New function.
5247         (gl_carray_list_implementation): Update.
5248         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
5249         gl_linked_sortedlist_indexof_from_to): New functions.
5250         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5251         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5252         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
5253         gl_tree_sortedlist_indexof_from_to): New functions.
5254         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5255         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5256         Update.
5257         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5258         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
5259         Update.
5260
5261 2006-10-05  Bruno Haible  <bruno@clisp.org>
5262
5263         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
5264         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
5265         (struct gl_list_implementation): Add fields search_from_to,
5266         indexof_from_to. Remove fields search, indexof.
5267         (gl_list_search): Use the search_from_to method.
5268         (gl_list_search_from, gl_list_search_from_to): New functions.
5269         (gl_list_indexof): Use the indexof_from_to method.
5270         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
5271         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
5272         (gl_list_search_from, gl_list_search_from_to): New functions.
5273         (gl_list_indexof): Use the indexof_from_to method.
5274         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
5275         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
5276         gl_array_indexof. Add start_index, end_index arguments.
5277         (gl_array_search_from_to): Renamed from gl_array_search. Add
5278         start_index, end_index arguments.
5279         (gl_array_remove, gl_array_list_implementation): Update.
5280         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
5281         gl_carray_indexof. Add start_index, end_index arguments.
5282         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
5283         start_index, end_index arguments.
5284         (gl_carray_remove, gl_carray_list_implementation): Update.
5285         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
5286         gl_linked_search. Add start_index, end_index arguments.
5287         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
5288         start_index, end_index arguments.
5289         (gl_linked_remove): Update.
5290         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
5291         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
5292         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
5293         field to 'size_t'.
5294         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
5295         gl_tree_search. Add start_index, end_index arguments.
5296         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5297         start_index, end_index arguments.
5298         (gl_tree_remove): Update.
5299         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
5300         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
5301         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
5302         function.
5303         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
5304         gl_tree_search. Add start_index, end_index arguments.
5305         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
5306         start_index, end_index arguments.
5307         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
5308         Update.
5309         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
5310
5311 2006-10-05  Bruno Haible  <bruno@clisp.org>
5312
5313         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
5314
5315         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
5316         fwriteerror_temp): New declarations.
5317         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
5318         (descriptors): New variable.
5319         (cleanup): First, close the descriptors.
5320         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
5321         fclose_temp, fwriteerror_temp): New functions.
5322
5323 2006-10-04  Jim Meyering  <jim@meyering.net>
5324
5325         * lib/fts.c (fts_open): Tiny comment change.
5326
5327 2006-10-04  Bruno Haible  <bruno@clisp.org>
5328
5329         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
5330         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
5331         gl_LOCK_BODY.
5332         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
5333         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
5334         gl_LOCK_EARLY_BODY.
5335         (gl_LOCK): Require gl_LOCK_BODY.
5336
5337 2006-10-04  Bruno Haible  <bruno@clisp.org>
5338
5339         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
5340         (gl_oset_search_atleast): New declaration.
5341         (struct gl_oset_implementation): Add field 'search_atleast'.
5342         (gl_oset_search_atleast): New inline function.
5343         * lib/gl_oset.c (gl_oset_search_atleast): New function.
5344         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
5345         (gl_array_oset_implementation): Update.
5346         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
5347         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
5348         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
5349
5350 2006-10-04  Bruno Haible  <bruno@clisp.org>
5351
5352         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
5353
5354 2006-10-03  Bruno Haible  <bruno@clisp.org>
5355
5356         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
5357         from gl_avltreehash_list_implementation.
5358
5359 2006-10-03  Bruno Haible  <bruno@clisp.org>
5360
5361         * lib/gl_oset.c (gl_oset_add): Fix return type.
5362
5363 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
5364
5365         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
5366
5367 2006-10-02  Eric Blake  <ebb9@byu.net>
5368
5369         * modules/strnlen (Depends-on): Add extensions.
5370
5371 2006-10-02  Eric Blake  <ebb9@byu.net>
5372
5373         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
5374         definition in 2.60+.
5375
5376 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
5377
5378         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
5379         checks.
5380
5381 2006-10-02  Bruno Haible  <bruno@clisp.org>
5382
5383         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
5384         to the AUTOMAKE_OPTIONS.
5385         Reported by Jim Meyering.
5386
5387 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
5388
5389         Work around bug in Solaris 10 /proc file system:
5390         /proc/self/fd/NNN/.. isn't the parent directory of
5391         the directory whose file descriptor is NNN.  This needs to
5392         be worked around at run time, not compile time, since a
5393         program might be built on Solaris 8, where things work, and
5394         run on Solaris 10.
5395         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
5396         to use the following interface instead:
5397         (OPENAT_BUFFER_SIZE): New macro.
5398         (openat_proc_name): New function.
5399         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
5400         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
5401         Likewise.
5402         * lib/openat-proc.c: New file.
5403         * modules/openat (Files): Add lib/openat-proc.c.
5404         (Depends-on): Add same-inode, stdbool.
5405         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
5406
5407 2006-09-29  Bruno Haible  <bruno@clisp.org>
5408
5409         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
5410         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
5411         argument. Set stdout_closed before testing for ferror, not after.
5412         (fwriteerror, fwriteerror_no_ebadf): New functions.
5413
5414 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5415
5416         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
5417
5418 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
5419
5420         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
5421         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
5422
5423 2006-09-28  Jim Meyering  <jim@meyering.net>
5424
5425         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
5426         Include <unistd.h>.
5427
5428 2006-09-28  Bruno Haible  <bruno@clisp.org>
5429
5430         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
5431         * modules/linkedhash-list (Depends-on): Likewise.
5432         * modules/rbtreehash-list (Depends-on): Likewise.
5433
5434 2006-09-28  Bruno Haible  <bruno@clisp.org>
5435
5436         * lib/strndup.h: Simplify the redefinition of strndup.
5437         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
5438         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
5439
5440 2006-09-28  Bruno Haible  <bruno@clisp.org>
5441
5442         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
5443         * lib/gl_linkedhash_list.c: Likewise.
5444         * lib/gl_rbtreehash_list.c: Likewise.
5445
5446 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
5447
5448         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
5449         getaddrinfo.
5450
5451         * lib/__fpending.h: Don't include <stdio_ext.h> unless
5452         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
5453         it causes <stdio_ext.h> to cause a compile-time error.
5454         Problem reported by Nelson H. F. Beebe.
5455         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
5456         of HAVE_DECL___PENDING.
5457
5458         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
5459         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
5460         declaration.
5461
5462 2006-09-27  Jim Meyering  <jim@meyering.net>
5463
5464         This file could end up with a definition for a function
5465         named __strndup, rather than rpl_strndup on a system with
5466         incomplete weak_alias support.
5467         * lib/strndup.c (strndup): Rename from __strndup.
5468         Remove #defines that used to map __strndup to strndup.
5469         Don't use K&R prototypes.
5470         Remove LIBC-related code, since this file is not sync'd with glibc.
5471         * lib/strndup.h: Revamp, accordingly.
5472         * m4/strndup.m4: Modernize.
5473
5474 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
5475
5476         * modules/savewd (Depends-on): Add 'raise'.
5477         * lib/savewd.c: Include <signal.h>, for 'raise'.
5478
5479 2006-09-26  Jim Meyering  <jim@meyering.net>
5480
5481         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
5482         when we detect Darwin 8.7.0's acl_get_file bug.
5483         Rearrange to perform the new (below) run-test while $LIBS
5484         contains any acl-related library.  Set USE_ACL at the end.
5485         (gl_ACL_GET_FILE): New function.
5486
5487 2006-09-26  Eric Blake  <ebb9@byu.net>
5488
5489         * lib/verror.c: Include <config.h> unconditionally.
5490
5491 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
5492
5493         * modules/clock-time (Maintainer): Add self.
5494         * modules/getlogin_r (Depends-on): Add extensions.
5495
5496 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5497
5498         * modules/clock-time: New module.
5499         * modules/nanosleep (Depends-on): Add clock-time.
5500         * modules/gethrxtime (Depends-on): Likewise.
5501         * modules/gettime (Depends-on): Likewise.
5502         * modules/settime (Depends-on): Likewise.
5503
5504         * modules/fts-lgpl: Depend on openat.
5505         * modules/mkancesdirs: Depend on savewd.
5506         * modules/mkdir-p: Likewise.
5507
5508 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5509
5510         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
5511
5512         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
5513         `gl_have_arbitrary_file_name_length_limit' to
5514         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
5515         actually works between configure runs.
5516
5517 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5518             Bruno Haible  <bruno@clisp.org>
5519
5520         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
5521
5522 2006-09-25  Jim Meyering  <jim@meyering.net>
5523
5524         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
5525         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
5526
5527 2006-09-25  Eric Blake  <ebb9@byu.net>
5528
5529         * gnulib-tool (func_import, func_create_testdir): Fix typos in
5530         exec's in 2006-09-18 patch when shuffling fds.
5531
5532 2006-09-25  Bruno Haible  <bruno@clisp.org>
5533
5534         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
5535         Reported by Jim Meyering.
5536
5537 2006-09-24  Jim Meyering  <jim@meyering.net>
5538
5539         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
5540         compare a pointer against a literal "0".  That caused failures with
5541         at least HP-UX's hpcc.
5542
5543 2006-09-22  Simon Josefsson  <jas@extundo.com>
5544
5545         * modules/gc-sha1:
5546         * modules/gc-md4:
5547         * modules/gc-hmac-sha1:
5548         * modules/gc-hmac-md5:
5549         * modules/gc-des:
5550         * modules/gc-arcfour: Distribute more files.
5551
5552 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5553
5554         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
5555         (gl_linked_iterator_from_to): Initialize struct completely.
5556         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
5557         (gl_tree_iterator_from_to): Likewise
5558         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
5559         * lib/gl_array_list.c [lint] (gl_array_iterator)
5560         (gl_array_iterator_from_to): Likewise.
5561         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
5562         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
5563         (gl_carray_iterator_from_to): Likewise.
5564
5565         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
5566         * lib/md4.c (md4_process_block): Remove unused variable.
5567         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
5568         parentheses for clarity.
5569
5570 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5571
5572         * modules/bison-i18n (Depends-on): Add gettext.
5573
5574 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5575
5576         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
5577         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
5578         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
5579         also add missing comma that caused broken test.
5580         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
5581         stdlib.h, for `abort'.
5582         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
5583         variables.
5584         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
5585         include unistd.h if present, for `rmdir'.
5586         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
5587         variables.
5588         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
5589         in the process include standard headers for prototypes.
5590         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
5591         gets declared on GNU/Linux.
5592         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
5593         unistd.h, for `rmdir'.
5594         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
5595
5596         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
5597         always true.
5598         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
5599
5600         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
5601
5602 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5603
5604         * gnulib-tool (func_version): Create output all at once.  This
5605         may help avoid triggering unnecessary SIGPIPEs, and at any
5606         rate it doesn't hurt.
5607
5608 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5609             Bruno Haible  <bruno@clisp.org>
5610
5611         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
5612         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5613         * m4/signed.m4 (bh_C_SIGNED): Likewise.
5614
5615         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
5616         (gl_FUNC_VASPRINTF): Invoke it.
5617
5618 2006-09-22  Bruno Haible  <bruno@clisp.org>
5619
5620         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
5621         getloadavg.c as first argument.
5622
5623 2006-09-22  Bruno Haible  <bruno@clisp.org>
5624
5625         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
5626         at the beginning of the gl_INIT macro.
5627         * modules/getloadavg (configure.ac): Pass $gl_source_base to
5628         gl_GETLOADAVG.
5629
5630 2006-09-22  Bruno Haible  <bruno@clisp.org>
5631
5632         * gnulib-tool (func_create_megatestdir): Don't include the config-h
5633         module.
5634         Suggested by Ralf Wildenhues.
5635
5636 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
5637
5638         Import this patch from libc:
5639
5640         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
5641
5642         * lib/regex_internal.c (re_string_reconstruct): Handle
5643         offset < pstr->valid_raw_len && pstr->offsets_needed case.
5644         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
5645         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
5646         re_string_context_at.
5647
5648         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
5649         now requires it.
5650         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
5651         gl_REGEX now does it for us.
5652         (gl_REGEX): Add test taken from
5653         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
5654
5655         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
5656         Check that large offsets work.  Modernize Autoconf usages.
5657         Prefer "yes" to mean a good thing rather than a bad.
5658         Don't put "#define mkstemp" in config.h, as this might interfere
5659         with standard system headers that "#define mkstemp mkstemp64".
5660
5661         * modules/mkstemp (Depends-on): Add extensions, so that
5662         mkstemp is visible on some platforms.
5663         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
5664         (Include): Change to "mkstemp.h" from <stdlib.h>.
5665         (Files): Add mkstemp.h.
5666
5667         * lib/mkstemp.h: New file, since some standard headers
5668         #define mkstemp.
5669         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
5670         Include "mkstemp.h".
5671         Make the _LIBC code resemble glibc original more,
5672         e.g., use K&R style.
5673         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
5674         (mkstemp): Remove, since mkstemp.h does this for us.
5675         * lib/stdlib--.h: Include mkstemp.h.
5676
5677         Import this patch from libc:
5678
5679         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5680
5681         * lib/tempname.c (__gen_tempname): Change attempts_min
5682         into a macro.  Use preprocessor to decide how to initialize
5683         attempts [Coverity CID 67].
5684
5685 2006-09-20  Bruno Haible  <bruno@clisp.org>
5686
5687         * lib/mkdtemp.c: Import from libc.
5688         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
5689                 * sysdeps/posix/tempname.c (__gen_tempname): Change
5690                 attempts_min into a macro.  Use preprocessor to decide how to
5691                 initialize attempts [Coverity CID 67].
5692         2001-11-27  Paul Eggert  <eggert@twinsun.com>
5693                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
5694                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
5695
5696 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5697
5698         * gnulib-tool (func_exit): New function, to allow to pass the
5699         exit status portably through the trap.  Use everywhere.
5700         (--help, --version): Signal a write error.
5701         (trap): catch SIGPIPE, for write errors.
5702         Exit at the end of the trap, with the correct exit status.
5703
5704 2006-09-19  Karl Berry  <karl@gnu.org>
5705
5706         * doc/gnulib.texi: note about the license texinfo files.
5707
5708 2006-09-19  Eric Blake  <ebb9@byu.net>
5709
5710         * gnulib-tool: Avoid space-tab.
5711
5712 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5713
5714         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
5715         that prevented coreutils 6.1 from building.  Problem reported
5716         by Petter Reinholdtsen.
5717
5718 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
5719
5720         * gnulib-tool (avoidlist): Fix typo that broke options like
5721         --avoid=lock that are used by coreutils bootstrap.
5722
5723 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
5724
5725         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
5726         more systematically.
5727
5728 2006-09-18  Jim Meyering  <jim@meyering.net>
5729
5730         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
5731
5732 2006-09-18  Bruno Haible  <bruno@clisp.org>
5733
5734         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
5735
5736 2006-09-18  Bruno Haible  <bruno@clisp.org>
5737
5738         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
5739         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
5740         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
5741         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
5742         * m4/gettext.m4: Require autoconf >= 2.52.
5743         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
5744         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
5745         of gl_cv_header_inttypes_h.
5746
5747 2006-09-18  Bruno Haible  <bruno@clisp.org>
5748
5749         * lib/javaversion.c: Include configmake.h.
5750
5751 2006-09-18  Bruno Haible  <bruno@clisp.org>
5752
5753         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
5754         avoid that the while loops be executed in a subshell.
5755
5756 2006-09-18  Bruno Haible  <bruno@clisp.org>
5757
5758         * MODULES.html.sh (func_module): Break long lines.
5759         Suggested by Bruce Korb <bkorb@gnu.org>.
5760
5761 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5762
5763         Speed up by a factor of 1.12.
5764         * gnulib-tool (nl): New variable.
5765         (func_import): Rewrite include directive extraction to only read each
5766         directive once.
5767
5768 2006-09-17  Bruno Haible  <bruno@clisp.org>
5769
5770         * modules/javaversion (Makefile.am): Remove DEFS setting.
5771         (Depends-on): Add configmake, for PKGDATADIR definition.
5772
5773 2006-09-17  Bruno Haible  <bruno@clisp.org>
5774
5775         * gnulib-tool (func_create_testdir): Rewrite all files at once.
5776
5777 2006-09-17  Bruno Haible  <bruno@clisp.org>
5778
5779         * gnulib-tool (func_append): New function, stolen from libtool.m4.
5780         (func_modules_transitive_closure, func_modules_add_dummy,
5781         func_modules_to_filelist, func_import, func_create_testdir,
5782         func_create_megatestdir, ...): Use it wherever possible.
5783         Suggested by Ralf Wildenhues.
5784
5785 2006-09-16  Karl Berry  <karl@gnu.org>
5786
5787         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
5788         to avoid sectioning errors.
5789         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
5790         [ifinfo]: blank line after @center-ed titles.
5791         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
5792         Spell FSF address consistently with others.
5793         (These changes approved by rms.)
5794
5795 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5796
5797         Speed up by a factor of 1.61.
5798         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
5799         already checked module names again.
5800
5801 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5802
5803         Speed up by a factor of 1.13.
5804         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
5805         for new_files, and the input to func_add_or_update.
5806
5807 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5808
5809         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
5810         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
5811
5812 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5813
5814         * modules/mkancesdirs (Depends-on): Add fcntl.
5815         * modules/savewd: New file.
5816         * MODULES.html.sh (File system functions): Add savewd.
5817
5818         * modules/configmake (Makefile.am): Add support for the
5819         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
5820
5821 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5822
5823         * m4/savewd.m4: New file.
5824
5825 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
5826
5827         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
5828         (dirchownmod): New arg FD.  All callers changed.
5829         Use FD rather than opening the directory ourself, as opening is
5830         now the caller's responsibility.
5831         * lib/dirchownmod.h: Likewise.
5832         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
5833         hosts that require <sys/types.h> before <sys/stat.h>.  Include
5834         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
5835         (test_dir): Remove.
5836         (mkancesdirs): Return length of prefix of FILE that has already
5837         been made, or -2 if there is a child doing the work.  Redo
5838         algorithm so that it is O(N) rather than O(N**2).  Optimize away
5839         ".", and treat ".." specially since it might stray back into
5840         already-created areas.  Use a subprocess if necessary.  New arg
5841         WD; all users changed.  MAKE_DIR function should now return 1
5842         if it creates a directory that is not readable.  Return -2 if
5843         a child process is spun off.
5844         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
5845         Adjust signature to match code.
5846         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
5847         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
5848         all users changed.
5849         * lib/savewd.c, lib/savewd.h: New files.
5850
5851 2006-09-15  Jim Meyering  <jim@meyering.net>
5852
5853         * modules/rename-dest-slash: New module.
5854         * MODULES.html.sh (posix_compat): Add it here.
5855
5856         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
5857
5858 2006-09-15  Jim Meyering  <jim@meyering.net>
5859
5860         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
5861         file.
5862
5863         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
5864
5865 2006-09-15  Jim Meyering  <jim@meyering.net>
5866
5867         * lib/rename-dest-slash.c (has_trailing_slash): Use
5868         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
5869         (rpl_rename_dest_slash): Perform the cheaper trailing slash
5870         test before testing whether SRC is a directory.
5871         Suggestions from Bruno Haible.
5872
5873         Avoid a warning about an unused variable.
5874         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
5875         into the #ifdef block where it's used.
5876
5877         * lib/rename-dest-slash.c: New file.
5878
5879 2006-09-14  Bruno Haible  <bruno@clisp.org>
5880
5881         * lib/allocsa.c: Include <config.h> unconditionally.
5882         * lib/asnprintf.c: Likewise.
5883         * lib/asprintf.c: Likewise.
5884         * lib/c-strcasecmp.c: Likewise.
5885         * lib/c-strcasestr.c: Likewise.
5886         * lib/c-strncasecmp.c: Likewise.
5887         * lib/c-strstr.c: Likewise.
5888         * lib/classpath.c: Likewise.
5889         * lib/clean-temp.c: Likewise.
5890         * lib/concatpath.c: Likewise.
5891         * lib/copy-file.c: Likewise.
5892         * lib/csharpcomp.c: Likewise.
5893         * lib/csharpexec.c: Likewise.
5894         * lib/execute.c: Likewise.
5895         * lib/fatal-signal.c: Likewise.
5896         * lib/findprog.c: Likewise.
5897         * lib/fwriteerror.c: Likewise.
5898         * lib/gl_array_list.c: Likewise.
5899         * lib/gl_array_oset.c: Likewise.
5900         * lib/gl_avltree_list.c: Likewise.
5901         * lib/gl_avltree_oset.c: Likewise.
5902         * lib/gl_avltreehash_list.c: Likewise.
5903         * lib/gl_carray_list.c: Likewise.
5904         * lib/gl_linked_list.c: Likewise.
5905         * lib/gl_linkedhash_list.c: Likewise.
5906         * lib/gl_list.c: Likewise.
5907         * lib/gl_oset.c: Likewise.
5908         * lib/gl_rbtree_list.c: Likewise.
5909         * lib/gl_rbtree_oset.c: Likewise.
5910         * lib/gl_rbtreehash_list.c: Likewise.
5911         * lib/imaxabs.c: Likewise.
5912         * lib/imaxdiv.c: Likewise.
5913         * lib/javacomp.c: Likewise.
5914         * lib/javaexec.c: Likewise.
5915         * lib/javaversion.c: Likewise.
5916         * lib/linebreak.c: Likewise.
5917         * lib/localcharset.c: Likewise.
5918         * lib/lock.c: Likewise.
5919         * lib/mbchar.c: Likewise.
5920         * lib/mbswidth.c: Likewise.
5921         * lib/mkdtemp.c: Likewise.
5922         * lib/pipe.c: Likewise.
5923         * lib/printf-args.c: Likewise.
5924         * lib/printf-parse.c: Likewise.
5925         * lib/progname.c: Likewise.
5926         * lib/progreloc.c: Likewise.
5927         * lib/readlink.c: Likewise.
5928         * lib/sh-quote.c: Likewise.
5929         * lib/stpcpy.c: Likewise.
5930         * lib/stpncpy.c: Likewise.
5931         * lib/strcasecmp.c: Likewise.
5932         * lib/strcasestr.c: Likewise.
5933         * lib/strcspn.c: Likewise.
5934         * lib/striconv.c: Likewise.
5935         * lib/strncasecmp.c: Likewise.
5936         * lib/strnlen1.c: Likewise.
5937         * lib/strstr.c: Likewise.
5938         * lib/strtok_r.c: Likewise.
5939         * lib/tls.c: Likewise.
5940         * lib/tmpdir.c: Likewise.
5941         * lib/unicodeio.c: Likewise.
5942         * lib/unsetenv.c: Likewise.
5943         * lib/vasnprintf.c: Likewise.
5944         * lib/vasprintf.c: Likewise.
5945         * lib/wait-process.c: Likewise.
5946         * lib/xallocsa.c: Likewise.
5947         * lib/xsetenv.c: Likewise.
5948         * lib/xstriconv.c: Likewise.
5949
5950 2006-09-13  Simon Josefsson  <jas@extundo.com>
5951
5952         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
5953         that internally, suggested by Ralf Wildenhues
5954         <Ralf.Wildenhues@gmx.de>.
5955
5956 2006-09-13  Simon Josefsson  <jas@extundo.com>
5957
5958         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
5959         @LIBOBJS@.
5960         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5961
5962 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
5963
5964         * lib/_fpending.c: Include <config.h> unconditionally, since we no
5965         longer worry about uses that don't define HAVE_CONFIG_H.
5966         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
5967         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
5968         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
5969         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
5970         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
5971         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
5972         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
5973         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
5974         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
5975         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
5976         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
5977         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
5978         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
5979         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
5980         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
5981         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
5982         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
5983         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
5984         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
5985         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
5986         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
5987         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
5988         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
5989         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
5990         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
5991         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
5992         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
5993         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
5994         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
5995         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
5996         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
5997         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
5998         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
5999         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
6000         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
6001         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
6002         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
6003         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
6004         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
6005         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
6006         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
6007         Likewise.
6008
6009 2006-09-13  Eric Blake  <ebb9@byu.net>
6010
6011         * lib/getopt.c: Fix typo in last commit.
6012
6013 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
6014
6015         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
6016         dgettext.
6017
6018 2006-09-12  Jim Meyering  <jim@meyering.net>
6019
6020         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
6021         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
6022         Reported by Nelson H. F. Beebe.
6023
6024 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6025
6026         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
6027         program_invocation_name and program_invocation_short_name are
6028         initialized.
6029         * lib/argp-namefrob.h: Move declarations of program_invocation_name
6030         and program_invocation_short_name to argp.h, so they are visible
6031         to user programs.
6032         * lib/argp.h: Likewise
6033
6034 2006-09-10  Bruno Haible  <bruno@clisp.org>
6035
6036         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6037         m4/inttypes_h.m4, m4/uintmax_t.m4.
6038
6039 2006-09-10  Bruno Haible  <bruno@clisp.org>
6040
6041         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
6042         gl_AC_TYPE_UINTMAX_T.
6043
6044 2006-09-10  Bruno Haible  <bruno@clisp.org>
6045
6046         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
6047
6048 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6049
6050         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
6051         convention.  Text proposed by Bruno Haible.
6052         (struct argp_option): Document the use of N_() wrappers.
6053
6054         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
6055         '\v', and translate the two parts separately, instead of feeding
6056         the whole string to gettext.  This allows to exclude
6057         '\v' from the strings visible to the translator by writing doc
6058         strings as N_("..") "\v" N_("..").
6059
6060 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
6061
6062         * config/srclist.txt: Undo latest change; the bug was fixed.
6063
6064 2006-09-09  Bruno Haible  <bruno@clisp.org>
6065
6066         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
6067         assignments if building a library without libtool.
6068         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
6069         in func_emit_lib_Makefile_am.
6070         (func_import): When building a static library libfoo.a, arrange to
6071         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
6072         (func_create_testdir): Likewise.
6073         * modules/gc (configure.ac, Makefile.am): If building statically,
6074         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
6075         * modules/iconvme (configure.ac, Makefile.am): Likewise.
6076         * modules/striconv (configure.ac, Makefile.am): Likewise.
6077         Based on a suggestion by Ralf Wildenhues.
6078
6079 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6080
6081         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
6082         Check for unistd.h too, since Autoconf doesn't assume POSIX.
6083         Also:
6084
6085         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6086         Add year_2050_test to catch glibc bug 2821
6087         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6088
6089         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6090         Prefer #ifdef to #if.
6091
6092         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
6093         Return from 'main' instead of calling 'exit'.
6094
6095 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6096
6097         * lib/mktime.c (guess_time_tm): Fix bug where mktime
6098         returned the maximum time_t value rather than (time_t) -1.
6099         Problem originally reported by William Bardwell
6100         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6101
6102         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6103         Moved to here ...
6104         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6105         ... from here.
6106
6107 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6108
6109         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
6110         2821 is fixed.
6111
6112 2006-09-08  Jim Meyering  <jim@meyering.net>
6113
6114         Don't make generated files read-only.  That would bother too many
6115         people.  However, do retain the ability to work when targets are
6116         read-only: remove the destination and temporary files before writing
6117         them (when generated via sed or echo), or by using the -f option for
6118         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
6119         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6120         * modules/byteswap, modules/configmake, modules/fcntl:
6121         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6122         * modules/localcharset, modules/netinet_in, modules/poll:
6123         * modules/stdbool, modules/stdint, modules/sys_select:
6124         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6125
6126 2006-09-08  Jim Meyering  <jim@meyering.net>
6127
6128         Avoid new build failure on FreeBSD 6.0.
6129         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
6130         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
6131         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
6132
6133 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6134
6135         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
6136
6137 2006-09-07  Jim Meyering  <jim@meyering.net>
6138
6139         Fix global typo in last change: use chmod u-w, not chmod u-x.
6140         Spotted by Paul Eggert and Bruce Korb.
6141         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6142         * modules/byteswap, modules/configmake, modules/fcntl:
6143         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6144         * modules/localcharset, modules/netinet_in, modules/poll:
6145         * modules/stdbool, modules/stdint, modules/sys_select:
6146         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6147
6148 2006-09-06  Jim Meyering  <jim@meyering.net>
6149
6150         Make generated files be read-only.
6151         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
6152         Ensure that each generated file is now read-only.
6153         * modules/argz: Likewise.
6154         * modules/arpa_inet: Likewise.
6155         * modules/byteswap: Likewise.
6156         * modules/configmake: Likewise.
6157         * modules/fcntl: Likewise.
6158         * modules/fnmatch: Likewise.
6159         * modules/getopt: Likewise.
6160         * modules/glob: Likewise.
6161         * modules/inttypes: Likewise.
6162         * modules/netinet_in: Likewise.
6163         * modules/poll: Likewise.
6164         * modules/stdbool: Likewise.
6165         * modules/stdint: Likewise.
6166         * modules/sys_select: Likewise.
6167         * modules/sys_socket: Likewise.
6168         * modules/sys_stat: Likewise.
6169         * modules/sysexits: Likewise.
6170         * modules/localcharset: Same as above, but continue using temporary
6171         file named "t-$@" (why different?) rather than the "$@-t" used
6172         everywhere else.
6173
6174         * modules/sysexits (Makefile.am): Replace literal occurrences
6175         of "sysexit.h" more readable, and more consistent, "$@".
6176
6177 2006-09-06  Bruno Haible  <bruno@clisp.org>
6178
6179         * modules/striconv: New file.
6180         * modules/xstriconv: New file.
6181         * MODULES.html.sh (Internationalization functions): Add striconv,
6182         xstriconv.
6183
6184 2006-09-06  Bruno Haible  <bruno@clisp.org>
6185
6186         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
6187         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
6188         not using libtool correctly.
6189
6190 2006-09-06  Bruno Haible  <bruno@clisp.org>
6191
6192         * lib/striconv.h: New file.
6193         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
6194         iconvstring.c.
6195         * lib/xstriconv.h: New file.
6196         * lib/xstriconv.c: New file.
6197
6198 2006-09-06  Bruno Haible  <bruno@clisp.org>
6199
6200         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
6201         lib_..._LDFLAGS.
6202
6203 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6204
6205         * lib/argz_.h: Sync from Libtool.
6206
6207         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
6208                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6209
6210         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
6211
6212 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
6213
6214         * modules/trim: New file.
6215
6216 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
6217
6218         * lib/trim.h: New file.
6219         * lib/trim.c: New file.
6220
6221 2006-09-05  Bruno Haible  <bruno@clisp.org>
6222
6223         * MODULES.html.sh (String handling): Add trim.
6224
6225 2006-09-04  Karl Berry  <karl@gnu.org>
6226
6227         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
6228         until next release.
6229
6230 2006-09-03  Bruno Haible  <bruno@clisp.org>
6231
6232         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
6233         correctly.
6234
6235 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6236
6237         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
6238         not gl_GETLOADAVG.  Omit unneeded semicolons.
6239         Problems reported by Ralf Wildenhues in
6240         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
6241         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
6242         at the end, which is the usual gnulib style.
6243
6244         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
6245         of doing all the work ourselves.
6246         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
6247         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
6248
6249 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6250
6251         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
6252         Problem reported by Ralf Wildenhues in
6253         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
6254
6255         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
6256         HAVE_STRUCT_STATFS_F_FSTYPENAME.
6257
6258 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
6259
6260         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
6261         yesterday's patch by changing test -n to test -z.
6262
6263 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6264
6265         * modules/getloadavg (Files): Add m4/getloadavg.m4.
6266         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
6267         the former is now obsolescent.
6268
6269         * modules/chdir-long (Depends-on): Add fcntl.
6270
6271 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6272
6273         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
6274         obsolescent, and programs should use gnulib instead.
6275         * m4/getloadavg.m4: New file, with contents taken from Autoconf
6276         but with prefixes changed.
6277
6278 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
6279
6280         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
6281         or stdbool.h, because they might not exist while configuring.
6282
6283         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
6284         Don't include unistd.h or limits.h; not needed, since chdir-long.h
6285         does that for us.
6286         (O_DIRECTORY): Remove.
6287
6288 2006-08-31  Eric Blake  <ebb9@byu.net>
6289
6290         * gnulib-tool: Don't let emacs change spaces to TAB.
6291
6292 2006-08-31  Bruno Haible  <bruno@clisp.org>
6293
6294         * gnulib-tool: When calling func_import more than once, do it in a
6295         subshell.
6296         Reported by Eric Blake <ebb9@byu.net>.
6297
6298 2006-08-31  Bruno Haible  <bruno@clisp.org>
6299
6300         * gnulib-tool (nl): Remove variable.
6301         (sed_transform_lib_file): Use more robust test for config-h module.
6302         (func_import): Fix typo in 2006-08-25 patch.
6303
6304 2006-08-31  Bruno Haible  <bruno@clisp.org>
6305
6306         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
6307         specified, augment Makefile.am variables instead of assigning them.
6308
6309 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6310
6311         Work around a bug in both the Linux and SunOS 64-bit kernels:
6312         nanosleep mishandles sleeps for longer than 2**31 seconds.
6313         Problem reported by Frank v Waveren in
6314         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6315         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
6316         Check for nanosleep bug.
6317         (LIB_NANOSLEEP): Append clock_gettime library if needed.
6318
6319 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6320
6321         Work around a bug in both the Linux and SunOS 64-bit kernels:
6322         nanosleep mishandles sleeps for longer than 2**31 seconds.
6323         Problem reported by Frank v Waveren in
6324         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
6325         * lib/nanosleep.c (BILLION): New constant.
6326         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
6327         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
6328         implementation.
6329
6330 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6331
6332         * modules/nanosleep (Depends-on): Add gettime.
6333
6334 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
6335         and Simon Josefsson  <jas@extundo.com>
6336         and Oskar Liljeblad  <oskar@osk.mine.nu>
6337
6338         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
6339         * gnulib-tool (func_import): New license type 'unmodifiable license
6340         text'.
6341         * modules/fdl: Use it.  Longer description.
6342         * module/gpl, module/lgpl: New files.
6343
6344 2006-08-30  Jim Meyering  <jim@meyering.net>
6345
6346         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
6347         shadowing the parameter.
6348
6349 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6350
6351         Sync from Libtool:
6352
6353         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6354
6355         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
6356         sharing with gnulib.  Report by Eric Blake.
6357
6358 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6359
6360         * modules/isapipe: New file.
6361         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
6362
6363 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6364
6365         * modules/configmake (Makefile.am): Add a comment, and omit
6366         the CONFIGMAKE_ prefix from generated macro names.  Suggested
6367         by Bruno Haible.
6368
6369 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6370
6371         * m4/isapipe.m4: New file.
6372
6373 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
6374
6375         * lib/isapipe.c, lib/isapipe.h: New files.
6376
6377 2006-08-29  Jim Meyering  <jim@meyering.net>
6378
6379         * modules/configmake (Makefile.am): Make configmake.h depend on
6380         Makefile.  Otherwise, a stale configmake.h could hang around.
6381
6382 2006-08-29  Eric Blake  <ebb9@byu.net>
6383
6384         * lib/error.c (error_at_line, print_errno_message): Match libc, after
6385         resolution of upstream bug 3044.
6386
6387 2006-08-29  Bruno Haible  <bruno@clisp.org>
6388
6389         * modules/localcharset (Depends-on): Add configmake.
6390         (Makefile.am): Remove setting of LIBDIR through DEFS.
6391
6392 2006-08-29  Bruno Haible  <bruno@clisp.org>
6393
6394         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
6395         defined.
6396
6397 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6398
6399         * modules/fcntl: New file.
6400         * modules/chdir-safer (Depends-on): Add fcntl.
6401         * modules/fts: Likewise.
6402         * modules/mkdir-p: Likewise.
6403
6404         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
6405         This undoes the most recent change, since we're now addressing the
6406         problem in a different way.
6407
6408         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
6409         into output, since the output might be called Makefile.am even
6410         if $makefile_name is something different.
6411         (func_import): Use $makefile_am rather than
6412         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
6413         empty.
6414
6415         * modules/inttypes (Files): Add m4/inttypes-h.m4.
6416
6417 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6418
6419         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
6420         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
6421         recent change to stdint.m4, since we're now addressing the problem in a
6422         different way.
6423
6424 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6425
6426         * m4/fcntl_h.m4: New file.
6427
6428 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
6429
6430         * lib/fcntl_.h: New file.
6431         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
6432         the fcntl module.
6433         * lib/dirchownmod.c: Likewise.
6434         * lib/fts.c: Likewise.
6435
6436         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
6437         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
6438         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
6439         just before including <inttypes.h>, to avoid circular inclusion.
6440
6441 2006-08-28  Jim Meyering  <jim@meyering.net>
6442
6443         * doc/visibility.texi: Actually read and correct the grammar of the
6444         sentence affected by yesterday's change.
6445
6446 2006-08-28  Eric Blake  <ebb9@byu.net>
6447
6448         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
6449         needs wrapper.
6450
6451 2006-08-28  Eric Blake  <ebb9@byu.net>
6452
6453         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
6454
6455 2006-08-28  Eric Blake  <ebb9@byu.net>
6456
6457         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
6458
6459 2006-08-28  Bruno Haible  <bruno@clisp.org>
6460
6461         * modules/c-strstr: New file, from GNU gettext.
6462         * MODULES.html.sh (String handling): Add c-strstr.
6463
6464 2006-08-28  Bruno Haible  <bruno@clisp.org>
6465
6466         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
6467         macros.
6468         Reported by Eric Blake.
6469
6470 2006-08-28  Bruno Haible  <bruno@clisp.org>
6471
6472         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
6473         (VASNPRINTF): Return a string of length > INT_MAX without failing.
6474         * lib/vasprintf.c: Include errno.h, limits.h.
6475         (EOVERFLOW): New fallback definition.
6476         (vasprintf): Test here whether the string length is > INT_MAX.
6477         * lib/vsnprintf.c: Include errno.h, limits.h.
6478         (EOVERFLOW): New fallback definition.
6479         (vsnprintf): Fix bug when generated string was too long for the buffer.
6480         Test here whether the string length is > INT_MAX.
6481
6482 2006-08-28  Bruno Haible  <bruno@clisp.org>
6483
6484         * lib/inttypes_.h (SCNX*): Remove definitions.
6485         Reported by Eric Blake.
6486
6487 2006-08-28  Bruno Haible  <bruno@clisp.org>
6488
6489         * lib/c-strstr.h: New file, from GNU gettext.
6490         * lib/c-strstr.c: New file, from GNU gettext.
6491
6492 2006-08-28  Bruno Haible  <bruno@clisp.org>
6493
6494         * gnulib-tool: Reorder some statements.
6495
6496 2006-08-28  Bruno Haible  <bruno@clisp.org>
6497
6498         * gnulib-tool: New option --makefile-name.
6499         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
6500         $makefile_name.
6501         (func_import): Write $makefile_name to the cache file, and read it from
6502         there unless explicitly specified. Use $makefile_name as file name
6503         instead of Makefile.am. Adjust the recommendations accordingly.
6504
6505 2006-08-28  Bruno Haible  <bruno@clisp.org>
6506
6507         * gnulib-tool (func_verify_module): Check against misapplying patch.
6508
6509 2006-08-28  Bruno Haible  <bruno@clisp.org>
6510
6511         * gnulib-tool (func_relativize, func_relconcat): New functions.
6512         Give an error if --local-dir is given with --update.
6513         Remove trailing slashes from $local_gnulib_dir.
6514         (func_import): Store the relativized $local_gnulib_dir in
6515         gnulib-cache.m4, and read it from there if not specified explicitly.
6516
6517 2006-08-28  Bruno Haible  <bruno@clisp.org>
6518
6519         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
6520         is the current directory. Respect also $local_gnulib_dir.
6521
6522 2006-08-28  Bruno Haible  <bruno@clisp.org>
6523             Simon Josefsson  <jas@extundo.com>
6524
6525         BeOS portability.
6526         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
6527
6528 2006-08-27  Jim Meyering  <jim@meyering.net>
6529
6530         * doc/visibility.texi: Remove duplicate word: "pointer".
6531
6532 2006-08-26  Bruno Haible  <bruno@clisp.org>
6533
6534         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
6535         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
6536         (Makefile.am): Create inttypes.h from inttypes_.h.
6537         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
6538
6539         * modules/imaxabs: New file.
6540
6541         * modules/imaxdiv: New file.
6542
6543 2006-08-26  Bruno Haible  <bruno@clisp.org>
6544
6545         * m4/inttypes.m4: New file.
6546         * m4/_inttypes_h.m4: Remove file.
6547         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
6548         PRI_MACROS_BROKEN.
6549         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
6550
6551         * m4/imaxabs.m4: New file.
6552
6553         * m4/imaxdiv.m4: New file.
6554
6555 2006-08-26  Bruno Haible  <bruno@clisp.org>
6556
6557         * lib/inttypes_.h: New file.
6558         * lib/inttypes.h: Remove file.
6559         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
6560
6561         * lib/imaxabs.c: New file.
6562
6563         * lib/imaxdiv.c: New file.
6564
6565 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6566
6567         New config-h module, so that "make" output needn't be cluttered
6568         by -DHAVE_CONFIG_H.
6569         * MODULES.html.sh (Support for building libraries and executables):
6570         Add config-h.
6571         * modules/config-h: New file.
6572         * gnulib-tool (nl, sed_transform_lib_file): New vars.
6573         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
6574         the config-h module is used.
6575
6576         New configmake module, so that "make" output needn't be cluttered
6577         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
6578         * MODULES.html.sh (Support for building libraries and executables):
6579         Add configmake.
6580         * modules/configmake: New file.
6581
6582 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
6583
6584         * m4/config-h.m4: New file.
6585
6586 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6587
6588         * config/srclist.txt: Add elisp-comp.
6589
6590 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
6591
6592         * MODULES.html.sh (Support for building libraries and executables):
6593         Add elisp-comp.
6594         * build-aux/elisp-comp: New file.
6595         * modules/elisp-comp: New file.
6596
6597 2006-08-24  Bruno Haible  <bruno@clisp.org>
6598
6599         * gnulib-tool (func_create_testdir): Use non-default values of
6600         sourcebase and m4base.
6601
6602 2006-08-24  Bruno Haible  <bruno@clisp.org>
6603
6604         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
6605         HTML structure.
6606
6607 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
6608
6609         * modules/openat (Depends-on): Add lchown.
6610
6611 2006-08-23  Bruno Haible  <bruno@clisp.org>
6612
6613         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
6614         of gl_LOCK_EARLY instead of gl_LOCK.
6615
6616 2006-08-23  Bruno Haible  <bruno@clisp.org>
6617
6618         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
6619         on OSF/1 to no.
6620         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
6621
6622 2006-08-23  Bruno Haible  <bruno@clisp.org>
6623
6624         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
6625         as unusable.
6626
6627         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
6628         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
6629         (gl_LOCK): New macro.
6630
6631 2006-08-22  Simon Josefsson  <jas@extundo.com>
6632
6633         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
6634         to md5 module.
6635
6636 2006-08-22  Simon Josefsson  <jas@extundo.com>
6637
6638         * MODULES.html.sh: Add "Support for maintaining and release
6639         projects".
6640
6641         * build-aux/gnupload: New file, from coreutils.
6642
6643 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6644
6645         Avoid the need for AC_LIBSOURCES in m4 macros.
6646         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
6647         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
6648         * modules/check-version (EXTRA_DIST): Add check-version.h.
6649         * modules/crc (EXTRA_DIST): Add crc.h.
6650         * modules/des (EXTRA_DIST): Add des.h.
6651         * modules/gc (EXTRA_DIST): Add gc.h.
6652         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
6653         * modules/getline (EXTRA_DIST): Add getline.h.
6654         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
6655         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
6656         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
6657         * modules/md2 (EXTRA_DIST): Add md2.h.
6658         * modules/md4 (EXTRA_DIST): Add md4.h.
6659         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
6660         * modules/read-file (EXTRA_DIST): Add read-file.h.
6661         * modules/readline (EXTRA_DIST): Add readline.h.
6662         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
6663         rijndael-api-fst.h.
6664
6665 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6666
6667         * m4/rijndael.m4 (gl_ARCFOUR):
6668         * m4/arctwo.m4 (gl_ARCTWO):
6669         * m4/check-version.m4 (gl_CHECK_VERSION):
6670         * m4/crc.m4 (gl_CRC):
6671         * m4/des.m4 (gl_DES):
6672         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
6673         * m4/gc.m4 (gl_GC):
6674         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
6675         * m4/getline.m4 (gl_FUNC_GETLINE):
6676         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
6677         * m4/hmac-md5.m4 (gl_HMAC_MD5):
6678         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
6679         * m4/md2.m4 (gl_MD2):
6680         * m4/md4.m4 (gl_MD4):
6681         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
6682         * m4/read-file.m4 (gl_FUNC_READ_FILE):
6683         * m4/readline.m4 (gl_FUNC_READLINE):
6684         * m4/rijndael.m4 (gl_RIJNDAEL):
6685         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6686         to get the necessary .h files and whatnot.
6687
6688 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
6689
6690         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
6691         gnulib rather than the other way around.
6692         * config/srclistvars.sh (COREUTILS): Remove.
6693
6694 2006-08-22  Jim Meyering  <jim@meyering.net>
6695
6696         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
6697
6698         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
6699
6700 2006-08-22  Eric Blake  <ebb9@byu.net>
6701
6702         * modules/regexprops-generic: New file.
6703         * MODULES.html.sh (Support for building documentation): List it.
6704
6705 2006-08-22  Eric Blake  <ebb9@byu.net>
6706
6707         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
6708         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
6709         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
6710         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
6711
6712 2006-08-22  Bruno Haible  <bruno@clisp.org>
6713
6714         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
6715         and lib_LTLIBRARIES like the other lib_* variables.
6716
6717 2006-08-22  Bruno Haible  <bruno@clisp.org>
6718
6719         * build-aux/x-to-1.in: New file, from GNU gettext.
6720
6721 2006-08-22  Bruno Haible  <bruno@clisp.org>
6722
6723         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
6724         <utmpx.h> exists.
6725
6726 2006-08-22  Bruno Haible  <bruno@clisp.org>
6727
6728         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
6729         <utmpx.h> exists.
6730
6731 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6732
6733         BeOS portability.
6734         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
6735         exist.
6736         Problem reported by Bruno Haible.
6737
6738 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6739
6740         Avoid the need for AC_LIBSOURCES in m4 macros.
6741         * modules/acl (EXTRA_DIST): Add acl.h.
6742         * modules/argmatch (Files): Add m4/argmatch.m4.
6743         (configure.ac): Add gl_ARGMATCH.
6744         (EXTRA_DIST): Renamed from lib_SOURCES, for
6745         consistency with the other modules.  Remove argmatch.c.
6746         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
6747         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
6748         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
6749         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
6750         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
6751         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
6752         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
6753         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
6754         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
6755         * modules/closeout (EXTRA_DIST): Add closeout.h.
6756         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
6757         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
6758         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
6759         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
6760         dirname.h; remove basename.c and stripslash.c.
6761         * modules/exclude (EXTRA_DIST): Add exclude.h.
6762         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
6763         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
6764         * modules/file-type (EXTRA_DIST): Add file-type.h.
6765         * modules/filemode (EXTRA_DIST): Add filemode.h.
6766         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
6767         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6768         * modules/fpending (EXTRA_DIST): Add __fpending.h.
6769         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
6770         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
6771         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
6772         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
6773         * modules/getdate (EXTRA_DIST): Add getdate.c.
6774         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
6775         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
6776         * modules/getpass (EXTRA_DIST): Add getpass.h.
6777         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
6778         * modules/group-member (EXTRA_DIST): Add group-member.h.
6779         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
6780         * modules/hash (EXTRA_DIST): Add hash.h.
6781         * modules/human (EXTRA_DIST): Add human.h.
6782         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
6783         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
6784         * modules/lchown (EXTRA_DIST): Add lchown.h.
6785         * modules/long-options (EXTRA_DIST): Add long-options.h.
6786         * modules/lstat (EXTRA_DIST): Add lstat.h.
6787         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
6788         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
6789         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
6790         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
6791         * modules/memxor (EXTRA_DIST): Add memxor.h.
6792         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
6793         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
6794         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
6795         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
6796         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
6797         * modules/physmem (EXTRA_DIST): Add physmem.h.
6798         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
6799         * modules/posixver (EXTRA_DIST): Add posixver.h.
6800         * modules/quote (EXTRA_DIST): Add quote.h.
6801         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
6802         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
6803         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
6804         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
6805         regex_internal.h regexec.c.
6806         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
6807         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
6808         * modules/same (EXTRA_DIST): Add same.h.
6809         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
6810         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
6811         * modules/savedir (EXTRA_DIST): Add savedir.h.
6812         * modules/sha1 (EXTRA_DIST): Add sha1.h.
6813         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
6814         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
6815         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
6816         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
6817         * modules/strdup (EXTRA_DIST): Add strdup.h.
6818         * modules/strftime (EXTRA_DIST): Add strftime.h.
6819         * modules/strndup (EXTRA_DIST): Add strndup.h.
6820         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
6821         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
6822         * modules/time_r (EXTRA_DIST): Add time_r.h.
6823         * modules/timespec (EXTRA_DIST): Add timespec.h.
6824         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
6825         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
6826         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
6827         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
6828         * modules/userspec (EXTRA_DIST): Add userspec.h.
6829         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
6830         * modules/utimens (EXTRA_DIST): Add utimens.h.
6831         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
6832         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
6833         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
6834         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
6835         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
6836         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
6837         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
6838         * modules/yesno (EXTRA_DIST): Add yesno.h.
6839
6840 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
6841
6842         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
6843
6844         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
6845         * m4/dev-ino.m4, same-inode.m4: Remove.
6846
6847         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
6848         * m4/acl.m4 (AC_FUNC_ACL):
6849         * m4/backupfile.m4 (gl_BACKUPFILE):
6850         * m4/c-strtod.m4 (gl_C99_STRTOLD):
6851         * m4/canon-host.m4 (gl_CANON_HOST):
6852         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
6853         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
6854         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
6855         * m4/cloexec.m4 (gl_CLOEXEC):
6856         * m4/close-stream.m4 (gl_CLOSE_STREAM):
6857         * m4/closeout.m4 (gl_CLOSEOUT):
6858         * m4/dirfd.m4 (gl_FUNC_DIRFD):
6859         * m4/dirname.m4 (gl_DIRNAME):
6860         * m4/exclude.m4 (gl_EXCLUDE):
6861         * m4/exitfail.m4 (gl_EXITFAIL):
6862         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
6863         * m4/file-type.m4 (gl_FILE_TYPE):
6864         * m4/filemode.m4 (gl_FILEMODE):
6865         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
6866         * m4/fpending.m4 (gl_FUNC_FPENDING):
6867         * m4/fprintftime.m4 (gl_FPRINTFTIME):
6868         * m4/fts.m4 (gl_FUNC_FTS):
6869         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
6870         * m4/getdate.m4 (gl_GETDATE):
6871         * m4/gethrxtime.m4 (gl_GETHRXTIME):
6872         * m4/getpagesize.m4 (gl_GETPAGESIZE):
6873         * m4/getpass.m4 (gl_FUNC_GETPASS):
6874         * m4/gettime.m4 (gl_GETTIME):
6875         * m4/getugroups.m4 (gl_GETUGROUPS):
6876         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
6877         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
6878         * m4/hard-locale.m4 (gl_HARD_LOCALE):
6879         * m4/hash.m4 (gl_HASH):
6880         * m4/idcache.m4 (gl_IDCACHE):
6881         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
6882         * m4/lchown.m4 (gl_FUNC_LCHOWN):
6883         * m4/long-options.m4 (gl_LONG_OPTIONS):
6884         * m4/lstat.m4 (gl_FUNC_LSTAT):
6885         * m4/md5.m4 (gl_MD5):
6886         * m4/memcasecmp.m4 (gl_MEMCASECMP):
6887         * m4/memcoll.m4 (gl_MEMCOLL):
6888         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
6889         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
6890         * m4/memxor.m4 (gl_MEMXOR):
6891         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
6892         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
6893         * m4/modechange.m4 (gl_MODECHANGE):
6894         * m4/mountlist.m4 (gl_MOUNTLIST):
6895         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6896         * m4/openat.m4 (gl_FUNC_OPENAT):
6897         * m4/pathmax.m4 (gl_PATHMAX):
6898         * m4/physmem.m4 (gl_PHYSMEM):
6899         * m4/posixtm.m4 (gl_POSIXTM):
6900         * m4/posixver.m4 (gl_POSIXVER):
6901         * m4/quote.m4 (gl_QUOTE):
6902         * m4/quotearg.m4 (gl_QUOTEARG):
6903         * m4/readtokens.m4 (gl_READTOKENS):
6904         * m4/readutmp.m4 (gl_READUTMP):
6905         * m4/regex.m4 (gl_REGEX):
6906         * m4/safe-read.m4 (gl_SAFE_READ):
6907         * m4/safe-write.m4 (gl_SAFE_WRITE):
6908         * m4/same.m4 (gl_SAME):
6909         * m4/save-cwd.m4 (gl_SAVE_CWD):
6910         * m4/savedir.m4 (gl_SAVEDIR):
6911         * m4/settime.m4 (gl_SETTIME):
6912         * m4/sha1.m4 (gl_SHA1):
6913         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
6914         * m4/stat-macros.m4 (gl_STAT_MACROS):
6915         * m4/stat-time.m4 (gl_STAT_TIME):
6916         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
6917         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
6918         * m4/strdup.m4 (gl_FUNC_STRDUP):
6919         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
6920         * m4/strndup.m4 (gl_FUNC_STRNDUP):
6921         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
6922         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
6923         * m4/time_r.m4 (gl_TIME_R):
6924         * m4/timespec.m4 (gl_TIMESPEC):
6925         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
6926         * m4/unlinkdir.m4 (gl_UNLINKDIR):
6927         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
6928         * m4/userspec.m4 (gl_USERSPEC):
6929         * m4/utimecmp.m4 (gl_UTIMECMP):
6930         * m4/utimens.m4 (gl_UTIMENS):
6931         * m4/xalloc.m4 (gl_XALLOC):
6932         * m4/xgetcwd.m4 (gl_XGETCWD):
6933         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
6934         * m4/xreadlink.m4 (gl_XREADLINK):
6935         * m4/xstrtod.m4 (gl_XSTRTOD):
6936         * m4/yesno.m4 (gl_YESNO):
6937         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
6938         to get the necessary .h files and whatnot.
6939
6940 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
6941             Bruno Haible  <bruno@clisp.org>
6942
6943         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
6944         /bin/sh understanding of '!' conditional negation.
6945
6946 2006-08-21  Jim Meyering  <jim@meyering.net>
6947
6948         * modules/openat (Depends-on): Really alphabetize.
6949
6950         * modules/acl (Depends-on): Add error and quote.
6951
6952         * check-module (find_included_lib_files): Add at-func.c to the
6953         ok-to-include-more-than-once white list.
6954
6955         * modules/openat (Depends-on): Add lstat.  Alphabetize.
6956
6957 2006-08-21  Bruno Haible  <bruno@clisp.org>
6958
6959         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6960         Emit a pkgdata_DATA variable only if some snippets add contents to it.
6961         Reported by Martin Lambers <marlam@marlam.de>.
6962
6963 2006-08-21  Bruno Haible  <bruno@clisp.org>
6964
6965         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
6966         specify an installation location, don't emit a noinst_LIBRARIES or
6967         noinst_LTLIBRARIES assignment.
6968
6969 2006-08-21  Bruno Haible  <bruno@clisp.org>
6970
6971         BeOS portability.
6972         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
6973         BeOS has mbrtowc() but no <wctype.h>.
6974
6975 2006-08-21  Bruno Haible  <bruno@clisp.org>
6976
6977         BeOS portability.
6978         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
6979         exist.
6980
6981 2006-08-21  Bruno Haible  <bruno@clisp.org>
6982
6983         BeOS portability.
6984         * lib/mbchar.h: Include <wctype.h> only if it exists.
6985
6986 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6987
6988         Remove files that are no longer needed by their respective modules.
6989         * m4/obstack.m4: Remove.
6990         * m4/strerror_r.m4: Remove.
6991         * m4/uint32_t.m4: Remove.
6992         * m4/uintptr_t.m4: Remove.
6993         * m4/ullong_max.m4: Remove.
6994         * m4/xstrtoimax.m4: Remove.
6995         * m4/xstrtoumax.m4: Remove.
6996
6997         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
6998         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
6999         dependencies now capture this.
7000
7001         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
7002         Do not use AC_LIBSOURCES, since gnulib modules now do this.
7003         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
7004         * m4/human.m4 (gl_HUMAN): Likewise.
7005         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
7006         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
7007
7008         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
7009
7010         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
7011         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
7012         stdint.
7013         * m4/human.m4 (gl_HUMAN): Likewise.
7014         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
7015         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
7016         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7017         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7018         * m4/xstrtol (gl_XSTRTOL): Likewise.
7019
7020         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
7021         AC_TYPE_LONG_LONG_INT.
7022         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7023         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
7024         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
7025         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7026
7027         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
7028         on stdbool.
7029
7030         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
7031         (gl_PREREQ_XSTRTOUL): Remove.
7032
7033         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
7034
7035         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
7036         mode.
7037
7038 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7039
7040         Add and change modules to make it easier for coreutils to use
7041         gnulib-tool.
7042         * modules/backupfile (Files): Remove m4/d-ino.m4.
7043         (Depends-on): Add d-ino.
7044         * modules/cycle-check (Depends-on): Add stdint.
7045         (lib_SOURCES): Add cycle-check.h.
7046         * modules/d-ino: New module.
7047         * modules/d-type: New module.
7048         * modules/error (Files): Remove m4/strerror_r.m4.
7049         * modules/filemode (Files): Add m4/st_dm_mode.m4.
7050         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
7051         m4/inttypes_h.m4, m4/uintmax_t.m4.
7052         (Depends-on): Add stdint.
7053         (lib_SOURCES): Add fsusage.h.
7054         * modules/getcwd (Files): Remove d-ino.m4.
7055         (Depends-on): Add d-ino.
7056         * modules/getndelim2 (Depends-on): Add stdint.
7057         * modules/glob (Files): Remove m4/d-type.m4.
7058         (Depends-on): Add d-type.
7059         * modules/host-os: New module.
7060         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
7061         m4/inttypes_h.m4, m4/uintmax_t.m4.
7062         * Depends-on: Add stdint.
7063         (lib_SOURCES): Add human.h.
7064         * modules/inttostr (Files): Remove m4/intmax_t.m4,
7065         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
7066         m4/uintmax_t.m4, m4/ulonglong.m4.
7067         (Depends-on): Add stdint.
7068         (EXTRA_DIST): Add inttostr.h.
7069         * modules/lchmod: New module.
7070         * modules/link-follow: New module.
7071         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
7072         (Depends-on): Add lchmod.
7073         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
7074         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
7075         (Depends-on): Add stdint.
7076         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
7077         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7078         (Depends-on): Add stdint.
7079         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
7080         * modules/perl: New module.
7081         * modules/regex (Depends-on): Add stdint.
7082         * modules/rmdir-errno: New module.
7083         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7084         m4/intmax_t.m4.
7085         (Depends-on): Add stdint.
7086         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7087         m4/uintmax_t.m4.
7088         (Depends-on): Add stdint.
7089         * modules/unlink-busy: New module.
7090         * modules/utimecmp (Depends-on): Add stdint.
7091         * modules/uptime: New module.
7092         * modules/winsz-ioctl: New module.
7093         * modules/winsz-termios: New module.
7094         * modules/xnanosleep (Depends-on): Add nanosleep.
7095         * modules/ullong_max: Remove.
7096         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
7097         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
7098         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
7099         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
7100         (Depends-on): Add inttypes.
7101         (lib_SOURCES): Add xstrtol.h.
7102         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
7103         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
7104         * MODULES.html.sh: Move 'assert' into the assert section.
7105         Move 'dummy' into the linking section.
7106         Remove ullong_max.
7107         Add section for compatibility checks for POSIX:2001 functions,
7108         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
7109         winsz-ioctl, and winsz-termios into it.
7110         Add lchmod.
7111         Add top-level Misc section and put host-os, perl, and uptime
7112         into it.
7113
7114 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7115
7116         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
7117         now assume the stdint module.  Do not include inttypes.h.
7118         * lib/fsusage.h: Likewise.
7119         * lib/getndelim2.c: Likewise.
7120         * lib/human.h: Likewise.
7121         * lib/inttostr.h: Likewise.
7122         * lib/obstack.c: Likewise.
7123         * lib/regex_internal.h: Likewise.
7124         * lib/tempname.c: Likewise.
7125         * lib/utimecmp.c: Likewise.
7126         * lib/xstrtol.h: Likewise.
7127
7128         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
7129
7130         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
7131         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
7132         * lib/xtime.h: Likewise.
7133
7134 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7135
7136         * modules/openat (Files): Add lib/fchmodat.c.
7137         Fixes problem reported by Jay Youngman.
7138
7139 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7140
7141         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
7142         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
7143
7144 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
7145             Bruno Haible  <bruno@clisp.org>
7146
7147         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
7148         and is a script that invokes bison. Tighten the code. Add comments.
7149
7150 2006-08-18  Jim Meyering  <jim@meyering.net>
7151
7152         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
7153         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
7154         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
7155         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
7156
7157 2006-08-18  Bruno Haible  <bruno@clisp.org>
7158
7159         * modules/bison-i18n: New file.
7160         * MODULES.html.sh (Internationalization functions): Add it.
7161
7162 2006-08-18  Bruno Haible  <bruno@clisp.org>
7163
7164         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
7165         sys/statvfs.h. When getmntinfo was found, check its declaration and
7166         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
7167
7168 2006-08-18  Bruno Haible  <bruno@clisp.org>
7169
7170         * m4/bison-i18n.m4: New file, from bison.
7171
7172 2006-08-18  Bruno Haible  <bruno@clisp.org>
7173
7174         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
7175         (ME_DUMMY): Treat "kernfs" as a dummy.
7176         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
7177
7178 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7179
7180         Update from coreutils.
7181
7182         2006-08-15  Jim Meyering  <jim@meyering.net>
7183
7184         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
7185
7186         2006-01-17  Jim Meyering  <jim@meyering.net>
7187
7188         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
7189
7190         2006-01-11  Jim Meyering  <jim@meyering.net>
7191
7192         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
7193         Check for the lchmod function.
7194
7195 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7196
7197         Update from coreutils.
7198
7199         * lib/__fpending.h: Add copyright notice.
7200         * lib/fprintftime.h: Likewise.
7201         * lib/savedir.c: Use (C) in copyright notice.
7202         * lib/savedir.h: Likewise.
7203
7204         2006-08-15  Jim Meyering  <jim@meyering.net>
7205
7206         * lib/at-func.c: New file, with the logic of all emulated at-functions.
7207         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
7208         in support of the EXPECTED_ERRNO macro.
7209         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
7210         definitions.  Instead, define the appropriate symbols and include
7211         "at-func.c".
7212         * lib/mkdirat.c (mkdirat): Likewise.
7213         * lib/fchmodat.c (fchmodat): Likewise.
7214         (ENOSYS): Remove definition.
7215         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
7216         it.  Don't include "unistd--.h" -- it wasn't ever used.
7217
7218         2006-01-17  Jim Meyering  <jim@meyering.net>
7219
7220         Rewrite fts.c not to change the current working directory,
7221         by using openat, fstatat, fdopendir, etc..
7222
7223         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
7224         (HAVE_OPENAT_SUPPORT): Define.
7225         [_LIBC] (fchdir): Don't undef or define; no longer used.
7226         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
7227         Now, this `function' always succeeds, and consumes its file descriptor
7228         parameter -- so callers must not close such FDs.  Update callers.
7229         (diropen_fd, opendirat, cwd_advance_fd): New functions.
7230         (diropen): Add parameter, SP.  Adjust all callers.
7231         Implement using diropen_fd, rather than open.
7232         (fts_open): Initialize new member, fts_cwd_fd.
7233         Remove fts_rft-setting code.
7234         (fts_close): Close fts_cwd_fd, if necessary.
7235         (__opendir2): Define in terms of opendir or opendirat,
7236         depending on whether the FST_NOCHDIR flag is set.
7237         (fts_build): Since fts_safe_changedir consumes its FD, and since
7238         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
7239         and close the dup'd file descriptor upon failure.
7240         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
7241         (fts_safe_changedir): Tweak semantics to reflect that this function
7242         now calls cwd_advance_fd and hence consumes its FD argument.
7243         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
7244         [struct FTS] (fts_rft): Remove now-unused member.
7245         [struct FTS] (fts_cycle.state): Improve comment.
7246
7247         * lib/openat.c (openat_needs_fchdir): New function.
7248         * lib/openat.h (openat_needs_fchdir): Declare it.
7249
7250 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
7251
7252         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
7253         Problem and fix reported by Pádraig Brady in
7254         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
7255
7256 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7257
7258         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
7259
7260 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7261
7262         * lib/memcoll.c (memcoll): Optimize for the common case where the
7263         arguments are bytewise equal.
7264
7265 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7266
7267         * doc/regexprops-generic.texi: Add a copyright notice.
7268
7269 2006-08-15  Bruno Haible  <bruno@clisp.org>
7270
7271         * modules/tmpdir (License): Change to LGPL.
7272
7273 2006-08-15  Bruno Haible  <bruno@clisp.org>
7274
7275         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
7276         module.
7277
7278 2006-08-14  Simon Josefsson  <jas@extundo.com>
7279
7280         * config/srclist.txt: Add gnupload.
7281
7282 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7283
7284         Change copyright notice from LGPL 2 to GPL 2, since that's the
7285         standard form used in the gnulib repository.
7286         * tests/test-lock.c: Likewise.
7287         * tests/test-stdint.c: Likewise.
7288         * tests/test-tls.c: Likewise.
7289
7290         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
7291         prelude-manager.  User shorter URLs for GNU projects, without '?'.
7292         Add copyright notice.
7293
7294         * check-module: Add copyright notice.  Output a copyright
7295         notice if "--version" is specified.
7296         * modules/COPYING: New file.
7297         * tests/test-getaddrinfo.c: Add copyright notice.
7298         * tests/test-verify.c: Likewise.
7299
7300 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7301
7302         Change copyright notice from LGPL 2 to GPL 2, since that's the
7303         standard form used in the gnulib repository.
7304         * lib/lock.c: LGPL -> GPL.
7305         * lib/lock.h: Likewise.
7306         * lib/strnlen1.c: Likewise.
7307         * lib/strnlen1.h: Likewise.
7308         * lib/tls.c: Likewise.
7309         * lib/tls.h: Likewise.
7310         * lib/tmpdir.c: Likewise.
7311
7312         * lib/TODO: Remove; this belongs only in coreutils.
7313
7314 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7315
7316         Add copyright notices to long-enough files that lack them, since
7317         otherwise the files aren't clearly free.  Use the same notice that
7318         getdate.texi already uses.
7319         * doc/alloca-opt.texi: Add copyright notice.
7320         * doc/alloca.texi: Likewise.
7321         * doc/ctime.texi: Likewise.
7322         * doc/functions.texi: Likewise.
7323         * doc/gcd.texi: Likewise.
7324         * doc/gnulib-tool.texi: Likewise.
7325         * doc/inet_ntoa.texi: Likewise.
7326         * doc/visibility.texi: Likewise.
7327
7328         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
7329         * doc/quote.texi: Add copyright notice.
7330
7331         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
7332         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
7333         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
7334         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
7335         is now obsolete, and give a pointer to the Sun list.
7336         Add copyright notice.
7337
7338 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
7339
7340         * config/srclistvars.sh: Add copyright notice.
7341
7342 2006-08-14  Eric Blake  <ebb9@byu.net>
7343
7344         Import the following change from libc:
7345
7346         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
7347
7348         Upstream bug 2997.
7349         * lib/misc/error.c: Add space between program name and message if file
7350         name is missing.
7351
7352 2006-08-12  Karl Berry  <karl@gnu.org>
7353
7354         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
7355         remove, these originate in gnulib now.
7356
7357 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7358
7359         * doc/Makefile (standards.info standards.html standards.dvi):
7360         Also depend on make-stds.texi.
7361
7362 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
7363
7364         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
7365         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
7366
7367         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
7368         in wchar_t.  Problem reported by Eric Blake.
7369
7370         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
7371         LEN is smaller than SIZE.  Suggested by Bruno Haible.
7372         Also, help the compiler to keep LEN in a register.
7373
7374 2006-08-11  Eric Blake  <ebb9@byu.net>
7375
7376         * users.txt: Sort.  Add tar.
7377
7378 2006-08-11  Bruno Haible  <bruno@clisp.org>
7379
7380         * users.txt: New file.
7381
7382 2006-08-11  Bruno Haible  <bruno@clisp.org>
7383
7384         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
7385         before <wchar.h>. Needed for OSF/1 and BSD/OS.
7386
7387 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7388
7389         * modules/snprintf (Depends-on): Remove minmax.
7390         (Maintainer): Add self and Bruno.
7391
7392 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
7393
7394         * lib/.cppi-disable: Add snprintf.h, socket_.h.
7395         * lib/snprintf.c: Include <errno.h> and <limits.h>.
7396         (EOVERFLOW): Define if the system does not.
7397         Do not include "minmax.h"; it wasn't used.
7398         (snprintf): Don't assume size_t promotes to an unsigned type.
7399         Fix bug when generated string was too long for the buffer: the
7400         buffer's contents are supposed to be the initial prefix of the
7401         output.  Don't assume vasnprintf returns EOVERFLOW if the size
7402         exceeds INT_MAX; do the check ourselves.
7403
7404         Import the following changes from libc:
7405
7406         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
7407
7408         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
7409         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
7410         set wc to the byte which couldn't be converted.
7411         (re_string_reconstruct): Don't clear valid_raw_len before calling
7412         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
7413         tip_context using re_string_context_at.
7414
7415         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
7416
7417         * lib/posix/regex.h: g++ still cannot handled [restrict].
7418
7419         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
7420
7421         * lib/posix/regex.h: Remove special handling for VMS.
7422
7423 2006-08-10  Jim Meyering  <jim@meyering.net>
7424
7425         * modules/same-inode: New module.
7426         * modules/dev-ino: New module.
7427         * modules/cycle-check: Depend on these modules, rather than simply
7428         including their .h files.
7429         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
7430         required via m4/cycle-check.m4.
7431         * modules/same: Depend on new same-inode module, rather than
7432         including same-inode.h.
7433         * modules/chdir-safer: New file.
7434
7435         * modules/chown (Depends-on): Add stat-macros.
7436
7437 2006-08-10  Jim Meyering  <jim@meyering.net>
7438
7439         * m4/cycle-check.m4: New file.
7440         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
7441         * m4/dev-ino.m4, m4/same-inode.m4: New files.
7442
7443 2006-08-10  Eric Blake  <ebb9@byu.net>
7444
7445         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
7446         in from original proposal.
7447
7448 2006-08-10  Eric Blake  <ebb9@byu.net>
7449         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7450
7451         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
7452         namespace.
7453
7454 2006-08-10  Bruno Haible  <bruno@clisp.org>
7455
7456         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
7457         as well.
7458
7459 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7460
7461         Sync from coreutils.
7462
7463         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
7464
7465         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
7466         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
7467
7468 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7469
7470         * modules/restrict: Remove; no longer needed now that we assume
7471         Autoconf 2.59 or later.
7472         * MODULES.html.sh: Remove 'restrict'.
7473         * modules/argp (Depends-on): Remove 'restrict'.
7474         * modules/base64 (Depends-on): Likewise.
7475         * modules/gc (Depends-on): Likewise.
7476         * modules/getaddrinfo (Depends-on): Likewise.
7477         * modules/glob (Depends-on): Likewise.
7478         * modules/inet_ntop (Depends-on): Likewise.
7479         * modules/inet_pton (Depends-on): Likewise.
7480         * modules/memxor (Depends-on): Likewise.
7481         * modules/regex (Depends-on): Likewise.
7482         * modules/strtok_r (Depends-on): Likewise.
7483         * modules/time_r (Depends-on): Likewise.
7484
7485 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
7486
7487         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
7488         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
7489         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7490         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
7491         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
7492         * m4/memxor.m4 (gl_MEMXOR): Likewise.
7493         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
7494         gl_C_RESTRICT replaced by AC_C_RESTRICT.
7495
7496         Merge from coreutils.
7497         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
7498         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
7499         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7500         * m4/time_r.m4 (gl_TIME_R): Likewise.
7501
7502 2006-08-09  Karl Berry  <karl@gnu.org>
7503
7504         * config/srclist.txt: no more gettext-tools, per Bruno.
7505
7506 2006-08-08  Eric Blake  <ebb9@byu.net>
7507
7508         * modules/verror: New module.
7509         * MODULES.html.sh: Document it.
7510
7511 2006-08-08  Eric Blake  <ebb9@byu.net>
7512
7513         * lib/verror.h, lib/verror.c: New files.
7514
7515 2006-08-08  Eric Blake  <ebb9@byu.net>
7516
7517         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
7518         verror_at_line output complies with GNU Coding Standards even when
7519         file is NULL.
7520
7521 2006-08-07  Bruno Haible  <bruno@clisp.org>
7522
7523         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
7524         versions of AIX.
7525         Reported by Ralf Wildenhues.
7526
7527 2006-08-07  Bruno Haible  <bruno@clisp.org>
7528
7529         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
7530         in an AC_DEFUN. Needed so that the autoconf snippets can use
7531         AC_REQUIRE.
7532
7533 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7534
7535         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7536         Initialize pkgdata_DATA.
7537         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
7538         overriding it.
7539
7540 2006-08-06  Eric Blake  <ebb9@byu.net>
7541
7542         * lib/error.h: Fold in some upstream changes from glibc.
7543         * lib/error.c: Likewise.
7544
7545 2006-08-04  Bruno Haible  <bruno@clisp.org>
7546
7547         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7548         Make the mostlyclean-local rule depend on mostlyclean-generic.
7549         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
7550
7551 2006-07-31  Bruno Haible  <bruno@clisp.org>
7552
7553         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
7554         <stdlib.h>, <string.h>.
7555
7556 2006-07-30  Bruno Haible  <bruno@clisp.org>
7557
7558         * modules/readlink (License): Change to LGPL.
7559
7560 2006-07-30  Bruno Haible  <bruno@clisp.org>
7561
7562         * modules/javaversion (Makefile.am): Distribute javaversion.java and
7563         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
7564         set PKGDATADIR to point to it.
7565
7566 2006-07-30  Bruno Haible  <bruno@clisp.org>
7567
7568         * modules/csharpexec (configure.ac): Comment out macro invocation.
7569         * modules/javaexec (configure.ac): Likewise.
7570         * modules/javacomp-script (configure.ac): Likewise.
7571
7572         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
7573
7574 2006-07-30  Bruno Haible  <bruno@clisp.org>
7575
7576         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
7577         linked-list.
7578
7579 2006-07-30  Bruno Haible  <bruno@clisp.org>
7580
7581         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
7582
7583 2006-07-30  Bruno Haible  <bruno@clisp.org>
7584
7585         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7586         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
7587         get removed.
7588
7589 2006-07-29  Bruno Haible  <bruno@clisp.org>
7590
7591         Make it possible for gnulib-tool to work with locally modified or
7592         augmented gnulib repositories.
7593         * gnulib-tool (func_usage): Document --local-dir option.
7594         (local_gnulib_dir): New variable.
7595         Handle --local-dir option.
7596         (func_lookup_file): New function.
7597         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
7598         (func_get_description, func_get_filelist, func_get_description,
7599         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
7600         func_get_automake_snippet, func_get_include_directive,
7601         func_get_license, func_get_maintainer): Use func_lookup_file.
7602         (func_import, func_create_testdir): Use func_lookup_file.
7603
7604 2006-07-29  Bruno Haible  <bruno@clisp.org>
7605
7606         * modules/setenv (Depends-on): Add unistd.
7607
7608 2006-07-29  Bruno Haible  <bruno@clisp.org>
7609
7610         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
7611
7612 2006-07-29  Bruno Haible  <bruno@clisp.org>
7613
7614         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
7615
7616 2006-07-29  Bruno Haible  <bruno@clisp.org>
7617
7618         * gnulib-tool (import, update): If there is no Makefile.am, look at
7619         aclocal.m4, instead of bailing out.
7620
7621 2006-07-29  Bruno Haible  <bruno@clisp.org>
7622
7623         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
7624         Categorize the options by when they are useful.
7625
7626 2006-07-29  Bruno Haible  <bruno@clisp.org>
7627
7628         * gnulib-tool (func_usage): Document option --no-libtool.
7629         Handle option --no-libtool.
7630         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
7631         for changed semantics of $libtool variable.
7632         (func_import): Likewise. If libtool is not used, show this through
7633         an option --no-libtool.
7634         (func_create_testdir): Update.
7635
7636 2006-07-29  Bruno Haible  <bruno@clisp.org>
7637
7638         * gnulib-tool (func_import): Extend error message about missing
7639         --doc-base.
7640
7641 2006-07-29  Bruno Haible  <bruno@clisp.org>
7642
7643         * gnulib-tool (func_import): Don't create the $docbase directory if
7644         there is no file to store there.
7645
7646 2006-07-29  Bruno Haible  <bruno@clisp.org>
7647
7648         * gnulib-tool (autoconf_minversion): If a --dir option is given and
7649         relevant, look for configure.ac there, not in the current directory.
7650         Also use a simple search for AC_PREREQ, not "autoconf --trace".
7651
7652 2006-07-29  Bruno Haible  <bruno@clisp.org>
7653
7654         * gnulib-tool (SORT): New variable.
7655         (func_usage): Undocument --assume-autoconf option.
7656         Remove --assume-autoconf option handling.
7657         (autoconf_minversion): Determine from the contents of configure.ac.
7658         (func_import): Remove autoconf_minversion handling.
7659         Suggested by Eric Blake.
7660
7661 2006-07-29  Bruno Haible  <bruno@clisp.org>
7662
7663         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
7664
7665 2006-07-29  Bruno Haible  <bruno@clisp.org>
7666
7667         * config/srclist.txt (*setenv.[ch]): Remove rules.
7668
7669 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7670
7671         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
7672
7673 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7674
7675         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
7676         arpa/inet.h.
7677
7678 2006-07-28  Simon Josefsson  <jas@extundo.com>
7679
7680         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
7681         * modules/inet_pton (Depends-on): Likewise.
7682
7683 2006-07-28  Simon Josefsson  <jas@extundo.com>
7684
7685         * m4/netinet_in_h.m4: New file.
7686
7687 2006-07-28  Simon Josefsson  <jas@extundo.com>
7688
7689         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
7690         #include's.
7691
7692 2006-07-28  Simon Josefsson  <jas@extundo.com>
7693
7694         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
7695         #include's.
7696
7697 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
7698
7699         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
7700         setgid on directories only if they set these bits.
7701         * lib/modechange.h: Remove obsolete comment about masks.
7702
7703 2006-07-28  Eric Blake  <ebb9@byu.net>
7704
7705         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
7706         macro expansion.
7707
7708 2006-07-28  Bruno Haible  <bruno@clisp.org>
7709
7710         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
7711
7712 2006-07-28  Bruno Haible  <bruno@clisp.org>
7713
7714         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
7715
7716 2006-07-28  Bruno Haible  <bruno@clisp.org>
7717
7718         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
7719         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
7720         Define fallbacks.
7721         Avoids link error on FreeBSD 4.x.
7722         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
7723
7724         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
7725         encoding.
7726         * lib/mbswidth.c (iswcntrl): Likewise.
7727
7728 2006-07-27  Bruno Haible  <bruno@clisp.org>
7729
7730         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
7731         test.
7732
7733 2006-07-27  Bruno Haible  <bruno@clisp.org>
7734
7735         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
7736         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
7737         defined.
7738
7739 2006-07-26  Eric Blake  <ebb9@byu.net>
7740
7741         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
7742
7743 2006-07-26  Eric Blake  <ebb9@byu.net>
7744
7745         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
7746         like mingw that lack mkstemp.
7747         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
7748         avoid compilation warning on mingw.
7749
7750 2006-07-26  Bruno Haible  <bruno@clisp.org>
7751
7752         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
7753         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
7754         INT_FAST*_MIN, INTPTR_MIN.
7755
7756 2006-07-25  Bruno Haible  <bruno@clisp.org>
7757
7758         * modules/version-etc (Depends-on): Add stdarg.
7759
7760 2006-07-25  Bruno Haible  <bruno@clisp.org>
7761
7762         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
7763         complex commands.
7764
7765 2006-07-25  Bruno Haible  <bruno@clisp.org>
7766
7767         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
7768         defined in <stdarg.h> or config.h.
7769
7770 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7771
7772         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
7773         (gl_STDIO_SAFER): Remove.
7774
7775 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
7776
7777         * MODULES.html.sh (File stream based Input/Output):
7778         Add fopen-safer, tmpfile-safer; remove stdio-safer.
7779         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
7780         * modules/fopen-safer, modules/tmpfile-safer: New files.
7781         * modules/stdio-safer: Remove.
7782
7783 2006-07-24  Bruno Haible  <bruno@clisp.org>
7784
7785         * modules/tmpdir: New file.
7786         * MODULES.html.sh (File system functions): Add it.
7787
7788 2006-07-24  Bruno Haible  <bruno@clisp.org>
7789
7790         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
7791         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
7792
7793 2006-07-24  Bruno Haible  <bruno@clisp.org>
7794
7795         * modules/clean-temp: New file.
7796
7797 2006-07-24  Bruno Haible  <bruno@clisp.org>
7798
7799         * m4/tmpdir.m4: New file, from GNU gettext.
7800
7801 2006-07-24  Bruno Haible  <bruno@clisp.org>
7802
7803         * lib/tmpdir.h: New file, from GNU gettext.
7804         * lib/tmpdir.c: New file, from GNU gettext.
7805
7806 2006-07-24  Bruno Haible  <bruno@clisp.org>
7807
7808         * lib/clean-temp.h: New file, from GNU gettext.
7809         * lib/clean-temp.c: New file, from GNU gettext.
7810
7811 2006-07-23  Eric Blake  <ebb9@byu.net>
7812
7813         * modules/stdio-safer (Files): Add tmpfile-safer.c.
7814         (Depends-on): Add binary-io.
7815
7816 2006-07-23  Eric Blake  <ebb9@byu.net>
7817
7818         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
7819
7820 2006-07-23  Eric Blake  <ebb9@byu.net>
7821
7822         * lib/tmpfile-safer.c: New file.
7823         * lib/stdio-safer.h (fopen_safer): Add prototype.
7824         * lib/stdio--.h (tmpfile): Make safer.
7825
7826 2006-07-23  Bruno Haible  <bruno@clisp.org>
7827
7828         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
7829         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
7830         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
7831         gl_linked_remove_at): Use it.
7832
7833 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7834         and Simon Josefsson <jas@extundo.com>
7835
7836         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
7837
7838         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
7839
7840 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7841
7842         * modules/close-stream: New file.
7843         * modules/closeout (Description): Make it clear that it exits
7844         with a diagnostic on error.
7845         (Depends-on): Add close-stream.  Remove fpending, stdbool.
7846         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
7847
7848 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7849
7850         * m4/close-stream.m4: New file.
7851
7852 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
7853
7854         * lib/close-stream.c, lib/close-stream.h: New files.
7855
7856 2006-07-22  Bruno Haible  <bruno@clisp.org>
7857
7858         Merge from GNU gettext 0.15.
7859
7860         2006-05-01  Bruno Haible  <bruno@clisp.org>
7861
7862                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
7863
7864         2006-07-22  Bruno Haible  <bruno@clisp.org>
7865
7866                 * modules/javaversion: New file.
7867                 * MODULES.html.sh (Java): Add javaversion.
7868
7869         2006-03-12  Bruno Haible  <bruno@clisp.org>
7870
7871                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
7872
7873         2005-12-04  Bruno Haible  <bruno@clisp.org>
7874
7875                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
7876                 (untested).
7877
7878         2006-06-21  Bruno Haible  <bruno@clisp.org>
7879
7880                 Avoid warnings from recent versions of mcs.
7881                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
7882                 -o, -L, -r any more. Use options documented since mcs-1.0
7883                 instead. Similarly for -g.
7884
7885         2005-12-04  Bruno Haible  <bruno@clisp.org>
7886
7887                 * build-aux/csharpcomp.sh.in: Suffix for resources is
7888                 .resources, not .resource.
7889
7890         2005-07-09  Bruno Haible  <bruno@clisp.org>
7891
7892                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
7893                 add a .dll suffix.
7894                 Reported by Mark Junker <mjscod@gmx.de>.
7895
7896         2006-07-22  Bruno Haible  <bruno@clisp.org>
7897
7898                 * modules/gettext: Upgrade to gettext-0.15.
7899                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
7900                 m4/visibility.m4.
7901                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
7902
7903 2006-07-22  Bruno Haible  <bruno@clisp.org>
7904
7905         Merge from GNU gettext 0.15.
7906
7907         2006-03-25  Bruno Haible  <bruno@clisp.org>
7908
7909                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
7910
7911         2006-07-21  Bruno Haible  <bruno@clisp.org>
7912
7913                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
7914                 "1.1".
7915
7916         2006-05-09  Bruno Haible  <bruno@clisp.org>
7917
7918                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
7919                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
7920                 for the conftestver execution.
7921
7922         2006-05-01  Bruno Haible  <bruno@clisp.org>
7923
7924                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
7925                 optional target-version argument. Verify that the compiler
7926                 groks source of the specified source-version, or add -source
7927                 option as necessary. Verify that the compiler produces
7928                 bytecode in the specified target-version, or add -target and
7929                 -source options as necessary. Make the result of the test
7930                 available as variable CONF_JAVAC. Also log error output in
7931                 config.log.
7932
7933         2006-03-11  Bruno Haible  <bruno@clisp.org>
7934
7935                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
7936
7937         2006-05-09  Bruno Haible  <bruno@clisp.org>
7938
7939                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
7940                 CLASSPATH_SEPARATOR to a semicolon.
7941
7942         2006-03-12  Bruno Haible  <bruno@clisp.org>
7943
7944                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
7945                 available as variable CONF_JAVA, for subsequent autoconf
7946                 tests. Also log error output in config.log.
7947
7948         2006-07-19  Bruno Haible  <bruno@clisp.org>
7949
7950                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
7951                 that getline works on glibc2 systems. Needed to avoid trouble
7952                 in relocatable.c.
7953                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
7954
7955         2005-12-04  Bruno Haible  <bruno@clisp.org>
7956
7957                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
7958                 launcher (untested).
7959
7960         2005-12-04  Bruno Haible  <bruno@clisp.org>
7961
7962                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
7963
7964         2006-07-22  Bruno Haible  <bruno@clisp.org>
7965
7966                 * gettext.m4: Update from GNU gettext-0.15.
7967                 * nls.m4: Likewise.
7968                 * po.m4: Likewise.
7969                 * inttypes-pri.m4: Likewise.
7970                 * inttypes-h.m4: Renamed from inttypes.m4.
7971                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
7972
7973 2006-07-22  Bruno Haible  <bruno@clisp.org>
7974
7975         Merge from GNU gettext 0.15.
7976
7977         2005-07-05  Bruno Haible  <bruno@clisp.org>
7978
7979                 * printf-args.c (printf_fetchargs): Work around broken
7980                 definition of wint_t on mingw.
7981
7982         2005-02-12  Bruno Haible  <bruno@clisp.org>
7983
7984                 * xallocsa.h: Add extern "C" for C++.
7985
7986         2006-05-17  Bruno Haible  <bruno@clisp.org>
7987
7988                 Cygwin portability.
7989                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
7990
7991         2006-04-30  Bruno Haible  <bruno@clisp.org>
7992
7993                 * progreloc.c: Include <mach-o/dyld.h> if available.
7994                 (find_executable): Use _NSGetExecutablePath when possible.
7995
7996         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7997
7998                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
7999                 function.
8000
8001         2005-12-29  Bruno Haible  <bruno@clisp.org>
8002
8003                 * progreloc.c (set_program_name_and_installdir): Fix
8004                 compilation error.
8005
8006         2005-12-04  Bruno Haible  <bruno@clisp.org>
8007
8008                 Cygwin portability.
8009                 * progreloc.c: Include <windows.h> also on Cygwin.
8010                 (find_executable): Add support for Cygwin.
8011                 (set_program_name_and_installdir): Handle also platforms with
8012                 nonempty EXEEXT.
8013
8014         2006-07-11  Bruno Haible  <bruno@clisp.org>
8015
8016                 * javacomp.c: Fix a comment.
8017                 Reported by Jim Meyering.
8018
8019         2006-04-30  Bruno Haible  <bruno@clisp.org>
8020
8021                 * javacomp.h (compile_java_class): Add source_version,
8022                 target_version arguments.
8023                 * javacomp.c: Rewritten to choose only a compiler that
8024                 respects the specified source_version and target_version.
8025
8026         2006-06-27  Bruno Haible  <bruno@clisp.org>
8027
8028                 Assume correct S_ISDIR macro.
8029                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
8030
8031         2006-07-22  Bruno Haible  <bruno@clisp.org>
8032
8033                 * javaversion.h: New file, from GNU gettext.
8034                 * javaversion.c: New file, from GNU gettext.
8035                 * javaversion.java: New file, from GNU gettext.
8036                 * javaversion.class: New file, from GNU gettext.
8037
8038         2006-05-17  Bruno Haible  <bruno@clisp.org>
8039
8040                 Cygwin portability.
8041                 * javaexec.c (execute_java_class): Test for jview program
8042                 also on Cygwin.
8043
8044         2006-04-09  Bruno Haible  <bruno@clisp.org>
8045
8046                 * fatal-signal.c: Don't include string.h.
8047                 (at_fatal_signal): Use a copying loop instead of memcpy.
8048
8049         2005-12-04  Bruno Haible  <bruno@clisp.org>
8050
8051                 * csharpexec.c: Add support for 'clix' launcher (untested).
8052                 (execute_csharp_using_sscli): New function.
8053                 (execute_csharp_program): Call it.
8054
8055         2006-06-21  Bruno Haible  <bruno@clisp.org>
8056
8057                 Avoid warnings from recent versions of mcs.
8058                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
8059                 -o, -L, -r any more. Use options documented since mcs-1.0
8060                 instead. Similarly for -g.
8061
8062         2005-07-09  Bruno Haible  <bruno@clisp.org>
8063
8064                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
8065                 add a .dll suffix.
8066                 Reported by Mark Junker <mjscod@gmx.de>.
8067
8068         2006-06-17  Bruno Haible  <bruno@clisp.org>
8069
8070                 * config.charset: Update for NetBSD 3.0.
8071
8072         2006-05-17  Bruno Haible  <bruno@clisp.org>
8073
8074                 Cygwin portability.
8075                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
8076
8077         2006-05-16  Bruno Haible  <bruno@clisp.org>
8078
8079                 * localcharset.c [CYGWIN]: Include <windows.h>.
8080                 (get_charset_aliases): For Cygwin, return the same CPxxx
8081                 aliases list as under WIN32.
8082                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
8083                 the environment variables. Fall back to GetACP().
8084
8085         2006-04-05  Bruno Haible  <bruno@clisp.org>
8086
8087                 * config.charset: Update Juan Manuel Guerrero's address.
8088
8089         2005-02-12  Bruno Haible  <bruno@clisp.org>
8090
8091                 * allocsa.h: Add extern "C" for C++.
8092
8093         2005-02-10  Bruno Haible  <bruno@clisp.org>
8094
8095                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
8096                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
8097
8098         2006-07-22  Bruno Haible  <bruno@clisp.org>
8099
8100                 * gettext.h: Update to GNU gettext-0.15.
8101
8102 2006-07-22  Bruno Haible  <bruno@clisp.org>
8103
8104         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
8105         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
8106         lib-prefix.m4, longdouble.m4, ssize_t.m4.
8107
8108 2006-07-21  Eric Blake  <ebb9@byu.net>
8109
8110         * modules/stdlib-safer: New file.
8111         * MODULES.html.sh (File stream based Input/Output): Add
8112         stdlib-safer.
8113
8114 2006-07-21  Eric Blake  <ebb9@byu.net>
8115
8116         * lib/stdlib-safer.h: New file from coreutils, required by
8117         stdlib--.h.
8118
8119 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
8120
8121         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
8122
8123 2006-07-20  Bruno Haible  <bruno@clisp.org>
8124
8125         * gnulib-tool: Recognize new option --assume-autoconf.
8126         (autoconf_minversion): New variable.
8127         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
8128
8129 2006-07-20  Bruno Haible  <bruno@clisp.org>
8130
8131         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
8132
8133 2006-07-19  Derek R. Price  <derek@ximbiot.com>
8134
8135         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
8136         Reindent and repaginate.
8137
8138 2006-07-19  Derek Price  <derek@ximbiot.com>
8139
8140         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
8141         Correct grammar.
8142
8143 2006-07-17  Bruno Haible  <bruno@clisp.org>
8144
8145         * modules/list: New file.
8146         * modules/array-list: New file.
8147         * modules/carray-list, modules/carray-list-tests: New files.
8148         * modules/linked-list, modules/linked-list-tests: New files.
8149         * modules/avltree-list, modules/avltree-list-tests: New files.
8150         * modules/rbtree-list, modules/rbtree-list-tests: New files.
8151         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
8152         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
8153         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
8154         * modules/oset: New file.
8155         * modules/array-oset: New file.
8156         * modules/avltree-oset, modules/avltree-oset-tests: New files.
8157         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
8158         * tests/test-carray_list.c: New file.
8159         * tests/test-linked_list.c: New file.
8160         * tests/test-avltree_list.c: New file.
8161         * tests/test-rbtree_list.c: New file.
8162         * tests/test-linkedhash_list.c: New file.
8163         * tests/test-avltreehash_list.c: New file.
8164         * tests/test-rbtreehash_list.c: New file.
8165         * tests/test-avltree_oset.c: New file.
8166         * tests/test-rbtree_oset.c: New file.
8167         * MODULES.html.sh (Container data structures): New section.
8168
8169 2006-07-17  Bruno Haible  <bruno@clisp.org>
8170
8171         * m4/gl_list.m4: New file.
8172
8173 2006-07-17  Bruno Haible  <bruno@clisp.org>
8174
8175         * lib/gl_list.h: New file.
8176         * lib/gl_list.c: New file.
8177         * lib/gl_array_list.h: New file.
8178         * lib/gl_array_list.c: New file.
8179         * lib/gl_carray_list.h: New file.
8180         * lib/gl_carray_list.c: New file.
8181         * lib/gl_linked_list.h: New file.
8182         * lib/gl_linked_list.c: New file.
8183         * lib/gl_anylinked_list1.h: New file.
8184         * lib/gl_anylinked_list2.h: New file.
8185         * lib/gl_avltree_list.h: New file.
8186         * lib/gl_avltree_list.c: New file.
8187         * lib/gl_anyavltree_list1.h: New file.
8188         * lib/gl_anyavltree_list2.h: New file.
8189         * lib/gl_rbtree_list.h: New file.
8190         * lib/gl_rbtree_list.c: New file.
8191         * lib/gl_anyrbtree_list1.h: New file.
8192         * lib/gl_anyrbtree_list2.h: New file.
8193         * lib/gl_anytree_list1.h: New file.
8194         * lib/gl_anytree_list2.h: New file.
8195         * lib/gl_linkedhash_list.h: New file.
8196         * lib/gl_linkedhash_list.c: New file.
8197         * lib/gl_anyhash_list1.h: New file.
8198         * lib/gl_anyhash_list2.h: New file.
8199         * lib/gl_avltreehash_list.h: New file.
8200         * lib/gl_avltreehash_list.c: New file.
8201         * lib/gl_rbtreehash_list.h: New file.
8202         * lib/gl_rbtreehash_list.c: New file.
8203         * lib/gl_anytreehash_list1.h: New file.
8204         * lib/gl_anytreehash_list2.h: New file.
8205
8206         * lib/gl_oset.h: New file.
8207         * lib/gl_oset.c: New file.
8208         * lib/gl_array_oset.h: New file.
8209         * lib/gl_array_oset.c: New file.
8210         * lib/gl_avltree_oset.h: New file.
8211         * lib/gl_avltree_oset.c: New file.
8212         * lib/gl_rbtree_oset.h: New file.
8213         * lib/gl_rbtree_oset.c: New file.
8214         * lib/gl_anytree_oset.h: New file.
8215
8216 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8217
8218         * m4/mkancesdirs.m4: New file.
8219         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
8220         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
8221         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
8222         it.
8223
8224 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8225
8226         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
8227         * lib/mkancesdirs.h: New files.
8228         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
8229         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
8230         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
8231         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
8232         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
8233         callers changed.  Revamp internals significantly, by not
8234         attempting to create directories that are temporarily more
8235         permissive than the final results.  Do not attempt to use
8236         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
8237         This removes some race conditions, fixes some bugs, and simplifies
8238         things.  Use new dirchownmod function to do owner and mode changes.
8239         * lib/mkdir-p.h: Likewise.
8240         * lib/modechange.c (octal_to_mode): New function.
8241         (struct mode_change): New member mentioned.
8242         (make_node_op_equals): New arg mentioned.  All callers changed.
8243         (mode_compile): Keep track of which mode bits the user has explicitly
8244         mentioned.
8245         (mode_adjust): New arg DIR, so that we implement the X op correctly.
8246         New arg PMODE_BITS, to keep track of which mode bits the user
8247         mentioned; it treats S_ISUID and S_ISGID speciall.
8248         All callers changed.
8249         * lib/modechange.h: Likewise.
8250
8251 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
8252
8253         * MODULES.html.sh: Add mkancestors.
8254         * modules/mkancesdirs: New module.
8255         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
8256         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
8257         The chdir-safer and afs files are now orphans; I'll remove them
8258         unless someone speaks up.
8259         Add lib/dirchownmod.c, lib/dirchownmod.h.
8260         (Depends-on): Remove alloca, chown, save-cwd, dirname.
8261         Add lchown, mkancesdirs.
8262         (Maintainer): Add self.
8263
8264 2006-07-15  Karl Berry  <karl@gnu.org>
8265
8266         * gnulib-tool: help message wording/arrangement.
8267
8268 2006-07-14  Simon Josefsson  <jas@extundo.com>
8269
8270         * doc/gnulib.texi (Libtool and Windows): New section.
8271
8272 2006-07-12  Simon Josefsson  <jas@extundo.com>
8273
8274         * modules/gendocs (License): Fix license, approved by Karl.
8275
8276 2006-07-12  Eric Blake  <ebb9@byu.net>
8277
8278         * MODULES.html.sh: Add gendocs.
8279
8280 2006-07-11  Eric Blake  <ebb9@byu.net>
8281
8282         * modules/fdl: New module, to install doc/fdl.texi.
8283         * MODULES.html.sh: Add new section for documentation modules.
8284         * gnulib-tool: Avoid space-tab.
8285         (--doc-base): New option, to manage files from doc.
8286
8287 2006-07-11  Eric Blake  <ebb9@byu.net>
8288
8289         * m4/absolute-header.m4: Fix comments to match recent change.
8290
8291 2006-07-11  Eric Blake  <ebb9@byu.net>
8292
8293         * gnulib-tool: List --doc-base before --tests-base.
8294
8295 2006-07-11  Derek R. Price  <derek@ximbiot.com>
8296
8297         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
8298
8299 2006-07-11  Bruno Haible  <bruno@clisp.org>
8300
8301         * README: Mention where to put documentation.
8302
8303 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8304
8305         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
8306
8307 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8308
8309         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
8310         to stdint.m4.
8311
8312 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
8313
8314         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
8315         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
8316         "no/such/file/stdint.h" when there is no such file, so that
8317         the resulting C code can be parsed by dodgy compilers.
8318         Problems reported by Bob Proulx.
8319
8320 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8321
8322         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
8323         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8324         macros into the GNU _D_EXACT_NAMLEN.
8325         * lib/savedir.c:  Likewise.
8326         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
8327
8328 2006-07-10  Derek R. Price  <derek@ximbiot.com>
8329         and Paul Eggert  <eggert@cs.ucla.edu>
8330
8331         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
8332         * m4/savedir.m4:
8333         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
8334         macros into the GNU _D_EXACT_NAMLEN.
8335
8336 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8337
8338         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
8339         around the absolute name, to work around a problem with the HP-UX
8340         11.23 native C compiler, reported by Bob Proulx.
8341
8342 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8343
8344         * doc/maintain.texi, make-stds.texi: Sync from
8345         <http://savannah.gnu.org/projects/gnustandards>.
8346
8347 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
8348
8349         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
8350
8351 2006-07-09  Jim Meyering  <jim@meyering.net>
8352
8353         * m4/glob.m4: Remove a doubled word in a comment.
8354
8355 2006-07-09  Jim Meyering  <jim@meyering.net>
8356
8357         * lib/argp-pv.c: Remove a doubled word in a comment.
8358         * lib/check-version.c (check_version): Likewise.
8359         * lib/javacomp.c (compile_java_class): Likewise.
8360
8361 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
8362
8363         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
8364         for the benefit of people using Autoconf 2.60.  If you want to
8365         support older Autoconf versions you can copy m4/onceonly_2_57.m4
8366         (or m4/onceonly.m4, if pre-2.57) manually.
8367
8368 2006-07-08  Jim Meyering  <jim@meyering.net>
8369
8370         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
8371         comment.
8372         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
8373         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
8374         comment.
8375
8376 2006-07-08  Jim Meyering  <jim@meyering.net>
8377
8378         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
8379
8380 2006-07-07  Simon Josefsson  <jas@extundo.com>
8381
8382         * tests/test-crc.c: Change expected crc value, the test vector
8383         were probably computed using the old broken crc.c?
8384
8385 2006-07-06  Simon Josefsson  <jas@extundo.com>
8386
8387         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
8388         now the canonical place for the M4 file).
8389
8390         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
8391         from the sys_socket dependency now.
8392
8393         * modules/inet_pton (Files): Ditto.
8394
8395         * modules/inet_ntop (Files): Ditto.
8396
8397 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8398
8399         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
8400         not gl_PREREQ_GETUSERSHELL.
8401
8402 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8403
8404         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
8405         with only one argument, for Autoconf 2.60.
8406         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
8407         expand to nothing, so add a shell command to avoid syntax error.
8408         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8409
8410 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8411
8412         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
8413
8414 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8415
8416         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
8417         no longer needed.  Check for isblank decl.
8418         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
8419         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
8420         of existence.
8421
8422 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8423
8424         * lib/getloadavg.c: Use __VMS, not VMS.
8425         * lib/getopt.c: Likewise.
8426         * lib/getpagesize.h: Likewise.
8427         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
8428         and probably does not work.
8429
8430 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
8431
8432         * lib/.cppi-disable: Add wcwidth.
8433         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
8434         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
8435         (ISGRAPH): Remove.  All uses changed to isgraph.
8436         (FOLD) [!defined _LIBC]: Remove special case.
8437         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
8438         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
8439         HAVE_ISBLANK.
8440         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
8441         case.
8442
8443 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8444
8445         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
8446         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
8447         brackets.  Other minor changes to suppress some compiler
8448         warnings.
8449
8450 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8451         and Paul Eggert  <eggert@cs.ucla.edu>
8452
8453         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
8454         of invoking obsolescent AC_HEADER_DIRENT macro.
8455         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
8456         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
8457         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
8458         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
8459         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
8460         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8461         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
8462         * m4/readdir.m4: Remove; no longer needed.
8463
8464 2006-07-06  Derek R. Price  <derek@ximbiot.com>
8465         and Paul Eggert  <eggert@cs.ucla.edu>
8466
8467         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
8468         Don't worry about this obsolete case any more.
8469         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
8470         directories.
8471         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
8472         worry about this obsolete case any more.
8473         * lib/fts.c: Likewise.
8474         * lib/getcwd.c: Likewise.
8475         * lib/glob.h: Likewise.
8476         * lib/savedir.c: Likewise.
8477
8478 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8479
8480         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
8481         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
8482         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
8483         needed.
8484         All uses removed.
8485         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8486         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8487         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
8488         needed.
8489         * m4/getdate.m4 (gl_GETDATE): Likewise.
8490         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8491         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8492         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8493         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8494         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
8495         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8496         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
8497         needed.
8498
8499 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
8500
8501         * lib/memcasecmp.c: Include <limits.h>.
8502         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
8503         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
8504         Don't assume isdigit succeeds only on '0' through '9'.
8505
8506 2006-07-05  Eric Blake  <ebb9@byu.net>
8507
8508         * modules/getaddrinfo (Depends-on): Add snprintf.
8509
8510 2006-07-05  Eric Blake  <ebb9@byu.net>
8511
8512         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
8513         to avoid 'header present but could not be compiled' on cygwin.
8514
8515 2006-07-05  Eric Blake  <ebb9@byu.net>
8516
8517         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
8518         missing from netdb.h.
8519         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
8520
8521 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8522
8523         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
8524         no longer needed.
8525         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
8526         * m4/getdate.m4 (gl_GETDATE): Likewise.
8527         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
8528         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
8529         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
8530         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
8531         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
8532
8533 2006-07-05  Derek R. Price  <derek@ximbiot.com>
8534
8535         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
8536         All uses of is_space replaced by isspace.
8537         * lib/exit.h: Don't talk about STDC_HEADERS.
8538         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
8539         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
8540         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
8541         replaced by isprint etc.
8542         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
8543         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8544         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
8545         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
8546         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
8547         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
8548
8549 2006-07-05  Bruno Haible  <bruno@clisp.org>
8550
8551         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
8552         the function exists, before testing against AIX.
8553         Reported by Martin Lambers <marlam@marlam.de>.
8554
8555 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8556
8557         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
8558         From Mark D. Baushke.
8559
8560 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
8561
8562         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
8563         to the absolute name, not just one, to bypass Sun C 5.8's
8564         "warning: #include of /usr/include/... may be non-portable".
8565
8566 2006-07-04  Eric Blake  <ebb9@byu.net>
8567
8568         * modules/dirname-tests: New test module.
8569         * tests/test-dirname.c: New file, replacing dirname.c
8570         TEST_DIRNAME section that was recently deleted.
8571
8572 2006-07-04  Bruno Haible  <bruno@clisp.org>
8573
8574         Assume ANSI C header files and <ctype.h> functions.
8575         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
8576         (mbsnwidth): Use isprint, iscntrl instead.
8577
8578 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8579
8580         Merge from coreutils.
8581         * MODULES.html.sh: Add xstrtold.
8582         * modules/xstrtold: New file.
8583         * modules/cycle-check (Files): Add lib/same-inode.h.
8584         * modules/dirname (Files): Add m4/double-slash-root.m4.
8585         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
8586         * modules/mkdir-p (Files): Add lib/same-inode.h.
8587         * modules/same (Files): Add lib/same-inode.h.
8588
8589 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8590
8591         * m4/absolute-header.m4: Renamed from full-header-path.m4.
8592         This is to keep the terminology clean; POSIX talks about
8593         "absolute pathnames", not "full pathnames", but the GNU
8594         Coding Standards say to use "path" for something else;
8595         so use "absolute" to keep both sides happy.
8596         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
8597         Set gl_absolute_header, not gl_full_header_path.
8598         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
8599         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
8600         All uses changed.
8601
8602         Merge from coreutils.
8603
8604         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8605
8606         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
8607         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
8608         want to require the building of c-strtod.o.
8609         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
8610         needs -lm directly.
8611         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
8612
8613         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8614
8615         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
8616         --as-needed option if available.  Problem reported by Albert Chin in
8617         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
8618         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
8619         cc merely issues a bunch of annoying warnings for --as-needed
8620         (this problem was reported by Bob Proulx).  Also, try linking with
8621         -lm to detect a bug in binutils 2.16 (this problem was reported
8622         by Ralf Wildenhues).
8623
8624         2006-06-18  Jim Meyering  <jim@meyering.net>
8625
8626         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
8627         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
8628         macro.
8629         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
8630         also check for glibc-2.4's abort-inducing bug.
8631
8632         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
8633         Low-probability clean-up should be to use rmdir to get rid of
8634         the just-created directory, not unlink.
8635
8636         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
8637         configure fail, and request a bug report to inform us about it.
8638         Add a comment that, barring reports to the contrary, in 2007 we'll
8639         assume ftruncate is universally available.
8640
8641         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8642
8643         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
8644
8645         2006-03-12  Jim Meyering  <jim@meyering.net>
8646
8647         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
8648         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
8649         * m4/same.m4 (gl_SAME): Likewise.
8650         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
8651
8652         2006-03-11  Eric Blake  <ebb9@byu.net>
8653
8654         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
8655         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
8656         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
8657         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
8658
8659 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
8660
8661         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
8662         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
8663         reported by Mark D. Baushke, one in
8664         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
8665
8666         Merge from coreutils.
8667
8668         * lib/.cppi-disable: Add stdint_.h.
8669         * lib/.cvsignore: Add stdint.h.
8670
8671         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
8672
8673         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
8674         both double and long double versions.
8675         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
8676         * lib/xstrtold.c: New file.
8677         * lib/xstrtod.h (xstrtold): New decl.
8678
8679         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
8680
8681         * lib/filemode.c (setst): Remove.
8682         (strmode): Rewrite to avoid setst.  This makes the code shorter,
8683         (arguably) clearer, and the generated code is a bit smaller on my
8684         Debian GNU/Linux stable x86 host.
8685
8686         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
8687
8688         * lib/filemode.c: Include "filemode.h" first, to test the interface.
8689         Assume that filemode.h includes sys/types.h and sys/stat.h.
8690         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
8691         (ftypelet): Reorder to put common cases first, for efficiency.
8692         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
8693         to do 'M'.
8694         (strmode): Renamed from mode_string, and now stores 12 bytes instead
8695         of 10, for compatibility with FreeBSD.  All callers changed.
8696         (filemodestring): Now stores 12 bytes instead of 10, and sets file
8697         types that can't be deduced solely from st_mode.  First arg is now a
8698         const pointer.
8699         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
8700         (strmode): Renamed from mode_string.
8701         (filemodestring): New decl.
8702         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
8703         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
8704         needed.
8705         (S_ISPORT, S_ISWHT): New macros, if not already defined.
8706
8707         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
8708
8709         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
8710         fsusage.h now does that.  Include fsusage.h first, to test interface.
8711         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
8712         at most one method (the old code could have generated decls that
8713         didn't conform to C89, not that this was ever exercised).
8714         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
8715
8716         2006-03-19  Jim Meyering  <jim@meyering.net>
8717
8718         Work even in a chroot where d_ino values for entries in "/"
8719         don't match the stat.st_ino values for the same names.
8720         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
8721         number, iterate through all entries again, using lstat instead.
8722         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
8723         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
8724
8725         * lib/getcwd.c (__getcwd): Clarify a comment.
8726         Use memcpy in place of a call to strcpy.
8727
8728         2006-03-12  Jim Meyering  <jim@meyering.net>
8729
8730         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
8731         matches that of the current directory (which we're about to chdir ".."
8732         out of), then save the dev-ino of the parent, instead.
8733
8734         * lib/same-inode.h (SAME_INODE): New file/macro.
8735         * lib/chdir-safer.c (SAME_INODE): Remove definition.
8736         Include "same-inode.h", instead.
8737         * lib/same.c: Likewise.
8738         * lib/cycle-check.h: Include "same-inode.h".
8739         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
8740         * lib/cycle-check.c (SAME_INODE): Remove definition.
8741         * lib/root-dev-ino.h: Include "same-inode.h".
8742
8743         2006-03-11  Eric Blake  <ebb9@byu.net>
8744
8745         * lib/same.c (same_name): s/base_name/last_component/
8746         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
8747         * lib/filenamecat.c (file_name_concat): Likewise.
8748
8749         2006-03-11  Eric Blake  <ebb9@byu.net>,
8750                     Paul Eggert  <eggert@cs.ucla.edu>
8751
8752         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
8753         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
8754         drive prefix.
8755         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
8756         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
8757         (last_component): New method.
8758         * lib/dirname.c (dir_len): Determine when drive letters need a
8759         subsequent slash.  Preserve // when it is special.
8760         (dir_name): Don't append dot when drive letter is absolute.
8761         [TEST_DIRNAME]: Move into a full-blown gnulib test.
8762         * lib/basename.c (base_name): New semantics - malloc the result.
8763         Preserve // when it is special.  Preserve relative files that look
8764         like drive letters.
8765         (base_len): Preserve // when it is special.
8766         (last_component): New method, similar to old base_name semantics.
8767         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
8768         base_name.  Strip redundant slashes from ///.
8769
8770 2006-07-03  Jim Meyering  <jim@meyering.net>
8771
8772         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
8773         macro is used before the first cycle_check call.
8774
8775 2006-07-03  Eric Blake  <ebb9@byu.net>
8776
8777         * modules/dirname (Depends-on): Add xstrndup.
8778
8779 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8780
8781         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
8782         test cases, so that config.log is a bit easier to follow.
8783
8784 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
8785
8786         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
8787         both are 64 bits, since this seems to be the tradition, and this
8788         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
8789         we ever run into a host that prefers long long to long in this
8790         case, we'll need another configure-time test.  Problem reported by
8791         Jim Meyering.
8792
8793 2006-07-02  Eric Blake  <ebb9@byu.net>
8794
8795         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
8796
8797 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8798
8799         * modules/inttypes (Depends-on): No longer depends on stdint.
8800         * modules/stdint (Description): Say more about assumptions.
8801         Say that the fast types might differ.  Say macros are used.
8802         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
8803         (Makefile.am): Revise list of substituted symbols to match
8804         new stdint.m4.
8805         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
8806         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
8807         * tests/test-stdint.c (verify_same_types)
8808         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
8809         the code conforms to C99/C89.
8810         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
8811         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
8812
8813 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8814
8815         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
8816         but fix a bug, by requiring at least 64 bits.
8817         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
8818         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
8819         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
8820         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
8821
8822         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
8823         changes.  Make 2.59 a prerequisite.  Check and substitute for
8824         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
8825         inttypes.h.  Do not use special include files; just use the
8826         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
8827         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
8828         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
8829         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
8830         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
8831         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
8832         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
8833         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
8834         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
8835         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
8836         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
8837         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
8838         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
8839         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
8840         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
8841         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
8842         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
8843         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
8844         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
8845         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
8846         WINT_MAX.  Check for C99 conformance more strictly, by detecting
8847         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
8848         not check for things that C99 does not require, e.g., int8_t.  If
8849         a test isn't needed unless <stdint.h> isn't working, and is
8850         unlikely to be needed for any other reason, then don't do it
8851         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
8852         size_t, since we assume C89 freestanding at least.  Do not check
8853         for sig_atomic_t, wchar_t, or wint_t, since the code now does
8854         the right thing even if the types are not defined.  Instead use:
8855         (gl_STDINT_TYPE_PROPERTIES): New macro.
8856         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
8857         testing whether <sys/types.h> clashes, as Autoconf does this for
8858         us now.  All uses removed.
8859         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
8860         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
8861         (gl_CHECK_TYPE_SAME):
8862         Remove; no longer needed.
8863         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
8864         exists, since we'll return 0 anyway in that case.
8865         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
8866
8867 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
8868
8869         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
8870         possible collision with system files.
8871         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
8872         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
8873         WCHAR_MIN and WCHAR_MAX in this case.
8874         (<stddef.h>): Do not include; no longer needed.
8875         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
8876         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
8877         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
8878         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
8879         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
8880         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
8881         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
8882         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
8883         !defined(__c99))]: Include in this case too, since it's harmless
8884         now.
8885         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
8886         dangerous to do so.
8887         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
8888         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
8889         (_STDINT_MIN, _STDINT_MAX): New macros.
8890         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
8891         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
8892         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
8893         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
8894         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
8895         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
8896         macros, not typedefs; this simplifies things quite a bit.
8897         Use long int for all types narrower than int64_t.
8898         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
8899         Define in terms of long long int or int64_t or long int,
8900         not int64_t or int32_t.  This saves some compile-time testing.
8901         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
8902         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
8903         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
8904         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
8905         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
8906         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
8907         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
8908         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
8909         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
8910         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
8911         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8912         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8913         undef any previous version and define our own version, for
8914         simplicity and consistency with the new macros for types.
8915         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
8916         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
8917         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
8918         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
8919         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
8920         @WINT_T_SUFFIX@ to keep things simple here.
8921         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
8922         Simplify by assuming typical 8/16/32/64 host, since we're
8923         already doing that elsewhere anyway.
8924         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
8925         and assume long long int is 64 bits if available.  This
8926         speeds up 'configure'.
8927
8928 2006-07-01  Eric Blake  <ebb9@byu.net>
8929
8930         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
8931         Reported by Andreas Buening.
8932
8933 2006-07-01  Eric Blake  <ebb9@byu.net>
8934
8935         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
8936
8937 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
8938
8939         * lib/getaddrinfo.c: fixed typo
8940
8941 2006-06-29  Jim Meyering  <jim@meyering.net>
8942
8943         * modules/strftime (Maintainer): Add my name, since with the
8944         FPRINTFTIME changes strftime.c has forked from glibc.
8945
8946 2006-06-29  Eric Blake  <ebb9@byu.net>
8947
8948         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
8949
8950 2006-06-29  Eric Blake  <ebb9@byu.net>
8951
8952         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
8953
8954 2006-06-29  Eric Blake  <ebb9@byu.net>
8955
8956         * lib/stat_.h: New file.
8957
8958 2006-06-29  Eric Blake  <ebb9@byu.net>
8959
8960         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
8961         unused static function.
8962
8963 2006-06-29  Eric Blake  <ebb9@byu.net>
8964
8965         * doc/functions.texi (Function Portability): Document missing lstat
8966         on mingw.
8967
8968 2006-06-29  Eric Blake  <ebb9@byu.net>
8969
8970         * MODULES.html.sh: Add sys_stat.
8971         * modules/sys_stat: New module.
8972         * modules/mkstemp (Depends-on): Add sys_stat.
8973
8974 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8975
8976         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
8977
8978 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8979
8980         * m4/c-bs-a.m4: Removed.
8981
8982 2006-06-29  Derek R. Price  <derek@ximbiot.com>
8983
8984         * lib/strftime.c: Assume strftime() exists.
8985
8986 2006-06-29  Derek Price  <derek@ximbiot.com>
8987
8988         * modules/c-bs-a: Removed - \a is C89.
8989         * MODULES.html.sh: Remove c-bs-a.
8990
8991 2006-06-29  Bruno Haible  <bruno@clisp.org>
8992
8993         * modules/wcwidth (License): Change to LGPL.
8994
8995 2006-06-28  Simon Josefsson  <jas@extundo.com>
8996
8997         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
8998         on _WIN32.
8999
9000         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
9001         getnameinfo.
9002
9003 2006-06-28  Simon Josefsson  <jas@extundo.com>
9004
9005         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
9006
9007 2006-06-28  Simon Josefsson  <jas@extundo.com>
9008
9009         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
9010         functions there.  It will succeed on Windows XP, but on Windows
9011         2000 and (presumably) earlier, it will fail, and use the internal
9012         re-implementation.
9013         (use_win32_p): New function.
9014         (getaddrinfo): Use strtoul on servname, to support numeric ports.
9015         Support AI_NUMERICSERV to disable getservbyname.
9016         (getnameinfo): New function, only supports
9017         NI_NUMERICHOST|NI_NUMERICSERV for now.
9018
9019         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
9020         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
9021         getnameinfo.
9022
9023 2006-06-28  Eric Blake  <ebb9@byu.net>
9024
9025         * modules/wcwidth: New file.
9026         * modules/mbchar (Depends-on): Add wcwidth.
9027         * modules/mbswidth (Depends-on): Add wcwidth.
9028         * MODULES.html.sh: Add wcwidth.
9029
9030 2006-06-28  Eric Blake  <ebb9@byu.net>
9031
9032         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
9033         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
9034
9035 2006-06-28  Eric Blake  <ebb9@byu.net>
9036
9037         * lib/xvasprintf.h: Fix comments.
9038
9039 2006-06-28  Eric Blake  <ebb9@byu.net>
9040
9041         * lib/mbchar.h (wcwidth): Include wcwidth.h.
9042         * lib/mbswidth.c (wcwidth): Move from here...
9043         * lib/wcwidth.h: ...to this new file.
9044
9045 2006-06-28  Derek R. Price  <derek@ximbiot.com>
9046
9047         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
9048
9049         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
9050         it's obsolete.
9051         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
9052
9053 2006-06-28  Derek R. Price  <derek@ximbiot.com>
9054
9055         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
9056         Autoconf 2.60 says this stuff was obsolete.
9057
9058 2006-06-28  Bruno Haible  <bruno@clisp.org>
9059
9060         * modules/wcwidth (Files): Add m4/wchar_t.m4.
9061
9062 2006-06-28  Bruno Haible  <bruno@clisp.org>
9063
9064         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
9065         gt_TYPE_WCHAR_T.
9066
9067 2006-06-28  Bruno Haible  <bruno@clisp.org>
9068
9069         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
9070         declaration for wcwidth.
9071         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
9072
9073 2006-06-28  Bruno Haible  <bruno@clisp.org>
9074
9075         * lib/mkdtemp.c [MINGW]: Include <io.h>.
9076         (mkdir): Define using _mkdir.
9077
9078 2006-06-28  Bruno Haible  <bruno@clisp.org>
9079
9080         * lib/getaddrinfo.h: Fix POSIX URL.
9081         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
9082         _WIN32.
9083         (use_win32_p): Make static.
9084         (getaddrinfo): Reject service name if it is empty or does not consist
9085         solely of decimal digits, or if its value is > 65535.
9086         (getnameinfo): Remove useless casts.
9087
9088 2006-06-27  Simon Josefsson  <jas@extundo.com>
9089
9090         * modules/sys_select: New file, suggested by Bruno Haible, Paul
9091         Eggert and Martin Lambers.
9092
9093 2006-06-27  Simon Josefsson  <jas@extundo.com>
9094
9095         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
9096         Eggert and Martin Lambers.
9097
9098 2006-06-27  Bruno Haible  <bruno@clisp.org>
9099
9100         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
9101         result to 0, not to empty.
9102         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
9103
9104 2006-06-27  Bruno Haible  <bruno@clisp.org>
9105
9106         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
9107
9108 2006-06-26  Simon Josefsson  <jas@extundo.com>
9109
9110         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
9111         present.
9112
9113 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
9114
9115         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
9116         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
9117         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
9118
9119 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
9120
9121         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
9122
9123 2006-06-26  Bruno Haible  <bruno@clisp.org>
9124
9125         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
9126
9127 2006-06-26  Bruno Haible  <bruno@clisp.org>
9128
9129         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
9130
9131 2006-06-26  Bruno Haible  <bruno@clisp.org>
9132
9133         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
9134         SGI C compiler in pre-C99 mode.
9135         Suggested by Mark D. Baushke and Larry Jones.
9136
9137 2006-06-26  Bruno Haible  <bruno@clisp.org>
9138
9139         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
9140         WCHAR_MAX.
9141         Reported by Mark D. Baushke and Larry Jones.
9142
9143 2006-06-26  Bruno Haible  <bruno@clisp.org>
9144
9145         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
9146         in pre-C99 mode.
9147         Suggested by Mark D. Baushke and Larry Jones.
9148
9149 2006-06-23  Simon Josefsson  <jas@extundo.com>
9150             Bruno Haible  <bruno@clisp.org>
9151
9152         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
9153         Emit mostlyclean-local rule.
9154         (func_emit_tests_Makefile_am): Likewise.
9155         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
9156
9157 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
9158
9159         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
9160
9161 2006-06-23  Bruno Haible  <bruno@clisp.org>
9162
9163         * tests/test-stdint.c: Update to match ISO C 99 Technical
9164         Corrigendum 1.
9165
9166 2006-06-23  Bruno Haible  <bruno@clisp.org>
9167
9168         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
9169
9170 2006-06-23  Bruno Haible  <bruno@clisp.org>
9171
9172         * lib/stdint_.h: Treat IRIX like OpenBSD.
9173
9174 2006-06-23  Bruno Haible  <bruno@clisp.org>
9175
9176         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
9177         ISO C 99 Technical Corrigendum 1.
9178
9179 2006-06-22  Simon Josefsson  <jas@extundo.com>
9180
9181         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
9182         MinGW.
9183
9184 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
9185
9186         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
9187         needed.  Some compiler complained about some of them.  Problem reported
9188         by Larry Jones in
9189         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
9190
9191 2006-06-21  Simon Josefsson  <jas@extundo.com>
9192
9193         * tests/test-getaddrinfo.c: New file.
9194
9195         * modules/getaddrinfo-tests: New file.
9196
9197         * MODULES.html.sh: Add inet_pton.
9198
9199         * modules/inet_pton: New file.
9200
9201 2006-06-21  Simon Josefsson  <jas@extundo.com>
9202
9203         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
9204         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
9205         of using the (limited) gnulib implementation on Windows XP.
9206
9207         * m4/inet_pton.m4: New file.
9208
9209 2006-06-21  Simon Josefsson  <jas@extundo.com>
9210
9211         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
9212         variable.
9213
9214         * lib/socket_.h: Don't define WINVER.
9215
9216         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
9217         slightly modified to work in gnulib.
9218
9219 2006-06-21  Simon Josefsson  <jas@extundo.com>
9220
9221         * doc/gnulib.texi (Windows sockets): Add.
9222
9223 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
9224
9225         * lib/read-file.c (fread_file): Start with buffer allocation of
9226         0 bytes rather than 1 byte; this simplifies the code.
9227         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
9228         code to free buffer and save/restore errno.
9229         (internal_read_file): Remove unused local.
9230
9231 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
9232
9233         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
9234         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
9235         Problem reported by Denis Excoffier in
9236         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
9237
9238 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9239
9240         * modules/sys_socket, modules/socklen: Include sys/types since
9241         FreeBSD 4.x's sys/socket.h needs it.
9242
9243 2006-06-19  Simon Josefsson  <jas@extundo.com>
9244
9245         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
9246
9247 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
9248
9249         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
9250
9251 2006-06-19  Bruno Haible  <bruno@clisp.org>
9252
9253         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
9254         and FULL_PATH_INTTYPES_H in angle brackets.
9255         Reported by Mark D. Baushke <mdb@gnu.org>.
9256
9257 2006-06-17  Eric Blake  <ebb9@byu.net>
9258
9259         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
9260         errno.
9261
9262 2006-06-17  Bruno Haible  <bruno@clisp.org>
9263
9264         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
9265         <sys/inttypes.h>.
9266
9267 2006-06-17  Bruno Haible  <bruno@clisp.org>
9268
9269         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
9270         whether errno is declared. Assume <errno.h> declares errno.
9271
9272 2006-06-17  Bruno Haible  <bruno@clisp.org>
9273
9274         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
9275
9276 2006-06-17  Bruno Haible  <bruno@clisp.org>
9277
9278         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
9279         problem on Solaris 2.5.1.
9280
9281 2006-06-16  Eric Blake  <ebb9@byu.net>
9282
9283         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
9284         * lib/unicodeio.c [!defined errno]: Likewise.
9285         * lib/strtol.c [!defined errno]: Likewise.
9286         * lib/strtod.c [!defined errno]: Likewise.
9287
9288 2006-06-15  Eric Blake  <ebb9@byu.net>
9289
9290         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
9291
9292 2006-06-15  Eric Blake  <ebb9@byu.net>
9293
9294         * config/srclist.txt (ssize_t.m4): Lose sync.
9295
9296 2006-06-15  Bruno Haible  <bruno@clisp.org>
9297
9298         * modules/stdint (Files): Include m4/full-header-path.m4,
9299         m4/size_max.m4, m4/wchar_t.m4.
9300         (Makefile.am): Many more substitutions.
9301         * modules/stdint-tests: New file.
9302         * tests/test-stdint.c: New file.
9303
9304 2006-06-15  Bruno Haible  <bruno@clisp.org>
9305
9306         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
9307         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
9308         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
9309         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
9310         gl_CHECK_TYPE_SAME): New macros.
9311
9312 2006-06-15  Bruno Haible  <bruno@clisp.org>
9313
9314         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
9315
9316 2006-06-15  Bruno Haible  <bruno@clisp.org>
9317
9318         * lib/stdint_.h: Rewritten to be fully auto-configured.
9319         Fixes bug on HP-UX/IA64.
9320
9321 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
9322
9323         * lib/getdate.y (__attribute__): Don't define if already defined.
9324         Problem reported by Larry Jones.
9325         * lib/utimens.c (__attribute__): Likewise.
9326
9327 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
9328
9329         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
9330         reported by Andreas Schwab.
9331
9332 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9333             Bruno Haible  <bruno@clisp.org>
9334
9335         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
9336         check for the declaration of strnlen and a run test that exposes the
9337         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
9338         rpl_strndup.
9339
9340 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9341             Bruno Haible  <bruno@clisp.org>
9342
9343         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
9344
9345 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9346
9347         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
9348         compile test, for Tru64 4.0D.
9349
9350 2006-05-28  Karl Berry  <karl@gnu.org>
9351
9352         * config/srclist.txt (printf-args.c): lose sync.
9353
9354 2006-05-26  Martin Lambers  <marlam@marlam.de>
9355
9356         * lib/getpass.c: Updates the test for the native W32 API, and adds
9357         missing includes, thus fixing compilation warnings.
9358
9359 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9360
9361         * lib/exclude.c (exclude_fnmatch): New function.
9362         (excluded_file_name): Call exclude_fnmatch.
9363         * lib/exclude.h (excluded_file_name): New prototype
9364
9365 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
9366
9367         * lib/tempname.c (small_open, large_open): New macros.
9368         (__open, __open64) [!_LIBC]: Remove.
9369         (__gen_tempname): Use small_open and large_open instead of __open
9370         and __open64.  This fixes a portability bug on HP-UX 11.11i
9371         reported by Simon Wing-Tang in
9372         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
9373
9374 2006-05-24  Bruno Haible  <bruno@clisp.org>
9375
9376         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
9377         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
9378         Reported by Thorsten Maerz <torte@netztorte.de> via
9379         Aaron Stone <aaron@serendipity.cx>.
9380
9381 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9382
9383         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
9384         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
9385         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
9386         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
9387         not really conditional on the cache.
9388         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
9389
9390 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
9391
9392         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
9393         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
9394         (my_usleep): Don't mishandle maximum value.
9395
9396 2006-05-19  Jim Meyering  <jim@meyering.net>
9397
9398         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
9399
9400 2006-05-17  Bruno Haible  <bruno@clisp.org>
9401
9402         Cygwin portability.
9403         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
9404
9405 2006-05-17  Bruno Haible  <bruno@clisp.org>
9406
9407         * lib/stdint_.h: Fix recognition of Cygwin.
9408
9409 2006-05-15  Bruno Haible  <bruno@clisp.org>
9410
9411         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
9412         on libtool patch by Ralf Wildenhues.
9413
9414 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9415
9416         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
9417         test for C99 conformance; (bool) 0.5 is an integer constant
9418         expression, but (bool) -0.5 is not.  Problem reported by Fedor
9419         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
9420
9421 2006-05-11  Simon Josefsson  <jas@extundo.com>
9422
9423         * m4/xvasprintf.m4: Fix obvious typo.
9424
9425 2006-05-11  Jim Meyering  <jim@meyering.net>
9426
9427         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
9428         James Lemley.
9429
9430 2006-05-10  Simon Josefsson  <jas@extundo.com>
9431
9432         * lib/md4.c: Typo fix, update copyright years.
9433         (K1, K2): Don't use L because it turn computations into 64-bit on
9434         64-bit platforms.
9435
9436 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
9437
9438         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
9439         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
9440         unwanted sign propagation, e.g., on hosts with 64-bit int.
9441         There still are some problems with reeelly weird theoretical hosts
9442         (e.g., 33-bit int) but it's not worth worrying about now.
9443         * lib/sha1.c (rol): Likewise.
9444         (K1, K2, K3, K4): Remove unnecessary L suffix.
9445
9446 2006-05-10  Bruno Haible  <bruno@clisp.org>
9447
9448         * lib/des.c: Cast to avoid warnings.
9449
9450 2006-05-09  Bruno Haible  <bruno@clisp.org>
9451
9452         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
9453         (Depends-on): Depend also on xsize, stdarg.
9454         (configure.ac): Add gl_XVASPRINTF.
9455
9456 2006-05-09  Bruno Haible  <bruno@clisp.org>
9457
9458         * m4/xvasprintf.m4: New file.
9459
9460 2006-05-09  Bruno Haible  <bruno@clisp.org>
9461
9462         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
9463         (EOVERFLOW): Define fallback value.
9464         (xstrcat): New function.
9465         (xvasprintf): Recognize the special case of a string concatenation.
9466
9467 2006-05-08  Eric Blake  <ebb9@byu.net>
9468
9469         * gnulib-tool (func_version): Base copyright year on CVS date.
9470         (func_emit_copyright_notice): New function.
9471         (func_emit_lib_Makefile_am): Use it.
9472         (func_emit_tests_Makefile_am): Likewise.
9473         (func_import): Likewise.
9474
9475 2006-05-08  Bruno Haible  <bruno@clisp.org>
9476
9477         * modules/stdarg: New file.
9478         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
9479
9480 2006-05-08  Bruno Haible  <bruno@clisp.org>
9481
9482         * m4/stdarg.m4: New file, from GNU gettext.
9483
9484 2006-05-08  Bruno Haible  <bruno@clisp.org>
9485
9486         * config/srclist.txt (build-aux/config.rpath): different from latest
9487         release.
9488
9489 2006-05-08  Bruno Haible  <bruno@clisp.org>
9490
9491         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
9492
9493 2006-05-05  Jim Meyering  <jim@meyering.net>
9494
9495         * m4/warning.m4: New file, derived from bison's file by the same name.
9496
9497 2006-05-03  Bruno Haible  <bruno@clisp.org>
9498
9499         * lib/stdint_.h: Shorter URL.
9500         * lib/inttypes.h: Likewise.
9501
9502 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9503
9504         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
9505
9506 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9507
9508         * lib/verify.h: Document the internals better.  Most of this change
9509         was written by Bruno Haible.
9510
9511 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
9512
9513         * doc/verify.texi: New file, partly based on a proposal by
9514         Bruno Haible.
9515
9516 2006-05-02  Bruno Haible  <bruno@clisp.org>
9517
9518         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
9519         test from here...
9520         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
9521
9522 2006-04-29  Bruno Haible  <bruno@clisp.org>
9523
9524         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
9525         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
9526
9527 2006-04-29  Bruno Haible  <bruno@clisp.org>
9528
9529         * gnulib-tool: Make --update option actually work.
9530
9531 2006-04-29  Bruno Haible  <bruno@clisp.org>
9532
9533         * doc/gcd.texi: New file.
9534         * doc/gnulib.texi: Include it.
9535
9536 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
9537
9538         * lib/getdate.y (get_date): When adding relative date, start with the
9539         initial time, not with the result of the first mktime call.
9540
9541 2006-04-25  Bruno Haible  <bruno@clisp.org>
9542
9543         * gnulib-tool (func_import): Output the include directives in three
9544         blocks, sorted separately.
9545         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9546
9547 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9548
9549         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
9550         to define main with arguments, for C++.  Reported by Eric Blake.
9551         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
9552         Prefer 'int main ()' to 'int main (void)', for C++.
9553         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
9554         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
9555         for 'main', for C99 and C++.
9556
9557 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
9558
9559         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
9560         Don't assume that exit status -1 is valid.
9561         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9562         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9563         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
9564         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
9565         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
9566         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
9567         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
9568         functions can be used without declaring them, or that you can
9569         exit with status -1.
9570         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
9571
9572 2006-04-24  Karl Berry  <karl@gnu.org>
9573
9574         * config/srclist.txt (longdouble.m4): sync lost.
9575
9576 2006-04-24  Eric Blake  <ebb9@byu.net>
9577
9578         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
9579
9580 2006-04-24  Bruno Haible  <bruno@clisp.org>
9581
9582         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
9583         poll() implementation in AIX.
9584         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9585
9586 2006-04-24  Bruno Haible  <bruno@clisp.org>
9587
9588         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
9589         assigned exactly once.
9590
9591 2006-04-23  Claudio Fontana  <claudio@gnu.org>
9592             Bruno Haible  <bruno@clisp.org>
9593
9594         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
9595         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
9596         for AM_CPPFLAGS.
9597
9598 2006-04-23  Bruno Haible  <bruno@clisp.org>
9599
9600         * modules/copy-file: Depend on unistd.
9601         * modules/execute: Likewise.
9602         * modules/fatal-signal: Likewise.
9603         * modules/findprog: Likewise.
9604         * modules/mkdtemp : Likewise.
9605         * modules/pipe: Likewise.
9606         * modules/wait-process: Likewise.
9607
9608 2006-04-23  Bruno Haible  <bruno@clisp.org>
9609
9610         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
9611         condition was already detected.
9612         Reported by Ben Pfaff <blp@cs.stanford.edu>.
9613
9614 2006-04-23  Bruno Haible  <bruno@clisp.org>
9615
9616         * lib/copy-file.c: Include <unistd.h> unconditionally.
9617         * lib/execute.c: Likewise.
9618         * lib/fatal-signal.c: Likewise.
9619         * lib/findprog.c: Likewise.
9620         * lib/mkdtemp.c: Likewise.
9621         * lib/pipe.h: Likewise.
9622         * lib/pipe.c: Likewise.
9623         * lib/wait-process.h: Likewise.
9624
9625 2006-04-23  Bruno Haible  <bruno@clisp.org>
9626
9627         * gnulib-tool (func_usage): Fix --import description. Document
9628         --update.
9629         (func_import): Create temporary file in a temporary directory, if
9630         --dry-run is specified. Silence errors from 'grep' when there are no
9631         m4 files in $m4dir.
9632         (func_create_testdir): Silence errors from 'grep' when there are no
9633         m4 files in $m4dir.
9634         Reported by Karl Berry <karl@freefriends.org>.
9635
9636 2006-04-20  Bruno Haible  <bruno@clisp.org>
9637
9638         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
9639         one argument, so that the code will be portable to Autoconf 2.60.
9640         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
9641         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9642         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
9643
9644 2006-04-19  Derek Price  <derek@ximbiot.com>
9645             Eric Blake  <ebb9@byu.net>
9646
9647         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
9648         rather than "/full/path.h".  Update comment to match.  Shorten &
9649         generalize m4_translit call via AS_TR_CPP.
9650
9651 2006-04-19  Derek Price  <derek@ximbiot.com>
9652             Eric Blake  <ebb9@byu.net>
9653
9654         * lib/inttypes.h: Correct grammar in comment.
9655
9656 2006-04-18  Derek Price  <derek@ximbiot.com>
9657             Paul Eggert  <eggert@cs.ucla.edu>
9658
9659         * modules/inttypes: New file.
9660         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
9661
9662 2006-04-18  Derek Price  <derek@ximbiot.com>
9663             Paul Eggert  <eggert@cs.ucla.edu>
9664
9665         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
9666         New files.
9667
9668 2006-04-18  Derek Price  <derek@ximbiot.com>
9669             Paul Eggert  <eggert@cs.ucla.edu>
9670
9671         * lib/inttypes.h: New file.
9672         * lib/strtoimax.c: Assume <inttypes.h>.
9673
9674 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
9675
9676         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
9677         isn't mounted.  Problem reported by Kir Kolyshkin.
9678
9679 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
9680
9681         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
9682         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
9683         Derek R. Price.
9684         * lib/regex.h (RE_DUP_MAX): Update comment to match current
9685         implementation.
9686
9687 2006-04-12  Eric Blake  <ebb9@byu.net>
9688
9689         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
9690         is now done automatically by the corresponding Autoconf macro.
9691
9692 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
9693
9694         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
9695         time_r.h.
9696
9697 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9698
9699         Merge regex changes from libc, removing some of our
9700         POSIX-conformance changes that were rejected and redoing them in a
9701         less-intrusive way.
9702
9703         * lib/regcomp.c (re_compile_internal, init_dfa):
9704         Length arg is now size_t, not Idx.  All uses changed.
9705         (peek_token): Forward decl now says internal_function.
9706         (__re_error_msgid, __re_error_msgid_idx):
9707         Now static rather than extern with attribute_hidden.
9708         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
9709         For some reason libc prefers K&R style defns for external functions.
9710         (regerror) [!defined _LIBC]: Likewise.
9711         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
9712         (seek_collating_symbol_entry, lookup_collation_sequence_value):
9713         (build_range_exp, build_collating_symbol):
9714         Use K&R-style defn.
9715         (re_compile_fastmap): Use '\0' to memset, not 0.
9716         (utf8_sb_map): Make the calculations more obvious.
9717         (init_dfa, parse_bracket_exp, build_charclass_op):
9718         Call calloc and cast result, as glibc does.
9719         (init_word_char, fetch_token, peek_token, peek_token_bracket):
9720         (build_range_exp, build_collating_symbol):
9721         Now internal functions.
9722
9723         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
9724
9725         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
9726         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
9727         Don't depend on VMS; depend on __VMS instead, for POSIX
9728         namespace cleanness.
9729         (regoff_t): Define to ssize_t, not long int.
9730
9731         Remove the REG_ macros named below.  Instead, make the old names
9732         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
9733         __USE_GNU_REGEX.
9734         (REG_BACKSLASH_ESCAPE_IN_LISTS):
9735         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
9736         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
9737         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
9738         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
9739         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
9740         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
9741         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
9742         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
9743         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
9744         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
9745         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
9746         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
9747         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
9748         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
9749         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
9750         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
9751         (REG_NREGS):
9752         Remove.  All uses replaced by the old RE_* names.
9753         (RE_BACKSLASH_ESCAPE_IN_LISTS):
9754         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
9755         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
9756         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
9757         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
9758         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
9759         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
9760         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
9761         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
9762         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
9763         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
9764         Don't bother having these macros be independent of each others'
9765         values, since they no longer exist in the POSIX name space.
9766
9767         Rename the following member names back to their old names,
9768         unless !__USE_GNU_REGEX.  All uses changed back.
9769         (buffer): Renamed from re_buffer.
9770         (allocated): Renamed from re_allocated.
9771         (used): Renamed from re_used.
9772         (syntax): Renamed from re_syntax.
9773         (fastmap): Renamed from re_fastmap.
9774         (translate): Renamed from re_translate.
9775         (can_be_null): Renamed from re_can_be_null.
9776         (regs_allocated): Renamed from re_regs_allocated.
9777         (fastmap_accurate): Renamed from re_fastmap_accurate.
9778         (no_sub): Renamed from re_no_sub.
9779         (not_bol): Renamed from re_not_bol.
9780         (not_eol): Renamed from re_not_eol.
9781         (newline_anchor): Renamed from re_newline_anchor.
9782         (num_regs): Renamed from rm_num_regs.
9783         (start): Renamed from rm_start.
9784         (end): Renamed from rm_end.
9785
9786         (free_state): Move up a bit.
9787
9788         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
9789         #define to be empty.
9790         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
9791         when that is what is intended.
9792         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
9793         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
9794         (MAX): New macro.
9795         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
9796         All uses changed back to re_malloc, etc.  It's now the caller's
9797         responsibility to check for overflow; all callers changed.
9798         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
9799         (re_x2nrealloc): Remove.
9800         (free_state): Remove decl.
9801
9802         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
9803         (re_set_registers, re_exec):
9804         Use K&R-style defn.
9805
9806         2006-01-31  Roland McGrath  <roland@redhat.com>
9807
9808         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
9809         Reported by Mike Frysinger <vapier@gentoo.org>.
9810
9811         2006-01-15  Andreas Jaeger  <aj@suse.de>
9812
9813         [BZ #1950]
9814         * lib/regex_internal.c (re_string_reconstruct): Adjust for
9815         build_wcs_upper_buffer change.
9816         (build_wcs_upper_buffer): Change return type.
9817
9818         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
9819
9820         * lib/regex_internal.h: Include <stdint.h> if available.
9821
9822         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
9823
9824         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
9825
9826         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
9827
9828         * lib/regcomp.c: Adjust for changed secondary hash function.
9829
9830         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
9831
9832         * lib/regex.h: Pretty printing.
9833         Clean up namespace a bit.
9834
9835         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
9836
9837         * lib/regexec.c (update_cur_sifted_state, check_arrival,
9838         check_arrival_add_next_nodes): Avoid using uninitialized variable.
9839
9840         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9841                     Ulrich Drepper  <drepper@redhat.com>
9842
9843         [BZ #1302]
9844         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
9845         changed.
9846         (bitset_word_t): Renamed from bitset_word.  All uses changed.
9847
9848         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
9849
9850         [BZ #281]
9851         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
9852         * lib/regcomp.c: Remove unnecessary uses of
9853         unsigned RE_TRANSLATE_TYPE.
9854         * lib/regex_internal.h: Likewise.
9855         * lib/regex_internal.c: Likewise.
9856         * lib/regexec.c: Likewise.
9857         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
9858
9859         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
9860
9861         * lib/regexec.c (find_recover_state): Remove unnecessary
9862         initialization.
9863         (transit_state_bkref): Make DFA a const pointer.
9864         (get_subexp): Likewise.
9865         (check_arrival): Likewise.
9866         (update_cur_sifted_state): Likewise.
9867         (re_search_internal): Likewise.
9868         (prune_impossible_nodes): Likewise.
9869         (acquire_init_state_context): Likewise.
9870         (proceed_next_node): Likewise.
9871         (set_regs): Likewise.
9872         (free_fail_stack_return): Likewise.
9873         (check_arrival_expand_ecl): Mark DFA parameter as const.
9874         (check_arrival_expand_ecl_sub): Likewise.
9875         (check_subexp_limits): Likewise.
9876         (sub_epsilon_src_nodes):  Likewise.
9877         (add_epsilon_src_nodes):  Likewise.
9878         (merge_state_array): Likewise.
9879         (update_regs): Likewise.
9880         (build_trtable): Likewise.
9881         (sift_states_backward): Mark MCTX parameter as const.
9882         (build_sifted_states): Likewise.
9883         (update_cur_sifted_state): Likewise.
9884         (sift_states_mkref): Likewise.
9885         (check_arrival_expand_ecl): Mark eclosure as const.
9886         (check_dst_limits_calc_pos_1): Likewise.
9887         * lib/regex_internal.h (re_match_context_t): Make dfa a const
9888         pointer.
9889
9890         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
9891
9892         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
9893         (transit_state_sb): Likewise.
9894         (transit_state_mb): Likewise.
9895         (sift_states_iter_mb): Likewise.
9896         (check_arrival_add_next_nodes): Likewise.
9897         (check_node_accept_bytes): Change first parameter to pointer-to-const.
9898         [_LIBC] (re_search_2_stub): Use mempcpy.
9899
9900         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
9901         mbrtowc for very simple UTF-8 case.
9902
9903         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
9904         a pointer-to-const.
9905         (re_acquire_state_context): Likewise.
9906         * lib/regex_internal.h: Adjust prototypes.
9907
9908         * lib/regex.c: Prevent using C++ compilers.
9909
9910         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
9911         (re_acquire_state_context): Likewise.
9912
9913 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9914
9915         * modules/regex (Depends-on): Add ssize_t.
9916
9917 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9918
9919         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
9920         translation table.
9921
9922 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
9923
9924         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
9925
9926 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
9927             Bruno Haible  <bruno@clisp.org>
9928
9929         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
9930         <sys/types.h> and <inttypes.h>.
9931
9932 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9933
9934         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
9935         `__error_t_defined', so argp.h will not typedef the former.
9936
9937 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
9938
9939         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
9940         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
9941         glibc names.  Even if glibc is changed to conform to POSIX, the
9942         traditional names will be available anyway, since regex depends on
9943         the extensions module.  Also, fix a longstanding typo in the
9944         implementation of Spencer ERE test #75 from grep 2.3.  Problems
9945         reported by Emanuele Giaquinta.  Also, change sense of cached
9946         variable, so that the message makes sense.
9947
9948 2006-03-24  Simon Josefsson  <jas@extundo.com>
9949
9950         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
9951         including some doc fixes.
9952         (base64_encode_alloc): Fix +1 bug on allocation failures.
9953
9954 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9955
9956         * lib/base64.c (base64_encode): Do not read past end of array with
9957         unsanitized input on systems with CHAR_BIT > 8.
9958
9959 2006-03-24  Eric Blake  <ebb9@byu.net>
9960
9961         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
9962
9963 2006-03-22  Karl Berry  <karl@gnu.org>
9964
9965         * config/srclist.txt (*setenv.[ch]): get from coreutils.
9966         * config/srclistvars.sh (COREUTILS): new var.
9967
9968 2006-03-17  Jim Meyering  <jim@meyering.net>
9969
9970         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
9971         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
9972
9973 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9974
9975         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
9976         no longer needs it.  Instead, check that regoff_t is as least
9977         as wide as ptrdiff_t.
9978
9979         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
9980         so that our regex.h stays compatible with the installed regex.
9981         This is helpful for installers who configure --without-included-regex.
9982         Problem reported by Emanuele Giaquinta.
9983
9984 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
9985
9986         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
9987         Typedef to long int, not to off_, as POSIX will likely change
9988         in that direction.
9989
9990 2006-03-15  Eric Blake  <ebb9@byu.net>
9991
9992         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
9993
9994 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9995
9996         * lib/argp-help.c (validate_uparams): Fix typo
9997         * lib/argp-parse.c (argp_default_options): Consistently begin help
9998         messages with a lowercase letter.
9999
10000 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
10001
10002         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
10003         overrun buffers and shouldn't be used (much as gets shouldn't be
10004         used).
10005         * lib/time_r.c (asctime_r, ctime_r): Likewise.
10006
10007 2006-03-08  Simon Josefsson  <jas@extundo.com>
10008
10009         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
10010         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10011
10012 2006-03-08  Simon Josefsson  <jas@extundo.com>
10013
10014         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
10015         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10016
10017 2006-03-08  Simon Josefsson  <jas@extundo.com>
10018
10019         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
10020         signal that configure disabled the device.
10021
10022 2006-03-08  Simon Josefsson  <jas@extundo.com>
10023
10024         * build-aux/maint.mk: Fix refresh-po, to handle no translated
10025         languages.
10026
10027 2006-03-07  Simon Josefsson  <jas@extundo.com>
10028
10029         * modules/getopt (Depends-on): Add unistd.
10030
10031         * modules/unistd: New file.
10032
10033 2006-03-07  Simon Josefsson  <jas@extundo.com>
10034
10035         * modules/gc-random: New file.
10036
10037 2006-03-07  Simon Josefsson  <jas@extundo.com>
10038
10039         * m4/unistd_h.m4: New file.
10040
10041 2006-03-07  Simon Josefsson  <jas@extundo.com>
10042
10043         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
10044         test to be side-effect free by storing the result in the cache
10045         variable gl_cv_lib_readline, and moving the assignment of
10046         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
10047         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10048
10049 2006-03-07  Simon Josefsson  <jas@extundo.com>
10050
10051         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
10052         error on missing devices (the functions will return an error).
10053
10054         * m4/gc.m4: Move random stuff to gc-random.m4
10055
10056 2006-03-07  Simon Josefsson  <jas@extundo.com>
10057
10058         * lib/unistd_.h: New file.
10059
10060 2006-03-07  Simon Josefsson  <jas@extundo.com>
10061
10062         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
10063
10064 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10065
10066         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
10067         Problem reported by Juan Manuel Guerrero.
10068
10069 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10070
10071         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
10072         the unistd module.
10073         * lib/getlogin_r.c: Likewise.
10074         * lib/getlogin_r.h: Likewise.
10075         * lib/glob.c: Likewise.
10076         * lib/pagealign_alloc.c: Likewise.
10077         * lib/unistd_.h: Remove; no longer needed.
10078
10079 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10080
10081         * MODULES.html.sh (Support for systems lacking POSIX:2001):
10082         Add unistd.
10083         * modules/c-stack (Depends-on): Add unistd.
10084         * modules/getlogin_r: Likewise.
10085         * modules/glob: Likewise.
10086         * modules/pagealign_alloc: Likewise.
10087         * modules/unistd (Files): Remove lib/unistd_.h.
10088         (EXTRA_DIST): Remove.
10089         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
10090         need unistd_.h.
10091         (MOSTLYCLEANFILES): Remove unistd.h-t.
10092
10093 2006-03-03  Simon Josefsson  <jas@extundo.com>
10094
10095         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
10096
10097 2006-03-03  Simon Josefsson  <jas@extundo.com>
10098
10099         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
10100         libidn and bison.
10101
10102 2006-03-03  Simon Josefsson  <jas@extundo.com>
10103
10104         * build-aux/maint.mk: Add indent target.
10105
10106 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
10107
10108         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
10109         our replacement poll.h in any case, to avoid a differing
10110         declaration from a system header.  Seen on AIX.
10111
10112 2006-03-01  Simon Josefsson  <jas@extundo.com>
10113
10114         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
10115         <kasal@ucw.cz>.
10116
10117 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10118
10119         * modules/gettime (Depends-on): Add extensions module.
10120         * modules/nanosleep (Depends-on): Likewise.
10121         * modules/settime (Depends-on): Likewise.
10122
10123 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10124
10125         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
10126         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
10127         pedantically.
10128         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
10129         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
10130
10131         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
10132         not "==".  Reported by Ralf Wildenhues.
10133
10134 2006-03-01  Karl Berry  <karl@gnu.org>
10135
10136         * doc/Copyright/request-*: new files, synced from gnuorg.
10137
10138 2006-03-01  Karl Berry  <karl@gnu.org>
10139
10140         * config/srclist.txt (Copyright/*): new entries.
10141
10142 2006-02-28  Simon Josefsson  <jas@extundo.com>
10143
10144         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
10145
10146 2006-02-27  Simon Josefsson  <jas@extundo.com>
10147
10148         * lib/base64.h: Indent #define's.  From Jim Meyering
10149         <jim@meyering.net>.
10150
10151 2006-02-27  Jim Meyering  <jim@meyering.net>
10152
10153         Revert the change of 2006-02-24, so these files can continue
10154         to be sync'd from gettext.
10155         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
10156         of `config.h'.
10157
10158 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
10159
10160         * modules/intprops: New file.
10161         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
10162         Add intprops.
10163         * modules/getloadavg (Files): Remove lib/intprops.h.
10164         (Depends-on): Add intprops.
10165         * modules/human: Likewise.
10166         * modules/inttostr: Likewise.
10167         * modules/openat: Likewise.
10168         * modules/sig2str: Likewise.
10169         * modules/userspec: Likewise.
10170         * modules/utimecmp: Likewise.
10171         * modules/xnanosleep: Likewise.
10172         * modules/xstrtol: Likewise.
10173
10174 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
10175
10176         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
10177         * modules/lock-tests (TESTS): Use $(EXEEXT).
10178         * modules/tls-tests: Likewise.
10179         * modules/argp-tests: Likewise.
10180         (check_PROGRAMS): New var, replacing...
10181         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
10182
10183 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10184
10185         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
10186         `config.h'.
10187
10188 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
10189
10190         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
10191
10192 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10193
10194         Sync from coreutils.
10195         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
10196         gl_CHDIR_SAFER.
10197
10198 2006-02-22  Jim Meyering  <jim@meyering.net>
10199
10200         Sync from coreutils.
10201         * m4/chdir-safer.m4: New file.
10202
10203 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
10204
10205         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
10206         AT_FDCWD exceeds INT_MAX.
10207         * lib/openat.h (AT_FDCWD): Likewise.
10208
10209 2006-02-17  Eric Blake  <address@hidden>
10210
10211         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
10212
10213 2006-02-16  Simon Josefsson  <jas@extundo.com>
10214
10215         * modules/getaddrinfo (Depends-on): Add sys_socket.
10216
10217 2006-02-15  Simon Josefsson  <jas@extundo.com>
10218
10219         * build-aux/maint.mk: Add dsyntax-check rule.
10220
10221 2006-02-15  Eric Blake  <ebb9@byu.net>
10222
10223         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
10224         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
10225         'present but cannot compile' warnings on cygwin.
10226         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
10227         use ws2tcpip.h if sys/socket.h works.
10228         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
10229         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
10230
10231 2006-02-14  Simon Josefsson  <jas@extundo.com>
10232
10233         * modules/maintainer-makefile (Files): Rename.
10234
10235         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
10236         and (the local) Makefile.cfg to maint-cfg.mk.
10237
10238         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
10239         to the latter.
10240
10241         * modules/maintainer-makefile: New module.
10242
10243         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
10244         severaly stripped to make it possible to build it up from scratch
10245         with reliable tests.
10246
10247         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
10248         fixes to permit overriding the default actions when configure and
10249         makefile are not available.
10250
10251 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
10252
10253         Sync from coreutils.
10254         * modules/lstat (Depends-on): Don't depend on xalloc.
10255         (License): Change from GPL to LGPL, since this is now simply a
10256         replacement for a libc function.
10257
10258 2006-02-14  Jim Meyering  <jim@meyering.net>
10259
10260         Sync from coreutils.
10261
10262         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
10263         failure on deficient systems, and simplify gnulib lgpl dependencies.
10264         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
10265         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
10266
10267         * lib/xalloc-die.c: Remove unused definition of N_.
10268
10269 2006-02-14  Jim Meyering  <jim@meyering.net>
10270
10271         Sync from coreutils.
10272         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
10273         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
10274         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
10275         double-quote uses of that variable, to accommodate the rare case in
10276         which getmntent is available in none of the libraries checked.  This
10277         happens at least on FreeBSD 5.0.
10278
10279 2006-02-13  Simon Josefsson  <jas@extundo.com>
10280
10281         * gnulib-tool (Usage): Fix --import, from
10282         karl@freefriends.org (Karl Berry).
10283
10284 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10285
10286         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
10287
10288 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
10289
10290         * lib/argp-namefrob.h: Restore changes accidentally lost during the
10291         "autoupdate" on 2005-12-12.
10292
10293 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10294
10295         * modules/closeout (Depends-on): Remove atexit.
10296
10297 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
10298
10299         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
10300         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
10301
10302 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
10303
10304         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
10305         __EXTENSIONS__ if this causes compilation to fail.  Problem
10306         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
10307         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
10308
10309 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
10310
10311         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
10312         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
10313         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
10314         All uses changed.
10315
10316 2006-01-26  Simon Josefsson  <jas@extundo.com>
10317
10318         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
10319         prototype is visible on mingw32.
10320
10321         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
10322         for mingw32.
10323
10324         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
10325         mingw32).
10326
10327 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
10328
10329         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
10330         attempt to open for write; this always fails, at least on POSIX
10331         hosts.  This reinstates the 2006-01-09 change, which was
10332         inadvertently removed.
10333
10334 2006-01-26  Bruno Haible  <bruno@clisp.org>
10335
10336         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
10337         Reported by Paul Eggert.
10338
10339 2006-01-26  Bruno Haible  <bruno@clisp.org>
10340             Paul Eggert  <eggert@cs.ucla.edu>
10341
10342         * lib/stdbool_.h (_Bool)
10343         [(! (defined __cplusplus || defined __BEOS__)
10344           && !defined __GNUC__
10345           && !(defined __HP_cc || defined __xlc__
10346                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
10347                || defined __sgi))]:
10348         #define to signed char in these cases too; this simplifies
10349         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
10350         etc., separately) and makes it more conservative.
10351
10352 2006-01-25  Simon Josefsson  <jas@extundo.com>
10353
10354         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
10355         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
10356         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
10357
10358 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10359
10360         * lib/argp-namefrob.h: Bugfix. Remove stray #
10361
10362 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
10363
10364         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
10365         so that we test the test.
10366         Check for yet another HP-UX cc bug involving *bool |= bool.
10367
10368 2006-01-25  Karl Berry  <karl@gnu.org>
10369
10370         * config/srclist.txt (vasnprintf.c): sync lost.
10371
10372 2006-01-25  Jim Meyering  <jim@meyering.net>
10373
10374         Sync from the stable (b5) branch of coreutils:
10375
10376         * lib/fts.c (fts_children): Don't let close() clobber errno from
10377         failed fchdir().
10378
10379         * lib/fts.c (fts_stat): When following a symlink-to-directory,
10380         don't necessarily interpret stat-fails+lstat-succeeds as indicating
10381         a dangling symlink.  That can also happen at least for ELOOP.
10382         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
10383         FYI, this bug predates the inclusion of fts.c in coreutils.
10384
10385         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
10386         in their own block, so pre-c99 compilers don't object.
10387
10388         Avoid the double-free (first in fts_read, second in fts_close) that
10389         would occur when an `active' directory is made inaccessible (e.g.,
10390         via chmod a-x) during a traversal.
10391         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10392         before returning.  Reproduce this failure by
10393         mkdir -p a/b; cd a; chmod a-x . b
10394         Reported by Stavros Passas.
10395
10396 2006-01-25  Jim Meyering  <jim@meyering.net>
10397
10398         * lib/fileblocks.c: Remove more useless parentheses.
10399         * lib/readutmp.h: Likewise.
10400
10401 2006-01-25  Bruno Haible  <bruno@clisp.org>
10402
10403         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
10404         warnings.
10405         Reported by Paul Eggert.
10406
10407 2006-01-25  Bruno Haible  <bruno@clisp.org>
10408
10409         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
10410         rid of a trap command. For Solaris sh.
10411         Reported by Mark D. Baushke <mdb@gnu.org>.
10412
10413 2006-01-24  Simon Josefsson  <jas@extundo.com>
10414
10415         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
10416         Bruno.
10417
10418 2006-01-24  Karl Berry  <karl@gnu.org>
10419
10420         * config/srclist.txt (argp-namefrob.h): sync lost.
10421
10422 2006-01-24  Jim Meyering  <jim@meyering.net>
10423
10424         * modules/openat (Files): Add lib/intprops.h.
10425         From Mark D. Baushke.
10426
10427 2006-01-24  Jim Meyering  <jim@meyering.net>
10428
10429         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
10430         Reported by Mark D. Baushke.
10431
10432 2006-01-24  Jim Meyering  <jim@meyering.net>
10433
10434         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
10435
10436 2006-01-24  Bruno Haible  <bruno@clisp.org>
10437
10438         * modules/strnlen (Maintainer): Change from glibc to all.
10439
10440 2006-01-24  Bruno Haible  <bruno@clisp.org>
10441
10442         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
10443         Patch by Paul Eggert.
10444
10445 2006-01-24  Bruno Haible  <bruno@clisp.org>
10446
10447         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
10448         already has it.
10449         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
10450         2005-11-26.
10451
10452         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
10453         'signed char' to avoid problems with the built-in _Bool type.
10454         Reported by Paul Eggert on 2005-11-26.
10455
10456 2006-01-24  Bruno Haible  <bruno@clisp.org>
10457
10458         * gnulib-tool (func_import): Avoid constructing complicated sed
10459         expressions inside backquote.
10460         Report and solution by Mark D. Baushke <mdb@gnu.org>.
10461
10462 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
10463
10464         These changes imported from libc.
10465         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
10466         test and two separate function calls.
10467         * lib/strndup.c (__strndup): Add libc_hidden_def.
10468
10469 2006-01-23  Simon Josefsson  <jas@extundo.com>
10470
10471         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
10472         Remove the test_*_SOURCES variable: automake infers it by default.
10473         * modules/tls-tests: Likewise.
10474
10475 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10476
10477         Work around porting bugs reported by Dieter in
10478         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
10479         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
10480         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
10481         Include "getopt.h" first, to check interface.
10482         (getenv): Declare only if defined HAVE_DECL_GETENV &&
10483         !HAVE_DECL_GETENV.
10484         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
10485         (__strndup): Revert to K&R-style function dfns, the glibc style.
10486         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
10487         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
10488         Include strnlen.h first, to get prototype properly.
10489         (strnlen): Renamed from __strnlen.
10490         Remove weak alias.
10491
10492 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10493
10494         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
10495
10496 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10497
10498         * config/srclist.txt: Adjust to reflect glibc reorganization.
10499         This affects only comments.
10500
10501 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10502
10503          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
10504          Reported by Bruce Korb <bkorb@gnu.org>.
10505
10506 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10507
10508         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
10509         to pacify gcc -Wswitch-default.
10510
10511 2006-01-22  Bruno Haible  <bruno@clisp.org>
10512
10513         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
10514         temporary buffer for sprintf, take into account the precision also
10515         for 'd', 'i', 'u', 'o', 'x', 'X'.
10516
10517 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10518
10519         * modules/argp-tests: New module
10520         * tests/test-argp.c: New file
10521         * tests/test-argp-2.sh: New file
10522
10523 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
10524
10525         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
10526         (__argp_base_name): Removed
10527         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
10528         typo.
10529         (__argp_base_name): Provide macro definition or extern declaration
10530         depending on the configuration
10531
10532 2006-01-20  Simon Josefsson  <jas@extundo.com>
10533
10534         * modules/inet_ntop (Depends-on): Depend on sys_socket.
10535
10536 2006-01-20  Simon Josefsson  <jas@extundo.com>
10537
10538         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
10539
10540 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
10541
10542         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
10543         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
10544         Suggested by Bruno Haible.
10545
10546 2006-01-20  Karl Berry  <karl@gnu.org>
10547
10548         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
10549         until changes propagate, I guess.
10550
10551 2006-01-19  Simon Josefsson  <jas@extundo.com>
10552
10553         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
10554
10555 2006-01-19  Simon Josefsson  <jas@extundo.com>
10556
10557         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
10558
10559 2006-01-19  Simon Josefsson  <jas@extundo.com>
10560
10561         * gnulib-tool: Set check_PROGRAMS.
10562
10563         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10564         modules/des-tests, modules/gc-arcfour-tests,
10565         modules/gc-arctwo-tests, modules/gc-des-tests,
10566         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10567         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10568         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10569         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10570         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10571         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
10572         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
10573         test_*_SOURCES.
10574
10575 2006-01-18  Simon Josefsson  <jas@extundo.com>
10576
10577         * modules/socklen (Depends-on): Depend on sys_socket.
10578
10579 2006-01-18  Simon Josefsson  <jas@extundo.com>
10580
10581         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
10582         modules/des-tests, modules/gc-arcfour-tests,
10583         modules/gc-arctwo-tests, modules/gc-des-tests,
10584         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
10585         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
10586         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
10587         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
10588         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
10589         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
10590         $(EXEEXT) to automake TESTS variable, for mingw32.
10591
10592 2006-01-17  Simon Josefsson  <jas@extundo.com>
10593
10594         * modules/socklen (Include): Need sys/socket.h.
10595
10596 2006-01-17  Bruno Haible  <bruno@clisp.org>
10597
10598         * modules/ssize_t (Include): Add <sys/types.h>.
10599
10600 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
10601
10602         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
10603         it's not portable and it doesn't work with cross-compiles.
10604         Problem reported by Bruno Haible.  Fix missing-$ typo in
10605         'test "gl_cv_ignore_unused_libraries" ...' that prevented
10606         -zignore from being used with Sun's C compiler.
10607
10608 2006-01-12  Simon Josefsson  <jas@extundo.com>
10609
10610         * lib/base64.c: Fix warning, reported by Bruno Haible
10611         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
10612
10613 2006-01-12  Bruno Haible  <bruno@clisp.org>
10614
10615         * modules/ldd: New file.
10616         * build-aux/ldd.sh.in: New file.
10617         * MODULES.html.sh (Support for building libraries and executables): Add
10618         ldd.
10619
10620 2006-01-12  Bruno Haible  <bruno@clisp.org>
10621
10622         * m4/ldd.m4: New file.
10623
10624 2006-01-12  Bruno Haible  <bruno@clisp.org>
10625
10626         * gnulib-tool (func_import, func_create_testdir): Don't go into an
10627         endless loop while replacing $auxdir with build-aux.
10628
10629 2006-01-11  Simon Josefsson  <jas@extundo.com>
10630
10631         * lib/stdint_.h (SIZE_MAX): Add missing (.
10632
10633 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
10634
10635         Sync from coreutils.
10636         * lib/md5.c: Fix commentary typos.
10637         (alignof, UNALIGNED_P): No need for a GCC-specific version.
10638         * lib/md5.h (__attribute__): Remove; unused.
10639         * lib/sha1.c: Fix commentary to match md5 better.
10640         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
10641         so that we don't need to worry about alignment.  All uses changed.
10642         This merges the 2005-10-28 md5 change into sha1.
10643
10644 2006-01-11  Jim Meyering  <jim@meyering.net>
10645
10646         Sync from coreutils.
10647         * lib/md5.c (OP): Fix spacing.
10648
10649 2006-01-11  Bruno Haible  <bruno@clisp.org>
10650
10651         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10652         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
10653         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
10654
10655 2006-01-11  Bruno Haible  <bruno@clisp.org>
10656
10657         Ensure automatic ordering between gl_LOCK and gl_ARGP.
10658         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
10659         the "early" section as well.
10660
10661 2006-01-11  Bruno Haible  <bruno@clisp.org>
10662
10663         Avoid "ar: no archive members specified" error on MacOS X.
10664         * gnulib-tool (func_modules_add_dummy): New function.
10665         (func_import, func_create_testdir): Invoke it.
10666
10667 2006-01-11  Bruno Haible  <bruno@clisp.org>
10668
10669         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
10670         with $auxdir in AC_CONFIG_FILES statements.
10671
10672 2006-01-11  Bruno Haible  <bruno@clisp.org>
10673
10674         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10675         Initialize also noinst_HEADERS to empty.
10676
10677 2006-01-11  Bruno Haible  <bruno@clisp.org>
10678
10679         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
10680         variables.
10681         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
10682         autoreconf.
10683
10684 2006-01-11  Bruno Haible  <bruno@clisp.org>
10685
10686         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
10687         overridable by the user.
10688         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10689
10690 2006-01-10  Simon Josefsson  <jas@extundo.com>
10691
10692         * modules/sys_socket: New file.
10693
10694 2006-01-10  Simon Josefsson  <jas@extundo.com>
10695
10696         * m4/sys_socket_h.m4: New file.
10697
10698 2006-01-10  Simon Josefsson  <jas@extundo.com>
10699
10700         * lib/socket_.h: New file.
10701
10702 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10703
10704         * modules/readutmp (Maintainer): Add myself.
10705
10706 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10707
10708         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
10709         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
10710         People who are still concerned with buggy memcmp implementations
10711         can invoke gl_FUNC_MEMCMP themselves.
10712
10713 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
10714
10715         * lib/regex_internal.h (BITSET_WORD_BITS):
10716         Work around a bug in 64-bit PGC (before version 6.1-2), where the
10717         preprocessor mishandles large unsigned values as if they were signed.
10718         Problem reported by Claudio Fontana in
10719         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
10720
10721 2006-01-10  Jim Meyering  <jim@meyering.net>
10722
10723         Avoid the double-free (first in fts_read, second in fts_close) that
10724         would occur when an `active' directory is made inaccessible (e.g.,
10725         via chmod a-x) during a traversal.
10726         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
10727         before returning.  Reproduce this failure by
10728         mkdir -p a/b; cd a; chmod a-x . b
10729         Reported by Stavros Passas.
10730
10731         Sync from coreutils.
10732         * lib/sha1.c: Tweak grammar in a comment.
10733
10734 2006-01-10  Jim Meyering  <jim@meyering.net>
10735
10736         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
10737         Patch by Joerg Sonnenberger.
10738
10739 2006-01-10  Bruno Haible  <bruno@clisp.org>
10740
10741         * modules/readutmp: Depend on module free.
10742         * modules/strtok_r: Depend on module restrict.
10743
10744 2006-01-10  Bruno Haible  <bruno@clisp.org>
10745
10746         * modules/gettext (configure.ac): Add an invocation of
10747         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
10748
10749 2006-01-10  Bruno Haible  <bruno@clisp.org>
10750
10751         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
10752         Reported by Werner Lemberg <wl@gnu.org>.
10753
10754 2006-01-10  Bruno Haible  <bruno@clisp.org>
10755
10756         * lib/localcharset.c: Update from GNU gettext.
10757
10758 2006-01-10  Bruno Haible  <bruno@clisp.org>
10759
10760         * lib/argp.h (__const): Remove macro. Use const instead.
10761         * lib/argp-fmtstream.h (__const): Likewise.
10762         * lib/glob_.h (__const): Remove macro.
10763         * lib/glob-libc.h: Use const instead of __const.
10764
10765 2006-01-10  Bruno Haible  <bruno@clisp.org>
10766
10767         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
10768         variable.
10769         Needed to avoid an automake error regarding the 'gettext' module.
10770
10771 2006-01-09  Simon Josefsson  <jas@extundo.com>
10772
10773         * modules/inet_ntop (Depends-on): Add restrict.
10774
10775 2006-01-09  Simon Josefsson  <jas@extundo.com>
10776
10777         * modules/gc-rijndael-tests (License): Put under LGPL.
10778
10779         * modules/gc-des-tests (License): Likewise.
10780
10781         * modules/gc-arcfour-tests (License): Likewise.
10782
10783         * modules/gc-arctwo-tests (License): Likewise.
10784
10785         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
10786
10787         * modules/gc-hmac-sha1-tests (Files): Likewise.
10788
10789         * modules/gc-hmac-md5-tests (License): Likewise.
10790
10791         * modules/gc-sha1-tests (License): Likewise.
10792
10793         * modules/gc-md5-tests (License): Likewise.
10794
10795         * modules/gc-md4-tests (License): Likewise.
10796
10797         * modules/gc-md2-tests (License): Likewise.
10798
10799         * modules/gc-tests (License): Likewise.
10800
10801         * modules/des-tests (License): Likewise.
10802
10803         * modules/md4-tests (License): Likewise.
10804
10805         * modules/md2-tests (License): Likewise.
10806
10807 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10808
10809         Sync from coreutils:
10810
10811         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
10812         * modules/lib-ignore: New file.
10813         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
10814         chdir-safer.m4, lchmod.m4.
10815         * modules/openat: Add mkdirat.c, openat-priv.h.
10816
10817 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10818
10819         Sync from coreutils.
10820         * m4/lib-ignore.m4: New file.
10821         * m4/lchmod.m4: New file.
10822
10823 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10824
10825         Sync from coreutils.
10826         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
10827         for write access: POSIX says that must fail.
10828         * lib/fts.c (diropen): Likewise.
10829         * lib/save-cwd.c (save_cwd): Likewise.
10830         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
10831         well, for minor improvements on hosts that lack O_DIRECTORY.
10832         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
10833         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
10834         Fall back on chown if open failed with EACCES.
10835
10836         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
10837         Report an error at compile-time if only a 1-second nominal clock
10838         resolution is found.
10839
10840         * lib/lchmod.h: New file.
10841         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
10842         (make_dir_parents): Use lchown rather than chown, and
10843         lchmod rather than chmod.
10844
10845         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
10846         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
10847         "proc" reported by n0dalus.
10848
10849         * lib/mountlist.c: Include <limits.h>.
10850         (dev_from_mount_options)
10851         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
10852         New function.  It no longer assumes "dev=" has the System V meaning
10853         on Linux (since it doesn't).  It also parses "dev=" more carefully.
10854         (read_file_system_list)
10855         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
10856         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
10857         dev= in that case.
10858
10859         * lib/posixtm.h (PDS_PRE_2000): New macro.
10860         * lib/posixtm.c (year): Arg is now syntax_bits rather than
10861         allow_century.  All usages changed.  Reject dates outside the range
10862         1969-1999 if PDS_PRE_2000 is used.
10863
10864 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
10865
10866         Sync from coreutils.
10867         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
10868         (Time of day items): Mention the possibility of leap seconds.
10869         Problem reported by Dr. David Alan Gilbert.
10870
10871 2006-01-09  Jim Meyering  <jim@meyering.net>
10872
10873         Sync from coreutils.
10874
10875         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
10876
10877         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
10878
10879         * lib/modechange.c (mode_compile): Reject an invalid mode string
10880         that starts with an octal digit.  From Andreas Gruenbacher.
10881
10882         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
10883         and dup to open_safer and dup_safer, respectively.
10884         (openat_permissive): Fix typo in comment.
10885
10886         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
10887         "gettext.h"; either no longer needed or are guaranteed by openat.h.
10888         (_): Remove; no longer needed.
10889         (openat): Renamed from rpl_openat; no need for rpl_openat
10890         since openat.h renames openat for us.
10891         Replace most of the body with a call to openat_permissive,
10892         to avoid duplicate code.
10893         Port to (probably hypothetical) environments were mode_t is
10894         wider than int.
10895         (openat_permissive): Require mode arg, so that we can check
10896         types better.  Put it just after flags.  Change cwd failure
10897         indicator from pointer-to-bool to pointer-to-errno-value.
10898         All callers changed.
10899         Invoke openat_save_fail and/or openat_restore_fail if
10900         cwd_errno is null, so that openat can call us.
10901         (openat_permissive, fdopendir, fstatat, unlinkat):
10902         Simplify errno handling to avoid some duplicate code,
10903         as it's OK to set errno on success.
10904         * lib/openat.h: Revamp code so that function macros depend on
10905         __OPENAT_PREFIX only, not also on AT_FDCWD.
10906         (openat_ro): Remove.  Caller changed to use openat_permissive.
10907         (openat_permissive): Now a macro, if not a function.
10908         (openat_restore_fail, openat_save_fail): Now always functions,
10909         since mkdirat needs them even if __OPENAT_PREFIX is defined.
10910
10911         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
10912         and openat.c.
10913         * lib/mkdirat.c: Include openat-priv.h.
10914         Remove definitions of macros defined therein.
10915         * lib/openat.c: Likewise.
10916
10917         * lib/mkdirat.c (mkdirat): New file and function.
10918         * lib/openat.h (mkdirat): Declare.
10919
10920         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
10921
10922         * lib/openat.h (openat_permissive): Declare.
10923         (openat_ro): Define.
10924
10925         * lib/openat.c (EXPECTED_ERRNO): New macro.
10926         (openat_permissive): New function -- used in remove.c rewrite.
10927         (all functions): Set errno just before returning, only if there
10928         was an actual failure.
10929         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
10930
10931         Emulate openat-family functions using Linux's procfs, if possible.
10932         Idea and some code based on Ulrich Drepper's glibc changes.
10933
10934         * lib/openat.c: (BUILD_PROC_NAME): New macro.
10935         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
10936         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
10937         before falling back on save_cwd and restore_cwd.
10938         (fdopendir, fstatat, unlinkat): Likewise.
10939
10940         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
10941         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
10942
10943         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
10944         as second argument to va_arg.  Otherwise, some versions of gcc
10945         warn that `if this code is reached, the program will abort'.
10946
10947 2006-01-09  Jim Meyering  <jim@meyering.net>
10948
10949         Sync from coreutils.
10950         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
10951         Require openat-priv.h.
10952
10953 2006-01-09  Bruno Haible  <bruno@clisp.org>
10954
10955         * modules/strnlen (Include): Use strnlen.h.
10956
10957 2006-01-09  Bruno Haible  <bruno@clisp.org>
10958
10959         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
10960
10961 2006-01-09  Bruno Haible  <bruno@clisp.org>
10962
10963         * lib/sysexit_.h (EX_OK): New macro.
10964         Suggested by Martin Lambers <marlam@marlam.de>.
10965
10966 2006-01-09  Bruno Haible  <bruno@clisp.org>
10967
10968         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
10969         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
10970
10971 2006-01-09  Bruno Haible  <bruno@clisp.org>
10972
10973         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
10974         numbers.
10975
10976 2006-01-09  Bruno Haible  <bruno@clisp.org>
10977
10978         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
10979         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
10980         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
10981         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
10982
10983 2006-01-09  Bruno Haible  <bruno@clisp.org>
10984
10985         * build-aux/javacomp.sh.in: New file, moved from lib/.
10986         * modules/javacomp-script (Files): Update.
10987         (configure.ac): Add AC_CONFIG_FILES invocation.
10988         (EXTRA_DIST): Remove variable.
10989
10990         * build-aux/javaexec.sh.in: New file, moved from lib/.
10991         * modules/javaexec (Files): Update.
10992         (configure.ac): Add AC_CONFIG_FILES invocation.
10993         (EXTRA_DIST): Remove javaexec.sh.in.
10994
10995         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
10996         * modules/csharpcomp-script (Files): Update.
10997         (configure.ac): Add AC_CONFIG_FILES invocation.
10998         (EXTRA_DIST): Remove variable.
10999
11000         * build-aux/csharpexec.sh.in: New file, moved from lib/.
11001         * modules/csharpexec (Files): Update.
11002         (configure.ac): Add AC_CONFIG_FILES invocation.
11003         (EXTRA_DIST): Remove csharpexec.sh.in.
11004
11005 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11006
11007         Sync from coreutils.
11008
11009         Add POSIX ACL support
11010         * lib/acl.h (copy_acl, set_acl): Add declarations.
11011         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
11012         systems other than Linux.
11013         (chmod_or_fchmod): New function: use fchmod when possible,
11014         and chmod otherwise.
11015         (file_has_acl): Add a POSIX ACL implementation, with a
11016         Linux-specific subcase.
11017         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
11018         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
11019         acls are unsupported.
11020         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
11021         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
11022         are unsupported.
11023
11024 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11025
11026         Sync from coreutils.
11027         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
11028
11029 2006-01-07  Bruno Haible  <bruno@clisp.org>
11030
11031         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
11032         gl_EARLY.
11033
11034 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11035
11036         * lib/strftime.c (tzname): Don't declare if it is already #defined.
11037         Problem reported for Mingw by Mark Junker.
11038
11039 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11040
11041         * README: Gnulib normally doesn't generate a tarball.
11042
11043 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
11044
11045         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
11046         long int, not int, for nanosecond counts, so that people who are
11047         used to POSIX struct timespec won't be surprised.  Reported by Jim
11048         Meyering.
11049
11050 2005-12-28  Bruno Haible  <bruno@clisp.org>
11051
11052         * build-aux/config.rpath: Update from GNU gettext.
11053
11054 2005-12-16  Jim Meyering  <jim@meyering.net>
11055
11056         * modules/fprintftime: New module.
11057         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
11058
11059 2005-12-16  Jim Meyering  <jim@meyering.net>
11060
11061         * m4/fprintftime.m4: New file.
11062
11063 2005-12-16  Jim Meyering  <jim@meyering.net>
11064
11065         * lib/fprintftime.c, lib/fprintftime.h: New files.
11066
11067 2005-12-15  Simon Josefsson  <jas@extundo.com>
11068
11069         * modules/socklen (configure.ac): Fix M4 macro name, to align with
11070         new m4/socklen.m4.
11071
11072 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11073
11074         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
11075         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
11076
11077 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11078
11079         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
11080         * lib/argp-help.c (fill_in_uparams): Check if the constructed
11081         struct uparams is valid. Fall back to the default values if it is
11082         not.
11083
11084 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11085
11086         * modules/argp (Files): Add argp-pin.c
11087         (Depends-on): dirname
11088         (lib_SOURCES): Add argp-pin.c
11089
11090 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11091
11092         * m4/argp.m4:  Check if program_invocation_name and
11093         program_invocation_short_name are declared and define appropriate
11094         macros if they are not.
11095
11096 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11097
11098         * lib/argp-help.c (__argp_base_name): New function
11099         (__argp_short_program_name): Rewrite using __argp_base_name
11100         * lib/argp-namefrob.h: Define program_invocation_name and
11101         program_invocation_short_name if requested
11102         (__argp_base_name): Add prototype
11103         * lib/argp-parse.c (argp_def): Use gettext wrappers
11104         (argp_default_parser): Use __argp_base_name
11105         * lib/argp-pin.c: New file. Defines program_invocation_name and
11106         program_invocation_short_name on systems that lack them.
11107
11108 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11109
11110         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
11111         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11112         porting problem reported by Georg Schwarz in
11113         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11114
11115 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11116
11117         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
11118         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11119         porting problem reported by Georg Schwarz in
11120         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11121
11122 2005-12-05  Bruno Haible  <bruno@clisp.org>
11123
11124         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
11125         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
11126         Reported by Mark Junker <mjscod@gmx.de>.
11127
11128 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
11129
11130         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
11131         Use implementation from Albert Chin, with some
11132         comments/corrections by Stepan Kasal and myself.
11133
11134 2005-12-02  Bruno Haible  <bruno@clisp.org>
11135
11136         * gnulib-tool (func_import): Accept GPLed build tool modules when
11137         --lgpl is given.
11138         * modules/csharpcomp-script: New file.
11139         * modules/csharpcomp: Depend on it.
11140         * modules/javacomp-script: New file.
11141         * modules/javacomp: Depend on it.
11142         Suggested by Simon Josefsson.
11143
11144 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
11145
11146         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
11147         statement, to work around an HP-UX 10.20 compiler bug reported by
11148         Peter O'Gorman.
11149
11150 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11151
11152         * modules/savedir (Depends-on): Add openat.
11153
11154 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11155
11156         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
11157         (uintmax_t) [defined uintmax_t]: Do not declare.
11158         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
11159         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
11160         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
11161         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
11162         sake of portability to weird hosts that C allows (though we don't
11163         know of any practical examples).
11164
11165         * lib/savedir.h (fdsavedir): New decl.
11166         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
11167         contains most of the former guts of savedir.
11168         (savedir): Use savedirstream.
11169         Include "openat.h".
11170
11171 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
11172
11173         * modules/obstack (Files): Add m4/ulonglong.m4.
11174         Problem reported by Davide Angelocola.
11175
11176 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
11177
11178         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
11179         coreutils no longer futzes with rounding modes.
11180
11181 2005-11-14  Jim Meyering  <jim@meyering.net>
11182
11183         * lib/mkstemp-safer.c: Include <config.h>, required for possible
11184         replacement of mkstemp.
11185
11186 2005-11-10  Simon Josefsson  <jas@extundo.com>
11187
11188         * lib/readline.c: Remove EOL.
11189
11190 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11191
11192         * modules/gethrxtime (Depends-on): Add gettime.
11193
11194 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11195
11196         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
11197         or gettimeofday; no longer needed.
11198
11199 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11200
11201         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
11202         time business.
11203         (gethrxtime) [! (HAVE_NANOUPTIME
11204         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
11205         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
11206         our own approximation.
11207
11208 2005-11-08  Eric Blake  <ebb9@byu.net>
11209
11210         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
11211
11212 2005-11-08  Eric Blake  <ebb9@byu.net>
11213
11214         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
11215
11216 2005-11-04  Bruno Haible  <bruno@clisp.org>
11217
11218         * gnulib-tool: Implement --update mode.
11219
11220 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
11221
11222         Fix porting problem reported by Theodoros V. Kalamatianos.
11223         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
11224         Don't assume that futimes failing means we must fail.
11225
11226 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
11227
11228         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
11229         variables to suggest the intended function of the PATH_MAX check.
11230
11231 2005-10-30  Kean Johnston  <jkj@sco.com>
11232
11233         Trivial changes to support SCO systems.
11234         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
11235         as PATH_MAX.
11236         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
11237         where __ptr is null when no I/O is pending.
11238
11239 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
11240
11241         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
11242         leave errno alone.  Problem reported by Dmitry V. Levin.
11243
11244 2005-10-28  Simon Josefsson  <jas@extundo.com>
11245
11246         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
11247         Test more.
11248
11249         * tests/test-gc-md2.c, tests/test-md2.c: New files.
11250
11251         * modules/md2, modules/md2-tests: New files.
11252
11253 2005-10-28  Simon Josefsson  <jas@extundo.com>
11254
11255         * m4/inet_ntop.m4: More tests.
11256
11257         * m4/gc-md2.m4, md2.m4: New file.
11258
11259 2005-10-28  Simon Josefsson  <jas@extundo.com>
11260
11261         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
11262         "restrict" keywords, as per POSIX.  Protect the function
11263         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
11264         Don't use K&R prototypes.  Check the sprintf return values.
11265         Re-define EAFNOSUPPORT if not present.  Indent.
11266
11267         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
11268         suggested by Bruno Haible <bruno@clisp.org>.
11269
11270         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
11271
11272         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
11273
11274         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
11275         libgcrypt).
11276
11277         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
11278
11279         * lib/md2.h, lib/md2.c: New files.
11280
11281 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
11282
11283         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
11284         errno alone.  Problem reported by Frederic Jolliton.
11285
11286 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
11287
11288         * modules/verify (License): Change from GPL to LGPL.  This is a
11289         tiny module and there are apparently near-equivalents that are
11290         under the BSD license.
11291
11292 2005-10-24  Simon Josefsson  <jas@extundo.com>
11293
11294         * modules/sha1: Relicense to LGPL.
11295
11296 2005-10-24  Simon Josefsson  <jas@extundo.com>
11297
11298         * lib/md4.h: Shrink buffer size, now that we changed the type.
11299
11300 2005-10-23  Simon Josefsson  <jas@extundo.com>
11301
11302         * gnulib-tool (func_import): Fix --tests-base.
11303
11304 2005-10-22  Simon Josefsson  <jas@extundo.com>
11305
11306         * modules/arcfour (Depends-on): Need stdint.
11307
11308 2005-10-22  Simon Josefsson  <jas@extundo.com>
11309
11310         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
11311         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
11312
11313 2005-10-22  Simon Josefsson  <jas@extundo.com>
11314
11315         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
11316         suggested by Bruno Haible <bruno@clisp.org>.
11317
11318 2005-10-22  Simon Josefsson  <jas@extundo.com>
11319
11320         * lib/crc.h: Include stddef.h, for size_t.
11321
11322 2005-10-22  Simon Josefsson  <jas@extundo.com>
11323
11324         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
11325         arcfour_context struct (simplify test vector testing in GNU
11326         Shishi).
11327
11328 2005-10-21  Simon Josefsson  <jas@extundo.com>
11329
11330         * modules/des, modules/des-tests: New files.
11331
11332         * modules/gc-des, modules/gc-des-tests: New files.
11333
11334         * tests/test-des.c, tests/test-gc-des.c: New file.
11335
11336 2005-10-21  Simon Josefsson  <jas@extundo.com>
11337
11338         * modules/arctwo, modules/arctwo-tests: New files.
11339
11340         * tests/test-arctwo.c: New file.
11341
11342         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
11343
11344         * tests/test-gc-arctwo.c: New file.
11345
11346 2005-10-21  Simon Josefsson  <jas@extundo.com>
11347
11348         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
11349         Bruno Haible <bruno@clisp.org>.
11350
11351         * m4/gc-des.m4: New file.
11352
11353 2005-10-21  Simon Josefsson  <jas@extundo.com>
11354
11355         * m4/arctwo.m4: New file.
11356
11357         * m4/gc-arctwo.m4: New file.
11358
11359 2005-10-21  Simon Josefsson  <jas@extundo.com>
11360
11361         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
11362         block.
11363
11364 2005-10-21  Simon Josefsson  <jas@extundo.com>
11365
11366         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
11367         <bruno@clisp.org>.
11368
11369         * lib/hmac-sha1.c (hmac_sha1): Likewise.
11370
11371         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
11372         Bruno Haible <bruno@clisp.org>.
11373
11374         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
11375         <bruno@clisp.org>.
11376
11377 2005-10-21  Simon Josefsson  <jas@extundo.com>
11378
11379         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
11380
11381 2005-10-21  Simon Josefsson  <jas@extundo.com>
11382
11383         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
11384
11385 2005-10-21  Simon Josefsson  <jas@extundo.com>
11386
11387         * lib/des.h, lib/des.c: New files.
11388
11389         * lib/gc-gnulib.c: Support DES.c
11390
11391 2005-10-21  Simon Josefsson  <jas@extundo.com>
11392
11393         * lib/arctwo.h, lib/arctwo.c: New files.
11394
11395         * lib/gc-gnulib.c: Support ARCTWO.
11396
11397 2005-10-21  Simon Josefsson  <jas@extundo.com>
11398
11399         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
11400         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11401
11402 2005-10-21  Simon Josefsson  <jas@extundo.com>
11403
11404         * gnulib-tool (func_import, func_create_testdir): Define automake
11405         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
11406         Makefile.am snippet),
11407         suggested by Bruno Haible <bruno@clisp.org>.
11408
11409         * modules/gc (Makefile.am): Use it.
11410
11411 2005-10-21  Bruno Haible  <bruno@clisp.org>
11412
11413         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
11414         patch.
11415
11416 2005-10-19  Simon Josefsson  <jas@extundo.com>
11417
11418         * tests/test-gc-rijndael.c: New file.
11419
11420         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
11421
11422 2005-10-19  Simon Josefsson  <jas@extundo.com>
11423
11424         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
11425         interface too.
11426
11427 2005-10-19  Simon Josefsson  <jas@extundo.com>
11428
11429         * tests/test-gc-arcfour.c: New file.
11430
11431         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
11432
11433 2005-10-19  Simon Josefsson  <jas@extundo.com>
11434
11435         * modules/gc-md4, modules/gc-md4-tests: New file.
11436
11437         * tests/test-gc-md4.c: New file.
11438
11439 2005-10-19  Simon Josefsson  <jas@extundo.com>
11440
11441         * m4/gc-md4.m4: New file.
11442
11443 2005-10-19  Simon Josefsson  <jas@extundo.com>
11444
11445         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
11446         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
11447         <kasal@ucw.cz>.
11448
11449 2005-10-19  Simon Josefsson  <jas@extundo.com>
11450
11451         * m4/gc-arcfour.m4: New file.
11452
11453         * m4/gc-rijndael.m4: New file.
11454
11455 2005-10-19  Simon Josefsson  <jas@extundo.com>
11456
11457         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
11458
11459 2005-10-19  Simon Josefsson  <jas@extundo.com>
11460
11461         * lib/gc-gnulib.c: Support ARCFOUR.
11462
11463 2005-10-19  Simon Josefsson  <jas@extundo.com>
11464
11465         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
11466         support.
11467
11468         * lib/gc.h: Add ECB enum type.
11469
11470         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
11471
11472 2005-10-18  Simon Josefsson  <jas@extundo.com>
11473
11474         * tests/test-md5.c: New file.
11475
11476         * modules/md5-tests: New file.
11477
11478 2005-10-18  Simon Josefsson  <jas@extundo.com>
11479
11480         * tests/test-md4.c: New file.
11481
11482         * modules/md4, modules/md4-tests: New files.
11483
11484 2005-10-18  Simon Josefsson  <jas@extundo.com>
11485
11486         * m4/md4.m4: New file.
11487
11488 2005-10-18  Simon Josefsson  <jas@extundo.com>
11489
11490         * lib/md4.h, lib/md4.c: New files, based on md5.?.
11491
11492 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
11493
11494         * gnulib-tool (func_create_testdir): Omit the second check whether
11495         BUILT_SOURCES in nonempty.
11496
11497 2005-10-17  Simon Josefsson  <jas@extundo.com>
11498
11499         * tests/test-rijndael.c: New file.
11500
11501 2005-10-17  Simon Josefsson  <jas@extundo.com>
11502
11503         * modules/sha1: Depend on stdint instead of md5.
11504
11505         * modules/md5: Depend on stdint, remove uint32_t.
11506
11507 2005-10-17  Simon Josefsson  <jas@extundo.com>
11508
11509         * modules/gc-sha1-tests: New file.
11510
11511         * tests/test-gc-sha1.c: New file.
11512
11513 2005-10-17  Simon Josefsson  <jas@extundo.com>
11514
11515         * m4/md5.m4: Remove call to uint32_t.m4.
11516
11517 2005-10-17  Simon Josefsson  <jas@extundo.com>
11518
11519         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
11520
11521         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
11522         md5.h.
11523
11524         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
11525
11526         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
11527
11528 2005-10-17  Simon Josefsson  <jas@extundo.com>
11529
11530         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
11531
11532 2005-10-17  Simon Josefsson  <jas@extundo.com>
11533
11534         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
11535
11536 2005-10-17  Simon Josefsson  <jas@extundo.com>
11537
11538         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
11539
11540         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
11541
11542 2005-10-17  Bruno Haible  <bruno@clisp.org>
11543
11544         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
11545         that it can also be used in a test.
11546
11547 2005-10-16  Bruno Haible  <bruno@clisp.org>
11548
11549         * gnulib-tool (func_emit_tests_Makefile_am): Also define
11550         TESTS_ENVIRONMENT, so that individual tests can augment it.
11551
11552         * gnulib-tool (func_create_testdir): Use an intermediate target for
11553         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
11554         macros, like $(ALLOCA_H), which cannot be passed through the command
11555         line.
11556
11557 2005-10-15  Simon Josefsson  <jas@extundo.com>
11558
11559         * modules/rijndael-tests: New file.
11560
11561         * modules/rijndael: New file.
11562
11563 2005-10-15  Simon Josefsson  <jas@extundo.com>
11564
11565         * m4/rijndael.m4: New file.
11566
11567 2005-10-15  Simon Josefsson  <jas@extundo.com>
11568
11569         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
11570
11571         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
11572
11573 2005-10-14  Simon Josefsson  <jas@extundo.com>
11574
11575         * tests/test-arcfour.c: New file.
11576
11577         * modules/arcfour, modules/arcfour-tests: New files.
11578
11579 2005-10-14  Simon Josefsson  <jas@extundo.com>
11580
11581         * m4/arcfour.m4: New file.
11582
11583 2005-10-14  Simon Josefsson  <jas@extundo.com>
11584
11585         * lib/arcfour.h, lib/arcfour.c: New files.
11586
11587 2005-10-14  Roland McGrath  <roland@redhat.com>
11588
11589         Import from libc.  [BZ #1331]
11590         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
11591         macro argument.
11592         Reported by Matej Vela <vela@debian.org>.
11593
11594 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11595
11596         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
11597         include <wchar.h>; no longer needed.
11598
11599 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
11600
11601         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
11602
11603 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
11604         and  Ulrich Drepper  <drepper@redhat.com>
11605
11606         Import from libc.
11607         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
11608         instead of inline stream orientation test and two separate
11609         function calls.  Pay no attention to USE_IN_LIBIO.
11610
11611 2005-10-13  Simon Josefsson  <jas@extundo.com>
11612
11613         * modules/gc-hmac-md5-tests: New file.
11614
11615         * tests/test-gc-hmac-sha1.c: New file.
11616
11617         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
11618
11619         * modules/gc-hmac-md5-tests: New file.
11620
11621         * tests/test-gc-md5.c: New file.
11622
11623         * modules/gc-md5-tests: New file.
11624
11625 2005-10-13  Simon Josefsson  <jas@extundo.com>
11626
11627         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
11628         Move memory allocation outside of loop.
11629
11630 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
11631
11632         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
11633         intermediate directory is in a read-only file system.  Problem
11634         reported by Eric Blake.
11635
11636 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
11637
11638         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
11639
11640 2005-10-12  Simon Josefsson  <jas@extundo.com>
11641
11642         * tests/test-hmac-sha1.c: New file.
11643
11644         * modules/hmac-sha1-tests: New file.
11645
11646         * modules/hmac-sha1: New file.
11647
11648 2005-10-12  Simon Josefsson  <jas@extundo.com>
11649
11650         * modules/gc-sha1: New file.
11651
11652 2005-10-12  Simon Josefsson  <jas@extundo.com>
11653
11654         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
11655
11656         * tests/test-gc-pbkdf2-sha1.c: New file.
11657
11658 2005-10-12  Simon Josefsson  <jas@extundo.com>
11659
11660         * modules/gc-md5, modules/gc-hmac-md5: New files.
11661
11662         * modules/gc (Files): Remove md5, memxor and hmac files.
11663
11664 2005-10-12  Simon Josefsson  <jas@extundo.com>
11665
11666         * m4/gc-pbkdf2-sha1.m4: New file.
11667
11668         * m4/gc-hmac-sha1.m4: New file.
11669
11670         * m4/gc-sha1: New file.
11671
11672         * m4/hmac-sha1.m4: New file.
11673
11674 2005-10-12  Simon Josefsson  <jas@extundo.com>
11675
11676         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
11677
11678         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
11679
11680 2005-10-12  Simon Josefsson  <jas@extundo.com>
11681
11682         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
11683         suggested by Bruno Haible <bruno@clisp.org>.
11684
11685 2005-10-12  Simon Josefsson  <jas@extundo.com>
11686
11687         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
11688
11689 2005-10-12  Simon Josefsson  <jas@extundo.com>
11690
11691         * lib/gc-pbkdf2-sha1.c: New file.
11692
11693         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
11694
11695 2005-10-12  Simon Josefsson  <jas@extundo.com>
11696
11697         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
11698
11699         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
11700
11701 2005-10-12  Simon Josefsson  <jas@extundo.com>
11702
11703         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
11704         GC_USE_HMAC_MD5, respectively.
11705
11706         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
11707         (gc_md5): Fix typo.
11708
11709         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
11710
11711         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
11712
11713         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
11714
11715 2005-10-12  Bruno Haible  <bruno@clisp.org>
11716
11717         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
11718         Reported by Stepan Kasal <kasal@ucw.cz>.
11719
11720 2005-10-11  Simon Josefsson  <jas@extundo.com>
11721
11722         * tests/test-crc.c: New file.
11723
11724         * modules/crc, modules/crc-tests: New files.
11725
11726 2005-10-11  Simon Josefsson  <jas@extundo.com>
11727
11728         * m4/crc.m4: New file.
11729
11730 2005-10-11  Simon Josefsson  <jas@extundo.com>
11731
11732         * lib/gc.h: Add gc_hash and gc_hash_buffer.
11733
11734         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
11735
11736         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
11737
11738 2005-10-11  Simon Josefsson  <jas@extundo.com>
11739
11740         * lib/crc.h, lib/crc.c: New files.
11741
11742         * lib/gc.h (gc_hash_buffer): Add doc.
11743
11744 2005-10-11  Bruno Haible  <bruno@clisp.org>
11745
11746         * modules/c-strcasestr: New file.
11747         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
11748
11749 2005-10-11  Bruno Haible  <bruno@clisp.org>
11750
11751         * modules/c-strcase: New file.
11752         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
11753
11754 2005-10-11  Bruno Haible  <bruno@clisp.org>
11755
11756         * lib/strcasecmp.c: Include limits.h.
11757         (strcasecmp): Avoid integer overflow on exotic platforms.
11758         * lib/strncasecmp.c: Include limits.h.
11759         (strncasecmp): Avoid integer overflow on exotic platforms.
11760         Reported by Paul Eggert.
11761
11762 2005-10-11  Bruno Haible  <bruno@clisp.org>
11763
11764         * lib/c-strcasestr.h: New file, from GNU gettext.
11765         * lib/c-strcasestr.c: New file, from GNU gettext.
11766
11767 2005-10-11  Bruno Haible  <bruno@clisp.org>
11768
11769         * lib/c-strcase.h: New file, from GNU gettext.
11770         * lib/c-strcasecmp.c: New file, from GNU gettext.
11771         * lib/c-strncasecmp.c: New file, from GNU gettext.
11772
11773 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
11774
11775         * modules/mempcpy (License): GPL -> LGPL.
11776         * modules/strchrnul (License): Likewise.
11777         * modules/sysexits (License): Likewise.
11778
11779 2005-10-08  Simon Josefsson  <jas@extundo.com>
11780
11781         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
11782
11783 2005-10-07  Simon Josefsson  <jas@extundo.com>
11784
11785         * m4/memxor.m4: Remove gl_C_RESTRICT call.
11786
11787 2005-10-06  Simon Josefsson  <jas@extundo.com>
11788
11789         * tests/test-hmac-md5.c: New file.
11790
11791         * modules/hmac-md5-tests: New file.
11792
11793         * modules/hmac-md5: New file.
11794
11795 2005-10-06  Simon Josefsson  <jas@extundo.com>
11796
11797         * m4/hmac-md5.m4: New file.
11798
11799         * m4/memxor.m4: Require gl_C_RESTRICT.
11800
11801 2005-10-06  Simon Josefsson  <jas@extundo.com>
11802
11803         * lib/memxor.c (memxor): Avoid casts and warnings.
11804
11805 2005-10-06  Simon Josefsson  <jas@extundo.com>
11806
11807         * lib/hmac-md5.c: New file.
11808
11809         * lib/hmac.h: New file.
11810
11811 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
11812
11813         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
11814         promotes to int, not unsigned int, to catch the AIX 5.3
11815         compiler bug.
11816
11817 2005-10-05  Simon Josefsson  <jas@extundo.com>
11818
11819         * modules/memxor: New file.
11820
11821         * modules/iconv (Files): Move config.rpath to havelib, it is used
11822         there.
11823
11824         * modules/havelib (Files): Add config.rpath.
11825
11826 2005-10-05  Simon Josefsson  <jas@extundo.com>
11827
11828         * m4/memxor.m4: New file.
11829
11830 2005-10-05  Simon Josefsson  <jas@extundo.com>
11831
11832         * lib/memxor.c (memxor): Fix compiler error.
11833
11834         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
11835         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
11836
11837         * lib/memxor.h, lib/memxor.c: New files.
11838
11839         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
11840         we assume all systems have it, suggested by Jim Meyering
11841         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
11842         any systems lack sys/socket.h; mingw32 is known to lack it, but we
11843         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
11844         same reasons.
11845
11846 2005-10-05  Simon Josefsson  <jas@extundo.com>
11847
11848         * config/srclist.txt: Add glibc bug 1423 for md5.h.
11849
11850 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
11851
11852         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
11853         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
11854         needed, since the source code now assumes these .h files.
11855
11856 2005-10-05  Derek Price  <derek@ximbiot.com>
11857
11858         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
11859
11860 2005-10-05  Bruno Haible  <bruno@clisp.org>
11861
11862         * modules/stdint (License): Change to LGPL.
11863
11864 2005-10-04  Simon Josefsson  <jas@extundo.com>
11865
11866         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
11867         D. Baushke" <mdb@gnu.org>.
11868
11869 2005-10-04  Bruno Haible  <bruno@clisp.org>
11870
11871         * lib/verify.h (verify_true): Provide alternative definition for C++.
11872
11873 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
11874
11875         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
11876         (SSIZE_MAX): New macro, if not already defined.
11877         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
11878         than 2 GiB.
11879
11880 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11881
11882         Sync from coreutils.
11883         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
11884         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
11885         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
11886         ULLONG_MAX doesn't work with 2.7.2.1.
11887
11888 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11889
11890         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
11891         From Ben Pfaff.
11892
11893         * modules/exclude (Depends-on): Depend on verify.
11894         * modules/strtoimax (Depends-on): Likewise.
11895         * modules/utimecmp (Depends-on): Likewise.
11896
11897 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
11898
11899         * lib/exclude.c: Include verify.h.
11900         (verify): Remove.  All callers changed to use verify.h's version.
11901         * lib/strtoimax.c: Likewise.
11902         * lib/utimecmp.c: Likewis.e
11903
11904         Sync from coreutils.
11905         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
11906         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
11907         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
11908         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
11909         bother returning ENOSYS if settimeofday or stime fails; just let
11910         them return whatever errno they want to return.
11911         * lib/utimens.c: Include unistd.h, for dup2.
11912         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
11913         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
11914
11915 2005-10-02  Jim Meyering  <jim@meyering.net>
11916
11917         Sync from coreutils.
11918         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
11919         from glibc-2.2.5 that fails for read-only files.
11920
11921 2005-10-02  Jim Meyering  <jim@meyering.net>
11922
11923         Sync from coreutils.
11924         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
11925         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
11926         `#if HAVE_CONFIG_H'.
11927         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
11928         Remove AT_FDCWD test.
11929         Do not consume the fd unless successful.
11930         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
11931         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
11932         block, so that we don't even try to compile it if settimeofday is
11933         available.  This works around a compilation failure on OSF1 V5.1,
11934         due to stime requiring a `long int*' while tv_sec is `int'.
11935
11936 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
11937
11938         Sync from coreutils.
11939         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
11940         against `yes', rather than just testing for nonempty.
11941
11942 2005-10-01  Simon Josefsson  <jas@extundo.com>
11943
11944         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
11945         and Darwin.
11946
11947         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
11948         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
11949         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
11950         freeaddrinfo and gai_strerror are declared by the POSIX headers.
11951         Check if struct addrinfo is declared.
11952
11953 2005-10-01  Simon Josefsson  <jas@extundo.com>
11954
11955         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
11956         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
11957         AI_* and EAI_* definitions.  Protect function declarations.
11958
11959 2005-10-01  Jim Meyering  <jim@meyering.net>
11960
11961         Sync from coreutils.
11962
11963         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
11964         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
11965         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
11966         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11967         in the inet and nsl libraries.  Required on Solaris 5.7.
11968
11969 2005-10-01  Jim Meyering  <jim@meyering.net>
11970
11971         Sync from coreutils.
11972         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
11973         in the inet and nsl libraries.  Required on Solaris 5.7.
11974
11975 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
11976
11977         * lib/getdelim.c (getdelim): Remove unused variables.
11978
11979 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11980
11981         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
11982         so that the code works even with ancient cpp.  Portability problem
11983         with GCC 2.7.2.1 reported by Thomas M.Ott.
11984
11985 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11986
11987         * modules/regex (Depends-on): Add strcase.
11988
11989         * modules/gethostname (Licence): Change from GPL to LGPL, since
11990         gethostname.c is a trivial implementation of a standard library
11991         function.
11992         * modules/poll (License): Change from GPL to LGPL, since it's
11993         derived from LGPL code.
11994
11995 2005-09-27  Jim Meyering  <jim@meyering.net>
11996
11997         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
11998         HAVE_CONFIG_H.
11999
12000         * lib/intprops.h (signed_type_or_expr__): Define.
12001         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
12002         for unsigned types.
12003
12004 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
12005
12006         * lib/verify.h (verify_expr): Remove, replacing with:
12007         (verify_true): New macro that returns true instead of void.
12008         (verify_type__): Remove.
12009         (verify): Use verify_true rather than verify_type__.
12010
12011 2005-09-26  Bruno Haible  <bruno@clisp.org>
12012
12013         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
12014         is necessary.
12015         (lib_SOURCES): Remove mbchar.c.
12016         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
12017         (Files): Add m4/mbrtowc.m4.
12018         * modules/mbiter: Likewise.
12019         * modules/mbuiter: Likewise.
12020
12021 2005-09-26  Bruno Haible  <bruno@clisp.org>
12022
12023         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
12024         compile mbchar.c if they are not both present.
12025         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
12026         * m4/mbiter.m4 (gl_MBITER): Likewise.
12027         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
12028         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
12029         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
12030
12031 2005-09-25  Jim Meyering  <jim@meyering.net>
12032
12033         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
12034         also uses socklen_t.
12035
12036 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
12037
12038         * lib/utimens.c (ENOSYS): Define if not already defined.
12039         (futimens): Support having a null PATH if the file descriptor
12040         is nonnegative.
12041
12042         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
12043         Remove.
12044         (__attribute): Define to empty unless GCC 3.1 or later.
12045         This works around a core dump on OpenBSD 3.4, which has GCC
12046         2.95.3, which dumps core when given __attribute__(()).  It also
12047         simplifies other tests, since we really don't want to bother with
12048         worrying about which ancient version of GCC supported what.
12049         Original problem reported by Yoann Vandoorselaere, with part of
12050         the fix suggested by Derek Price.
12051
12052 2005-09-24  Jim Meyering  <jim@meyering.net>
12053
12054         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
12055         so we can once again use a positive bitfield width of 1 -- now we
12056         don't have to explain why we were using a bitfield width of 2.
12057
12058 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
12059
12060         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
12061         and similarly for the other external symbols.  Problem reported
12062         by James Gallager.
12063
12064         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
12065         bug reported by Jim Meyering.
12066
12067         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
12068         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
12069         not needed, since socklen is a prerequisite module.
12070
12071 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
12072
12073         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
12074         Problem reported by Eric Blake.
12075         (getaddrinfo): Initialize se so that it's not garbage.
12076         Redo internal storage allocation so that it doesn't make unportable
12077         assumptions about alignment.
12078         Fix a memory leak.
12079
12080         * lib/utimens.c (futimens): Use futimesat if available.
12081         Prefer it to futimes since it doesn't have the futimes bug.
12082
12083         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
12084         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
12085         Instead, declare a function that returns a pointer to an array,
12086         and use verify_type__ to declare the size of the array.
12087         Problem and germ of a solution reported by Bruno Haible.
12088         (verify_type__): Use 2, not 1, for bitfield size, to avoid
12089         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
12090
12091 2005-09-23  Jim Meyering  <jim@meyering.net>
12092
12093         Sync from coreutils.
12094         Correct build failure (socklen_t not defined) on at least
12095         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
12096         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
12097
12098 2005-09-23  Jim Meyering  <jim@meyering.net>
12099
12100         * modules/getaddrinfo (Depends-on): Add socklen.
12101
12102 2005-09-23  Bruno Haible  <bruno@clisp.org>
12103
12104         * tests/test-verify.c: New file.
12105
12106 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12107
12108         Sync from coreutils.
12109
12110         * modules/argmatch (Depends-on): Add verify.
12111         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
12112         unistd-safer.
12113         * modules/save-cwd (Depends-on): Likewise.
12114
12115         * modules/openat (Files): Add lib/openat-die.c.
12116         (Depends-on): Remove error, exitfail.
12117         Add dirname.
12118
12119         * modules/verify: New file.
12120         * MODULES.html.sh (Diagnostics <assert.h>): New section,
12121         with "verify" module.
12122
12123 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12124
12125         Sync from coreutils.
12126
12127         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
12128         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
12129         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
12130         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
12131         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
12132         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
12133         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
12134         Don't bother checking for string.h, stdlib.h, unistd.h.
12135         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
12136         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
12137         module's job.
12138         * m4/jm-macros.m4 (gl_MACROS): Likewise.
12139         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
12140
12141         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
12142         (gl_GETDATE): Use it.
12143
12144         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
12145
12146 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12147
12148         Sync from coreutils.
12149
12150         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
12151         stat-time.h.
12152         * lib/argmatch.h: Include verify.h
12153         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
12154         (ARGMATCH_ASSERT): Remove; unused.
12155         * lib/canonicalize.c: Assume STDC_HEADERS.
12156         * lib/exclude.c: Include "strcase.h".
12157         * lib/regex_internal.h [!defined _LIBC]: Likewise.
12158         * lib/getusershell.c: Include stdio--.h rather than stdio.h
12159         and stdio-safer.h.
12160         (getusershell): Call fopen, not fopen_safer.
12161         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
12162         Do not include unistd-safer.h.
12163         (save_cwd): Don't call fd_safer; no longer needed
12164         now that we include fcntl--.h.
12165
12166         * lib/getdate.y (relative_time): New type.
12167         (RELATIVE_TIME_0): New constant.
12168         (parser_control): Use relative_time instead of doing it ourselves.
12169         (%union): Add new relative_time rel member.
12170         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
12171         Now typeless.
12172         (relunit, relunit_snumber): Now of type rel.
12173         (zone, rel, relunit, get_date): Adjust to above changes.
12174
12175         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
12176         Do not include unistd-safer.h.
12177         (getloadavg): Don't call fd_safer; no longer needed
12178         now that we include fcntl--.h.
12179
12180         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
12181         (make_dir_parents): Treat ENOSYS like EEXIST.
12182
12183         Improve quality of diagnostics on restore_cwd failure.
12184         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
12185         (make_dir_parents): Last arg is now int * (for errno), not bool *.
12186         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
12187         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
12188         each time through the loop.  Do not diagnose restore_cwd failure;
12189         that is the caller's job (and perhaps the caller does not care).
12190
12191         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
12192         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
12193         If the file already exists but is not a directory, don't bother
12194         to try to make its parents.
12195         Close potential file descriptor leak if we can't chdir("/") (!).
12196         Don't always return true if chdir($PWD) fails; return true only
12197         if the requested action was done successfully (except for the
12198         chdir($PWD)).
12199         Don't log final directory unless we actually made it.
12200         Refactor to avoid duplicate code to fix up permissions.
12201         Don't attempt to fix up parent permissions if chdir($PWD) fails.
12202
12203         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
12204         to make it a bit faster and (I hope) clearer.
12205         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
12206         Fix bug in formats like %2N.
12207
12208         * lib/verify.h: New file.
12209
12210 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12211
12212         Sync from coreutils.
12213         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
12214
12215 2005-09-22  Jim Meyering  <jim@meyering.net>
12216
12217         Sync from coreutils.
12218
12219         * m4/lstat.m4 (gl_FUNC_LSTAT):
12220         Use AC_LIBSOURCES to require lstat.c and lstat.h.
12221         Remove obsolete comment.
12222         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
12223         * m4/xstrtod.m4: Likewise.
12224
12225         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
12226
12227 2005-09-22  Jim Meyering  <jim@meyering.net>
12228
12229         Sync from coreutils.
12230
12231         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
12232
12233         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
12234         the .tm_year member, since otherwise gcc-4.0 would now warn about
12235         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
12236
12237         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
12238         order to avoid an unsuppressible warning from gcc on 64-bit systems.
12239
12240         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
12241         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
12242         when run in a time zone for which daylight savings time is in effect
12243         for the starting date.
12244
12245         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
12246         stop us from restricting permissions of just-created absolute-named
12247         directories.
12248         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
12249         to restore initial working directory.
12250         * lib/mkdir-p.c (make_dir_parents): New parameter:
12251         different_working_dir, to tell caller if/when we change the working
12252         directory and are unable to return to the initial one.
12253         * lib/mkdir-p.h (make_dir_parents): Update prototype.
12254         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
12255         `return false'.  This fixes a bug introduced on 2004-07-30.
12256
12257         * lib/openat.c (fdopendir): Be sure to close the supplied
12258         file descriptor before returning.  This makes our replacement
12259         implementation a little closer to Solaris's, where fdopendir
12260         ties the file descriptor to the returned DIR* pointer.
12261         * lib/openat.c (unlinkat): New function.
12262         * lib/openat.h (unlinkat): Add prototype.
12263         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
12264         (openat_restore_fail): Rename from openat_restore_die.
12265         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
12266
12267         Provide an alternative to exiting immediately upon save_cwd or
12268         restore_cwd failure.  Now, an application can arrange e.g.,
12269         to perform a longjump in that case.
12270         * lib/openat.c: Include dirname.h.
12271         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
12272         (rpl_openat, fdopendir, fstatat): Call openat_save_die
12273         and openat_restore_die rather than calling error directly.
12274         Don't include "error.h" or "exitfail.h"; they're no longer needed.
12275
12276         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
12277         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
12278         define.
12279
12280         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
12281         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
12282                             int utc, int nanoseconds);
12283         Background:
12284         date should not have to allocate a megabyte of virtual memory to
12285         handle a format argument like +%1048575T.  When implemented with
12286         strftime, it must allocate such a buffer, use strftime to fill it
12287         in, print it, then free it.
12288         With fprintftime, it simply prints everything and exits.
12289         With no need for memory allocation, that's one fewer way to fail.
12290         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
12291         optional field width, not before, so we accept %9:z, not %:9z.
12292         (my_strftime): Be sure to use L_('x') for literals.
12293
12294         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
12295         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
12296         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
12297         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
12298         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
12299         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
12300         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
12301         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
12302         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
12303         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
12304         * lib/xgethostname.c, lib/xreadlink.c:
12305         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
12306
12307         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
12308         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
12309         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
12310         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12311         and don't include <sys/file.h>).
12312
12313 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
12314
12315         Sync from coreutils.
12316
12317         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
12318         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
12319         [!LDAV_DONE]: Avoid unused variable warning.
12320
12321 2005-09-21  Bruno Haible  <bruno@clisp.org>
12322
12323         * lib/unicodeio.h (unicode_to_mb): New declaration.
12324
12325 2005-09-20  Derek Price  <derek@ximbiot.com>
12326
12327         * lib/getaddrinfo.c: Don't include <netdb.h> included from
12328         getaddrinfo.h.
12329
12330 2005-09-20  Bruno Haible  <bruno@clisp.org>
12331
12332         * gnulib-tool: Remove trailing slashes from the values specified for
12333         --source-base, --m4-base, --tests-base, --aux-dir.
12334         Suggested by Simon Josefsson <jas@extundo.com>.
12335
12336 2005-09-20  Bruno Haible  <bruno@clisp.org>
12337
12338         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
12339         func_modules_to_filelist, func_import, func_create_testdir): Make all
12340         sorting results locale-independent, so that gnulib-cache.m4 doesn't
12341         change when gnulib-tool is invoked in a different locale.
12342
12343 2005-09-19  Simon Josefsson  <jas@extundo.com>
12344
12345         * m4/socklen.m4: Fix typo.
12346
12347 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12348
12349         Use a consistent style for including <config.h>.
12350         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
12351         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
12352         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
12353         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
12354         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
12355         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
12356         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
12357         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
12358         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
12359         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
12360         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
12361         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
12362         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
12363         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
12364         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
12365         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
12366         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
12367         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
12368         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
12369         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
12370         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
12371         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
12372         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
12373         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
12374         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
12375         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
12376         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
12377         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
12378         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
12379         lib/xstrtoumax.c, lib/yesno.c:
12380         Standardize inclusion of config.h.
12381         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
12382         lib/inttostr.h:  Removed inclusion of config.h from header files.
12383         * lib/inttostr.c:  Adjusted in-tree users.
12384         * lib/timespec.h: Remove superfluous warning to include config.h.
12385         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
12386         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
12387         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
12388         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
12389         config.h with HAVE_CONFIG_H.
12390
12391 2005-09-19  Jim Meyering  <jim@meyering.net>
12392
12393         * modules/pathmax (License): Change to LGPL.
12394
12395 2005-09-19  Derek Price  <derek@ximbiot.com>
12396
12397         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
12398
12399 2005-09-19  Bruno Haible  <bruno@clisp.org>
12400
12401         * gnulib-tool (import): Provide default for --tests-base.
12402
12403 2005-09-19  Bruno Haible  <bruno@clisp.org>
12404
12405         * doc/quote.texi: New file, extracted from gnulib.texi.
12406         * doc/ctime.texi: New file, extracted from gnulib.texi.
12407         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
12408         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
12409         * doc/gnulib.texi: Include them.
12410
12411 2005-09-18  Bruno Haible  <bruno@clisp.org>
12412
12413         Portability fix.
12414         * gnulib-tool (func_readlink): New function.
12415         (func_ln_if_changed): Use it.
12416
12417 2005-09-18  Bruno Haible  <bruno@clisp.org>
12418
12419         * gnulib-tool: Support --with-tests also with --import.
12420         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
12421         (func_import): Use variables $testsbase and $inctests. Emit a
12422         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
12423         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
12424         SUBDIRS += $testsdir.
12425         (func_create_testdir): Update.
12426
12427 2005-09-18  Bruno Haible  <bruno@clisp.org>
12428
12429         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
12430         instead of $dry_run.
12431         (func_cp_if_changed, func_mv_if_changed): Remove functions.
12432         (func_ln_if_changed): Don't handle dry-run here.
12433         (func_import): In dry-run mode, detect more precisely which actions
12434         would be performed, and don't use "...ing" verbs.
12435
12436 2005-09-18  Bruno Haible  <bruno@clisp.org>
12437
12438         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
12439         (func_import): Use join on two temporary files instead of three nested
12440         loops, in order to determine which files are new or old.
12441
12442 2005-09-18  Bruno Haible  <bruno@clisp.org>
12443
12444         * gnulib-tool (func_import): Comment out code that spits out the
12445         new files with --dry-run.
12446
12447 2005-09-18  Bruno Haible  <bruno@clisp.org>
12448
12449         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
12450
12451 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12452
12453         * lib/stat-time.h: New file.
12454         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
12455         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
12456         in a different way.
12457         (timespec_cmp): New function.
12458         * lib/utimecmp.c: Include stat-time.h.
12459         (SYSCALL_RESOLUTION): Depend on whether various struct stat
12460         members exist, not on the obsolescent ST_MTIM_NSEC.
12461         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
12462
12463 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12464
12465         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
12466
12467 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
12468
12469         * MODULES.html.sh (File system functions): Add stat-time.
12470         * modules/stat-time: New file.
12471         * modules/timespec (Files): Remove m4/st_mtim.m4; this
12472         is now done in a different way, by the stat-time module.
12473         * modules/utimecmp (Depends-on): Add stat-time.
12474
12475 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
12476
12477         * m4/st_mtim.m4: Remove.  Superseded by...
12478         * m4/stat-time.m4: New file.
12479         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
12480         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
12481
12482 2005-09-15  Derek Price  <derek@ximbiot.com>
12483
12484         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
12485
12486 2005-09-15  Derek Price  <derek@ximbiot.com>
12487
12488         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
12489         * lib/regex_internal.c: Ditto, using this...
12490         (__GNUC_PREREQ): ...new macro.
12491         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
12492         using...
12493         (__GNUC_PREREQ): ...this new macro.
12494
12495         * lib/strstr.h: Include string.h. Define strstr as a macro here.
12496
12497 2005-09-15  Derek Price  <derek@ximbiot.com>
12498             Paul Eggert  <eggert@cs.ucla.edu>
12499
12500         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
12501         changes, consolidating in...
12502         * lib/regex_internal.h: ...this file.
12503
12504 2005-09-13  Jim Meyering  <jim@meyering.net>
12505
12506         * lib/canon-host.c: Filter through gnu indent and reword comments
12507         slightly.
12508         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
12509
12510 2005-09-13  Derek Price  <derek@ximbiot.com>
12511
12512         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
12513         failure.
12514         Reported by Jim Meyering  <jim@meyering.net>.
12515
12516 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12517
12518         * lib/base64.c: Typo.
12519         (base64_encode): Put b64str in initialized data section.
12520
12521 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
12522
12523         Merge glibc and coreutils changes into gnulib, plus a few
12524         extra fixes.
12525         * lib/md5.c: Use #error rather than a string.
12526         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
12527         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
12528         (__attribute__): Define to empty for non recent-GCC.
12529         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
12530         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
12531         Renamed from their non-__ counterparts, with new macros replacing
12532         them if not _LIBC.  Add __THROW attribute.
12533         (rol): Remove.
12534         (struct md5_ctx): Align buffer if using GCC.
12535         * lib/sha1.h (struct sha1_ctx): Likewise.
12536         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
12537         The old name was backwards.
12538         (NOTSWAP): Remove; not used.
12539         (rol): New macro, moved here from md5.h.
12540         (sha1_process_block): Remove a FIXME that doesn't make sense.
12541
12542 2005-09-12  Derek Price  <derek@ximbiot.com>
12543
12544         Return usable errors from canon-host.
12545         * lib/canon-host.h: New file.
12546         * lib/canon-host.c (canon_host): Wrap...
12547         (canon_host_r): ...this new function, which now relies exclusively on
12548         getaddrinfo.
12549         (ch_strerror): New function.
12550         (last_cherror): New global.
12551         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
12552         interface.
12553         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
12554         void *.
12555         (freeaddrinfo): Free ai->ai_canonname when set.
12556
12557 2005-09-12  Derek Price  <derek@ximbiot.com>
12558
12559         Make canon-host require getaddrinfo.
12560         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
12561         AC_LIBSOURCE canon-host.h.  Call...
12562         (gl_PREREQ_CANON_HOST): ...this new function, which requires
12563         gl_GETADDRINFO.
12564         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
12565
12566 2005-09-12  Derek Price  <derek@ximbiot.com>
12567
12568         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
12569         LGPL.
12570         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
12571
12572 2005-09-12  Derek Price  <derek@ximbiot.com>
12573
12574         * lib/gai_strerror.c: Include config.h when available.  Include
12575         getaddrinfo.h before other headers to test interface.
12576         Reported by Larry Jones <lawrence.jones@ugs.com>.
12577
12578 2005-09-12  Derek Price  <derek@ximbiot.com>
12579             Paul Eggert  <eggert@cs.ucla.edu>
12580
12581         * modules/glob (Files): Add glob-libc.h.
12582
12583 2005-09-12  Derek Price  <derek@ximbiot.com>
12584             Paul Eggert  <eggert@cs.ucla.edu>
12585
12586         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
12587         glob_.h, glob-libc.h.
12588         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
12589
12590 2005-09-12  Derek Price  <derek@ximbiot.com>
12591             Paul Eggert  <eggert@cs.ucla.edu>
12592
12593         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
12594         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
12595         protecting things that should be done only in gnulib contexts.
12596         * lib/glob_.h: New file, containing only the glob things needed for
12597         gnulib.
12598         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
12599         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
12600         (glob, globfree, glob_pattern_p): Now defined simply in terms of
12601         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
12602         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
12603         and to respect the namespace rules better.
12604
12605 2005-09-08  Simon Josefsson  <jas@extundo.com>
12606
12607         * modules/socklen: New file.
12608
12609 2005-09-08  Simon Josefsson  <jas@extundo.com>
12610
12611         * m4/socklen.m4: New file.
12612
12613 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12614
12615         * modules/utimens (Files): Add m4/utimbuf.m4, since
12616         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
12617         Reported by Sergey Poznyakoff.
12618
12619 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12620
12621         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
12622         definitions, since that's the preferred style in glibc.
12623         Fix a minor spacing issue, and update copyright notice to match
12624         glibc's.
12625
12626 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12627
12628         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
12629
12630 2005-09-06  Simon Josefsson  <jas@extundo.com>
12631
12632         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
12633         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
12634
12635 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12636
12637         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
12638         warning.
12639
12640 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
12641
12642         * config/srclist.txt: Add glibc bug 1302.
12643
12644 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
12645
12646         Change bitset word type from unsigned int to unsigned long int,
12647         as this has better performance on typical 64-bit hosts.
12648         Port bitset code to hosts with unusual word sizes.
12649         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
12650         (build_collating_symbol):
12651         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
12652         argument is a bitset.  This is merely a style issue, but it makes
12653         it clearer that an entire array is expected.
12654         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
12655         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
12656         Port to the case where bitset_word is not the same as unsigned int.
12657         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12658         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
12659         Likewise.
12660         * lib/regexec.c (check_dst_limits_calc_pos_1,
12661         check_subexp_matching_top):
12662         (build_trtable, group_nodes_into_DFAstates):
12663         Likewise.
12664         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
12665         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
12666         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
12667         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
12668         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
12669         * lib/regcomp.c (optimize_subexps, lower_subexp):
12670         Work even if bitset_word has holes in its bitwise representation.
12671         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
12672         * lib/regexec.c (check_dst_limits_calc_pos_1,
12673         check_subexp_matching_top):
12674         Likewise.
12675         * lib/regex_internal.c (re_string_reconstruct):
12676         Don't assume UCHAR_MAX == 255.
12677         * lib/regex_internal.h (bitset_set_all): Likewise.
12678         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
12679         All uses changed.
12680         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
12681         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
12682         All uses changed.
12683         (BITSET_WORD_MAX): New macro.
12684         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
12685         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
12686         (bitset_empty, bitset_copy):
12687         Prefer sizeof (bitset) to multiplying it out ourselves.
12688         (bitset_not_merge): Remove; unused.
12689         (bitset_contain): Return bool, not unsigned int with one bit on.
12690         All callers changed.
12691         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
12692         alignment than re_node_set; do this by defining a new internal
12693         type struct dests_alloc and using it to allocate memory.
12694
12695 2005-09-05  Bruno Haible  <bruno@clisp.org>
12696
12697         * gnulib-tool (func_import): Fix comparison in handling of symbolic
12698         links.
12699
12700 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
12701
12702         * modules/size_max (Makefile.am): Add size_max.h
12703
12704 2005-09-04  Derek Price  <derek@ximbiot.com>
12705
12706         * gnulib-tool (func_import): Fix reversed $symbolic logic.
12707
12708 2005-09-03  Simon Josefsson  <jas@extundo.com>
12709
12710         * gnulib-tool: Fix typo.
12711
12712 2005-09-03  Simon Josefsson  <jas@extundo.com>
12713
12714         * config/srclist.txt: Add glibc bug 1293.
12715
12716 2005-09-03  Derek Price  <derek@ximbiot.com>
12717
12718         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
12719         From Larry Jones <lawrence.jones@ugs.com>.
12720
12721 2005-09-02  Simon Josefsson  <jas@extundo.com>
12722
12723         * modules/socklen: New file.
12724
12725 2005-09-02  Simon Josefsson  <jas@extundo.com>
12726
12727         * modules/havelib: New module.
12728
12729         * modules/gettext, modules/iconv, modules/lock, modules/readline:
12730         Use havelib.
12731
12732 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12733
12734         Check for arithmetic overflow when calculating sizes, to prevent
12735         some buffer-overflow issues.  These patches are conservative, in the
12736         sense that when I couldn't determine whether an overflow was possible,
12737         I inserted a run-time check.
12738         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
12739         macros.
12740         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
12741         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
12742         (re_xnrealloc, re_x2nrealloc): New inline functions.
12743         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
12744         parse_bracket_exp):
12745         (build_equiv_class, build_charclass): Check for arithmetic overflow
12746         in size expression calculations.
12747         * lib/regex_internal.c (re_string_realloc_buffers):
12748         (build_wcs_upper_buffer, re_node_set_add_intersect):
12749         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
12750         (re_dfa_add_node, register_state): Likewise.
12751         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
12752         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
12753         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
12754         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
12755
12756 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
12757
12758         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12759         m4/ulonglong.m4.  Problem reported by Martin Lambers.
12760
12761 2005-09-02  Bruno Haible  <bruno@clisp.org>
12762
12763         Support for lib vs. lib64 distinction on biarch platforms.
12764         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
12765         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
12766         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
12767
12768 2005-09-02  Bruno Haible  <bruno@clisp.org>
12769
12770         * gnulib-tool (import): In the other first-use case, provide defaults
12771         as well.
12772
12773 2005-09-02  Bruno Haible  <bruno@clisp.org>
12774
12775         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
12776         patches not yet found in the latest gettext release.
12777
12778 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12779
12780         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
12781         to avoid a collision with bits/local_lim.h in glibc.
12782         All uses changed.  Problem reported by Dmitry V. Levin in
12783         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
12784
12785         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
12786         bugs in int versus size_t comparisons.
12787         (re_string_context_at): Fix bug where the code assumed that
12788         Idx is signed.
12789
12790         Use bool where appropriate.
12791         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
12792         All callers changed.
12793         (calc_eclosure_iter): Likewise, for ROOT arg.
12794         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
12795         (build_charclass_op): Likewise, for NON_MATCH arg.
12796         * lib/regex_internal.c (re_string_allocate, re_string_construct):
12797         (re_string_construct_common): Likewise, for ICASE arg.
12798         * lib/regexec.c (re_search_2_stub, re_search_stub):
12799         Likewise, for RET_LEN arg.
12800         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
12801         (set_regs): Likewise, for FL_BACKTRACK arg.
12802         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
12803         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
12804         (calc_eclosure_iter, parse_bracket_exp):
12805         Use bool for internal variables that are booleans.
12806         * lib/regexec.c (re_search_internal, check_matching,
12807         proceed_next_node):
12808         (set_regs, build_sifted_states, sift_states_bkref):
12809         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
12810         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12811         (find_collation_sequence_value):
12812         Likewise.
12813         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
12814         (re_node_set_compare):
12815         Return bool, not int. All callers changed.
12816         * lib/regexec.c (check_halt_node_context, check_dst_limits):
12817         (build_trtable, check_node_accept): Likewise.
12818         * lib/regex_internal.h: Include stdbool.h.
12819
12820         Fix bugs uncovered when converting to bool.
12821         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
12822         failure instead of charging ahead blindly.
12823         * lib/regex_internal.c (register_state): Likewise.
12824         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
12825         for freeing internal storage.
12826         (group_nodes_into_DFA_states): Use unsigned int, not int, for
12827         bitset pieces used as boolean, to avoid undefined behavior
12828         on hosts that do int overflow checking.
12829
12830 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
12831
12832         * config/srclist.txt: Add glibc bugs 1285-1287.
12833
12834 2005-09-01  Jim Meyering  <jim@meyering.net>
12835
12836         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
12837         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
12838         Require gl_STAT_MACROS, too.
12839
12840 2005-09-01  Bruno Haible  <bruno@clisp.org>
12841
12842         * gnulib-tool (import): In the first-use case, provide defaults.
12843
12844 2005-09-01  Bruno Haible  <bruno@clisp.org>
12845
12846         * gnulib-tool (func_import): Remove the .tmp files.
12847
12848 2005-09-01  Bruno Haible  <bruno@clisp.org>
12849
12850         * gnulib-tool (func_import): Fix handling of symbolic links.
12851
12852 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12853
12854         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
12855         old glibc regex code mishandles strings longer than 2**31 bytes.
12856         This patch fixes this when the regex code is used in gnulib
12857         (i.e., outside glibc).
12858
12859         This patch should not affect the use of the regex code inside
12860         glibc.  No doubt this problem also needs to be handled for glibc
12861         as well, but the result will be an incompatible change to the
12862         glibc ABI, and the old ABI will have to be supported too.  That
12863         can be the the subject for another patch.
12864
12865         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
12866         governing whether the rest of this patch is active.  By default,
12867         the macro is disabled and the patch has no effect.
12868         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
12869         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
12870         (struct re_pattern_buffer, re_search, re_search_2, re_match):
12871         (re_match_2, re_set_registers): Use the new types.
12872         * lib/regex_internal.h (Idx, re_hashval_t): New types.
12873         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
12874         New macros.
12875         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
12876         (re_string_context_at, bin_tree_t, re_dfastate_t):
12877         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
12878         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
12879         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
12880         (re_string_char_size_at, re_string_wchar_at):
12881         (re_string_elem_size_at):
12882         Use the new types and macros to port to 64-bit hosts.
12883         Use unsigned types for internal values, so that the code
12884         mostly works even for arrays larger than SSIZE_MAX.
12885         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
12886         (search_duplicated_node, calc_eclosure_iter, fetch_number):
12887         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
12888         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
12889         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
12890         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
12891         (calc_inveclosure, parse_dup_op, build_range_exp):
12892         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
12893         (fetch_number, create_token_tree, mark_opt_subexp):
12894         Likewise.
12895         * lib/regex_internal.c (re_string_construct_common,
12896         create_ci_newstate):
12897         (create_cd_newstate, re_string_allocate, re_string_construct):
12898         (re_string_realloc_buffers, build_wcs_upper_buffer):
12899         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12900         (re_string_reconstruct, re_string_peek_byte_case):
12901         (re_string_fetch_byte_case, re_string_context_at):
12902         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12903         (re_node_set_init_copy, re_node_set_add_intersect):
12904         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12905         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12906         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12907         (re_acquire_state, re_acquire_state_context, register_state):
12908         Likewise.
12909         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
12910         search_cur_bkref_entry):
12911         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
12912         (re_search_internal, re_search_2_stub, re_search_stub)
12913         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
12914         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
12915         (update_cur_sifted_state, check_dst_limits):
12916         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
12917         (check_subexp_limits, sift_states_bkref, merge_state_array):
12918         (check_subexp_matching_top, get_subexp, get_subexp_sub):
12919         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
12920         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12921         (expand_bkref_cache, check_node_accept_bytes):
12922         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
12923         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
12924         (acquire_init_state_context, check_halt_node_context):
12925         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
12926         (sift_states_backward, clean_state_log_if_needed):
12927         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
12928         (find_recover_state, transit_state_sb, transit_state_mb):
12929         (transit_state_bkref, build_trtable, match_ctx_clean):
12930         Likewise.
12931         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
12932         to work around an assumption that REG_MISSING is negative.
12933
12934         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
12935         (seek_collating_symbol_entry) [defined _LIBC]:
12936         (lookup_collation_sequence_value) [defined _LIBC]:
12937         (build_range_exp, build_collating_symbol) [defined _LIBC]:
12938         Use prototypes rather than old-style function definitions.
12939         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
12940         (transit_state_sb) [0]:
12941         (find_collation_sequence_value) [defined _LIBC]: Likewise.
12942
12943         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
12944         rm_eo.
12945
12946         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
12947         (optimize_subexps, lower_subexp):
12948         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
12949         since the signed shift might overflow.  Use 1u<<31 instead.
12950         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
12951         Likewise.
12952         * lib/regexec.c (check_dst_limits_calc_pos_1,
12953         check_subexp_matching_top): Likewise.
12954
12955         * lib/regcomp.c (optimize_subexps, lower_subexp):
12956         Use CHAR_BIT rather than 8, for clarity.
12957         * lib/regexec.c (check_dst_limits_calc_pos_1):
12958         (check_subexp_matching_top): Likewise.
12959         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
12960         have to worry about portability issues when shifting it left.
12961         Remove no-longer-needed test for table_size > 0.
12962         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
12963         in a word, as the resulting behavior is undefined.
12964         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
12965         in one case, a <= should have been an <, and in another case the
12966         whole test was missing.
12967         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
12968         the standard name CHAR_BIT.
12969         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
12970         this is not true on one's complement and signed-magnitude hosts.
12971
12972         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
12973         next_last_offset.
12974         (struct re_dfa_t): Remove unused member states_alloc.
12975         * lib/regcomp.c (init_dfa): Don't initialize unused members.
12976
12977 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12978
12979         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
12980         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
12981         and large-file glibc and in 32-bit large-file Solaris.
12982
12983 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12984
12985         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
12986         lengths fit in regoff_t; this isn't true if regoff_t is the same
12987         width as size_t.
12988         * lib/regex.c (re_search_internal): 5th arg is LAST_START
12989         (= START + RANGE) instead of RANGE.  This avoids overflow
12990         problems when regoff_t is the same width as size_t.
12991         All callers changed.
12992         (re_search_2_stub): Check for overflow when adding the
12993         sizes of the two strings.
12994         (re_search_stub): Check for overflow when adding START
12995         to RANGE; if it occurs, substitute the extreme value.
12996
12997 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
12998
12999         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
13000
13001 2005-08-31  Jim Meyering  <jim@meyering.net>
13002
13003         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
13004         a pointer-to-const.
13005         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
13006         (register_state): Likewise.
13007         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
13008         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13009         (group_nodes_into_DFAstates): Likewise.
13010
13011 2005-08-31  Jim Meyering  <jim@meyering.net>
13012
13013         * check-module: Add a FIXME comment.
13014
13015 2005-08-31  Eric Blake  <ebb9@byu.net>
13016
13017         * modules/unistd-safer (Files): Add unistd--.h.
13018         * modules/stdio-safer (Files): Add stdio--.h.
13019
13020 2005-08-31  Derek Price  <derek@ximbiot.com>
13021
13022         * lib/getdelim.c (getdelim): Return EOF on EOF.
13023         Reported by Larry Jones <lawrence.jones@ugs.com>.
13024
13025 2005-08-31  Bruno Haible  <bruno@clisp.org>
13026
13027         Avoid unnecessary diffs in the generated lib/Makefile.am.
13028         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
13029         the generated files.
13030         (func_import): Don't set cmd.
13031
13032 2005-08-31  Bruno Haible  <bruno@clisp.org>
13033
13034         * lib/strstr.c: Include <stddef.h>, for NULL.
13035         * lib/strcasestr.c: Likewise.
13036         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13037
13038 2005-08-31  Bruno Haible  <bruno@clisp.org>
13039
13040         * gnulib-tool: New option --macro-prefix.
13041         (func_import): Use macro_prefix.
13042         (import): Handle option --macro-prefix.
13043
13044 2005-08-31  Bruno Haible  <bruno@clisp.org>
13045
13046         * gnulib-tool (import): Rename most ac_* variables to cached_*.
13047         Also use new variables cached_lgpl, cached_libtool.
13048
13049 2005-08-31  Bruno Haible  <bruno@clisp.org>
13050
13051         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
13052         always instantiating them.
13053
13054 2005-08-31  Bruno Haible  <bruno@clisp.org>
13055
13056         * gnulib-tool (func_import): Read the previous cached settings
13057         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
13058         earlier added by gnulib but are now dropped. Warn when a gnulib file
13059         overwrites a non-gnulib file.
13060
13061 2005-08-31  Bruno Haible  <bruno@clisp.org>
13062
13063         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
13064         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
13065         projects that don't keep autogenerated files in CVS. Put into
13066         actioncmd only the specified modules, not the transitive closure.
13067
13068 2005-08-31  Bruno Haible  <bruno@clisp.org>
13069
13070         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
13071         Create directories that shall be filled.
13072         (import): Don't look for gl_* macros in configure.ac. Recurse across
13073         all directories containing a gnulib-cache.m4 files, if meaningful.
13074
13075 2005-08-31  Bruno Haible  <bruno@clisp.org>
13076
13077         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
13078         (import): Set seen_libtool when we see gl_LIBTOOL.
13079
13080 2005-08-31  Bruno Haible  <bruno@clisp.org>
13081
13082         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
13083         declaration macro definitions from generated gnulib.m4.
13084
13085 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
13086
13087         * lib/iconvme.h: Add prototype for iconv_alloc.
13088
13089 2005-08-29  Simon Josefsson  <jas@extundo.com>
13090
13091         * lib/iconvme.c: Fix errno.
13092
13093 2005-08-29  Bruno Haible  <bruno@clisp.org>
13094
13095         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
13096         that it works when the directory contains spaces.
13097
13098 2005-08-29  Bruno Haible  <bruno@clisp.org>
13099
13100         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
13101
13102 2005-08-29  Bruno Haible  <bruno@clisp.org>
13103
13104         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
13105         Emit more advice.
13106
13107 2005-08-29  Bruno Haible  <bruno@clisp.org>
13108         and Stepan Kasal  <kasal@ucw.cz>
13109
13110         * check-module: If more parameters are given, check each of them
13111         separately; add more exceptions, as noted by Jim Meyering.
13112         (check_module): New procedure.
13113         (%exempt_header): Now contains all exceptions.
13114
13115 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
13116
13117         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
13118
13119 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13120
13121         * lib/iconvme.c: Split iconv_string into iconv_alloc.
13122
13123 2005-08-28  Bruno Haible  <bruno@clisp.org>
13124
13125         * m4/gnulib-tool.m4: New file.
13126
13127 2005-08-27  Jim Meyering  <jim@meyering.net>
13128
13129         * modules/unistd-safer (Files): Add pipe-safer.c.
13130         * modules/fcntl-safer (Files): Add creat-safer.c.
13131
13132 2005-08-27  Jim Meyering  <jim@meyering.net>
13133
13134         * m4/stdlib-safer.m4: New file.  From coreutils.
13135         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
13136         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
13137         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
13138         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
13139         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
13140
13141 2005-08-27  Jim Meyering  <jim@meyering.net>
13142
13143         * lib/fopen-safer.c: Merge minor changes from coreutils.
13144         * lib/dup-safer.c: Likewise.
13145         * lib/fd-safer.c: Likewise.
13146
13147         Merge from coreutils.
13148         * lib/stdio--.h: New file.
13149         * lib/stdlib--.h: New file.
13150         * lib/mkstemp-safer.c: New file.
13151
13152         GNU tar needs these.
13153         * lib/pipe-safer.c: New file.
13154         * lib/creat-safer.c: New file.
13155         * lib/fcntl--.h (creat): Define to creat_safer.
13156         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
13157         * lib/unistd--.h (pipe): Define to pipe_safer.
13158         * lib/unistd-safer.h: Declare pipe_safer.
13159
13160 2005-08-26  Simon Josefsson  <jas@extundo.com>
13161
13162         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
13163         Haible <bruno@clisp.org>.
13164
13165 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
13166
13167         * lib/regex_internal.h: Remove all references to
13168         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
13169         or better.
13170         (bitset_not, bitset_merge, bitset_not_merge):
13171         (bitset_mask, re_string_allocate, re_string_construct):
13172         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
13173         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
13174         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
13175         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
13176         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13177         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13178         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
13179         (re_acquire_state_context):
13180         Remove unnecessary forward decls.
13181         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
13182         Put __attribute at function definition,
13183         now that the function decl has been removed.
13184         * lib/regex_internal.c (re_string_peek_byte_case):
13185         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
13186         Likewise.
13187
13188 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
13189
13190         * m4/regex.m4: Add AC_PREREQ(2.50).
13191         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
13192
13193 2005-08-25  Simon Josefsson  <jas@extundo.com>
13194
13195         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
13196         __fsetlocking.
13197
13198 2005-08-25  Simon Josefsson  <jas@extundo.com>
13199
13200         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
13201         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
13202         GLIBC specific code.
13203
13204 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13205
13206         Make regex safe for g++.  This fixes one real bug (an "err"
13207         that should have been "*err").  g++ problem reported by
13208         Sam Steingold.
13209         * lib/regex_internal.h (re_calloc): New macro, consistent with
13210         re_malloc etc.  All callers of calloc changed to use re_calloc.
13211         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
13212         not int.  All callers changed.
13213         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
13214         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
13215         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
13216         (find_recover_state): Change "err" to "*err"; this fixes what
13217         appears to be a real bug.
13218         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
13219         versus int.
13220
13221 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13222
13223         * modules/regex (Depends-on): Add malloc, since the code
13224         assumes that !malloc(0) means failure.
13225
13226 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13227
13228         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
13229
13230         alloca modernization/simplification for regex.
13231         * lib/regex.c: Remove portability cruft for alloca.  This no longer
13232         needs to be at the start of the file, and can be moved into
13233         regex_internal.h and simplified.
13234         * lib/regex_internal.h: Include <alloca.h>.
13235         (__libc_use_alloca) [!defined _LIBC]: New macro.
13236         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
13237         now works outside glibc.
13238
13239 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13240
13241         * config/srclist.txt: Add glibc bugs 1241, 1245.
13242
13243 2005-08-25  Jim Meyering  <jim@meyering.net>
13244
13245         * lib/open-safer.c: Include <config.h>.
13246         Otherwise, we'd lose LARGEFILE support in any file using
13247         e.g. "fcntl--.h"
13248
13249 2005-08-25  Bruno Haible  <bruno@clisp.org>
13250
13251         * m4/minmax.m4: Require autoconf 2.52.
13252         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
13253         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
13254         alternatives of translit over the alphabet.
13255         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
13256
13257 2005-08-24  Simon Josefsson  <jas@extundo.com>
13258
13259         * tests/test-getpass.c: New file.
13260
13261 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13262
13263         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
13264         for GNU regex features.
13265
13266 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13267
13268         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
13269         * lib/regex.h (regerror): Likewise.
13270
13271         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
13272         requires this.  (The code never needed it.)
13273
13274         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
13275         All uses of recently-renamed identifiers changed to use the new,
13276         POSIX-compliant names.  The code will build and run just fine
13277         without these changes, but it's better to eat our own dog food
13278         and use the standard-conforming names.
13279
13280         * lib/regex.h: Fix a multitude of POSIX name space violations.
13281         These changes have an effect only for programs that define
13282         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
13283         do not change anything for programs compiled in the normal way.
13284         Also, there is no effect on the ABI.
13285
13286         (_REGEX_SOURCE): New macro.
13287         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
13288         defined and _GNU_SOURCE is not; this fixes a name space violation.
13289
13290         Rename the following macros to obey POSIX requirements.
13291         The old names are still visible as macros if _REGEX_SOURCE is defined.
13292         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
13293         RE_BACKSLASH_ESCAPE_IN_LISTS.
13294         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
13295         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
13296         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
13297         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
13298         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
13299         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
13300         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
13301         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
13302         (REG_INTERVALS): renamed from RE_INTERVALS.
13303         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
13304         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
13305         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
13306         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
13307         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
13308         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
13309         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
13310         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
13311         RE_UNMATCHED_RIGHT_PAREN_ORD.
13312         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
13313         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
13314         (REG_DEBUG): renamed from RE_DEBUG.
13315         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
13316         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
13317         unusual, since we can't clash with the POSIX REG_ICASE.
13318         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
13319         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
13320         (REG_NO_SUB): renamed from RE_NO_SUB.
13321         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
13322         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
13323         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
13324         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
13325         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
13326         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
13327         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
13328         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
13329         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
13330         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
13331         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
13332         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
13333         RE_SYNTAX_POSIX_MINIMAL_BASIC.
13334         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
13335         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
13336         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
13337         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
13338         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
13339         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
13340         (REG_FIXED): Renamed from REGS_FIXED.
13341         (REG_NREGS): Renamed from RE_NREGS.
13342
13343         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
13344         of other REG_* macros, since POSIX says the user is allowed to
13345         #undef these macros selectively.
13346
13347         (reg_errcode_t): Update comment stating what other tables need
13348         to be consistent.
13349
13350         Rename the following enum values to obey POSIX requirements.
13351         The old names are still visible as macros.
13352         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
13353         is not defined, since GNU is supposed to be a superset of POSIX as
13354         much as possible, and since we want reg_errcode_t to be a signed
13355         type for implementation consistency.
13356         (_REG_NOERROR): Renamed from REG_NOERROR.
13357         (_REG_NOMATCH): Renamed from REG_NOMATCH.
13358         (_REG_BADPAT): Renamed from REG_BADPAT.
13359         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
13360         (_REG_ECTYPE): Renamed from REG_ECTYPE.
13361         (_REG_EESCAPE): Renamed from REG_EESCAPE.
13362         (_REG_ESUBREG): Renamed from REG_ESUBREG.
13363         (_REG_EBRACK): Renamed from REG_EBRACK.
13364         (_REG_EPAREN): Renamed from REG_EPAREN.
13365         (_REG_EBRACE): Renamed from REG_EBRACE.
13366         (_REG_BADBR): Renamed from REG_BADBR.
13367         (_REG_ERANGE): Renamed from REG_ERANGE.
13368         (_REG_ESPACE): Renamed from REG_ESPACE.
13369         (_REG_BADRPT): Renamed from REG_BADRPT.
13370         (_REG_EEND): Renamed from REG_EEND.
13371         (_REG_ESIZE): Renamed from REG_ESIZE.
13372         (_REG_ERPAREN): Renamed from REG_ERPAREN.
13373         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
13374         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
13375         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
13376         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
13377
13378         (_REG_RE_NAME, _REG_RM_NAME): New macros.
13379         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
13380         changed.  But support the old name if the new one is not defined
13381         and if _REGEX_SOURCE.
13382
13383         Change the following member names in struct re_pattern_buffer.
13384         The old names are still supported if !_REGEX_SOURCE.
13385         The new names are always supported, regardless of _REGEX_SOURCE.
13386         (re_buffer): Renamed from buffer.
13387         (re_allocated): Renamed from allocated.
13388         (re_used): Renamed from used.
13389         (re_syntax): Renamed from syntax.
13390         (re_fastmap): Renamed from fastmap.
13391         (re_translate): Renamed from translate.
13392         (re_can_be_null): Renamed from can_be_null.
13393         (re_regs_allocated): Renamed from regs_allocated.
13394         (re_fastmap_accurate): Renamed from fastmap_accurate.
13395         (re_no_sub): Renamed from no_sub.
13396         (re_not_bol): Renamed from not_bol.
13397         (re_not_eol): Renamed from not_eol.
13398         (re_newline_anchor): Renamed from newline_anchor.
13399
13400         Change the following member names in struct re_registers.
13401         The old names are still supported if !_REGEX_SOURCE.
13402         The new names are always supported, regardless of _REGEX_SOURCE.
13403         (rm_num_regs): Renamed from num_regs.
13404         (rm_start): Renamed from start.
13405         (rm_end): Renamed from end.
13406
13407         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
13408         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
13409         Prepend __ to parameter names.
13410
13411         Undo yesterday's changes.
13412
13413 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
13414
13415         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
13416         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
13417         lib/regex.c.
13418
13419 2005-08-24  Jim Meyering  <jim@meyering.net>
13420
13421         Sync from coreutils.
13422         * m4/fcntl-safer.m4: New file.
13423
13424         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
13425         and object files for this module.
13426
13427 2005-08-24  Jim Meyering  <jim@meyering.net>
13428
13429         Sync from coreutils.
13430         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
13431
13432 2005-08-24  Jim Meyering  <jim@meyering.net>
13433
13434         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
13435         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
13436
13437 2005-08-24  Jim Meyering  <jim@meyering.net>
13438
13439         * modules/fcntl-safer: New module.
13440         * modules/fts (Depends-on): Add fcntl-safer.
13441         * MODULES.html.sh (File descriptor based Input/Output):
13442         Add fcntl-safer.
13443
13444 2005-08-24  Bruno Haible  <bruno@clisp.org>
13445
13446         Support for unit test modules.
13447         * modules/README: Mention tests modules.
13448         * modules/TEMPLATE-TESTS: New file.
13449         * gnulib-tool: New options --extract-tests-module, --with-tests and
13450         --tests-base (unused for the moment).
13451         (testsbase, inctests): New variables.
13452         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
13453         (func_verify_module): Exclude TEMPLATE-TESTS.
13454         (func_verify_nontests_module, func_verify_tests_module): New functions.
13455         (func_get_dependencies): Add implicit dependency for tests modules.
13456         (func_get_tests_module): New function.
13457         (func_modules_transitive_closure): When --with-tests was specified,
13458         include the unit tests as well, unless explicitly avoided.
13459         (func_emit_lib_Makefile_am): Ignore the tests modules here.
13460         (func_emit_tests_Makefile_am): New function.
13461         (func_create_testdir): When --with-tests was specified, emit a
13462         tests/ directory.
13463         * MODULES.html.sh (Future developments): Update.
13464
13465 2005-08-24  Bruno Haible  <bruno@clisp.org>
13466
13467         * modules/tls-tests: New file.
13468         * tests/test-tls.c: New file, from GNU gettext.
13469
13470 2005-08-24  Bruno Haible  <bruno@clisp.org>
13471
13472         * modules/lock-tests: New file.
13473         * tests/test-lock.c: New file, from GNU gettext.
13474
13475 2005-08-24  Bruno Haible  <bruno@clisp.org>
13476
13477         * lib/lock.h: Add multiple inclusion guard.
13478         * lib/tls.h: Add multiple inclusion guard.
13479
13480 2005-08-24  Bruno Haible  <bruno@clisp.org>
13481
13482         * gnulib-tool: Add support for the --aux-dir option to
13483         --create-testdir, --create-megatestdir, --test, --megatest.
13484         (func_create_testdir, func_create_megatestdir): Optionally emit a
13485         AC_CONFIG_AUX_DIR directive.
13486         (create-testdir, create-megatestdir, test, megatest): Provide a
13487         default value for $auxdir.
13488
13489 2005-08-24  Bruno Haible  <bruno@clisp.org>
13490
13491         * gnulib-tool (import): Use compound statement instead of subshell
13492         where possible.
13493
13494 2005-08-24  Bruno Haible  <bruno@clisp.org>
13495
13496         * gnulib-tool (import): Change --aux-dir default to "build-aux".
13497
13498 2005-08-24  Bruno Haible  <bruno@clisp.org>
13499
13500         * gnulib-tool (func_version): Update.
13501
13502 2005-08-24  Bruno Haible  <bruno@clisp.org>
13503
13504         * gnulib-tool (func_import, func_create_testdir,
13505         func_create_megatestdir): Quote all autoconf macro arguments.
13506
13507 2005-08-24  Bruno Haible  <bruno@clisp.org>
13508
13509         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
13510         option --force, because --force causes the aclocal.m4 of each
13511         subdirectory to be newer than the corresponding config.h.in.
13512
13513 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13514
13515         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
13516         All contents moved to gl_REGEX.
13517         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
13518         assume that it does.
13519
13520 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13521
13522         * lib/regex.h (REG_NOSYS)
13523         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
13524         Define, since POSIX requires it as of 2001.
13525         (_REG_ENOSYS)
13526         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
13527         New private symbol, used to keep the enum signed in all cases.
13528         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
13529         Youngman in
13530         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
13531
13532         * lib/regex_internal.c (re_string_skip_chars, register_state):
13533         (calc_state_hash):
13534         Remove forward decls; no longer needed now that we use prototypes.
13535         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
13536         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
13537         (clean_state_log_if_needed): Likewise.
13538
13539 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
13540
13541         * config/srclist.txt: Add glibc bugs 1231-1233.
13542
13543 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13544
13545         Fix problems reported by Sam Steingold in
13546         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
13547         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
13548         assumed that reg_errcode_t is a signed type, which is not
13549         necessarily true if _XOPEN_SOURCE is not defined.
13550         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
13551         since some compilers warn about it otherwise.
13552
13553 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13554
13555         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
13556         (init_word_char, create_initial_state, duplicate_node_closure):
13557         (fetch_token, peek_token_bracket, build_range_exp):
13558         (build_collating_symbol): Remove forward decls; no longer needed
13559         now that we use prototypes.
13560
13561         * lib/regcomp.c:
13562         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
13563         (re_compile_fastmap_iter, regcomp, regerror, regfree):
13564         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
13565         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
13566         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
13567         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
13568         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
13569         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
13570         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
13571         (build_range_exp, build_collating_symbol, parse_bracket_exp):
13572         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
13573         (build_charclass, build_charclass_op, fetch_number, create_tree):
13574         (create_token_tree, mark_opt_subexp, duplicate_tree):
13575         Use prototypes rather than old-style definitions.
13576
13577         * lib/regex_internal.c:
13578         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
13579         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
13580         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13581         (re_string_reconstruct, re_string_peek_byte_case):
13582         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
13583         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13584         (re_node_set_init_copy, re_node_set_add_intersect):
13585         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13586         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13587         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13588         (re_acquire_state, re_acquire_state_context, register_state):
13589         (create_ci_newstate, create_cd_newstate, free_state):
13590         Likewise.
13591         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
13592         re_search_2):
13593         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
13594         (re_search_internal, prune_impossible_nodes):
13595         (acquire_init_state_context, check_matching, static):
13596         (check_halt_node_context, check_halt_state_context, proceed_next_node):
13597         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
13598         (update_regs, sift_states_backward, build_sifted_states):
13599         (clean_state_log_if_needed, merge_state_array):
13600         (update_cur_sifted_state, add_epsilon_src_nodes):
13601         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
13602         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
13603         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
13604         (find_recover_state, check_subexp_matching_top, transit_state_mb):
13605         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
13606         (check_arrival, check_arrival_add_next_nodes):
13607         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13608         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13609         (check_node_accept_bytes, check_node_accept, extend_buffers):
13610         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
13611         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
13612         (sift_ctx_init):
13613         Likewise.
13614
13615         * lib/regex_internal.h:
13616         (re_string_allocate, re_string_construct, re_string_reconstruct):
13617         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
13618         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
13619         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
13620         (re_string_context_at, re_string_peek_byte_case):
13621         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
13622         is defined, since we now use prototypes always.
13623
13624         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
13625         C89 or better.  All uses removed.
13626
13627 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
13628
13629         * config/srclist.txt: Add glibc bugs 1220-1227.
13630
13631 2005-08-20  Jim Meyering  <jim@meyering.net>
13632
13633         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
13634         of unused local, dfa.
13635
13636 2005-08-20  Bruno Haible  <bruno@clisp.org>
13637
13638         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
13639
13640 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13641
13642         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
13643         (re_node_set_insert_last, re_dfa_add_node):
13644         Rename local variables to avoid GCC shadowing warnings.
13645
13646 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13647
13648         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
13649         [defined lint]: Suppress bogus uninitialized-variable warnings.
13650
13651         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
13652         and let the caller return REG_ESPACE if out of space.  This
13653         removes an uninitialied-variable warning with GCC 4.0.1, and also
13654         avoids taking the address of a local variable.  All callers
13655         changed.
13656
13657 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13658
13659         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
13660         $LIBCSRC/posix/regexec.c.
13661         Add glibc bug 1217 for regcomp.c.
13662
13663 2005-08-19  Jim Meyering  <jim@meyering.net>
13664
13665         * lib/regexec.c (proceed_next_node): Redo local variables to
13666         avoid GCC shadowing warnings.
13667
13668 2005-08-18  Bruno Haible  <bruno@clisp.org>
13669
13670         * lib/strstr.c (strstr): Fix return value in multibyte case.
13671         * lib/strcasestr.c (strcasestr): Likewise.
13672
13673 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13674
13675         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
13676
13677 2005-08-17  Jim Meyering  <jim@meyering.net>
13678
13679         Make the %s format (seconds since the epoch) work for a negative
13680         number and when used with a zero-padded field width, e.g. %015s.
13681
13682         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
13683         label so that it precedes the code to set `digits'.  Otherwise,
13684         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
13685         print `00-22'.  Now, it prints `-0022', as it should.
13686
13687 2005-08-17  Bruno Haible  <bruno@clisp.org>
13688
13689         * modules/strstr (Files): Add m4/mbrtowc.m4.
13690         (Depends-on): Add mbuiter.
13691
13692 2005-08-17  Bruno Haible  <bruno@clisp.org>
13693
13694         * modules/strcasestr: New file.
13695         * MODULES.html.sh (String handling, based on ANSI C 89): Add
13696         strcasestr.
13697
13698 2005-08-17  Bruno Haible  <bruno@clisp.org>
13699
13700         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
13701
13702 2005-08-17  Bruno Haible  <bruno@clisp.org>
13703
13704         * modules/mbuiter: New file.
13705         * MODULES.html.sh (Extended multibyte and wide character utilities):
13706         Add mbuiter.
13707
13708 2005-08-17  Bruno Haible  <bruno@clisp.org>
13709
13710         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
13711         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
13712
13713 2005-08-17  Bruno Haible  <bruno@clisp.org>
13714
13715         * m4/strcasestr.m4: New file.
13716
13717 2005-08-17  Bruno Haible  <bruno@clisp.org>
13718
13719         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
13720         * lib/strstr.c: Completely rewritten, with multibyte locale support.
13721
13722 2005-08-17  Bruno Haible  <bruno@clisp.org>
13723
13724         * lib/strcasestr.h: New file.
13725         * lib/strcasestr.c: New file.
13726
13727 2005-08-17  Bruno Haible  <bruno@clisp.org>
13728
13729         * lib/strcasecmp.c: Use mbuiter.h.
13730
13731 2005-08-17  Bruno Haible  <bruno@clisp.org>
13732
13733         * lib/mbuiter.h: New file.
13734
13735 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13736
13737         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
13738         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
13739         and gl_GETOPT are both invoked via different paths (as happens
13740         with GNU tar CVS because it uses both argp and getopt), the former
13741         wins.
13742
13743 2005-08-16  Bruno Haible  <bruno@clisp.org>
13744
13745         * modules/tls: New file.
13746         * MODULES.html.sh (Multithreading): Add tls.
13747
13748 2005-08-16  Bruno Haible  <bruno@clisp.org>
13749
13750         * modules/strnlen1: New file.
13751         * MODULES.html.sh (String handling): Add strnlen1.
13752
13753 2005-08-16  Bruno Haible  <bruno@clisp.org>
13754
13755         * modules/strcase (Files): Add m4/mbrtowc.m4.
13756         (Depends-on): Add strnlen1, mbchar.
13757
13758 2005-08-16  Bruno Haible  <bruno@clisp.org>
13759
13760         * modules/mbiter: New file.
13761         * MODULES.html.sh (Extended multibyte and wide character utilities):
13762         Add mbiter.
13763
13764 2005-08-16  Bruno Haible  <bruno@clisp.org>
13765
13766         * modules/mbfile: New file.
13767         * MODULES.html.sh (Extended multibyte and wide character utilities):
13768         Add mbfile.
13769
13770 2005-08-16  Bruno Haible  <bruno@clisp.org>
13771
13772         * modules/mbchar: New file.
13773         * MODULES.html.sh (Extended multibyte and wide character utilities):
13774         New section.
13775
13776 2005-08-16  Bruno Haible  <bruno@clisp.org>
13777
13778         * m4/tls.m4: New file, from GNU gettext.
13779
13780 2005-08-16  Bruno Haible  <bruno@clisp.org>
13781
13782         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
13783         always.
13784         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
13785
13786 2005-08-16  Bruno Haible  <bruno@clisp.org>
13787
13788         * m4/mbiter.m4: New file.
13789
13790 2005-08-16  Bruno Haible  <bruno@clisp.org>
13791
13792         * m4/mbfile.m4: New file.
13793
13794 2005-08-16  Bruno Haible  <bruno@clisp.org>
13795
13796         * m4/mbchar.m4: New file.
13797
13798 2005-08-16  Bruno Haible  <bruno@clisp.org>
13799
13800         * lib/tls.h: New file, from GNU gettext.
13801         * lib/tls.c: New file, from GNU gettext.
13802
13803 2005-08-16  Bruno Haible  <bruno@clisp.org>
13804
13805         * lib/strnlen1.h: New file.
13806         * lib/strnlen1.c: New file.
13807
13808 2005-08-16  Bruno Haible  <bruno@clisp.org>
13809
13810         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
13811         (mbi_init): Update.
13812         (mbi_avail, mbi_advance): Let the iteration end before the terminating
13813         NUL byte, not after it.
13814
13815 2005-08-16  Bruno Haible  <bruno@clisp.org>
13816
13817         * lib/strcase.h (strcasecmp): Add note in comments.
13818         * lib/strncasecmp.c: Use code from strcasecmp.c.
13819         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
13820         (strcasecmp): Work correctly in multibyte locales.
13821
13822 2005-08-16  Bruno Haible  <bruno@clisp.org>
13823
13824         * lib/mbiter.h: New file.
13825
13826 2005-08-16  Bruno Haible  <bruno@clisp.org>
13827
13828         * lib/mbfile.h: New file.
13829
13830 2005-08-16  Bruno Haible  <bruno@clisp.org>
13831
13832         * lib/mbchar.h: New file.
13833         * lib/mbchar.c: New file.
13834
13835 2005-08-16  Bruno Haible  <bruno@clisp.org>
13836
13837         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
13838         the valid ones. Makes the comparison operations transitive:
13839         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
13840         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
13841
13842 2005-08-15  Simon Josefsson  <jas@extundo.com>
13843
13844         * modules/ssize_t (License): Change to 'unlimited'.
13845
13846         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
13847
13848 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13849
13850         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
13851         Add comments for each pending glibc patch.
13852
13853 2005-08-15  Bruno Haible  <bruno@clisp.org>
13854
13855         * lib/regex.h (__restrict_arr): Don't define to __restrict if
13856         __cplusplus is defined.
13857
13858 2005-08-14  Jim Meyering  <jim@meyering.net>
13859
13860         Sync from coreutils.
13861
13862         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
13863         Use the hash-table-based cycle-detection code not just when
13864         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
13865         Reported by James Youngman in
13866         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
13867         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
13868         FTS_TIGHT_CYCLE_CHECK.
13869         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
13870         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
13871         once again.
13872         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
13873         * lib/fts.c (fd_safer): Remove decl.
13874         Include fcntl--.h rather than unistd-safer.h
13875         (fts_safe_changedir): Don't call fd_safer; no longer needed
13876         now that we include fcntl--.h.
13877
13878 2005-08-12  Simon Josefsson  <jas@extundo.com>
13879
13880         * modules/getndelim2: Use ssize_t module.
13881         * modules/getnline: Likewise.
13882         * modules/safe-read: Likewise.
13883         * modules/xreadlink: Likewise.
13884
13885         * modules/ssize_t: New file.
13886
13887 2005-08-12  Simon Josefsson  <jas@extundo.com>
13888
13889         * m4/readline.m4: Look for termcap, curses or ncurses if required.
13890
13891 2005-08-12  Simon Josefsson  <jas@extundo.com>
13892
13893         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13894         ssize_t.
13895
13896 2005-08-12  Simon Josefsson  <jas@extundo.com>
13897
13898         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
13899         readline, getdelim and check_version.
13900         (Support for systems lacking ISO C 99: Sizes of integer types):
13901         Add size_max.
13902
13903 2005-08-12  Bruno Haible  <bruno@clisp.org>
13904
13905         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
13906
13907 2005-08-11  Simon Josefsson  <jas@extundo.com>
13908
13909         * modules/readline: New file.
13910
13911         * modules/strnlen (Files): Add strnlen.h.
13912
13913 2005-08-11  Simon Josefsson  <jas@extundo.com>
13914
13915         * m4/readline.m4: New file.
13916
13917 2005-08-11  Simon Josefsson  <jas@extundo.com>
13918
13919         * lib/readline.h, readline.c: New file.
13920
13921 2005-08-11  Simon Josefsson  <jas@extundo.com>
13922
13923         * doc/gnulib.texi (Initial import, Finishing touches): Mention
13924         gl_AVOID.
13925
13926 2005-08-11  Bruno Haible  <bruno@clisp.org>
13927
13928         * lib/strnlen.h (strnlen): Change parameter name to match comment.
13929
13930 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
13931
13932         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
13933
13934 2005-08-10  Simon Josefsson  <jas@extundo.com>
13935
13936         * tests/test-iconvme.c: New file.
13937
13938 2005-08-10  Simon Josefsson  <jas@extundo.com>
13939
13940         * m4/strnlen.m4: New file.
13941
13942         * m4/strndup.m4: Don't check for strnlen declaration, done in
13943         strnlen.m4.
13944
13945 2005-08-10  Simon Josefsson  <jas@extundo.com>
13946
13947         * lib/strndup.c: Use strnlen.h.
13948
13949         * lib/strnlen.h: New file.
13950
13951 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13952
13953         * README: Typos.
13954
13955 2005-08-02  Simon Josefsson  <jas@extundo.com>
13956
13957         * modules/readline: New file.
13958
13959 2005-08-02  Simon Josefsson  <jas@extundo.com>
13960
13961         * modules/getdelim: New file.
13962
13963         * modules/getline: Rewrite, don't use getndelim2.
13964
13965 2005-08-02  Simon Josefsson  <jas@extundo.com>
13966
13967         * m4/getline.m4: Separate out getdelim stuff into separate module.
13968
13969         * m4/getdelim.m4: New file.
13970
13971 2005-08-02  Simon Josefsson  <jas@extundo.com>
13972
13973         * lib/getline.h, getline.c: Rewrite.
13974
13975         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
13976
13977 2005-07-31  Bruno Haible  <bruno@clisp.org>
13978
13979         * lib/lock.h (gl_lock_initializer): New macro.
13980         (gl_lock_define_initialized): Use it.
13981         (gl_rwlock_initializer): New macro.
13982         (gl_rwlock_define_initialized): Use it.
13983         (gl_recursive_lock_initializer): New macro.
13984         (gl_recursive_lock_define_initialized): Use it.
13985
13986 2005-07-30  Karl Berry  <karl@gnu.org>
13987
13988         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
13989         Report from Ben Pfaff, regarding getopt.
13990
13991 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
13992
13993         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
13994         normal way.
13995         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
13996         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
13997         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
13998         (gl_GETOPT): Use the new macros.  Most of the implementation
13999         is moved to the new macros.  This is for programs like Emacs
14000         that don't want all the functionality of gl_GETOPT.
14001
14002 2005-07-26  Bruno Haible  <bruno@clisp.org>
14003
14004         * m4/lock.m4: Update from GNU gettext.
14005
14006 2005-07-26  Bruno Haible  <bruno@clisp.org>
14007
14008         * lib/lock.h: Update from GNU gettext.
14009         * lib/lock.c: Update from GNU gettext.
14010
14011 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
14012
14013         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
14014         obsolescent AC_TRY_RUN.  Include the default includes files, for
14015         'exit'.
14016
14017 2005-07-24  Bruno Haible  <bruno@clisp.org>
14018
14019         * modules/visibility: New file.
14020         * MODULES.html.sh (Misc): Add visibility.
14021
14022 2005-07-24  Bruno Haible  <bruno@clisp.org>
14023
14024         * m4/visibility.m4: New file.
14025
14026 2005-07-24  Bruno Haible  <bruno@clisp.org>
14027
14028         * doc/visibility.texi: New file.
14029
14030 2005-07-22  Bruno Haible  <bruno@clisp.org>
14031
14032         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
14033         $(ALLOCA_H), redundant through BUILT_SOURCES.
14034         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
14035         redundant through BUILT_SOURCES.
14036         * modules/byteswap (Makefile.am): Remove explicit dependency on
14037         $(BYTESWAP_H), redundant through BUILT_SOURCES.
14038         * modules/fnmatch (Makefile.am): Remove explicit dependency on
14039         $(FNMATCH_H), redundant through BUILT_SOURCES.
14040         * modules/getopt (Makefile.am): Remove explicit dependency on
14041         $(GETOPT_H), redundant through BUILT_SOURCES.
14042         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
14043         redundant through BUILT_SOURCES.
14044         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
14045         redundant through BUILT_SOURCES.
14046         * modules/stdbool (Makefile.am): Remove explicit dependency on
14047         $(STDBOOL_H), redundant through BUILT_SOURCES.
14048         * modules/stdint (Makefile.am): Remove explicit dependency on
14049         $(STDINT_H), redundant through BUILT_SOURCES.
14050         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
14051         Remove explicit dependency on $(SYSEXITS_H).
14052         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
14053
14054 2005-07-18  Simon Josefsson  <jas@extundo.com>
14055
14056         * lib/check-version.c (check_version): Accept identical versions too.
14057
14058 2005-07-18  Bruno Haible  <bruno@clisp.org>
14059
14060         * modules/lock: New file.
14061         * MODULES.html.sh (Multithreading): New section.
14062
14063 2005-07-18  Bruno Haible  <bruno@clisp.org>
14064
14065         * m4/lock.m4: New file, from GNU gettext.
14066
14067 2005-07-18  Bruno Haible  <bruno@clisp.org>
14068
14069         * lib/lock.h: New file, from GNU gettext.
14070         * lib/lock.c: New file, from GNU gettext.
14071
14072 2005-07-18  Bruno Haible  <bruno@clisp.org>
14073
14074         * lib/lock.h (gl_once_t): New type.
14075         (gl_once_define, gl_once): New macros.
14076         * lib/lock.c (fresh_once): New variable.
14077         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
14078         functions.
14079
14080 2005-07-16  Simon Josefsson  <jas@extundo.com>
14081
14082         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
14083         workaround, suggested by Bruno.
14084
14085 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14086
14087         * modules/xalloc (Depends-on): Add xalloc-die.
14088         * modules/xvasprintf (Depends-on): Add xalloc-die.
14089
14090 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14091
14092         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
14093         with a minor change.
14094
14095 2005-07-15  Bruno Haible  <bruno@clisp.org>
14096
14097         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
14098         When using lib/poll.c, define poll as rpl_poll.
14099
14100 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
14101
14102         * modules/argp (Depends-on): Remove unlocked-io.
14103
14104 2005-07-14  Derek Price  <derek@ximbiot.com>
14105
14106         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
14107         for glob symlink bug.
14108
14109 2005-07-14  Bruno Haible  <bruno@clisp.org>
14110
14111         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
14112         Instead, test for *_unlocked function declarations directly.
14113
14114 2005-07-11  Simon Josefsson  <jas@extundo.com>
14115
14116         * modules/size_max: New file.
14117
14118         * modules/xsize: Depend on size_max module for size_max.m4.
14119
14120 2005-07-11  Simon Josefsson  <jas@extundo.com>
14121
14122         * lib/size_max.h: New file.
14123
14124 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
14125
14126         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
14127         copyright symbol and the year.
14128         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
14129         (version_etc_va): Use parameterized copyright notice.
14130         Reword to conform to the current GNU coding standards.
14131
14132 2005-07-11  Karl Berry  <karl@gnu.org>
14133
14134         * doc/gnulib.texi (Quoting): new node.
14135         (Initial import): more info, from Patrice.
14136
14137 2005-07-11  Bruno Haible  <bruno@clisp.org>
14138
14139         * gnulib-tool (func_usage): Document option --avoid.
14140         (Command line options): Handle --avoid.
14141         (func_acceptable): New function.
14142         (func_modules_transitive_closure): Use it.
14143
14144 2005-07-11  Bruno Haible  <bruno@clisp.org>
14145
14146         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
14147         Reported by Jim Meyering.
14148
14149 2005-07-10  Bruno Haible  <bruno@clisp.org>
14150
14151         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
14152         Needed when size_t is smaller than 'unsigned int'.
14153         Reported by Paul Eggert.
14154
14155 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14156
14157         * modules/argp (Depends-on): Add unlocked-io
14158
14159 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14160
14161         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
14162         block of defines.
14163
14164 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
14165
14166         * config/srclist.txt: Comment out regcomp.c, since we have a porting
14167         fix now.
14168
14169 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
14170         and Paul Eggert  <eggert@cs.ucla.edu>
14171
14172         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
14173         in wint_t, not wchar_t.  Remove now-unnecessary cast.
14174
14175 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14176
14177         * modules/regex (Files): Add lib/regex_internal.c,
14178         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
14179         (Depends-on): Add extensions.
14180         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
14181
14182 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14183
14184         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
14185         pathconf.
14186         * m4/same.m4 (gl_SAME): Likewise.
14187         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
14188
14189         * m4/regex.m4: Adjust to new libc regex implementation.
14190         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
14191         all the .c and .h parts of (the new) regex.
14192         Quote the m4 stuff better.
14193         Check for RE_ICASE bug of old gnulib.
14194         Check for REG_STARTEND of recent libc.
14195         Rename local variables from jm_* to gl_*.
14196         Quote operand of "test -f".
14197         Say "recent enough" version of libc, not "version 2".
14198         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
14199         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
14200         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
14201         Remove check for btowc, isascii.
14202         Require AM_LANGINFO_CODESET.
14203
14204 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14205
14206         * lib/regex.c, regex.h: Sync from libc.
14207         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
14208         * lib/regexec.c:
14209         New files, synced from libc, except that regex_internal.h
14210         currently has a small porting fix.
14211
14212 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14213
14214         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
14215         regex_internal.c, regexec.c.
14216         Add regex_internal.h too, but as a comment, since the libc version
14217         is currently broken in gnulib mode.
14218
14219 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14220
14221         Support programs like Emacs that use gnulib but not gettext.
14222         * MODULES.html.sh (Internationalization functions): Add gettext-h.
14223         * modules/gettext-h: New file.
14224         * modules/gettext (Files): Remove lib/gettext.h.
14225         (Depends-on): Add gettext-h.
14226         (Makefile.am): Remove lib_SOURCES.
14227         * modules/argmatch, modules/c-stack, modules/closeout:
14228         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
14229         * modules/execute, modules/file-type, modules/getaddrinfo:
14230         * modules/getopt, modules/human, modules/javacomp:
14231         * modules/javaexec, modules/mkdir-p, modules/obstack:
14232         * modules/openat, modules/pagealign_alloc, modules/pipe:
14233         * modules/quotearg, modules/regex, modules/rpmatch:
14234         * modules/unicodeio, modules/userspec, modules/version-etc:
14235         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
14236         * modules/xsetenv:
14237         Depend on gettext-h, not gettext.
14238
14239 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14240
14241         * gnulib-tool (func_import): Add support for 'public domain' license.
14242         * modules/alloca, modules/atexit, modules/memmove:
14243         Now public domain, not GPL.
14244         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
14245         * modules/realloc, modules/strerror, modules/strtod:
14246         Now LGPL, not GPL.
14247
14248 2005-07-05  Bruno Haible  <bruno@clisp.org>
14249
14250         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
14251         autoconf CVS. Needed for mingw.
14252
14253 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14254
14255         Remove the dependency of the strftime module on the tzset module.
14256         * modules/strftime (Depends-on): Remove dependency on tzset.
14257
14258 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14259
14260         Remove the dependency of the strftime module on the tzset module.
14261         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
14262         gl_FUNC_TZSET_CLOBBER.
14263
14264 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14265
14266         Remove the dependency of the strftime module on the tzset module.
14267         * lib/strftime.c (my_strftime)
14268         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
14269         Copy the input structure, to work around some of the bug with
14270         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
14271         Solaris releases, you should also use the tzset module, but we won't
14272         require it as a dependency any more since we don't want LGPLed code
14273         to depend on GPLed code.
14274
14275 2005-07-02  Jim Meyering  <jim@meyering.net>
14276
14277         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
14278         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
14279         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
14280         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
14281
14282 2005-07-02  Jim Meyering  <jim@meyering.net>
14283
14284         * lib/backupfile.c (backup_args): Change a `0' to NULL.
14285
14286 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14287
14288         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
14289         declares only 'struct timespec;' (!).
14290
14291 2005-07-01  Jim Meyering  <jim@meyering.net>
14292
14293         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
14294         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
14295         * lib/save-cwd.c, tempname.c:
14296         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
14297         and don't include <sys/file.h>).
14298
14299 2005-06-29  Jim Meyering  <jim@meyering.net>
14300
14301         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
14302         type name.  Use the variable name instead.
14303         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
14304         Likewise.
14305
14306 2005-06-28  Simon Josefsson  <jas@extundo.com>
14307
14308         * modules/check-version (Files): Add check-version.m4.
14309
14310 2005-06-28  Simon Josefsson  <jas@extundo.com>
14311
14312         * m4/check-version.m4: New file, suggested by Jim Meyering
14313         <jim@meyering.net>.
14314
14315 2005-06-28  Simon Josefsson  <jas@extundo.com>
14316
14317         * lib/check-version.h, lib/check-version.c: New files.
14318
14319 2005-06-28  Simon Josefsson  <jas@extundo.com>
14320
14321         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
14322         collision with global variable.  Better indentation.  Don't
14323         increment buffer pointer beyond buffer end.  Based on comments
14324         from Paul Eggert <eggert@cs.ucla.edu>.
14325
14326         * lib/base64.h: Indent.
14327
14328 2005-06-28  Simon Josefsson  <jas@extundo.com>
14329
14330         * doc/gnulib.texi (Library version handling): New section.
14331
14332 2005-06-28  Jim Meyering  <jim@meyering.net>
14333
14334         * check-module (find_included_lib_files): Hard-code another
14335         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
14336         but modules/fts-lgpl (correctly) does not list those files.
14337
14338         * modules/canonicalize (Files): Add lib/pathmax.h.
14339
14340 2005-06-25  Simon Josefsson  <jas@extundo.com>
14341
14342         * modules/check-version: New file.
14343
14344 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
14345
14346         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
14347         initializer of struct addrinfo, as an indication that we don't
14348         care how many members the structure has.
14349
14350 2005-06-24  Derek Price  <derek@ximbiot.com>
14351         and Bruno Haible  <bruno@clisp.org>
14352
14353         Remove stat module & update lstat.
14354         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
14355         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
14356         * m4/stat.m4: Remove this file.
14357
14358 2005-06-24  Derek Price  <derek@ximbiot.com>
14359         and Bruno Haible  <bruno@clisp.org>
14360
14361         Remove stat module & update lstat.
14362         * lib/stat.c: Remove this file...
14363         (slash_aware_lstat): ...moving this content and its support...
14364         * lib/lstat.c (rpl_lstat): ...into here.
14365         * lib/lstat.h: New file.
14366
14367 2005-06-24  Derek Price  <derek@ximbiot.com>
14368         and Bruno Haible  <bruno@clisp.org>
14369
14370         Remove stat module & update lstat.
14371         * config/srclist.txt (libc sources): Remove stat.
14372
14373 2005-06-24  Derek Price  <derek@ximbiot.com>
14374         and Bruno Haible  <bruno@clisp.org>
14375
14376         Remove stat module & update lstat.
14377         * MODULES.html.sh (stat): Remove.
14378         * MODULES.html: Regenerated.
14379         * modules/lstat (Description): Correct function name.
14380         (Files): Add "lstat.h".
14381         (Depends-on): Remove stat, add xalloc, stat-macros.
14382         * modules/stat: Remove this file.
14383         (Include): Add "lstat.h", remove <sys/stat.h>.
14384
14385 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
14386
14387         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
14388         (ranged_convert): Don't save conversion in a temporary struct.
14389         This causes a warning with GCC 4.0.0, and anyway in the typical
14390         case it's not worth the extra 100 bytes or so of code.
14391         (ranged_convert, __mktime_internal): When calling a function via a
14392         pointer P, use P () rather than (*P) (), as we now assume C89 or
14393         better.
14394
14395 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14396
14397         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
14398         "who -r" failed to give output.  Problem reported by Tim Waugh.
14399
14400         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
14401         (xcalloc): Use it to avoid needless tests.
14402         Problem reported by Jim Meyering.
14403
14404 2005-06-20  Derek Price  <derek@ximbiot.com>
14405
14406         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
14407         unnecessary for Autoconfs > 2.59c.
14408
14409 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14410
14411         * lib/argp.h (__option_is_short): Check upper limit of
14412         __key. Isprint() requires its argument to have the value
14413         of an unsigned char or EOF.
14414
14415 2005-06-16  Jim Meyering  <jim@meyering.net>
14416
14417         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
14418         when either N or S is zero.
14419
14420 2005-06-16  Derek Price  <derek@ximbiot.com>
14421
14422         * m4/bison.m4: Declare YACC & YFLAGS precious.
14423
14424 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
14425
14426         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
14427         multibyte string or pattern, fall back on unibyte matching.
14428         Problem reported by James Youngman.
14429
14430 2005-06-08  Bruno Haible  <bruno@clisp.org>
14431
14432         * modules/csharpcomp: New file.
14433         * MODULES.html.sh (C#): Add csharpcomp.
14434
14435 2005-06-08  Bruno Haible  <bruno@clisp.org>
14436
14437         * m4/csharpcomp.m4: New file, from GNU gettext.
14438
14439 2005-06-08  Bruno Haible  <bruno@clisp.org>
14440
14441         * lib/csharpcomp.h: New file, from GNU gettext.
14442         * lib/csharpcomp.c: New file, from GNU gettext.
14443         * lib/csharpcomp.sh.in: New file, from GNU gettext.
14444
14445 2005-06-08  Bruno Haible  <bruno@clisp.org>
14446
14447         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
14448         warning on mingw.
14449
14450 2005-06-07  Derek Price  <derek@ximbiot.com>
14451
14452         Sync from CVS.
14453         * lib/glob_.h: Indent nested #ifdef.
14454
14455 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14456
14457         Sync from coreutils.
14458         Use "file name" when talking about file names, instead of "filename"
14459         or "path", as per the GNU coding standards.
14460         * lib/mkdir-p.c: Renamed from makepath.c.
14461         (make_dir_parents): Renamed from make_path.  All callers changed.
14462         * lib/mkdir-p.h: Likewise.  All includers changed.
14463         * lib/filenamecat.c: Renamed from path-concat.c.
14464         (file_name_concat): Renamed from path_concat.  All callers changed.
14465         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
14466         * lib/filenamecat.h: Likewise.  All includers changed.
14467         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
14468         in comments or local variable names.
14469         * lib/basename.c: Likewise.
14470         * lib/canonicalize.c, canonicalize.h: Likewise.
14471         * lib/dirname.c, dirname.h: Likewise.
14472         * lib/euidaccess.c: Likewise.
14473         * lib/exclude.c: Likewise
14474         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
14475         * lib/fsusage.c, fsuage.h: Likewise.
14476         * lib/fts.c, fts_.h: Likewise.
14477         * lib/getcwd.c: Likewise.
14478         * lib/getloadavg.c: Likewise.
14479         * lib/mkstemp.c: Likewise.
14480         * lib/mountlist.c, mountlist.h: Likewise.
14481         * lib/openat.c, openat.h: Likewise.
14482         * lib/readlink-stub.c: Likewise.
14483         * lib/readutmp.c, readutmp.h: Likewise.
14484         * lib/rename.c: Likewise.
14485         * lib/rmdir.c: Likewise.
14486         * lib/same.c: Likewise.
14487         * lib/savedir.c: Likewise.
14488         * lib/stripslash.c: Likewise.
14489         * lib/tempname.c: Likewise.
14490         * lib/xreadlink.c: Likewise.
14491         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
14492         All uses changed.
14493         * lib/exclude.h: Likewise.
14494
14495         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
14496         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14497         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
14498         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14499         * lib/pathmax.h: Include <limits.h> unconditionally, since other
14500         files have been getting away with it for years (MORE/BSD 4.3
14501         is extinct now).
14502         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
14503         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
14504
14505         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
14506         Define to 256, not 255, as per modern POSIX.
14507
14508 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14509
14510         Sync from coreutils.
14511         Use "file name" when talking about file names, instead of "filename"
14512         or "path", as per the GNU coding standards.
14513         * MODULES.html.sh: mkdir-p renamed from makepath.
14514         filenamecat renamed from path-concat.
14515         * modules/filenamecat: Renamed from modules/path-concat.
14516         (Files): filenamecat.h and filenamecat.c renamed from
14517         path-concat.h and path-concat.c.
14518         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
14519         (Include): filenamecat.h, not path-concat.h.
14520         * modules/mkdir-p: Renamed from modules/makepath.
14521         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
14522         makepath.c.
14523         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
14524         (Include): mkdir-p.h, not makepath.h.
14525
14526 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
14527
14528         Sync from coreutils.
14529         * m4/mkdir-p.m4: Renamed from makepath.m4.
14530         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
14531         Rename files from makepath.c to mkdir-p.c, and from
14532         makepath.h to mkdir-p.h.
14533         * m4/filenamecat.m4: Renamed from path-concat.m4.
14534         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
14535         Rename files from path-concat.c to filenamecat.c,
14536         and from path-concat.h to filenamecat.h.
14537         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
14538         "file name" in local variables or comments.
14539         * m4/rename.m4: Likewise.
14540
14541 2005-06-01  Bruno Haible  <bruno@clisp.org>
14542
14543         * modules/csharpexec: New file.
14544         * MODULES.html.sh (C#): New section.
14545
14546 2005-06-01  Bruno Haible  <bruno@clisp.org>
14547
14548         * m4/csharp.m4: New file, from GNU gettext.
14549         * m4/csharpexec.m4: New file, from GNU gettext.
14550
14551 2005-06-01  Bruno Haible  <bruno@clisp.org>
14552
14553         * lib/csharpexec.h: New file, from GNU gettext.
14554         * lib/csharpexec.c: New file, from GNU gettext.
14555         * lib/csharpexec.sh.in: New file, from GNU gettext.
14556
14557 2005-05-31  Derek Price  <derek@ximbiot.com>
14558             Paul Eggert  <eggert@cs.ucla.edu>
14559
14560         Sync from cvs.
14561         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14562
14563 2005-05-31  Derek Price  <derek@ximbiot.com>
14564             Paul Eggert  <eggert@cs.ucla.edu>
14565
14566         Sync from cvs.
14567         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
14568
14569 2005-05-29  Derek Price  <derek@ximbiot.com>
14570
14571         * config/srclist.txt (glob_.h, glob.c): Add these files.
14572
14573 2005-05-29  Derek Price  <derek@ximbiot.com>
14574
14575         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
14576         * modules/glob: New file.
14577         * modules/getlogin_r: Add link to POSIX spec in description.
14578
14579 2005-05-29  Derek Price  <derek@ximbiot.com>
14580             Paul Eggert  <eggert@cs.ucla.edu>
14581
14582         * m4/glob.m4: New file.
14583
14584 2005-05-29  Derek Price  <derek@ximbiot.com>
14585             Paul Eggert  <eggert@cs.ucla.edu>
14586
14587         * lib/glob_.h, lib/glob.c: New files.
14588
14589 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14590
14591         * modules/fts (Files): Remove m4/inttypes-pri.m4.
14592         * modules/fts-lgpl (Depends-on): Remove gettext.
14593
14594 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14595
14596         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
14597         and don't require gt_INTTYPES_PRI.
14598
14599 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
14600
14601         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
14602
14603         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
14604         the configuration hassle isn't worth it.
14605         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
14606         (LONGEST_MODIFIER, PRIuMAX): Remove.
14607
14608 2005-05-27  Bruno Haible  <bruno@clisp.org>
14609
14610         * lib/getlogin_r.h: Remove second include of <stddef.h>.
14611
14612 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
14613
14614         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
14615         _POSIX_PTHREAD_SEMANTICS for Solaris.
14616
14617 2005-05-25  Derek Price  <derek@ximbiot.com>
14618
14619         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
14620
14621 2005-05-25  Derek Price  <derek@ximbiot.com>
14622             Paul Eggert  <eggert@cs.ucla.edu>
14623
14624         * modules/getlogin_r, m4/getlogin_r.m4: New files.
14625         * lib/getlogin_r.c, getlogin_r.h: New files.
14626
14627 2005-05-25  Bruno Haible  <bruno@clisp.org>
14628             Derek Price  <derek@ximbiot.com>
14629
14630         * lib/getlogin_r.h: Simplify API documentation.
14631
14632 2005-05-23  Derek Price  <derek@ximbiot.com>
14633
14634         * modules/minmax (Files): Add m4/minmax.m4.
14635         (configure.ac): Add gl_MINMAX.
14636
14637 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14638
14639         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
14640         so that unistd-safer.h (GPL'ed code) need not be included.
14641
14642 2005-05-22  Bruno Haible  <bruno@clisp.org>
14643
14644         * m4/minmax.m4: New file.
14645         Based on a patch by Derek Price <derek@ximbiot.com>.
14646
14647 2005-05-22  Bruno Haible  <bruno@clisp.org>
14648
14649         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
14650         (INT64_MIN): Fix definition.
14651         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
14652
14653         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
14654         NEED_SIGNED_INT_TYPES.
14655
14656         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
14657         HAVE_SYSTEM_INTTYPES.
14658
14659 2005-05-22  Bruno Haible  <bruno@clisp.org>
14660
14661         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
14662         Also include <sys/param.h> if it defines MIN, MAX.
14663         Based on a patch by Derek Price <derek@ximbiot.com>.
14664
14665 2005-05-21  Jim Meyering  <jim@meyering.net>
14666
14667         * modules/fts (Files): Add m4/inttypes-pri.m4.
14668         (Depends-on): Add lstat and remove gettext.  Alphabetize.
14669
14670 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14671
14672         New fts module.
14673         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
14674         (setup_dir, free_dir): New functions.
14675         (enter_dir, leave_dir): Define trivial
14676         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
14677         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
14678         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
14679         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
14680         Move to fts-cycle.c.
14681         (fts_open): Use setup_dir.
14682         (fts_close): Use free_dir.
14683         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
14684         This adds a label and some gotos, but the alternatives were messier.
14685         Check for memory allocation failure when entering a dir.
14686         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
14687         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
14688         (FTS): New member fts_cycle, that is a union that contains the
14689         old active_dir_ht and cycle_state.  All uses changed to mention
14690         fts_cycle.ht and fts_cycle.state.
14691         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
14692         fts.c, with the following changes:
14693         (setup_dir, free_dir): New functions.
14694         (enter_dir): Now returns bool.  Return true if successful, false
14695         if memory exhausted.  All callers changed.
14696         Do not bother partly cleaning up on
14697         memory allocation failure; that is free_dir's job.
14698         However, free ad if hash_insert fails, to avoid memory leak.
14699         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
14700         fts->fts_options to see which union member to use.
14701
14702 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14703
14704         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
14705         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
14706
14707 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14708
14709         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
14710
14711 2005-05-20  Jim Meyering  <jim@meyering.net>
14712
14713         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
14714         Now a macro, to pacify GCC.
14715
14716 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14717
14718         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
14719         of -1.
14720
14721 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
14722
14723         * lib/chown.c (rpl_chown): Return -1 on failure.
14724
14725 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14726
14727         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
14728         Don't check for stddef.h.
14729         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
14730         don't use its results.
14731         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
14732         since we include them unconditionally.  Don't require
14733         AM_STDBOOL_H, since stdbool is a prerequisite.
14734         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
14735         since we assume C89 or better.
14736         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
14737         as we don't use their results.
14738         Don't check for fchdir, memmove, memset, strrchr, as we use
14739         them unconditionally.
14740         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
14741         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
14742
14743 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
14744
14745         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
14746         Include <stddef.h> unconditionally, since we assume C89 now.
14747         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
14748         * lib/fts.c: Include fts_.h first, to check interface.
14749         Do not include intprops.h; no longer needed.
14750         Include cycle-check.h and hash.h, since fts_.h no longer does.
14751         Remove unnecessary casts of closedir to void.
14752         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
14753         decide whether to decrement nlinks.
14754         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
14755         (FTS): Use struct hash_table * instead of Hash_table, so that
14756         we no longer need to include hash.h here.
14757
14758 2005-05-18  Jim Meyering  <jim@meyering.net>
14759
14760         * modules/dirfd (License): Change to LGPL.  Most of the code
14761         is already in the public domain.
14762
14763 2005-05-18  Jim Meyering  <jim@meyering.net>
14764
14765         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
14766         Reported by Yoann Vandoorselaere.
14767
14768 2005-05-17  Jim Meyering  <jim@meyering.net>
14769
14770         * m4/fts.m4: New file, from coreutils.
14771
14772 2005-05-17  Jim Meyering  <jim@meyering.net>
14773
14774         * lib/fts.c, lib/fts_.h: New files, from coreutils.
14775
14776 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14777
14778         Sync from coreutils.
14779         * m4/unlinkdir.m4: New file.
14780
14781 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14782
14783         Sync from coreutils.
14784         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
14785         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
14786         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
14787         White space changes only.
14788         * lib/makepath.c (make_path): Port to hosts where leading "//" is
14789         special.
14790         * lib/yesno.c: Include getline.h, not ctype.h.
14791         (yesno): Don't remove leading white space; POSIX doesn't allow it.
14792         Use getline to remove arbitrary restriction on response length.
14793
14794 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14795
14796         * config/srclist-update: Spell out "Street" in FSF postal
14797         mail address; this is the style the FSF seems to prefer.
14798
14799         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
14800         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
14801         this updates FSF postal mail address.
14802
14803         Sync from coreutils.
14804         * modules/unlinkdir: New file.
14805         * modules/yesno (Depends-on): Add getline.
14806         * MODULES.html.sh (File system functions): Add unlinkdir.
14807
14808 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14809
14810         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
14811         lib/strsep.h:
14812         Change the initial comment to refer to GPL, not LGPL.
14813         gnulib-tool will change it to LGPL as needed.
14814
14815         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
14816         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
14817         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
14818         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
14819         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
14820         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
14821         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
14822         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
14823         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
14824         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
14825         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
14826         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
14827         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
14828         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
14829         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
14830         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
14831         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
14832         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
14833         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
14834         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
14835         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
14836         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
14837         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
14838         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
14839         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
14840         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
14841         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
14842         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
14843         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
14844         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
14845         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
14846         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
14847         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
14848         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
14849         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
14850         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
14851         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
14852         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
14853         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
14854         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
14855         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
14856         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
14857         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
14858         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
14859         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
14860         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
14861         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
14862         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
14863         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
14864         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
14865         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14866         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
14867         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
14868         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
14869         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
14870         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
14871         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
14872         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
14873         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
14874         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
14875         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
14876         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
14877         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
14878         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
14879         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
14880         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
14881         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
14882         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
14883         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
14884         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
14885         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
14886         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
14887         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
14888         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
14889         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
14890         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
14891         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
14892         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
14893         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
14894         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
14895         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
14896         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
14897         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
14898         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
14899         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
14900         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
14901         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
14902         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
14903         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
14904         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
14905         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
14906         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
14907         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
14908         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
14909         lib/yesno.c, lib/yesno.h:
14910         Update FSF postal mail address.
14911
14912 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14913
14914         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
14915         tests/test-memmem.c, tests/test-stpncpy.c:
14916         Update FSF postal mail address.
14917
14918 2005-05-13  Bruno Haible  <bruno@clisp.org>
14919
14920         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
14921         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
14922         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
14923         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
14924         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
14925         Add support for 64-bit integers in the MSVC compiler.
14926
14927 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14928
14929         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
14930
14931 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
14932
14933         * gnulib-tool (func_import): Sort and uniquify recommended includes.
14934
14935 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14936
14937         * doc/getdate.texi (General date syntax): Don't say that date
14938         date --iso-8601=ns generates acceptable dates; it doesn't yet.
14939         Problem reported by Nic Ferrier.
14940
14941 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14942
14943         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
14944         specified in ai_socktype. Fix invalid ai_protocol
14945         check. ai_protocol is usually set to 0 or depending on
14946         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
14947         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
14948         ai_socktype / ai_protocol in the returned addrinfo structure.
14949
14950 2005-05-10  Simon Josefsson  <jas@extundo.com>
14951
14952         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
14953         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14954
14955 2005-05-10  Karl Berry  <karl@gnu.org>
14956
14957         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
14958         (from http://www.gnu.org/licenses).
14959         * doc/COPYING.LIB: also rename to COPYING.LESSER.
14960         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
14961         fdl.texi suffices.
14962
14963 2005-05-10  Karl Berry  <karl@gnu.org>
14964
14965         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
14966         (COPYING.DOC): remove.
14967
14968         * config/srclist-update: new FSF address.
14969
14970 2005-05-10  Derek Price  <derek@ximbiot.com>
14971
14972         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
14973         possible.
14974
14975 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14976             Bruno Haible  <bruno@clisp.org>
14977
14978         * modules/inet_ntop: New file.
14979         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14980         inet_ntop.
14981
14982 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14983             Bruno Haible  <bruno@clisp.org>
14984
14985         * m4/inet_ntop.m4: New file.
14986
14987 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14988             Bruno Haible  <bruno@clisp.org>
14989
14990         * lib/inet_ntop.h: New file.
14991         * lib/inet_ntop.c: New file, from glibc with modifications.
14992
14993 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
14994
14995         * modules/time_r (License): Change to LGPL.
14996         * modules/extensions (License): Change to LGPL.  Actually,
14997         the license is more permissive than that, but currently gnulib-tool
14998         doesn't know how to handle more-permissive licenses.
14999
15000         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
15001         Problem reported by Dave Love.
15002
15003 2005-05-08  Jim Meyering  <jim@meyering.net>
15004
15005         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
15006         blank.
15007
15008 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15009
15010         * modules/argmatch (Depends-on): Add stdbool.
15011         * modules/backupfile (Depends-on): Likewise.
15012         * modules/chdir-long (Depends-on): Likewise.
15013         * modules/closeout (Depends-on): Likewise.
15014         * modules/cycle-check (Depends-on): Likewise.
15015         * modules/dirname (Depends-on): Likewise.
15016         * modules/fnmatch (Depends-on): Likewise.
15017         * modules/fsusage (Depends-on): Likewise.
15018         * modules/fwriteerror (Depends-on): Likewise.
15019         * modules/getcwd (Depends-on): Likewise.
15020         * modules/getloadavg (Depends-on): Likewise.
15021         * modules/hard-locale (Depends-on): Likewise.
15022         * modules/makepath (Depends-on): Likewise.
15023         * modules/mountlist (Depends-on): Likewise.
15024         * modules/nanosleep (Depends-on): Likewise.
15025         * modules/posixtm (Depends-on): Likewise.
15026         * modules/quotearg (Depends-on): Likewise.
15027         * modules/readtokens (Depends-on): Likewise.
15028         * modules/readtokens0 (Depends-on): Likewise.
15029         * modules/readutmp (Depends-on): Likewise.
15030         * modules/save-cwd (Depends-on): Likewise.
15031         * modules/strftime (Depends-on): Likewise.
15032         * modules/userspec (Depends-on): Likewise.
15033         * modules/utimecmp (Depends-on): Likewise.
15034         * modules/xgetcwd (Depends-on): Likewise.
15035         * modules/xnanosleep (Depends-on): Likewise.
15036         * modules/xstrtod (Depends-on): Likewise.
15037         * modules/yesno (Depends-on): Likewise.
15038
15039 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
15040
15041         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
15042         needless checks.
15043
15044 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15045
15046         Merge from coreutils.  Among other things,
15047         add bulletproofing for cases where stdin, stdout, or stderr are closed.
15048         * lib/fd-safer.c: New file.
15049         * lib/fcntl-safer.h, open-safer.c: Remove.
15050         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
15051         * lib/dup-safer.c: Include unistd-safer.h first.
15052         Don't include errno.h.
15053         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
15054         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
15055         * lib/file-type.c: Rely on file-type.h change.
15056         * lib/getloadavg.c: Include unistd-safer.h.
15057         (getloadavg): Use safer open.
15058         * lib/getusershell.c: Include "stdio-safer.h".
15059         (getusershell): Use safer fopen.
15060         * lib/long-options.c (long_options): Use NULL rather than 0.
15061         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
15062         'free'.
15063         * lib/modechange.c: Likewise.
15064         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
15065         (MODE_DONE): New constant.
15066         (struct mode_change): Remove 'next' member.
15067         (make_node_op_equals): New function; like the old one of the
15068         same name, except it allocates an array.
15069         (mode_compile, mode_create_from_ref): Use it.
15070         (mode_compile): Allocate result as an array, not a linked list.
15071         Parse octal string ourself, so that we catch mistakes like "+0".
15072         (mode_adjust): Arg is an array, not a linked list.
15073         * lib/modechange.c: Include stat-macros.h, xalloc.h.
15074         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
15075         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
15076         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
15077         Remove.  This is now stat-macros.h's job.
15078         (talloc): Remove.  All callers replaced by xalloc, so that
15079         our invokers don't have to worry about reporting memory failures.
15080         (make_node_op_equals): Remove.
15081         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15082         New constants.
15083         (struct mode_change): Moved here from modechange.h.
15084         (mode_append_entry): Remove.
15085         (mode_compile): Remove MASKED_OPS arg, since it encouraged
15086         apps to have incorrect behavior.  Use simpler algorithm for head
15087         and tail.  Don't futz with umask; that's now the job of mode_adjust.
15088         Detect more invalid usages rather than having somewhat-random behavior.
15089         Don't insert an "a=" action, as that leads to incorrect behavior.
15090         (mode_compile, mode_create_from_ref): Return NULL on error instead
15091         of an enum, since now there's only one way to have an error.  All
15092         callers changed.
15093         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
15094         at the correct time.  Simplify calculation of "+u" and its ilk.
15095         Don't mishandle "+X".
15096         (mode_free): Remove "register" and localize decls.
15097         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15098         (struct mode_change): Move to modechange.c; callers don't
15099         need to see this stuff.
15100         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
15101         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
15102         (mode_change, mode_adjust): Reflect the new signatures noted above.
15103         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
15104         that might redefine system include files.
15105         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
15106         (my_usleep): Use NULL rather than (void *) 0.
15107         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
15108         Use siginterrupt to specify that system calls should be interrupted.
15109         (rpl_nanosleep): Move initialization of suspended closer to call of
15110         my_usleep.
15111         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
15112         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
15113         (desirable_utmp_entry): New function.
15114         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
15115         using x2nrealloc, to simplify logic.
15116         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
15117         size calculation.  Do not assume utmp file is a regular file.
15118         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
15119         (READ_UTMP_CHECK_PIDS): New constant.
15120         * lib/save-cwd.c: Include unistd-safer.h.
15121         (save_cwd): Use fd_safer.
15122         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
15123         [!_LIBC] Include "stat-macros.h" instead.
15124         * lib/unistd-safer.h (fd_safer): New decl.
15125
15126 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15127
15128         * modules/getloadavg (Depends-on): Add unistd-safer.
15129         * modules/getusershell (Depends-on): Add stdio-safer.
15130         * modules/lstat (Depends-on): Remove xalloc.
15131         * modules/mkstemp (Depends-on): Add stat-macros.
15132         * modules/modechange (Depends-on): Remove xstrtol.
15133         Add stat-macros, xalloc.
15134         * modules/save-cwd (Depends-on): Add unistd-safer.
15135         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
15136         * modules/unistd-safer (Files): Add lib/fd-safer.c
15137         (Makefile.am): Remove lib_SOURCES.
15138
15139         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
15140         Remove fcntl-safer; unistd-safer supersedes it.
15141
15142 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15143
15144         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
15145         AC_HEADER_STAT.
15146         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
15147         (gl_PREREQ_CHOWN): Remove.
15148         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
15149         it.  Don't require AC_HEADER_STAT.
15150         (gl_PREREQ_LSTAT): Remove.
15151         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
15152         Don't require AC_HEADER_STAT.
15153         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
15154         (gl_PREREQ_RMDIR): Remove.
15155         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
15156         mention stat-macros.h or AC_HEADER_STAT, since we'll make
15157         the stat-macros module a prerequisite.
15158         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
15159         * m4/filemode.m4 (gl_FILEMODE): Likewise.
15160         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
15161         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
15162         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
15163         variable names.
15164         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
15165         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
15166         variable prefixes.
15167         * m4/fcntl-safer.m4: Remove.
15168         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
15169         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
15170         Invoke gl_PREREQ_FD_SAFER.
15171         (gl_PREREQ_FD_SAFER): New macro.
15172         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
15173         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
15174         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
15175         Remove duplicate call to AC_LIBOBJ(readutmp).
15176         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
15177
15178         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
15179         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
15180
15181 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15182
15183         * MODULES.html.sh (Misc): Add byteswap.
15184
15185 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15186
15187         * modules/getcwd (Depends-on): Add extensions.
15188         * modules/openat (Depends-on): Likewise.
15189
15190 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15191
15192         * modules/byteswap: New file.
15193
15194 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15195
15196         * m4/byteswap.m4: New file.
15197
15198 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15199
15200         * lib/byteswap_.h: New file.
15201
15202 2005-04-25  Karl Berry  <karl@gnu.org>
15203
15204         * m4/gettext.m4: Update from GNU gettext 0.14.4.
15205
15206 2005-04-25  Albert Chin  <china@thewrittenword.com>
15207
15208         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
15209         Toolkit C bug.
15210
15211 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
15212
15213         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
15214         (func_ln_if_changed) Remove forcibly for no error message
15215         in case file does not exist.
15216
15217 2005-04-19  Simon Josefsson  <jas@extundo.com>
15218
15219         * gnulib-tool (Options): Make --symlink mean --symbolic.
15220
15221 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
15222
15223         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
15224
15225 2005-04-16  Simon Josefsson  <jas@extundo.com>
15226
15227         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
15228
15229 2005-04-15  Simon Josefsson  <jas@extundo.com>
15230
15231         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
15232
15233 2005-04-15  Simon Josefsson  <jas@extundo.com>
15234
15235         * gnulib-tool: Rename --symlink to --symbolic.
15236
15237 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
15238
15239         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
15240         symbolic links to files instead of copying/moving.  Add --aux-dir,
15241         specifying directory relative --dir where auxiliary build tools
15242         are placed.
15243
15244 2005-04-14  Bruno Haible  <bruno@clisp.org>
15245
15246         * modules/allocsa (License): Change to LGPL.
15247         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
15248
15249 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15250
15251         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
15252         that "UTC +1 second" continues to work.  Problem reported
15253         by Dmitry V. Levin.
15254         (relunit_snumber): New rule.
15255         (relunit): Use it.
15256
15257 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
15258
15259         * lib/getdate.y (universal_time_zone_table): New constant.
15260         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
15261         universal_time_zone_table.
15262         (lookup_zone): Prefer universal_time_zone_table to
15263         local_time_zone_table, so that "GMT" time stamps are allowed in
15264         London during the summer.  Problem reported by Ian Abbott.
15265
15266 2005-04-12  Jim Meyering  <jim@meyering.net>
15267
15268         * lib/human.c (humblock): Set *options even when returning due to
15269         xstrtoumax conversion failure.  Thanks to a used-uninitialized
15270         warning from gcc-4.
15271
15272 2005-04-09  Jim Meyering  <jim@meyering.net>
15273
15274         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
15275         -Wuninitialized: initialize tm0.tm_year.
15276
15277 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
15278
15279         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
15280         count, since there's no maximum.  All uses changed.
15281         Add member dsts_seen.
15282         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
15283         not being INT_MAX.
15284         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
15285         Use pc_rels_seen to decide whther a date is absolute.
15286
15287         * lib/getdate.y (number): Don't overwrite year.
15288         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
15289         check.
15290
15291 2005-04-02  Simon Josefsson  <jas@extundo.com>
15292
15293         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
15294         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
15295
15296 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
15297
15298         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
15299         where no absolute path name can be longer than PATH_MAX.
15300
15301 2005-03-27  Jim Meyering  <jim@meyering.net>
15302
15303         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
15304
15305 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
15306
15307         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
15308         "one's complement" -> "ones' complement" in comment, as per Knuth.
15309         "value of type" -> "type or expression" in comment.
15310         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
15311
15312 2005-03-26  Jim Meyering  <jim@meyering.net>
15313
15314         Comment nits.
15315         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
15316         Correct typos: s/or/of/.
15317
15318 2005-03-26  Jim Meyering  <jim@meyering.net>
15319
15320         * modules/check-include-files: Move to ../ and rename to...
15321         * check-module: ...this.
15322
15323 2005-03-25  Jim Meyering  <jim@meyering.net>
15324
15325         * modules/xvasprintf (Files): Add xalloc.h.
15326
15327 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
15328
15329         * modules/gettext (Files): config/config.rpath ->
15330         build-aux/config.rpath
15331         * modules/iconv (Files): Likewise.
15332         Problem reported by Oskar Liljeblad.
15333
15334 2005-03-23  Jim Meyering  <jim@meyering.net>
15335
15336         * modules/check-include-files: New script to check for
15337         missing dependencies, multiple includes, etc.
15338
15339         * modules/c-strtold (Depends-on): Add xalloc.
15340         * modules/c-strtod (Depends-on): Add xalloc.
15341         * modules/hash (Depends-on): Add xalloc.
15342         (Files): Remove lib/xalloc.h.
15343
15344         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
15345         * modules/userspec (Files): Add lib/inttostr.h.
15346
15347 2005-03-23  Jim Meyering  <jim@meyering.net>
15348
15349         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
15350
15351 2005-03-22  Jim Meyering  <jim@meyering.net>
15352
15353         * modules/stat-macros: New module.
15354         * modules/canonicalize, modules/euidaccess, modules/file-type,
15355         * modules/filemode, modules/lchown, modules/makepath,
15356         * modules/rmdir, modules/stat: Depend on new stat-macros module
15357         rather than listing lib/stat-macros.h manually.
15358         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
15359
15360 2005-03-22  Jim Meyering  <jim@meyering.net>
15361
15362         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
15363
15364 2005-03-22  Bruno Haible  <bruno@clisp.org>
15365
15366         * config/srclist.txt: Replace target directory 'config' with
15367         'build-aux'.
15368         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
15369         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
15370         ../build-aux/.
15371
15372 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
15373
15374         * modules/chdir-long (Depends-on): Add mempcpy.
15375
15376         * modules/acl, modules/backupfile, modules/c-strtod,
15377         modules/c-strtold, modules/canon-host, modules/canonicalize,
15378         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
15379         modules/exclude, modules/exitfail, modules/file-type,
15380         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
15381         modules/getdate, modules/getline, modules/getpagesize,
15382         modules/getpass, modules/getugroups, modules/group-member,
15383         modules/hard-locale, modules/hash, modules/human, modules/idcache,
15384         modules/inttostr, modules/long-options, modules/makepath,
15385         modules/md5, modules/memcasecmp, modules/memcoll,
15386         modules/modechange, modules/mountlist, modules/path-concat,
15387         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
15388         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
15389         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
15390         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
15391         modules/strftime, modules/strndup, modules/strverscmp,
15392         modules/timespec, modules/unlocked-io, modules/userspec,
15393         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
15394         modules/yesno:
15395         Remove lib_SOURCES line from Makefile.am section, as this is now
15396         done automatically by the corresponding Autoconf macro.
15397
15398 2005-03-21  Jim Meyering  <jim@meyering.net>
15399
15400         Changes imported from coreutils.
15401
15402         * lib/cycle-check.c: Don't include xalloc.h.
15403
15404         * lib/path-concat.c: Don't include assert.h.
15405         (path_concat): Remove assertion that would have triggered
15406         for ABASE starting with more than one slash.
15407         Reported by Andreas Schwab.
15408
15409         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
15410         properly when ABASE is an absolute file name.
15411         Correct the description of this function.
15412         Include <assert.h>.
15413         Add an assertion and a test driver.
15414         This fixes a bug introduced on 2004-07-02.
15415         Andreas Schwab reported the resulting failure of cp --parents:
15416         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
15417
15418 2005-03-21  Jim Meyering  <jim@meyering.net>
15419
15420         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
15421         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
15422
15423 2005-03-21  Jim Meyering  <jim@meyering.net>
15424         and  Paul Eggert  <eggert@cs.ucla.edu>
15425
15426         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
15427         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
15428         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
15429         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
15430         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
15431         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
15432         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
15433         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
15434         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
15435         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
15436         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
15437         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
15438         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
15439         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
15440         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
15441         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
15442         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
15443         for these modules.
15444
15445 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
15446
15447         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
15448         (which shouldn't happen), generate nothing instead of returning 0
15449         immediately, so that nstrftime (NULL, ...) doesn't return 0.
15450
15451 2005-03-16  Bruno Haible  <bruno@clisp.org>
15452
15453         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
15454         HAVE_LONGLONG_64BIT.
15455
15456 2005-03-16  Bruno Haible  <bruno@clisp.org>
15457
15458         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
15459         HAVE_LONGLONG_64BIT.
15460
15461 2005-03-16  Bruno Haible  <bruno@clisp.org>
15462
15463         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
15464         HAVE_LONGLONG_64BIT.
15465
15466 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15467
15468         * lib/strftime.c (my_strftime): Prepend space to format so that we can
15469         reliably distinguish strftime failure from empty output on POSIX
15470         hosts.
15471
15472 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
15473
15474         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
15475         (iconv_string): Don't guess a size-zero buffer, as that might cause
15476         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
15477         result would be 'too large', where 'too large' is (heuristically)
15478         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
15479         overflow concerns.  This will prevent some unwanted malloc failures
15480         when the inputs are very large.
15481
15482 2005-03-15  Karl Berry  <karl@gnu.org>
15483
15484         * config/srclist.txt (config.rpath): from gettext.
15485         * config/config.rpath: update.
15486
15487 2005-03-15  Bruno Haible  <bruno@clisp.org>
15488
15489         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
15490         to 'negate'.
15491
15492         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
15493         variable.
15494
15495         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
15496         results.
15497
15498 2005-03-14  Simon Josefsson  <jas@extundo.com>
15499
15500         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
15501         <fx@gnu.org>.
15502
15503 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
15504
15505         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
15506         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
15507         intprops.h.
15508         * lib/strtol.c: Likewise.
15509
15510 2005-03-14  Jim Meyering  <jim@meyering.net>
15511
15512         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
15513         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
15514         to be nonzero so that we (and caller) can detect the difference
15515         between a valid zero-length expansion and an error return, even
15516         when the underlying strftime fails before writing anything into
15517         that location.
15518
15519 2005-03-14  Bruno Haible  <bruno@clisp.org>
15520
15521         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
15522         Update from GNU gettext 0.14.3.
15523
15524 2005-03-10  Jim Meyering  <jim@meyering.net>
15525
15526         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
15527
15528 2005-03-10  Jim Meyering  <jim@meyering.net>
15529
15530         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
15531         so that this module works on systems without fchdir.
15532
15533 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15534
15535         Factor int-properties macros into a single file, except for
15536         glibc-related files.
15537         * lib/intprops.h: New file.
15538         * lib/getloadavg.c: Include it instead of limits.h.
15539         (INT_STRLEN_BOUND): Remove.
15540         * lib/human.c: Include intprops.h.
15541         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
15542         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
15543         302/1000.
15544         * lib/inttostr.h: Include intprops.h instead of limits.h.
15545         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
15546         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
15547         for consistency with intprops.h.
15548         (time_t_is_integer, twos_complement_arithmetic): Use them.
15549         * lib/sig2str.h: Include <signal.h>, intprops.h.
15550         (INT_STRLEN_BOUND): Remove.
15551         * lib/strftime.c (TYPE_SIGNED): Remove.
15552         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
15553         * lib/strtol.c: Adjust comments to match intprops.h.
15554         * lib/userspec.c: Include intprops.h.
15555         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
15556         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
15557         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
15558         instead of rolling our own expressions.
15559         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
15560
15561         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
15562         instead of int.
15563         (my_strftime): Do not mishandle years close to INT_MAX, by doing
15564         the right thing even if adding 1900 would overflow.  Similarly
15565         for tm_mon + 1 and tm_yday + 1.
15566         Make %Y always equivalent to %C%y, and similarly for %G and %g.
15567         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
15568         (DO_SIGNED_NUMBER): New macro.
15569         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
15570
15571 2005-03-07  Bruno Haible  <bruno@clisp.org>
15572
15573         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
15574
15575 2005-03-07  Bruno Haible  <bruno@clisp.org>
15576
15577         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
15578
15579 2005-03-04  Derek R. Price  <derek@ximbiot.com>
15580
15581         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
15582         (func_import): Only replace files via --import when they have actually
15583         changed.
15584
15585 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15586
15587         * m4/mmap-anon.m4: New file.
15588         * m4/pagealign_alloc.m4: New file.
15589
15590 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15591             Bruno Haible  <bruno@clisp.org>
15592
15593         * modules/pagealign_alloc: New file.
15594         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
15595
15596 2005-03-03  Derek R. Price  <derek@ximbiot.com>
15597             Bruno Haible  <bruno@clisp.org>
15598
15599         * lib/pagealign_alloc.h: New file.
15600         * lib/pagealign_alloc.c: New file.
15601
15602 2005-03-03  Bruno Haible  <bruno@clisp.org>
15603
15604         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
15605         Use an all-permissive copyright notice, recommended by RMS.
15606
15607 2005-03-02  Bruno Haible  <bruno@clisp.org>
15608
15609         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
15610         of AIX, the replacement has to be done only after <string.h> is
15611         included, therefore not in config.h. stpncpy.h does the replacement,
15612         and stpncpy.c uses it.
15613
15614 2005-03-02  Bruno Haible  <bruno@clisp.org>
15615
15616         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
15617         stpncpy.c uses it.
15618
15619 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15620
15621         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
15622         The workaround isn't strictly needed for POSIX conformance, and
15623         it's too much of a pain to configure and maintain.  We'll ask
15624         people to fix their kernels instead.
15625         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
15626         (NANOSLEEP_BUG_WORKAROUND): Remove.
15627         (xnanosleep): Remove the workaround.
15628
15629 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15630
15631         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
15632         Reported by Derek Price.
15633         (Include): Add "timespec.h".
15634
15635         * modules/xnanosleep (Depends-on): Remove gethrxtime.
15636
15637 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15638
15639         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
15640         to detect nanosleep bug.
15641
15642 2005-03-01  Bruno Haible  <bruno@clisp.org>
15643
15644         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
15645
15646 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15647
15648         * modules/gethrxtime: New file.
15649         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
15650         (Depends-on): Add gethrxtime.
15651         (configure.ac): Add gl_XNANOSLEEP.
15652         (Makefile.am): Remove lib_SOURCES line.
15653
15654 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15655
15656         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
15657         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
15658
15659 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15660
15661         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
15662         * lib/timespec.h (gettime): Return void, since it always
15663         succeeds now.  All uses changed.
15664         * lib/gettime.c (gettime) Likewise.
15665         [HAVE_NANOTIME]: Prefer nanotime.
15666         Assume gettimeofday succeeds, as POSIX requires.
15667         Assime time () succeeds, since other code already does.
15668         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
15669         (timespec_subtract): Remove.
15670         (NANOSLEEP_BUG_WORKAROUND): New constant.
15671         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
15672         things considerably.  Use it only on GNU/Linux hosts, since the
15673         workaround shouldn't be needed elsewhere.
15674
15675 2005-02-24  Bruno Haible  <bruno@clisp.org>
15676
15677         * modules/gettext (Files): Add m4/glibc2.m4.
15678
15679 2005-02-24  Bruno Haible  <bruno@clisp.org>
15680
15681         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
15682         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
15683         * m4/progtest.m4:
15684         Update from GNU gettext 0.14.2.
15685         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
15686
15687 2005-02-24  Bruno Haible  <bruno@clisp.org>
15688
15689         * lib/localcharset.c: Update from GNU gettext 0.14.2.
15690         * lib/config.charset: Update from GNU gettext 0.14.2.
15691
15692 2005-02-24  Bruno Haible  <bruno@clisp.org>
15693
15694         * lib/gettext.h: Update from GNU gettext 0.14.2.
15695
15696 2005-02-23  Simon Josefsson  <jas@extundo.com>
15697
15698         * m4/iconvme.m4: New file.
15699
15700 2005-02-23  Jim Meyering  <jim@meyering.net>
15701
15702         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
15703         change.
15704         Thanks to Bruno Haible for catching it.
15705
15706 2005-02-22  Simon Josefsson  <jas@extundo.com>
15707
15708         * modules/iconvme: New file.
15709
15710         * MODULES.html.sh: Add iconvme.
15711
15712 2005-02-22  Simon Josefsson  <jas@extundo.com>
15713
15714         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
15715
15716 2005-02-22  Simon Josefsson  <jas@extundo.com>
15717
15718         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
15719
15720 2005-02-22  Jim Meyering  <jim@meyering.net>
15721
15722         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
15723         s/ifndef/ifdef/.
15724
15725 2005-02-20  Neil Conway  <neilc@samurai.com>
15726
15727         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
15728         returned by OSX/Darwin if the specified buffer is not large
15729         enough for the hostname.
15730
15731 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15732
15733         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
15734         pass it to _help, otherwise the latter coredumps trying to
15735         dereference state.root_argp.
15736
15737 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15738
15739         * modules/chdir-long (Depends-on): Add memrchr.
15740         * modules/memrchr (Files): Add lib/memrchr.h.
15741         (Include): "memrchr.h".
15742
15743 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15744
15745         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
15746
15747 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
15748
15749         * lib/memrchr.h: New file.
15750         * lib/chdir-long.c: Include it.
15751         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
15752         Don't bother including stddef.h.
15753
15754 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
15755
15756         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
15757         inclusion.
15758         Include <sys/types.h>, for dev_t.
15759         (ME_DUMMY, ME_REMOTE): Move from here....
15760         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
15761         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
15762         Dmitry V. Levin.
15763         Include mountlist.h first, to test the interface.
15764
15765 2005-01-29  Bruno Haible  <bruno@clisp.org>
15766
15767         * lib/progname.c (program_name): Initialize.
15768         Needed when linking statically on MacOS X.
15769
15770 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15771
15772         Sync from coreutils.
15773         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
15774         (Depends-on): Add c-strtod.
15775         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
15776
15777 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
15778
15779         Sync from coreutils.
15780         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
15781
15782         Remove files that are specific to coreutils.
15783         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
15784
15785 2005-01-28  Bruno Haible  <bruno@clisp.org>
15786
15787         * modules/javacomp: New file.
15788         * MODULES.html.sh (Java): Add javacomp.
15789
15790 2005-01-28  Bruno Haible  <bruno@clisp.org>
15791
15792         * m4/javacomp.m4: New file, from GNU gettext.
15793
15794 2005-01-28  Bruno Haible  <bruno@clisp.org>
15795
15796         * lib/javacomp.sh.in: New file, from GNU gettext.
15797         * lib/javacomp.h: New file, from GNU gettext.
15798         * lib/javacomp.c: New file, from GNU gettext.
15799
15800 2005-01-26  Simon Josefsson  <jas@extundo.com>
15801
15802         * lib/gai_strerror.c: Use GPL in header.
15803
15804 2005-01-26  Bruno Haible  <bruno@clisp.org>
15805
15806         * modules/javaexec: New file.
15807         * MODULES.html.sh (Java): Add javaexec.
15808
15809 2005-01-26  Bruno Haible  <bruno@clisp.org>
15810
15811         * m4/javaexec.m4: New file, from GNU gettext.
15812
15813 2005-01-26  Bruno Haible  <bruno@clisp.org>
15814
15815         * lib/javaexec.sh.in: New file, from GNU gettext.
15816         * lib/javaexec.h: New file, from GNU gettext.
15817         * lib/javaexec.c: New file, from GNU gettext.
15818
15819 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15820
15821         * modules/lchown (Depends-on): Remove lchown.h
15822
15823 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15824
15825         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
15826         must be defined if the header file was not found, in order
15827         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
15828
15829 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15830
15831         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
15832         initializers for struct pentry_state.
15833         (__argp_error): Check return value of __asprintf
15834         (__argp_failure): Translate error message
15835
15836         * lib/argp-parse.c: Removed braces around the expansion of N_()
15837
15838 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15839
15840         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
15841         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
15842         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
15843         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
15844         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
15845         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
15846         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
15847         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
15848         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
15849         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
15850         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
15851         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
15852         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
15853         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
15854         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
15855         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
15856         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
15857         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
15858         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
15859         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
15860         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
15861         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
15862         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
15863         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
15864         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
15865         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
15866         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
15867         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
15868         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
15869         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
15870         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
15871         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
15872         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
15873         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
15874         xstrtol.m4, xstrtoumax.m4, yesno.m4:
15875         Use an all-permissive copyright notice, recommended by RMS.
15876
15877 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
15878
15879         * modules/chdir-long (Depends-on): Remove mempcpy.
15880
15881 2005-01-21  Jim Meyering  <jim@meyering.net>
15882
15883         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
15884         same value as for Solaris 9.
15885
15886         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
15887         component length.  This included changing the parameter to be
15888         of type `char *' rather than `char const *'.
15889         * lib/chdir-long.h (chdir_long): Update prototype.
15890
15891         * lib/openat.c (fdopendir, fstatat): New functions.
15892         * lib/openat.h: Include headers required for use of DIR and struct
15893         stat.
15894         [AT_SYMLINK_NOFOLLOW]: Define.
15895         (fdopendir, fstatat): Add prototypes.
15896
15897 2005-01-21  Bruno Haible  <bruno@clisp.org>
15898
15899         * modules/classpath: New file.
15900         * MODULES.html.sh (Java): Add classpath.
15901
15902 2005-01-21  Bruno Haible  <bruno@clisp.org>
15903
15904         * lib/classpath.h: New file, from GNU gettext.
15905         * lib/classpath.c: New file, from GNU gettext.
15906
15907 2005-01-20  Simon Josefsson  <jas@extundo.com>
15908
15909         * modules/version-etc-fsf: New file.
15910
15911 2005-01-20  Simon Josefsson  <jas@extundo.com>
15912
15913         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
15914         * lib/version-etc.c: Remove version_etc_copyright.
15915         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
15916         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
15917
15918 2005-01-20  Simon Josefsson  <jas@extundo.com>
15919
15920         * lib/base64.h (isbase64): Add.
15921
15922         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
15923         using a unsigned prototype, don't inline.
15924         (base64_decode): Use it.
15925
15926 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15927
15928         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
15929         it.
15930
15931 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15932
15933         * lib/save-cwd.c (save_cwd): Remove code to support the case
15934         where fchdir is missing or flaky.
15935
15936 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
15937
15938         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
15939
15940 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
15941
15942         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
15943         AC_LIBSOURCES now does this.
15944         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
15945         with new ullong_max module.
15946
15947 2005-01-19  Bruno Haible  <bruno@clisp.org>
15948
15949         * modules/sh-quote: New file.
15950         * MODULES.html.sh (Executing programs): Add sh-quote.
15951
15952 2005-01-19  Bruno Haible  <bruno@clisp.org>
15953
15954         * lib/sh-quote.h: New file, from GNU gettext.
15955         * lib/sh-quote.c: New file, from GNU gettext.
15956
15957 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15958
15959         Merge from coreutils.
15960         * m4/ullong_max.m4: New file.
15961         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
15962         (gl_MACROS): Assume localeconv exists.
15963
15964 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15965
15966         Merge changes from coreutils, as described below in several
15967         changelogs dated today.
15968
15969         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
15970         (O_DIRECTORY): Remove; not needed here, since "." must be
15971         a directory.  All uses removed.
15972         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
15973         universal on Suns, and we also need to test for IRIX.
15974         Revamp code to use 'if' rather than '#if'.
15975         Avoid unnecessary comparison of cwd->desc to 0.
15976
15977         * lib/utimens.c (futimens): Robustify the previous patch, by checking
15978         for known valid error numbers rather than observed invalid ones.
15979
15980 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
15981
15982         * modules/ullong_max: New file.
15983
15984         * modules/chdir-long, modules/openat: New files.
15985         * modules/save-cwd (Depends-on): Depend on chdir-long.
15986         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
15987
15988 2005-01-18  Jim Meyering  <jim@meyering.net>
15989
15990         Merge from coreutils.
15991         * m4/chdir-long.m4, m4/openat.m4: New files.
15992         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
15993         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
15994         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
15995         is sane and DOES follow symlinks.  Besides, testing 20 different
15996         systems found no broken chown implementations.
15997         Prompted by a change in rsync's copy of this macro.
15998         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
15999
16000         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
16001
16002         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
16003         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
16004         NULL-means-set-to-current-time semantics.
16005         Remove temporary file immediately, rather than waiting
16006         for configure's at-exit trap code to do it.
16007
16008 2005-01-18  Jim Meyering  <jim@meyering.net>
16009
16010         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16011
16012         * lib/utimens.c (futimens): Account for the fact that futimes
16013         can also fail with errno == ENOSYS or errno == ENOENT.
16014         Patch from Dmitry V. Levin.
16015
16016         Change the name of the robust chdir function from chdir to chdir_long.
16017         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
16018         (restore_cwd): Use chdir_long, not chdir.
16019         * lib/chdir-long.c: Renamed from chdir.c.
16020         * lib/chdir-long.h: Renamed from chdir.h.
16021         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
16022         Hurd.
16023
16024 2005-01-18  Bruno Haible  <bruno@clisp.org>
16025
16026         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
16027         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
16028         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
16029         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
16030         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
16031         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
16032         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
16033         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
16034         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
16035         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
16036         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
16037         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
16038         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
16039         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
16040         Use an all-permissive copyright notice, recommended by RMS.
16041
16042 2005-01-18  Bob Proulx  <bob@proulx.com>
16043
16044         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
16045         simplify offsetof() macro construct to avoid compile failure with
16046         native HP-UX 11.0 ANSI C compiler.
16047
16048 2005-01-17  Bruno Haible  <bruno@clisp.org>
16049
16050         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
16051         redundant because stpncpy.m4 takes care of it.
16052
16053 2005-01-17  Bruno Haible  <bruno@clisp.org>
16054
16055         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
16056
16057 2005-01-17  Bruno Haible  <bruno@clisp.org>
16058
16059         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
16060         used.
16061
16062 2005-01-17  Bruno Haible  <bruno@clisp.org>
16063
16064         * lib/fwriteerror.h (fwriteerror): Change specification to include
16065         fclose.
16066         * lib/fwriteerror.c: Include <stdbool.h>.
16067         (fwriteerror): At the end, close the file stream. Record whether
16068         stdout was already closed.
16069
16070 2005-01-17  Bruno Haible  <bruno@clisp.org>
16071
16072         * lib/execute.c (environ): Declare if needed.
16073         * lib/pipe.c (environ): Likewise.
16074         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
16075
16076 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16077
16078         * modules/argp: Depend on vsnprintf
16079
16080 2005-01-10  Jim Meyering  <jim@meyering.net>
16081
16082         * modules/closeout (Depends-on): Add atexit.
16083
16084 2005-01-06  Bruno Haible  <bruno@clisp.org>
16085
16086         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
16087
16088 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16089
16090         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
16091         definitions to be after all include files, to avoid collisions.
16092         Problem reported by Bob Proulx.
16093
16094 2005-01-04  Jim Meyering  <jim@meyering.net>
16095
16096         Changes imported from coreutils.
16097         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
16098         as the mkstemp template, use a temporary directory and an
16099         8.3-friendly template to avoid trouble on systems like DJGPP.
16100         Reported by Juan M. Guerrero via Stepan Kasal.
16101         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
16102         close. Remove the temporary directory right away, rather than waiting
16103         for configure's at-exit trap code to do it.
16104         Suggestion from Stepan Kasal.
16105
16106 2005-01-01  Simon Josefsson  <jas@extundo.com>
16107
16108         * gnulib-tool: Print #include directives when --import'ing.
16109
16110 2004-12-28  Simon Josefsson  <jas@extundo.com>
16111
16112         * tests/test-base64.c: Include required header files.  Remove
16113         unused variables.
16114
16115 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16116
16117         * modules/error (Depends-on): Remove gettext.
16118
16119 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16120
16121         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
16122         not needed.  This removes a dependency on the gettext module.
16123         [defined _LIBC]: Do not include <libintl.h>; not needed.
16124
16125 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16126
16127         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
16128         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
16129
16130 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16131
16132         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
16133         HAVE_DECL_STRTOLD.
16134
16135 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16136
16137         * modules/getdate (Depends-on): Remove alloca-opt.
16138
16139 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16140
16141         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
16142
16143 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16144
16145         * lib/argp-parse.c: Include <stddef.h>.
16146         (alignof, alignto): New macros.
16147         (parser_init): Don't assume that void * is aligned sufficiently
16148         for struct option.
16149
16150         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
16151         need to extend the stack.
16152         (YYINITDEPTH): New macro, so that the initial stack isn't overly
16153         large.
16154
16155 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16156
16157         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
16158
16159 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16160
16161         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
16162         (2004-10-24) change.  Apparently this was a false alarm.
16163
16164         * modules/getdate: Depend on alloca-opt, not alloca.
16165
16166 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16167
16168         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
16169         Remove now-obsolete comment about AIX.
16170         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
16171         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
16172         (YYMAXDEPTH): New macro.
16173
16174 2004-12-18  Simon Josefsson  <jas@extundo.com>
16175
16176         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
16177
16178 2004-12-18  Bruno Haible  <bruno@clisp.org>
16179
16180         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
16181
16182 2004-12-18  Bruno Haible  <bruno@clisp.org>
16183
16184         * lib/fatal-signal.c (fatal_signals): Make non-const.
16185         (init_fatal_signals): New function.
16186         (uninstall_handlers, install_handlers): Ignore signals that were set to
16187         SIG_IGN.
16188         (at_fatal_signal): Call init_fatal_signals.
16189         (init_fatal_signal_set): Likewise. Ignore signals that were set to
16190         SIG_IGN.
16191         Reported by Paul Eggert.
16192
16193 2004-12-18  Bruno Haible  <bruno@clisp.org>
16194
16195         * doc/alloca.texi: New file.
16196         * doc/alloca-opt.texi: New file.
16197
16198 2004-12-17  Jim Meyering  <jim@meyering.net>
16199
16200         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
16201         Otherwise, install-sh could exit with improper exit status when
16202         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
16203
16204 2004-12-16  Simon Josefsson  <jas@extundo.com>
16205
16206         * tests/test-base64.c: Add license.
16207
16208 2004-12-15  Stepan Kasal  <address@hidden>
16209
16210         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
16211
16212 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
16213
16214         * modules/getcwd (Files): Add m4/d-ino.m4.
16215         Suggested by Mark D. Baushke.
16216
16217 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
16218
16219         * lib/getdate.y (textint): New member "negative".
16220         (time_zone_hhmm): New function.
16221         Expect 14 shift-reduce conflicts, not 13.
16222         (o_colon_minutes): New rule.
16223         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
16224         (yylex): Set the "negative" member of signed numbers.
16225
16226 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
16227
16228         * doc/getdate.texi (Time of day items, Time zone items):
16229         Describe new formats +00:00, UTC+00:00.
16230
16231 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16232
16233         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
16234         spurious "-l"s.  Problem reported by Stepan Kasal.
16235
16236 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
16237
16238         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
16239         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
16240
16241 2004-12-04  Simon Josefsson  <jas@extundo.com>
16242
16243         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
16244         Vandoorselaere <yoann@prelude-ids.org>.
16245
16246 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16247
16248         Changes imported from coreutils.
16249         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
16250         exist.
16251         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
16252
16253 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16254
16255         Changes imported from coreutils.
16256         * lib/hard-locale.c: Assume <locale.h> exists.
16257         Include "strdup.h".
16258         (GLIBC_VERSION): New macro.
16259         (hard_locale): Assume setlocale exists.
16260         Rewrite to avoid #ifdef.
16261         Use strdup rather than malloc + strcpy.
16262         * lib/human.c: Assume <locale.h> exists.
16263         (human_readable): Assume localeconv exists.
16264
16265 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
16266
16267         * modules/hard-locale (Depends-on): Add strdup.
16268
16269 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
16270
16271         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
16272         convert T2, not T.  (Imported from libc.)
16273
16274 2004-11-30  Simon Josefsson  <jas@extundo.com>
16275
16276         * modules/restrict (License): Change to LGPL.
16277
16278 2004-11-30  Simon Josefsson  <jas@extundo.com>
16279
16280         * m4/restrict.m4: Add copyright and copying conditions.
16281
16282 2004-11-30  Simon Josefsson  <jas@extundo.com>
16283
16284         * m4/base64.m4: New file.
16285
16286 2004-11-30  Simon Josefsson  <jas@extundo.com>
16287
16288         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
16289         base64.
16290
16291         * tests/test-base64.c: New file.
16292
16293         * modules/base64: New file.
16294
16295 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16296
16297         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
16298         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
16299
16300         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
16301
16302 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
16303
16304         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
16305         (__getcwd.c): Don't restore errno; glibc doesn't.
16306         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
16307         first, falling back to our code only if its results look suspicious.
16308         Ensure that the resulting buffer is only as large as necessary.
16309
16310         * lib/readutmp.c: Include readutmp.h first.
16311         Include <errno.h>, since readutmp.h no longer does that.
16312         * lib/readutmp.h: Don't include <errno.h>,
16313         <sys/param.h>, <time.h>; not needed to establish interface.
16314         (errno): Remove decl.
16315         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
16316         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
16317         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
16318
16319 2004-11-28  Simon Josefsson  <jas@extundo.com>
16320
16321         * lib/base64.h, base64.c: New file.
16322
16323 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
16324
16325         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
16326
16327 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
16328
16329         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
16330         (Depends-on): Remove pathmax, same.  Add mempcpy.
16331         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
16332         (Makefile.am): Append getcwd.h to lib_SOURCES.
16333         (Include): Add getcwd.h.
16334         (Maintainer): Change from Jim Meyering to "all, glibc",
16335         since getdate now uses intended-for-glibc code.
16336         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
16337         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
16338
16339 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16340
16341         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
16342         HP's ANSI C compiler.
16343         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
16344         Declaring int functions causes warnings on some modern systems and
16345         shouldn't be needed to compile on ancient ones.
16346         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
16347         defined.
16348
16349         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
16350         with the following changes.
16351         (__set_errno): Parenthesize properly.
16352         Include <stdbool.h>.
16353         (MIN, MAX, MATCHING_INO): New macros.
16354         (__getcwd): Define with prototype, not K&R form.
16355         Use heuristics to allocate default buffer on stack if possible.
16356         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
16357         behavior, and to avoid the PATH_MAX limit when computing
16358         ../../../../...
16359         Use MATCHING_INO to compare inode number to file.
16360         Check for arithmetic overflow in size calculations.
16361         Fix bug in reallocation of dot array that caused getcwd to fail
16362         on directories nested deeper than 75.
16363         Be more careful about saving errno on error.
16364         Do not use realloc; use only free+malloc, as this is a bit
16365         more flexible and avoids a needless copy operation.
16366         Do not inspect st_dev and st_ino for symbolic links; POSIX
16367         doesn't specify the latter.
16368         Check for closedir errors.
16369         Avoid needless casts.
16370         Use "#ifdef weak_alias" around weak_alias, to be like other
16371         glibc code.
16372         The following changes to getcwd.c have effect only when used in
16373         gnulib; they have no effect inside glibc proper.
16374         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
16375         as alloca isn't used.
16376         (alloca, __alloca): Likewise.
16377         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
16378         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16379         unconditionally, as gnulib assumes C89 or better.
16380         Do not include <sys/param.h>.
16381         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
16382         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
16383         better.
16384         (NULL) [!defined NULL]: Remove; we assume C89 or better.
16385         Include <dirent.h> in a way that is compatible with modern Autoconf.
16386         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
16387         New macros, if not already defined.
16388         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
16389         Use "_LIBC", not "defined _LIBC", for consistency.
16390         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
16391         a mempcpy module.
16392         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
16393         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
16394         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
16395         credit only to Jim Meyering and adjust the copyright dates.
16396         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
16397         <stdlib.h>, <unistd.h>, "pathmax.h".
16398         Instead, include "xgetcwd.h" (first) and "getcwd.h".
16399         (INITIAL_BUFFER_SIZE): Remove.
16400         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
16401
16402 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16403
16404         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
16405         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
16406         Use the _ONCE methods, for efficiency.
16407         Check for fcntl.h.  In test program, include <errno.h>
16408         and <fcntl.h> if available.  Remove old K&R cruft from
16409         test program.  Check for common errors in GNU/Linux,
16410         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
16411         don't do AC_LIBOBJ, as that's getcwd.m4's job.
16412         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
16413         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
16414         name accordingly.
16415         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
16416         accommodate new getcwd.c.
16417         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
16418         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
16419         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
16420         that's all we need now.
16421
16422 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16423
16424         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
16425         argp-parse.c depends on getopt internals, that means we should
16426         always use our getopt, to be on the safe side.
16427         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
16428         order not to spoil the result of an eventual previous invocation
16429         of gl_GETOPT_SUBSTITUTE.
16430
16431 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16432
16433         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
16434         redefinition warnings. To avoid them, include the defines
16435         in `#if !defined __need_getopt ... #endif'. The only place
16436         where __getopt_argv_const is used is in definitions
16437         of getopt_long and getopt_long_only below, which are as well
16438         protected by `#ifndef __need_getopt'.
16439         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
16440         __need_getopt after including <stdio.h> and <unistd.h> These
16441         headers might have defined it.
16442
16443 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16444
16445         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
16446
16447 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
16448
16449         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
16450         (futimens): New function, which uses futimes if available.
16451         (futimens, utimens): Support timespec==NULL, with same semantics
16452         as utime and utimens.
16453         * lib/utimens.h (futimens): New decl.
16454
16455 2004-11-23  Jim Meyering  <jim@meyering.net>
16456
16457         * lib/getopt_.h: Remove trailing blanks.
16458
16459 2004-11-23  Jim Meyering  <jim@meyering.net>
16460
16461         * lib/__fpending.c: Add comment.
16462
16463 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
16464
16465         * modules/canonicalize (Depends-on): Add xreadlink.
16466         Problem reported by James Youngman.
16467
16468 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
16469
16470         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
16471         New macros.
16472         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
16473         optopt): Use them instead of invoking ## directly; otherwise, the
16474         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
16475
16476 2004-11-19  Bruno Haible  <bruno@clisp.org>
16477
16478         * lib/strtok_r.c: Move comments from here...
16479         * lib/strtok_r.h: ... to here.
16480
16481 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16482
16483         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
16484         implementations that mishandle size_t overflow.
16485
16486 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
16487
16488         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
16489         might fail.  Problem reported by Yoann Vandoorselaere.
16490         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
16491         implementations that mishandle size_t overflow.
16492
16493 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16494
16495         * modules/canon-host (Depends-on): Add strdup.
16496
16497 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16498
16499         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
16500
16501 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16502
16503         * lib/canon-host.c: Include "strdup.h".
16504         (canon_host): Use getaddrinfo if available, so that IPv6 works.
16505         Use strdup instead of malloc/strcpy to duplicate strings.
16506
16507         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
16508         (human_space_before_unit): New constant.
16509         * lib/human.c (human_readable): Support it.
16510
16511         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
16512         (xgetcwd): Set errno correctly when failing.
16513         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
16514         the failure is actually due to a PATH_MAX problem.
16515
16516         Further getopt changes to make it more likely that glibc will
16517         buy the changes back.
16518         * lib/getopt.c (POSIXLY_CORRECT): New constant.
16519         (getopt): Use it, so to preserve glibc semantic
16520         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
16521         when compiling for libc.
16522         * lib/getopt_.h (__getopt_argv_const): Bring it back.
16523         (getopt_long, getopt_long_only): Use it.
16524
16525         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16526         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
16527         (getopt): Argv is now char * const *, as per standard.
16528         (_getopt_internal_r, _getopt_internal): Argv is now char **,
16529         not char *__getopt_argv_const *.
16530         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16531         _getopt_long_only_r): Likewise.
16532         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
16533         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16534         _getopt_long_r, _getopt_long_only_r): Likewise.
16535         * lib/getopt_.h (__getopt_argv_const): Remove.
16536         (getopt): Argv is now char * const *, as per standard.
16537
16538         * lib/getdate.y (tORDINAL): New token.
16539         (day, relunit): Allow it for relative times.
16540         (relative_time_table): Use tORDINAL for ordinals.
16541
16542 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
16543
16544         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
16545         Document that "second" isn't allowed as an ordinal number.
16546
16547 2004-11-16  Jim Meyering  <jim@meyering.net>
16548
16549         * modules/closeout (Depends-on): Add fpending.
16550
16551 2004-11-15  Jim Meyering  <jim@meyering.net>
16552
16553         * lib/closeout.c: Include "__fpending.h" once again.
16554         Include <stdbool.h>.
16555         (close_stdout): Don't fail just because stdout was closed initially,
16556         since some programs don't write to stdout in the normal course of
16557         operation (other than --version and --help), and we don't want this
16558         function to make e.g. `touch file >&-' fail.
16559         But do fail if it was closed and someone has tried to write to it.
16560         E.g., `printf foo >&-' must fail.
16561
16562 2004-11-13  Jim Meyering  <jim@meyering.net>
16563
16564         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
16565
16566 2004-11-12  Simon Josefsson  <jas@extundo.com>
16567
16568         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
16569         small doc fix is still pending.
16570
16571 2004-11-11  Simon Josefsson  <jas@extundo.com>
16572
16573         * modules/strtok_r: New file.
16574
16575         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16576         strtok_r.
16577
16578 2004-11-11  Simon Josefsson  <jas@extundo.com>
16579
16580         * m4/strtok_r.m4: New file.
16581
16582         * m4/getopt.m4: Replace opterr.
16583
16584 2004-11-11  Simon Josefsson  <jas@extundo.com>
16585
16586         * lib/strtok_r.h, strtok_r.c: New file.
16587
16588 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16589
16590         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
16591         of replacing opterr, getopt, etc.  This should handle the
16592         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
16593
16594 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
16595
16596         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
16597         we can stop lying to compilers about the constness of argv when we
16598         are compiled outside glibc.
16599         (getopt, getopt_long, getopt_long_only): Use it.
16600         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
16601         _getopt_internal, getopt): Likewise.
16602         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
16603         _getopt_long_only_r): Likewise.
16604         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
16605         _getopt_long_r, _getopt_long_only_r): Likewise.
16606
16607         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
16608         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
16609         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
16610         the other external symbols.
16611         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
16612         declaration, since the above renaming now works around collisions.
16613
16614 2004-11-11  Jim Meyering  <jim@meyering.net>
16615
16616         * lib/linebreak.c: Remove trailing blanks.
16617         * lib/alloca_.h: Likewise.
16618         * lib/acosl.c: Likewise.
16619         * lib/euidaccess.c: Likewise.
16620         * lib/allocsa.h: Likewise.
16621
16622 2004-11-10  Simon Josefsson  <jas@extundo.com>
16623
16624         * m4/getaddrinfo.m4: New file.
16625
16626 2004-11-10  Simon Josefsson  <jas@extundo.com>
16627
16628         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
16629
16630 2004-11-10  Simon Josefsson  <jas@extundo.com>
16631
16632         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16633         getaddrinfo.
16634
16635         * modules/getaddrinfo: New file.
16636
16637 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16638
16639         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
16640
16641 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16642
16643         * lib/mktime.c (SHR): New macro, which is a portable
16644         substitute for >> that should work even on Crays.
16645         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
16646         Problem reported by Mark D. Baushke in
16647         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
16648         * lib/getdate.y (SHR): Likewise.
16649         (tm_diff): Use it.
16650         * lib/strftime.c (SHR): Likewise.
16651         (tm_diff): Use it.
16652         * lib/quotearg.c (struct quoting_options): Use unsigned int for
16653         quote_these_too, so that right shifts are well defined.  All uses
16654         changed.
16655
16656 2004-11-10  Jim Meyering  <jim@meyering.net>
16657
16658         Ensure that no close failure goes unreported.
16659         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
16660         return early when it seems there's nothing to flush.
16661         Don't include __fpending.h.
16662
16663 2004-11-10  Jim Meyering  <jim@meyering.net>
16664
16665         * modules/closeout (Depends-on): Remove fpending.
16666
16667 2004-11-10  Jim Meyering  <jim@meyering.net>
16668
16669         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
16670
16671 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16672
16673         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
16674         gl_FUNC_STRFTIME.
16675         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
16676         and AC_REQUIRE when possible, to avoid duplicate checks.
16677         Check for <wchar.h>.
16678
16679 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
16680
16681         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
16682
16683 2004-11-09  Bruno Haible  <bruno@clisp.org>
16684
16685         * m4/sockpfaf.m4: New file.
16686
16687 2004-11-05  Bruno Haible  <bruno@clisp.org>
16688
16689         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
16690         Reported by Mark D. Baushke <mdb@cvshome.org>.
16691
16692 2004-11-04  Bruno Haible  <bruno@clisp.org>
16693
16694         2004-09-11  Bruno Haible  <bruno@clisp.org>
16695                 * allocsa.valgrind: New file.
16696         2004-02-06  Bruno Haible  <bruno@clisp.org>
16697                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
16698                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
16699                 Reported by Christopher Seip <chris.seip@hp.com>.
16700
16701 2004-11-04  Bruno Haible  <bruno@clisp.org>
16702
16703         * modules/allocsa (Files): Add lib/allocsa.valgrind.
16704         (Makefile.am): Distribute it.
16705
16706 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
16707
16708         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
16709         with errno == ERANGE if the buffer is too small.
16710         Problem reported by Mark D. Baushke.
16711
16712 2004-11-03  Albert Chin  <china@thewrittenword.com>
16713             Paul Eggert  <eggert@cs.ucla.edu>
16714
16715         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
16716         equivalent, substitute $ac_type for equivalent type rather than
16717         blindly using uint32_t *always* which won't work if uint32_t is not
16718         available.  Define _UINT32_T to work around typedef of uint32_t if
16719         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
16720         2.5.1.
16721
16722 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16723
16724         * m4/jm-macros.m4: Sync from coreutils.
16725         (gl_MACROS): Check for mbrlen, for pathchk.
16726         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
16727
16728 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16729
16730         * lib/xreadlink.c (MAXSIZE): New macro.
16731         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
16732         size does not exceed MAXSIZE.  Avoid cast.
16733         As suggested by Mark D. Baushke in
16734         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
16735         if readlink fails with buffer size just under MAXSIZE, try again
16736         with MAXSIZE.
16737
16738 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
16739
16740         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
16741
16742 2004-11-02  Derek R. Price  <derek@ximbiot.com>
16743         and  Paul Eggert  <eggert@cs.ucla.edu>
16744
16745         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
16746         (get_date): Overparenthesize to avoid GCC warning.
16747
16748 2004-11-02  Bruno Haible  <bruno@clisp.org>
16749
16750         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
16751         returns void.
16752
16753 2004-11-02  Bruno Haible  <bruno@clisp.org>
16754
16755         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
16756         function returns void.
16757
16758 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16759
16760         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
16761         fflush_unlocked, flockfile, funlockfile, funlockfile,
16762         fputs_unlocked, putc_unlocked.
16763
16764 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
16765
16766         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16767         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
16768         already declared.
16769
16770 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16771
16772         * modules/getdate (Files): Add doc/getdate.texi.
16773         (Depends-on): Add setenv, xalloc.
16774
16775 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16776
16777         * lib/getdate.y: Add support for TZ="foo" within a date string.
16778         Fix some bugs near time_t boundaries.  Reject dates with
16779         out-of-range components, e.g., "Sept 31".
16780         Include <stdlib.h>, "setenv.h", "xalloc.h".
16781         (ISDIGIT_LOCALE): Remove; unused.
16782         Note that the TZ and time functions used here are not reentrant.
16783         (mktime_ok, get_tz): New functions.
16784         (TZBUFSIZE): New constant.
16785         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
16786         This requires that we sometimes generate our own TZ="XXX..." setting.
16787
16788 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16789
16790         * doc/getdate.texi: New file, from coreutils with modifications for
16791         the new TZ parsing.
16792
16793 2004-10-27  Derek R. Price  <derek@ximbiot.com>
16794
16795         * lib/mktime.c (not_equal_tm): Remove redundant check.
16796
16797 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16798
16799         * modules/regex (lib_SOURCES): Add regex.c.
16800         Reported by James Youngman in
16801         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
16802
16803 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
16804
16805         * lib/getdate.y: Use Bison 1.875 features, and some minor
16806         code cleanups.  This change does not affect semantics.
16807         Don't include <stdlib.h>; no longer needed.
16808         Don't include unlocked-io.h; only the "#if TEST" code uses
16809         stdio, and performance isn't crucial there.
16810         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
16811         Bison 1.875 features as described below.
16812         All uses of "PC." replaced by "pc->".
16813         (YYSTYPE): Add a forward declaration.
16814         (yylex, yyerror): Use full prototypes in forward decls.
16815         Use "%pure-parser" rather than obsolescent "%pure_parser".
16816         Use %parse-param and %lex-param instead of obsolescent
16817         YYPARSE_PARAM and YYLEX_PARAM.
16818         (meridian_table, month_and_day_table, time_units_table,
16819         relative_time_table, time_zone_table, military_table,
16820         lookup_zone, lookup_word, get_date):
16821         Use NULL instead of 0 where appropriate.
16822         (to_hour): Avoid abort (), to avoid a dependency on
16823         stdlib.h.
16824         (yyerror, yylex): Now accepts parser_control * arg.
16825         (main) [TEST]: Use '\0' rather than 0 for char.
16826
16827 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16828
16829         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
16830
16831 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
16832
16833         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
16834         It's now the caller's responsibility to handle the case where
16835         !HAVE_GETPAGESIZE && !defined getpagesize.
16836
16837         * lib/mktime.c (leapyear): Arg is long int, not int.
16838
16839 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
16840
16841         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
16842
16843 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
16844
16845         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
16846         missing.  Problem reported by James Youngman.
16847
16848 2004-10-16  Simon Josefsson  <jas@extundo.com>
16849
16850         * gnulib-tool: Fix comments.  Fix parse problem.
16851         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
16852
16853 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
16854
16855         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
16856         implementation of getopt_long.  Problem reported by Alexander Taler in:
16857         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
16858
16859 2004-10-15  Bruno Haible  <bruno@clisp.org>
16860
16861         * gnulib-tool: Untabify. Initialize supplied_libname.
16862         (func_usage): More homogenous output.
16863         (func_modules_transitive_closure, func_modules_to_filelist,
16864         func_emit_lib_Makefile_am): New functions.
16865         (func_import): New function, extracted from big case statement. Use
16866         func_get_license, func_modules_transitive_closure,
16867         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
16868         opt_lgpl. Don't use test -a, as it's not portable.
16869         (func_create_testdir): Use func_modules_transitive_closure,
16870         func_modules_to_filelist, func_emit_lib_Makefile_am.
16871
16872 2004-10-15  Bruno Haible  <bruno@clisp.org>
16873
16874         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
16875
16876 2004-10-15  Bruno Haible  <bruno@clisp.org>
16877
16878         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
16879         the portions belonging to each module.
16880         Suggested by Derek Robert Price <derek@ximbiot.com>.
16881
16882 2004-10-12  Simon Josefsson  <jas@extundo.com>
16883
16884         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
16885         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
16886         to real functions.
16887
16888 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16889
16890         * modules/vsnprintf: New file.
16891
16892 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16893
16894         * m4/vsnprintf.m4: New file.
16895
16896 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
16897
16898         * lib/vsnprintf.h: New file.
16899         * lib/vsnprintf.c: New file.
16900
16901 2004-10-11  Bruno Haible  <bruno@clisp.org>
16902
16903         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
16904         vsnprintf.
16905
16906 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
16907
16908         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
16909
16910 2004-10-07  Bruno Haible  <bruno@clisp.org>
16911
16912         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
16913         fits into the provided buffer.
16914
16915 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
16916
16917         * lib/diacrit.c, diacrit.h: Add GPL notice.
16918
16919         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
16920         notice.
16921         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
16922         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
16923         This avoids a potential constant-folding bug.
16924
16925 2004-10-05  Bruno Haible  <bruno@clisp.org>
16926
16927         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
16928         for the declaration of strsep.
16929
16930 2004-10-05  Bruno Haible  <bruno@clisp.org>
16931
16932         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
16933
16934 2004-10-04  Simon Josefsson  <jas@extundo.com>
16935
16936         * modules/memmem: New file.
16937         * tests/test-memmem.c: New file.
16938         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
16939
16940 2004-10-04  Simon Josefsson  <jas@extundo.com>
16941
16942         * m4/memmem.m4: New file.
16943
16944 2004-10-04  Simon Josefsson  <jas@extundo.com>
16945
16946         * lib/memmem.h: New file.
16947         * lib/memmem.c: New file, taken from glibc.
16948
16949 2004-10-04  Simon Josefsson  <jas@extundo.com>
16950
16951         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
16952         '#ifdef USE_UNLOCKED_IO'.
16953
16954 2004-10-04  Simon Josefsson  <jas@extundo.com>
16955
16956         * config/srclist.txt: Add memmem from glibc.
16957
16958 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16959
16960         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
16961
16962         * modules/argmatch, modules/argp, modules/closeout, modules/error,
16963         modules/exclude, modules/getdate, modules/getline,
16964         modules/getndelim2, modules/getpass, modules/getpass-gnu,
16965         modules/getusershell, modules/linebuffer, modules/md5,
16966         modules/mountlist, modules/posixtm, modules/readtokens,
16967         modules/readutmp, modules/regex, modules/sha1,
16968         modules/version-etc, modules/yesno:
16969         Remove dependency on unlocked-io.
16970
16971 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16972
16973         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
16974
16975         * m4/unlocked-io.m4: Add copyright notice.
16976         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
16977
16978 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16979
16980         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
16981         * lib/xmalloc.c (xmemdup): Likewise.
16982         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
16983         XFREE): Remove these long-obsolescent macros.
16984         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
16985         * lib/xstrdup.c: Remove.
16986
16987         * lib/regex.c (re_comp): Cast gettext return value to char *,
16988         Problem reported by Martin Neitzel via Mark D. Baushke.
16989
16990 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
16991
16992         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
16993         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
16994         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
16995         regex.c, sha1.c, version-etc.c, yesno.c:
16996         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
16997         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
16998         the includer's responsibility.
16999
17000         Sync from coreutils.
17001
17002         * lib/modechange.c (mode_compile): Don't decrement a pointer that
17003         points to the start of a string, as the C Standard says the
17004         resulting behavior is undefined.
17005
17006         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
17007         simple -> simple_backups, numbered_existing ->
17008         numbered_existing_backups, numbered -> numbered_backups
17009         to avoid shadowing problems.  All uses changed.
17010         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
17011         * lib/backupfile.c (check_extension, numbered_backup):
17012         Rename locals to avoid shadowing 'basename'.
17013         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
17014         once.
17015
17016         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
17017         * lib/.cvsignore: Add getopt.h.
17018
17019 2004-10-04  Bruno Haible  <bruno@clisp.org>
17020
17021         * modules/README: New file.
17022         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
17023         not a module.
17024
17025 2004-10-02  Jim Meyering  <jim@meyering.net>
17026
17027         * lib/dirfd.h, getpagesize.h: Add copyright notice.
17028
17029 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17030
17031         * modules/strsep: New file.
17032
17033 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17034
17035         * m4/strsep.m4: New file.
17036
17037 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17038
17039         * lib/strsep.h: New file.
17040         * lib/strsep.c: New file.
17041
17042 2004-10-01  Simon Josefsson  <jas@extundo.com>
17043
17044         * lib/snprintf.c (snprintf): Handle size==0.
17045
17046 2004-10-01  Simon Josefsson  <jas@extundo.com>
17047             Bruno Haible  <bruno@clisp.org>
17048
17049         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
17050         (snprintf): Declare 'args'.
17051
17052 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
17053
17054         * lib/snprintf.c: Remove comments as to why each header is needed.
17055
17056 2004-10-01  Bruno Haible  <bruno@clisp.org>
17057
17058         * MODULES.html.sh: Add strsep.
17059
17060 2004-09-30  Simon Josefsson  <jas@extundo.com>
17061
17062         * modules/snprintf: New file.
17063
17064 2004-09-30  Simon Josefsson  <jas@extundo.com>
17065
17066         * m4/snprintf.m4: New file.
17067
17068 2004-09-30  Simon Josefsson  <jas@extundo.com>
17069
17070         * lib/snprintf.h, lib/snprintf.c: New files.
17071
17072 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17073
17074         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
17075         (hol_entry_help): Never translate an empty string.
17076         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
17077         * lib/argp.h (OPTION_NO_TRANS): New option.
17078
17079 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17080
17081         * modules/argp (Maintainer): Replace Simon Josefsson
17082         by Sergey Poznyakoff.
17083
17084 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17085
17086         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
17087         changes merged back into glibc.
17088
17089 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17090
17091         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
17092
17093 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17094
17095         * lib/xvasprintf.c: Include xalloc.h.
17096         (xvasprintf): Use xalloc_die, not xmalloc_die.
17097
17098 2004-09-29  Bruno Haible  <bruno@clisp.org>
17099
17100         * modules/alloca-opt: New file, derived from modules/alloca.
17101         * modules/allocsa: Depend on alloca-opt instead of alloca.
17102         * modules/setenv: Likewise.
17103         * modules/vasnprintf: Likewise.
17104         * MODULES.html.sh: Add alloca-opt.
17105
17106 2004-09-28  Simon Josefsson  <jas@extundo.com>
17107
17108         * gnulib-tool: New parameter --lgpl, to asseert that modules are
17109         LGPL, and to replace license template from GPL to LGPL.
17110
17111 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17112
17113         * modules/dummy: Change license to LGPL.
17114
17115 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17116
17117         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
17118
17119 2004-09-24  Simon Josefsson  <jas@extundo.com>
17120
17121         * modules/minmax (License): Change from GPL to LGPL.
17122
17123 2004-09-23  Simon Josefsson  <jas@extundo.com>
17124
17125         * gnulib-tool (--import): Typo.
17126
17127 2004-09-23  Simon Josefsson  <jas@extundo.com>
17128
17129         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
17130
17131 2004-09-22  Bruno Haible  <bruno@clisp.org>
17132
17133         * modules/*: Add 'License' field.
17134         * gnulib-tool: Accept --extract-license option.
17135         (func_get_license): New function.
17136
17137 2004-09-21  Bruno Haible  <bruno@clisp.org>
17138
17139         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
17140         Reported by Simon Josefsson.
17141
17142 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17143
17144         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
17145         gl_AC_TYPE_LONG_LONG.
17146
17147 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17148
17149         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
17150
17151 2004-09-18  Simon Josefsson  <jas@extundo.com>
17152         and  Paul Eggert  <eggert@cs.ucla.edu>
17153
17154         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
17155         calls with autoreconf.  Define GL_LIB.
17156
17157 2004-09-14  Karl Berry  <karl@gnu.org>
17158
17159         * config/srclist.txt: unsync setenv.c, sigh.
17160
17161 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17162
17163         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
17164         Problem reported by Bruno Haible in:
17165         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
17166
17167 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17168
17169         * config/srclist.txt: Comment out argp-pvh.c.
17170
17171 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
17172
17173         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
17174         in case some system header has #define'd it.  Problem reported by
17175         Soeren D. Schulze in
17176         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
17177
17178 2004-09-09  Karl Berry  <karl@gnu.org>
17179
17180         * regex.[ch]: delete from the root.  These were supposed to be
17181                 synced with emacs cvs, but this has not happened for about
17182                 a year, and anyway nothing else uses emacs regex.[ch].
17183                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
17184                 lib/regex[.ch] is untouched.
17185
17186 2004-09-09  Bruno Haible  <bruno@clisp.org>
17187
17188         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
17189
17190 2004-09-09  Bruno Haible  <bruno@clisp.org>
17191
17192         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
17193         modifications.
17194         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
17195
17196 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
17197
17198         * modules/xvasprintf: New file.
17199         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
17200
17201 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
17202
17203         * lib/xvasprintf.h: New file.
17204         * lib/xvasprintf.c: New file.
17205         * lib/xasprintf.c: New file.
17206
17207 2004-09-08  Bruno Haible  <bruno@clisp.org>
17208
17209         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
17210
17211 2004-09-08  Bruno Haible  <bruno@clisp.org>
17212
17213         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
17214         length is > INT_MAX.
17215         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
17216         more.
17217
17218 2004-09-08  Bruno Haible  <bruno@clisp.org>
17219
17220         * lib/stdint_.h: New file, taken from GNU clisp.
17221
17222 2004-09-08  Bruno Haible  <bruno@clisp.org>
17223             Oskar Liljeblad  <oskar@osk.mine.nu>
17224
17225         * modules/stdint: New file.
17226         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
17227
17228 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17229
17230         Import from coreutils.
17231         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
17232         strings on unbounded length.  alloca's performance benefits aren't
17233         that important here.
17234         (V_STRDUP): Remove.
17235         (parse_with_separator): New function, with most of the internals
17236         of the old parse_user_spec.  Allow user to omit both user and group,
17237         for compatibility with FreeBSD.
17238         Clone only the user name, not the entire spec.
17239         Do not set *uid, *gid unless entirely successful.
17240         Avoid memory leak in some failing cases.
17241         Fix regression for USER.GROUP reported by Dmitry V. Levin in
17242         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
17243         (parse_user_spec): Rewrite to use parse_with_separator.
17244
17245 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17246
17247         * modules/userspec: Don't depend on alloca.
17248
17249 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17250
17251         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
17252
17253 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
17254
17255         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
17256         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
17257         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
17258
17259 2004-08-16  Simon Josefsson  <jas@extundo.com>
17260
17261         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
17262         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
17263         Add --dry-run for --import.
17264         Let user provided command line parameters override configure.ac
17265         settings.
17266
17267 2004-08-12  Simon Josefsson  <jas@extundo.com>
17268
17269         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
17270         as discussed with Paul Eggert in threads rooted at
17271         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
17272         and
17273         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
17274         Before, the test was empty, and relied on ELIDE_CODE in source
17275         code.)
17276         (gl_PREREQ_GETOPT): New macro.
17277         (gl_GETOPT): Use them.
17278
17279 2004-08-12  Simon Josefsson  <jas@extundo.com>
17280
17281         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
17282         * lib/getopt_.h: Renamed from getopt.h.
17283
17284 2004-08-12  Simon Josefsson  <jas@extundo.com>
17285
17286         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
17287         Change default library name from libfoo to libgnu.
17288         Now, if you have a configure.ac that says:
17289                 gl_SOURCE_BASE(gl)
17290                 gl_M4_BASE(gl/m4)
17291                 gl_MODULES(error getopt etcetera)
17292                 gl_INIT
17293         you can import all you need by running:
17294                 ../gnulib/gnulib-tool --import
17295
17296         * modules/getopt (Files): Rename getopt.h to getopt_.h.
17297         (Makefile.am): Rewrite, use logic from argz.
17298         (Include): Use <getopt.h> instead of "getopt.h".
17299
17300 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17301
17302         * modules/argp (Files): Add m4/unlocked-io.m4.
17303         (Depends-on): Add extensions.
17304
17305 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17306
17307         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
17308         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
17309         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
17310         Check for program_invocation_name, program_invocation_short_name,
17311         flockfile, funlockfile, features.h, _getopt_long_only_r.
17312
17313 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17314
17315         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
17316         its complicated substitute.
17317         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
17318         and program_invocation_name.
17319         (__argp_basename) [!_LIBC]: Remove; the only use was
17320         replaced by its body.
17321         (__argp_short_program_name): Change condition from
17322         !defined __argp_short_program_name to
17323         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
17324         to match argp-namefrob.h.
17325         (__argp_failure): Don't assume strerror_r returns char *.
17326         * lib/argp-parse.c (N_): Define unconditionally.
17327         (argp_default_options): Fill out initializers with 0 to avoid
17328         gcc warnings.
17329
17330 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
17331
17332         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
17333         getopt1.c.
17334
17335 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17336
17337         Merge from coreutils.
17338
17339         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
17340
17341         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
17342         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
17343
17344 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17345
17346         Merge from coreutils.
17347
17348         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
17349         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
17350         for Reliant Unix 5.43.
17351
17352         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
17353         (union fooround): Use uintmax_t, not long int.
17354         The rest is a merge from libc:
17355         [defined _LIBC]: Include <shlib-compat.h>.
17356         (_obstack) [defined _LIBC]: Remove after 2.3.4.
17357
17358         * lib/settime.c (settime): Recode to avoid warning with
17359         Sun Forte C 6U2.
17360
17361         * lib/strverscmp.c: Convert to UTF-8.
17362
17363 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
17364
17365         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
17366         m4/uintmax_t.m4.
17367
17368 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17369
17370         * modules/xalloc-die: New file.
17371         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
17372
17373         * modules/md5 (Files): Add m4/uint32_t.m4.
17374         * modules/sha1: Renamed from modules/sha.
17375         (Files):
17376         Rename lib/sha.h to lib/sha1.h.
17377         Rename lib/sha.c to lib/sha1.c.
17378         Rename m4/sha.m4 to m4/sha1.m4.
17379         (lib_SOURCES): Likewise.
17380         (configure.ac): Rename gl_SHA to gl_SHA1.
17381         (Include): sha.h -> sha1.h.
17382
17383 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17384
17385         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
17386         * m4/sha1.m4: Renamed from sha.m4.
17387         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
17388
17389 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
17390
17391         * lib/obstack.h (obstack_empty_p):
17392         Don't assume that chunk->contents is suitably aligned.
17393         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
17394         Likewise. Problem reported by Benno in
17395         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
17396
17397         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
17398         readable.  This could be improved further but it'd take some work.
17399
17400 2004-08-08  Simon Josefsson  <jas@extundo.com>
17401
17402         * modules/xgethostname (Depends-on): Remove exit and error (not
17403         used).
17404
17405         * modules/getpass-gnu: Add getpass.h.
17406         (Depends-on): Add stdbool.
17407         * modules/getpass: Add getpass.h.
17408
17409 2004-08-08  Simon Josefsson  <jas@extundo.com>
17410
17411         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
17412         Check getpass declaration.
17413
17414 2004-08-08  Simon Josefsson  <jas@extundo.com>
17415
17416         * lib/xgethostname.c: Don't include error.h (not used).
17417
17418         * lib/getpass.h: Add.
17419         * lib/getpass.c: Include getpass.h first.
17420
17421 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
17422
17423         * lib/xalloc-die.c: New file.
17424         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
17425         All uses removed.
17426         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
17427         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
17428         xalloc-die.c.
17429         (_, N_, xalloc_die): Move to xalloc-die.c.
17430         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
17431         so that we needn't mess with xalloc_msg_memory_exhausted.
17432
17433         * lib/sha1.h: Renamed from sha.h.
17434         (SHA1_H): Renamed from _SHA_H.
17435         (sha1_ctx): Renamed from sha_ctx.
17436         (sha1_init_ctx): Renamed from sha_init_ctx.
17437         (sha1_process_block): Renamed from sha_process_block.
17438         (sha1_process_bytes): Renamed from sha_process_bytes.
17439         (sha1_finish_ctx): Renamed from sha_finish_ctx.
17440         (sha1_read_ctx): Renamed from sha_read_ctx.
17441         (sha1_stream): Renamed from sha_stream.
17442         (sha1_buffer): Renamed from sha_buffer.
17443         * lib/sha1.c: Likewise; renamed from sha.c.
17444         Do not include <sys/types.h>.
17445         Include <stddef.h> rather than <stdlib.h>.
17446
17447 2004-08-08  Bruno Haible  <bruno@clisp.org>
17448
17449         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
17450         FILESYSTEM_PREFIX_LEN.
17451         * lib/progreloc.c: Likewise.
17452         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
17453
17454 2004-08-06  Simon Josefsson  <jas@extundo.com>
17455
17456         * modules/progname (Depends-on): Don't depend on stdbool.
17457
17458 2004-08-06  Simon Josefsson  <jas@extundo.com>
17459
17460         * modules/getsubopt: New file.
17461         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17462         getsubopt.
17463
17464 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17465
17466         More merge from coreutils.
17467
17468         * m4/utimens.m4, m4/utimecmp.m4: New files.
17469         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
17470         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
17471         prereq.m4, sha.m4: Import changes from coreutils.
17472
17473 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17474
17475         More merge from coreutils.
17476         * modules/raise, modules/readtokens0, modules/utimens:
17477         * modules/utimecmp, module/xnanosleep: New files.
17478         * modules/strftime: Add lib/strftime.h.
17479         Change include from <time.h> to "strftime.h".
17480         * modules/yesno: Add lib/yesno.h.
17481         * modules/backupfile: Remove lib/addext.c.
17482         * modules/euidaccess: Add stat-macros.h.
17483         * modules/canonicalize, modules/euidaccess,
17484         modules/filemode, modules/lchown, modules/makepath,
17485         modules/rmdir, modules/stat: Likewise.
17486
17487 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
17488
17489         Merge from tar.
17490         * lib/argp-help.c (make_hol, hol_append): Don't assume that
17491         SIZE_MAX is a valid preprocessor constant.
17492         (__argp_basename): Change from "#ifndef _LIBC"
17493         to "#ifndef __argp_short_program_name", so that
17494         we don't compile these functions for tar.
17495
17496         More merges from coreutils.
17497         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
17498         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
17499         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
17500         * lib/addext.c: Remove; no longer needed.
17501         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
17502         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
17503         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
17504         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
17505         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
17506         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
17507         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
17508         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
17509         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
17510         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
17511         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
17512         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
17513         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
17514         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
17515         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
17516         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
17517         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
17518         Import changes from coreutils.
17519
17520 2004-08-05  Simon Josefsson  <jas@extundo.com>
17521
17522         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
17523
17524 2004-08-05  Simon Josefsson  <jas@extundo.com>
17525
17526         * m4/getsubopt.m4: New file.
17527
17528 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17529
17530         Merge from coreutils.
17531
17532         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
17533         * m4/getcwd-path-max.m4: New files.
17534
17535         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
17536         FILESYSTEM_PREFIX_LEN ->
17537         FILE_SYSTEM_PREFIX_LEN.
17538         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
17539         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
17540         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
17541         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
17542
17543         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
17544         prerequisite modules now handle the DOS stuff.
17545         Don't check for unistd.h.
17546
17547 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17548
17549         Merge from coreutils.
17550
17551         * lib/.gdb-history: Remove; this doesn't belong here.
17552
17553         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
17554         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
17555         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
17556         * lib/getcwd.c: New files.
17557
17558         * lib/dirname.h: Include <stdbool.h>.
17559         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
17560         for consistency with POSIX terminology.  All uses changed.
17561         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
17562         (strip_trailing_slashes): Use bool for booleans.
17563         * lib/stripslash.c (strip_trailing_slashes): Likewise.
17564
17565         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
17566         sometimes returns a positive errno value even when it succeeds.
17567         (print_errno_message) [!LIBC]: Fall back on strerror if
17568         __strerror_r fails.
17569
17570         * lib/path-concat.c (mempcpy): Don't define if a system header defines
17571         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
17572         (longest_relative_suffix): New function.
17573         (path_concat): Use it.  Assume first argument is not NULL.
17574         Port to DOS.  Omit redundant separators.
17575         Report an error instead of returning NULL.
17576         Use mempcpy instead of memcpy.
17577         (xpath_concat): Remove: not declared or used.
17578
17579         * lib/same.h: Include <stdbool.h>
17580         (same_name): Return bool, not int.
17581         * lib/same.c (same_name): Likewise.
17582         (errno): Don't declare; we assume C89 or better now.
17583
17584         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
17585         if not already defined.
17586
17587         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
17588         * lib/dup-safer.c (errno): Likewise.
17589
17590 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
17591
17592         Merge from coreutils.
17593         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
17594         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
17595         * modules/path-concat: Don't depend on strdup.
17596
17597 2004-08-03  Simon Josefsson  <jas@extundo.com>
17598
17599         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
17600         * lib/progname.h: Don't include stdbool.h.
17601
17602 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17603
17604         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
17605         * MODULES.html.sh (func_all_modules): Remove fatal.
17606
17607 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17608
17609         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
17610
17611 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
17612
17613         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
17614         working.
17615
17616 2004-08-02  Simon Josefsson  <jas@extundo.com>
17617
17618         * lib/getsubopt.h: New file, with comments from Bruno Haible.
17619         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
17620         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
17621
17622 2004-08-01  Simon Josefsson  <jas@extundo.com>
17623
17624         * lib/xgetdomainname.c: Include stdlib.h, for free().
17625
17626 2004-07-19  Bruno Haible  <bruno@clisp.org>
17627
17628         * MODULES.html.sh (func_all_modules): Add dummy.
17629
17630 2004-07-16  Simon Josefsson  <jas@extundo.com>
17631
17632         * modules/dummy: New file.
17633
17634 2004-07-16  Simon Josefsson  <jas@extundo.com>
17635
17636         * lib/dummy.c: New file.
17637
17638 2004-07-16  Bruno Haible  <bruno@clisp.org>
17639
17640         * lib/backupfile.h: Add extern "C" for C++.
17641         * lib/closeout.h: Likewise.
17642         * lib/copy-file.h: Likewise.
17643         * lib/findprog.h: Likewise.
17644         * lib/full-write.h: Likewise.
17645         * lib/pathname.h: Likewise.
17646         * lib/progname.h: Likewise.
17647         * lib/stpcpy.h: Likewise.
17648         * lib/stpncpy.h: Likewise.
17649         * lib/strcase.h: Likewise.
17650         * lib/strstr.h: Likewise.
17651         * lib/xalloc.h: Likewise.
17652
17653         * lib/mbswidth.h: Add extern "C" for C++.
17654         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
17655
17656 2004-07-13  Robert Millan  <robertmh@gnu.org>
17657
17658         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
17659
17660 2004-07-09  Simon Josefsson  <jas@extundo.com>
17661
17662         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
17663         failed without this.)
17664
17665 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17666
17667         * modules/chown (Files): Add lib/fchown-stub.c, since
17668         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
17669
17670 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
17671
17672         * lib/fchown-stub.c: New file.
17673
17674 2004-06-24  Jim Meyering  <jim@meyering.net>
17675
17676         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
17677
17678 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17679
17680         * modules/argz: Omit "#include".
17681
17682         * MODULES.html.sh (func_all_modules): Add calloc, to match
17683         2004-06-01 addition of calloc module.
17684
17685 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17686
17687         * m4/argz.m4: New file, which is autoupdated from libtool.
17688
17689 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17690
17691         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
17692         libtool.
17693
17694 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
17695
17696         * config/srclist-update: Don't insist on "USA." before the
17697         close-comment, as libtool omits the period and puts the */ on a
17698         separate line.
17699         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
17700         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
17701
17702 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
17703
17704         * modules/argz: New file.
17705         * MODULES.html.sh (func_all_modules): Add argz.
17706
17707 2004-06-12  Jim Meyering  <jim@meyering.net>
17708         and  Paul Eggert  <eggert@cs.ucla.edu>
17709
17710         * modules/hash (Files): Add lib/xalloc.h.
17711         * modules/pipe (Depends-on): Add wait-process.
17712         * modules/stat (Depends-on): Add xalloc.
17713         * modules/userspec (Files): Add lib/userspec.h.
17714         * modules/xstrto
17715
17716         Upgrade from gettext-0.13.
17717         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
17718         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
17719         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
17720
17721 2004-06-10  Jim Meyering  <jim@meyering.net>
17722
17723         * lib/calloc.c: New file.
17724
17725 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
17726
17727         * lib/getdate.y (yylex): Allow space between sign and number.
17728         Problem reported by Dan Jacobson.
17729
17730 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17731
17732         Merge from coreutils CVS.
17733
17734         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
17735         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
17736         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
17737         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
17738         xstrtol.m4: Fix copyright date and/or serial number.
17739
17740         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
17741         See if we need an fchown replacement.
17742         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
17743         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
17744         and use the replacement function if we detect either defect.
17745
17746         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
17747         gl_UTIMECMP.
17748
17749 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
17750         and  Jim Meyering  <jim@meyering.net>
17751
17752         Merge from coreutils CVS.
17753
17754         * lib/stat-macros.h: New file, with contents from file-type.h
17755         and coreutils' system.h.
17756         * lib/file-type.c: Include "stat-macros.h".
17757         * lib/file-type.h (file_type): Move all macro definitions to new file,
17758         stat-macros.h.
17759
17760         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
17761         Wrap old code with this conditional.
17762         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
17763         function that does not dereference symlinks.
17764         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
17765
17766         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
17767         dependency problems.
17768         (xreadlink): Accept new arg SIZE, for efficiency.
17769         All decls and uses changed.
17770         * lib/xreadlink.h: Include <stddef.h>, for size_t.
17771
17772         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
17773         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
17774
17775         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
17776         sysexits.h.
17777
17778 2004-06-01  Jim Meyering  <jim@meyering.net>
17779
17780         * m4/calloc.m4: New file.
17781
17782 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
17783
17784         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
17785         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
17786         Also, fix a typo in a diagnostic.
17787
17788 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17789
17790         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
17791         or AC_FUNC_REALLOC.
17792
17793 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
17794
17795         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
17796         macros to be defined.
17797         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
17798         the allocator returns NULL because the requested size is zero.
17799
17800 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
17801
17802         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
17803         var.  Add comment explaining why libc still defines it.  This
17804         merges the following patch from glibc:
17805         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
17806
17807 2004-05-20  Andreas Schwab  <schwab@suse.de>
17808
17809         * m4/free.m4: Replace free if it not known to work, not the other
17810         way round.
17811
17812 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
17813
17814         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
17815         present in glibc since revision 1.1 of this file.
17816         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
17817         obstack_alignment_mask, obstack_alloc, obstack_base,
17818         obstack_blank, obstack_blank_fast, obstack_chunk_size,
17819         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
17820         obstack_grow0, obstack_init, obstack_int_grow,
17821         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
17822         obstack_next_free, obstack_object_size, obstack_ptr_grow,
17823         obstack_ptr_grow_fast, obstack_room): Remove declarations of
17824         nonexistent functions.
17825
17826 2004-05-18  Karl Berry  <karl@gnu.org>
17827
17828         * config/srclist.txt: break link for vasnprintf.c.
17829
17830 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17831
17832         Port obstack to the AS/400, where pointers are 16 bytes wide and
17833         you cannot cast an integer to a valid pointer.  This patch is
17834         currently waiting to be integrated into glibc; see
17835         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
17836
17837         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
17838         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
17839         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
17840         (struct obstack): temp member is now a union of a pointer and
17841         an integer, instead of an integer.  All integer uses changed.
17842         This does not affect the physical layout of struct obstack,
17843         except on hosts (like the AS/400) where the size or alignment of
17844         void * is greater than that of ptrdiff_t.
17845         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
17846         __STDC__)]: Store temporary in pointer member of union, not
17847         integer member.
17848         * lib/obstack.c: Include <stddef.h>, for offsetof.
17849         (struct fooalign): Remove; it doesn't need a name.
17850         (union fooround): Change double to long double, and add void *.
17851         (DEFAULT_ALIGNMENT): Use offsetof to compute.
17852         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
17853         not a macro.  Hence the values are always int; so remove all
17854         casts-to-int in uses.
17855
17856 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
17857
17858         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
17859         we can get this patch merged into glibc.
17860
17861 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17862             Paul Eggert  <eggert@cs.ucla.edu>
17863
17864         * m4/argp: Depend on alloca.
17865
17866 2004-05-17  Derek R. Price  <derek@ximbiot.com>
17867             Paul Eggert  <eggert@cs.ucla.edu>
17868
17869         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
17870         freecoding.
17871
17872 2004-05-17  Bruno Haible  <bruno@clisp.org>
17873
17874         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
17875         precision that consists of a '.' followed by an empty digit string.
17876         Patch by Tor Lillqvist <tml@iki.fi>.
17877
17878 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17879
17880         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
17881         for backward compatibility with older code.  We need our own
17882         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
17883         it under some other name, and our alloca.h will define it.
17884
17885 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
17886             Derek Price  <derek@ximbiot.com>
17887
17888         * lib/alloca.c: Include <alloca.h>, to get our interface.
17889         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
17890         include <alloca.h> first.  Use C89 prototype for alloca; this
17891         requires including <stddef.h> for size_t.  Use extern "C" if C++.
17892         Use #elif for simplicity, since we can assume C89 now.
17893         Don't try to source the system alloca.h since it will not be found
17894         and to prevent recursively including its replacement.
17895         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
17896         * lib/regex.c: Likewise.
17897
17898 2004-05-16  Derek Price  <derek@ximbiot.com>
17899             Paul Eggert  <eggert@cs.ucla.edu>
17900
17901         getline cleanup.  This changes the getndelim2 API: both order of
17902         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
17903         no delimiter).
17904
17905         * lib/getline.c: Don't include stddef.h or stdio.h, since our
17906         interface does that.
17907         (getline): Always use getdelim, so that we don't have two
17908         copies of this code.
17909         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
17910         if available.
17911         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
17912         (GETNDELIM2_MAXIMUM): New macro.
17913         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
17914         instead of the old practice of delim2==0.  All callers changed.
17915         Return -1 on overflow, instead of returning junk.
17916         Do not set *linesize unless allocation succeeds.
17917         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
17918         that we include sys/types.h.
17919         * lib/getnline.h: Likewise.
17920         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
17921         (getndelim2): Reorder arguments.
17922         * lib/getnline.c (getnline, getndelim):
17923         Don't discard the NMAX argument.
17924         (getnline): Invoke getndelim, to avoid code duplication.
17925         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
17926         of (size_t) -1 by callers of the getnline family.
17927
17928 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17929
17930         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
17931         Check for gettimeofday.
17932         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
17933         Check for settimeofday, stime.
17934
17935 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
17936
17937         * lib/nanosleep.c (suspended): Change its type from int to
17938         sig_atomic_t volatile.
17939         (first_call): Make it private to rpl_nanosleep, and have it
17940         be zero initially as that's a bit faster.
17941         (my_usleep): Round up fractional times instead of truncating them,
17942         as this is the usual meaning for 'sleep'.
17943
17944         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
17945         doesn't work.
17946         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
17947         (ENOSYS): Define if not defined.
17948         (settime): Fall back on stime if it exists and settimeofday fails.
17949         But don't bother with fallbacks if a method fails with errno == EPERM.
17950
17951 2004-05-11  Jim Meyering  <jim@meyering.net>
17952
17953         Prior to this change, the save_cwd caller required read access to the
17954         current directory on most systems (ones with the fchdir function).
17955
17956         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
17957         fails, try write-only, and finally, resort to using xgetcwd.
17958
17959 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17960
17961         * lib/obstack.c, obstack.h: Import changes from libc.
17962
17963 2004-04-28  Bruno Haible  <bruno@clisp.org>
17964
17965         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
17966         also implicitly appends .exe to executables.
17967         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
17968         accepts Windows pathnames.
17969         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17970         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17971         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
17972         Treat Cygwin like Windows, since it now accepts Windows pathnames.
17973         Reported by Derek Robert Price <derek@ximbiot.com>.
17974
17975 2004-04-21  Karl Berry  <karl@gnu.org>
17976
17977         * config/srclist.txt (localcharset.c): break sync.
17978
17979 2004-04-20  Paul Eggert  <eggert@twinsun.com>
17980
17981         * m4/host-os.m4: Add a copyright notice.
17982
17983 2004-04-20  Jim Meyering  <jim@meyering.net>
17984
17985         Change UTILS_ to gl_ in AC_DEFINE'd names.
17986         Change utils_- and jm_-prefixed variables, too.
17987         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
17988         UTILS_FUNC_MKDIR_TRAILING_SLASH.
17989         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
17990
17991         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
17992         Don't emit trailing blanks.
17993         Also rename jm_-prefixed variables to have gl_ prefix.
17994
17995         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
17996         Also rename jm_-prefixed variables to have gl_ prefix.
17997
17998         * m4/jm-macros.m4: Reflect the renamings.
17999         * m4/prereq.m4: Likewise.
18000
18001 2004-04-20  Jim Meyering  <jim@meyering.net>
18002
18003         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
18004         memory.
18005
18006 2004-04-20  Jim Meyering  <jim@meyering.net>
18007             Bruno Haible  <bruno@clisp.org>
18008
18009         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
18010         memory when realloc fails.
18011
18012 2004-04-19  Jim Meyering  <jim@meyering.net>
18013
18014         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
18015         now that readutmp.c may call `free (0)'.
18016
18017 2004-04-19  Bruno Haible  <bruno@clisp.org>
18018
18019         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
18020         * m4/inttypes_h.m4: Likewise.
18021         * m4/stdint_h.m4: Likewise.
18022         * m4/intmax_t.m4: Likewise.
18023         * m4/uintmax_t.m4: Likewise.
18024
18025 2004-04-18  Jim Meyering  <jim@meyering.net>
18026
18027         * m4/prereq.m4: Don't forbid jm_ prefix.
18028
18029         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
18030         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
18031         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
18032         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
18033         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
18034         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
18035         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
18036         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
18037         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
18038         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
18039         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
18040         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
18041         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
18042         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
18043         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
18044         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
18045         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
18046         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
18047         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
18048
18049 2004-04-18  Jim Meyering  <jim@meyering.net>
18050
18051         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
18052         failure, don't leak memory and do call END_UTMP_ENT.
18053
18054 2004-04-16  Jim Meyering  <jim@meyering.net>
18055
18056         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
18057         coreutils' stat program.
18058         (gl_PREREQ): Don't require jm_PREREQ_STAT.
18059
18060 2004-04-11  Paul Eggert  <eggert@twinsun.com>
18061
18062         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
18063         C89.
18064         (CHAR_BIT): Remove, since we assume C89.
18065         Include <stdint.h> if available, as per current Autoconf CVS advice.
18066
18067 2004-03-31  Jim Meyering  <jim@meyering.net>
18068
18069         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
18070         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
18071         * m4/xalloc.m4: Likewise.
18072
18073 2004-03-30  Paul Eggert  <eggert@twinsun.com>
18074
18075         Merge from coreutils.
18076
18077         * m4/inttostr.m4: New file.
18078         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
18079         Require AM_STDBOOL_H and gl_TIMESPEC instead.
18080         Require gl_CLOCK_TIME.
18081         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
18082
18083 2004-03-30  Paul Eggert  <eggert@twinsun.com>
18084
18085         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
18086         not bool, to be more consistent with Unix conventions.
18087         Suggested by Bruno Haible.
18088
18089         Merge from coreutils.
18090
18091         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
18092         * lib/umaxtostr.c: New files.
18093
18094         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
18095         the usual <time.h> dance.
18096         (get_date): Change signature to support fractional time stamps.
18097         All callers changed.
18098         * lib/getdate.y: Include "getdate.h" first, as we can now
18099         assume C89 and don't need to worry about 'const'.
18100         Similarly, include "unlocked-io.h" near start, not in middle.
18101         Include <limits.h>.
18102         (textint.value): Use long int rather than int.
18103         (textint.digits): Use size_t rather than int.
18104         (BILLION, LOG10_BILLION): New constants.
18105         (parser_control): New member rel_ns.  Members day_ordinal,
18106         time_zone, month, day, hour, minutes, rel_year, rel_month,
18107         rel_day, rel_hour, rel_minutes, rel_seconds
18108         are now long int, not int.  Member seconds is now struct timespec,
18109         not int.  New member timespec_seen.  Members dates_seen, days_seen,
18110         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
18111         not int.
18112         (%union.intval): Now long int, not int.
18113         New member timespec.
18114         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
18115         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
18116         (spec): Now is a timespec or an item list.
18117         (timespec, items): New nonterminals.
18118         (time, rel, relunit, number, get_date):
18119         Add support for fractional seconds.
18120         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
18121         (gmtime, localtime, mktime): Remove decls; not needed with C89.
18122         (to_hour): First arg is now long int, not int.
18123         (to_year): Returns long int, not int.
18124         Don't treat year -70 like 70.
18125         (tm_diff): Returns long int, not int.
18126         (lookup_word): Use bool instead of int when appropriate.
18127         (yylex): Use size_t for count, not int.
18128         Detect overflow when parsing large integer constants.
18129         Add support for fractions.
18130         (get_date): Make pointers 'const' if possible.
18131         Use more-portable code to detect integer overflow.
18132         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
18133         Don't use ctime; it's not reliable if the year has >4 digits.
18134
18135         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
18136         This is for compatibility with BSD.
18137
18138         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
18139         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
18140         From coreutils' system.h.
18141
18142         * lib/userspec.c: Don't include "posixver.h".
18143         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
18144         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
18145         compatible extension.  Simplify code by removing a boolean int
18146         that was always nonzero if a string was nonnull.
18147
18148 2004-03-30  Jim Meyering  <jim@meyering.net>
18149
18150         Merge from coreutils.
18151
18152         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
18153         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
18154         on some systems one must include <grp.h> before it.
18155         Reported by Christian Krackowizer.
18156
18157 2004-03-30  Jim Meyering  <jim@meyering.net>
18158
18159         Merge from coreutils.
18160
18161         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
18162
18163         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
18164         an empty input stream.
18165
18166         * lib/readtokens.c: Include <stdbool.h>.
18167         (readtoken): Use `size_t' rather than int/long.
18168         All callers adjusted.
18169         Use `bool' rather than `int' where appropriate.
18170         Use memset rather than an explicit loop.
18171         Use x2nrealloc rather than xrealloc.
18172         Allow the use of `\0' as a delimiter.
18173         (readtokens): Likewise.
18174         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
18175
18176 2004-03-30  Jim Meyering  <jim@meyering.net>
18177
18178         * m4/realloc.m4: Remove file, since now it does no more than
18179         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
18180         the `configure.ac' section of module/realloc.
18181         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
18182
18183 2004-03-30  Bruno Haible  <bruno@clisp.org>
18184
18185         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
18186         nonnull.
18187
18188 2004-03-29  Paul Eggert  <eggert@twinsun.com>
18189
18190         Merge changes to getloadavg.c from coreutils and Emacs.
18191
18192         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
18193         Define to an expression, not to the empty string.
18194         Include cloexec.h and xalloc.h.
18195         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
18196         Use set_cloexec_flag rather than rolling our own.
18197         * lib/cloexec.c, lib/cloexec.h: New files.
18198
18199 2004-03-29  Paul Eggert  <eggert@twinsun.com>
18200
18201         * m4/cloexec.m4: New file.
18202
18203 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18204
18205         * lib/getopt.h: Sync with libc CVS.
18206
18207 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18208             Bruno Haible  <bruno@clisp.org>
18209
18210         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
18211         mbswidth.
18212
18213 2004-03-18  Paul Eggert  <eggert@twinsun.com>
18214             Bruno Haible  <bruno@clisp.org>
18215
18216         * lib/mbswidth.h: Include <wchar.h> only if
18217         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
18218         <wchar.h>.
18219         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
18220
18221 2004-03-09  Paul Eggert  <eggert@twinsun.com>
18222
18223         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
18224         Sync with libc CVS.
18225         * lib/getopt_int.h: New file, also synced from libc.
18226
18227 2004-03-09  Paul Eggert  <eggert@twinsun.com>
18228
18229         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
18230         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
18231         Bring back getopt.c, getopt.h, getopt1.c.
18232
18233 2004-03-07  Paul Eggert  <eggert@twinsun.com>
18234
18235         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
18236         All uses changed.  Check for sa_sigaction member; this fixes
18237         a bug first reported by Jason Andrade in
18238         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
18239
18240 2004-03-07  Paul Eggert  <eggert@twinsun.com>
18241
18242         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
18243         '#if' expressions.  Unlike the code it replaces, it does not
18244         depend on (defined _SC_PAGESIZE).  However, it does depend on
18245         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
18246         first reported by Jason Andrade in
18247         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
18248
18249 2004-02-25  Simon Josefsson  <jas@extundo.com>
18250
18251         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
18252
18253 2004-02-25  Simon Josefsson  <jas@extundo.com>
18254
18255         * lib/strdup.h: New file.
18256         * lib/strdup.c: Include it.
18257         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
18258         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
18259
18260 2004-02-23  Karl Berry  <karl@gnu.org>
18261
18262         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
18263         (from fencepost.gnu.org:/gd/gnuorg).
18264
18265 2004-02-23  Karl Berry  <karl@gnu.org>
18266
18267         * config/srclistvars.sh (GNUORG) [karl]: redefine.
18268         * config/srclist.txt: add maintain/standards documents.
18269
18270 2004-02-18  Bruno Haible  <bruno@clisp.org>
18271
18272         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
18273         Reported by Derek Robert Price <derek@ximbiot.com>.
18274
18275 2004-02-16  Karl Berry  <karl@gnu.org>
18276
18277         * config/mkinstalldirs, install-sh: update from automake.
18278
18279 2004-02-06  Karl Berry  <karl@gnu.org>
18280
18281         * m4/po.m4: update from gettext 0.14.1.
18282
18283 2004-02-06  Karl Berry  <karl@gnu.org>
18284
18285         * lib/config.charset: update from gettext 0.14.1.
18286
18287 2004-02-05  Paul Eggert  <eggert@twinsun.com>
18288
18289         Add comments and code, prompted by suggestions from Bruno Haible
18290         for sh-quote.
18291         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
18292         describing the enum quoting_style values.
18293         * lib/quotearg.c (quotearg_alloc): New function.
18294         (quotearg_buffer_restyled): Treat lone { and } as special.
18295         Treat = as special.  Work around bug with older shells
18296         that "see" a '\' that is really the 2nd byte of a multibyte char.
18297         Quote empty string with shell_quoting_style.
18298
18299 2004-02-03  Bruno Haible  <bruno@clisp.org>
18300
18301         * m4/pipe.m4: New file, from GNU gettext.
18302
18303 2004-02-03  Bruno Haible  <bruno@clisp.org>
18304
18305         * lib/pipe.h: New file, from GNU gettext.
18306         * lib/pipe.c: New file, from GNU gettext.
18307
18308 2004-01-27  Bruno Haible  <bruno@clisp.org>
18309
18310         * m4/execute.m4: New file, from GNU gettext.
18311
18312 2004-01-27  Bruno Haible  <bruno@clisp.org>
18313
18314         * lib/execute.h: New file, from GNU gettext.
18315         * lib/execute.c: New file, from GNU gettext.
18316         * lib/w32spawn.h: New file, from GNU gettext.
18317
18318 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18319
18320         Merge from diffutils.
18321
18322         * lib/file-type.c (file_type): Add typed memory objects.
18323         * lib/file-type.h (S_TYPEISTMO): New macro.
18324
18325         * lib/c-stack.h (c_stack_action): Remove argv argument.
18326         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
18327         (die): Don't calculate message unless segv_action returns.
18328         (get_stack_location, min_address_from_argv, max_address_from_argv,
18329         volatile stack_base, volatile_stack_size): Remove.
18330         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
18331         that every segmentation violation is a stack overflow.  (Ouch!)
18332         See Debian bug 136249 (still outstanding) for more info about why
18333         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
18334
18335 2004-01-24  Paul Eggert  <eggert@twinsun.com>
18336
18337         Exit-status fix from coreutils.
18338
18339         Use exit_failure consistently in place of EXIT_FAILURE,
18340         so that program exit statuses are consistent on failure.
18341
18342         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
18343         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
18344         * lib/argmatch.h: Comment fix to match the above.
18345         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
18346         Now a macro referring to exit_failure, instead of a separate
18347         variable.  Include "exitfail.h" to get it.
18348         * lib/xstrtol.h: Include "exitfail.h".
18349         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
18350
18351         * lib/long-options.c (parse_long_options): Use prototype
18352         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
18353         for clarity.
18354
18355 2004-01-21  Jim Meyering  <jim@meyering.net>
18356
18357         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
18358         so as not to conflict with a different-sized __mktime_internal
18359         function in GNU libc.
18360         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
18361         Problem building statically-linked `ls' reported by Michael Brunnbauer.
18362
18363 2004-01-20  Karl Berry  <karl@gnu.org>
18364
18365         * config/config.guess: update from config.
18366
18367         * config/srclistvars.sh: GNUWWWLICENSES for karl.
18368
18369 2004-01-20  Bruno Haible  <bruno@clisp.org>
18370
18371         Safer stack allocation.
18372         * lib/setenv.c: Include allocsa.h.
18373         (alloca): Remove fallback definition.
18374         (freea): Remove macro.
18375         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
18376         instead of freea.
18377
18378 2004-01-20  Bruno Haible  <bruno@clisp.org>
18379
18380         * m4/eealloc.m4: New file, from GNU gettext.
18381
18382 2004-01-20  Bruno Haible  <bruno@clisp.org>
18383
18384         * m4/allocsa.m4: New file, from GNU gettext.
18385
18386 2004-01-20  Bruno Haible  <bruno@clisp.org>
18387
18388         * lib/xallocsa.h: New file, from GNU gettext.
18389         * lib/xallocsa.c: New file, from GNU gettext.
18390
18391 2004-01-20  Bruno Haible  <bruno@clisp.org>
18392
18393         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
18394
18395 2004-01-20  Bruno Haible  <bruno@clisp.org>
18396
18397         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
18398         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
18399         specially.
18400
18401 2004-01-20  Bruno Haible  <bruno@clisp.org>
18402
18403         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
18404         patch.
18405
18406 2004-01-20  Bruno Haible  <bruno@clisp.org>
18407
18408         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
18409
18410 2004-01-20  Bruno Haible  <bruno@clisp.org>
18411
18412         * lib/eealloc.h: New file.
18413
18414 2004-01-20  Bruno Haible  <bruno@clisp.org>
18415
18416         * lib/binary-io.h: Avoid warnings on Cygwin.
18417
18418 2004-01-20  Bruno Haible  <bruno@clisp.org>
18419
18420         * lib/allocsa.h: New file, from GNU gettext.
18421         * lib/allocsa.c: New file, from GNU gettext.
18422
18423 2004-01-18  Karl Berry  <karl@gnu.org>
18424
18425         * doc/gpl.texi, doc/lgpl.texi: new files.
18426
18427 2004-01-18  Karl Berry  <karl@gnu.org>
18428
18429         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
18430         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
18431
18432 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18433
18434         Merge from coreutils.
18435
18436         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
18437         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
18438         (gl_DEFAULT_POSIX2_VERSION): Move
18439         the documentation from 'configure' into 'config.hin',
18440         so that 'configure --help' isn't burdened by it and
18441         we don't have to worry about its formatting there.
18442         Reword the documentation so that it's more succinct
18443         and can be run together into a single paragraph.
18444         * m4/same.m4 (gl_SAME): Check for pathconf.
18445
18446 2004-01-15  Paul Eggert  <eggert@twinsun.com>
18447
18448         Merge from coreutils.
18449
18450         * lib/posixver.c: Include posixver.h.
18451
18452         * lib/same.c: Include <stdbool.h>, <limits.h>.
18453         (_POSIX_NAME_MAX): Define if not defined.
18454         (MIN): New macro.
18455         (same_name): If file names are silently truncated, report
18456         that the file names are the same if they are the same after
18457         the silent truncation.
18458
18459         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
18460         conversion function.
18461         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
18462         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
18463         longer needed.
18464
18465 2004-01-15  Jim Meyering  <jim@meyering.net>
18466
18467         Merge from coreutils.
18468
18469         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
18470         if no library is required.
18471         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
18472         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
18473         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
18474         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
18475         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
18476         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
18477         value, $ac_cv_search_crypt, if it's "none required".
18478         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
18479         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
18480         not gl_FUNC_GETLOADAVG.
18481         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
18482         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
18483
18484 2004-01-15  Jim Meyering  <jim@meyering.net>
18485
18486         Merge from coreutils.
18487
18488         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
18489         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
18490         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
18491
18492         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
18493         optional configure-time default.
18494
18495         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18496
18497         * lib/xreadlink.c (xreadlink): Correct outdated comment.
18498
18499 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
18500
18501         Merge from coreutils.
18502
18503         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
18504         value, $ac_cv_search_nanosleep, if it's "none required".
18505
18506 2004-01-14  Paul Eggert  <eggert@twinsun.com>
18507
18508         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
18509         with like-named macro in fnmatch.c.
18510         (EXT): Use an internal constant instead.
18511
18512         Merge fnmatch patches from glibc.
18513         * lib/fnmatch.c (mbsinit): Remove define.
18514         Add libc_hidden_ver (__fnmatch, fnmatch).
18515         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
18516         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
18517
18518 2004-01-14  Karl Berry  <karl@gnu.org>
18519
18520         * config/install-sh: update from automake.
18521
18522 2004-01-13  Karl Berry  <karl@gnu.org>
18523
18524         * config/install-sh: update from automake.
18525
18526 2004-01-09  Karl Berry  <karl@gnu.org>
18527
18528         * config/install-sh: update from automake.
18529
18530 2004-01-05  Karl Berry  <karl@gnu.org>
18531
18532         * config/config.{sub,guess}: update from config.
18533
18534 2003-12-31  Karl Berry  <karl@gnu.org>
18535
18536         * config/depcomp: update from automake.
18537
18538 2003-12-14  Karl Berry  <karl@gnu.org>
18539
18540         * lib/config.charset: update from gettext-runtime.
18541
18542 2003-12-03  Paul Eggert  <eggert@twinsun.com>
18543
18544         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
18545         Bug reported by Alfred M. Szmidt.
18546
18547 2003-12-03  Bruno Haible  <bruno@clisp.org>
18548
18549         * m4/gettext.m4: Upgrade from gettext-0.13.
18550         * m4/po.m4: Upgrade from gettext-0.13.
18551         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
18552         * m4/intmax.m4: New file, from gettext-0.13.
18553         * m4/printf-posix.m4: New file, from gettext-0.13.
18554
18555 2003-11-29  Karl Berry  <karl@gnu.org>
18556
18557         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
18558
18559 2003-11-25  Paul Eggert  <eggert@twinsun.com>
18560             Bruno Haible  <bruno@clisp.org>
18561
18562         * lib/printf-parse.h: Don't include sys/types.h.
18563         (ARG_NONE): New macro.
18564         (char_directive): Change type of *arg_index fields to size_t.
18565         * lib/printf-parse.c: Don't include sys/types.h.
18566         (SSIZE_MAX): Remove macro.
18567         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
18568         Remove unnecessary overflow check.
18569         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
18570         fields.
18571
18572 2003-11-25  Bruno Haible  <bruno@clisp.org>
18573
18574         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
18575
18576 2003-11-25  Bruno Haible  <bruno@clisp.org>
18577
18578         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
18579         gt_TYPE_SSIZE_T.
18580
18581 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18582
18583         * modules/alloca: Remove dependency on xalloc.
18584
18585 2003-11-24  Paul Eggert  <eggert@twinsun.com>
18586
18587         * lib/alloca.c: Remove dependency on xalloc module.
18588         (xalloc_die): Remove.
18589         (memory_full) [!defined emacs]: New macro.
18590         [!defined emacs]: Don't include xalloc.h.
18591         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
18592         address arithmetic overflows.  Change datatypes a bit to avoid
18593         unnecessary casts.
18594
18595 2003-11-22  Jim Meyering  <jim@meyering.net>
18596
18597         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
18598         s/size/size_t/.
18599
18600 2003-11-21  Karl Berry  <karl@gnu.org>
18601
18602         * config/config.{sub,guess}: update from config.
18603
18604 2003-11-18  Karl Berry  <karl@gnu.org>
18605
18606         * config/config.{sub,guess}: update from config.
18607
18608         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
18609
18610 2003-11-17  Paul Eggert  <eggert@twinsun.com>
18611
18612         * README: Mention that S+T cannot overflow if S is the size of
18613         an existing object and T is sufficiently small.
18614
18615 2003-11-17  Jim Meyering  <jim@meyering.net>
18616
18617         On systems without utime and without a utimes function capable of
18618         dealing with a NULL struct utimbuf* argument, this utime replacement
18619         could -- in unusual circumstances -- leak a file descriptor.
18620         * lib/utime.c: Include <unistd.h> and <errno.h>.
18621         (utime_null): Be sure to close `fd' and to preserve errno.
18622         Reported by Geoff Collyer via Arnold Robbins.
18623
18624 2003-11-17  Bruno Haible  <bruno@clisp.org>
18625
18626         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
18627         (Depends-on): Add xsize.
18628
18629 2003-11-17  Bruno Haible  <bruno@clisp.org>
18630
18631         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
18632
18633 2003-11-17  Bruno Haible  <bruno@clisp.org>
18634
18635         * lib/vasnprintf.c (alloca): Remove fallback definition.
18636         (freea): Remove definition.
18637         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
18638         Reported by Paul Eggert.
18639
18640 2003-11-16  Paul Eggert  <eggert@twinsun.com>
18641             Bruno Haible  <bruno@clisp.org>
18642
18643         Protect against address arithmetic overflow.
18644         * lib/printf-args.h: Include stddef.h.
18645         (arguments): Change type of field 'count' to size_t.
18646         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
18647         'unsigned int' where appropriate.
18648         * lib/printf-parse.h: Include sys/types.h.
18649         (char_directive): Change type of *arg_index fields to ssize_t.
18650         (char_directives): Change type of fields 'count', max_*_length to
18651         size_t.
18652         * lib/printf-parse.c: Include sys/types.h and xsize.h.
18653         (SSIZE_MAX): Define fallback value.
18654         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
18655         instead of 'int' where appropriate. Check a_allocated, d_allocated
18656         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
18657         * lib/vasnprintf.c: Include xsize.h.
18658         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
18659         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
18660         overflow. Avoid wraparound when converting a width or precision from
18661         decimal to binary.
18662
18663 2003-11-16  Bruno Haible  <bruno@clisp.org>
18664
18665         Update from GNU gettext.
18666         * lib/printf-parse.c: Generalize to it can be compiled for wide
18667         strings.
18668         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
18669         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
18670         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
18671         SNPRINTF): New macros.
18672         Don't include <alloca.h> if the file is used inside libintl.
18673         (local_wcslen): New function, for Solaris 2.5.1.
18674         (VASNPRINTF): Use it instead of wcslen.
18675
18676 2003-11-16  Bruno Haible  <bruno@clisp.org>
18677
18678         * lib/xsize.h (xmax): New function.
18679         (xsum, xsum3, xsum4): Declare as "pure" functions.
18680
18681 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18682
18683         * modules/xalloc (Files): Undo latest change, since xalloc.h
18684         no longer needs SIZE_MAX or PTRDIFF_MAX.
18685
18686 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18687
18688         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
18689         gl_PTRDIFF_MAX.
18690
18691 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18692
18693         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
18694         "return", to pacify some unknown compiler.  Problem reported
18695         by Joerg Schilling.
18696
18697 2003-11-12  Paul Eggert  <eggert@twinsun.com>
18698
18699         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
18700         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
18701         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
18702         heuristic is just as accurate as far as we know, and it removes a
18703         dependency on size_max.m4 and ptrdiff_max.m4.
18704
18705 2003-11-11  Bruno Haible  <bruno@clisp.org>
18706
18707         * modules/xsize (Files): Add m4/size_max.m4.
18708         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
18709
18710 2003-11-11  Bruno Haible  <bruno@clisp.org>
18711
18712         * m4/size_max.m4: New file.
18713         * m4/ptrdiff_max.m4: New file.
18714         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
18715         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
18716         (gl_XALLOC): Invoke it.
18717
18718 2003-11-11  Bruno Haible  <bruno@clisp.org>
18719
18720         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
18721         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
18722         defined.
18723
18724 2003-11-10  Paul Eggert  <eggert@twinsun.com>
18725
18726         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
18727         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
18728         rejected some allocations of exactly SIZE_MAX - 2 bytes.
18729         From Bruno Haible.
18730         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
18731         not (size_t) -1, since it's defined here.
18732
18733 2003-11-09  Karl Berry  <karl@gnu.org>
18734
18735         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
18736
18737 2003-11-06  Paul Eggert  <eggert@twinsun.com>
18738
18739         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
18740         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
18741         Reject sizes of exactly SIZE_MAX bytes.
18742         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
18743         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
18744
18745 2003-11-05  Bruno Haible  <bruno@clisp.org>
18746
18747         * lib/xsize.h: Include limits.h, to avoid a possible collision with
18748         SIZE_MAX defined in <limits.h> on Solaris.
18749
18750 2003-11-04  Jim Meyering  <jim@meyering.net>
18751
18752         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
18753         variable names, rather than @VAR@.
18754         * modules/poll: Likewise.
18755
18756 2003-11-04  Bruno Haible  <bruno@clisp.org>
18757
18758         * modules/xsize: New file.
18759         * modules/linebreak: Depend on xsize.
18760         * MODULES.html.sh (func_all_modules): Add xsize.
18761
18762 2003-11-04  Bruno Haible  <bruno@clisp.org>
18763
18764         * m4/xsize.m4: New file.
18765
18766 2003-11-04  Bruno Haible  <bruno@clisp.org>
18767
18768         * lib/xsize.h: New file.
18769         * lib/linebreak.c: Include xsize.h.
18770         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
18771         argument for overflow.
18772         Suggested by Paul Eggert.
18773
18774 2003-11-03  Karl Berry  <karl@gnu.org>
18775
18776         * config/config.{guess,sub}: update from config.
18777
18778 2003-11-03  Jim Meyering  <jim@meyering.net>
18779
18780         * modules/userspec (lib_SOURCES): Add userspec.h.
18781         (Include): Add "userspec.h".
18782         Improve description.
18783
18784 2003-11-03  Jim Meyering  <jim@meyering.net>
18785
18786         * lib/userspec.c: Include "userspec.h".
18787         * lib/userspec.h: New file.
18788
18789 2003-11-03  Bruno Haible  <bruno@clisp.org>
18790
18791         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
18792
18793 2003-11-03  Bruno Haible  <bruno@clisp.org>
18794
18795         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
18796         available, to avoid (extremely rare) race condition.
18797         Suggested by Paul Eggert.
18798
18799 2003-11-02  Karl Berry  <karl@gnu.org>
18800
18801         * config/srclist.txt (vasprintf.c): sync broken, sigh.
18802
18803 2003-10-31  Paul Eggert  <eggert@twinsun.com>
18804
18805         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
18806         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
18807         (read_filesystem_list): Set and use me_type_malloced.
18808         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
18809         whatever the type happens to be), for brevity and consistency.
18810         Check for size calculation overflow on Alphas running OSF/1.
18811
18812 2003-10-31  Jim Meyering  <jim@meyering.net>
18813
18814         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
18815
18816         * lib/linebuffer.c: Include <string.h> for declaration of memset.
18817
18818 2003-10-30  Paul Eggert  <eggert@twinsun.com>
18819             Bruno Haible  <bruno@clisp.org>
18820
18821         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
18822         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
18823
18824 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
18825
18826         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
18827         netbsd*-gnu*.  Suggested by Robert Millan.
18828
18829 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18830
18831         * modules/group-member: Depend on stdbool.
18832
18833 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18834
18835         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
18836
18837 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18838
18839         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
18840         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
18841         after the 'gnu' in these cases.  This fixes some bugs in the
18842         previous change, and is based on suggestions by Robert Millan.
18843
18844 2003-10-29  Paul Eggert  <eggert@twinsun.com>
18845
18846         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
18847         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
18848         no longer needed.
18849         * lib/quotearg.c (quotearg_n_options): Use it.
18850         * lib/group-member.c: Include <stdbool.h>.
18851         (free_group_info): Arg is now const *; don't free arg.
18852         (get_group_info): Now returns bool and accepts struct group_info *,
18853         rather than returning a malloc'ed struct group_info *.
18854         All uses changed.  Check for overflow in internal size calculation.
18855
18856         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
18857         rather than xmalloc/xrealloc.
18858         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
18859         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
18860         conformance bug: the old code used a pointer after freeing the
18861         storage that it addressed.
18862         * lib/hash.c (hash_initialize): Simplify the code by using
18863         xalloc_oversized rather than doing it by hand.
18864         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
18865         the buffer preserved.  Use free and xmalloc instead.
18866         * lib/quotearg.c (quotearg_n_options): Likewise.
18867         Use a simpler test for size overflow.  Don't use xalloc_oversized
18868         because unsigned int might be wider than size_t (!); this suggests
18869         that we should switch from unsigned int to size_t for slot numbers.
18870
18871 2003-10-28  Paul Eggert  <eggert@twinsun.com>
18872
18873         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
18874         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
18875         NetBSD kernels.  Requested by Richard Stallman.
18876
18877 2003-10-27  Paul Eggert  <eggert@twinsun.com>
18878
18879         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
18880         to allocate the returned structure.  Do not allocate a subarray,
18881         as x2nrealloc will do that.
18882         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
18883         instead of xnrealloc.
18884         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
18885
18886 2003-10-27  Bruno Haible  <bruno@clisp.org>
18887
18888         * lib/stdbool_.h: Better support for BeOS.
18889
18890 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18891
18892         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
18893         now uses inline.
18894
18895 2003-10-26  Paul Eggert  <eggert@twinsun.com>
18896
18897         * lib/xalloc.h (xalloc_oversized): New static inline function, for
18898         callers that want to do their own size-overflow checking.  Include
18899         <stdbool.h>, since xalloc_oversized returns bool.
18900         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
18901         to use xalloc_oversized.
18902
18903         Add two functions x2realloc, x2nrealloc, for programs that grow
18904         arrays dynamically by doubling their sizes.
18905         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
18906         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
18907         New functions.
18908
18909         Port to C99 semantics for 'inline' of external functions.
18910         Bug reported by Bruno Haible.
18911         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
18912         with the old contents of xnmalloc.
18913         (xnmalloc, xmalloc): Use it.
18914         (xnrealloc_inline): New static inline function,
18915         with the old contents of xnrealloc.
18916         (xnrealloc, xrealloc): Use it.
18917
18918         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
18919         that.
18920
18921 2003-10-26  Karl Berry  <karl@gnu.org>
18922
18923         * config/srclist.txt (COPYING.DOC): no longer available from
18924         /gd/gnuorg; don't know where the ultimate source is.
18925
18926 2003-10-25  Paul Eggert  <eggert@twinsun.com>
18927
18928         Fix several address-calculation bugs in the hash modules,
18929         plus some minor code cleanup.
18930
18931         * lib/hash.h: Include <stdbool.h>, for bool.
18932         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
18933         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
18934         hash_get_n_entries, hash_get_max_bucket_length,
18935         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
18936         hash_rehash): Use size_t rather than unsigned.
18937         * lib/hash.c (struct hash_table, hash_get_n_buckets,
18938         hash_get_n_buckets_used, hash_get_n_entries,
18939         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
18940         hash_get_entries, hash_do_for_each, hash_string, is_prime,
18941         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
18942         Likewise.
18943         (SIZE_MAX): Define if not defined.
18944         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
18945         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
18946         hash_print):
18947         Use const * when possible.
18948         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
18949         (check_tuning): Fix bug: if tuning parameters were very close to
18950         0 or 1, rounding errors could have caused subscript violations.
18951         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
18952         (hash_initialize): Add 'fail:' label
18953         to free table and return NULL, and use it to simplify code.
18954         Use calloc rather than clearing the storage ourself.
18955         (hash_initialize, hash_rehash): Check for arithmetic overflow in
18956         buffer size calculations.
18957         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
18958         Include <stddef.h>, for size_t.
18959         * lib/hash-pjw.c (hash_pjw): Likewise.
18960         Switch to method described by Bruno Haible.
18961         Include <limits.h>, for CHAR_BIT.
18962         (SIZE_BITS): New macro.
18963
18964 2003-10-23  Paul Eggert  <eggert@twinsun.com>
18965
18966         * m4/getline.m4 (AM_FUNC_GETLINE):
18967         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
18968         hosts.  Problem reported by Derek Robert Price in
18969         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
18970         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
18971         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
18972
18973 2003-10-21  Paul Eggert  <eggert@twinsun.com>
18974
18975         * lib/getndelim2.c (getndelim2): When size calculation overflows,
18976         ceiling the allocation at NMAX bytes rather than silently
18977         discarding input bytes before NMAX is reached.  This makes
18978         a difference only if NMAX exceeds SIZE_MAX / 2.
18979
18980         * lib/obstack.c: Merge from glibc.
18981         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
18982         Add libc_hidden_def (_obstack_newchunk).
18983         (_obstack_free) [! defined _LIBC]: Remove.
18984         [defined _LIBC]: Make a strong alias from obstack_free, rather than
18985         a clone of the function body.
18986         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
18987         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
18988
18989         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
18990         glibc.
18991         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
18992         arg to memcpy.
18993
18994         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
18995         (obstack_ptr_grow_fast, obstack_int_grow_fast):
18996         Don't use lvalue casts, as GCC plans to remove support for them
18997         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
18998         was also present in the non-GCC version, indicating that this
18999         code had always been buggy and had never been widely used.
19000         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
19001         Use the fast variant of each macro, rather than copying the
19002         definiens of the fast variant; that way, we'll be more likely to
19003         catch future bugs in the fast variants.
19004
19005 2003-10-20  Bruno Haible  <bruno@clisp.org>
19006
19007         * modules/wait-process: New file.
19008         * MODULES.html.sh (func_all_modules): Add wait-process.
19009
19010 2003-10-20  Bruno Haible  <bruno@clisp.org>
19011
19012         * m4/wait-process.m4: New file.
19013
19014 2003-10-20  Bruno Haible  <bruno@clisp.org>
19015
19016         * lib/wait-process.h: New file, from GNU gettext.
19017         * lib/wait-process.c: New file, from GNU gettext.
19018
19019 2003-10-19  Jim Meyering  <jim@meyering.net>
19020
19021         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
19022         HPUX 10.20.
19023
19024 2003-10-18  Karl Berry  <karl@gnu.org>
19025
19026         * config/config.guess: update from config.
19027
19028 2003-10-16  Paul Eggert  <eggert@twinsun.com>
19029
19030         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
19031         (getgroups): First arg is int, not size_t.
19032         Don't let 'free' mangle errno.
19033
19034 2003-10-16  Paul Eggert  <eggert@twinsun.com>
19035
19036         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
19037
19038 2003-10-16  Karl Berry  <karl@gnu.org>
19039
19040         * config/config.{guess,sub}: update from config.
19041
19042 2003-10-16  Jim Meyering  <jim@meyering.net>
19043
19044         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
19045         memcpy.
19046
19047 2003-10-15  Paul Eggert  <eggert@twinsun.com>
19048
19049         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
19050         (SIZE_MAX): Remove.
19051         (new_exclude, add_exclude_file): Initial size no longer needs to
19052         be a power of 2.
19053         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
19054         our own address arithmetic overflow checking.
19055
19056         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
19057         (fnmatch): Do not alloca more than 2000 wide characters;
19058         instead, use malloc for large buffers.
19059         Check for address arithmetic overflow, and return -1
19060         with errno set to ENOMEM in that case.
19061         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
19062         (NEW_PATTERN): Do not alloca more than 8000 bytes;
19063         instead, return -1.  Check for address arithmetic overflow.
19064
19065 2003-10-14  Paul Eggert  <eggert@twinsun.com>
19066
19067         Handle invalid suffixes and overflow independently, so that
19068         callers can treat them independently as needed.  Fix some bugs in
19069         suffix handling, e.g., "100k@" was not diagnosed as an invalid
19070         suffix for a human-readable blocksize.  The major caller-visible
19071         change is the addition of a new
19072         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
19073         that both overflow and suffix chars were found.
19074
19075         * lib/human.c (humblock): Don't check separately for invalid suffix
19076         char; that is xstrtoumax's job (now that its bug is fixed).
19077         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
19078         INTMAX_MAX]: New macros.
19079         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
19080         TYPE_MAXIMUM): New macros.
19081         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
19082         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
19083         if overflow occurs, as it's what __strtol does and it's more useful
19084         in practice.
19085         (__xstrtol): If __strtol reports some error other than ERANGE,
19086         reflect it to the caller as LONGINT_INVALID.  If it reports
19087         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
19088         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
19089         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
19090         value.
19091         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
19092         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
19093         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
19094         [defined UINTMAX_MAX]: New macros.
19095
19096 2003-10-14  Bruno Haible  <bruno@clisp.org>
19097
19098         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
19099
19100 2003-10-14  Bruno Haible  <bruno@clisp.org>
19101
19102         * m4/sig_atomic_t: New file, from GNU gettext.
19103         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
19104
19105 2003-10-14  Bruno Haible  <bruno@clisp.org>
19106
19107         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
19108         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
19109         Also use volatile where needed.
19110
19111 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19112
19113         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
19114         Change maintainer from Bruno Haible to 'all'.
19115
19116 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19117
19118         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
19119
19120 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19121
19122         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
19123         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
19124         and define in terms of the other primitives.
19125         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
19126         (SIZE_MAX): Define if not already defined.
19127         (array_size_overflow): New function.
19128         (xalloc_die): Abort instead of exiting if 'error' returns.
19129         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
19130         (xmalloc, xrealloc): Use them.
19131         (xcalloc): Check for address arithmetic overflow.
19132         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
19133         a bit faster than strcpy.
19134
19135 2003-10-10  Simon Josefsson  <jas@extundo.com>
19136
19137         * modules/argp (Depends-on): Add restrict and strcase.
19138
19139 2003-10-10  Simon Josefsson  <jas@extundo.com>
19140
19141         * m4/argp.m4: Add AC_C_INLINE.
19142
19143 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19144
19145         Merge getpass from libc, plus a few fixes.
19146
19147         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
19148         Include <stdbool.h>.
19149         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
19150         __fsetlocking to empty.
19151         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
19152         do include <bits/libc-lock.h>.
19153         Do not include <fcntl.h>; not needed.
19154         [_LIBC]: Include <wchar.h>.
19155         (NOTCANCEL_MODE): New macro.
19156         (flockfile, funlockfile) [_LIBC]: New macros.
19157         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
19158         [!_LIBC]: New macros.
19159         (call_fclose): New function.
19160         (getpass): Use it.  Save tty stream separately; this simplifies the
19161         code and makes it more reliable if stdin happens to equal stdout.
19162         Invoke __fsetlocking on tty.
19163         Handle thread cancellation if needed.
19164         Namespace cleanup (use __tcgetattr, __getline).
19165         Use bool for Booleans.
19166         [USE_IN_LIBIO]: Handle wide streams.
19167         [!_LIBC]: Unconditionally do the fseek, since we don't know what
19168         stream might go where.
19169
19170         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
19171         doesn't have to include <stdio.h> before us.
19172         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
19173         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
19174         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
19175         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
19176         if not declared, so that we can use getpass.c code from libc without
19177         rewriting it.
19178         (flockfile, ftrylockfile, funlockfile): New macros.
19179
19180 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19181
19182         * modules/getpass: Depend on stdbool.
19183
19184 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19185
19186         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
19187
19188 2003-10-07  Karl Berry  <karl@gnu.org>
19189
19190         * config/config.{guess,sub}: update from config.
19191
19192 2003-10-06  Jim Meyering  <jim@meyering.net>
19193             Bruno Haible  <bruno@clisp.org>
19194
19195         This lets translators provide better translations for the
19196         "Written by ..." part of --version output.
19197         * lib/version-etc.h: Include stdarg.h.
19198         (version_etc_copyright): Declare as readonly.
19199         (version_etc): Make this function variadic with a NULL-terminated list
19200         of author name strings.
19201         (version_etc_va): New declaration.
19202         * lib/version-etc.c: Include stdarg.h, stdlib.h.
19203         (version_etc_copyright): Declare as readonly.
19204         (version_etc_va): New function. Provide a different translatable string
19205         for each possible number of authors < 10. Abbreviate when there are 10
19206         authors or more.
19207         (version_etc): Make this function variadic. Call version_etc_va.
19208         Suggestion from Gary V. Vaughan.
19209
19210         * lib/long-options.h (parse_long_options): Change prototype: the
19211         authors string is moved to the end and becomes variadic.
19212         * lib/long-options.c: Include stdarg.h.
19213         (parse_long_options): Make this function variadic, too.
19214         Call version_etc_va, not version_etc.
19215
19216 2003-10-06  Bruno Haible  <bruno@clisp.org>
19217
19218         * modules/version-etc-2: Remove file.
19219         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
19220
19221 2003-10-06  Bruno Haible  <bruno@clisp.org>
19222
19223         * modules/fatal-signal: New file.
19224         * MODULES.html.sh (func_all_modules): Add fatal-signal.
19225
19226 2003-10-06  Bruno Haible  <bruno@clisp.org>
19227
19228         * m4/fatal-signal.m4: New file.
19229         * m4/signalblocking.m4: New file, from GNU gettext.
19230
19231 2003-10-06  Bruno Haible  <bruno@clisp.org>
19232
19233         * lib/version-etc-2.h: Remove file.
19234         * lib/version-etc-2.c: Remove file.
19235
19236 2003-10-06  Bruno Haible  <bruno@clisp.org>
19237
19238         * lib/fatal-signal.h: New file, from GNU gettext.
19239         * lib/fatal-signal.c: New file, from GNU gettext.
19240
19241 2003-10-05  Paul Eggert  <eggert@twinsun.com>
19242
19243         * README: Rework advice for preventing empty .o files.
19244         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
19245         not <sys/types.h>.
19246
19247 2003-10-04  Karl Berry  <karl@gnu.org>
19248
19249         * lib/argp*: update from libc.
19250
19251 2003-10-04  Karl Berry  <karl@gnu.org>
19252
19253         * config/config.{guess,sub}: update from config.
19254
19255 2003-10-02  Bruno Haible  <bruno@clisp.org>
19256
19257         * modules/lchown (Include): Add lchown.h.
19258         * modules/time_r (Include): Use "..." syntax.
19259         * modules/xgetdomainname (Include): Add xgetdomainname.h.
19260
19261 2003-10-01  Simon Josefsson  <jas@extundo.com>
19262
19263         * MODULES.html.sh (func_all_modules): Move gethostname from section
19264         'based on' to section 'lacking' POSIX:2001.
19265
19266 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
19267
19268         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
19269         to output mode on the same stream.
19270
19271 2003-09-29  Paul Eggert  <eggert@twinsun.com>
19272
19273         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
19274         Fix arg typo in previous patch.
19275
19276 2003-09-28  Jim Meyering  <jim@meyering.net>
19277
19278         * lib/error.c: Correct cpp indentation.
19279
19280 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19281
19282         * modules/free: New file.
19283
19284 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19285
19286         * m4/free.m4: New file.
19287
19288 2003-09-27  Paul Eggert  <eggert@twinsun.com>
19289
19290         * lib/minmax.h (MIN, MAX)
19291         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
19292         Omit the special code that used __typeof__, since we worry that
19293         it could be more trouble than it's worth.  See:
19294         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
19295         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
19296
19297         * lib/free.c: New file.
19298
19299 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
19300
19301         Trivial fixes to Makefile.am parts of module listings.
19302         * modules/strstr: Append strstr.h to lib_SOURCES.
19303         * modules/strcase: Likewise, for strcase.h.
19304
19305 2003-09-27  Karl Berry  <karl@gnu.org>
19306
19307         * config/mkinstalldirs: update from automake.
19308
19309 2003-09-26  Paul Eggert  <eggert@twinsun.com>
19310
19311         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
19312         (error_tail): Do not loop, reallocating temporary buffer, since
19313         the output cannot contain more wide characters than the input
19314         contains bytes, the size must be big enough already.  This avoids
19315         one potential size overflow calculation.  Check for size overflow
19316         when calculating temporary buffer size.  Free temporary buffer
19317         when done, if it was allocated with malloc; this plugs a memory
19318         leak.  Remove casts from void * to pointers, that are no longer
19319         needed now that we're assuming C89 or better.
19320
19321         Merge error changes from glibc.
19322
19323         * lib/error.c, error.h: Update copyright notice header to match glibc.
19324         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
19325         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
19326         Disable cancellation while printing error.
19327         * lib/error.h: Prepend __ to parameter names.
19328
19329 2003-09-26  Jim Meyering  <jim@meyering.net>
19330
19331         * lib/error.c (error_tail): Move some declarations
19332         into inner scope where the local variables are used.
19333
19334 2003-09-26  Bruno Haible  <bruno@clisp.org>
19335
19336         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
19337         stpncpy().
19338         Don't define stpncpy through config.h; it's now done through stpncpy.h.
19339
19340 2003-09-26  Bruno Haible  <bruno@clisp.org>
19341
19342         * lib/stpncpy.h (gnu_stpncpy): New declaration.
19343         (stpncpy): Define as alias for gnu_stpncpy.
19344         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
19345
19346 2003-09-25  Simon Josefsson  <jas@extundo.com>
19347
19348         * lib/xgetdomainname.h: New file.
19349         * lib/xgetdomainname.c: New file.
19350
19351 2003-09-25  Simon Josefsson  <jas@extundo.com>
19352             Bruno Haible  <bruno@clisp.org>
19353
19354         * modules/getdomainname: New file.
19355         * modules/xgetdomainname: New file.
19356         * MODULES.html.sh (func_all_modules): Add getdomainname,
19357         xgetdomainname.
19358
19359 2003-09-25  Simon Josefsson  <jas@extundo.com>
19360             Bruno Haible  <bruno@clisp.org>
19361
19362         * m4/getdomainname.m4: New file.
19363
19364 2003-09-25  Simon Josefsson  <jas@extundo.com>
19365             Bruno Haible  <bruno@clisp.org>
19366
19367         * lib/getdomainname.h: New file.
19368         * lib/getdomainname.c: New file.
19369
19370 2003-09-25  Karl Berry  <karl@gnu.org>
19371
19372         * lib/argp-fmtstream.c, argp-help.c: update from libc.
19373
19374 2003-09-25  Karl Berry  <karl@gnu.org>
19375
19376         * config/install-sh: update from automake.
19377
19378 2003-09-25  Bruno Haible  <bruno@clisp.org>
19379
19380         * modules/version-etc-2: New file, from modules/version-etc with
19381         modifications.
19382         * MODULES.html.sh (func_all_modules): Add version-etc-2.
19383
19384 2003-09-25  Bruno Haible  <bruno@clisp.org>
19385
19386         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
19387         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
19388
19389 2003-09-24  Simon Josefsson  <jas@extundo.com>
19390
19391         * modules/xgethostname: Add xgethostname.h.
19392
19393 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19394
19395         * lib/linebuffer.c (freebuffer): Don't free the argument, just
19396         the buffer associated with the argument.  Bug reported by
19397         Simon Josefsson.
19398
19399 2003-09-24  Paul Eggert  <eggert@twinsun.com>
19400
19401         * README: Document assumptions that 'int' is at least 32 bits
19402         wide, that integer arithmetic is 2's complement without overflow,
19403         that there are no holes in integer values, that adding sizes of
19404         two nonoverlapping objects can't overflow, and that all-bits-zero
19405         yields scalar zero.  Fix spelling and capitalization typos.
19406
19407 2003-09-19  Karl Berry  <karl@gnu.org>
19408
19409         * lib/argp.h: update from libc.
19410
19411 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19412
19413         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
19414         to avoid spurious warnings like "AC_RUN_IFELSE was called before
19415         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
19416
19417 2003-09-17  Paul Eggert  <eggert@twinsun.com>
19418
19419         * gnulib-tool: Use "test -h", not "test -L", for portability
19420         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
19421         (tags_regexp): Remove, since \| doesn't conform to POSIX.
19422         (sed_extract_prog): Issue s commands one-by-one, rather than
19423         using \| in one s command.
19424
19425 2003-09-16  Paul Eggert  <eggert@twinsun.com>
19426
19427         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
19428         input error, instead of returning NULL the next time we are called
19429         (and therefore losing track of errno).
19430
19431 2003-09-16  Bruno Haible  <bruno@clisp.org>
19432
19433         * gnulib-tool (func_create_testdir): Warn about duplicated
19434         dependencies.
19435
19436 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19437
19438         * modules/argmatch, modules/fatal, modules/obstack,
19439         modules/xalloc, modules/xgethostname: Sort dependencies by
19440         importance, not alphabetically.
19441
19442 2003-09-15  Paul Eggert  <eggert@twinsun.com>
19443
19444         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
19445         fails, so that the caller gets the proper errno.
19446
19447         * lib/readutmp.c (read_utmp): Likewise.
19448         Check for fstat error.  Close stream and free storage
19449         when failing.
19450
19451 2003-09-14  Karl Berry  <karl@gnu.org>
19452
19453         * config/srclist.txt (strdup.c): disable for c89 changes.
19454
19455 2003-09-14  Jim Meyering  <jim@meyering.net>
19456
19457         * lib/getloadavg.c: Correct cpp indentation.
19458         * lib/strdup.c: Likewise.
19459         * lib/vasnprintf.c: Likewise.
19460
19461 2003-09-14  Bruno Haible  <bruno@clisp.org>
19462
19463         * modules/fwriteerror: New file.
19464         * MODULES.html.sh (func_all_modules): Add fwriteerror.
19465
19466 2003-09-14  Bruno Haible  <bruno@clisp.org>
19467
19468         * lib/fwriteerror.h: New file.
19469         * lib/fwriteerror.c: New file.
19470
19471 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19472
19473         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
19474         modules/xgethostname, modules/xalloc: Depend on exit.
19475
19476 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19477
19478         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
19479
19480         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
19481         and AC_MINIX, too, so that their extensions are available.
19482
19483         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
19484         This macro has been superseded by gl_BACKUPFILE.
19485
19486         More patches to assume C89 or better.
19487
19488         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
19489
19490         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
19491         unconditionally.
19492         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
19493         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
19494         Include <string.h>, <stdlib.h> unconditionally.
19495         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
19496         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
19497         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
19498         headers or for string.h.
19499         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
19500         or strtoul.
19501
19502         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
19503         headers.
19504         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
19505         * m4/userspec.m4 (gl_USERSPEC): Likewise.
19506         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
19507         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
19508         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
19509         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
19510         memcpy, memset.
19511         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
19512         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
19513         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
19514         strtol.
19515         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
19516         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
19517         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
19518         strtoul.
19519
19520 2003-09-12  Paul Eggert  <eggert@twinsun.com>
19521
19522         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
19523         * lib/obstack.c [!defined _LIBC]: Likewise.
19524         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
19525         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
19526         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
19527
19528         More changes to assume C89 or better.
19529
19530         * lib/error.c (error_tail): Assume vprintf.
19531
19532         * lib/argmatch.c (getenv): Remove decl.
19533         * lib/progreloc.c (get_full_program_name): Define via prototype.
19534         * lib/setenv.c (clearenv): Likewise.
19535         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
19536         needed.
19537         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
19538         (malloc, memcpy): Remove decls.
19539         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
19540         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
19541         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19542         (memcpy): Remove macro.
19543         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
19544         (__P): Remove.  All uses removed.
19545         (PTR): Remove.  All uses changed to void *.
19546         (CHAR_BIT, NULL): Remove.
19547         (spaces, zeros, memset_space, memset_zero)
19548         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
19549         Remove.
19550         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
19551         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
19552         Define with prototype.
19553         Remove now-unnecessary prototype decl.
19554         (extra_args_spec): Assume ANSI C.  All uses changed.
19555         (extra_args_spec_iso): Remove.
19556         (my_strftime, emacs_strftimeu): Define via prototype.
19557         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
19558         unconditionally.
19559         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
19560         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
19561         (strtoul, strtol): Remove decls.
19562         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
19563         LONG_MAX): Remove.
19564         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
19565         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
19566         (LOCALE_PARAM_PROTO): New macro.
19567         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
19568         (INTERNAL (strtol), strtol): Define with a prototype.
19569         (PARAMS): Remove.  All uses removed.
19570         * lib/tempname.c: Include <string.h> unconditionally.
19571         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
19572         * lib/xgethostname.c (main): Define with a prototype.
19573         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
19574         Include <stdlib.h> unconditionally.
19575         (calloc, malloc, realloc, free): Remove decls.
19576         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
19577         Include <stdlib.h> unconditionally.  Sort include file names.
19578         (strtod): Remove.
19579         (xstrtod): Define with a prototype.
19580         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
19581         (strtol, strtoul): Remove decls.
19582
19583 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19584
19585         More patches to assume C89 or better.
19586         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
19587         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
19588         string.h, memchr, STDC_HEADERS.
19589
19590 2003-09-11  Paul Eggert  <eggert@twinsun.com>
19591
19592         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
19593         Include <stdlib.h>, <string.h> unconditionally.
19594         Remove now-unnecessary cast to char *.
19595         * lib/strnlen.c: Include <string.h> unconditionally.
19596         * lib/yesno.c (yesno): Define with a prototype.
19597
19598 2003-09-11  Bruno Haible  <bruno@clisp.org>
19599
19600         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
19601
19602 2003-09-10  Jim Meyering  <jim@meyering.net>
19603
19604         * lib/error.c: Correct indentation of cpp directives.
19605
19606 2003-09-10  Bruno Haible  <bruno@clisp.org>
19607
19608         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
19609         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
19610         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
19611         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
19612         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
19613         <stdlib.h> and <string.h> checks.
19614         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
19615         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
19616
19617 2003-09-10  Bruno Haible  <bruno@clisp.org>
19618
19619         * lib/strcspn.c: Include <string.h> unconditionally.
19620         * lib/strpbrk.c: Include <string.h> unconditionally.
19621         * lib/strstr.c: Include <string.h> unconditionally.
19622         * lib/unicodeio.c: Include <string.h> unconditionally.
19623         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
19624         * lib/unsetenv.c: Likewise.
19625         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
19626         * lib/yesno.c: Include <stdlib.h> unconditionally.
19627         (rpmatch): Add prototype.
19628
19629 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19630
19631         More patches to assume C89 or better.
19632         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
19633         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
19634         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
19635         or for string.h.
19636         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
19637         stdlib.h.
19638         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
19639         C headers.
19640         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
19641         string.h.
19642         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
19643         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
19644         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
19645         or for string.h.
19646         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
19647         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
19648         C headers.
19649         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
19650         memcpy.
19651         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
19652         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
19653         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
19654         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
19655         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
19656         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
19657         string.h, free.
19658         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
19659         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
19660         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
19661         C headers, or for string.h.
19662         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
19663         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
19664         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
19665         headers, memory.h, stdlib.h, string.h, strings.h.
19666         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
19667         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
19668         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
19669         strchr.
19670         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
19671         headers, memory.h, string.h.
19672         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
19673         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
19674         free.
19675         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
19676         headers.
19677         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
19678         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
19679         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
19680         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
19681         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
19682
19683 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19684
19685         More K&R removal.
19686
19687         * lib/acosl.c (main): Use a prototype.
19688         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
19689         tanl.c: Likewise.
19690
19691         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
19692
19693         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
19694         (getopt, etopt_long, getopt_long_only, _getopt_internal)
19695         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
19696         with a prototype.
19697         * lib/getopt.c (const): Remove macro.
19698         Include <string.h> unconditionally.
19699         (my_index): Remove; all uses changed to strchr.
19700         (strlen): Remove decl.
19701         (exchange): Remove forward decl; no longer needed.
19702         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
19703         Define with prototype.
19704         * lib/getopt1.c (const): Remove macro.
19705         (getopt_long, getopt_long_only, main): Define with prototype.
19706
19707         * lib/getugroups.c: Include <string.h> unconditionally.
19708
19709         * lib/getusershell.c: Include <stdlib.h> unconditionally.
19710         (getusershell, setusershell, endusershell, readname, main):
19711         Define with prototypes.
19712
19713         * lib/group-member.c: Include group-member.h first.
19714         Include <stdlib.h> unconditionally.
19715
19716         * lib/hard-locale.c: Include hard-locale.h first.
19717         Include <stdlib.h>, <string.h> unconditionally.
19718
19719         * lib/hash.c (free, malloc): Remove decls.
19720         Include <stdlib.h> unconditionally.
19721
19722         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
19723         (getenv): Do not declare.
19724
19725         * lib/idcache.c: Include <string.h> unconditionally.
19726
19727         * lib/long-options.c: Include long-options.h first, to test interface.
19728         Include <stdlib.h> unconditionally.
19729
19730         * lib/makepath.c: Include makepath.h first, to test interface.
19731         Include <stdlib.h> and <string.h> unconditionally.
19732
19733         * lib/linebuffer.c: Include <stdlib.h>.
19734         (free): Remove decl.
19735
19736         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
19737         stddef.h. rpl_malloc returns void *, not char *.
19738         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
19739         prototype.
19740
19741         * lib/md5.h: Include <limits.h> unconditionally.
19742         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
19743         (__P): Remove; all uses removed.
19744         * lib/md5.c: Include "md5.h" first.
19745         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
19746         md5_buffer, md5_process_bytes, md5_process_block):
19747         Define with prototypes.
19748         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
19749         * lib/sha.c: Include "sha.h" first.
19750         Include <stdlib.h>, <string.h> unconditionally.
19751
19752         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
19753         * lib/memcmp.c (__ptr_t): Likewise.
19754         * lib/memrchr.c (__ptr_t): Likewise.
19755         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
19756         Include <string.h> unconditionally.
19757         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
19758         * lib/memchr.c: Include <stdlib.h> unconditionally.
19759         * lib/memchr.c (LONG_MAX): Remove.
19760         * lib/memrchr.c (LONG_MAX): Likewise.
19761         * lib/memchr.c (__memchr): Define via a prototype.
19762         * lib/memrchr.c (__memrchr): Likewise.
19763         * lib/memcmp.c (__P): Remove, and remove all uses.
19764         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
19765         Remove forward decls; no longer needed.
19766         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
19767         Use types required by C89 in prototype.
19768
19769         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
19770         * lib/savedir.c: Likewise.
19771         * lib/mkdir.c (free): Remove decl.
19772         * lib/rmdir.c (rmdir): Define with a prototype.
19773         * lib/savedir.c: Include savedir.h first, to test interface.
19774
19775         * lib/mktime.c (STDC_HEADERS): Remove.
19776         Include <stdlib.h>, <string.h> unconditionally.
19777
19778         * lib/modechange.c: Include <stdlib.h> unconditionally.
19779         (malloc): Remove decl.
19780
19781         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
19782         (free): Remove decl.
19783
19784         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
19785         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
19786         (This type really should be intptr_t, but that's a C99ism.)
19787         (_obstack_memcpy): Remove: all uses changed to memcpy.
19788         Include <string.h> unconditionally.
19789         (struct obstack): Assume __STDC__ for types of members
19790         chunkfun, freefun, extra_arg.
19791         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
19792         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
19793         obstack_begin, obstack_specify_allocation,
19794         obstack_specify_allocation_with_arg, obstack_chunkfun,
19795         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
19796         Remove unprototyped decls and the macros that use them.
19797         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
19798         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
19799         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
19800         (defined __STDC__ && __STDC__)]:
19801         Remove nonprototyped code.
19802         Include <stdlib.h> unconditionally.
19803         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
19804         _obstack_allocated_p, _obstack_free, obstack_free,
19805         _obstack_memory_used, print_and_abort):
19806         Define using prototypes.
19807         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
19808         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
19809         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
19810         obstack_next_free, obstack_object_size, obstack_room) [0]:
19811         Remove unused, unprototyped code.
19812
19813         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
19814
19815         * lib/physmem.c (physmem_total, physmem_available, main): Define
19816         with prototypes.
19817
19818         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
19819         (main): Define with a prototype.
19820
19821         * lib/posixver.c (getenv): Remove decl.
19822
19823         * lib/putenv.c (malloc): Returns void *, not char *.
19824         Include <string.h> unconditionally.
19825         (strchr, memcpy, NULL): Do not define.
19826
19827         * lib/readtokens.c: Include readtokens.h first, to test interface.
19828         Include <stdlib.h>, <string.h> unconditionally.
19829         (init_tokenbuffer): Define with a prototype.
19830
19831         * lib/regex.c (PARAMS): Remove.  All uses removed.
19832         All uses of _RE_ARGS removed, too.
19833         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
19834         unconditionally.
19835         (bzero): Assume memset exists.
19836         (memcmp, memcpy, NULL): Remove.
19837         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
19838         char, or assignments to local vars of type signed char.
19839         (init_syntax_once, PREFIX(extract_number_and_incr),
19840         PREFIX(print_partial_compiled_pattern),
19841         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
19842         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
19843         PREFIX(regex_grow_registers), PREFIX(regex_compile),
19844         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
19845         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
19846         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
19847         wcs_compile_range, byte_compile_range, truncate_wchar,
19848         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
19849         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
19850         count_mbs_length, wcs_re_match_2_internal,
19851         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
19852         PREFIX(alt_match_null_string_p),
19853         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
19854         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
19855         regfree, PREFIX(extract_number)): Define with prototype.  Remove
19856         now-unnecessary declaration, if any.
19857         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
19858         regcomp, regexec):
19859         Remove now-unnecessary casts among pointer types.
19860         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
19861
19862         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
19863         (free): Remove decl.
19864
19865         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
19866
19867         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
19868         (free): Remove decl.
19869
19870         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
19871         * lib/xgetcwd.c: Likewise.
19872
19873         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
19874         (free): Remove decl.
19875
19876         * lib/strchrnul.c (strchrnul): Define with a prototype.
19877         Fix bug: c_in was not converted to char before searching.
19878
19879         The following changes are not K&R related:
19880
19881         * lib/group-member.h: Include <sys/types.h>, so that this file is
19882         self-contained.
19883         * lib/makepath.h: Likewise.
19884
19885         * lib/getusershell.c (readname, default_index, line_size, readname):
19886         Use size_t, not int, for sizes.
19887         (readname): If the size overflows, report an error instead of
19888         looping forever.
19889
19890 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19891
19892         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
19893         libc.
19894
19895 2003-09-09  Paul Eggert  <eggert@twinsun.com>
19896
19897         * README: New section: portability guidelines.
19898
19899 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19900
19901         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
19902         C89 spec.
19903
19904 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
19905
19906         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
19907
19908 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19909
19910         Assume C89 or better; remove K&R cruft.
19911         A few of these changes were first proposed by Derek Robert Price
19912         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
19913
19914         * lib/addext.c: Include <string.h> unconditionally.
19915         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
19916         Don't declare getenv or malloc.
19917
19918         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
19919         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
19920         (NULL): Remove.
19921         (find_stack_direction, alloca): Use prototypes.
19922
19923         * lib/atexit.c (atexit): Define using a prototype.
19924
19925         * lib/basename.c, dirname.c, stripslash.c:
19926         Include <string.h> unconditionally.
19927
19928         * lib/bcopy.c: Include <stddef.h>.
19929         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
19930
19931         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
19932
19933         * lib/error.h (error, error_at_line, error_print_progname)
19934         [! (defined (__STDC__) && __STDC__)]: Remove decls.
19935         * lib/error.c: Include error.h first, to check interface.
19936         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19937         (VA_START): Remove; all uses changeed to va_start.
19938         (exit, strerror): Remove decls.
19939         (error_print_progname): Prototype uncondionally.
19940         Don't include <errno.h>; no longer needed.
19941         (private_strerror): Remove.
19942         (error_tail): Always define.
19943         (error, error_at_line): Assume C89 or better; always use prototypes.
19944         * lib/fatal.c: Include "fatal.h" first, to test interface.
19945         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
19946         (VA_START): Remove; all uses changed to va_start.
19947         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
19948         this case.
19949         (exit): Remove decl.
19950         (fatal): Prototype unconditionally.  Assume va_start works.
19951         Abort at end, to pacify gcc.
19952
19953         * lib/euidaccess.c (main): Define with a prototype.
19954
19955         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
19956
19957         * lib/exitfail.c: Include <stdlib.h> unconditionally.
19958
19959         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
19960         prototypes.
19961         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
19962         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
19963         (getenv): Remove decl.
19964         (fnmatch): Define using a prototype.
19965         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
19966         (FCT): Define using a prototype.
19967
19968         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
19969
19970         * lib/gethostname.c: Include <stddef.h>.
19971         (gethostname): Define with prototype.  Length is size_t, not int.
19972
19973 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19974
19975         Assume C89 or better; remove K&R cruft.
19976         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
19977         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
19978         string.h, getenv, malloc.
19979         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
19980         headers.
19981         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
19982         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
19983         do not check for strerror.
19984         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
19985         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
19986         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
19987         do not check for doprnt or vprintf.
19988         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
19989         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
19990
19991 2003-09-08  Paul Eggert  <eggert@twinsun.com>
19992
19993         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
19994         getversion.c should have been removed then, but was accidentally
19995         preserved.
19996
19997         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
19998         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
19999
20000 2003-09-08  Karl Berry  <karl@gnu.org>
20001
20002         * config/config.sub, config.guess, srclistvars.sh: update from savannah
20003                 config, forget about prep.
20004
20005         * config/depcomp, missing: update from automake.
20006
20007 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20008
20009         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
20010         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20011
20012 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20013
20014         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
20015         copy_tm_result.  Bug reported by Simon Josefsson in
20016         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20017
20018 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20019
20020         * m4/time_r.m4: New file.
20021         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
20022         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
20023         is. Check for timegm declaration.
20024         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
20025         Do not check for gmtime_r.
20026         Replace mktime if __mktime_internal does not exist and if mktime
20027         hasn't been replaced already.
20028
20029 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20030
20031         * lib/time_r.c, lib/time_r.h: New files.
20032
20033         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
20034         __localtime_r.
20035         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
20036         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
20037
20038         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
20039         __gmtime_r.
20040         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
20041         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
20042         Include <time_r.h>.
20043
20044         * lib/timegm.c: Switch to glibc implementation, with the following
20045         changes:
20046         [defined HAVE_CONFIG_H]: Include <config.h>.
20047         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
20048         (__mktime_internal) [!defined _LIBC]: New decl.
20049         (__gmtime_r) [!defined _LIBC]: New macro and function.
20050         (timegm): Use a prototype, since gnulib assumes C89.
20051         Do not bother declaring tmp to be const, as it's not really usefu.
20052         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
20053         (timegm): Declare only if HAVE_DECL_TIMEGM.
20054
20055 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20056
20057         * MODULES.html.sh (func_all_modules): Add time_r.
20058         * modules/time_r: New file.
20059         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
20060         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
20061
20062 2003-09-03  Paul Eggert  <eggert@twinsun.com>
20063
20064         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
20065         Bug reported by Lute Kamstra in
20066         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
20067
20068         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
20069         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
20070         course with correspondingly smaller numbers for tomorrow and
20071         yesterday.  From Tadayoshi Funaba.  Originally installed into
20072         sh-utils on 1999-08-07, but the patch got lost (I guess during the
20073         coreutils merge?).
20074
20075 2003-08-31  Simon Josefsson  <jas@extundo.com>
20076
20077         * modules/timegm: New file.
20078         * MODULES.html.sh (func_all_modules): Add timegm.
20079
20080 2003-08-31  Simon Josefsson  <jas@extundo.com>
20081
20082         * m4/timegm.m4: New file.
20083
20084 2003-08-31  Simon Josefsson  <jas@extundo.com>
20085
20086         * lib/timegm.h: New file.
20087         * lib/timegm.c: New file.  Based on
20088         wget-1.8.2/src/http.c:mktime_from_utc.
20089
20090 2003-08-31  Karl Berry  <karl@gnu.org>
20091
20092         * lib/argp.h: update from libc.
20093
20094 2003-08-28  Bruno Haible  <bruno@clisp.org>
20095
20096         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
20097         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
20098         followed by '#define fnmatch fnmatch_posix' gives an error.
20099
20100 2003-08-28  Bruno Haible  <bruno@clisp.org>
20101
20102         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
20103         warning on QNX, which defines O_BINARY to 000000.
20104
20105 2003-08-27  Jim Meyering  <jim@meyering.net>
20106
20107         * m4/mkstemp.m4: Require that the system mkstemp be able to create
20108         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
20109         would fail after 32.  Reported by Danny Levinson.  Details here:
20110         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
20111
20112 2003-08-24  Bruno Haible  <bruno@clisp.org>
20113
20114         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
20115         MSVC7 <stdio.h> is included later.
20116
20117 2003-08-22  Simon Josefsson  <jas@extundo.com>
20118
20119         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
20120
20121 2003-08-20  Karl Berry  <karl@gnu.org>
20122
20123         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
20124
20125 2003-08-20  Bruno Haible  <bruno@clisp.org>
20126
20127         * modules/progname: New file.
20128         * MODULES.html.sh (func_all_modules): Add progname.
20129
20130 2003-08-20  Bruno Haible  <bruno@clisp.org>
20131
20132         * lib/progname.h: New file, from GNU gettext.
20133         * lib/progname.c: New file, from GNU gettext.
20134         * lib/progreloc.c: New file, from GNU gettext.
20135
20136 2003-08-19  Jim Meyering  <jim@meyering.net>
20137
20138         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
20139         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
20140
20141 2003-08-19  Bruno Haible  <bruno@clisp.org>
20142
20143         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
20144         more.
20145
20146 2003-08-19  Bruno Haible  <bruno@clisp.org>
20147
20148         * lib/xstrdup.c: Assume <string.h> exists.
20149
20150 2003-08-18  Paul Eggert  <eggert@twinsun.com>
20151
20152         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
20153         in makefile rules.
20154
20155 2003-08-18  Jim Meyering  <jim@meyering.net>
20156
20157         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
20158         * m4/lib-ld.m4: Likewise.
20159
20160 2003-08-18  Jim Meyering  <jim@meyering.net>
20161
20162         * lib/setenv.h: Indent nested cpp directive.
20163         * lib/vasnprintf.c: Remove trailing blanks.
20164
20165 2003-08-17  Simon Josefsson  <jas@extundo.com>
20166
20167         * modules/xstrndup: New file.
20168         * MODULES.html.sh (func_all_modules): Add xstrndup.
20169
20170 2003-08-17  Simon Josefsson  <jas@extundo.com>
20171
20172         * modules/argp: Fix autoconf macro name. Add more dependencies.
20173
20174 2003-08-17  Simon Josefsson  <jas@extundo.com>
20175
20176         * m4/xstrndup.m4: New file.
20177
20178 2003-08-17  Simon Josefsson  <jas@extundo.com>
20179
20180         * m4/argp.m4: New file.
20181
20182 2003-08-17  Simon Josefsson  <jas@extundo.com>
20183             Bruno Haible  <bruno@clisp.org>
20184
20185         * lib/xstrndup.h: New file.
20186         * lib/xstrndup.c: New file.
20187
20188 2003-08-17  Bruno Haible  <bruno@clisp.org>
20189
20190         * modules/strndup (Files, Include): Add lib/strndup.h.
20191
20192 2003-08-17  Bruno Haible  <bruno@clisp.org>
20193
20194         * modules/euidaccess (Files): Add lib/euidaccess.h.
20195
20196 2003-08-17  Bruno Haible  <bruno@clisp.org>
20197
20198         * lib/strndup.h: New file.
20199
20200 2003-08-17  Bruno Haible  <bruno@clisp.org>
20201
20202         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
20203         like AC_GNU_SOURCE.
20204         * modules/extensions (configure.ac): Comment out the invocation of
20205         gl_USE_SYSTEM_EXTENSIONS.
20206
20207 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20208
20209         Merges from coreutils, etc.
20210         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
20211         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
20212         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
20213         fixing a typo.
20214         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
20215         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
20216
20217 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20218
20219         Document merge from coreutils.
20220         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
20221         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
20222         * modules/utime: Add m4/utimes-null.m4.
20223
20224 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20225
20226         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
20227         space, undoing this 2003-08-12 change:
20228         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
20229
20230 2003-08-16  Paul Eggert  <eggert@twinsun.com>
20231
20232         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
20233         strtoul.c from libc, undoing this 2003-08-12 change:
20234         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
20235
20236 2003-08-16  Jim Meyering  <jim@meyering.net>
20237
20238         Merges from coreutils.
20239         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
20240         prefix.  Adjust cache variables similarly.  Create 500 rather than
20241         just 300 files, to exercise bug on Darwin6.5, too.
20242         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
20243         $missing_dir.
20244         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
20245         AM_SYS_POSIX_TERMIOS.
20246         Reported by mkc@mathdogs.com.
20247         Also change use of $am_cv_sys_posix_termios
20248         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
20249         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
20250         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
20251         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
20252         in /proc/mounts until it finds one with matching device number.  This
20253         is unnecessary when the FILE argument *is* a mount point.  No stat call
20254         is necessary in that case.  So, disable the statvfs-testing code on
20255         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
20256         as RedHat bug# 84846.
20257         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
20258         to 1MB, so as not to render systems with no stack size limit (e.g.,
20259         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
20260         Include <unistd.h>.  On some systems,
20261         it is required for the definition of _SC_PAGESIZE.
20262
20263 2003-08-16  Jim Meyering  <jim@meyering.net>
20264
20265         Merge from coreutils.
20266         * lib/xstrtoimax.c: #else #if -> #elif.
20267         * lib/xstrtoumax.c: Likewise.
20268
20269 2003-08-16  Jim Meyering  <jim@meyering.net>
20270
20271         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
20272         * m4/utimes.m4: Removed.
20273         * m4/utimes-null.m4: Renamed from utimes.m4.
20274
20275         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
20276         to 1MB, so as not to render systems with no stack size limit (e.g.,
20277         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
20278         Include <unistd.h>.  On some systems,
20279         it is required for the definition of _SC_PAGESIZE.
20280
20281 2003-08-16  Jim Meyering  <jim@meyering.net>
20282         and Paul Eggert  <eggert@cs.ucla.edu>
20283
20284         Merges from coreutils, etc.
20285
20286         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
20287         using the latest version from cvs.  This avoids problems with #line
20288         directives using a vendor (Sun) compiler.
20289         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
20290         Don't set GETGROUPS_LIB here; now it's
20291         done via getgroups.m4's wrapper function.
20292         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
20293         rather than just in sh-util/configure.in, so that the
20294         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
20295         same.
20296         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
20297         AC_FUNC_GETLOADAVG where to find getloadavg.c.
20298         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
20299         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
20300         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
20301         Remove code that is now done by the newly-required macros.
20302         Append $(EXEEXT) to DF_PROG.
20303         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
20304         Do not invoke or require the following here,
20305         since prereq.m4 or some gnulib .m4 now does this for us:
20306         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
20307         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
20308         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
20309         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
20310         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
20311         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
20312         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
20313         AC_FUNC_OBSTACK.
20314         Do not replace the following functions, as this is now the job
20315         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
20316         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
20317         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
20318         atexit getpass, strdup, getpagesize.
20319         Replace 'raise'.
20320         Do not check for the following functions, as this is now the job
20321         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
20322         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
20323         setregid.
20324         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
20325         Check for sys/sysctl.h.
20326         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
20327         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
20328         of checking for ssize_t ourselves.
20329
20330         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
20331         Require every macro that gnulib/modules/* suggests for us.
20332         (jm_PREREQ_ADDEXT): New macro.
20333         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
20334         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
20335
20336         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
20337         (gl_PHYSMEM): Use it.
20338         Also check for `table' function.
20339         Check for new headers and functions.
20340         Add check for sys/sysmp.h.
20341         With suggestions from Kaveh Ghazi.
20342         Ignore headers that are present but cannot be compiled.  This
20343         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
20344         C 5.4.
20345
20346 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20347
20348         Document merge from coreutils.
20349         * modules/userspec: Depend on posixver.
20350         * modules/strftime: Depend on tzset.
20351
20352 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20353
20354         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
20355         rather than tab, after '#' in shell-script copyright notices.
20356         Suggested by Bruno Haible.
20357
20358 2003-08-15  Paul Eggert  <eggert@twinsun.com>
20359
20360         * config/srclist-update: Use three spaces, rather than tab, after '#'
20361         in shell-script copyright notices.  Suggested by Bruno Haible.
20362         Remove unnecessary parenthesization in regular expression.
20363
20364 2003-08-15  Jim Meyering  <jim@meyering.net>
20365
20366         Merge from coreutils.
20367         * lib/xgethostname.c: Include <stdlib.h>.
20368         (xghostname): Don't exit for anything other than memory-related
20369         failure; just return NULL.
20370         * lib/userspec.c: Include "posixver.h".
20371         (parse_user_spec): Accept `.' as a separator only
20372         in pre-POSIX-200112 mode.
20373         * lib/strtoimax.c: Use #elif rather than #else #if.
20374         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
20375         Remove function, now that we can rely on a working tzset function.
20376         [!_LIBC]: Ensure that the required autoconf test has been run.
20377         [!defined _NL_CURRENT && HAVE_STRFTIME]:
20378         Use underlying_strftime for %r.
20379         * lib/sha.c: Merge in some clean-up and optimization changes from
20380         glibc.
20381         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
20382         Ensure that it is a multiple of 64.
20383         Rearrange loop exit tests so as to avoid performing an
20384         additional fread after encountering an error or EOF.
20385         * lib/realloc.c: Update copyright date.
20386
20387 2003-08-15  Jim Meyering  <jim@meyering.net>
20388         and Paul Eggert  <eggert@twinsun.com>
20389
20390         Merge from coreutils.
20391         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
20392         member but strut utmpx does not.  Needed for AIX 4.3.3.
20393         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
20394
20395 2003-08-15  Jim Meyering  <jim@meyering.net>
20396         and Paul Eggert  <eggert@cs.ucla.edu>
20397
20398         Merges from coreutils, etc.
20399         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
20400         Require gl_FUNC_TZSET_CLOBBER.
20401         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
20402         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
20403         members.
20404
20405 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20406
20407         Help the merge from coreutils.
20408         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
20409         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
20410         * m4/tzset.m4: Use it too.
20411
20412 2003-08-14  Paul Eggert  <eggert@twinsun.com>
20413
20414         * modules/tzset: New file.
20415
20416 2003-08-14  Jim Meyering  <jim@meyering.net>
20417
20418         Merges from coreutils.
20419         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
20420         variable names, rather than @FNMATCH_H@.
20421         * modules/alloca: Likewise for $(ALLOCA_H).
20422
20423         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
20424         the three copies of the literal target, `fnmatch.h'.
20425         * modules/alloca (alloca.h): Likewise.
20426
20427 2003-08-14  Jim Meyering  <jim@meyering.net>
20428
20429         Merge from coreutils.
20430         * m4/tzset.m4: New file.
20431         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
20432         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
20433         otherwise, AIX 5.1 systems would end up using the latter.
20434         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
20435         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
20436         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
20437         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
20438
20439 2003-08-14  Jim Meyering  <jim@meyering.net>
20440
20441         Merge from coreutils.
20442         * lib/obstack.h: Whitespace changes.
20443         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
20444         and xcalloc return values.
20445         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
20446         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
20447         hang on OSF/1 5.1 for DIR on both local and remote file systems.
20448         Reported by (and fix confirmed by) Nelson H. F. Beebe.
20449         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20450         error from mntctl.
20451         Use mntctl's return value to drive the entry-processing loop, since
20452         we can't rely on the value of the vmt_length member in the last
20453         entry.  On some systems doing so could result in exhausting
20454         virtual memory.  Based in part on a patch from Mike Jetzer.
20455
20456 2003-08-14  Jim Meyering  <jim@meyering.net>
20457         and Paul Eggert  <eggert@twinsun.com>
20458
20459         Merges from coreutils, plus other fixes.
20460         * lib/physmem.c: Merge in portability changes from gcc/libiberty
20461         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
20462         for credits and details.  Thanks to Kaveh Ghazi for helping
20463         to keep these files in sync.
20464         (ARRAY_SIZE): Define it.
20465         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
20466         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
20467         (memcasecmp): Don't assume size_t fits in unsigned int.
20468         Remove casts and duplicate code.
20469         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
20470         (memcpy): Remove definition.
20471         Merge in some clean-up and optimization changes from glibc.
20472         [BLOCKSIZE]: Move definition to top of file.
20473         Ensure that it is a multiple of 64.
20474         Rearrange loop exit tests so as to avoid performing an
20475         additional fread after encountering an error or EOF.
20476         * lib/md5.h (md5_uintptr): Define.
20477         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
20478         return to the initial working directory.  Preserve errno
20479         for caller.
20480         * lib/idcache.c: Include "xalloc.h".
20481         (xmalloc, xrealloc): Remove decls.
20482         (getuser): Remove casts no longer required in C89.
20483         * lib/human.c: Include stdio.h, for sprintf.
20484         * lib/group-member.c: Include "xalloc.h".
20485         (xmalloc, xrealloc): Remove decls.
20486         (get_group_info): Remove casts no longer required in C89.
20487         * lib/getusershell.c (readname): Remove casts no longer required in
20488         C89.
20489         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
20490         * lib/getline.c: Whitespace fix, from coreutils.
20491
20492 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20493
20494         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
20495         Check for isascii.
20496
20497         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20498         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20499         Undo previous (whitespace-only) change.
20500
20501 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20502
20503         * lib/exclude.c: Include <ctype.h>
20504         (IN_CTYPE_DOMAIN): New macro.
20505         (is_space): New fn.
20506         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
20507         and empty lines.
20508
20509         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20510         Undo previous (whitespace-only) change.
20511
20512 2003-08-13  Paul Eggert  <eggert@twinsun.com>
20513
20514         * config/srclist-update: Change update back to the old behavior,
20515         leaving whitespace alone.  Use one 'sed' command rather than a
20516         pipeline.
20517         (fixlicense): Now a variable, not a function.
20518         (remove_trailing_blanks): Remove.
20519         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
20520         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20521         Undo previous (whitespace-only) change.
20522
20523 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20524
20525         Merge from coreutils.
20526         * modules/euidaccess: Add lib_SOURCES, include for new
20527         file euidaccess.h
20528
20529 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20530
20531         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
20532         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
20533         Normalize leading white space and remove trailing white space.
20534
20535         Merge from coreutils
20536         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
20537
20538         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
20539         0.12.1.  These files are now being upgraded automatically by
20540         ../config/srclist-update.
20541
20542 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20543
20544         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
20545         Normalize leading white space and remove trailing white space.
20546         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
20547         notice, as per ../config/srclist-update.
20548
20549         Merge from coreutils.
20550         * lib/euidaccess.h: New file.
20551         * lib/euidaccess.c: Include it.
20552         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
20553         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
20554         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
20555
20556 2003-08-12  Paul Eggert  <eggert@twinsun.com>
20557
20558         * config/srclist-update: Add copyright notice.
20559         (remove_id_lines, remove_trailing_blanks): New constants.
20560         (fixfile): Use them to normalize spacing a bit in copied files.
20561         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
20562         Normalize leading white space and remove trailing white space.
20563
20564         * config/texinfo.tex: Sync with texinfo.
20565
20566         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
20567         strtoul.c from libc, to merge coreutils whitespace changes.
20568
20569         * config/srclist.txt: Get the following m4 files from gettext:
20570         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
20571         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
20572         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
20573         wint_t.m4.
20574
20575 2003-08-12  Karl Berry  <karl@gnu.org>
20576
20577         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
20578         been made.
20579
20580 2003-08-11  Paul Eggert  <eggert@twinsun.com>
20581
20582         * modules/gnu-source, m4/gnu-source.m4:
20583         Remove; we're assuming Autoconf 2.54 or later now.
20584         Suggested by Bruno Haible.
20585         * MODULES.html.sh (func_all_modules): Remove gnu-source.
20586
20587 2003-08-11  Bruno Haible  <bruno@clisp.org>
20588
20589         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
20590
20591 2003-08-11  Bruno Haible  <bruno@clisp.org>
20592
20593         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
20594         (vasnprintf): Use it instead of wcslen.
20595
20596 2003-08-11  Bruno Haible  <bruno@clisp.org>
20597
20598         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
20599         value to ensure that _Bool promotes to int. Use #define for _Bool when
20600         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
20601
20602 2003-08-10  Karl Berry  <karl@gnu.org>
20603
20604         * lib/regex.h: update from libc (whitespace fix).
20605
20606 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20607
20608         Merge some files from coreutils.  These changes were
20609         originally made by Jim Meyering.
20610         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
20611         many older Unixes require this.
20612         * lib/alloca.c (alloca): Remove cast to argument of free;
20613         no longer needed in C89.
20614         * lib/alloca_.h, regex.h: Fix white space to match
20615         what GNU indent does.
20616
20617 2003-08-09  Paul Eggert  <eggert@twinsun.com>
20618
20619         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
20620         apparently Emacs's Unicode mode got confused before my 2003-08-05
20621         checkin.
20622
20623 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20624
20625         * m4/extensions.m4: New file.
20626         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
20627         Require gl_USE_SYSTEM_EXTENSIONS.
20628         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
20629         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
20630
20631 2003-08-08  Paul Eggert  <eggert@twinsun.com>
20632
20633         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
20634         * modules/extensions, modules/gnu-source: New files.
20635         * modules/timespec, modules/unlocked-io: Depend on extensions.
20636
20637 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20638
20639         * modules/restrict: New file.
20640         * MODULES.html.sh (func_all_modules): Add restrict.
20641         * modules/regex: Depend on restrict.
20642
20643 2003-08-07  Paul Eggert  <eggert@twinsun.com>
20644
20645         * m4/restrict.m4: New file.
20646         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
20647
20648 2003-08-07  Bruno Haible  <bruno@clisp.org>
20649
20650         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
20651         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
20652
20653 2003-08-07  Bruno Haible  <bruno@clisp.org>
20654
20655         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
20656         makes the module 'getndelim2' compatible with the module 'getline'.
20657
20658 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20659
20660         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
20661         byte with "\201" to avoid glitches when editing that source file
20662         with multi-gnome-terminal.
20663
20664 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20665
20666         * lib/bumpalloc.h: Remove.
20667
20668 2003-08-05  Paul Eggert  <eggert@twinsun.com>
20669
20670         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
20671         * modules/bumpalloc: Remove.
20672
20673 2003-08-04  Paul Eggert  <eggert@twinsun.com>
20674
20675         * lib/getloadavg.c: Change copyright notice and spacing to conform to
20676         GNU coding style.
20677
20678         Merge from coreutils.
20679         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
20680         1. From glibc.
20681         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
20682         from Karl Berry, implemented by Jim Meyering.
20683         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
20684         from Dmitry V. Levin.
20685         Remove anachronistic cast of xrealloc.
20686         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
20687         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
20688         type. Otherwise, it wouldn't compile with at least /bin/cc on
20689         ymp-cray-unicos9.0.2.X.
20690         Combine two mostly-identical uses of alloca into one.
20691         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
20692
20693 2003-08-04  Dave Love  <d.love@dl.ac.uk>
20694
20695         [From Emacs.]
20696
20697         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
20698         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
20699         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
20700         obsolete NLIST_NAME_UNION.
20701         [__GNU__]: Undef BSD and FSCALE.
20702         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
20703
20704 2003-08-03  Paul Eggert  <eggert@twinsun.com>
20705
20706         * lib/stdbool_.h (_Bool): Make it signed char, instead of
20707         an enum type, so that it's guaranteed to promote to int.  See:
20708         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
20709
20710 2003-08-03  Karl Berry  <karl@gnu.org>
20711
20712         * config/depcomp: update from automake.
20713
20714 2003-07-31  Paul Eggert  <eggert@twinsun.com>
20715
20716         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
20717         (strerror): Don't assume that a printable int fits in 14 bytes.
20718
20719 2003-07-31  Bruno Haible  <bruno@clisp.org>
20720
20721         * modules/getpass-gnu: New file.
20722         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
20723
20724 2003-07-31  Bruno Haible  <bruno@clisp.org>
20725
20726         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
20727
20728 2003-07-24  Karl Berry  <karl@gnu.org>
20729
20730         * config/missing: update from automake.
20731
20732 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
20733             Bruno Haible  <bruno@clisp.org>
20734
20735         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
20736         * lib/getline.c (getline, getdelim): Likewise.
20737         Remove _GNU_SOURCE define; now it's defined in config.h through
20738         m4/getline.m4.
20739
20740 2003-07-23  Karl Berry  <karl@gnu.org>
20741
20742         * config/config.sub: update from prep.
20743
20744 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20745
20746         * modules/xalloc (Depends-on): Add exitfail.
20747         * modules/xmemcoll: Likewise.
20748
20749 2003-07-22  Paul Eggert  <eggert@twinsun.com>
20750
20751         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
20752         over-parenthesization in macros.
20753
20754         Sync with coreutils.
20755
20756         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
20757         required by C99.
20758
20759         Use `exit_failure' for xalloc and xmemcoll instead of their own
20760         private exit-failure variables.
20761         * lib/xalloc.h (xalloc_exit_failure): Remove.
20762         * lib/xmalloc.c: Likewise.  Include exitfail.h.
20763         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
20764         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
20765         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
20766         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
20767
20768 2003-07-20  Jim Meyering  <jim@meyering.net>
20769
20770         * modules/closeout (Depends-on): Add exitfail.
20771         Suggestion from Bruno Haible.
20772
20773 2003-07-19  Karl Berry  <karl@gnu.org>
20774
20775         * config/config.sub: update from prep.
20776
20777 2003-07-18  Paul Eggert  <eggert@twinsun.com>
20778
20779         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
20780         Remove.
20781         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
20782         to test that it can stand by itself.  Include "exitfail.h".
20783         Clients should set exit_failure instead.
20784         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
20785
20786 2003-07-18  Bruno Haible  <bruno@clisp.org>
20787
20788         * modules/getndelim2: New file.
20789         * modules/getline: Share files with module getndelim2.
20790         * modules/getnline: Depend on getndelim2 instead of sharing files with
20791         it. Add getnline.c to lib_SOURCES.
20792         * MODULES.html.sh (func_all_modules): Add getndelim2.
20793
20794 2003-07-18  Bruno Haible  <bruno@clisp.org>
20795
20796         * m4/getndelim2.m4: New file.
20797         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
20798         invoke gl_PREREQ_GETNDELIM2.
20799         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
20800         gl_PREREQ_GETNDELIM2.
20801         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
20802         gl_GETNDELIM2.
20803
20804 2003-07-18  Bruno Haible  <bruno@clisp.org>
20805
20806         * lib/getndelim2.h: New file.
20807         * lib/getndelim2.c: Make into a module of its own. Include config.h,
20808         getndelim2.h.
20809         (getndelim2): Make non-static. Change return type to ssize_t.
20810         * lib/getline.h: Change argument names.
20811         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
20812         * lib/getnline.c: Include getndelim2.h.
20813
20814 2003-07-18  Andreas Schwab  <schwab@suse.de>
20815
20816         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
20817
20818 2003-07-17  Karl Berry  <karl@gnu.org>
20819
20820         * config/config.sub: update from prep.
20821
20822 2003-07-17  Bruno Haible  <bruno@clisp.org>
20823
20824         * modules/getnline: New file.
20825         * modules/getline: Add lib/getndelim2.c to source file list.
20826         * MODULES.html.sh (func_all_modules): Add getnline.
20827
20828 2003-07-17  Bruno Haible  <bruno@clisp.org>
20829
20830         * m4/getnline.m4: New file.
20831
20832 2003-07-17  Bruno Haible  <bruno@clisp.org>
20833
20834         * m4/Makefile.am.in: Remove file.
20835         * m4/Makefile.am: Remove file.
20836         * m4/Makefile.in: Remove file.
20837
20838 2003-07-17  Bruno Haible  <bruno@clisp.org>
20839
20840         * lib/getnline.h: New file.
20841         * lib/getnline.c: New file.
20842         * lib/getndelim2.c: New file, extracted from getline.c.
20843         (getndelim2): Renamed from getdelim2, with added nmax argument.
20844         * lib/getline.c: Include getndelim2.c.
20845         (getdelim2): Moved out to getndelim2.c.
20846         (getline, getdelim): Update.
20847
20848 2003-07-17  Bruno Haible  <bruno@clisp.org>
20849
20850         * lib/Makefile.am: Remove file.
20851         * lib/Makefile.in: Remove file.
20852
20853 2003-07-17  Bruno Haible  <bruno@clisp.org>
20854
20855         * configure.in: Remove file.
20856         * Makefile.in: Remove file.
20857
20858 2003-07-17  Bruno Haible  <bruno@clisp.org>
20859
20860         * MODULES.html.sh: Put the </BODY> right before </HTML>.
20861
20862 2003-07-16  Karl Berry  <karl@gnu.org>
20863
20864         * config/srclist-update: was running fixlicense twice, which caused
20865                 texinfo.tex to be nullified for some reason.  Simplify,
20866                 $gplsrc is no longer needed as far as I can see?
20867
20868 2003-07-16  Jim Meyering  <jim@meyering.net>
20869
20870         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
20871
20872 2003-07-15  Paul Eggert  <eggert@twinsun.com>
20873
20874         * config/srclist.txt: Get the following files from gettext-runtime/intl
20875         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
20876         ref-del.sin.  From Bruno Haible.
20877         * config/srclist-update (fixfile): Change grep pattern again, since the
20878         previous fix didn't work (there was another trailing $).  Use
20879         '[$]' to escape the $s.
20880
20881 2003-07-15  Karl Berry  <karl@gnu.org>
20882
20883         * lib/vasnprintf.c: update from gettext.
20884
20885 2003-07-15  Karl Berry  <karl@gnu.org>
20886
20887         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
20888         gets expanded when surrounded by '$'.
20889
20890 2003-07-15  Jim Meyering  <jim@meyering.net>
20891
20892         * modules/save-cwd: Don't depend on error.  From Derek Price.
20893
20894 2003-07-15  Jim Meyering  <jim@meyering.net>
20895
20896         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
20897
20898 2003-07-14  Simon Josefsson  <jas@extundo.com>
20899
20900         * modules/mempcpy: New file.
20901         * MODULES.html.sh (func_all_modules): Add mempcpy.
20902
20903 2003-07-14  Simon Josefsson  <jas@extundo.com>
20904
20905         * m4/mempcpy.m4: New file.
20906
20907 2003-07-14  Simon Josefsson  <jas@extundo.com>
20908
20909         * lib/mempcpy.h: New file.
20910         * lib/mempcpy.c: New file.
20911
20912 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20913
20914         * modules/getdate, modules/posixtm: Depend on mktime.
20915
20916 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20917
20918         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
20919         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
20920         unicodeio.c, unicodeio.h, unlocked-io.h:
20921         Switch from LGPL to GPL.
20922
20923 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20924
20925         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
20926         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
20927         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
20928         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
20929         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
20930         updated automatically by ../config/srclist-update.  This changes
20931         their license from LPGL to GPL.
20932
20933 2003-07-14  Paul Eggert  <eggert@twinsun.com>
20934
20935         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
20936         assumed to refer to the root of the most recent stable gettext version.
20937         * config/srclistvars.sh: Add defaults for eggert.
20938         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
20939         Match "This program" as well as "The program".  This is needed
20940         for gettext.
20941
20942 2003-07-14  Jim Meyering  <jim@meyering.net>
20943
20944         Don't emit diagnostics.  Let callers do that.
20945         * lib/save-cwd.c: Don't include "error.h".
20946         (save_cwd): Don't call error.  Ensure that errno is valid
20947         when returning nonzero.
20948
20949         * lib/save-cwd.h (restore_cwd): Update prototype.
20950         * lib/save-cwd.c (restore_cwd): Remove two parameters.
20951         Simplify.  Don't call error upon failure.  Let callers do that.
20952         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
20953         when auditing is enabled.  But don't bother updating the #if.
20954
20955 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
20956
20957         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
20958         it breaks C++ compilation.
20959         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
20960
20961 2003-07-10  Simon Josefsson  <jas@extundo.com>
20962
20963         * modules/strchrnul (Makefile.am): Add strchrnul.h.
20964
20965 2003-07-10  Jim Meyering  <jim@meyering.net>
20966
20967         * m4/clock_time.m4: Remove trailing blank.
20968         * m4/intmax_t.m4: Likewise.
20969
20970 2003-07-10  Jim Meyering  <jim@meyering.net>
20971
20972         * lib/vasnprintf.c: Remove trailing blanks.
20973         Make cpp indentation consistent.
20974
20975 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20976
20977         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
20978         posixver.c, strftime.c, strnlen.c, strverscmp.c:
20979         Switch from LGPL to GPL.
20980
20981 2003-07-09  Paul Eggert  <eggert@twinsun.com>
20982
20983         * config/srclist.txt: Sort sublists.  Add
20984         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
20985         that differ from gnulib for one reason or another; we'd like this list
20986         to be smaller but for now let's document what we have.
20987
20988 2003-07-08  Paul Eggert  <eggert@twinsun.com>
20989
20990         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
20991         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
20992         and sweeter "eval x=$x".
20993         * config/srclist.txt: Get lib/argp* from glibc.
20994
20995 2003-07-07  Paul Eggert  <eggert@twinsun.com>
20996
20997         * lib/mktime.c: Fix some boundary cases and remove need for floating
20998         point.
20999
21000         Issue a compile-time diagnostic if time_t is floating point, or if
21001         two's complement arithmetic is not in effect, or if arithmetic
21002         right shift does not propagate the sign.  These assumptions were
21003         all in the original code but they weren't checked.
21004
21005         (TIME_T_MIDPOINT, verify): New macros.
21006         (__isleap): Remove; it has integer overflow problems.
21007         (leapyear): New function, without those problems.
21008         (ydhms_tm_diff): Remove; splitting into two parts.
21009         (ydhms_diff): New function, containing the arithmetic part of
21010         the old ydhms_tm_diff function.  Issue a compile-time
21011         diagnostic if we are not using C99 integer division.
21012         Avoid casts when possible.
21013         (guess_time_tm): New function, containing the checking part of
21014         the old ydhms_tm_diff function.  Return the new value, rather than
21015         the difference between it and the old.  Accept a new argument T
21016         so that *T specifies the old value.  Check for overflow in the result.
21017
21018         (__mktime_internal): Use a time_t offset, not a long int offset.
21019         This undoes the 2003-06-04 change, which is no longer needed now
21020         that we have better overflow checking.
21021         (localtime_offset): Likewise.
21022
21023         (__mktime_internal): Avoid harmful overflow on hosts where time_t
21024         and long are 64-bit but int is only 32-bit.
21025         (ydhms_diff): Use long int to store year1 and yday1.
21026         Issue a compile-time diagnostic if long int is not wide enough.
21027
21028         (__mktime_internal): Use long int to store adjusted year and yday.
21029         Use plain C rather than preprocessor commands, if that doesn't
21030         affect efficiency.
21031         Check for overflow (and try to repair) after each probe
21032         rather than checking only at the very end.  This avoids some bugs
21033         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
21034         does not equal GMT offset at maximum time).
21035         Use integer to check for overflow rather than floating point; this
21036         is more portable to non-IEEE hosts, and is a tad faster.
21037         When we detect that we are oscillating between two values,
21038         don't check whether tm_isdst has the requested value, since
21039         we already know the answer.  When tm_isdst has the wrong value,
21040         use a different heuristic to find the right one, based on the
21041         extreme values actually observed in practice in tz2003a,
21042         rather than the (overly optimistic) "previous 3 calendar quarters".
21043
21044         (not_equal_tm, print_tm, check_result): Use "const T" rather than
21045         "T const" to accommodate glibc style.
21046         (check_result): Use less-confusing report format.  "long" -> "long int.
21047         (main): Likewise.
21048         Don't loop if the iteration overflows time_t.
21049         Allow a negative step in the iteration.
21050
21051 2003-07-06  Karl Berry  <karl@gnu.org>
21052
21053         * config/depcomp: update from automake.
21054         * config/config.sub: update from prep.
21055
21056 2003-07-03  Karl Berry  <karl@gnu.org>
21057
21058         * config/config.guess: update from prep.
21059
21060 2003-07-01  Paul Eggert  <eggert@twinsun.com>
21061
21062         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
21063         xreadlink.c now includes it unconditionally.
21064
21065 2003-07-01  Paul Eggert  <eggert@twinsun.com>
21066
21067         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
21068         having it depend on HAVE_SYS_TYPES_H.
21069
21070 2003-07-01  Bruno Haible  <bruno@clisp.org>
21071
21072         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
21073         <sys/types.h> should be sufficient.
21074         Reported by Paul Eggert.
21075
21076 2003-06-26  Karl Berry  <karl@gnu.org>
21077
21078         * config/depcomp: update from automake.
21079
21080 2003-06-26  Bruno Haible  <bruno@clisp.org>
21081
21082         * modules/human: Depend on module stdbool.
21083
21084 2003-06-25  Bruno Haible  <bruno@clisp.org>
21085
21086         * modules/readlink: New file.
21087         * modules/xreadlink: Depend on it.
21088         * MODULES.html.sh (func_all_modules): Add readlink.
21089
21090 2003-06-25  Bruno Haible  <bruno@clisp.org>
21091
21092         * m4/readlink.m4: New file.
21093
21094 2003-06-25  Bruno Haible  <bruno@clisp.org>
21095
21096         * lib/readlink.c: New file.
21097
21098 2003-06-22  Karl Berry  <karl@gnu.org>
21099
21100         * config/srclist.txt: update mkinstalldirs from automake.
21101         * config/mkinstalldirs: update.
21102
21103 2003-06-22  Bruno Haible  <bruno@clisp.org>
21104
21105         Portability to mingw32.
21106         * m4/ssize_t.m4: New file, from GNU gettext.
21107         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
21108         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
21109
21110 2003-06-22  Bruno Haible  <bruno@clisp.org>
21111
21112         * modules/safe-read: Add m4/ssize_t.m4.
21113         * modules/xreadlink: Add m4/ssize_t.m4.
21114
21115 2003-06-20  Bruno Haible  <bruno@clisp.org>
21116
21117         Assume C89, so PARAMS isn't needed.
21118         * lib/unicodeio.h (PARAMS): Remove.
21119         * lib/unicodeio.c: Don't use PARAMS.
21120
21121 2003-06-18  Karl Berry  <karl@gnu.org>
21122
21123         * config/config.{guess,sub}: update from prep.
21124
21125 2003-06-18  Jim Meyering  <jim@meyering.net>
21126
21127         Merge changes from coreutils.
21128         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
21129         Remove explicit declarations of xmalloc and realloc.
21130         Include xalloc.h.
21131         (read_utmp): Remove anachronistic cast of xmalloc.
21132
21133 2003-06-17  Paul Eggert  <eggert@twinsun.com>
21134
21135         Assume C89, so PARAMS isn't needed.
21136         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
21137         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
21138         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
21139         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
21140         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
21141         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
21142         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
21143         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
21144         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
21145         lib/xstrtod.h, lib/xstrtol.h: Likewise.
21146         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
21147         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
21148         no longer needed. Anyway, config.h should always be included before any
21149         other file.
21150
21151 2003-06-11  Simon Josefsson  <jas@extundo.com>
21152
21153         * modules/sysexits: New file.
21154         * MODULES.html.sh (func_all_modules): Add sysexits.
21155
21156 2003-06-11  Simon Josefsson  <jas@extundo.com>
21157
21158         * lib/sysexit_.h: New file.
21159
21160 2003-06-11  Derek Price  <derek@ximbiot.com>
21161
21162         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
21163         necessary.
21164
21165 2003-06-11  Bruno Haible  <bruno@clisp.org>
21166
21167         * m4/sysexits.m4: New file.
21168
21169 2003-06-10  Simon Josefsson  <jas@extundo.com>
21170
21171         * lib/argp.h: New file, from glibc.
21172         * lib/argp-ba.c: New file, from glibc.
21173         * lib/argp-eexst.c: New file, from glibc.
21174         * lib/argp-fmtstream.c: New file, from glibc.
21175         * lib/argp-fmtstream.h: New file, from glibc.
21176         * lib/argp-fs-xinl.c: New file, from glibc.
21177         * lib/argp-help.c: New file, from glibc.
21178         * lib/argp-namefrob.h: New file, from glibc.
21179         * lib/argp-parse.c: New file, from glibc.
21180         * lib/argp-pv.c: New file, from glibc.
21181         * lib/argp-pvh.c: New file, from glibc.
21182         * lib/argp-xinl.c: New file, from glibc.
21183
21184 2003-06-10  Simon Josefsson  <jas@extundo.com>
21185
21186         * modules/strchrnul: New file.
21187
21188 2003-06-10  Simon Josefsson  <jas@extundo.com>
21189
21190         * modules/argp: New file.
21191
21192 2003-06-10  Simon Josefsson  <jas@extundo.com>
21193
21194         * m4/strchrnul.m4: New file.
21195
21196 2003-06-10  Simon Josefsson  <jas@extundo.com>
21197
21198         * lib/strchrnul.h: New file.
21199         * lib/strchrnul.c: New file.
21200
21201 2003-06-10  Bruno Haible  <bruno@clisp.org>
21202
21203         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
21204
21205 2003-06-07  Karl Berry  <karl@gnu.org>
21206
21207         * config/config.{guess,sub}: update from prep.
21208
21209 2003-06-07  Jim Meyering  <jim@meyering.net>
21210
21211         * modules/strtod: Use $(...) notation, not @...@ for
21212         AC_REPLACE'd variables.
21213         * modules/localcharset: Likewise.
21214
21215 2003-06-07  Jim Meyering  <jim@meyering.net>
21216
21217         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
21218         in place of my name in the copyright comment.
21219         Remove definition and uses of __P.
21220
21221         From coreutils.
21222         * lib/stat.c: Don't declare xmalloc explicitly.
21223         Instead, include "xalloc.h".
21224         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
21225         xrealloc, and xcalloc return values.
21226         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
21227         Improve comment.
21228         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
21229
21230 2003-06-07  Bruno Haible  <bruno@clisp.org>
21231
21232         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
21233         avoid AC_CONFIG_LINKS.
21234         * modules/fnmatch (Makefile.am): Use explicit creation rule for
21235         fnmatch.h, to avoid AC_CONFIG_LINKS.
21236         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
21237
21238 2003-06-07  Bruno Haible  <bruno@clisp.org>
21239
21240         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
21241         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
21242         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
21243         directory.
21244         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
21245         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
21246         directory.
21247
21248 2003-06-06  Jim Meyering  <jim@meyering.net>
21249
21250         Merge from coreutils.
21251         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
21252         Consolidate declarations and initializations of *_base* locals.
21253
21254         Merge from coreutils.
21255         This avoids a core dump on systems without GNU putenv,
21256         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
21257         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
21258         (unsetenv): New static function, from GNU libc.
21259         (rpl_putenv): Use it.
21260
21261         * lib/modechange.c: Remove trailing blanks.
21262
21263         Merge from coreutils.
21264         * lib/fsusage.c: Remove declaration of statfs.
21265         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
21266
21267         * lib/posixtm.c: Include <stdbool.h> unconditionally.
21268
21269 2003-06-06  Jim Meyering  <jim@meyering.net>
21270
21271         * lib/stdbool_.h: Renamed from stdbool.h.in.
21272
21273 2003-06-06  Jim Meyering  <jim@meyering.net>
21274             Bruno Haible  <bruno@clisp.org>
21275
21276         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
21277         Adjust Makefile.am snippet not to redirect directly to target.
21278         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
21279
21280 2003-06-05  Paul Eggert  <eggert@twinsun.com>
21281
21282         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
21283         mismatch, look in future quarters as well as past.  This fixes a
21284         bug when processing fall-backwards gaps immediately after a long
21285         period of daylight-saving time.
21286
21287         * lib/mktime.c: Assume freestanding C89 or better.
21288         (HAVE_LIMITS_H): Remove.  Assume it's 1.
21289         (__P): Remove; not used.
21290         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
21291         (mktime, not_equal_tm, print_tm, check_result,
21292         main): Use prototypes.  Use const * where appropriate.
21293         (main): Fix typo in testing code that uncovered by above changes.
21294         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
21295
21296 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21297
21298         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
21299         locale.h, localeconv.  This merges changes from coreutils.
21300
21301         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
21302         It can be removed after the next Autoconf is released.
21303         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
21304         needed.
21305
21306 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21307
21308         * lib/mktime.c: Fix Debian bug 177940
21309         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
21310         (localtime_offset): Now long int, not time_t, because we want it
21311         to be guaranteed to be signed.  All uses changed.
21312         (__mktime_internal): If overflow would occur when adding offset,
21313         don't add it.
21314
21315         Merge 'human' changes from coreutils.  Rewrite to support
21316         locale-specific notations like thousands separators.
21317         * lib/human.c: Simplify authorship notice.
21318         Include human.h immediately after config.h.
21319         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
21320         <limits.h>: Do not include, since human.h does.
21321         (SIZE_MAX, UINTMAX_MAX): New macros.
21322         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
21323         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
21324         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
21325         (power_letter): Renamed from suffixes.
21326         (generate_suffix_backwards): Remove.
21327         (adjust_value): Now takes int style (because of human.h changes)
21328         and long double value (for greater precision on some platforms).
21329         (group_number): New function.
21330         (human_readable): Use it.  Use integer options, not enum.
21331         Put the options before the sizes in the arg list.
21332         Support all the new options.
21333         The old human_readable function has been removed;
21334         use inttostr.h instead.
21335         (human_readable, default_block_size, humblock):
21336         Use uintmax_t, not int, for block sizes.
21337         (human_readable_inexact, block_size_types): Remove.
21338         (block_size_opts): New constant.
21339         (human_options): Renamed from human_block_size, with new signature
21340         that allows block sizes up to UINTMAX_MAX.  All callers changed.
21341         * lib/human.h: Add copyright and authorship notice.
21342         Include <limits.h> and <stdbool.h> unconditionally.
21343         (PARAMS): Remove.  All uses removed.
21344         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
21345         (enum human_inexact_style): Remove tag; now a nameless enum.
21346         (human_floor, human_ceiling, human_round_to_even): Now have
21347         values 2, 0, 1 rather than -1, 1, 0.
21348         (human_group_digits, human_suppress_point_zero, human_autoscale,
21349         human_base_1024, human_SI, human_B): New constants.
21350         (human_readable_inexact, human_block_size): Remove.
21351         (human_readable): Size args are now uintmax_t, not int.
21352         (human_options): New decl.
21353
21354         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
21355         unnecessary now that we assume C89 or better.  This change
21356         imported from coreutils.
21357
21358         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21359         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
21360         in the 2003-05-30 sync from glibc.
21361
21362         .h files should stand alone, but we shouldn't include <sys/types.h>
21363         if we can get away with just <stddef.h>.
21364
21365         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
21366         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
21367         rather than <sys/types.h>, as we merely need size_t.
21368         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
21369         to get size_t.
21370         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
21371         Include <stdio.h>, to get FILE.
21372         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
21373         memcasecmp.h has included <stddef.h> and all we need is size_t.
21374         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
21375         our interface, instead of including <sys/types.h>
21376
21377 2003-06-04  Paul Eggert  <eggert@twinsun.com>
21378
21379         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
21380         now, as glibc mktime is buggy on non-glibc systems.
21381
21382 2003-06-03  Karl Berry  <karl@gnu.org>
21383
21384         * config/config.sub: update from prep.
21385
21386 2003-06-02  Paul Eggert  <eggert@twinsun.com>
21387
21388         [from coreutils]
21389         Fix some minor time-related bugs with POSIX time arguments.
21390         Some valid time stamps were being rejected (notably -1, and
21391         time stamps before 1900 on 64-bit hosts).  And some invalid
21392         time stamps were being accepted, e.g. September 31.
21393
21394         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
21395         that we can return (time_t) -1 successfully.
21396         * lib/posixtm.c: Likewise.
21397         [HAVE_STDBOOL_H]: Include <stdbool.h>.
21398         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
21399         (t): Remove static var.
21400         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
21401         of static var.  All uses changed.
21402         (year): Do not reject years before 1900; they can occur with
21403         64-bit time_t.
21404         (posix_time_parse): Do not check for out-of-range components;
21405         that is now the caller's responsibility, since our checks were
21406         only approximations.
21407         (posixtime): Use mktime to check for out-of-range components,
21408         since it knows them exactly.
21409         If mktime returns (time_t) -1, check whether an error actually occurred
21410         by invoking localtime on -1.
21411         (main) [TEST_POSIXTIME]: Check for input data errors, and report
21412         posixtime failures better.
21413         Improve the test data (in comments only).
21414
21415 2003-06-02  Karl Berry  <karl@gnu.org>
21416
21417         * config/mkinstalldirs (version): new variable.
21418         (--version): new option.
21419         (usage): improve message.
21420
21421 2003-05-30  Karl Berry  <karl@gnu.org>
21422
21423         * lib/mktime.c: update from libc.
21424
21425 2003-05-30  Bruno Haible  <bruno@clisp.org>
21426
21427         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
21428         * config/config.rpath: Upgrade to gettext-0.12.1.
21429
21430 2003-05-30  Bruno Haible  <bruno@clisp.org>
21431
21432         * m4/gettext.m4: Upgrade to gettext-0.12.1.
21433         * m4/nls.m4: New file, from gettext-0.12.1.
21434         * m4/po.m4: New file, from gettext-0.12.1.
21435         * m4/progtest.m4: Upgrade to gettext-0.12.1.
21436
21437 2003-05-30  Bruno Haible  <bruno@clisp.org>
21438
21439         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
21440         * lib/localcharset.h: Likewise.
21441         * lib/localcharset.c: Likewise.
21442
21443 2003-05-29  Karl Berry  <karl@gnu.org>
21444
21445         * config/config.rpath: update from gettext.
21446
21447 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21448
21449         Assume the headers required for C89 freestanding compilers.
21450         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
21451         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
21452         * m4/human.m4 (gl_HUMAN): Likewise.
21453         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
21454         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
21455         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21456         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
21457         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21458         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
21459
21460 2003-05-28  Paul Eggert  <eggert@twinsun.com>
21461
21462         Assume the headers required for C89 freestanding compilers.
21463         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
21464         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
21465         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
21466         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
21467         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
21468         define, since <limits.h> is guaranteed to do that.
21469         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
21470         * lib/exclude.c: Include <stdbool.h> unconditionally.
21471         * lib/tempname.c: Include <stddef.h> unconditionally.
21472         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
21473         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
21474         <stddef.h> does that.
21475         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
21476         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
21477         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
21478         needed.
21479         * lib/xstrtol.c: Likewise.
21480         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
21481         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
21482
21483         * lib/addext.c (addext): Use assignment rather than cast, to avoid
21484         warnings on some platforms.
21485
21486         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
21487         arbitrarily.
21488
21489 2003-05-26  Jim Meyering  <jim@meyering.net>
21490
21491         Merge in a change from coreutils:
21492         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
21493         that is guaranteed to be `no'.  Use `no_such_member' to indicate
21494         that condition, rather than `-1' which is slightly misleading.
21495         Change the name of the cache variable to have the gl_ prefix.
21496         Prompted by a patch from Richard Dawe for DJGPP.
21497
21498 2003-05-24  Karl Berry  <karl@gnu.org>
21499
21500         * config/config.guess: update from prep.
21501
21502 2003-05-22  Karl Berry  <karl@gnu.org>
21503
21504         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
21505
21506 2003-05-20  Karl Berry  <karl@gnu.org>
21507
21508         * config/config.guess: update from prep.
21509
21510 2003-05-18  Karl Berry  <karl@gnu.org>
21511
21512         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
21513         might actually be set by the user.
21514
21515         * config/depcomp, install-sh, mdate-sh: update from automake.
21516
21517 2003-05-17  Bruno Haible  <bruno@clisp.org>
21518
21519         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
21520         invalid expansion for AC_EGREP_CPP.
21521         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
21522         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
21523         Suggested by Akim Demaille <akim@epita.fr> in
21524         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
21525
21526 2003-05-12  Jim Meyering  <jim@meyering.net>
21527
21528         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
21529         the space-padded-by-default conversion specifiers, %e, %k, %l.
21530
21531 2003-05-12  Bruno Haible  <bruno@clisp.org>
21532
21533         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
21534         the string is longer than 4 KB.
21535
21536 2003-05-11  Karl Berry  <karl@gnu.org>
21537
21538         * config/config.{guess,sub}: update from prep.
21539
21540 2003-05-09  Bruno Haible  <bruno@clisp.org>
21541
21542         * modules/error: Add m4/strerror_r.m4 to file list.
21543
21544 2003-05-03  Bruno Haible  <bruno@clisp.org>
21545
21546         Upgrade to Unicode-4.0.
21547         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
21548         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
21549         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
21550         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
21551         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
21552         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
21553         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
21554         Change width of U+E0100..U+E01EF from 1 to 0.
21555
21556 2003-04-25  Jim Meyering  <jim@meyering.net>
21557
21558         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
21559         of type size_t, not int.
21560
21561 2003-04-25  Bruno Haible  <bruno@clisp.org>
21562
21563         * lib/copy-file.c: Include <stddef.h>, for size_t.
21564
21565 2003-04-21  Paul Eggert  <eggert@twinsun.com>
21566
21567         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
21568         code which expansion is under static control.  Patch imported from
21569         Akim Demaille's patch to Bison; see
21570         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
21571
21572 2003-04-14  Bruno Haible  <bruno@clisp.org>
21573
21574         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
21575
21576 2003-04-11  Jim Meyering  <jim@meyering.net>
21577
21578         Merge changes from Coreutils.
21579
21580         2003-03-22  Jim Meyering  <jim@meyering.net>
21581
21582         * lib/strftime.c (widen): Cast alloca return value to proper type.
21583
21584         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
21585
21586         From GNU libc.
21587         * lib/strftime.c (my_strftime): Handle very large width
21588         specifications for numeric values correctly.  Improve checks for
21589         overflow.
21590
21591         2003-01-19  Jim Meyering  <jim@meyering.net>
21592
21593         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
21594         definitions.
21595         (nl_get_alt_digit) [! defined my_strftime]: Define.
21596         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
21597         _nl_get_alt_digit and _nl_get_walt_digit.
21598
21599         * lib/strftime.c (my_strftime): Merge in locale-related changes from
21600         libc. These changes have no effect outside of _LIBC.
21601
21602 2003-04-10  Bruno Haible  <bruno@clisp.org>
21603
21604         * modules/findprog: New file.
21605         * MODULES.html.sh (func_all_modules): Add it.
21606
21607 2003-04-10  Bruno Haible  <bruno@clisp.org>
21608
21609         * m4/findprog.m4: New file.
21610         * m4/eaccess.m4: New file.
21611
21612 2003-04-10  Bruno Haible  <bruno@clisp.org>
21613
21614         * lib/findprog.h: New file, from GNU gettext.
21615         * lib/findprog.c: New file, from GNU gettext.
21616
21617 2003-04-05  Jim Meyering  <jim@meyering.net>
21618
21619         Merge changes from Coreutils.
21620
21621         * lib/exclude.h (PARAMS): Remove definition and uses.
21622         * lib/exclude.c: Remove uses of `PARAMS'.
21623
21624         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
21625         Add test-cases for DOS filenames. Declare program_name.
21626         (main): Set up program_name.  Patch by Rich Dawe.
21627
21628         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21629         error from mntctl.
21630         Use mntctl's return value to drive the entry-processing loop, since
21631         we can't rely on the value of the vmt_length member in the last
21632         entry.  On some systems doing so could result in exhausting
21633         virtual memory.  Based in part on a patch from Mike Jetzer.
21634
21635 2003-04-04  Bruno Haible  <bruno@clisp.org>
21636
21637         * modules/linebreak: New file.
21638         * MODULES.html.sh (func_all_modules): Add it.
21639
21640 2003-04-04  Bruno Haible  <bruno@clisp.org>
21641
21642         * m4/linebreak.m4: New file.
21643
21644 2003-04-04  Bruno Haible  <bruno@clisp.org>
21645
21646         * lib/linebreak.h: New file, from GNU gettext.
21647         * lib/linebreak.c: New file, from GNU gettext with slight
21648         modifications.
21649         * lib/lbrkprop.h: New file, from GNU gettext.
21650
21651 2003-04-03  Bruno Haible  <bruno@clisp.org>
21652
21653         * modules/utf8-ucs4: New file.
21654         * modules/utf16-ucs4: New file.
21655         * modules/ucs4-utf8: New file.
21656         * modules/ucs4-utf16: New file.
21657         * MODULES.html.sh (func_all_modules): Add them.
21658
21659 2003-04-03  Bruno Haible  <bruno@clisp.org>
21660
21661         * m4/utf-ucs4.m4: New file.
21662         * m4/ucs4-utf.m4: New file.
21663
21664 2003-04-03  Bruno Haible  <bruno@clisp.org>
21665
21666         * lib/utf8-ucs4.h: New file, from GNU gettext.
21667         * lib/utf16-ucs4.h: New file, from GNU gettext.
21668         * lib/ucs4-utf8.h: New file, from GNU gettext.
21669         * lib/ucs4-utf16.h: New file, from GNU gettext.
21670
21671 2003-04-02  Bruno Haible  <bruno@clisp.org>
21672
21673         * modules/binary-io: New file.
21674         * MODULES.html.sh (func_all_modules): Add it.
21675
21676 2003-04-02  Bruno Haible  <bruno@clisp.org>
21677
21678         * lib/binary-io.h: New file, from GNU gettext.
21679
21680 2003-04-01  Bruno Haible  <bruno@clisp.org>
21681
21682         * modules/pathname: New file.
21683         * MODULES.html.sh (func_all_modules): Add it.
21684
21685 2003-04-01  Bruno Haible  <bruno@clisp.org>
21686
21687         * lib/pathname.h: New file, from GNU gettext.
21688         * lib/concatpath.c: New file, from GNU gettext.
21689
21690 2003-03-30  Bruno Haible  <bruno@clisp.org>
21691
21692         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
21693
21694 2003-03-30  Bruno Haible  <bruno@clisp.org>
21695
21696         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
21697         function chown() doesn't exist.
21698
21699 2003-03-28  Bruno Haible  <bruno@clisp.org>
21700
21701         * modules/copy-file: New file.
21702         * MODULES.html.sh (func_all_modules): Add it.
21703
21704 2003-03-28  Bruno Haible  <bruno@clisp.org>
21705
21706         * m4/copy-file.m4: New file.
21707
21708 2003-03-28  Bruno Haible  <bruno@clisp.org>
21709
21710         * lib/copy-file.h: New file, from GNU gettext.
21711         * lib/copy-file.c: New file, from GNU gettext.
21712
21713 2003-03-18  Jim Meyering  <jim@meyering.net>
21714
21715         * lib/quote.c (quote_n): Fix typo in comment.
21716
21717 2003-03-18  Bruno Haible  <bruno@clisp.org>
21718
21719         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
21720         checking.
21721         * m4/onceonly_2_57.m4: Likewise.
21722
21723 2003-03-17  Bruno Haible  <bruno@clisp.org>
21724
21725         * m4/onceonly.m4: Require autoconf 2.54 or newer.
21726         (m4_quote): Remove macro.
21727         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
21728
21729 2003-03-14  Jim Meyering  <jim@meyering.net>
21730
21731         Merge changes from Coreutils.
21732         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
21733         to be const, in order to avoid warnings.
21734         (obstack_room): Likewise.
21735         (obstack_empty_p): Likewise.
21736
21737 2003-03-14  Bruno Haible  <bruno@clisp.org>
21738
21739         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
21740         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
21741
21742 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21743
21744         Merge changes from Bison.
21745         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
21746         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
21747         when compiling Bison 1.875's `bitset bset = obstack_alloc
21748         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
21749         * lib/hash.c: Include <stdbool.h> unconditionally.
21750
21751 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21752
21753         * m4/onceonly.m4 (m4_quote): New macro.
21754         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
21755         Quote AC_FOREACH variable-expansions properly.
21756
21757 2003-03-13  Paul Eggert  <eggert@twinsun.com>
21758
21759         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
21760
21761 2003-03-09  Paul Eggert  <eggert@twinsun.com>
21762
21763         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
21764         Reported by Bruce Becker; see:
21765         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
21766
21767 2003-03-03  Paul Eggert  <eggert@twinsun.com>
21768             Bruno Haible  <bruno@clisp.org>
21769
21770         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
21771         Reported by John Hughes, see
21772         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
21773
21774 2003-02-20  Bruno Haible  <bruno@clisp.org>
21775
21776         * MODULES.html.sh (func_all_modules): Add poll.
21777
21778 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21779
21780         * modules/poll: New file.
21781
21782 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21783
21784         * lib/poll_.h: New file.
21785         * lib/poll.c: New file.
21786
21787 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
21788
21789         * m4/poll.m4: New file.
21790
21791 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21792
21793         * modules/mathl: New file.
21794
21795 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21796
21797         * lib/mathl.h: New file.
21798         * lib/acosl.c: New file.
21799         * lib/asinl.c: New file.
21800         * lib/atanl.c: New file.
21801         * lib/ceill.c: New file.
21802         * lib/cosl.c: New file.
21803         * lib/expl.c: New file.
21804         * lib/floorl.c: New file.
21805         * lib/frexpl.c: New file.
21806         * lib/ldexpl.c: New file.
21807         * lib/logl.c: New file.
21808         * lib/sincosl.c: New file.
21809         * lib/sinl.c: New file.
21810         * lib/sqrtl.c: New file.
21811         * lib/tanl.c: New file.
21812         * lib/trigl.c: New file.
21813         * lib/trigl.h: New file.
21814
21815 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
21816
21817         * m4/mathl.m4: New file.
21818
21819 2003-02-18  Bruno Haible  <bruno@clisp.org>
21820
21821         * MODULES.html.sh (func_all_modules): Add mathl.
21822
21823 2003-02-17  Bruno Haible  <bruno@clisp.org>
21824
21825         * modules/mkdtemp: New module.
21826         * MODULES.html.sh (func_all_modules): Add it.
21827
21828 2003-02-17  Bruno Haible  <bruno@clisp.org>
21829
21830         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
21831
21832 2003-02-17  Bruno Haible  <bruno@clisp.org>
21833
21834         * lib/mkdtemp.h: New file, from GNU gettext.
21835         * lib/mkdtemp.c: New file, from GNU gettext.
21836
21837 2003-02-02  Jim Meyering  <jim@meyering.net>
21838
21839         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
21840         e.g. glibc-2.2.93.
21841
21842 2003-01-31  Bruno Haible  <bruno@clisp.org>
21843
21844         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
21845         'rpl_rename'.
21846         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
21847         'rpl_strnlen'.
21848         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
21849         'rpl_strtod'.
21850         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
21851         'rpl_utime'.
21852
21853 2003-01-31  Bruno Haible  <bruno@clisp.org>
21854
21855         * lib/rename.c: #undef rename before defining rpl_rename.
21856         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
21857
21858 2003-01-30  Bruno Haible  <bruno@clisp.org>
21859
21860         * modules/vasnprintf, modules/vasprintf: New modules.
21861         * MODULES.html.sh (func_all_modules): Add them.
21862
21863 2003-01-30  Bruno Haible  <bruno@clisp.org>
21864
21865         * m4/signed.m4: New file, from GNU gettext.
21866         * m4/longdouble.m4: New file, from GNU gettext.
21867         * m4/wchar_t.m4: New file, from GNU gettext.
21868         * m4/wint_t.m4: New file, from GNU gettext.
21869         * m4/vasnprintf.m4: New file.
21870         * m4/vasprintf.m4: New file.
21871
21872 2003-01-30  Bruno Haible  <bruno@clisp.org>
21873
21874         * lib/printf-args.h: New file, from GNU gettext.
21875         * lib/printf-args.c: New file, from GNU gettext.
21876         * lib/printf-parse.h: New file, from GNU gettext.
21877         * lib/printf-parse.c: New file, from GNU gettext.
21878         * lib/vasnprintf.h: New file, from GNU gettext.
21879         * lib/vasnprintf.c: New file, from GNU gettext.
21880         * lib/asnprintf.c: New file, from GNU gettext.
21881         * lib/vasprintf.h: New file, from GNU gettext with modifications.
21882         * lib/vasprintf.c: New file, from GNU gettext.
21883         * lib/asprintf.c: New file, from GNU gettext.
21884
21885 2003-01-29  Bruno Haible  <bruno@clisp.org>
21886
21887         * modules/stpncpy: New module.
21888         * MODULES.html.sh (func_all_modules): Add it.
21889
21890 2003-01-29  Bruno Haible  <bruno@clisp.org>
21891
21892         * m4/stpncpy.m4: New file.
21893
21894 2003-01-29  Bruno Haible  <bruno@clisp.org>
21895
21896         * lib/stpncpy.h: New file, from GNU gettext with modifications.
21897         * lib/stpncpy.c: New file, from GNU gettext with modifications.
21898
21899 2003-01-28  Bruno Haible  <bruno@clisp.org>
21900
21901         * modules/c-ctype: New module.
21902         * MODULES.html.sh (func_all_modules): Add it.
21903
21904 2003-01-28  Bruno Haible  <bruno@clisp.org>
21905
21906         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
21907         Paul Eggert.
21908         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
21909         Paul Eggert.
21910
21911 2003-01-27  Bruno Haible  <bruno@clisp.org>
21912
21913         * modules/xsetenv: New module.
21914         * MODULES.html.sh (func_all_modules): Add it.
21915
21916 2003-01-27  Bruno Haible  <bruno@clisp.org>
21917
21918         * lib/xsetenv.h: New file, from GNU gettext.
21919         * lib/xsetenv.c: New file, from GNU gettext.
21920
21921 2003-01-23  Jim Meyering  <jim@meyering.net>
21922
21923         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
21924         from working on systems without dirfd (at least Irix and OSF1/Tru64).
21925
21926 2003-01-23  Bruno Haible  <bruno@clisp.org>
21927
21928         * modules/minmax: New module.
21929         * MODULES.html.sh (func_all_modules): Add it.
21930
21931 2003-01-23  Bruno Haible  <bruno@clisp.org>
21932
21933         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
21934         Eggert.
21935
21936 2003-01-22  Bruno Haible  <bruno@clisp.org>
21937
21938         * modules/exit: New module.
21939         * MODULES.html.sh (func_all_modules): Add it.
21940
21941 2003-01-22  Bruno Haible  <bruno@clisp.org>
21942
21943         * lib/exit.h: New file, from GNU gettext.
21944
21945 2003-01-19  Bruno Haible  <bruno@clisp.org>
21946
21947         * gnulib-tool: Recognize option --extract-maintainer.
21948         (func_get_maintainer): New function.
21949         * modules/*: Add Maintainer entry.
21950
21951 2003-01-16  Jim Meyering  <jim@meyering.net>
21952
21953         * m4/regex.m4: The `regex' struct is both input and output.
21954         Initialize it before each use.  Patch by Tim Waugh.
21955
21956 2003-01-16  Bruno Haible  <bruno@clisp.org>
21957
21958         * MODULES.html.sh: Add a table of contents. Add the module name as
21959         leftmost column. Add hyperlinks.
21960
21961 2003-01-15  Bruno Haible  <bruno@clisp.org>
21962
21963         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
21964
21965 2003-01-15  Bruno Haible  <bruno@clisp.org>
21966
21967         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
21968         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
21969         suffix.
21970
21971 2003-01-15  Bruno Haible  <bruno@clisp.org>
21972
21973         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
21974
21975 2003-01-15  Bruno Haible  <bruno@clisp.org>
21976
21977         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
21978         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
21979
21980 2003-01-14  Jim Meyering  <jim@meyering.net>
21981
21982         * lib/same.c (same_name): Tweak a comment.
21983
21984 2003-01-14  Bruno Haible  <bruno@clisp.org>
21985
21986         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
21987         when a string comparison is sufficient.
21988
21989 2003-01-14  Bruno Haible  <bruno@clisp.org>
21990
21991         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
21992         'unsigned int'.
21993
21994 2003-01-14  Bruno Haible  <bruno@clisp.org>
21995
21996         * lib/hash-pjw.c: Add comment about low quality of this function.
21997
21998 2003-01-13  Bruno Haible  <bruno@clisp.org>
21999
22000         * modules/stpcpy: Distribute lib/stpcpy.h.
22001         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
22002
22003 2003-01-13  Bruno Haible  <bruno@clisp.org>
22004
22005         * modules/*: Add a description.
22006         * modules/strpbrk: Fix Makefile.am snippet.
22007         * modules/strtoimax: Fix dependencies.
22008         * modules/strtoumax: Likewise.
22009
22010 2003-01-13  Bruno Haible  <bruno@clisp.org>
22011
22012         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
22013         * modules/alloca (Makefile.am): All object files depend on alloca.h.
22014         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
22015
22016 2003-01-13  Bruno Haible  <bruno@clisp.org>
22017
22018         * gnulib-tool (func_create_testdir): Store config/* files in the main
22019         directory.
22020         * config.rpath: Move to ...
22021         * config/config.rpath: ... here.
22022         * modules/gettext: Contains config/config.rpath, not config.rpath.
22023         * modules/iconv: Likewise.
22024
22025 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22026
22027         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22028         to avoid collisions with libcurses and libreadline.
22029
22030         * m4/getstr.m4: Remove.
22031         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
22032
22033 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22034
22035         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22036         to avoid collisions with libcurses and libreadline.
22037
22038         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
22039         * lib/getstr.h, getstr.c: Remove.
22040         * lib/getline.c: Include "getline.h", to check interface.
22041         Move body of old getstr.c here: this defines MIN_CHUNK and
22042         declares getdelim2, which is renamed from getstr.
22043         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
22044
22045         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
22046         All uses changed.
22047         * lib/linebuffer.h: Likewise.
22048         (readline): Remove backward-compatibility macro.
22049
22050 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22051
22052         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22053         to avoid collisions with libcurses and libreadline.
22054         * getstr: Remove.
22055         * MODULES.html.sh: Remove getstr.
22056         * modules/getline: Depend on unlocked-io, not getstr.
22057
22058 2003-01-12  Jim Meyering  <jim@meyering.net>
22059
22060         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
22061
22062 2003-01-10  Bruno Haible  <bruno@clisp.org>
22063
22064         * modules/alloca: Change Makefile.am requirements. Simplify Include
22065         requirements. Add lib/alloca_.h to file list.
22066
22067 2003-01-10  Bruno Haible  <bruno@clisp.org>
22068
22069         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
22070
22071 2003-01-10  Bruno Haible  <bruno@clisp.org>
22072
22073         * lib/alloca_.h: New file.
22074         * lib/getdate.y: Unconditionally include alloca.h.
22075         * lib/makepath.c: Likewise.
22076         * lib/setenv.c: Likewise.
22077         * lib/userspec.c: Likewise.
22078
22079 2003-01-09  Karl Berry  <karl@gnu.org>
22080
22081         * MODULES.html.sh: include `dirname $0` in PATH, to find
22082         gnulib-tool.
22083
22084 2003-01-09  Bruno Haible  <bruno@clisp.org>
22085
22086         * modules/stdbool: Change configure.ac, Makefile.am requirements.
22087         Simplify Include requirements. Add lib/stdbool.h.in to file list.
22088
22089 2003-01-09  Bruno Haible  <bruno@clisp.org>
22090
22091         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
22092
22093 2003-01-09  Bruno Haible  <bruno@clisp.org>
22094
22095         * lib/stdbool.h.in: New file.
22096
22097 2003-01-09  Bruno Haible  <bruno@clisp.org>
22098
22099         * gnulib-tool (func_all_modules): Ignore files ending in ~.
22100         * MODULES.html.sh: Likewise.
22101
22102 2003-01-08  Jim Meyering  <jim@meyering.net>
22103
22104         * lib/full-write.c: Undefine and define-away `const' after inclusion
22105         of errno.h, not before.  Suggestion from Bruno Haible.
22106
22107 2003-01-08  Bruno Haible  <bruno@clisp.org>
22108
22109         * modules/full-read: Depend on full-write.
22110
22111 2003-01-08  Bruno Haible  <bruno@clisp.org>
22112
22113         * lib/safe-read.c: Include specification header first, to ensure its
22114         selfcontainedness.
22115         * lib/full-write.c: Likewise.
22116
22117 2003-01-07  Jim Meyering  <jim@meyering.net>
22118
22119         * lib/full-write.c: Rework so that it may serve to define full_read,
22120         too.
22121         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
22122
22123 2003-01-07  Bruno Haible  <bruno@clisp.org>
22124
22125         * lib/strtoimax.c: Include <stdint.h> as an alternative to
22126         <inttypes.h>.
22127         * lib/xstrtol.h: Likewise.
22128         * lib/xstrtoimax.c: Likewise.
22129         * lib/xstrtoumax.c: Likewise.
22130         * lib/human.h: Likewise.
22131
22132         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
22133         on systems that have <inttypes.h> but not <stdint.h>.
22134
22135 2003-01-07  Bruno Haible  <bruno@clisp.org>
22136
22137         * MODULES.html.sh: Add copyright notice.
22138         (missed_files): Omit CVS directory entries.
22139         (func_module): Make it work with sed-3.02.
22140         * MODULES.txt: Remove file.
22141
22142 2003-01-06  Jim Meyering  <jim@meyering.net>
22143
22144         * lib/version-etc.c: Update year in translatable copyright string.
22145
22146 2003-01-03  Karl Berry  <karl@gnu.org>
22147
22148         * config/config.{guess,sub}: update from prep.
22149
22150 2003-01-02  Karl Berry  <karl@gnu.org>
22151
22152         * doc/COPYING.DOC: belatedly updated to 1.2.
22153
22154 2003-01-01  Karl Berry  <karl@gnu.org>
22155
22156         * gnulib-tool (func_verify_module): report module name $module in
22157         error message, not $1.
22158         * gnulib-tool (create-testdir): don't complain if destdir couldn't
22159         be created, only if it doesn't exist.
22160         * gnulib-tool (last_checkin_date): don't expand the $Date here.
22161
22162 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22163
22164         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
22165
22166 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22167
22168         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
22169         memcmp if strcoll doesn't work.
22170
22171 2002-12-31  Bruno Haible  <bruno@clisp.org>
22172
22173         * lib/utime.c (utime_null): No need to call ftruncate if the file was
22174         nonempty.
22175
22176 2002-12-31  Bruno Haible  <bruno@clisp.org>
22177
22178         * lib/memcoll.c (STRCOLL): New macro.
22179         (memcoll): Use it.
22180
22181 2002-12-31  Bruno Haible  <bruno@clisp.org>
22182
22183         * lib/localcharset.h: New file.
22184         * lib/localcharset.c: Include it.
22185         * lib/unicodeio.c: Likewise.
22186
22187 2002-12-31  Bruno Haible  <bruno@clisp.org>
22188
22189         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
22190         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
22191
22192 2002-12-31  Bruno Haible  <bruno@clisp.org>
22193
22194         * lib/getline.h: Include <stddef.h>, for size_t.
22195
22196         * lib/unicodeio.h: Include <stddef.h>, for size_t.
22197         * lib/unicodeio.c: Don't include <stddef.h>.
22198
22199 2002-12-31  Bruno Haible  <bruno@clisp.org>
22200
22201         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
22202         HAVE_TM_ZONE.
22203
22204 2002-12-24  Karl Berry  <karl@gnu.org>
22205
22206         * config/config.guess: update from prep.
22207
22208 2002-12-24  Bruno Haible  <bruno@clisp.org>
22209
22210         General infrasructure.
22211         * m4/README: Rewritten.
22212         * m4/onceonly.m4: New file.
22213         * m4/onceonly_2_57.m4: New file.
22214
22215         Module atexit.
22216         * m4/atexit.m4: New file.
22217
22218         Module strtod.
22219         * m4/strtod.m4: New file.
22220
22221         Module strtol.
22222         * m4/strtol.m4: New file.
22223
22224         Module strtoul.
22225         * m4/strtoul.m4: New file.
22226
22227         Module memchr.
22228         * m4/memchr.m4: New file.
22229
22230         Module memcmp.
22231         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
22232         (jm_FUNC_MEMCMP): Invoke it.
22233
22234         Module memcpy.
22235         * m4/memcpy.m4: New file.
22236
22237         Module memmove.
22238         * m4/memmove.m4: New file.
22239
22240         Module memset.
22241         * m4/memset.m4: New file.
22242
22243         Module strcspn.
22244         * m4/strcspn.m4: New file.
22245
22246         Module strpbrk.
22247         * m4/strpbrk.m4: New file.
22248
22249         Module strstr.
22250         * m4/strstr.m4: New file.
22251
22252         Module strerror.
22253         * m4/strerror.m4: New file.
22254
22255         Module mktime.
22256         * m4/mktime.m4: Renamed from jm-mktime.m4.
22257         (gl_PREREQ_MKTIME): New macro.
22258         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
22259
22260         Module malloc.
22261         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
22262         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
22263         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
22264
22265         Module realloc.
22266         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
22267         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
22268         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
22269
22270         Module strftime.
22271         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
22272         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
22273         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
22274         gl_TM_GMTOFF.
22275         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
22276
22277         Module xalloc.
22278         * m4/xalloc.m4: New file.
22279
22280         Module alloca.
22281         * m4/alloca.m4: New file.
22282
22283         Module putenv.
22284         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
22285         (jm_FUNC_PUTENV): Invoke it.
22286
22287         Module setenv.
22288         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
22289         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
22290         when invoked twice.
22291         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
22292         gt_FUNC_SETENV.
22293
22294         Module memrchr.
22295         * m4/memrchr.m4: New file.
22296
22297         Module stpcpy.
22298         * m4/stpcpy.m4: New file.
22299
22300         Module strcase.
22301         * m4/strcase.m4: New file.
22302
22303         Module strdup.
22304         * m4/strdup.m4: New file.
22305
22306         Module strnlen.
22307         * m4/strnlen.m4: New file.
22308
22309         Module strndup.
22310         * m4/strndup.m4: New file.
22311
22312         Module xstrtod.
22313         * m4/xstrtod.m4: New file.
22314
22315         Module xstrtol.
22316         * m4/xstrtol.m4: New file.
22317
22318         Module getdate.
22319         * m4/getdate.m4: New file.
22320
22321         Module unlocked-io.
22322         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
22323         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
22324         * m4/jm-glibc-io.m4n: Remove file.
22325
22326         Module long-options.
22327         * m4/long-options.m4: New file.
22328
22329         Module md5.
22330         * m4/md5.m4: New file.
22331
22332         Module sha.
22333         * m4/sha.m4: New file.
22334
22335         Module getstr.
22336         * m4/getstr.m4: New file.
22337
22338         Module getline.
22339         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
22340         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
22341         <sys/types.h>, for size_t. Use the function name gnu_getline, not
22342         simply getline. Infoke gl_PREREQ_GETLINE.
22343
22344         Module obstack.
22345         * m4/obstack.m4: New file.
22346
22347         Module hash.
22348         * m4/hash.m4: New file.
22349
22350         Module readtokens.
22351         * m4/readtokens.m4: New file.
22352
22353         Module strverscmp.
22354         * m4/strverscmp.m4: New file.
22355
22356         Module stdbool.
22357         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
22358         OSF/1.
22359
22360         Module strtoll.
22361         * m4/strtoll.m4: New file.
22362
22363         Module strtoull.
22364         * m4/strtoull.m4: New file.
22365
22366         Module strtoimax.
22367         * m4/strtoimax.m4: New file.
22368
22369         Module strtoumax.
22370         * m4/strtoumax.m4: New file.
22371
22372         Module xstrtoimax.
22373         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
22374         jm_AC_PREREQ_XSTRTOIMAX.
22375         Moved the strtol prerequisites to strtol.m4.
22376         Moved the strtoll prerequisites to strtoll.m4.
22377         Moved the strtoimax prerequisites to strtoimax.m4.
22378
22379         Module xstrtoumax.
22380         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
22381         jm_AC_PREREQ_XSTRTOUMAX.
22382         Moved the strtoul prerequisites to strtoul.m4.
22383         Moved the strtoull prerequisites to strtoull.m4.
22384         Moved the strtoumax prerequisites to strtoumax.m4.
22385
22386         Module chown.
22387         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
22388         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
22389
22390         Module dup2.
22391         * m4/dup2.m4: New file.
22392
22393         Module ftruncate.
22394         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
22395         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
22396
22397         Module getgroups.
22398         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
22399         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
22400
22401         Module gettimeofday.
22402         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
22403         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
22404         gl_PREREQ_GETTIMEOFDAY.
22405
22406         Module mkdir.
22407         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
22408         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
22409
22410         Module mkstemp.
22411         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
22412         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
22413         jm_AC_TYPE_UINTMAX_T.
22414         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
22415
22416         Module stat.
22417         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
22418         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
22419
22420         Module lstat.
22421         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
22422         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
22423
22424         Module timespec.
22425         * m4/timespec.m4 (gl_TIMESPEC): New macro.
22426         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
22427         * m4/st_mtim.m4: Indentation.
22428
22429         Module nanosleep.
22430         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
22431         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
22432         gl_PREREQ_NANOSLEEP.
22433
22434         Module regex.
22435         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
22436         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
22437         (gl_REGEX): New macro.
22438
22439         Module rename.
22440         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
22441         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
22442
22443         Module rmdir.
22444         * m4/rmdir.m4: New file.
22445
22446         Module utime.
22447         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
22448         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
22449         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
22450
22451         Module dirname.
22452         * m4/dirname.m4: New file.
22453
22454         Module getopt.
22455         * m4/getopt.m4: New file.
22456
22457         Module unistd-safer.
22458         * m4/unistd-safer.m4: New file.
22459
22460         Module fnmatch.
22461         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
22462         declaration.
22463         (gl_PREREQ_FNMATCH_EXTRA): New macro.
22464         (gl_FUNC_FNMATCH_POSIX): New macro.
22465         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
22466         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
22467         simply fnmatch.
22468
22469         Module exclude.
22470         * m4/exclude.m4: New file.
22471
22472         Module human.
22473         * m4/human.m4: New file.
22474
22475         Module acl.
22476         * m4/acl.m4: Nop.
22477
22478         Module backupfile.
22479         * m4/backupfile.m4: New file.
22480         * m4/d-ino.m4: Indentation.
22481
22482         Module fsusage.
22483         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
22484         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
22485         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
22486
22487         Module dirfd.
22488         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
22489         requirements.
22490
22491         Module euidaccess.
22492         * m4/euidaccess.m4: New file.
22493
22494         Module file-type.
22495         * m4/file-type.m4: New file.
22496
22497         Module fileblocks.
22498         * m4/fileblocks.m4: New file.
22499
22500         Module filemode.
22501         * m4/filemode.m4: New file.
22502
22503         Module isdir.
22504         * m4/isdir.m4: New file.
22505
22506         Module lchown.
22507         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
22508         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
22509
22510         Module makepath.
22511         * m4/makepath.m4: New file.
22512
22513         Module modechange.
22514         * m4/modechange.m4: New file.
22515
22516         Module mountlist.
22517         * m4/mountlist.m4: New file.
22518         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
22519         Indentation.
22520
22521         Module path-concat.
22522         * m4/path-concat.m4: New file.
22523
22524         Module pathmax.
22525         * m4/pathmax.m4: New file.
22526
22527         Module same.
22528         * m4/same.m4: New file.
22529
22530         Module save-cwd.
22531         * m4/save-cwd.m4: New file.
22532
22533         Module savedir.
22534         * m4/savedir.m4: New file.
22535
22536         Module xgetcwd.
22537         * m4/xgetcwd.m4: New file.
22538         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
22539
22540         Module xreadlink.
22541         * m4/xreadlink.m4: New file.
22542
22543         Module safe-read.
22544         * m4/safe-read.m4: New file.
22545
22546         Module safe-write.
22547         * m4/safe-write.m4: New file.
22548
22549         Module closeout.
22550         * m4/closeout.m4: New file.
22551
22552         Module stdio-safer.
22553         * m4/stdio-safer.m4: New file.
22554
22555         Module getpass.
22556         * m4/getpass.m4: New file.
22557
22558         Module getugroups.
22559         * m4/getugroups.m4: New file.
22560
22561         Module group-member.
22562         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
22563         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
22564
22565         Module idcache.
22566         * m4/idcache.m4: New file.
22567
22568         Module userspec.
22569         * m4/userspec.m4: New file.
22570
22571         Module gettime.
22572         * m4/clock_time.m4: New file.
22573         * m4/gettime.m4: New file.
22574
22575         Module settime.
22576         * m4/settime.m4: New file.
22577
22578         Module posixtm.
22579         * m4/posixtm.m4: New file.
22580
22581         Module gethostname.
22582         * m4/gethostname.m4: New file.
22583
22584         Module canon-host.
22585         * m4/canon-host.m4: New file.
22586
22587         Module gettext.
22588         * m4/codeset.m4: New file, from gettext-0.11.5.
22589         * m4/gettext.m4: New file, from gettext-0.11.5.
22590         * m4/glibc21.m4: New file, from gettext-0.11.5.
22591         * m4/iconv.m4: New file, from gettext-0.11.5.
22592         * m4/intdiv0.m4: New file, from gettext-0.11.5.
22593         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
22594         * m4/inttypes.m4: New file, from gettext-0.11.5.
22595         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
22596         * m4/isc-posix.m4: New file, from gettext-0.11.5.
22597         * m4/lcmessage.m4: New file, from gettext-0.11.5.
22598         * m4/lib-ld.m4: New file, from gettext-0.11.5.
22599         * m4/lib-link.m4: New file, from gettext-0.11.5.
22600         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
22601         * m4/progtest.m4: New file, from gettext-0.11.5.
22602         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
22603         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
22604         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
22605
22606         Module localcharset.
22607         * m4/localcharset.m4: New file.
22608
22609         Module hard-locale.
22610         * m4/hard-locale.m4: New file.
22611
22612         Module mbswidth.
22613         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
22614         onceonly macros.
22615         * m4/mbrtowc.m4: Add comment.
22616
22617         Module memcasecmp.
22618         * m4/memcasecmp.m4: New file.
22619
22620         Module memcoll.
22621         * m4/memcoll.m4: New file.
22622
22623         Module unicodeio.
22624         * m4/unicodeio.m4: New file.
22625
22626         Module rpmatch.
22627         * m4/rpmatch.m4: New file.
22628
22629         Module yesno.
22630         * m4/yesno.m4: New file.
22631
22632         Module exitfail.
22633         * m4/exitfail.m4: New file.
22634
22635         Module c-stack.
22636         * m4/c-stack.m4 (gl_C_STACK): New macro.
22637         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
22638
22639         Module error.
22640         * m4/error.m4 (gl_ERROR): New macro.
22641         (jm_PREREQ_ERROR): Use onceonly macros.
22642
22643         Module fatal.
22644         * m4/fatal.m4: New file.
22645
22646         Module getloadavg.
22647         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
22648         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
22649
22650         Module getpagesize.
22651         * m4/getpagesize.m4: New file.
22652
22653         Module getusershell.
22654         * m4/getusershell.m4: New file.
22655
22656         Module physmem.
22657         * m4/physmem.m4: New file.
22658
22659         Module posixver.
22660         * m4/posixver.m4: New file.
22661
22662         Module quotearg.
22663         * m4/quotearg.m4: New file.
22664
22665         Module quote.
22666         * m4/quote.m4: New file.
22667
22668         Module readutmp.
22669         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
22670
22671         Module sig2str.
22672         * m4/sig2str.m4: New file.
22673
22674         Other.
22675         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
22676         ulonglong.m4.
22677         * m4/intmax_t.m4: New file.
22678         * m4/d-type.m4: Indentation.
22679         * m4/jm-macros.m4: Update.
22680         * m4/prereq.m4 (jm_PREREQ): Update.
22681         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
22682         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
22683         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
22684         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
22685         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
22686         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
22687         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
22688         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
22689         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
22690         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
22691         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
22692         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
22693         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
22694         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
22695         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
22696         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
22697         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
22698         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
22699         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
22700
22701 2002-12-24  Bruno Haible  <bruno@clisp.org>
22702
22703         * MODULES.txt: Update according to m4/ changes.
22704
22705         Module gettext.
22706         * config.rpath: New file, from gettext-0.11.5.
22707
22708         * modules/*: New module descriptions.
22709         * gnulib-tool: New file.
22710         * MODULES.html.sh: New file.
22711
22712 2002-12-21  Karl Berry  <karl@gnu.org>
22713
22714         * doc/fdl.texi: update to version 1.2.
22715
22716 2002-12-19  Karl Berry  <karl@gnu.org>
22717
22718         * config/config.guess: update from prep.
22719
22720 2002-12-18  Bruno Haible  <bruno@clisp.org>
22721
22722         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
22723         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
22724
22725 2002-12-17  Bruno Haible  <bruno@clisp.org>
22726
22727         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
22728         stdlib.h, string.h.
22729
22730 2002-12-17  Bruno Haible  <bruno@clisp.org>
22731
22732         * lib/canon-host.c (strdup): Remove unused declaration.
22733
22734         * lib/fsusage.c: Include full_read.h.
22735         (get_fs_usage): Use full_read instead of safe_read.
22736
22737         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
22738
22739 2002-12-12  Karl Berry  <karl@gnu.org>
22740
22741         * config/config.guess: update from prep.
22742
22743 2002-12-11  Bruno Haible  <bruno@clisp.org>
22744
22745         * m4/setenv.m4: New file, from gettext-0.11.5.
22746
22747 2002-12-11  Bruno Haible  <bruno@clisp.org>
22748
22749         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
22750         not unsetenv().
22751         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
22752         modifications:
22753
22754         2002-12-11  Bruno Haible  <bruno@clisp.org>
22755
22756                 * setenv.c (alloca): Fall back to malloc.
22757                 (freea): New macro.
22758                 (setenv): Use freea() to free memory allocated with alloca().
22759
22760         2002-11-13  Bruno Haible  <bruno@clisp.org>
22761
22762                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
22763                 function declarations.
22764                 * unsetenv.c (unsetenv): Likewise.
22765
22766         2002-03-04  Bruno Haible  <bruno@clisp.org>
22767
22768                 Portability to AIX 4.3.3.
22769                 * unsetenv.c: New file, extracted from setenv.c.
22770                 * setenv.c: Move the unsetenv() function to unsetenv.c.
22771
22772         2001-12-20  Bruno Haible  <bruno@clisp.org>
22773
22774                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
22775                 use malloc instead. For SunOS 4.
22776
22777         2001-12-11  Bruno Haible  <bruno@clisp.org>
22778
22779                 * setenv.c: Declare alloca.
22780                 (compar_fn_t): New typedef.
22781                 (KNOWN_VALUE, STORE_VALUE): Use it.
22782
22783         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
22784         setenv.h.
22785
22786 2002-12-10  Paul Eggert  <eggert@twinsun.com>
22787
22788         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
22789         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
22790         Choose values that are less likely to collide with system fnmatch
22791         options.
22792         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
22793         defined (e.g., a pure POSIX system).
22794         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
22795         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
22796
22797 2002-12-06  Paul Eggert  <eggert@twinsun.com>
22798
22799         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
22800         a pain in practice to deal with generated m4 files.  This change
22801         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
22802
22803         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
22804         and jm-glibc-io.m4, as they are no longer a special case.
22805         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
22806         kludge and the auto-generation stuff.  Check only whether the
22807         functions are declared, not whether they exist, since older hosts
22808         that don't declare the functions can't use the optimization anyway.
22809
22810 2002-12-06  Jim Meyering  <jim@meyering.net>
22811
22812         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
22813
22814         Merge in changes from libc's misc/error.c, in preparation
22815         for the merge of gnulib's changes back into libc.
22816
22817         * lib/error.c (_): Define only if not already defined.
22818         Move definition to follow all #include directives.
22819         Include unlocked-io.h only if !_LIBC.
22820         [_LIBC]: Include <libio/libioP.h>.
22821         [USE_IN_LIBIO]: Include <libio/iolibio.h>
22822         (fflush): Tweak definition to use INTUSE.
22823         (putc): Define.
22824
22825 2002-12-05  Paul Eggert  <eggert@twinsun.com>
22826
22827         * lib/alloca.c [defined emacs]: Include "lisp.h".
22828         (xalloc_die) [defined emacs]: New macro.
22829         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
22830         [! defined emacs]: Include <xalloc.h>.
22831         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
22832         (pointer): Typedef to POINTER_TYPE *.
22833         (malloc): Remove decl; we now always use xmalloc.
22834         (alloca): Use old-style definition, since Emacs needs this.
22835         Check for arithmetic overflow when computing combined size.
22836
22837 2002-12-04  Paul Eggert  <eggert@twinsun.com>
22838
22839         Do not generate unlocked-io.h automatically, since it's easier to
22840         maintain it by hand.
22841
22842         * lib/unlocked-io.h: New file, from GNU diffutils,
22843         but with proper copyright notice and attribution.
22844         * lib/gen-uio: Remove.
22845         * lib/Makefile.am: Add copyright notice.
22846         (libfetish_a_SOURCES): Add unlocked-io.h.
22847         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
22848         (DISTCLEANFILES, io_functions): Remove macros.
22849         (EXTRA_DIST): Remove gen_uio.
22850         (unlocked-io.h): Remove rule.
22851
22852 2002-12-04  Jim Meyering  <jim@meyering.net>
22853
22854         Reflect the fact that stat.c and lstat.c are no longer generated.
22855         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
22856         (DISTCLEANFILES): Likewise.
22857         (EXTRA_DIST): Likewise.
22858         (all_local): Don't depend on stat.c or lstat.c.
22859         (stat.c, lstat.c): Remove rules.
22860         (EXTRA_DIST): Remove xstat.in.
22861
22862         * lib/xstat.in: Remove file.  Contents moved into stat.c.
22863         * lib/stat.c: New file.  Contents mostly from xstat.in.
22864         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
22865         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
22866
22867         * lib/safe-read.c: Rework so that it may serve to define safe_write,
22868         too.
22869         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
22870
22871 2002-12-03  Jim Meyering  <jim@meyering.net>
22872
22873         * lib/safe-read.c, safe-write.c: Change variable names and comments,
22874         but not semantics, to minimize the differences between these two files.
22875         (safe_read): Change comment to mention SAFE_READ_ERROR.
22876
22877         * lib/safe-read.c (IS_EINTR): Define.
22878         (safe_read): Use IS_EINTR in place of in-function cpp directives.
22879
22880 2002-12-02  Jim Meyering  <jim@meyering.net>
22881
22882         * lib/safe-read.c (EINTR): Define.
22883         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22884         (INT_MAX): Provide fallback.
22885         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
22886
22887         * lib/safe-read.h (SAFE_READ_ERROR): Define.
22888
22889 2002-12-02  Bruno Haible  <bruno@clisp.org>
22890
22891         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
22892         Define, taken from safe-read.c.
22893         (INT_MAX): Provide fallback.
22894         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
22895         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
22896
22897         * lib/safe-read.c (EINTR): Remove definition.
22898         (safe_read): Don't use EINTR if it is absent.
22899
22900 2002-12-01  Jim Meyering  <jim@meyering.net>
22901
22902         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
22903         zero.
22904         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
22905
22906 2002-11-27  Paul Eggert  <eggert@twinsun.com>
22907
22908         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
22909         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
22910         with `if (! (value < limit)) abort ();', for readability.
22911
22912 2002-11-26  Karl Berry  <karl@gnu.org>
22913
22914         * lib/strdup.c: copy from libc again, with jim's ok.
22915         * lib/.cppi-disable: re-add strdup.c
22916
22917 2002-11-25  Karl Berry  <karl@gnu.org>
22918
22919         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
22920         instead of "strtol.c".
22921
22922 2002-11-25  Karl Berry  <karl@gnu.org>
22923
22924         * config/install-sh: update from automake for variable quoting, $0 in
22925         error msgs, etc.
22926
22927         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
22928         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
22929         entry.
22930
22931 2002-11-25  Jim Meyering  <jim@meyering.net>
22932
22933         * lib/mktime.c: Sync from libc, now that it has the latest fix.
22934
22935 2002-11-24  Karl Berry  <karl@gnu.org>
22936
22937         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
22938         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
22939
22940 2002-11-24  Jim Meyering  <jim@meyering.net>
22941
22942         Update from coreutils:
22943
22944         * lib/mktime.c: Merge in changes from libc.
22945
22946         Avoid a link-time failure on some Linux systems.
22947         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
22948         (otherwise).
22949         (__mon_yday): Declare with the STATIC attribute.
22950         (__mktime_internal): Likewise.
22951         Based on a report from Greg Schafer.
22952
22953 2002-11-23  Jim Meyering  <jim@meyering.net>
22954
22955         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
22956         Use `unsigned', not `int', as type of index.
22957
22958         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
22959
22960         * lib/fsusage.c: Remove unneeded parentheses around operands of
22961         `defined'.
22962
22963 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22964
22965         * lib/quotearg.h: Allow multiple inclusion by surrounding with
22966         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
22967         so that we can be included first.
22968         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
22969         * lib/quotearg.c: Include quotearg.h immediately after config.h.
22970         No need to include stddef.h or sys/types.h any more.
22971         Surround local include files with "", not "<>".
22972         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
22973         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
22974         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
22975         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22976         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22977         (ISPRINT): Remove; no longer needed now that we assume C89.
22978
22979         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
22980         Preserve errno.
22981
22982         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
22983         quotearg_char): Use SIZE_MAX rather than
22984         (size_t) -1 when we are talking about "infinity".
22985
22986         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
22987
22988 2002-11-22  Paul Eggert  <eggert@twinsun.com>
22989
22990         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
22991         hint that one should use `if (! x) abort ();' rather than `assert
22992         (x);', and anyway it's one less thing to worry about configuring.
22993         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
22994         hash_rehash, hash_insert): Use abort rather than assert.
22995
22996 2002-11-22  Bruno Haible  <bruno@clisp.org>
22997
22998         * lib/safe-read.h: Assume C89. Add comments.
22999         (safe_read): Change return type to size_t.
23000         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
23001         byte counts > SSIZE_MAX correctly.
23002         * lib/safe-write.h: New file.
23003         * lib/safe-write.c: New file.
23004         * lib/full-read.h: New file.
23005         * lib/full-read.c: New file.
23006         * lib/full-write.h: Assume C89. Add comments.
23007         * lib/full-write.c: Include safe-write.h.
23008         (full_write): Rewritten to use safe_write.
23009         Suggested by Jim Meyering and Paul Eggert.
23010
23011 2002-11-21  Jim Meyering  <jim@meyering.net>
23012
23013         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
23014
23015         Merge in changes from the coreutils.
23016
23017         2002-09-25  Paul Eggert  <eggert@twinsun.com>
23018         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
23019         <stdint.h>.
23020         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
23021         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
23022         int.  Work more efficiently if X is the same width as uintmax_t.
23023         Do not compare X to -1, to avoid bogus compiler warning.
23024         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
23025         Don't assume that f_frsize and f_bsize are the same type.
23026
23027         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
23028         warning on FreeBSD.
23029
23030         * lib/makepath.c (make_path): Restore umask *before* creating the final
23031         component.
23032         (make_path): Minor reformatting.
23033
23034         * lib/xmalloc.c: Adjust to work with new autoconf macros,
23035         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
23036         HAVE_MALLOC/HAVE_REALLOC.
23037
23038         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
23039         dummy ones.  At least on GNU/Linux systems, `auto' means something
23040         else.
23041         From Michael Stone.
23042
23043 2002-11-21  Bruno Haible  <bruno@clisp.org>
23044
23045         Remove case insensitive option matching.
23046         * lib/argmatch.h (argcasematch): Remove declaration.
23047         (ARGCASEMATCH): Remove macro.
23048         (__xargmatch_internal): Remove case_sensitive argument.
23049         (XARGMATCH): Update.
23050         (XARGCASEMATCH): Remove macro.
23051         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
23052         case_sensitive argument.
23053         (argcasematch): Remove function.
23054         (__xargmatch_internal): Remove case_sensitive argument.
23055         (main): Use XARGMATCH instead of XARGCASEMATCH.
23056
23057         * lib/xmalloc.c: Change compile-time error message. Add comment about
23058         required autoconf version.
23059
23060 2002-11-20  Paul Eggert  <eggert@twinsun.com>
23061
23062         Merge argmatch cleanups from Bison.  Assume C89.
23063
23064         * lib/argmatch.c: Include config.h here, not in argmatch.h.
23065         Include stdlib.h, for EXIT_FAILURE.
23066         Always include <string.h>, since we assume C89.
23067         (EXIT_FAILURE): Remove pre-C89 bug workaround.
23068         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
23069         Include <stddef.h> instead, since it's all we need for size_t.
23070         (PARAMS): Remove.  All uses removed.
23071         (ARRAY_CARDINALITY): Do not bother to #undef.
23072         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
23073         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
23074         Remove unnecessary parentheses.
23075         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
23076         Insert necessary parentheses.
23077         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
23078         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
23079
23080 2002-11-19  Bruno Haible  <bruno@clisp.org>
23081
23082         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
23083         * lib/mbswidth.h: Include <stddef.h>, for size_t.
23084
23085         * lib/mbswidth.h (PARAMS): Remove macro.
23086         (mbswidth, mbsnwidth): Use ANSI C function declarations.
23087         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
23088
23089         * lib/gcd.h (PARAMS): Remove macro.
23090         (gcd): Use ANSI C function declarations.
23091         * lib/gcd.c (gcd): Likewise.
23092
23093 2002-11-15  Bruno Haible  <bruno@clisp.org>
23094
23095         * lib/strcspn.c: Include <stddef.h>.
23096         (strcspn): Use ANSI C function declaration. Change return type to
23097         size_t. Use NULL.
23098         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
23099         (strpbrk): Use NULL.
23100         * lib/strpbrk.h (PARAMS): Remove macro.
23101         (strpbrk): Use ANSI C function declaration.
23102         * lib/strstr.c: Don't include <sys/types.h>.
23103         * lib/strstr.h (PARAMS): Remove macro.
23104         (strstr): Use ANSI C function declarations.
23105
23106 2002-11-14  Karl Berry  <karl@gnu.org>
23107
23108         * config/mkinstalldirs: `do' on separate line, instead of
23109         `for var; do'.
23110
23111 2002-11-06  Bruno Haible  <bruno@clisp.org>
23112
23113         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
23114         * lib/gcd.c (gcd): Likewise.
23115
23116 2002-11-05  Bruno Haible  <bruno@clisp.org>
23117
23118         * lib/gcd.h: New file, from gettext-0.11.5.
23119         * lib/gcd.c: New file, from gettext-0.11.5.
23120
23121 2002-11-05  Bruno Haible  <bruno@clisp.org>
23122
23123         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23124         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23125         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23126         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23127
23128         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
23129         <libintl.h>.
23130         * lib/makepath.c: Include gettext.h instead of <locale.h> and
23131         <libintl.h>.
23132
23133         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
23134         * lib/human.c: Include gettext.h instead of <libintl.h>.
23135         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
23136         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
23137         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
23138         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
23139         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
23140         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
23141         (textdomain): Remove definition.
23142         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
23143
23144         * lib/long-options.c: Remove include of <libintl.h> and definition of
23145         _.
23146         * lib/same.c: Remove include of <libintl.h> and definition of _.
23147
23148 2002-11-04  Owen Taylor  <otaylor@redhat.com>
23149
23150         * lib/config.charset: A few additions for Solaris.
23151
23152 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23153
23154         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
23155         * lib/localcharset.c (locale_charset): Declare as extern "C".
23156
23157 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23158
23159         * lib/config.charset: msdos in uk_UA uses CP1125.
23160
23161 2002-11-04  Bruno Haible  <bruno@clisp.org>
23162
23163         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
23164         * lib/strcase.h: New file, from GNU gettext-0.11.5.
23165         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
23166         * lib/strstr.h: New file, from GNU gettext-0.11.5.
23167         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
23168
23169 2002-11-04  Bruno Haible  <bruno@clisp.org>
23170
23171         * lib/localcharset.c (locale_charset): Don't return an empty string.
23172
23173 2002-11-04  Bruno Haible  <bruno@clisp.org>
23174
23175         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
23176         aliases.
23177
23178 2002-11-04  Bruno Haible  <bruno@clisp.org>
23179
23180         * lib/config.charset: Update for newest glibc. Add canonical names
23181         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
23182
23183 2002-11-04  Bruno Haible  <bruno@clisp.org>
23184
23185         * lib/config.charset: Add support for NetBSD.
23186
23187 2002-11-04  Bruno Haible  <bruno@clisp.org>
23188
23189         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
23190
23191 2002-11-01  Bruno Haible  <bruno@clisp.org>
23192
23193         * configure.in: Add AC_CONFIG_AUX_DIR call.
23194         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
23195         test/Makefile.
23196         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
23197
23198 2002-09-28  Karl Berry  <karl@gnu.org>
23199
23200         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
23201         installed automake until the next release, since changes have been
23202         made.
23203
23204 2002-09-25  Karl Berry  <karl@gnu.org>
23205
23206         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
23207         * lib/getopt*: copy from libc/posix.
23208         * lib/gettext.h: copy from gettext.
23209         * lib/.cppi-disable: add strdup.c, gettext.h.
23210
23211 2002-09-25  Karl Berry  <karl@gnu.org>
23212
23213         * config/srclist.txt: enable gettext.h check.
23214         * config/config.{guess,sub}: update from prep.
23215         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
23216                 from automake 1.6.3.
23217         See srclist*.
23218
23219 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
23220
23221         * regex.c (PATFETCH): Remove the translating fetch.
23222         (PATFETCH_RAW): Rename to PATFETCH.
23223         (set_image_of_range): New fun.
23224         (SET_RANGE_TABLE_WORK_AREA): Use it.
23225         (regex_compile): Don't translate the pattern chars so eagerly.
23226         Only do it when inserting an `exactn' bytecode or when handling
23227         a char-range.
23228         (mutually_exclusive_p): Avoid empty statement.
23229
23230 2002-07-06  Jim Meyering  <meyering@lucent.com>
23231
23232         * m4/README: Don't mention Makefile.am.in.
23233         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
23234
23235 2002-07-01  Jim Meyering  <meyering@lucent.com>
23236
23237         * lib/c-stack.c: Include sys/time.h.
23238         From Volker Borchert.
23239
23240 2002-06-26  Paul Eggert  <eggert@twinsun.com>
23241
23242         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
23243
23244 2002-06-26  Paul Eggert  <eggert@twinsun.com>
23245
23246         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
23247         New macro.  Use it uniformly instead of
23248         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
23249         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
23250         reported by Vin Shelton.
23251
23252 2002-06-22  Paul Eggert  <eggert@twinsun.com>
23253
23254         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
23255         Do not assume SA_SIGINFO behavior.
23256         Bug reported by Jim Meyering on NetBSD 1.5.2.
23257
23258 2002-06-22  Jim Meyering  <meyering@lucent.com>
23259
23260         * m4/c-stack.m4: New file, from diffutils-2.8.2.
23261         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
23262
23263         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
23264         now that configure.ac uses AC_GNU_SOURCE.
23265         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
23266         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
23267
23268         Update to latest tools.  Suggestions from Paul Eggert.
23269         * m4/stdbool.m4: New file, from diffutils-2.8.2.
23270         * m4/gnu-source.m4: Update from diffutils-2.8.2.
23271         * m4/fnmatch.m4: Likewise.
23272         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
23273         to AC_HEADER_STDBOOL
23274
23275 2002-06-22  Jim Meyering  <meyering@lucent.com>
23276
23277         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
23278         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
23279
23280 2002-06-22  Jim Meyering  <meyering@lucent.com>
23281
23282         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
23283
23284         * lib/exitfail.c, exitfail.h: Likewise.
23285         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
23286
23287         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
23288         of fnmatch.h.
23289         (EXTRA_DIST): Add fnmatch_loop.c.
23290         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
23291
23292         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
23293         * lib/fnmatch.c: Update from diffutils-2.8.2.
23294         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
23295         * lib/fnmatch.h: Remove file.
23296
23297 2002-06-21  Jim Meyering  <meyering@lucent.com>
23298
23299         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
23300         * m4/mbrtowc.m4: Likewise.
23301
23302         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
23303         * m4/mbswidth.m4: Reflect name change:
23304         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
23305         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23306
23307         * m4/lib-link.m4: Update from gettext-0.11.2.
23308         * m4/gettext.m4: Likewise.
23309
23310         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
23311         From Alfred M. Szmidt.
23312
23313 2002-06-18  Paul Eggert  <eggert@twinsun.com>
23314
23315         * lib/file-type.h: Report an error if neither S_ISREG nor
23316         S_IFREG is defined, instead of using a test specific to glibc
23317         2.2.  This should be safe, since POSIX requires S_ISREG and
23318         Unix Version 7 had S_IFREG.  We don't need to check for
23319         <sys/types.h> since we don't use any symbols that it defines.
23320
23321 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
23322
23323         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
23324         $@-t, so that each temporary file name is unique and valid in the first
23325         8 characters, for operation under DOS.
23326
23327 2002-06-15  Paul Eggert  <eggert@twinsun.com>
23328
23329         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
23330
23331 2002-06-15  Jim Meyering  <meyering@lucent.com>
23332
23333         Work even with DJGPP 2.03, which lacks support for symlinks.
23334         From Richard Dawe.
23335         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
23336         is defined.
23337         * lib/lchown.c (S_ISLNK): Likewise.
23338
23339 2002-06-15  Jim Meyering  <meyering@lucent.com>
23340
23341         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
23342         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
23343         have been included before this file.
23344
23345 2002-06-14  Jim Meyering  <meyering@lucent.com>
23346
23347         * lib/file-type.h: Use the version from diffutils-2.8.2.
23348         * lib/file-type.c: Likewise.
23349
23350 2002-06-07  Jim Meyering  <meyering@lucent.com>
23351
23352         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
23353         They're needed at least for NetBSD 1.5.2.
23354         ($statxfs_includes): Include those same headers.
23355         ($statxfs_includes): Include sys/vfs.h if available.
23356         ($statxfs_includes): Likewise for sys/statvfs.h.
23357         Check for the following members in both structs statfs and statvfs:
23358         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
23359
23360 2002-06-01  Jim Meyering  <meyering@lucent.com>
23361
23362         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
23363         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
23364
23365 2002-05-28  Jim Meyering  <meyering@lucent.com>
23366
23367         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
23368         Reported by Volker Borchert.
23369
23370 2002-05-27  Jim Meyering  <meyering@lucent.com>
23371
23372         Fix a problem seen only on nonconforming systems whereby ls.c's
23373         use of localtime, and then of gettimeofday would cause trouble:
23374         the localtime call used to initialize rpl_gettimeofday's save
23375         mechanism would clobber ls's current local time information so
23376         that in any long listing the first file would always be listed
23377         with date 1970-01-01.  Analysis by Volker Borchert.
23378
23379         * lib/gettimeofday.c (localtime): Undefine.
23380         (rpl_localtime): New function.
23381
23382 2002-05-27  Jim Meyering  <meyering@lucent.com>
23383
23384         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
23385         localtime.
23386
23387         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
23388         use the replacement function; it wouldn't resolve at link time.
23389         Reported by Volker Borchert.
23390
23391 2002-05-22  Jim Meyering  <meyering@lucent.com>
23392
23393         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
23394         file-type.h.
23395         * lib/file-type.h: New file.
23396         * lib/file-type.c (file_type): New file/function.  Extracted from
23397         diffutils.
23398
23399 2002-04-30  Jim Meyering  <meyering@lucent.com>
23400
23401         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
23402
23403 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23404
23405         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
23406
23407 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23408
23409         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
23410         Do not check for alloca.h (no longer used) or stdbool.h (was never
23411         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
23412
23413 2002-04-29  Paul Eggert  <eggert@twinsun.com>
23414
23415         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
23416
23417 2002-04-29  Jim Meyering  <meyering@lucent.com>
23418
23419         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
23420         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
23421         Use AC_FUNC_STRNLEN here instead.
23422
23423         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
23424         With autoconf-2.53a, it's part of AC_PROG_CC.
23425
23426 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23427
23428         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
23429         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
23430
23431 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23432
23433         * lib/sig2str.h, lib/sig2str.c: New files.
23434         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
23435
23436 2002-04-28  Paul Eggert  <eggert@twinsun.com>
23437
23438         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
23439         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
23440         of 127, since 64 is the largest conceivable number for ancient
23441         nonstandard hosts.
23442         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
23443
23444 2002-04-28  Jim Meyering  <meyering@lucent.com>
23445
23446         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
23447
23448 2002-04-24  Jim Meyering  <meyering@lucent.com>
23449
23450         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
23451         (jm_PREREQ): Use it.
23452
23453         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
23454         mach/mach.h fcntl.h.
23455         Check for this function: setlocale.
23456
23457 2002-04-24  Jim Meyering  <meyering@lucent.com>
23458
23459         * lib/gettext.h: New file, from Gettext.
23460         * lib/Makefile.am (INCLUDES): Remove -I../intl.
23461         (libfetish_a_SOURCES): Add gettext.h.
23462
23463 2002-04-16  Jim Meyering  <meyering@lucent.com>
23464
23465         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
23466         ut_pid, ut_id, ut_exit.
23467
23468 2002-04-16  Jim Meyering  <meyering@lucent.com>
23469
23470         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
23471         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
23472         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
23473
23474 2002-04-12  Jim Meyering  <meyering@lucent.com>
23475
23476         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
23477         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
23478         existence of the getmntinfo function.  Needed for Darwin 5.3.
23479
23480         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
23481         This is necessary at least on Darwin 5.3.
23482
23483         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
23484         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
23485         strnlen.o in the library, and that makes some versions of ranlib
23486         object.
23487
23488 2002-04-12  Jim Meyering  <meyering@lucent.com>
23489
23490         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
23491
23492 2002-04-09  Jim Meyering  <meyering@lucent.com>
23493
23494         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
23495         to be more precise.  Rather than saying we're checking whether the
23496         function `works', say what we're testing.
23497         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
23498         Reported by Bruno Haible.
23499
23500 2002-03-10  Jim Meyering  <meyering@lucent.com>
23501
23502         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
23503         Suggestion from Santiago Vila.
23504
23505 2002-03-08  Jim Meyering  <meyering@lucent.com>
23506
23507         * lib/rename.c: Mention that this wrapper is needed also on
23508         mips-dec-ultrix4.4 systems.
23509
23510 2002-03-02  Jim Meyering  <meyering@lucent.com>
23511
23512         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
23513         not HAVE_CLOCK_SETTIME.
23514
23515 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23516
23517         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
23518         Check for clock_settime.
23519
23520 2002-02-27  Paul Eggert  <eggert@twinsun.com>
23521
23522         * lib/nanosleep.h: Rename to....
23523         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
23524
23525         * lib/gettime.c: New file.
23526         * lib/settime.c: New file.
23527         * lib/stime.c: Remove.
23528
23529         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
23530         timespec.h.  Remove nanosleep.h.
23531
23532 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23533
23534         * m4/acl.m4: New file.
23535         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
23536         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
23537
23538 2002-02-25  Paul Eggert  <eggert@twinsun.com>
23539
23540         * lib/acl.c, lib/acl.h: New files.
23541         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
23542
23543 2002-02-24  Jim Meyering  <meyering@lucent.com>
23544
23545         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
23546         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
23547         cause trouble.  Reported by Nelson Beebe.
23548
23549 2002-02-23  Paul Eggert  <eggert@twinsun.com>
23550
23551         * lib/path-concat.c (xpath_concat): Reorder code to pacify
23552         compilers that don't know that xalloc_die never returns.
23553
23554 2002-02-20  Jim Meyering  <meyering@lucent.com>
23555
23556         * lib/getdate.c: Regenerate using bison-1.33.
23557
23558 2002-02-17  Jim Meyering  <meyering@lucent.com>
23559
23560         * config/config.guess (main): Don't use `head -1'; it's no longer
23561         portable. Use `sed 1q' instead.
23562
23563 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
23564
23565         * m4/codeset.m4: Upgrade to gettext-0.11.
23566         * m4/gettext.m4: Upgrade to gettext-0.11.
23567         * m4/glibc21.m4: Upgrade to gettext-0.11.
23568         * m4/iconv.m4: Upgrade to gettext-0.11.
23569         * m4/isc-posix.m4: Upgrade to gettext-0.11.
23570         * m4/lcmessage.m4: Upgrade to gettext-0.11.
23571         * m4/lib-ld.m4: New file, from gettext-0.11.
23572         * m4/lib-link.m4: New file, from gettext-0.11.
23573         * m4/lib-prefix.m4: New file, from gettext-0.11.
23574         * m4/progtest.m4: Upgrade to gettext-0.11.
23575
23576 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23577
23578         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
23579         (jm_PREREQ): Use it.
23580
23581 2002-02-15  Paul Eggert  <eggert@twinsun.com>
23582
23583         * lib/posixver.c, lib/posixver.h: New files.
23584         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23585
23586 2002-02-02  Paul Eggert  <eggert@twinsun.com>
23587             Bruno Haible  <bruno@clisp.org>
23588
23589         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
23590         (fwrite_success_callback): New declaration.
23591         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
23592         print_unicode_char. Call failure callback instead of error.
23593         (fwrite_success_callback): New function.
23594         (exit_failure_callback): New function.
23595         (fallback_failure_callback): New function.
23596         (print_unicode_char): Call unicode_to_mb.
23597
23598 2002-01-26  Jim Meyering  <meyering@lucent.com>
23599
23600         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
23601         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
23602
23603 2002-01-26  Jim Meyering  <meyering@lucent.com>
23604
23605         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
23606
23607 2002-01-22  Paul Eggert  <eggert@twinsun.com>
23608
23609         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
23610
23611 2002-01-22  Jim Meyering  <meyering@lucent.com>
23612
23613         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
23614         Otherwise, some versions of automake would omit the rule that makes
23615         Makefile from Makefile.in.
23616
23617 2002-01-21  Paul Eggert  <eggert@twinsun.com>
23618
23619         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
23620         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
23621         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
23622         (memcoll): Set errno to zero if there is no error.
23623
23624         * lib/quotearg.c (quotearg_buffer_restyled):
23625         Fix bug with quoting buffers containing NUL when backslashing escapes.
23626         This bug was exposed by the other changes in this patch.
23627         (quotearg_n_options): New arg ARGSIZE.
23628         All callers changed.
23629         (quoting_options_from_style): New function.
23630         (quotearg_n_style): Use it.
23631         (quotearg_n_style_mem): New function.
23632
23633         * lib/quotearg.h (quotearg_n_style_mem): New function.
23634
23635 2002-01-19  Jim Meyering  <meyering@lucent.com>
23636
23637         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
23638         Remove useless quotes: DF_PROG="df".
23639         * m4/strnlen.m4: New file.
23640
23641 2002-01-16  Paul Eggert  <eggert@twinsun.com>
23642
23643         * lib/backupfile.c (ISDIGIT): Comment fix.
23644         * lib/getdate.y (ISDIGIT): Likewise.
23645         * lib/posixtm.c (ISDIGIT, year): Likewise.
23646         * lib/strverscmp.c (ISDIGIT): Likewise.
23647         * lib/userspec.c (ISDIGIT): Likewise.
23648
23649 2002-01-16  Jim Meyering  <meyering@lucent.com>
23650
23651         * lib/getdate.y: Add three semicolons, each just before a closing
23652         brace. Bison (as of version 1.31) no longer papers over that mistake.
23653
23654 2002-01-05  Jim Meyering  <meyering@lucent.com>
23655
23656         * lib/version-etc.c (version_etc_copyright): Update copyright year.
23657
23658 2001-12-19  Paul Eggert  <eggert@twinsun.com>
23659
23660         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
23661         not silently exit merely because the output buffer happens to
23662         have nothing pending.
23663
23664 2001-12-18  Paul Eggert  <eggert@twinsun.com>
23665
23666         See the big note in ../ChangeLog.
23667         * lib/human.c (suffixes): Prefer K to k for 1024.
23668         (generate_suffix_backwards): New function.
23669         (human_readable_inexact): Use it.
23670         * lib/xstrtol.c (__xstrtol): If there is no number but there
23671         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
23672         Accept 'K' as well as 'k'.
23673
23674 2001-12-15  Jim Meyering  <meyering@lucent.com>
23675
23676         * lib/regex.h (__restrict_arr): Update from libc.
23677
23678         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
23679         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
23680         (STREQ): Define.
23681
23682 2001-12-14  Jim Meyering  <meyering@lucent.com>
23683
23684         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
23685         Suggestion from Bruno Haible.
23686
23687 2001-12-10  Jim Meyering  <meyering@lucent.com>
23688
23689         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
23690         xrealloc, Instead, include "xalloc.h".
23691         (initbuffer): Don't cast xmalloc return value to char*.
23692         (readline): Reword comment.
23693         Don't cast xrealloc return value to char*
23694         Return NULL, not 0.
23695
23696 2001-12-09  Jim Meyering  <meyering@lucent.com>
23697
23698         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
23699         about `signed and unsigned type in conditional expression'.
23700         * lib/posixtm.c (posix_time_parse): Likewise.
23701
23702         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
23703
23704         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
23705         to avoid a pedantic warning.
23706
23707         * lib/getstr.c: Don't include assert.h.
23708         (getstr): Remove warning-evoking assertions.
23709         Return -1 if offset parameter is out of bounds.
23710         Change the type of a local from int to size_t.
23711
23712         * lib/strftime.c (my_strftime_localtime_r): Include this function
23713         definition in the `#if ! HAVE_TM_GMTOFF' block.
23714
23715         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
23716         Include xalloc.h instead.
23717
23718 2001-12-02  Jim Meyering  <meyering@lucent.com>
23719
23720         * lib/tempname.c: Don't declare getenv, thus reverting the change of
23721         2001-11-18.  It's no longer necessary, now that stdlib.h is always
23722         included.
23723
23724         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
23725         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
23726
23727 2001-11-30  Akim Demaille  <akim@epita.fr>
23728
23729         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
23730         before being defined.
23731
23732 2001-11-27  Paul Eggert  <eggert@twinsun.com>
23733
23734         * lib/quotearg.h (quotearg_n, quotearg_n_style):
23735         First arg is int, not unsigned.
23736         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
23737         (SIZE_MAX, UINT_MAX): New macros.
23738         (quotearg_n_options): Abort if N is negative.
23739         Avoid overflow check on hosts where size_t is 64 bits and int
23740         is 32 bits, as overflow is impossible there.
23741         Fix off-by-one typo that caused unnecessary reallocation.
23742
23743 2001-11-27  Jim Meyering  <meyering@lucent.com>
23744
23745         * lib/tempname.c: Merge with version from libc.
23746         * lib/regex.c: Likewise.
23747
23748         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
23749         systems for which STDC_HEADERS is 0, it was not included, resulting in
23750         a warning about an integer-to-pointer conversion problem with getenv.
23751         Reported by Volker Borchert.
23752
23753 2001-11-26  Jim Meyering  <meyering@lucent.com>
23754
23755         * lib/gtod.h: Remove file.
23756         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
23757         * lib/gettimeofday.c: Don't include gtod.h.
23758         (GTOD_init): Remove function.
23759         (rpl_gettimeofday): Do its job here instead, rather than aborting.
23760         Suggestion from Volker Borchert.
23761
23762 2001-11-23  Jim Meyering  <meyering@lucent.com>
23763
23764         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
23765         it.
23766         * lib/hash.c (struct hash_table): Define it here instead.
23767
23768 2001-11-22  Jim Meyering  <meyering@lucent.com>
23769
23770         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
23771
23772 2001-11-20  Jim Meyering  <meyering@lucent.com>
23773
23774         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
23775         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
23776
23777 2001-11-19  Jim Meyering  <meyering@lucent.com>
23778
23779         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
23780         directory.  Use "conftestXXXXXX" as the template.
23781         Suggestion from Paul Eggert.
23782
23783         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
23784         immediately, so the test doesn't mistakenly hit the max-open-files
23785         limit.
23786
23787 2001-11-18  Paul Eggert  <eggert@twinsun.com>
23788
23789         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
23790         (TEMPORARIES): New macro.
23791         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
23792         removes an artificial limitation (e.g. HP-UX 10.20, where
23793         TMP_MAX is 17576).
23794
23795 2001-11-18  Jim Meyering  <meyering@lucent.com>
23796
23797         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
23798
23799 2001-11-18  Jim Meyering  <meyering@lucent.com>
23800
23801         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
23802         on SunOS 4.
23803
23804         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
23805         files will be created before anything else.
23806
23807 2001-11-17  Paul Eggert  <eggert@twinsun.com>
23808
23809         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
23810         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
23811
23812 2001-11-17  Jim Meyering  <meyering@lucent.com>
23813
23814         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
23815         Prompted by a report from Bob Proulx.
23816
23817         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
23818         Instead, require UTILS_FUNC_MKSTEMP.
23819
23820 2001-11-17  Jim Meyering  <meyering@lucent.com>
23821
23822         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
23823         Now, that's done as part of AC_FUNC_STRTOD.
23824
23825 2001-11-17  Jim Meyering  <meyering@lucent.com>
23826
23827         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
23828         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
23829         rather than group writable.  Patch by Juan F. Codagnone.
23830
23831         * lib/readtokens.c: Remove explicit declarations of xmalloc and
23832         xrealloc, Instead, include "xalloc.h".
23833
23834         * lib/mountlist.c: Include unlocked-io.h after all system headers.
23835         Remove explicit declarations of xmalloc, xrealloc,
23836         and xstrdup.  Instead, include "xalloc.h".
23837
23838         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
23839         unlocked-io.h.
23840         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
23841         Likewise.
23842         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
23843
23844         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
23845         Reported by Padraig Brady.
23846
23847         * lib/mkstemp.c: #undef mkstemp.
23848         Include config.h.
23849         (rpl_mkstemp): Rename from mkstemp.
23850         Protoize.
23851
23852 2001-11-16  Jim Meyering  <meyering@lucent.com>
23853
23854         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
23855         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
23856         determine the amount of total physical memory, use pstat_getstatic.
23857         HPUX-11 doesn't define _SC_PHYS_PAGES.
23858         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
23859         If sysconf couldn't be used to determine the amount of available
23860         physical memory, use both pstat_getstatic and pstat_getdynamic.
23861         Based on a patch from Bob Proulx.
23862
23863 2001-11-10  Jim Meyering  <meyering@lucent.com>
23864
23865         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
23866         (jm_PREREQ): Use it.
23867
23868 2001-11-09  Jim Meyering  <meyering@lucent.com>
23869
23870         * m4/jm-macros.m4: Require autoconf-2.52f.
23871         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
23872         Use these AC_-prefixed names, not the AM_-prefixed ones.
23873
23874         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
23875
23876 2001-11-05  Jim Meyering  <meyering@lucent.com>
23877
23878         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
23879
23880 2001-11-04  Jim Meyering  <meyering@lucent.com>
23881
23882         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
23883         $DEFS.
23884
23885 2001-11-03  Jim Meyering  <meyering@lucent.com>
23886
23887         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
23888         of AC_DEFUN.
23889
23890         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
23891         know the name of the variable in the macro definition.
23892
23893 2001-11-03  Jim Meyering  <meyering@lucent.com>
23894
23895         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
23896         in argmatch_to_argument call.
23897
23898         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
23899         argument.
23900
23901         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
23902         e.g., a fault due to an attempt to free a NULL pointer.
23903
23904 2001-11-01  Jim Meyering  <meyering@lucent.com>
23905
23906         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
23907         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
23908
23909 2001-11-01  Jim Meyering  <meyering@lucent.com>
23910
23911         * lib/dirfd.c, lib/dirfd.h: New files.
23912         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
23913
23914         * lib/hash.c (hash_print) [TESTING]: Clean up.
23915
23916 2001-10-22  Paul Eggert  <eggert@twinsun.com>
23917
23918         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
23919         to avoid a warning if -Wall.
23920
23921 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
23922
23923         * README: New file
23924         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
23925         (per RMS's instructions, this is now the canonical source)
23926         * lgpl/, gpl/: New directories.
23927
23928 2001-10-21  Paul Eggert  <eggert@twinsun.com>
23929
23930         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
23931
23932 2001-10-21  Jim Meyering  <meyering@lucent.com>
23933
23934         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
23935         this code would end up calling gettext even in packages built
23936         with --disable-nls.
23937         * lib/getopt.c (_): Likewise.
23938         * lib/regex.c (_): Likewise.
23939
23940 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23941
23942         * m4/error.m4 (jm_PREREQ_ERROR):
23943         Do not invoke AC_CHECK_FUNCS with strerror_r, as
23944         AC_FUNC_STRERROR_R does that.
23945         Check for strerror declaration.
23946
23947         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
23948         are supposed to have them these days.
23949         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
23950         Merge changes from latest Autoconf CVS.
23951         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
23952         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
23953         POSIX decided to standardize on the int flavor of strerror_r.
23954
23955 2001-10-20  Paul Eggert  <eggert@twinsun.com>
23956
23957         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
23958         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
23959         Use strerror_r that is only a macro, even if it is not a function.
23960         (strerror): Check for HAVE_DECL_STRERROR before declaring.
23961         (private_strerror): Use prototypes, not old-style function definition.
23962         (print_errno_message): New function.
23963         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
23964         char*-flavored one.
23965         (error_tail, error, error_at_line): Use it.
23966
23967 2001-10-11  Jim Meyering  <meyering@lucent.com>
23968
23969         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
23970         and quote_n (1, ... to avoid clobbering a buffer.
23971
23972 2001-10-05  Jim Meyering  <meyering@lucent.com>
23973
23974         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
23975         hash-pjw.h.
23976         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
23977         * lib/hash-pjw.h: New file.
23978
23979 2001-09-30  Jim Meyering  <meyering@lucent.com>
23980
23981         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
23982         `struct fsstat' has the `f_fstypename' member.
23983         Use that to define FS_TYPE, which is now used to make
23984         the getfsstat link test tighter.
23985
23986 2001-09-30  Jim Meyering  <meyering@lucent.com>
23987
23988         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
23989         Include <sys/ucred.h>, for Apple Darwin.
23990         Include sys/mount.h and sys/fs_types.h only if available.
23991         (FS_TYPE): Define.
23992         (read_filesystem_list): Use FS_TYPE.
23993
23994 2001-09-29  Paul Eggert  <eggert@twinsun.com>
23995
23996         * lib/exclude.c (excluded_filename): 0 -> false, since it's
23997         a boolean context.
23998
23999 2001-09-29  Jim Meyering  <meyering@lucent.com>
24000
24001         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24002         [one-argument getmntent function]): Include stdio.h before mntent.h.
24003         SunOS 4.1.x needs it for the declaration of `FILE'.
24004         Patch by Volker Borchert.
24005
24006         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24007         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
24008         sys/fs_types.h, and make the link-test for getfsstat guard #include
24009         directives with appropriate #if HAVE_*_H tests so that we can
24010         detect getfsstat on Apple Darwin1.3.7 systems.
24011         Reported by Nelson Beebe.
24012         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
24013
24014 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24015
24016         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24017         #defines strtoimax.  Also treat the other strto* functions
24018         like strtoimax.
24019
24020         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24021         Check for strtoul and strtoumax,
24022         as those declarations are made even in the signed case.
24023         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
24024         Likewise, for strtol and strtoimax.
24025
24026 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24027
24028         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24029         #defines strtoimax.  Also treat the other strto* functions
24030         like strtoimax.
24031
24032         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
24033         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
24034         (strtoimax, strtoumax): Do not declare if already defined as a macro.
24035
24036 2001-09-26  Jim Meyering  <meyering@lucent.com>
24037
24038         Most macros in unlocked-io.h had the wrong number of arguments.
24039         * lib/gen-uio: New script.
24040         (USE_UNLOCKED_IO): Define to 1 if not already defined.
24041         * lib/unlocked-io.hin: Remove file.
24042         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
24043         rather than trying to embed it here.
24044         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
24045         Reported by Padraig Brady.
24046
24047 2001-09-25  Volker Borchert  <bt@teknon.de>
24048
24049         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
24050         `result'.
24051
24052 2001-09-24  Jim Meyering  <meyering@lucent.com>
24053
24054         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
24055
24056 2001-09-23  Jim Meyering  <meyering@lucent.com>
24057
24058         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
24059         instead of the mere test for existence of mntent.h.  The latter
24060         would get a false-positive on AIX 3.4 systems.
24061         In the outer getmntent if-block, don't die if neither of the getmntent
24062         tests succeeds.  Instead, just fall through and continue with the
24063         remaining tests.
24064
24065 2001-09-23  Jim Meyering  <meyering@lucent.com>
24066
24067         * lib/mountlist.c: Remove useless parentheses in #if directives.
24068         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
24069         the deprecated MOUNTED symbol is no longer defined in mntent.h.
24070
24071 2001-09-22  Jim Meyering  <meyering@lucent.com>
24072
24073         * m4/gettext.m4: New file.  From gettext.
24074         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
24075         * m4/progtest.m4: Likewise
24076         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
24077         * m4/glibc21.m4: Likewise.
24078
24079         * m4/libintl.m4: Remove.  No longer used.
24080
24081 2001-09-22  Jim Meyering  <meyering@lucent.com>
24082
24083         * lib/localcharset.c: Update from latest gettext.
24084         * lib/config.charset: Likewise.
24085
24086 2001-09-20  Jim Meyering  <meyering@lucent.com>
24087
24088         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
24089         strtoimax.
24090         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
24091         strtoumax.
24092
24093 2001-09-20  Jim Meyering  <meyering@lucent.com>
24094
24095         * lib/xstrtol.c (strtoimax): Guard declaration with
24096         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
24097         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
24098         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
24099         (strtoumax): Likewise, for completeness (it wasn't necessary).
24100
24101 2001-09-17  Paul Eggert  <eggert@twinsun.com>
24102
24103         * lib/strtoimax.c (HAVE_LONG_LONG):
24104         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
24105         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
24106         to work around bug in IBM C compiler.
24107
24108 2001-09-17  Jim Meyering  <meyering@lucent.com>
24109
24110         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
24111         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
24112         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
24113         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
24114         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
24115         whenever the right hand side need not be expanded by the shell.
24116
24117 2001-09-16  Paul Eggert  <eggert@twinsun.com>
24118
24119         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
24120         library.  It's not correct, as some older glibcs are buggy.
24121         fnmatch wasn't fixed until glibc 2.2.
24122
24123         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
24124         special shell magic here.
24125
24126 2001-09-16  Jim Meyering  <meyering@lucent.com>
24127
24128         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
24129         * m4/jm-macros.m4: Require it.
24130
24131 2001-09-16  Jim Meyering  <meyering@lucent.com>
24132
24133         * lib/mkdir.c: New file.
24134
24135 2001-09-15  Jim Meyering  <meyering@lucent.com>
24136
24137         * m4/jm-macros.m4: Check for help2man.
24138
24139 2001-09-11  Jim Meyering  <meyering@lucent.com>
24140
24141         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
24142         The body, by Paul Eggert, was moved here from configure.in.
24143         * m4/jm-macros.m4: Require UTILS_HOST_OS.
24144
24145 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24146
24147         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
24148         (jm_PREREQ): Use it.
24149
24150 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24151
24152         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
24153         Use ssize_t, not int, to store result of readlink.
24154         Check for ssize_t overflow as well as size_t overflow,
24155         as POSIX says the result of readlink is implementation-defined
24156         when ssize_t overflows.
24157         Remove unnecessary cast to char*.
24158         Use free+malloc instead of realloc, as the storage doesn't need
24159         to be preserved and it's clearer and can be more efficient that way.
24160         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
24161         * lib/xreadlink.h (xreadlink): Update prototype.
24162
24163 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24164
24165         * lib/xgetcwd.c: Revert some of the previous change; intead,
24166         fix the HAVE_GETCWD_NULL code to behave more like the
24167         !HAVE_GETCWD_NULL code used to.
24168
24169         Include "xalloc.h".
24170         (xgetcwd): Do not return NULL when memory is exhausted; instead,
24171         invoke xalloc_die.
24172
24173 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24174
24175         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
24176         sys/param.h, as pathmax.h includes them.
24177
24178 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24179
24180         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
24181         (jm_PREREQ_XGETCWD): New macro.
24182
24183         * m4/getcwd.m4: New file.
24184
24185 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24186
24187         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
24188         like the HAVE_GETCWD_NULL code.
24189         Include pathmax.h if not HAVE_GETCWD.
24190         Do not include xalloc.h.
24191         (INITIAL_BUFFER_SIZE): New symbol.
24192         Do not use xmalloc / xrealloc, since the caller is responsible for
24193         handling errors.  Preserve errno around `free' during failure.
24194         Do not overrun buffer when using getwd.
24195
24196 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24197
24198         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
24199         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
24200         getcwd (NULL, 0).
24201
24202 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24203
24204         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
24205         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
24206         spotted by Jim Meyering.
24207
24208 2001-09-03  Jim Meyering  <meyering@lucent.com>
24209
24210         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
24211         failure.
24212
24213 2001-09-02  Jim Meyering  <meyering@lucent.com>
24214
24215         * lib/error.c: Update from GNU libc.
24216
24217 2001-09-01  Jim Meyering  <meyering@lucent.com>
24218
24219         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
24220         Used by df.
24221
24222 2001-09-01  Jim Meyering  <meyering@lucent.com>
24223
24224         * lib/xreadlink.c: New file.
24225         * lib/xreadlink.h: New file.
24226         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
24227         xreadlink.h.
24228
24229         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
24230         doesn't conflict with sparc Solaris 7's definition in
24231         /usr/include/sys/int_types.h.
24232
24233         * lib/exclude.c: Use `""', not `<>' to #include non-system header
24234         files.
24235         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
24236         and strncasecmp as r-values.  Unixware didn't have declarations.
24237
24238 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24239
24240         * lib/xstrtol.h: Add copyright notice.
24241         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
24242         LONGINT_INVALID_SUFFIX_CHAR.
24243
24244 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24245
24246         * lib/xstrtol.c (strtoimax): New decl.
24247
24248 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24249
24250         * lib/xgetcwd.c: Don't include pathmax.h.
24251         Include stdlib.h and unistd.h if available.
24252         Include xalloc.h.
24253         (xmalloc, xstrdup, free): Remove decls.
24254         (xgetcwd): Don't assume sizes fit in unsigned.
24255         Check for overflow when computing sizes.
24256         Simplify reallocation code.
24257
24258 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24259
24260         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
24261         a directory's st_size can have an arbitrary value, so the old
24262         usage could waste an arbitrary amount of memory.  All uses
24263         changed.
24264         * lib/savedir.h: Update prototype.
24265
24266 2001-08-31  Paul Eggert  <eggert@twinsun.com>
24267
24268         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
24269
24270         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
24271         old strtoimax.c.
24272
24273         Also, make the following further changes to make this file's
24274         configuration more similar to that of strtol.c:
24275         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
24276         (strtoumax, uintmax_t, strtoull, strtol): Remove.
24277         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
24278         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
24279         changed to signed values.
24280
24281         And make the following changes as well:
24282         Fix copyright notice, as 1999 was missing.
24283         (verify): New macro.
24284         (strtoimax): Check sizes at compile-time, not run-time.
24285         Prefer strtol to strtoll if both work.
24286         (main): Remove; it was not that useful and was a pain to maintain.
24287
24288         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
24289
24290 2001-08-31  Jim Meyering  <meyering@lucent.com>
24291
24292         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
24293         Use an initial, malloc'd, buffer of length 128 rather than
24294         a statically allocated one of length 1024.
24295
24296 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24297
24298         Simplify code, partly by assuming autoconf 2.52 semantics.
24299
24300         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
24301
24302         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
24303         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
24304         All uses removed.
24305         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
24306         Move AC_REQUIRE to next-to-top level, to avoid confusion.
24307         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
24308         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
24309         jm_AC_HEADER_INTTYPES_H.
24310         * m4/jm-macros.m4 (jm_MACROS): Likewise.
24311
24312         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
24313
24314         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24315         Quote first arg of AC_DEFUN.
24316         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
24317         since they are needed to parse the include file even if we need
24318         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
24319         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
24320         but with opposite signedness.
24321
24322 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24323
24324         Merge 'exclude' changes from tar 1.13.22.
24325         This fixes one or two unlikely storage allocation overflow bugs,
24326         but doesn't change user-visible behavior otherwise.
24327
24328 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24329
24330         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
24331         (jm_PREREQ_EXCLUDE): New macro.
24332
24333 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24334
24335         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
24336         tm to be declared.
24337
24338 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24339
24340         * lib/hash.c: Remove '2001' from copyright notice.
24341
24342 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24343
24344         * lib/full-write.h: New file.
24345         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
24346         * lib/full-write.c: Correct credits, as cccp.c no longer
24347         exists and anyway it was so heavily changed from the old cccp
24348         code as to be unrecognizable.  Include full-write.h.
24349         (full_write) Return size_t, with short writes meaning failure.
24350         All callers changed.  This fixes a bug with large buffers
24351         on 64-bit hosts.
24352         * lib/utime.c: Include full-write.h.
24353
24354 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24355
24356         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
24357         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
24358         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
24359         Include if available.
24360         (<xalloc.h>): Include
24361         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
24362         (verify): New macro.  Use it to verify that EXCLUDE macros do not
24363         collide with FNM macros.
24364         (struct patopts): New struct.
24365         (struct exclude): Use it, as exclude patterns now come with options.
24366         (new_exclude): Support above changes.
24367         (new_exclude, add_exclude_file):
24368         Initial size must now be a power of two to simplify overflow checking.
24369         (free_exclude, fnmatch_no_wildcards): New function.
24370         (excluded_filename): No longer requires options arg, as the options
24371         are determined by add_exclude.  Now returns bool, not int.
24372         (excluded_filename, add_exclude):
24373         Add support for the fancy new exclusion options.
24374         (add_exclude, add_exclude_file): Now takes int options arg.
24375         Check for arithmetic overflow when computing sizes.
24376         (add_exclude_file): xrealloc might modify errno, so don't
24377         realloc until after errno might be used.
24378
24379         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
24380         New macros.
24381         (free_exclude): New decl.
24382         (add_exclude, add_exclude_file): Now takes int options arg.
24383         (excluded_filename): No longer requires options arg, as the options
24384         are determined by add_exclude.  Now returns bool, not int.
24385
24386 2001-08-30  Paul Eggert  <eggert@twinsun.com>
24387
24388         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
24389
24390 2001-08-27  Jim Meyering  <meyering@lucent.com>
24391
24392         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
24393
24394         * lib/version-etc.c (N_): Remove definition.
24395         Revert most of last change.
24396         Instead, simply don't mark the `Copyright...' string for translation.
24397         Based on advice from Paul Eggert.
24398
24399         * lib/strtoxmax.c: Tweak comment.
24400
24401 2001-08-26  Jim Meyering  <meyering@lucent.com>
24402
24403         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
24404
24405         * m4/xstrtoimax.m4: New file.
24406         * m4/xstrtoumax.m4: Add comments explaining why we
24407         AC_REPLACE_FUNCS(strtol).
24408
24409 2001-08-26  Jim Meyering  <meyering@lucent.com>
24410
24411         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
24412         of copyright with `%s' so translators don't get an untranslated
24413         message in 2002.
24414         (COPYRIGHT_YEAR): Define.
24415         (version_etc): Use fprintf rather than fputs.
24416         Suggestion from Ulrich Drepper.
24417
24418         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
24419
24420         * lib/strtoll.c: New file, from GNU libc.
24421         * lib/xstrtoimax.c: New file.
24422
24423         * lib/xstrtol.h: Add xstrtoimax.
24424         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
24425         * lib/strtoimax.c: New file.  Likewise, but first define
24426         STRTOUXMAX_SIGNED.
24427
24428         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
24429         ...
24430         * lib/strtoxmax.c: ... then renamed to this.
24431
24432 2001-08-18  Paul Eggert  <eggert@twinsun.com>
24433
24434         * m4/inttypes.m4: Add AC_PREREQ(2.13).
24435         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
24436         (jm_AC_TYPE_INTMAX_T): New macro.
24437         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
24438
24439         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
24440
24441         * m4/longlong.m4: Renamed from ulonglong.m4.
24442         * m4/inttypes.m4: Renamed from inttypes_h.m4.
24443         * m4/uintmax_t.m4: Removed.
24444
24445 2001-08-13  Paul Eggert  <eggert@twinsun.com>
24446
24447         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
24448         Port to Solaris 8, where 'sed' requires a space after the 'r'
24449         command, and where sh dislikes "$/".  Clean up the spacing a bit.
24450         Redirect output to $tmp just once.
24451
24452 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
24453
24454         * lib/addext.c (<errno.h>): Include.
24455         (errno): Declare if not defined.
24456         (addext): Work correctly when pathconf returns -1 and leaves
24457         errno alone because there is no limit.  Also, work even if
24458         pathconf returns a value greater than SIZE_MAX.
24459
24460 2001-08-12  Jim Meyering  <meyering@lucent.com>
24461
24462         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
24463         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
24464         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
24465         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
24466         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
24467         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
24468         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
24469         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
24470         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
24471         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
24472         utime.m4, utimes.m4, xstrtoumax.m4:
24473         Quote the first argument in each use of AC_DEFUN.
24474
24475 2001-08-12  Jim Meyering  <meyering@lucent.com>
24476
24477         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
24478         Simply `return getcwd (NULL, 0);'.
24479         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
24480         Use 1300 as initial value for length, not PATH_MAX.
24481
24482         * lib/pathmax.h: Clean up cpp syntax.
24483
24484 2001-08-12  Jim Meyering  <meyering@lucent.com>
24485
24486         * lib/gettimeofday.c: New file.
24487         * lib/gtod.h: New file.
24488         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
24489
24490 2001-08-05  Jim Meyering  <meyering@lucent.com>
24491
24492         * m4/jm-macros.m4: Require autoconf-2.52.
24493
24494 2001-08-04  Jim Meyering  <meyering@lucent.com>
24495
24496         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
24497         stmt, to get in sync with glibc.
24498
24499 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24500
24501         The following changes are from gettext 0.10.39 as maintained by
24502         Bruno Haible.
24503
24504         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
24505         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
24506         with inverted sense.  All uses changed.
24507
24508         * lib/mbswidth.c: Don't include <limits.h>.
24509         Include <stdlib.h> and <string.h> unconditionally.
24510         (iswcntrl, mbsinit, ISCNTRL): New macros.
24511         (mbsnwidth): Use K&R style function declarations.
24512         Don't bother checking for MB_LEN_MAX == 1, since the compiler
24513         can optimize it when MB_CUR_MAX == 1.
24514         The width of control characters is zero, not 1.
24515
24516 2001-08-03  Paul Eggert  <eggert@twinsun.com>
24517
24518         The following changes are from gettext 0.10.39 as maintained by
24519         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
24520
24521         * m4/codeset.m4: Upgrade to serial AM1.
24522         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
24523         all uses changed.  Quote first arg of AC_DEFUN.
24524         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
24525
24526         * m4/iconv.m4: Upgrade to serial AM2.
24527         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
24528         Add --with-libconv-prefix.
24529         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
24530         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
24531         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
24532         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
24533         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
24534
24535         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
24536         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
24537         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
24538         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
24539         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
24540         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
24541         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
24542         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
24543         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
24544
24545         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
24546         string.h any more.
24547
24548         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
24549         not the default value.
24550
24551         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
24552         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
24553         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
24554         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
24555         Also check for iswcntrl, used for wcwidth fallback.
24556         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
24557         to Autoconf 2.13.
24558
24559 2001-08-03  Jim Meyering  <meyering@lucent.com>
24560
24561         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
24562         as it was in the original.  Reported by Paul Eggert.
24563
24564 2001-07-16  Jim Meyering  <meyering@lucent.com>
24565
24566         * m4/gettimeofday.m4: New file.
24567         Prompted by a report from Bernhard Baehr.
24568
24569 2001-07-15  Jim Meyering  <meyering@lucent.com>
24570
24571         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
24572         stuff. Now it's in ../Makefile.cfg.
24573
24574 2001-07-15  Jim Meyering  <meyering@lucent.com>
24575
24576         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
24577         (BUILT_SOURCES): Add unlocked-io.h.
24578         (io_functions): Define.
24579         (unlocked-io.h): New rule.
24580         (DISTCLEANFILES): Add unlocked-io.h.
24581         (all-local): Depend on unlocked-io.h, to ensure it is created.
24582
24583         * lib/unlocked-io.hin: New file
24584
24585         * lib/regex.c: Update from glibc.
24586
24587 2001-07-05  Jim Meyering  <meyering@lucent.com>
24588
24589         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
24590         recommendation.
24591         (libfetish_a_SOURCES): Put all .h files here instead.
24592         Remove a thus-exposed (better checks in automake) duplicate and
24593         two unnecessary .h files.
24594
24595 2001-07-04  Jim Meyering  <meyering@lucent.com>
24596
24597         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
24598         that generates jm-glibc-io.m4 so that it doesn't trigger any make
24599         distcheck failure.
24600
24601 2001-07-02  Jim Meyering  <meyering@lucent.com>
24602
24603         The following changes were prompted by suggestions from Bruno Haible.
24604
24605         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
24606         is now generated.
24607         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
24608         definition of EXTRA_DIST.
24609         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
24610         ensure that the generated file is created/updated whenever the list
24611         of $(unlocked_functions) is changed.
24612         (jm-glibc-io.m4): New rule.
24613         (unlocked-io.h): New rule -- currently unused.
24614
24615 2001-06-24  Jim Meyering  <meyering@lucent.com>
24616
24617         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
24618         unmatched right bracket, rather than kludging it with an extra,
24619         falsely-matching quote in a comment.  Patch by Akim Demaille.
24620
24621 2001-06-11  Jim Meyering  <meyering@lucent.com>
24622
24623         * lib/regex.c: Update from GNU libc.
24624
24625 2001-05-27  Jim Meyering  <meyering@lucent.com>
24626
24627         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
24628         Check for ut_type in struct utmp.
24629
24630 2001-05-27  Jim Meyering  <meyering@lucent.com>
24631
24632         * lib/readutmp.h (UT_TYPE): Define.
24633
24634 2001-05-24  Jim Meyering  <meyering@lucent.com>
24635
24636         * lib/argmatch.c: Include "quote.h".
24637         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
24638         quote function.  Reported by Göran Uddeborg.
24639
24640 2001-05-22  Jim Meyering  <meyering@lucent.com>
24641
24642         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
24643         now that we use the package-supplied version unconditionally.
24644         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
24645
24646 2001-05-21  Jim Meyering  <meyering@lucent.com>
24647
24648         * m4/regex.m4: Change a couple backticks to single quotes to avoid
24649         shell syntax errors.
24650
24651 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24652
24653         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
24654
24655 2001-05-20  Paul Eggert  <eggert@twinsun.com>
24656
24657         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
24658         Don't bother to check library strftime, since
24659         we'll be using our own my_strftime function anyway.
24660         Define my_strftime instead of strftime.
24661
24662 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
24663
24664         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
24665         which is not yet declared.
24666
24667 2001-05-15  Jim Meyering  <meyering@lucent.com>
24668
24669         * m4/regex.m4: Use proper quoting so brackets appear in the test
24670         program.
24671         Reported by, and with help from, Bruno Haible.
24672
24673 2001-05-13  Jim Meyering  <meyering@lucent.com>
24674
24675         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
24676         undefined.
24677
24678 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24679
24680         dirname code cleanup.  base_name now behaves more compatibly
24681         with POSIX basename when given file names that have trailing
24682         slashes, and similarly for dir_name.  Add new primitives
24683         base_len and dir_len.  Put the directory-name-related decls
24684         into dirname.h.
24685
24686         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
24687         * lib/backupfile.c (base_name): Likewise.
24688         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
24689         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
24690         * lib/makepath.c (strip_trailing_slashes): Likewise.
24691         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
24692         ISSLASH): Likewise.
24693         * lib/rename.c (strip_trailing_slashes): Likewise.
24694         * lib/same.c (base_name): Likewise.
24695         * lib/stripslash.c (ISSLASH): Likewise.
24696
24697         * lib/addext.c: Include <dirname.h> after size_t is defined.
24698         * lib/backupfile.c: Likewise.
24699
24700         * lib/addext.c (addext): Use base_len to trim redundant
24701         trailing slashes instead of doing it ourselves.
24702         But do not trim the last slash if it is not redundant.
24703
24704         * lib/backupfile.c (find_backup_file_name,
24705         max_backup_version): Use base_len instead of rolling it ourselves.
24706         Handle the case of "" and (on DOS) "C:" correctly.
24707
24708         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
24709         needed. Include <string.h>, <dirname.h>.
24710         (base_name): Allow file names ending in slashes, other than names
24711         that are all slashes.  In this case, return the basename followed
24712         by the slashes.  This is more general, and can be used in places
24713         where the original base_name purposely had an assertion failure.
24714         (base_len): New function.
24715
24716         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
24717         Do not include <assert.h>; no longer needed.
24718         Include xalloc.h.
24719         (memrchr): Remove decl.
24720         (dir_name_r): Remove.
24721         (dir_len): Renamed from dirlen.  All callers changed.
24722         Rewrite in terms of base_name, for simplicity and consistency.
24723         (dir_name): Never return NULL.  All callers changed.
24724         Do not include <stdlib.h> in test program; no longer needed.
24725         return 0; is fine for test program.
24726
24727         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
24728         New macros.
24729         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
24730
24731         * lib/path-concat.c (path_concat): Use base_len to compute
24732         base length, not strlen; this means we cannot rely on memcpy
24733         to null-terminate.
24734
24735         * lib/same.c (STREQ): Remove.
24736         (same_name): Handle the case where the basename ends in trailing '/'.
24737
24738         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
24739         a slash was stripped.  Do not strip the last slash after a
24740         file system prefix.
24741
24742 2001-05-11  Paul Eggert  <eggert@twinsun.com>
24743
24744         * lib/Makefile.am (libfetish_a_SOURCES):
24745         Add strftime.c, since we now compile it on all hosts.
24746
24747         * lib/strftime.c (my_strftime):
24748         Define to nstrftime if emacs, but only if my_strftime is not defined.
24749         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
24750         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
24751         Add one more extra argument: a nanoseconds value.
24752         All uses changed.
24753         (ns): New macro.
24754         (my_strftime function): Add %N format.
24755         (emacs_strftimeu): Renamed from emacs_strftime,
24756         with extra ut argument.
24757
24758 2001-05-09  Paul Eggert  <eggert@twinsun.com>
24759
24760         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
24761
24762 2001-04-21  Jim Meyering  <meyering@lucent.com>
24763
24764         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
24765         doesn't interfere.
24766
24767 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
24768
24769         * m4/ftruncate.m4: Check for chsize.
24770         Link with ftruncate.o unconditionally if ftruncate is missing.
24771         This was required when cross-compiling to i586-mingw32msvc.
24772
24773 2001-04-08  Jim Meyering  <meyering@lucent.com>
24774
24775         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
24776         recomputed; that's necessary when the offset spans a DST transition.
24777         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
24778
24779 2001-04-02  Jim Meyering  <meyering@lucent.com>
24780
24781         * lib/regex.h, regex.c: Update from GNU libc.
24782
24783 2001-03-24  Jim Meyering  <meyering@lucent.com>
24784
24785         * m4/jm-macros.m4: Require autoconf-2.49d.
24786
24787 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
24788
24789         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
24790
24791 2001-03-19  Paul Eggert  <eggert@twinsun.com>
24792
24793         * lib/version-etc.c (version_etc_copyright): Update to 2001.
24794
24795 2001-03-17  Jim Meyering  <meyering@lucent.com>
24796
24797         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
24798         now that the version in autoconf is equivalent.
24799         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
24800
24801         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
24802         Suggestion from Akim Demaille.
24803
24804         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
24805         (jm_PREREQ_TEMPNAME): New function.
24806
24807 2001-03-16  Paul Eggert  <eggert@twinsun.com>
24808
24809         * lib/tempname.c (uint64_t): Define to uintmax_t if
24810         not defined, and if UINT64_MAX is not defined.
24811         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
24812         Reported by John David Anglin.
24813
24814 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
24815
24816         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
24817         resolve alias if codeset is empty.
24818         * lib/config.charset (BeOS): Use wildcard syntax.
24819
24820 2001-03-13  Jim Meyering  <meyering@lucent.com>
24821
24822         * lib/path-concat.c (path_concat)
24823         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
24824         concatenating e.g., `C:' and `foo'.
24825         From Bruno Haible.
24826
24827 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24828
24829         * lib/localcharset.c (locale_charset): Don't use
24830         setlocale(LC_CTYPE,NULL). Don't return NULL.
24831         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
24832
24833 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
24834
24835         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
24836         support for DOS/DJGPP.
24837
24838 2001-03-01  Paul Eggert  <eggert@twinsun.com>
24839
24840         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
24841         lacks mkstemp.  Compile our own tempname.c if we compile our own
24842         mkstemp.c, as mkstemp relies on tempname.
24843
24844 2001-03-01  Jim Meyering  <meyering@lucent.com>
24845
24846         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
24847         AH_VERBATIM really does output its argument verbatim.
24848
24849 2001-02-28  Paul Eggert  <eggert@twinsun.com>
24850
24851         * lib/Makefile.am (libfetish_a_SOURCES):
24852         Add dup-safer.c, fopen-safer.c.
24853         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
24854
24855         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
24856         * lib/unistd-safer.h: New files.
24857
24858 2001-02-25  Paul Eggert  <eggert@twinsun.com>
24859
24860         The mkstemp replacement is taken from glibc 2.2.2, with some
24861         portability fixes for use outside glibc, as follows:
24862
24863         * lib/tempname.c (struct_stat64): New macro.
24864         (direxists, __gen_tempname): Use it.
24865         This avoids a portability problem with Solaris 8.
24866
24867         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
24868         (<stddef.h>, <stdint.h>, <string.h>):
24869         Include only if STDC_HEADERS || _LIBC.
24870         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
24871         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
24872         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
24873         (__set_errno): Define this macro if <errno.h> doesn't.
24874         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
24875         Define these macros if <stdio.h> doesn't.
24876         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
24877         Define these macros if <sys/stat.h>
24878         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
24879         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
24880         __xstat64): Define if not _LIBC.
24881         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
24882         (__gen_tempname): Invoke gettimeofday only if
24883         HAVE_GETTIMEOFDAY || _LIBC;
24884         otherwise, fall back on plain "time".
24885         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
24886
24887         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
24888
24889         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
24890
24891 2001-02-18  Paul Eggert  <eggert@twinsun.com>
24892
24893         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
24894
24895 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24896
24897         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
24898         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
24899         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
24900         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24901
24902 2001-02-17  Paul Eggert  <eggert@twinsun.com>
24903
24904         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
24905         Remove workaround macros for hosts that have mbrtowc but not
24906         mbstate_t, as we now insist on proper declarations for both
24907         before using mbrtowc.
24908
24909 2001-02-17  Jim Meyering  <meyering@lucent.com>
24910
24911         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
24912         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
24913         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
24914         UnixWare 7.1.1.
24915
24916         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
24917         rather than AC_CACHE_VAL.
24918
24919 2001-02-17  Jim Meyering  <meyering@lucent.com>
24920
24921         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
24922         around included file name.
24923
24924         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
24925
24926         * lib/strftime.c: Update from GNU libc (the only changes were to
24927         comments).
24928
24929 2001-02-17  Jim Meyering  <meyering@lucent.com>
24930
24931         * lib/regex.c: Update from libc.
24932
24933 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
24934
24935         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
24936         clash.
24937
24938 2001-02-16  Paul Eggert  <eggert@twinsun.com>
24939
24940         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
24941         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
24942         Reported by Mark Hounschell via Paul Eggert.
24943
24944 2001-02-07  Jim Meyering  <meyering@lucent.com>
24945
24946         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
24947
24948 2001-02-05  Jim Meyering  <meyering@lucent.com>
24949
24950         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
24951         it includes the patch required for `large file' support with at least
24952         HP-UX's 10.20 /bin/cc.
24953
24954 2001-02-03  Jim Meyering  <meyering@lucent.com>
24955
24956         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
24957         AS_IF, now that it works once again (mysteriously).
24958         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24959
24960 2001-01-30  Jim Meyering  <meyering@lucent.com>
24961
24962         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
24963         * m4/chown.m4: Rename conftestchown to conftest.chown.
24964         * m4/rename.m4: s/conftestdir/conftest.d1/ and
24965         s/conftestdir2/conftest.d2/.
24966         * m4/utimes.m4: s/conftestdata/conftest.data/
24967         Inspired by Pavel Roskin's change in autoconf.
24968
24969 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
24970
24971         * lib/config.charset: Update for FreeBSD 4.2.
24972
24973 2001-01-27  Jim Meyering  <meyering@lucent.com>
24974
24975         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
24976         a use of AS_IF.
24977         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
24978
24979 2001-01-26  Jim Meyering  <meyering@lucent.com>
24980
24981         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
24982         quotearg.c includes it.
24983
24984 2001-01-26  Jim Meyering  <meyering@lucent.com>
24985
24986         * lib/quotearg.c: Include stddef.h.
24987         * lib/quote.c: Include stddef.h.
24988         Reported by Axel Kittenberger.
24989
24990         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
24991         line in double quotes so that it evokes a better diagnostic.
24992         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
24993         Reported by Axel Kittenberger.
24994
24995 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
24996
24997         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
24998         as if it was a `charset'.
24999
25000 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25001
25002         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
25003         has const.
25004
25005 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25006
25007         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
25008         to avoid a warning.  Add back 'const' to inptr.
25009
25010 2001-01-20  Jim Meyering  <meyering@lucent.com>
25011
25012         Be sure that headers are checked before used in code compiled
25013         for the type checks.
25014         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
25015         In place of that, invoke jm_CHECK_ALL_TYPES.
25016         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
25017         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
25018         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
25019         The check for ssize_t was mistakenly run before the test for unistd.h.
25020
25021         The configure-time check for stdbool.h was missing.
25022         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
25023         (jm_PREREQ_HASH): New function.
25024
25025 2001-01-17  Jim Meyering  <meyering@lucent.com>
25026
25027         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
25028         for autoconf-2.49c.
25029         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
25030
25031 2001-01-16  Jim Meyering  <meyering@lucent.com>
25032
25033         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
25034         From Bruno Haible.
25035
25036 2001-01-14  Jim Meyering  <meyering@lucent.com>
25037
25038         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
25039         foo and bar.  Create conftestdir/ in the script, not in the C code.
25040         Remove directories in the script, not in the C code.
25041         Remove conftestdir{,2} before trying to create the directory.
25042         Make the entire configure script fail if the mkdir fails.
25043
25044 2001-01-14  Jim Meyering  <meyering@lucent.com>
25045
25046         * lib/rename.c: New file.  From Volker Borchert.
25047         Include stdlib.h, string.h or strings.h, and xalloc.h.
25048         Use strip_trailing_slashes rather than open-coding it.
25049
25050 2001-01-03  Paul Eggert  <eggert@twinsun.com>
25051
25052         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
25053
25054 2001-01-03  Jim Meyering  <meyering@lucent.com>
25055
25056         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
25057         of local `inptr' to avoid warning with some system declarations of
25058         iconv.
25059
25060 2001-01-02  Volker Borchert  <bt@teknon.de>
25061
25062         * m4/rename.m4: New file.
25063         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
25064
25065 2001-01-01  Jim Meyering  <meyering@lucent.com>
25066
25067         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
25068         even on systems with utmpx.h.  It's necessary for the declaration of
25069         utmp's ut_user member.  Reported by Andreas Jaeger.
25070
25071         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
25072         available. They are required for the declarations of getgrgid and
25073         getpwuid resp.
25074         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
25075         Reported by Andreas Jaeger.
25076
25077 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
25078
25079         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
25080         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
25081         so `make install' also works in VPATH builds.
25082
25083 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
25084
25085         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
25086         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
25087         can be used in subdirectories.
25088
25089 2000-12-29  Paul Eggert  <eggert@twinsun.com>
25090
25091         * lib/modechange.c: Do not assume that mode_t uses the
25092         traditional octal encoding.  E.g. "chmod 1 FOO" should set
25093         the other-execute bit of FOO even if S_IXOTH != 1.
25094
25095         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
25096         WOTH, XOTH, ALLM): New macros.
25097         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
25098          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
25099         Use them.
25100         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
25101         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
25102         (mode_compile):
25103         No need to use uintmax_t; unsigned long is long enough.
25104         Don't bother to get suffix since we don't use it.
25105
25106 2000-12-26  Jim Meyering  <meyering@lucent.com>
25107
25108         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
25109         better with autoheader.
25110
25111 2000-12-24  Jim Meyering  <meyering@lucent.com>
25112
25113         * lib/hash.c (is_prime): Return explicit boolean values.
25114         (hash_get_first): Return NULL to appease Irix5.6's 89.
25115         Reported by Nelson Beebe.
25116
25117 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
25118
25119         * lib/localcharset.c (locale_charset): Add support for Win32.
25120
25121 2000-12-18  Paul Eggert  <eggert@twinsun.com>
25122
25123         * lib/physmem.h, lib/physmem.c: New files.
25124
25125         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
25126         (noinst_HEADERS): Add physmem.h.
25127
25128         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
25129         't' for compatibility with Solaris 8 sort.
25130
25131 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
25132
25133         * lib/config.charset: Add support for BeOS.
25134
25135 2000-12-17  Jim Meyering  <meyering@lucent.com>
25136
25137         * m4/dos.m4 (jm_AC_DOS): New file and macro.
25138         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
25139
25140 2000-12-16  Jim Meyering  <meyering@lucent.com>
25141
25142         This bug had a serious impact on chown: `chown N:M FILE' (for integer
25143         N and M) would have treated it like `chown N:N FILE'.
25144
25145         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
25146
25147 2000-12-16  Jim Meyering  <meyering@lucent.com>
25148
25149         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
25150         SHELLS_FILE to a file name that's useful on djgpp systems.
25151         Include stdlib.h.
25152         (ADDITIONAL_DEFAULT_SHELLS): Define.
25153         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
25154         Based mostly on a patch from Prashant TR.
25155
25156 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
25157
25158         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
25159         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
25160         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
25161
25162 2000-12-08  Andreas Schwab  <schwab@suse.de>
25163
25164         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
25165         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
25166
25167 2000-12-07  Jim Meyering  <meyering@lucent.com>
25168
25169         * lib/stripslash.c (ISSLASH): Define.
25170         (strip_trailing_slashes): Use ISSLASH rather than comparing against
25171         `/'.
25172         From Prashant TR.
25173
25174         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
25175         (dir_name_r): Declare this function as static.
25176         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
25177         manifest itself on a name containing a mix of slashes and
25178         backslashes.
25179         Make this function work with names starting with a DOS-style
25180         drive letter and colon prefix.
25181         (dir_name): Append `.' if necessary.
25182         Based mostly on patches from Prashant TR and Eli Zaretskii.
25183
25184         * lib/dirname.h (dir_name_r): Remove prototype.
25185
25186 2000-12-06  Paul Eggert  <eggert@twinsun.com>
25187
25188         * m4/off_t-format.m4: Remove this file.
25189         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
25190
25191 2000-12-06  Jim Meyering  <meyering@lucent.com>
25192
25193         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
25194         replacement strtoull, we may well need the replacement strtoul, too.
25195         Check for declarations of strtoul and strtoull.
25196         Check for strtol.  Mainly as a cue to cause automake to include
25197         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
25198         Check for limits.h -- strtol.c needs it.
25199
25200 2000-12-05  Jim Meyering  <meyering@lucent.com>
25201
25202         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
25203
25204 2000-12-04  Jim Meyering  <meyering@lucent.com>
25205
25206         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
25207         Also include memory.h, stdlib.h, unistd.h if appropriate.
25208         Reported by Andreas Jaeger (conflicting declaration of malloc).
25209
25210 2000-12-02  Jim Meyering  <meyering@lucent.com>
25211
25212         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
25213         * m4/jm-macros.m4 (jm_MACROS): require it.
25214
25215 2000-12-02  Jim Meyering  <meyering@lucent.com>
25216
25217         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
25218
25219 2000-12-01  Paul Eggert  <eggert@twinsun.com>
25220
25221         * lib/memrchr.c: Include <config.h> before any system include file.
25222
25223 2000-11-30  Jim Meyering  <meyering@lucent.com>
25224
25225         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
25226
25227 2000-11-30  Jim Meyering  <meyering@lucent.com>
25228
25229         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
25230
25231 2000-11-29  Paul Eggert  <eggert@twinsun.com>
25232
25233         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
25234
25235 2000-11-26  Jim Meyering  <meyering@lucent.com>
25236
25237         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
25238
25239 2000-11-22  Paul Eggert  <eggert@twinsun.com>
25240
25241         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
25242         size of (size_t) -1; it's not portable.
25243
25244 2000-11-17  Jim Meyering  <meyering@lucent.com>
25245
25246         * lib/strstr.c: Update from GNU libc.
25247
25248 2000-11-17  Akim Demaille  <akim@epita.fr>
25249
25250         * lib/obstack.h: Formatting changes.
25251         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
25252         prevent type checking.
25253         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
25254         cast the value to (void *): assigning a `foo *' to a `void *'
25255         variable is valid.
25256         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
25257
25258 2000-11-16  Jim Meyering  <meyering@lucent.com>
25259
25260         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
25261
25262 2000-11-11  Jim Meyering  <meyering@lucent.com>
25263
25264         * lib/error.c: Add a couple #includes, merging from GNU libc version.
25265
25266 2000-11-10  Jim Meyering  <meyering@lucent.com>
25267
25268         * lib/obstack.h: Update from GNU libc.
25269         * lib/obstack.c: Likewise.
25270
25271 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
25272
25273         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
25274
25275 2000-11-06  Paul Eggert  <eggert@twinsun.com>
25276
25277         * lib/getusershell.c (setusershell): Use rewind rather than
25278         fseek/fseeko, to avoid configuration hassles with fseeko.
25279         Don't bother opening SHELLS_FILE if shellstream is NULL;
25280         it's not necessary.
25281
25282 2000-11-05  Jim Meyering  <meyering@lucent.com>
25283
25284         * lib/makepath.h (make_dir): Declare.
25285         * lib/makepath.c (make_dir): Remove `static' attribute.
25286         Tweak a comment.
25287
25288 2000-11-04  Jim Meyering  <meyering@lucent.com>
25289
25290         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
25291
25292 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
25293
25294         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
25295         last one in a bucket, advance to the next bucket.
25296
25297 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
25298
25299         * lib/fnmatch.c: Do not comment out all the code if we are using
25300         the GNU C library, because in some cases we are replacing buggy
25301         code in the GNU C library itself.
25302
25303 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
25304
25305         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
25306         (regex_compile): Catch bogus \(\1\).
25307
25308 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25309
25310         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
25311         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
25312         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
25313
25314 2000-10-30  Paul Eggert  <eggert@twinsun.com>
25315
25316         * lib/error.h, getline.h, modechange.h:
25317         Remove "2000" from Copyright line, as the file hasn't been
25318         changed this year other than in the copyright notice.
25319
25320         * lib/xalloc.h: Add "2000" to Copyright line, as this file
25321         was changed this year.
25322
25323 2000-10-29  Jim Meyering  <meyering@lucent.com>
25324
25325         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
25326         renaming.
25327         * m4/ls-mntd-fs.m4: Likewise
25328
25329 2000-10-29  Jim Meyering  <meyering@lucent.com>
25330
25331         * lib/xstat.in: Fix grammar in comment.
25332
25333 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
25334
25335         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
25336         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
25337         doesn't define __restrict_arr.
25338
25339 2000-10-28  Jim Meyering  <meyering@lucent.com>
25340
25341         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
25342         (jm_PREREQ_MEMCHR): New function.
25343
25344 2000-10-28  Jim Meyering  <meyering@lucent.com>
25345
25346         * lib/memchr.c: Update from libc.
25347         Adjust for portability:
25348         [HAVE_STDLIB_H]: Include stdlib.h.
25349         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
25350         Undef __memchr, too.
25351         [!weak_alias]: Define __memchr to memchr.
25352
25353         * lib/regex.c: Update from libc.
25354         * lib/regex.h: Likewise.
25355         * lib/getopt1.c: Likewise.
25356         * lib/memcmp.c: Likewise.
25357
25358         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
25359         Avoid using fseek, when possible -- it's broken by design.
25360         Patch by Ulrich Drepper.
25361
25362 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
25363
25364         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
25365         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
25366         Giving in to popular pressure to shut up the compiler with casts.
25367
25368 2000-10-26  Jim Meyering  <meyering@lucent.com>
25369
25370         * lib/strftime.c: Update from libc.
25371
25372 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
25373
25374         * regex.c: More `unsigned char' -> `re_char' changes.
25375         Also change several `int' into `re_wchar_t'.
25376         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
25377         (PUSH_FAILURE_POINTER): Don't cast any more.
25378         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
25379         We want GCC to complain, since this piece of code makes
25380         re_match non-reentrant, which *should* be fixed.
25381         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
25382         (EXTEND_BUFFER): Use RETALLOC.
25383         (SET_LIST_BIT): Don't cast.
25384         (re_wchar_t): New type.
25385         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
25386         that those two functions will always properly return.
25387         (IMMEDIATE_QUIT_CHECK): Cast to void.
25388         (analyse_first): Use recursion rather than an explicit stack.
25389         (re_compile_fastmap): Can't fail anymore.
25390         (re_search_2): Don't check re_compile_fastmap for failure.
25391         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
25392         Now also sets the new value (passed in a new argument).
25393         (re_match_2_internal): Use it.
25394         Also, use a new var `reg' of type size_t when looping through regs
25395         rather than reuse the inappropriate `mcnt'.
25396
25397 2000-10-25  Jim Meyering  <meyering@lucent.com>
25398
25399         * lib/obstack.c: Update from libc.
25400
25401 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
25402
25403         * regex.c (regex_compile): Change the way of handling a range from
25404         a char less than 256 to a char not less than 256.
25405
25406 2000-10-24  Andrew Innes  <andrewi@gnu.org>
25407
25408         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
25409         NT-Emacs only.
25410         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
25411         so that re_search functions only quit when callers expect them to.
25412
25413 2000-10-23  Jim Meyering  <meyering@lucent.com>
25414
25415         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
25416         wrong.  That set_locale call must not have any side effects.
25417         From Paul Eggert.
25418
25419 2000-10-22  Jim Meyering  <meyering@lucent.com>
25420
25421         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
25422         [CYCLIC]: Remove now-unused definition.
25423
25424         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
25425         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
25426         Suggestion from Ulrich Drepper.
25427
25428 2000-10-21  Jim Meyering  <meyering@lucent.com>
25429
25430         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
25431         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
25432         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
25433
25434 2000-10-21  Jim Meyering  <meyering@lucent.com>
25435
25436         * lib/dirname.c (memrchr): Declare if necessary.
25437         (dir_name): Remove the restriction that there be no
25438         trailing slashes.  Now, this code skips past them, effectively
25439         ignoring them.
25440         [TEST_DIRNAME] (main): New unit tests.
25441
25442         * lib/memrchr.c: New file from GNU libc.
25443         Undef __memrchr, too.
25444         [!weak_alias]: Define __memrchr to memrchr.
25445         Guard weak_alias use with `#ifdef weak_alias'.
25446
25447 2000-10-21  Jim Meyering  <meyering@lucent.com>
25448
25449         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
25450         (dir_name): Use dir_name_r.
25451         * lib/dirname.h (dir_name_r): Declare it.
25452
25453 2000-10-17  Jim Meyering  <meyering@lucent.com>
25454
25455         * lib/quote.h (PARAMS): Define and use.
25456         Reported by Akim Demaille.
25457
25458         * lib/getopt.c: Update from libc.
25459
25460 2000-10-16  Jim Meyering  <meyering@lucent.com>
25461
25462         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
25463         setlocale.
25464         From Jan Fedak.
25465
25466 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
25467
25468         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
25469
25470 2000-09-25  Jim Meyering  <meyering@lucent.com>
25471
25472         * lib/md5.h (rol): Define (from GnuPG).
25473
25474         * lib/sha.c: Give credit (GnuPG) where due.
25475         (M): Use rol rather than open-coding it.
25476         Add a FIXME comment.
25477
25478 2000-09-21  Jim Meyering  <meyering@lucent.com>
25479
25480         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
25481         Reported by Michael Stone.
25482
25483 2000-09-20  Jim Meyering  <meyering@lucent.com>
25484
25485         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
25486         (noinst_HEADERS): Add sha.h.
25487         Based on code from Scott G. Miller and from GnuPG.
25488
25489 2000-09-18  Jim Meyering  <meyering@lucent.com>
25490
25491         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
25492         LIBS. Otherwise, everyone ends up linking with -lelf for some
25493         configurations.
25494         Reported by Mike Stone.
25495
25496 2000-09-15  Jim Meyering  <meyering@lucent.com>
25497
25498         * lib/regex.c: Update from libc.
25499
25500 2000-09-10  Jim Meyering  <meyering@lucent.com>
25501
25502         * lib/getopt.c (_getopt_internal): Update from glibc.
25503
25504 2000-09-09  Jim Meyering  <meyering@lucent.com>
25505
25506         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
25507         think it should be used as a general replacement for isascii.
25508         * lib/fnmatch.c: Likewise.
25509         * lib/mbswidth.c: Likewise
25510         * lib/regex.c: Likewise.
25511
25512         Don't use atoi.
25513         * lib/userspec.c: Include sys/param.h and limits.h.
25514         Include xstrtol.h.
25515         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
25516         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
25517         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
25518         UID, GID.  Check range.
25519
25520 2000-09-06  Jim Meyering  <meyering@lucent.com>
25521
25522         * lib/getopt.c (_getopt_internal): Update from glibc.
25523
25524 2000-08-30  Jim Meyering  <meyering@lucent.com>
25525
25526         * lib/strftime.c: Merge in changes from GNU libc.
25527
25528 2000-08-26  Jim Meyering  <meyering@lucent.com>
25529
25530         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
25531         * m4/fpending.m4: New file.
25532
25533 2000-08-26  Jim Meyering  <meyering@lucent.com>
25534
25535         * lib/closeout.c: Include "__fpending.h".
25536         (close_stdout_status): Return right away if there's nothing to flush.
25537
25538         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
25539         * lib/__fpending.c: New file.
25540         * lib/__fpending.h: New file.
25541
25542 2000-08-20  Jim Meyering  <meyering@lucent.com>
25543
25544         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
25545         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
25546         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
25547
25548 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
25549
25550         Improve fileutils installation on systems where running
25551         programs (like install) can't be unlinked.
25552         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
25553         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
25554
25555 2000-08-07  Paul Eggert  <eggert@twinsun.com>
25556
25557         Standardize on "memory exhausted" instead of "Memory exhausted"
25558         or "virtual memory exhausted".
25559         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
25560         "virtual memory exhausted".
25561         * lib/same.c (same_name): Invoke xalloc_die instead of printing
25562         our own message.
25563         * lib/userspec.c (parse_user_spec): Likewise.
25564         * lib/bumpalloc.h: comment fix
25565         * lib/same.c, userspec.c: Include xalloc.h.
25566
25567         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
25568         not char *const and pointing to a constant array.
25569         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
25570         (xrealloc): Comment fix.
25571
25572         * lib/userspec.c (parse_user_spec):
25573         Don't translate a message until just before returning,
25574         to avoid unnecessary translation.
25575
25576 2000-08-07  Jim Meyering  <meyering@lucent.com>
25577
25578         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
25579         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
25580         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
25581         getgroups.c, gethostname.c, getopt.h, group-member.c,
25582         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
25583         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
25584         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
25585         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
25586         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
25587         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
25588         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
25589         yesno.c: Back out Copyright date changes for each file with no change
25590         this year.  This eases coordination with other programs using the same
25591         source code modules.  From Paul Eggert.
25592
25593 2000-08-06  Paul Eggert  <eggert@twinsun.com>
25594
25595         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
25596         not char, for compatibility with glibc 2.1.3 strftime.c.
25597
25598 2000-08-03  Greg McGary  <greg@mcgary.org>
25599
25600         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
25601         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
25602         (EXTEND_BUFFER): Use them.
25603
25604 2000-08-01  Jim Meyering  <meyering@lucent.com>
25605
25606         * lib/dirname.c (ISSLASH): Define.
25607         (BACKSLASH_IS_PATH_SEPARATOR): Define.
25608         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
25609         both `\' and `/' may be use as path separators.
25610         Based on a patch from Prashant TR.
25611
25612 2000-07-31  Paul Eggert  <eggert@twinsun.com>
25613
25614         * lib/quotearg.c (quotearg_n_options): Don't make the initial
25615         slot vector a constant, since it might get modified.
25616
25617 2000-07-31  Jim Meyering  <meyering@lucent.com>
25618
25619         * lib/xmalloc.c: Use `virtual memory exhausted', not
25620         `Memory exhausted'.
25621         * lib/obstack.c (print_and_abort): Likewise.
25622
25623 2000-07-30  Paul Eggert  <eggert@twinsun.com>
25624
25625         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
25626         buffer, so that the caller can always quote one small
25627         component of a "memory exhausted" message in slot 0.
25628         From a suggestion by Jim Meyering.
25629
25630 2000-07-30  Jim Meyering  <meyering@lucent.com>
25631
25632         * lib/makepath.c (make_path): Quote the other instance, too.
25633
25634         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
25635         (STATIC_BUF_SIZE): Define.
25636         (quotearg_n_options): Use only statically allocated storage when
25637         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
25638         than STATIC_BUF_SIZE.
25639
25640 2000-07-29  Jim Meyering  <meyering@lucent.com>
25641
25642         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
25643         * lib/dirname.c (dir_name): Likewise.
25644
25645         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
25646         `/'.
25647
25648         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
25649         (dir_name): Assert that there are no trailing slashes.
25650
25651 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
25652
25653         * lib/mbswidth.h (mbswidth): Add a flags argument.
25654         (mbswidth): New declaration.
25655         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
25656         * lib/mbswidth.c (mbswidth): Add a flags argument.
25657         (mbsnwidth): New function.
25658
25659 2000-07-24  Jim Meyering  <meyering@lucent.com>
25660
25661         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
25662
25663 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25664
25665         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
25666
25667 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25668
25669         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
25670         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
25671         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
25672         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
25673         invoke multibyte primitives.
25674
25675 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25676
25677         * lib/quotearg.c:
25678         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
25679         so that mbstate_t is always defined.
25680
25681         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
25682         be 1 in at least one GCC installation, and this configuration
25683         error is likely to be common.  Ignoring MB_LEN_MAX hurts
25684         performance on hosts that have mbrtowc but have only unibyte
25685         locales, but I assume these hosts are rare.
25686
25687 2000-07-23  Paul Eggert  <eggert@twinsun.com>
25688
25689         * lib/mbswidth.c (_XOPEN_SOURCE):
25690         Don't define; this causes problems on Solaris 7.
25691         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
25692
25693 2000-07-23  Jim Meyering  <meyering@lucent.com>
25694
25695         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
25696         too: getgrgid, getpwuid, getuid.
25697
25698 2000-07-23  Jim Meyering  <meyering@lucent.com>
25699
25700         * lib/basename.c (base_name): Add an assertion.
25701
25702 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
25703
25704         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
25705         shadow its mbsinit function.
25706
25707 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25708
25709         * lib/mbswidth.h: New file.
25710         * lib/mbswidth.c: New file.
25711         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
25712         (noinst_HEADERS): Add mbswidth.h.
25713
25714 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
25715
25716         * lib/config.charset: Add support for FreeBSD. Improve support for
25717         HP-UX and IRIX 6.
25718
25719 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
25720
25721         * m4/mbswidth.m4: New file.
25722         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
25723
25724 2000-07-15  Jim Meyering  <meyering@lucent.com>
25725
25726         * lib/makepath.c: Include quote.h.
25727         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
25728         corresponding argument in a `quote (...)' call.
25729         Give better diagnostics.
25730
25731         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
25732         (noinst_HEADERS): Add quote.h.
25733
25734         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
25735         from tar's src/misc.c.
25736         * lib/quote.h: New file.  Prototypes for same.
25737
25738 2000-07-14  Paul Eggert  <eggert@twinsun.com>
25739
25740         From a suggestion by Bruno Haible.
25741         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
25742         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
25743         to decide whether to define the BeOS workaround macro;
25744         this adjusts to the change to AC_MBSTATE_T.
25745
25746 2000-07-14  Jim Meyering  <meyering@lucent.com>
25747
25748         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
25749         jm_AC_TYPE_UINTMAX_T.
25750
25751 2000-07-13  Paul Eggert  <eggert@twinsun.com>
25752
25753         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
25754
25755         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
25756         quotearg_buffer_restyled): Add support for
25757         clocale_quoting_style.  Undo previous change to
25758         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
25759         and "{RIGHT QUOTATION MARK}" msgids.
25760
25761 2000-07-10  Paul Eggert  <eggert@twinsun.com>
25762
25763         From a suggestion by Bruno Haible.
25764         * m4/mbstate_t.m4 (AC_MBSTATE_T):
25765         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
25766         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
25767         and mbstate_t, to a single-part test that simply defines mbstate_t.
25768         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
25769         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
25770
25771 2000-07-10  Jim Meyering  <meyering@lucent.com>
25772
25773         * m4/strerror_r.m4: Mirror the correction made in autoconf.
25774
25775         * m4/gnu-source.m4: Output to confdefs.h directly.
25776         Suggestion from Akim Demaille.
25777
25778 2000-07-09  Paul Eggert  <eggert@twinsun.com>
25779
25780         The old behavior of quoting `like this' doesn't look good with
25781         newer, ISO-style fonts.  See:
25782         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
25783
25784         Instead, quote "like this" by default.  Let the translator
25785         tailor the locale-specific quoting behavior by providing
25786         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
25787
25788         * lib/quotearg.c (N_): New macro.
25789         (gettext_default): New function.
25790         (quotearg_buffer_restyled): Use
25791         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
25792         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
25793
25794 2000-07-09  Jim Meyering  <meyering@lucent.com>
25795
25796         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
25797         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
25798
25799         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
25800         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
25801
25802 2000-07-09  Jim Meyering  <meyering@lucent.com>
25803
25804         * lib/Most files: Update copyright dates to include 2000.
25805
25806 2000-07-08  Jim Meyering  <meyering@lucent.com>
25807
25808         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
25809         if not defined.
25810         (xgethostname): Remove now-unnecessary #ifdef.
25811         Move declaration of `err' into loop where it's used.
25812
25813 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25814         and Bruno Haible  <haible@clisp.cons.org>
25815
25816         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
25817         only if the test for an object-type mbstate_t fails.  This
25818         prevents us from mistakenly reporting that mbstate_t is a
25819         system object type after we "#define mbstate_t int" to work
25820         around its lack.
25821
25822 2000-07-05  Paul Eggert  <eggert@twinsun.com>
25823         and Bruno Haible  <haible@clisp.cons.org>
25824
25825         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
25826
25827 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25828
25829         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
25830         to strerror_r.
25831         Include <ctype.h> for use of isalpha.
25832
25833 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25834
25835         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
25836         by allocating a larger buffer. Test the gethostname return value for
25837         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
25838         returns an error and ENAMETOOLONG isn't defined.
25839
25840 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
25841
25842         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
25843         dimension.
25844
25845 2000-07-04  Jim Meyering  <meyering@lucent.com>
25846
25847         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
25848         of the deprecated AC_CHECKING.
25849
25850 2000-07-04  Jim Meyering  <meyering@lucent.com>
25851
25852         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
25853         Reported by Bruno Haible.
25854
25855 2000-07-04  Jim Meyering  <meyering@lucent.com>
25856
25857         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
25858         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
25859         lacks mbrtowc.
25860
25861 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25862
25863         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
25864         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
25865
25866 2000-07-03  Paul Eggert  <eggert@twinsun.com>
25867         and Bruno Haible  <haible@clisp.cons.org>
25868
25869         * lib/quotearg.c (mbrtowc):
25870         Assign to *pwc, and return 1 only if result is nonzero.
25871         (iswprint): Use ISPRINT when substituting our own mbrtowc.
25872
25873 2000-07-03  Jim Meyering  <meyering@lucent.com>
25874
25875         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
25876
25877 2000-07-03  Jim Meyering  <meyering@lucent.com>
25878
25879         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
25880         This is necessary to get a definition of e.g., UTMP_FILE on
25881         HP-UX 10.20.
25882         From Bob Proulx.
25883
25884 2000-07-02  Jim Meyering  <meyering@lucent.com>
25885
25886         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
25887
25888         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
25889         AC_LIBOBJ(function_name).
25890         * m4/chown.m4: Likewise.
25891         * m4/fnmatch.m4: Likewise.
25892         * m4/ftruncate.m4: Likewise.
25893         * m4/getgroups.m4: Likewise.
25894         * m4/getline.m4: Likewise.
25895         * m4/group-member.m4: Likewise.
25896         * m4/jm-macros.m4: Likewise.
25897         * m4/lstat.m4: Likewise.
25898         * m4/malloc.m4: Likewise.
25899         * m4/memcmp.m4: Likewise.
25900         * m4/nanosleep.m4: Likewise.
25901         * m4/putenv.m4: Likewise.
25902         * m4/realloc.m4: Likewise.
25903         * m4/regex.m4: Likewise.
25904         * m4/stat.m4: Likewise.
25905         * m4/strftime.m4: Likewise.
25906
25907 2000-07-02  Jim Meyering  <meyering@lucent.com>
25908
25909         * lib/quotearg.c (mbstate_t): Don't define here.
25910
25911 2000-07-02  Jim Meyering  <meyering@lucent.com>
25912
25913         * lib/nanosleep.c (SIGCONT): Define if not already defined.
25914
25915 2000-07-01  Jim Meyering  <meyering@lucent.com>
25916
25917         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
25918
25919 2000-07-01  Jim Meyering  <meyering@lucent.com>
25920
25921         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
25922         problem.
25923
25924 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25925
25926         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
25927         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
25928
25929 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
25930
25931         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
25932         per change in ../m4/ls-mntd-fs.m4.
25933         (read_filesystem_list): Ignore symbolic links.
25934
25935 2000-06-29  Jim Meyering  <meyering@lucent.com>
25936
25937         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
25938         for declaration of strcmp.
25939
25940         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
25941
25942         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
25943         Avoid warning by casting result to `char *' to remove `const'.
25944
25945 2000-06-28  Jim Meyering  <meyering@lucent.com>
25946
25947         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
25948         included by quotearg.c, for which we perform this test.  From
25949         Bruno Haible.
25950
25951 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25952
25953         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
25954         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
25955         <utmpx.h> exists, put readutmp.o into LIBOBJS.
25956
25957 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
25958
25959         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
25960
25961 2000-06-26  Paul Eggert  <eggert@twinsun.com>
25962
25963         savedir now sets errno on failure and invokes xmalloc to get memory.
25964         Fix a couple of other minor bugs while we're at it.
25965
25966         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
25967         (NAMLEN): Remove macro.
25968         (malloc, realloc): Remove decls.
25969         (stpcpy): Likewise.
25970         ("xalloc.h"): Include.
25971         (NAME_SIZE_DEFAULT): New macro.
25972         (savedir): Use xmalloc / xrealloc to allocate memory.
25973         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
25974         Skip "" directory entries.
25975         Use strlen to calculate directory entry length, since the old method
25976         is rarely used these days and isn't worth supporting.
25977         Don't use a pointer after freeing it.
25978         Check for integer overflow when calculating allocation size.
25979         Use memcpy to copy entries, instead of stpcpy.
25980         Set errno properly when returning NULL.
25981         Check for readdir error.
25982
25983 2000-06-26  Jim Meyering  <meyering@lucent.com>
25984
25985         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
25986
25987 2000-06-25  Jim Meyering  <meyering@lucent.com>
25988
25989         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
25990         Linux header bug when _XOPEN_SOURCE is defined to 500.
25991
25992 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25993
25994         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
25995         deficiency.
25996
25997 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
25998
25999         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
26000         Include xalloc.h.
26001         Don't include <stdlib.h>.  Don't declare malloc, realloc.
26002
26003 2000-06-24  Jim Meyering  <meyering@lucent.com>
26004
26005         * m4/strerror_r.m4: Revive this file -- to try out an experimental
26006         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
26007         for which strerror does return char*, but which lacks a conveniently
26008         accessible declaration of the function.  If the compile-test says
26009         strerror_r doesn't work, then resort to a `run'-test that works on
26010         BeOS and segfaults on DEC Unix.
26011
26012 2000-06-24  Jim Meyering  <meyering@lucent.com>
26013
26014         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
26015
26016 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26017
26018         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
26019         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
26020
26021 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26022
26023         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
26024         (mbrtowc, mbstate_t): Define substitutes if
26025         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
26026         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
26027         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
26028
26029 2000-06-23  Jim Meyering  <meyering@lucent.com>
26030
26031         * m4/afs.m4: Add missing AC_MSG_RESULT.
26032         Reported by Bruno Haible.
26033
26034         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
26035         Suggestion from Bruno Haible.
26036
26037 2000-06-23  Jim Meyering  <meyering@lucent.com>
26038
26039         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
26040
26041 2000-06-21  Jim Meyering  <meyering@lucent.com>
26042
26043         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
26044
26045 2000-06-21  Jim Meyering  <meyering@lucent.com>
26046
26047         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
26048         (noinst_HEADERS): Add getstr.h.
26049
26050         * lib/getline.c (getstr): Move into a separate file.
26051         * lib/getstr.c (getstr): New file, extracted from getline.c, with
26052         the following changes: new parameter, delim2; both delim[12]
26053         parameters have type `int', not `char'.  The latter would lose
26054         with 8-bit delimiters.
26055         * lib/getstr.h: New file.
26056
26057 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26058
26059         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
26060         than 1024, return a memory chunk of least possible size, instead
26061         of size PATH_MAX + 2. In the loop, increment the size proportionally.
26062         Use free/xmalloc instead of xrealloc to avoid copying for very long
26063         paths.
26064
26065 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26066
26067         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
26068         the empty string.
26069
26070 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26071
26072         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
26073         address, not strdup.  Include <stdlib.h> and don't declare free().
26074
26075 2000-06-19  Jim Meyering  <meyering@lucent.com>
26076
26077         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
26078
26079 2000-06-18  Jim Meyering  <meyering@lucent.com>
26080
26081         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
26082
26083         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
26084         `checking whether...' message to be consistent with that of the
26085         lstat test.
26086
26087 2000-06-18  Jim Meyering  <meyering@lucent.com>
26088
26089         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
26090         Besides, these days every porting target provides a mkdir function.
26091
26092         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
26093         needed. (this snippet comes from src/system.h).
26094
26095 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
26096
26097         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
26098
26099 2000-06-15  Paul Eggert  <eggert@twinsun.com>
26100
26101         * lib/human.c (adjust_value): New function.
26102         (human_readable_inexact): Apply rounding style even when
26103         printing approximate values.
26104
26105 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26106
26107         * lib/human.c (human_readable_inexact): Allow an input block
26108         size that is not a multiple of the output block size, and vice versa.
26109         Reported by Piergiorgio Sartor.
26110
26111 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26112
26113         * lib/getdate.y (get_date): Apply relative times after time
26114         zone indicator, not before.  Reported by Todd A. Jacobs.
26115
26116 2000-06-13  Jim Meyering  <meyering@lucent.com>
26117
26118         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
26119
26120         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
26121
26122 2000-06-12  Paul Eggert  <eggert@twinsun.com>
26123
26124         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
26125
26126 2000-06-12  Jim Meyering  <meyering@lucent.com>
26127
26128         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
26129         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
26130         optional argument.
26131         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
26132         the optional argument, `lib'.
26133
26134 2000-06-08  Jim Meyering  <meyering@lucent.com>
26135
26136         * m4/largefile.m4: Remove file (now that it's part of autoconf).
26137
26138 2000-06-04  Paul Eggert  <eggert@twinsun.com>