Tests for module 'locale'.
[gnulib.git] / ChangeLog
1 2007-04-10  Bruno Haible  <bruno@clisp.org>
2
3         * modules/locale-tests: New file.
4         * tests/test-locale.c: New file.
5
6         * modules/locale: New file.
7         * lib/locale_.h: New file.
8         * m4/locale_h.m4: New file.
9
10 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
11             Bruno Haible  <bruno@clisp.org>
12
13         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
14         be determined, test for availability of the copysignf, copysign,
15         copysignl functions.
16         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
17         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
18         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
19
20 2007-04-09  Eric Blake  <ebb9@byu.net>
21
22         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
23         * modules/stdio (Makefile.am): Support fflush.
24         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
25         * modules/fflush: New file.
26         * lib/fflush.c: Likewise.
27         * m4/fflush.m4: Likewise.
28         * modules/fflush-tests: New test.
29         * tests/test-fflush.c: Likewise.
30         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
31
32 2007-04-06  Bruno Haible  <bruno@clisp.org>
33
34         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
35         (VASNPRINTF): Use signbit for faster determination whether to print a
36         minus sign.
37         * modules/vasnprintf (Files): Remove lib/float+.h.
38         * modules/fprintf-posix (Depends-on): Add signbit.
39         * modules/snprintf-posix (Depends-on): Likewise.
40         * modules/sprintf-posix (Depends-on): Likewise.
41         * modules/vasnprintf-posix (Depends-on): Likewise.
42         * modules/vasprintf-posix (Depends-on): Likewise.
43         * modules/vfprintf-posix (Depends-on): Likewise.
44         * modules/vsnprintf-posix (Depends-on): Likewise.
45         * modules/vsprintf-posix (Depends-on): Likewise.
46
47 2007-04-06  Bruno Haible  <bruno@clisp.org>
48
49         * tests/test-frexp.c (main): Test also the sign bit of zero results.
50         * tests/test-frexpl.c (main): Likewise.
51         * tests/test-ldexpl.c (main): Likewise.
52         * modules/frexp-tests (Depends-on): Add signbit.
53         * modules/frexpl-tests (Depdends-on): Likewise.
54         * modules/ldexpl-tests (Depdends-on): Likewise.
55
56 2007-04-06  Bruno Haible  <bruno@clisp.org>
57
58         * modules/signbit-tests: New file.
59         * tests/test-signbit.c: New file.
60
61         * modules/signbit: New file.
62         * lib/signbitf.c: New file.
63         * lib/signbitd.c: New file.
64         * lib/signbitl.c: New file.
65         * m4/signbit.m4: New file.
66         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
67         (signbit): New macro.
68         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
69         REPLACE_SIGNBIT.
70         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
71         REPLACE_FREXPL into math.h.
72
73 2007-04-06  Bruno Haible  <bruno@clisp.org>
74
75         * modules/isnanf-nolibm-tests: New file.
76         * tests/test-isnanf.c: New file.
77
78         * modules/isnanf-nolibm: New file.
79         * lib/isnanf.h: New file.
80         * lib/isnanf.c: New file.
81         * lib/isnan.c: Consider the USE_FLOAT macro.
82         * m4/isnanf.m4: New file.
83
84 2007-04-06  Bruno Haible  <bruno@clisp.org>
85
86         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
87         (Link): New section.
88
89         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
90
91 2007-04-06  Bruno Haible  <bruno@clisp.org>
92
93         Assume the 'long double' type.
94         * m4/longdouble.m4: Remove file.
95         * config/srclist.txt: Don't mention longdouble.m4.
96         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
97         * lib/float+.h: Likewise.
98         * lib/frexp.c: Likewise.
99         * lib/printf-args.h: Likewise.
100         * lib/printf-args.c: Likewise.
101         * lib/printf-frexp.c: Likewise.
102         * lib/printf-parse.c: Likewise.
103         * lib/vasnprintf.c: Likewise.
104         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
105         * m4/intl.m4: Likewise.
106         * m4/isnanl.m4: Likewise.
107         * m4/printf.m4: Likewise.
108         * m4/printf-frexpl.m4: Likewise.
109         * m4/vasnprintf.m4: Likewise.
110         * modules/allocsa (Files): Remove m4/longdouble.m4.
111         * modules/gettext (Files): Likewise.
112         * modules/relocatable-prog-wrapper (Files): Likewise.
113         * modules/vasnprintf (Files): Likewise.
114         * modules/isnanl (Files): Likewise.
115         (Include): Simplify.
116         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
117         (Include): Simplify.
118         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
119         (Include): Simplify.
120         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
121         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
122         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
123         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
124         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
125         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
126         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
127         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
128         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
129         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
130         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
131         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
132         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
133         * tests/test-isnanl.c: Likewise.
134         * tests/test-snprintf-posix.h: Likewise.
135         * tests/test-sprintf-posix.h: Likewise.
136         * tests/test-vasnprintf-posix.c: Likewise.
137         * tests/test-vasnprintf-posix2.c: Likewise.
138         * tests/test-vasprintf-posix.c: Likewise.
139
140 2007-04-06  Bruno Haible  <bruno@clisp.org>
141
142         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
143         * lib/math_.h [__DECC]: Include the overridden include file through
144         #include_next, outside the double-inclusion guard.
145         * lib/stdio_.h [__DECC]: Likewise.
146         * lib/stdlib_.h [__DECC]: Likewise.
147         * lib/string_.h [__DECC]: Likewise.
148         * lib/time_.h [__DECC]: Likewise.
149         * lib/wchar_.h [__DECC]: Likewise.
150         * lib/wctype_.h [__DECC]: Likewise.
151         * lib/inttypes_.h [__DECC]: Likewise.
152         Reported by Albert Chin <china@thewrittenword.com> in
153         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
154
155 2007-04-04  Eric Blake  <ebb9@byu.net>
156
157         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
158         1.5.x.
159
160 2007-04-04  Bruno Haible  <bruno@clisp.org>
161
162         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
163         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
164
165 2007-04-04  Bruno Haible  <bruno@clisp.org>
166
167         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
168         results for "%010a" of Infinity and NaN.
169         * tests/test-vasprintf-posix.c (test_function): Likewise.
170         * tests/test-snprintf-posix.h (test_function): Likewise.
171         * tests/test-sprintf-posix.h (test_function): Likewise.
172         * tests/test-fprintf-posix.h (test_function): Remove these tests.
173         * tests/test-printf-posix.h (test_function): Likewise.
174         * tests/test-fprintf-posix.out: Update.
175         Needed for FreeBSD 6.1.
176
177 2007-04-04  Bruno Haible  <bruno@clisp.org>
178
179         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
180         directly used by the gnulib modules nor by gnulib-tool.
181
182 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
183
184         * DEPENDENCIES: Give overall description of version dependency
185         desirability.  Use more-typical names for apps.
186         Add shell, coreutils, diffutils, grep, tar, gzip.
187
188 2007-04-04  Simon Josefsson  <simon@josefsson.org>
189
190         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
191
192 2007-04-04  Karl Berry  <karl@gnu.org>
193
194         * MODULES.html.sh (func_module): missing '.
195
196 2007-04-03  Bruno Haible  <bruno@clisp.org>
197
198         * modules/argmatch-tests (Makefile.am): New variable
199         test_argmatch_LDADD.
200         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
201         * modules/array-list-tests (Makefile.am): New variable
202         test_array_list_LDADD.
203         * modules/array-oset-tests (Makefile.am): New variable
204         test_array_oset_LDADD.
205         * modules/avltree-list-tests (Makefile.am): New variable
206         test_avltree_list_LDADD.
207         * modules/avltree-oset-tests (Makefile.am): New variable
208         test_avltree_oset_LDADD.
209         * modules/avltreehash-list-tests (Makefile.am): New variable
210         test_avltreehash_list_LDADD.
211         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
212         test_canonicalize_lgpl_LDADD.
213         * modules/carray-list-tests (Makefile.am): New variable
214         test_carray_list_LDADD.
215         * modules/dirname-tests (Makefile.am): New variable
216         test_dirname_LDADD.
217         * modules/linked-list-tests (Makefile.am): New variable
218         test_linked_list_LDADD.
219         * modules/linkedhash-list-tests (Makefile.am): New variable
220         test_linkedhash_list_LDADD.
221         * modules/rbtree-list-tests (Makefile.am): New variable
222         test_rbtree_list_LDADD.
223         * modules/rbtree-oset-tests (Makefile.am): New variable
224         test_rbtree_oset_LDADD.
225         * modules/rbtreehash-list-tests (Makefile.am): New variable
226         test_rbtreehash_list_LDADD.
227         * modules/xvasprintf-tests (Makefile.am): New variable
228         test_xvasprintf_LDADD.
229         Reported by Eric Blake.
230
231 2007-04-03  Eric Blake  <ebb9@byu.net>
232
233         * DEPENDENCIES: Weaken m4 requirements.
234
235 2007-04-03  Bruno Haible  <bruno@clisp.org>
236
237         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
238         * modules/isnanl-tests (configure.ac): Likewise.
239
240 2007-04-03  Ben Pfaff  <blp@gnu.org>
241
242         * modules/iconv_open: Add $(srcdir)/ to source directory
243         references in Makefile fragments that call gperf, to fix VPATH
244         builds.
245
246 2007-04-03  Bruno Haible  <bruno@clisp.org>
247
248         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
249         * lib/ldexpl.c: Undo last change.
250
251 2007-04-03  Bruno Haible  <bruno@clisp.org>
252
253         * modules/printf-frexpl (Depends-on): Undo last change.
254         (Files): Add m4/ldexpl.m4.
255
256 2007-04-03  Bruno Haible  <bruno@clisp.org>
257
258         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
259         * modules/isnanl (Link): New section.
260
261         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
262         * modules/frexp (Link): New section.
263
264         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
265         * modules/frexpl (Link): New section.
266
267         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
268         * modules/ldexpl (Link): New section.
269
270 2007-04-03  Bruno Haible  <bruno@clisp.org>
271
272         * modules/TEMPLATE-EXTENDED: New file.
273         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
274
275 2007-04-03  Bruno Haible  <bruno@clisp.org>
276
277         * DEPENDENCIES: New file.
278         Suggested by Simon Josefsson.
279
280 2007-04-03  Bruno Haible  <bruno@clisp.org>
281
282         * doc/gnulib.texi: Escape @.
283
284 2007-04-03  James Youngman  <jay@gnu.org>
285         and Paul Eggert  <eggert@cs.ucla.edu>
286
287         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
288         birthtime on all systems that have birthtime, not just those which
289         use st_birthtimensec rather than st_birthtim.  Putting zero in
290         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
291         that the birth time is not available for files on an NFS mount.
292
293 2007-04-03  Simon Josefsson  <simon@josefsson.org>
294
295         * modules/memxor: Move back from crypto/, suggested by Bruno.
296         * modules/crypto/hmac-sha1: Fix memxor dependency.
297
298         * modules/crypto/gc: Moved from ../.
299
300 2007-04-02  Eric Blake  <ebb9@byu.net>
301
302         * lib/ldexpl.c (includes): Avoid libm.
303
304         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
305
306 2007-04-02  Bruno Haible  <bruno@clisp.org>
307
308         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
309         on IRIX.
310
311 2007-04-02  Bruno Haible  <bruno@clisp.org>
312
313         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
314         x86 or x86_64 platforms running MacOS X.
315         Reported by Ryan Schmidt <@ryandesign.com>.
316
317 2007-04-02  Bruno Haible  <bruno@clisp.org>
318
319         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
320         i386.
321
322 2007-04-01  Simon Josefsson  <simon@josefsson.org>
323
324         * modules/crypto/arcfour: Moved from ../.
325         * modules/crypto/arcfour-tests: Moved from ../.
326         * modules/crypto/arctwo: Moved from ../.
327         * modules/crypto/arctwo-tests: Moved from ../.
328         * modules/crypto/des: Moved from ../.
329         * modules/crypto/des-tests: Moved from ../.
330         * modules/crypto/gc-arcfour: Moved from ../.
331         * modules/crypto/gc-arcfour-tests: Moved from ../.
332         * modules/crypto/gc-arctwo: Moved from ../.
333         * modules/crypto/gc-arctwo-tests: Moved from ../.
334         * modules/crypto/gc-des: Moved from ../.
335         * modules/crypto/gc-des-tests: Moved from ../.
336         * modules/crypto/gc-hmac-md5: Moved from ../.
337         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
338         * modules/crypto/gc-hmac-sha1: Moved from ../.
339         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
340         * modules/crypto/gc-md2: Moved from ../.
341         * modules/crypto/gc-md2-tests: Moved from ../.
342         * modules/crypto/gc-md4: Moved from ../.
343         * modules/crypto/gc-md4-tests: Moved from ../.
344         * modules/crypto/gc-md5: Moved from ../.
345         * modules/crypto/gc-md5-tests: Moved from ../.
346         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
347         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
348         * modules/crypto/gc-random: Moved from ../.
349         * modules/crypto/gc-rijndael: Moved from ../.
350         * modules/crypto/gc-rijndael-tests: Moved from ../.
351         * modules/crypto/gc-sha1: Moved from ../.
352         * modules/crypto/gc-sha1-tests: Moved from ../.
353         * modules/crypto/gc-tests: Moved from ../.
354         * modules/crypto/hmac-md5: Moved from ../.
355         * modules/crypto/hmac-md5-tests: Moved from ../.
356         * modules/crypto/hmac-sha1: Moved from ../.
357         * modules/crypto/hmac-sha1-tests: Moved from ../.
358         * modules/crypto/md2: Moved from ../.
359         * modules/crypto/md2-tests: Moved from ../.
360         * modules/crypto/md4: Moved from ../.
361         * modules/crypto/md4-tests: Moved from ../.
362         * modules/crypto/md5: Moved from ../.
363         * modules/crypto/md5-tests: Moved from ../.
364         * modules/crypto/memxor: Moved from ../.
365         * modules/crypto/rijndael: Moved from ../.
366         * modules/crypto/rijndael-tests: Moved from ../.
367         * modules/crypto/sha1: Moved from ../.
368
369 2007-03-30  James Youngman  <jay@gnu.org>
370
371         * tests/test-stat-time.c (prepare_test): use chmod() rather than
372         rename() to change the ctime of a file (because ctime is unaffected
373         by rename on jfs2 on AIX 5.1).
374         (main): Start by doing cleanup, in case a previous run failed leaving
375         test files behind.
376
377 2007-03-31  Bruno Haible  <bruno@clisp.org>
378
379         Support old proprietary implementations of iconv.
380         * modules/iconv_open: New file.
381         * lib/iconv_.h: New file.
382         * m4/iconv_h.m4: New file.
383         * lib/iconv_open.c: New file.
384         * lib/iconv_open-aix.gperf: New file.
385         * lib/iconv_open-hpux.gperf: New file.
386         * lib/iconv_open-irix.gperf: New file.
387         * lib/iconv_open-osf.gperf: New file.
388         * m4/iconv_open.m4: New file.
389         * modules/linebreak (Depends-on): Add iconv_open.
390         * modules/striconv (Depends-on): Likewise.
391         * modules/striconveh (Depends-on): Likewise.
392         * modules/unicodeio (Depends-on): Likewise.
393         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
394         (iconv_t)(-1).
395         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
396         conversion if cd is (iconv_t)(-1).
397         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
398         is not possible.
399
400 2007-03-31  Bruno Haible  <bruno@clisp.org>
401
402         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
403         work on Solaris either. Protect also second use of "autodetect_jp".
404
405 2007-03-31  Bruno Haible  <bruno@clisp.org>
406
407         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
408         the function is not present.
409
410 2007-03-31  Bruno Haible  <bruno@clisp.org>
411
412         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
413         the function is not present.
414
415 2007-03-31  Bruno Haible  <bruno@clisp.org>
416
417         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
418         a bug in HP-UX iconv_open().
419
420 2007-03-31  Bruno Haible  <bruno@clisp.org>
421
422         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
423         (Mathematics <math.h>): New section, add fpieee.
424         (Input/output <stdio.h>): Add fseterr.
425         (Mathematics <math.h>): New section, add printf-frexp.
426         (Container data structures): Add sublist.
427         (Core language properties): Add fpucw, inline.
428         (Functions for greatest-width integer types <inttypes.h>): Add
429         imaxabs, imaxdiv, inttypes.
430         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
431         isnanl-nolibm, ldexp.
432         (Mathematics <math.h>): New section, add printf-frexpl.
433         (Support for systems lacking POSIX:2001): Add fprintf-posix,
434         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
435         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
436         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
437         (Unicode string functions): Add unistr/u*-mbtoucr.
438         (Java): Add javacomp-script, javaexec-script.
439         (C#): Add csharpcomp-script, csharpexec-script.
440         (Support for building libraries and executables): Add havelib,
441         relocatable-*.
442         (Support for maintaining and releasing projects): Renamed from
443         'Support for maintaining and release projects'. Add announce-gen.
444
445 2007-03-31  Bruno Haible  <bruno@clisp.org>
446
447         * README: Talk primarily about git.
448         (git and CVS): Renamed from CVS.
449         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
450         gnulib is available through git.
451         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
452
453 2007-03-30  Bruno Haible  <bruno@clisp.org>
454
455         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
456         * lib/poll_.h: Likewise.
457         * lib/stat_.h: Likewise.
458         * lib/sys_time_.h: Likewise.
459         * lib/sysexit_.h: Likewise.
460         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
461         * lib/stdbool_.h: Likewise.
462         * lib/byteswap_.h: Add double-inclusion guard.
463
464 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
465
466         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
467
468 2007-03-30  Karl Berry  <karl@gnu.org>
469
470         * config/srclist-update: double space after USA in the license
471         substitution, since that's how it's usually (?) written.
472
473 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
474
475         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
476         reported by Bruno Haible.
477
478 2007-03-29  Bruno Haible  <bruno@clisp.org>
479
480         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
481         a bug in AIX iconv().
482
483 2007-03-29  Bruno Haible  <bruno@clisp.org>
484
485         * modules/ldexpl-tests: New file.
486         * tests/test-ldexpl.c: New file.
487
488 2007-03-29  Bruno Haible  <bruno@clisp.org>
489
490         * lib/ldexpl.c: Include fpucw.h.
491         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
492         multiplication.
493         * modules/ldexpl (Depends-on): Add fpucw.
494
495 2007-03-29  Bruno Haible  <bruno@clisp.org>
496
497         * modules/ldexpl: New file.
498         * m4/ldexpl.m4: New file.
499         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
500         set.
501         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
502         REPLACE_LDEXPL.
503         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
504         REPLACE_LDEXPL.
505         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
506         gl_FUNC_LDEXPL_WORKS.
507         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
508         * modules/mathl (Files): Remove lib/ldexpl.c.
509         (Depends-on): Add ldexpl.
510
511 2007-03-29  Bruno Haible  <bruno@clisp.org>
512
513         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
514
515 2007-03-29  Bruno Haible  <bruno@clisp.org>
516
517         * tests/test-striconveh.c (main): Don't assume that a direct conversion
518         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
519         and possibly also HP-UX.
520         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
521         work on AIX, IRIX, HP-UX, OSF/1.
522         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
523         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
524         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
525         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
526         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
527         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
528
529 2007-03-29  Bruno Haible  <bruno@clisp.org>
530
531         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
532
533 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
534
535         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
536         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
537
538 2007-03-29  Eric Blake  <ebb9@byu.net>
539
540         * lib/acl-internal.h: Remove redundant include.
541         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
542         Cygwin when a file is locked.
543
544 2007-03-29  Bruno Haible  <bruno@clisp.org>
545
546         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
547         file.
548         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
549
550 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
551
552         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
553         try to remove a parent directory if the child couldn't be removed
554         (except for the first rmdir, which could fail because the child
555         doesn't exist).  Problem reported by Jeff Blaine in
556         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
557
558 2007-03-28  Bruno Haible  <bruno@clisp.org>
559
560         * lib/striconveh.c (utf8conv_carefully): New function.
561         (mem_cd_iconveh_internal): Invoke it.
562
563 2007-03-28  Bruno Haible  <bruno@clisp.org>
564
565         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
566         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
567         input.
568         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
569         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
570         unistr/u8-uctomb.
571
572 2007-03-28  Bruno Haible  <bruno@clisp.org>
573
574         * modules/unistr/u8-mbtoucr: New file.
575         * lib/unistr/u8-mbtoucr.c: New file.
576         * modules/unistr/u16-mbtoucr: New file.
577         * lib/unistr/u16-mbtoucr.c: New file.
578         * modules/unistr/u16-mbtoucr: New file.
579         * lib/unistr/u16-mbtoucr.c: New file.
580         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
581
582 2007-03-27  Simon Josefsson  <simon@josefsson.org>
583             Bruno Haible  <bruno@clisp.org>
584
585         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
586         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
587         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
588
589         * m4/stdio_h.m4: Add stubs for vasprintf too.
590
591         * modules/stdio: Support vasprintf in sed command.
592
593         * modules/vasprintf: Depend on stdio for prototypes.  Remove
594         vasprintf.h.  Add stdio module indicator.
595
596         * lib/stdio_.h: Declare asprintf and vasprintf, based on
597         vasprintf.h.
598
599         * lib/vasprintf.h: File removed.
600
601         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
602         * lib/vasprintf.c: Ditto.
603         * lib/xvasprintf.c: Ditto.
604         * tests/test-vasprintf-posix.c: Ditto.
605         * tests/test-vasprintf.c: Ditto.
606
607 2007-03-27  Bruno Haible  <bruno@clisp.org>
608
609         Make vasnprintf multithread-safe.
610         * lib/vasnprintf.c (decimal_point_char): New function.
611         (VASNPRINTF): Use it.
612         Suggested by Simon Josefsson.
613
614 2007-03-27  Eric Blake  <ebb9@byu.net>
615
616         Support sub-second birthtime on cygwin.
617         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
618         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
619         (get_stat_birthtime): Also work with st_birthtim.
620
621 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
622
623         * lib/stat-time.h (USE_BIRTHTIME): Remove.
624         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
625         (get_stat_birthtime_ns): Do not try to use "spare" fields.
626         (get_stat_birthtime_ns): Simplify compile-time tests.
627         (get_stat_birthtime): Change the API to look like
628         get_stat_mtime etc., except return a negative tv_nsec on error.
629         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
630         Don't check for "spare" fields.
631         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
632         or for struct stat.st_birthtime, as these tests aren't used.
633         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
634
635 2007-03-27  Bruno Haible  <bruno@clisp.org>
636
637         * lib/stat-time.h: Include <sys/stat.h>.
638
639 2007-03-27  James Youngman  <jay@gnu.org>
640
641         * lib/stat-time.h (get_stat_birthtime): New function for
642           retrieving st_birthtime as provided by UFS2 (hence *BSD).
643         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
644           and its variants.
645         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
646         * modules/stat-time-test: New file.
647         * tests/test-stat-time.c: New test, devised by Bruno Haible.
648
649 2007-03-26  Bruno Haible  <bruno@clisp.org>
650
651         Better support of signalling NaNs.
652         * lib/atanl.c: Include isnanl.h.
653         (atanl): Perform test for NaN at the beginning of the function and
654         through a call to isnanl.
655         * lib/cosl.c: Include isnanl.h.
656         (cosl): Perform test for NaN at the beginning of the function and
657         through a call to isnanl.
658         * lib/ldexpl.c: Include isnanl.h.
659         (ldexpl): Perform test for NaN through a call to isnanl.
660         * lib/logl.c: Include isnanl.h.
661         (logl): Perform test for NaN at the beginning of the function and
662         through a call to isnanl.
663         * lib/sinl.c: Include isnanl.h.
664         (sinl): Perform test for NaN at the beginning of the function and
665         through a call to isnanl.
666         * lib/sqrtl.c: Include isnanl.h.
667         (sqrtl): Perform test for NaN at the beginning of the function and
668         through a call to isnanl.
669         * lib/tanl.c: Include isnanl.h.
670         (tanl): Perform test for NaN at the beginning of the function and
671         through a call to isnanl.
672         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
673         * modules/mathl (Depends-on): Add isnanl.
674
675 2007-03-26  Eric Blake  <ebb9@byu.net>
676
677         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
678         regression in logic sense of previous patch.
679
680 2007-03-26  Bruno Haible  <bruno@clisp.org>
681
682         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
683         unportable shell command "if ! ...".
684         Reported by Ralf Wildenhues.
685
686 2007-03-25  Bruno Haible  <bruno@clisp.org>
687
688         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
689         <sysexits.h> file, and only add EX_CONFIG.
690         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
691         absolute file name and whether it is sufficient. Substitute also
692         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
693         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
694         ABSOLUTE_SYSEXITS_H into sysexits.h.
695
696 2007-03-25  Bruno Haible  <bruno@clisp.org>
697
698         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
699         hints is NULL.
700
701 2007-03-25  Bruno Haible  <bruno@clisp.org>
702
703         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
704         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
705
706 2007-03-25  Bruno Haible  <bruno@clisp.org>
707
708         * lib/vasnprintf.c: Include langinfo.h.
709         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
710         multithread-safe.
711         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
712         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
713         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
714         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
715         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
716         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
717         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
718         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
719         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
720         Reported by Simon Josefsson.
721
722 2007-03-25  Bruno Haible  <bruno@clisp.org>
723
724         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
725         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
726         * modules/vasnprintf (Depends-on): Add stdint.
727
728 2007-03-25  Bruno Haible  <bruno@clisp.org>
729
730         * modules/fpieee: New file.
731         * m4/fpieee.m4: New file.
732         * modules/isnan-nolibm (Depends-on): Add fpieee.
733         * modules/isnanl-nolibm (Depends-on): Add fpieee.
734         * modules/isnanl (Depends-on): Add fpieee.
735
736 2007-03-25  Bruno Haible  <bruno@clisp.org>
737
738         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
739
740 2007-03-25  Bruno Haible  <bruno@clisp.org>
741
742         Avoid test failures on IRIX 6.5.
743         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
744         (main): Use it.
745         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
746         macros.
747         (main): Use them.
748
749 2007-03-25  Bruno Haible  <bruno@clisp.org>
750
751         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
752         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
753         exists but doesn't work.
754         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
755         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
756         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
757         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
758
759 2007-03-25  Bruno Haible  <bruno@clisp.org>
760
761         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
762         returns inf. Needed on IRIX 6.5.
763
764 2007-03-25  Bruno Haible  <bruno@clisp.org>
765
766         * tests/test-frexpl.c: Include isnanl-nolibm.h.
767         (main): Use isnanl instead of x != x idiom.
768         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
769
770         * tests/test-frexp.c: Include isnan.h.
771         (main): Use isnan instead of x != x idiom.
772         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
773
774 2007-03-25  Bruno Haible  <bruno@clisp.org>
775
776         * tests/test-frexp.c (NaN): New function/macro.
777         (main): Use it instead of 0.0 / 0.0.
778         * tests/test-isnan.c (NaN): New function/macro.
779         (main): Use it instead of 0.0 / 0.0.
780         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
781         (test_function): Use it instead of 0.0 / 0.0.
782         * tests/test-vasprintf-posix.c (NaN): New function/macro.
783         (test_function): Use it instead of 0.0 / 0.0.
784         * tests/test-snprintf-posix.h (NaN): New function/macro.
785         (test_function): Use it instead of 0.0 / 0.0.
786         * tests/test-sprintf-posix.h (NaN): New function/macro.
787         (test_function): Use it instead of 0.0 / 0.0.
788         * tests/test-fprintf-posix.h (NaN): New function/macro.
789         (test_function): Use it instead of 0.0 / 0.0.
790         * tests/test-printf-posix.h (NaN): New function/macro.
791         (test_function): Use it instead of 0.0 / 0.0.
792
793         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
794
795 2007-03-25  Bruno Haible  <bruno@clisp.org>
796
797         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
798
799 2007-03-25  Bruno Haible  <bruno@clisp.org>
800
801         * lib/regexec.c (merge_state_with_log): Make static.
802
803 2007-03-25  Bruno Haible  <bruno@clisp.org>
804
805         * lib/trigl.c (kernel_rem_pio2): Make static.
806
807 2007-03-25  Bruno Haible  <bruno@clisp.org>
808
809         * lib/sincosl.c (sincosl_table): Make static.
810
811 2007-03-25  Bruno Haible  <bruno@clisp.org>
812
813         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
814         if the compiler does not support C99.
815
816 2007-03-25  Bruno Haible  <bruno@clisp.org>
817
818         * modules/time (Makefile.am): Ensure all rule action lines start with a
819         tab.
820
821 2007-03-24  Bruno Haible  <bruno@clisp.org>
822
823         * modules/tsearch-tests: New file.
824         * tests/test-tsearch.sh: New file.
825         * tests/test-tsearch.c: New file, mostly copied from glibc.
826
827         * modules/search-tests: New file.
828         * tests/test-search.c: New file.
829
830         * modules/search: New file.
831         * lib/search_.h: New file, incorporating lib/tsearch.h.
832         * m4/search_h.m4: New file.
833         * lib/tsearch.h: Remove file.
834         * lib/tsearch.c: Include search.h instead of tsearch.h.
835         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
836         HAVE_TSEARCH.
837         * modules/tsearch (Files): Remove lib/tsearch.h.
838         (Depends-on): Add search.
839         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
840         (Include): Change tsearch.h into search.h.
841
842 2007-03-24  Bruno Haible  <bruno@clisp.org>
843
844         * modules/fpucw: New file.
845         * lib/fpucw.h: New file.
846         * lib/frexp.c: Include fpucw.h.
847         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
848         (FUNC): Use them.
849         * lib/printf-frexp.c: Include fpucw.h.
850         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
851         (FUNC): Use them.
852         * lib/vasnprintf.c: Include fpucw.h.
853         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
854         'long double' calculations.
855         * tests/test-frexpl.c: Include fpucw.h.
856         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
857         * tests/test-printf-frexpl.c: Include fpucw.h.
858         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
859         * modules/frexpl (Depends-on): Add fpucw.
860         * modules/printf-frexpl (Depends-on): Likewise.
861         * modules/fprintf-posix (Depends-on): Likewise.
862         * modules/snprintf-posix (Depends-on): Likewise.
863         * modules/sprintf-posix (Depends-on): Likewise.
864         * modules/vasnprintf-posix (Depends-on): Likewise.
865         * modules/vasprintf-posix (Depends-on): Likewise.
866         * modules/vfprintf-posix (Depends-on): Likewise.
867         * modules/vsnprintf-posix (Depends-on): Likewise.
868         * modules/vsprintf-posix (Depends-on): Likewise.
869         * modules/frexpl-tests (Depends-on): Likewise.
870         * modules/printf-frexpl-tests (Depends-on): Likewise.
871
872 2007-03-24  Bruno Haible  <bruno@clisp.org>
873
874         * lib/float+.h: New file.
875         * lib/isnan.c: Include float+.h.
876         (SIZE): New macro.
877         (FUNC): Compare only SIZE bytes of the value.
878         * lib/vasnprintf.c: Include float+.h.
879         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
880         SIZEOF_LDBL or SIZEOF_DBL bytes.
881         * modules/isnan-nolibm (Files): Add lib/float+.h.
882         * modules/isnanl-nolibm (Files): Add lib/float+.h.
883         * modules/isnanl (Files): Add lib/float+.h.
884         * modules/vasnprintf (Files): Add lib/float+.h.
885
886 2007-03-24  Bruno Haible  <bruno@clisp.org>
887
888         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
889         include isnanl-nolibm.h.
890
891 2007-03-24  Bruno Haible  <bruno@clisp.org>
892
893         * tests/test-read-file.c (main): Don't produce spurious output for
894         expected situations. Make the test fail if it encountered unexpected
895         results.
896
897 2007-03-24  Bruno Haible  <bruno@clisp.org>
898
899         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
900         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
901
902 2007-03-24  Bruno Haible  <bruno@clisp.org>
903
904         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
905
906 2007-03-24  Bruno Haible  <bruno@clisp.org>
907
908         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
909         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
910
911         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
912         * modules/utf8-ucs4: Turn into a symbolic link to module
913         unistr/u8-mbtouc.
914
915         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
916         utf8-ucs4-unsafe.
917         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
918         unistr/u8-mbtouc-unsafe.
919
920         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
921         * modules/utf16-ucs4: Turn into a symbolic link to module
922         unistr/u16-mbtouc.
923
924         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
925         utf16-ucs4-unsafe.
926         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
927         unistr/u16-mbtouc-unsafe.
928
929         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
930         * modules/ucs4-utf8: Turn into a symbolic link to module
931         unistr/u8-ubtomb.
932
933         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
934         * modules/ucs4-utf16: Turn into a symbolic link to module
935         unistr/u16-ubtomb.
936
937 2007-03-24  Bruno Haible  <bruno@clisp.org>
938
939         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
940         Enable the function only if HAVE_INLINE.
941         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
942         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
943         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
944         Enable the function only if HAVE_INLINE.
945         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
946         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
947         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
948         Enable the function only if HAVE_INLINE.
949         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
950         Enable the function only if HAVE_INLINE.
951         * modules/utf8-ucs4: Update.
952         * modules/utf8-ucs4-unsafe: Update.
953         * modules/utf16-ucs4: Update.
954         * modules/utf16-ucs4-unsafe: Update.
955         * modules/ucs4-utf8: Update.
956         * modules/ucs4-utf16: Update.
957
958 2007-03-24  Bruno Haible  <bruno@clisp.org>
959
960         * lib/utf8-ucs4.h: Remove file.
961         * lib/utf8-ucs4-unsafe.h: Remove file.
962         * lib/utf16-ucs4.h: Remove file.
963         * lib/utf16-ucs4-unsafe.h: Remove file.
964         * lib/ucs4-utf8.h: Remove file.
965         * lib/ucs4-utf16.h: Remove file.
966         * lib/unistr.h: Include their previous contents.
967         * m4/utf-ucs4.m4: Remove file.
968         * m4/ucs4-utf.m4: Remove file.
969         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
970         (Depends-on): Add unistr/base.
971         (configure.ac): Remove gl_UTF_UCS4.
972         (Makefile.am): Update.
973         (Include): Change to unistr.h.
974         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
975         (Depends-on): Add unistr/base.
976         (configure.ac): Remove gl_UTF_UCS4.
977         (Makefile.am): Update.
978         (Include): Change to unistr.h.
979         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
980         (Depends-on): Add unistr/base.
981         (configure.ac): Remove gl_UTF_UCS4.
982         (Makefile.am): Update.
983         (Include): Change to unistr.h.
984         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
985         (Depends-on): Add unistr/base.
986         (configure.ac): Remove gl_UTF_UCS4.
987         (Makefile.am): Update.
988         (Include): Change to unistr.h.
989         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
990         (Depends-on): Add unistr/base.
991         (configure.ac): Remove gl_UCS4_UTF.
992         (Makefile.am): Update.
993         (Include): Change to unistr.h.
994         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
995         (Depends-on): Add unistr/base.
996         (configure.ac): Remove gl_UCS4_UTF.
997         (Makefile.am): Update.
998         (Include): Change to unistr.h.
999         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
1000         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
1001         utf8-ucs4-unsafe.h.
1002         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
1003         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
1004         utf16-ucs4-unsafe.h.
1005         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
1006         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
1007         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
1008         * lib/unistr/u8-strchr.c: Likewise.
1009         * lib/unistr/u8-strrchr.c: Likewise.
1010         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
1011         * lib/unistr/u16-strchr.c: Likewise.
1012         * lib/unistr/u16-strrchr.c: Likewise.
1013         * lib/striconveh.c: Update.
1014         * lib/linebreak.c: Update.
1015
1016 2007-03-24  Bruno Haible  <bruno@clisp.org>
1017
1018         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
1019         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
1020
1021 2007-03-22  Bruno Haible  <bruno@clisp.org>
1022
1023         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
1024
1025 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
1026
1027         * MODULES.html.sh (File system functions): New module write-any-file.
1028         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
1029         * m4/write-any-file.m4: New files.
1030
1031 2007-03-23  Eric Blake  <ebb9@byu.net>
1032
1033         * gnulib-tool: Rearrange space-tab sequences, since some editors
1034         like to eat them.
1035
1036 2007-03-23  Eric Blake  <ebb9@byu.net>
1037
1038         * lib/version-etc.c (version_etc_va): Update license wording to
1039         be more concise.  Recommended by Richard Stallman.
1040
1041 2007-03-22  Bruno Haible  <bruno@clisp.org>
1042
1043         * lib/poll.c (MSG_PEEK): New fallback definition.
1044
1045 2007-03-22  Bruno Haible  <bruno@clisp.org>
1046
1047         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
1048         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
1049         (main): Update.
1050         Fixes a compilation error on BeOS.
1051
1052 2007-03-22  Bruno Haible  <bruno@clisp.org>
1053
1054         * modules/frexpl-tests: New file.
1055         * tests/test-frexpl.c: New file.
1056
1057         * modules/frexpl: New file.
1058         * m4/frexpl.m4: New file.
1059         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
1060         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
1061         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
1062         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
1063         (Depends-on): Add frexpl. Remove isnanl-nolibm.
1064         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
1065
1066 2007-03-22  Bruno Haible  <bruno@clisp.org>
1067
1068         * lib/frexpl.c: Share code with lib/frexp.c.
1069         * modules/mathl (Files): Add lib/frexp.c.
1070         (Depends-on): Add isnanl-nolibm.
1071
1072 2007-03-22  Bruno Haible  <bruno@clisp.org>
1073
1074         * modules/printf-frexp (Files): Add m4/frexp.m4.
1075         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
1076         only if the found frexp function actually works.
1077
1078 2007-03-22  Bruno Haible  <bruno@clisp.org>
1079
1080         * lib/frexp.c: Remove older implementation that uses divisions.
1081
1082 2007-03-21  Bruno Haible  <bruno@clisp.org>
1083
1084         * modules/frexp-tests: New file.
1085         * tests/test-frexp.c: New file.
1086
1087         * modules/frexp: New file.
1088         * lib/frexp.c: New file.
1089         * m4/frexp.m4: New file.
1090         * lib/math_.h (frexp): New declaration.
1091         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
1092         REPLACE_FREXP.
1093         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
1094
1095 2007-03-21  Bruno Haible  <bruno@clisp.org>
1096
1097         * modules/isnanl-tests: New file.
1098         * tests/test-isnanl.c: New file.
1099
1100         * modules/isnanl: New file.
1101         * lib/isnanl.h: New file.
1102         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
1103         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
1104         gl_FUNC_ISNANL_WORKS.
1105         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
1106         New macros.
1107
1108 2007-03-21  Bruno Haible  <bruno@clisp.org>
1109
1110         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
1111         lib/isnanl.h.
1112         (Include): Update.
1113         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
1114         * lib/vasnprintf.c: Update.
1115         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
1116         tests/test-isnanl.h, remove tests/test-isnanl.c.
1117         (Makefile.am): Update.
1118         * tests/test-isnanl-nolibm.c: New file.
1119         * tests/test-isnanl.h: New file.
1120         * tests/test-isnanl.c: Remove file.
1121
1122 2007-03-21  Jim Meyering  <jim@meyering.net>
1123
1124         When trying to open ".", treat ESTALE like EACCES.
1125         * lib/savewd.c (savewd_save): Resort to forking not just upon
1126         failure with EACCES, but also when errno is ESTALE.
1127
1128 2007-03-20  Bruno Haible  <bruno@clisp.org>
1129
1130         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
1131         Needed on AIX 5.1. Reported by Matthew Woehlke.
1132
1133 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1134
1135         Suggestions by Bruno Haible:
1136         * lib/acl-internal.h: Include "gettext.h" rather than rolling
1137         our own.
1138         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
1139         * modules/acl (Depends-on): Add gettext.
1140
1141 2007-03-19  Bruno Haible  <bruno@clisp.org>
1142
1143         * modules/iconvme: Remove file.
1144         * lib/iconvme.h: Remove file.
1145         * lib/iconvme.c: Remove file.
1146         * m4/iconvme.m4: Remove file.
1147
1148 2007-03-19  Bruno Haible  <bruno@clisp.org>
1149
1150         * doc/relocatable-maint.texi: Break long shell script line.
1151         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
1152
1153 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1154
1155         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
1156         handle file_has_acl.
1157         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
1158         * lib/acl.c: Move header inclusions and related macro defns into
1159         lib/acl-internal.h.
1160         (S_ISLNK): Remove defn, since that's now done for us.
1161         (file_has_acl): Move to lib/file-has-acl.c.
1162         Call acl_trivial if available.  This is the crucial part of the fix.
1163         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
1164         shared within the library.  Rewrite a bit, partly to make it compatible
1165         with the GNU coding style.
1166         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
1167         Remove unnecessary double-quotes.
1168         Don't test for acl_to_text; the build will catch that.
1169         Replace acl_entries if it doesn't exist and it is needed.
1170         Check for -lsec and acl_trivial (as used on Solaris 10).
1171         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
1172         lib/file-has-acl.c.
1173         (Depends-on): Add sys_stat, for S_ISLNK.
1174
1175 2007-03-19  Ben Pfaff  <blp@gnu.org>
1176
1177         * doc/gnulib.texi: Fix typos.
1178         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
1179
1180 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
1181
1182         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
1183         If size is zero here, buf must be zero.
1184
1185 2007-03-19  Simon Josefsson  <simon@josefsson.org>
1186
1187         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
1188         <bruno@clisp.org>.
1189
1190 2007-03-18  Bruno Haible  <bruno@clisp.org>
1191
1192         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
1193         Suggested by Eric Blake.
1194
1195 2007-03-18  Ben Pfaff  <blp@gnu.org>
1196
1197         * doc/relocatable.texi: Recommend using as prefix a directory
1198         that does not exist and will never be created.  Based on
1199         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
1200         and others.
1201
1202 2007-03-17  Bruno Haible  <bruno@clisp.org>
1203
1204         * lib/fchownat.c: Include lchown.h.
1205
1206 2007-03-17  Bruno Haible  <bruno@clisp.org>
1207
1208         Fix endless loop when the given allocated size was > INT_MAX.
1209         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
1210         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
1211         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
1212         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
1213         * lib/sprintf.c (sprintf): Likewise.
1214
1215 2007-03-17  Bruno Haible  <bruno@clisp.org>
1216
1217         * tests/test-argp-2.sh (func_compare): Output a context diff.
1218
1219 2007-03-17  Bruno Haible  <bruno@clisp.org>
1220
1221         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
1222         locale's decimal-point character.
1223
1224 2007-03-17  Bruno Haible  <bruno@clisp.org>
1225
1226         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
1227         before comparing it. Needed because on some platforms (e.g. x86) a
1228         'long double' occupies less bytes than sizeof (long double).
1229
1230 2007-03-17  Bruno Haible  <bruno@clisp.org>
1231
1232         * tests/test-crc.c (main): Make printf statements 64-bit clean.
1233         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
1234         * tests/test-getaddrinfo.c (simple): Likewise.
1235         * tests/test-read-file.c (main): Likewise.
1236
1237 2007-03-17  Bruno Haible  <bruno@clisp.org>
1238
1239         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
1240
1241 2007-03-17  Bruno Haible  <bruno@clisp.org>
1242
1243         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
1244         unused variable.
1245
1246 2007-03-17  Bruno Haible  <bruno@clisp.org>
1247
1248         * tests/test-c-strcasecmp.c: Include c-strcase.h.
1249         * tests/test-c-strncasecmp.c: Likewise.
1250
1251 2007-03-17  Bruno Haible  <bruno@clisp.org>
1252
1253         * modules/stdlib (Depends-on): Add unistd.
1254         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
1255         Needed for MacOS X 10.3.
1256
1257 2007-03-17  Bruno Haible  <bruno@clisp.org>
1258
1259         * lib/unistr/u-strdup.h: Include <stdlib.h>.
1260
1261 2007-03-17  Bruno Haible  <bruno@clisp.org>
1262
1263         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
1264
1265 2007-03-17  Bruno Haible  <bruno@clisp.org>
1266
1267         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
1268         to reflect files copied from gnulib (with or without modifications).
1269         Suggested by Jim Meyering.
1270
1271 2007-03-17  Eric Blake  <ebb9@byu.net>
1272
1273         * NEWS: Document stdlib change from 2007-02-18.
1274
1275 2007-03-17  Jim Meyering  <jim@meyering.net>
1276
1277         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
1278         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
1279         someone uses a name containing shell meta-characters.
1280         Reported by Alfred M. Szmidt.
1281
1282         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
1283
1284 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
1285
1286         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
1287         and copy gettext configuration files only if configure.ac contains
1288         a use of AM_GNU_GETTEXT_VERSION.
1289
1290 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
1291
1292         * build-aux/bootstrap (gnulib_name): New variable.
1293         (gnulib_tool_options): Use it.
1294
1295 2007-03-13  Simon Josefsson  <simon@josefsson.org>
1296
1297         * tests/test-des.c: Use new namespace.
1298
1299 2007-03-15  Bruno Haible  <bruno@clisp.org>
1300
1301         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
1302         Reported by James Youngman <jay@gnu.org>.
1303
1304 2007-03-15  Bruno Haible  <bruno@clisp.org>
1305
1306         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
1307         declared prototype. Needed with cc on OSF/1 5.1.
1308
1309 2007-03-15  Bruno Haible  <bruno@clisp.org>
1310
1311         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
1312         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
1313         (struct gl_list_implementation): Add dispose_fn argument to the
1314         'create_empty', 'create' methods.
1315         (struct gl_list_impl_base): Add field 'dispose_fn'.
1316         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
1317         argument.
1318         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
1319         dispose_fn argument.
1320         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
1321         dispose_fn on the dropped values.
1322         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
1323         dispose_fn argument.
1324         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
1325         dropped values.
1326         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
1327         (gl_tree_remove_node): Call dispose_fn on the dropped value.
1328         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
1329         (gl_tree_remove_node): Call dispose_fn on the dropped value.
1330         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
1331         argument.
1332         (gl_tree_list_free): Call dispose_fn on the dropped values.
1333         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
1334         the dropped values.
1335         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
1336         Add dispose_fn argument.
1337         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
1338         Call dispose_fn on the dropped values.
1339         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
1340         Add dispose_fn argument.
1341         (gl_sublist_create): Initialize the 'dispose_fn' field.
1342         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
1343         * tests/test-array_list.c (main): Update.
1344         * tests/test-carray_list.c (main): Update.
1345         * tests/test-avltree_list.c (main): Update.
1346         * tests/test-rbtree_list.c (main): Update.
1347         * tests/test-avltreehash_list.c (main): Update.
1348         * tests/test-rbtreehash_list.c (main): Update.
1349         * tests/test-linked_list.c (main): Update.
1350         * tests/test-linkedhash_list.c (main): Update.
1351         * tests/test-array_oset.c (main): Update.
1352
1353 2007-03-15  Bruno Haible  <bruno@clisp.org>
1354
1355         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
1356         (gl_oset_create_empty): Add dispose_fn argument.
1357         (struct gl_oset_implementation): Add dispose_fn argument to
1358         'create_empty' method.
1359         (struct gl_oset_impl_base): Add dispose_fn field.
1360         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
1361         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
1362         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
1363         values.
1364         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
1365         (gl_tree_oset_free): Call dispose_fn on the dropped values.
1366         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
1367         dropped value.
1368         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
1369         dropped value.
1370         * tests/test-array_oset.c (main): Update.
1371         * tests/test-avltree_oset.c (main): Update.
1372         * tests/test-rbtree_oset.c (main): Update.
1373         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
1374
1375 2007-03-13  Bruno Haible  <bruno@clisp.org>
1376
1377         * tests/test-stdbool.c (i): Update after last patch.
1378
1379 2007-03-12  Bruno Haible  <bruno@clisp.org>
1380
1381         * lib/quotearg.c: Include <wctype.h> early, before the definition of
1382         the iswprint macro. Needed on Solaris 2.5.1.
1383
1384 2007-03-12  Bruno Haible  <bruno@clisp.org>
1385
1386         * tests/test-printf-frexp.c (main): Declare x as volatile.
1387
1388 2007-03-12  Simon Josefsson  <simon@josefsson.org>
1389
1390         * doc/gnulib.texi (Build robot for gnulib): New section.
1391
1392 2007-03-12  Jim Meyering  <jim@meyering.net>
1393
1394         * build-aux/bootstrap: New file.
1395         * build-aux/bootstrap.conf: New file, from coreutils.
1396
1397 2007-03-11  Bruno Haible  <bruno@clisp.org>
1398
1399         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
1400
1401 2007-03-12  Simon Josefsson  <simon@josefsson.org>
1402
1403         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
1404         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
1405         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
1406
1407 2007-03-11  Bruno Haible  <bruno@clisp.org>
1408
1409         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
1410         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
1411
1412 2007-03-11  Bruno Haible  <bruno@clisp.org>
1413
1414         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
1415         formula. Needed for SunPRO C 5.0.
1416
1417 2007-03-11  Bruno Haible  <bruno@clisp.org>
1418
1419         * modules/long-options (Depends-on): Add getopt.
1420
1421 2007-03-11  Bruno Haible  <bruno@clisp.org>
1422
1423         * modules/modechange (Depends-on): Add stdbool.
1424
1425 2007-03-11  Bruno Haible  <bruno@clisp.org>
1426
1427         * modules/i-ring (Depends-on): Add stdbool.
1428
1429 2007-03-11  Bruno Haible  <bruno@clisp.org>
1430
1431         * modules/gc-des (Depends-on): Add stdbool.
1432
1433 2007-03-11  Bruno Haible  <bruno@clisp.org>
1434
1435         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
1436
1437 2007-03-11  Bruno Haible  <bruno@clisp.org>
1438
1439         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
1440
1441 2007-03-11  Bruno Haible  <bruno@clisp.org>
1442
1443         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
1444
1445 2007-03-11  Bruno Haible  <bruno@clisp.org>
1446
1447         * lib/vasnprintf.c (sprintf): Undefine.
1448
1449 2007-03-11  Bruno Haible  <bruno@clisp.org>
1450
1451         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
1452         initializers in SunPRO C and Compaq C compilers.
1453
1454 2007-03-11  Bruno Haible  <bruno@clisp.org>
1455
1456         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
1457         decrementing code ANSI C compliant.
1458
1459 2007-03-11  Bruno Haible  <bruno@clisp.org>
1460
1461         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
1462         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
1463
1464 2007-03-11  Bruno Haible  <bruno@clisp.org>
1465
1466         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
1467         <stdbool.h> substitute doesn't pass.
1468
1469 2007-03-11  Bruno Haible  <bruno@clisp.org>
1470
1471         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
1472
1473 2007-03-11  Bruno Haible  <bruno@clisp.org>
1474
1475         * gnulib-tool (func_create_megatestdir): Create also an autobuild
1476         script, for submission to autobuild.josefsson.org.
1477
1478 2007-03-10  Bruno Haible  <bruno@clisp.org>
1479
1480         * modules/canonicalize-lgpl-tests: New file.
1481         * tests/test-canonicalize-lgpl.sh: New file.
1482         * tests/test-canonicalize-lgpl.c: New file.
1483
1484         * modules/c-strcase-tests: New file.
1485         * tests/test-c-strcase.sh: New file.
1486         * tests/test-c-strcasecmp.c: New file.
1487         * tests/test-c-strncasecmp.c: New file.
1488
1489         * modules/atexit-tests: New file.
1490         * tests/test-atexit.sh: New file.
1491         * tests/test-atexit.c: New file.
1492
1493 2007-03-10  Bruno Haible  <bruno@clisp.org>
1494
1495         * tests/test-binary-io.sh: Use temporary filenames that are not so
1496         likely to clash with those of other tests (in a parallel make).
1497         * tests/test-binary-io.c: Likewise.
1498
1499 2007-03-10  Bruno Haible  <bruno@clisp.org>
1500
1501         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
1502         fallback; use #error instead.
1503         Suggested by Simon Josefsson.
1504
1505 2007-03-10  Bruno Haible  <bruno@clisp.org>
1506
1507         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
1508         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
1509         first and the last.
1510
1511 2007-03-10  Bruno Haible  <bruno@clisp.org>
1512
1513         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
1514
1515 2007-03-10  Bruno Haible  <bruno@clisp.org>
1516
1517         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
1518         "make distcheck".
1519         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
1520         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
1521         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
1522
1523 2007-03-10  Bruno Haible  <bruno@clisp.org>
1524
1525         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
1526         variable.
1527         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
1528         variable.
1529
1530 2007-03-09  Eric Blake  <ebb9@byu.net>
1531         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
1532
1533         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
1534         types are not being provided by gnulib.
1535         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
1536         types are supported.
1537
1538 2007-03-10  Bruno Haible  <bruno@clisp.org>
1539
1540         * lib/stdio_.h (__attribute__): New macro.
1541         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
1542         vsprintf): Specify __attribute__ __format__ for GCC.
1543         Suggested by Eric Blake.
1544
1545 2007-03-09  Bruno Haible  <bruno@clisp.org>
1546
1547         * modules/printf-posix-tests: New file.
1548         * tests/test-printf-posix.sh: New file.
1549         * tests/test-printf-posix.c: New file.
1550
1551         * modules/printf-posix: New file.
1552         * lib/printf.c: New file.
1553         * m4/printf-posix-rpl.m4: New file.
1554         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
1555         REPLACE_PRINTF.
1556         * lib/stdio_.h (printf): New declaration.
1557         (format, __format__, ____printf____, ____scanf____, ____strftime____,
1558         ____strfmon____): New macros.
1559         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
1560         REPLACE_PRINTF.
1561
1562 2007-03-09  Bruno Haible  <bruno@clisp.org>
1563
1564         * tests/test-vasnprintf-posix2.sh: New file.
1565         * tests/test-vasnprintf-posix2.c: New file.
1566         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
1567         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
1568         (Makefile.am): Activate test-vasnprintf-posix2.sh.
1569
1570         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
1571         a locale dependent decimal point, rather than always '.'.
1572
1573 2007-03-09  Eric Blake  <ebb9@byu.net>
1574
1575         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
1576         spite of platforms like Tandem/NSK that define it to -1.
1577
1578 2007-03-08  Bruno Haible  <bruno@clisp.org>
1579
1580         * modules/vprintf-posix-tests: New file.
1581         * tests/test-vprintf-posix.sh: New file.
1582         * tests/test-vprintf-posix.c: New file.
1583         * tests/test-printf-posix.h: New file.
1584
1585         * modules/vprintf-posix: New file.
1586         * lib/vprintf.c: New file.
1587         * m4/vprintf-posix.m4: New file.
1588         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
1589         REPLACE_VPRINTF.
1590         * lib/stdio_.h (vprintf): New declaration.
1591         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
1592         REPLACE_VPRINTF.
1593
1594 2007-03-08  Bruno Haible  <bruno@clisp.org>
1595
1596         * modules/fprintf-posix-tests: New file.
1597         * tests/test-fprintf-posix.sh: New file.
1598         * tests/test-fprintf-posix.c: New file.
1599
1600         * modules/fprintf-posix: New file.
1601         * lib/fprintf.c: New file.
1602         * m4/fprintf-posix.m4: New file.
1603         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
1604         REPLACE_FPRINTF.
1605         * lib/stdio_.h (fprintf): New declaration.
1606         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
1607         REPLACE_FPRINTF.
1608
1609 2007-03-08  Bruno Haible  <bruno@clisp.org>
1610
1611         * modules/vfprintf-posix-tests: New file.
1612         * tests/test-vfprintf-posix.sh: New file.
1613         * tests/test-vfprintf-posix.c: New file.
1614         * tests/test-fprintf-posix.h: New file.
1615         * tests/test-fprintf-posix.out: New file.
1616
1617         * modules/vfprintf-posix: New file.
1618         * lib/vfprintf.c: New file.
1619         * m4/vfprintf-posix.m4: New file.
1620         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
1621         REPLACE_VFPRINTF.
1622         * lib/stdio_.h (vfprintf): New declaration.
1623         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
1624         REPLACE_VFPRINTF.
1625
1626 2007-03-08  Bruno Haible  <bruno@clisp.org>
1627
1628         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
1629
1630 2007-03-08  Bruno Haible  <bruno@clisp.org>
1631
1632         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
1633         instead of 'expr' invocations.
1634         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1635         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1636         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1637         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1638         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1639         Suggested by Paul Eggert.
1640
1641 2007-03-08  Bruno Haible  <bruno@clisp.org>
1642
1643         * modules/fseterr-tests: New file.
1644         * tests/test-fseterr.c: New file.
1645
1646         * modules/fseterr: New file.
1647         * lib/fseterr.h: New file.
1648         * lib/fseterr.c: New file.
1649
1650 2007-03-08  Bruno Haible  <bruno@clisp.org>
1651
1652         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
1653         * lib/getopt_.h: Likewise.
1654         * lib/mbswidth.h: Likewise.
1655         * lib/setenv.h: Likewise.
1656         * lib/vasnprintf.h: Likewise.
1657         * lib/vasprintf.h: Likewise.
1658         * lib/verror.h: Likewise.
1659         * lib/xsetenv.h: Likewise.
1660         * lib/xvasprintf.h: Likewise.
1661
1662 2007-03-08  Jim Meyering  <jim@meyering.net>
1663
1664         * users.txt: Add parted.
1665
1666         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
1667
1668 2007-03-07  Bruno Haible  <bruno@clisp.org>
1669
1670         * m4/printf.m4: Make the shell script snippets copy&pastable.
1671
1672 2007-03-02  Bruno Haible  <bruno@clisp.org>
1673
1674         * lib/netinet_in_.h: New file.
1675         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
1676         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
1677         * modules/netinet_in (Files): Add lib/netinet_in_.h.
1678         (Depends-on): Add absolute-header.
1679         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
1680         into netinet/in.h.
1681
1682 2007-03-03  Bruno Haible  <bruno@clisp.org>
1683
1684         * lib/sys_select_.h: New file.
1685         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
1686         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
1687         * modules/sys_select (Files): Add lib/sys_select_.h.
1688         (Depends-on): Add absolute-header.
1689         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
1690         into sys/select.h.
1691
1692 2007-03-02  Bruno Haible  <bruno@clisp.org>
1693
1694         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
1695         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
1696         values.
1697         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
1698         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
1699         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
1700         * modules/sys_socket (Depends-on): Add absolute-header.
1701         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
1702         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
1703         (Include): Remove requirement of inclusion of <sys/types.h>.
1704
1705 2007-03-02  Bruno Haible  <bruno@clisp.org>
1706
1707         * lib/byteswap_.h (bswap_32): Fix formula.
1708
1709 2007-03-06  Bruno Haible  <bruno@clisp.org>
1710
1711         * modules/sprintf-posix-tests: New file.
1712         * tests/test-sprintf-posix.c: New file.
1713
1714         * modules/sprintf-posix: New file.
1715         * lib/sprintf.c: New file.
1716         * m4/sprintf-posix.m4: New file.
1717         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
1718         REPLACE_SPRINTF.
1719         * lib/stdio_.h (sprintf): New declaration.
1720         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
1721         REPLACE_SPRINTF.
1722
1723 2007-03-06  Bruno Haible  <bruno@clisp.org>
1724
1725         * modules/vsprintf-posix-tests: New file.
1726         * tests/test-vsprintf-posix.c: New file.
1727         * tests/test-sprintf-posix.h: New file.
1728
1729         * modules/vsprintf-posix: New file.
1730         * lib/vsprintf.c: New file.
1731         * m4/vsprintf-posix.m4: New file.
1732         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
1733         REPLACE_VSPRINTF.
1734         * lib/stdio_.h (vsprintf): New declaration.
1735         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
1736         REPLACE_VSPRINTF.
1737
1738 2007-03-06  Bruno Haible  <bruno@clisp.org>
1739
1740         * modules/vsnprintf (Depend-on): Remove minmax.
1741
1742 2007-03-06  Bruno Haible  <bruno@clisp.org>
1743
1744         * modules/snprintf-posix-tests: New file.
1745         * tests/test-snprintf-posix.c: New file.
1746
1747         * modules/snprintf-posix: New file.
1748         * m4/snprintf-posix.m4: New file.
1749         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
1750         gl_FUNC_SNPRINTF.
1751         (gl_FUNC_SNPRINTF): Invoke it.
1752         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
1753         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
1754         is set.
1755         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
1756
1757 2007-03-06  Bruno Haible  <bruno@clisp.org>
1758
1759         * modules/vsnprintf-posix-tests: New file.
1760         * tests/test-vsnprintf-posix.c: New file.
1761         * tests/test-snprintf-posix.h: New file.
1762
1763         * modules/vsnprintf-posix: New file.
1764         * m4/vsnprintf-posix.m4: New file.
1765         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
1766         gl_FUNC_VSNPRINTF.
1767         (gl_FUNC_VSNPRINTF): Invoke it.
1768         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
1769         * lib/stdio_.h (vsnprintf): Define as a replacement if
1770         REPLACE_VSNPRINTF is set.
1771         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
1772
1773 2007-03-06  Bruno Haible  <bruno@clisp.org>
1774
1775         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
1776         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
1777
1778 2007-03-06  Bruno Haible  <bruno@clisp.org>
1779
1780         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
1781         (asinl): Declare also if HAVE_DECL_ASINL is set.
1782         (atanl): Declare also if HAVE_DECL_ATANL is set.
1783         (ceill): Declare also if HAVE_DECL_CEILL is set.
1784         (cosl): Declare also if HAVE_DECL_COSL is set.
1785         (expl): Declare also if HAVE_DECL_EXPL is set.
1786         (floorl): Declare also if HAVE_DECL_FLOORL is set.
1787         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
1788         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
1789         (logl): Declare also if HAVE_DECL_LOGL is set.
1790         (sinl): Declare also if HAVE_DECL_SINL is set.
1791         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
1792         (tanl): Declare also if HAVE_DECL_TANL is set.
1793         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
1794         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
1795         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
1796         declaration of frexpl, ldexpl.
1797         * modules/printf-frexpl (Depends-on): Add math.
1798         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
1799
1800 2007-03-05  Bruno Haible  <bruno@clisp.org>
1801
1802         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
1803         frexpl and ldexpl are declared.
1804         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
1805
1806 2007-03-05  Bruno Haible  <bruno@clisp.org>
1807
1808         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
1809         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
1810
1811 2007-03-05  Bruno Haible  <bruno@clisp.org>
1812
1813         * lib/stdio_.h: Include <stddef.h>.
1814
1815 2007-03-05  Bruno Haible  <bruno@clisp.org>
1816
1817         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
1818
1819 2007-03-05  Bruno Haible  <bruno@clisp.org>
1820
1821         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
1822         NetBSD 4, from Ralf Wildenhues.
1823
1824 2007-03-04  Bruno Haible  <bruno@clisp.org>
1825
1826         * lib/vasprintf.h: Update #if logic for the case when the functions
1827         exist but are overridden.
1828
1829 2007-03-04  Bruno Haible  <bruno@clisp.org>
1830
1831         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
1832         implementations: glibc-2.4 and MacOS X 10.3.
1833         * tests/test-vasnprintf-posix.c (test_function): Test also the case
1834         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
1835         * tests/test-vasprintf-posix.c (test_function): Likewise.
1836
1837 2007-03-04  Bruno Haible  <bruno@clisp.org>
1838
1839         * modules/vasprintf-posix-tests: New file.
1840         * tests/test-vasprintf-posix.c: New file.
1841
1842         * modules/vasprintf-posix: New file.
1843         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
1844         defined.
1845         * m4/vasprintf-posix.m4: New file.
1846         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
1847         gl_FUNC_VASPRINTF.
1848         (gl_FUNC_VASPRINTF): Invoke it.
1849         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
1850         here.
1851         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
1852
1853 2007-03-04  Bruno Haible  <bruno@clisp.org>
1854
1855         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
1856         REPLACE_GETTIMEOFDAY.
1857         * modules/sys_time (Makefile.am): Likewise.
1858         * m4/sys_time_h.m4: Likewise.
1859         * m4/gettimeofday.m4: Likewise.
1860
1861 2007-03-04  Bruno Haible  <bruno@clisp.org>
1862
1863         * modules/vasnprintf-posix-tests: New file.
1864         * tests/test-vasnprintf-posix.c: New file.
1865
1866         * modules/vasnprintf-posix: New file.
1867         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
1868         printf-frexpl.h.
1869         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
1870         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
1871         REPLACE_VASNPRINTF is defined.
1872         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
1873         gl_FUNC_VASNPRINTF.
1874         (gl_FUNC_VASNPRINTF): Invoke it.
1875         * m4/vasnprintf-posix.m4: New file.
1876         * m4/printf.m4: New file.
1877
1878 2007-03-04  Bruno Haible  <bruno@clisp.org>
1879
1880         Compile progreloc.c only if --enable-relocatable is specified.
1881         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
1882         if --enable-relocatable was specified.
1883         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
1884         lib_SOURCES.
1885
1886 2007-03-04  Jim Meyering  <jim@meyering.net>
1887
1888         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
1889         Use it consistently, rather than enumerating errno constants.
1890
1891 2007-03-04  Bruno Haible  <bruno@clisp.org>
1892
1893         * modules/xvasprintf-tests: New file.
1894         * tests/test-xvasprintf.c: New file.
1895
1896         * modules/vasprintf-tests: New file.
1897         * tests/test-vasprintf.c: New file.
1898
1899         * modules/vasnprintf-tests: New file.
1900         * tests/test-vasnprintf.c: New file.
1901
1902         * modules/vsnprintf-tests: New file.
1903         * tests/test-vsnprintf.c: New file.
1904
1905         * modules/snprintf-tests: New file.
1906         * tests/test-snprintf.c: New file.
1907
1908 2007-03-04  Bruno Haible  <bruno@clisp.org>
1909
1910         Compile relocatable.c only if --enable-relocatable is specified.
1911         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
1912         gl_RELOCATABLE_LIBRARY.
1913         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
1914         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
1915         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
1916         gl_RELOCATABLE_LIBRARY.
1917         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
1918         (Makefile.am): Remove lib_SOURCES.
1919         * modules/relocatable-lib-lgpl (configure.ac): Invoke
1920         gl_RELOCATABLE_LIBRARY.
1921         (Makefile.am): Remove lib_SOURCES.
1922         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
1923         always.
1924         * modules/relocatable-prog-wrapper (configure.ac): Invoke
1925         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
1926
1927 2007-03-04  Bruno Haible  <bruno@clisp.org>
1928
1929         * modules/argmatch-tests: New file.
1930         * tests/test-argmatch.c: New file.
1931
1932         * tests/test-allocsa.c (main): Halve the number of loop runs.
1933
1934         * modules/alloca-opt-tests: New file.
1935         * tests/test-alloca-opt.c: New file.
1936
1937 2007-03-04  Jim Meyering  <jim@meyering.net>
1938
1939         Work around difference between Linux ACLs and Solaris 10 ZFS.
1940         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
1941         for EINVAL.
1942
1943 2007-03-03  Bruno Haible  <bruno@clisp.org>
1944
1945         * modules/relocatable-prog (Depends-on): Add back progreloc's
1946         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
1947
1948 2007-03-03  Bruno Haible  <bruno@clisp.org>
1949
1950         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
1951         * modules/relocatable-lib: New file.
1952
1953 2007-03-03  Bruno Haible  <bruno@clisp.org>
1954
1955         * modules/relocatable-prog: Renamed from modules/relocatable.
1956         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
1957
1958 2007-03-03  Bruno Haible  <bruno@clisp.org>
1959
1960         * modules/relocatable-script (Files): Add doc/relocatable.texi,
1961         m4/relocatable-lib.m4.
1962         (Depends-on): Remove 'relocatable'.
1963         (configure.ac): Add gl_RELOCATABLE_NOP.
1964
1965 2007-03-03  Bruno Haible  <bruno@clisp.org>
1966
1967         * modules/relocatable-prog-wrapper: New file.
1968         * modules/relocatable (Depends-on): Add it. Remove all other
1969         dependencies except progname.
1970         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
1971
1972         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
1973         (gl_FUNC_STRERROR): Nop.
1974         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
1975
1976         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
1977         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
1978
1979         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
1980         (gl_FUNC_READLINK): Update.
1981
1982         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
1983
1984 2007-03-03  Bruno Haible  <bruno@clisp.org>
1985
1986         * lib/xreadlink.c: Include <unistd.h> unconditionally.
1987         * modules/xreadlink (Depends-on): Add unistd.
1988         * modules/xreadlink-with-size (Depends-on): Likewise.
1989
1990 2007-03-03  Bruno Haible  <bruno@clisp.org>
1991
1992         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
1993         extracted from gt_FUNC_SETENV.
1994         (gt_FUNC_SETENV): Remove macro.
1995         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
1996         remove gt_FUNC_SETENV.
1997
1998 2007-03-03  Bruno Haible  <bruno@clisp.org>
1999
2000         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
2001         ENABLE_RELOCATABLE here.
2002         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
2003
2004 2007-03-03  Bruno Haible  <bruno@clisp.org>
2005
2006         * modules/rbtreehash-list-tests (Depends-on): Add progname.
2007         * tests/test-rbtreehash_list.c: Include progname.h.
2008         (main): Call set_program_name.
2009
2010         * modules/rbtree-oset-tests (Depends-on): Add progname.
2011         * tests/test-rbtree_oset.c: Include progname.h.
2012         (main): Call set_program_name.
2013
2014         * modules/rbtree-list-tests (Depends-on): Add progname.
2015         * tests/test-rbtree_list.c: Include progname.h.
2016         (main): Call set_program_name.
2017
2018         * modules/linked-list-tests (Depends-on): Add progname.
2019         * tests/test-linked_list.c: Include progname.h.
2020         (main): Call set_program_name.
2021
2022 2007-03-03  Bruno Haible  <bruno@clisp.org>
2023
2024         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
2025         All uses of __restrict changed to _Restrict_.
2026         * lib/glob_.h (__restrict): Remove macro.
2027
2028 2007-03-02  Bruno Haible  <bruno@clisp.org>
2029
2030         * modules/gettext (configure.ac): Require gettext infrastructure
2031         from version 0.16.1.
2032
2033 2007-03-02  Bruno Haible  <bruno@clisp.org>
2034
2035         * modules/linkedhash-list-tests (Depends-on): Add progname.
2036         * tests/test-linkedhash_list.c: Include progname.h.
2037         (main): Call set_program_name.
2038
2039         * modules/carray-list-tests (Depends-on): Add progname.
2040         * tests/test-carray_list.c: Include progname.h.
2041         (main): Call set_program_name.
2042
2043         * modules/avltreehash-list-tests (Depends-on): Add progname.
2044         * tests/test-avltreehash_list.c: Include progname.h.
2045         (main): Call set_program_name.
2046
2047         * modules/avltree-oset-tests (Depends-on): Add progname.
2048         * tests/test-avltree_oset.c: Include progname.h.
2049         (main): Call set_program_name.
2050
2051         * modules/avltree-list-tests (Depends-on): Add progname.
2052         * tests/test-avltree_list.c: Include progname.h.
2053         (main): Call set_program_name.
2054
2055         * modules/array-oset-tests (Depends-on): Add progname.
2056         * tests/test-array_oset.c: Include progname.h.
2057         (main): Call set_program_name.
2058
2059         * modules/array-list-tests (Depends-on): Add progname.
2060         * tests/test-array_list.c: Include progname.h.
2061         (main): Call set_program_name.
2062
2063         * modules/argp-tests (Depends-on): Add progname.
2064         * tests/test-argp.c: Include argp.h first. Include progname.h.
2065         (main): Call set_program_name.
2066
2067 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
2068
2069         * doc/gnulib-tool.texi (Initial import): Reword description of
2070         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
2071         limited effect even if defined after the first system include.
2072
2073 2007-03-01  Bruno Haible  <bruno@clisp.org>
2074
2075         * build-aux/config.libpath: Update to libtool-1.5.22.
2076         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
2077
2078 2007-03-01  Bruno Haible  <bruno@clisp.org>
2079
2080         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
2081         foo_CFLAGS.
2082         Reported by Ralf Wildenhues.
2083
2084 2007-03-01  Bruno Haible  <bruno@clisp.org>
2085
2086         * build-aux/install-reloc: Remove object files left over by some
2087         compilers.
2088         Reported by Ralf Wildenhues.
2089
2090 2007-03-01  Bruno Haible  <bruno@clisp.org>
2091
2092         * build-aux/install-reloc: Break long lines.
2093
2094 2007-03-01  Bruno Haible  <bruno@clisp.org>
2095
2096         * doc/relocatable.texi: Document that it may not work on OpenBSD.
2097         Reported by Ralf Wildenhues.
2098
2099 2007-03-01  Bruno Haible  <bruno@clisp.org>
2100
2101         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
2102         include ordering constraints.
2103
2104 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
2105
2106         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
2107         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
2108         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
2109         as another example.
2110         * lib/time_.h: Fix misspelling.
2111         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2112         Require gl_HEADER_TIME_H_DEFAULTS.
2113         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
2114         * m4/time_r.m4 (gl_TIME_R): Likewise.
2115         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
2116
2117 2007-03-01  Bruno Haible  <bruno@clisp.org>
2118
2119         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
2120         * m4/utimens.m4 (gl_UTIMENS): Likewise.
2121
2122 2007-03-01  Jim Meyering  <jim@meyering.net>
2123
2124         * modules/xreadlink (Maintainer): Add my name.
2125         * modules/xreadlink-with-size (Depends-on): Alphabetize.
2126
2127 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
2128             Bruno Haible  <bruno@clisp.org>
2129
2130         * build-aux/install-reloc: Compile also c-ctype.c.
2131         * build-aux/relocatable.sh.in: New file.
2132         * doc/relocatable.texi: New file.
2133         * doc/relocatable-maint.texi: New file.
2134         * doc/gnulib.texi: Include relocatable-maint.texi.
2135         * lib/progreloc.c: Include unistd.h unconditionally.
2136         * lib/relocwrapper.c: Include unistd.h unconditionally.
2137         Include c-ctype.h.
2138         (add_dotbin): Use c_tolower.
2139         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
2140         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
2141         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
2142         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
2143         to m4/relocatable-lib.m4.
2144         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
2145         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
2146         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
2147         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
2148         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
2149         * modules/relocatable: New file.
2150         * modules/relocatable-lib: New file.
2151         * modules/relocatable-script: New file.
2152
2153 2007-02-28  Bruno Haible  <bruno@clisp.org>
2154
2155         Import --enable-relocatable infrastructure.
2156         * build-aux/config.libpath: New file, from GNU gettext.
2157         * build-aux/install-reloc: New file, from GNU gettext.
2158         * build-aux/reloc-ldflags: New file, from GNU gettext.
2159         * lib/relocatable.h: New file, from GNU gettext.
2160         * lib/relocatable.c: New file, from GNU gettext.
2161         * lib/relocwrapper.c: New file, from GNU gettext.
2162         * m4/relocatable.m4: New file, from GNU gettext.
2163
2164 2007-02-28  Bruno Haible  <bruno@clisp.org>
2165
2166         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
2167
2168         * modules/xreadlink: New file, from GNU gettext with modifications.
2169         * lib/xreadlink.c: New file, from GNU gettext.
2170         * lib/xreadlink.h: Add comments.
2171         (xreadlink): New declaration.
2172
2173         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
2174         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
2175         lib/xreadlink-with-size.c.
2176         (configure.ac): Remove gl_XREADLINK invocation.
2177         (Makefile.am): Augment lib_SOURCES.
2178         * m4/xreadlink.m4: Remove file.
2179         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
2180         (xreadlink_with_size): Renamed from xreadink.
2181         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
2182         * modules/canonicalize (Depends-on): Replace xreadlink with
2183         xreadlink-with-size.
2184         * lib/canonicalize.c (canonicalize_filename_mode): Update.
2185
2186 2007-02-25  Jim Meyering  <jim@meyering.net>
2187
2188         * build-aux/announce-gen: When complaining about excess arguments,
2189         list them.
2190
2191 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
2192
2193         * README: Document signed integer overflow situation more
2194         accurately.
2195
2196 2007-02-25  Bruno Haible  <bruno@clisp.org>
2197
2198         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
2199         'a' or 'A' conversion.
2200
2201 2007-02-25  Bruno Haible  <bruno@clisp.org>
2202
2203         * modules/filename: Renamed from modules/pathname.
2204         (Files): Replace lib/pathname.h with lib/filename.h. Replace
2205         lib/concatpath.c with lib/concat-filename.c.
2206         (Makefile.am): Update.
2207         (Include): Replace pathname.h with filename.h.
2208         * lib/filename.h: Renamed from lib/pathname.h.
2209         (concatenated_filename): Renamed from concatenated_pathname.
2210         * lib/concat-filename.c: Renamed from lib/concatpath.c.
2211         (concatenated_filename): Renamed from concatenated_pathname.
2212         * lib/findprog.c: Include filename.h instead of pathname.h.
2213         (find_in_path): Update.
2214         * lib/javacomp.c: Include filename.h instead of pathname.h.
2215         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
2216         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
2217         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
2218         is_oldgcj_14_13_usable, is_javac_usable): Update.
2219         * lib/javaexec.c: Include filename.h instead of pathname.h.
2220         (execute_java_class): Update.
2221         * modules/findprog: Update.
2222         * modules/javacomp: Update.
2223         * modules/javaexec: Update.
2224         * MODULES.html.sh (File system functions): Add 'filename', remove
2225         'pathname'.
2226
2227 2007-02-25  Bruno Haible  <bruno@clisp.org>
2228
2229         * modules/printf-frexpl-tests: New file.
2230         * tests/test-printf-frexpl.c: New file.
2231
2232         * modules/printf-frexpl: New file.
2233         * lib/printf-frexpl.h: New file.
2234         * lib/printf-frexpl.c: New file.
2235         * m4/printf-frexpl.m4: New file.
2236
2237 2007-02-25  Bruno Haible  <bruno@clisp.org>
2238
2239         * modules/printf-frexp-tests: New file.
2240         * tests/test-printf-frexp.c: New file.
2241
2242         * modules/printf-frexp: New file.
2243         * lib/printf-frexp.h: New file.
2244         * lib/printf-frexp.c: New file.
2245         * m4/printf-frexp.m4: New file.
2246
2247 2007-02-25  Bruno Haible  <bruno@clisp.org>
2248
2249         Assume automake >= 1.10 for the tests.
2250         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
2251         * modules/arctwo-tests: Likewise.
2252         * modules/argp-tests: Likewise.
2253         * modules/avltree-list-tests: Likewise.
2254         * modules/avltree-oset-tests: Likewise.
2255         * modules/avltreehash-list-tests: Likewise.
2256         * modules/carray-list-tests: Likewise.
2257         * modules/crc-tests: Likewise.
2258         * modules/des-tests: Likewise.
2259         * modules/gc-arcfour-tests: Likewise.
2260         * modules/gc-arctwo-tests: Likewise.
2261         * modules/gc-des-tests: Likewise.
2262         * modules/gc-hmac-md5-tests: Likewise.
2263         * modules/gc-hmac-sha1-tests: Likewise.
2264         * modules/gc-md2-tests: Likewise.
2265         * modules/gc-md4-tests: Likewise.
2266         * modules/gc-md5-tests: Likewise.
2267         * modules/gc-pbkdf2-sha1-tests: Likewise.
2268         * modules/gc-rijndael-tests: Likewise.
2269         * modules/gc-sha1-tests: Likewise.
2270         * modules/gc-tests: Likewise.
2271         * modules/getaddrinfo-tests: Likewise.
2272         * modules/hmac-md5-tests: Likewise.
2273         * modules/hmac-sha1-tests: Likewise.
2274         * modules/linked-list-tests: Likewise.
2275         * modules/linkedhash-list-tests: Likewise.
2276         * modules/lock-tests: Likewise.
2277         * modules/md2-tests: Likewise.
2278         * modules/md4-tests: Likewise.
2279         * modules/md5-tests: Likewise.
2280         * modules/rbtree-list-tests: Likewise.
2281         * modules/rbtree-oset-tests: Likewise.
2282         * modules/rbtreehash-list-tests: Likewise.
2283         * modules/read-file-tests: Likewise.
2284         * modules/rijndael-tests: Likewise.
2285         * modules/stdint-tests: Likewise.
2286         * modules/tls-tests: Likewise.
2287
2288 2007-02-24  Bruno Haible  <bruno@clisp.org>
2289
2290         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
2291         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
2292         function; instead check whether isnan with a double argument links.
2293         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
2294         function; instead check whether isnan with a 'long double' argument
2295         links.
2296         Reported by Eric Blake <ebb9@byu.net>.
2297
2298 2007-02-24  Bruno Haible  <bruno@clisp.org>
2299
2300         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
2301         defined.
2302         * lib/isnanl.c: Remove all code. Just include isnan.c.
2303         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
2304
2305 2007-02-25  Jim Meyering  <jim@meyering.net>
2306
2307         Avoid conflicting types for 'unsetenv' on FreeBSD.
2308         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
2309         conflicting with FreeBSD's (5.0 and 6.1) function declaration
2310         in stdlib.h.
2311
2312 2007-02-24  Bruno Haible  <bruno@clisp.org>
2313
2314         * modules/isnanl-nolibm-tests: New file.
2315         * tests/test-isnanl.c: New file.
2316
2317         * modules/isnanl-nolibm: New file.
2318         * lib/isnanl.h: New file.
2319         * lib/isnanl.c: New file.
2320         * m4/isnanl.m4: New file.
2321
2322 2007-02-24  Bruno Haible  <bruno@clisp.org>
2323
2324         * modules/isnan-nolibm-tests: New file.
2325         * tests/test-isnan.c: New file.
2326
2327         * modules/isnan-nolibm: New file.
2328         * lib/isnan.h: New file.
2329         * lib/isnan.c: New file.
2330         * m4/isnan.m4: New file.
2331
2332 2007-02-24  Bruno Haible  <bruno@clisp.org>
2333
2334         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
2335         assume that an exponent fits in 20 bits.
2336
2337 2007-02-24  Jim Meyering  <jim@meyering.net>
2338
2339         * m4/regex.m4: Update the description of the configure-time option,
2340         --without-included-regex, to state accurately what the defaults are,
2341         and perhaps to give people an idea why using this option is risky.
2342
2343 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
2344
2345         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
2346         loops on small arguments.  This attempts to avoid the problem
2347         Bruno Haible reported for AIX 4.3.2 in
2348         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
2349
2350 2007-02-23  Bruno Haible  <bruno@clisp.org>
2351
2352         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
2353         Needed for help2man.
2354
2355 2007-02-23  Karl Berry  <karl@gnu.org>
2356
2357         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
2358         exists, foo.h should be cvs-ignored, not committed.
2359
2360 2007-02-23  Eric Blake  <ebb9@byu.net>
2361
2362         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
2363         * lib/stat-time.h (includes): Likewise.
2364         * lib/utimecmp.c (includes): Likewise.
2365         * lib/utimens.h (includes): Likewise.
2366         * lib/getdate.y (includes): Also include "timespec.h" for use
2367         internal to the module.
2368         * modules/utimens (Depends-on): Revert yesterday's patch.
2369         * modules/nanosleep (Depends-on): Add missing dependency.
2370
2371 2007-02-22  Bruno Haible  <bruno@clisp.org>
2372
2373         * lib/glob.c: Don't include getlogin_r.h.
2374
2375 2007-02-22  Jim Meyering  <jim@meyering.net>
2376
2377         * modules/utimens (Depends-on): Add timespec, required for
2378         utimens.h's inclusion of timespec.h.
2379
2380 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
2381
2382         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
2383         long unreadable paths in GNU/Linux.  Problem reported by Andreas
2384         Schwab in
2385         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
2386         I'll try to think of a better way to fix the Solaris problem.
2387
2388         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
2389         like glibc; on Solaris 10, it fails with errno == EINVAL.
2390         POSIX says the behavior is unspecified if the first argument is NULL,
2391         so play it safe and never pass NULL to the system getcwd.
2392
2393 2007-02-21  Jim Meyering  <jim@meyering.net>
2394
2395         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
2396         of gettimeofday.  It would conflict with the one now always
2397         provided via sys_time_.h.  Reported by Matthew Woehlke, as
2398         an IRIX 6.5 build failure.
2399
2400 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
2401
2402         Minor fixups to port to Solaris 10 with Sun C 5.8.
2403         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
2404         * modules/getcwd (Depends-on): Add dirfd.
2405         * lib/putenv.c (putenv): #undef it.
2406         (rpl_putenv): New decl.
2407         (malloc, free): Include <stdlib.h> rather than prototyping separately.
2408
2409 2007-02-20  Bruno Haible  <bruno@clisp.org>
2410
2411         * modules/stdio-tests: New file.
2412         * tests/test-stdio.c: New file.
2413
2414         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
2415         (Depends-on): Add stdio.
2416         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
2417         (Include): Use <stdio.h> instead of vsnprintf.h.
2418         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
2419         HAVE_DECL_VSNPRINTF.
2420         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
2421
2422         * modules/snprintf (Files): Remove lib/snprintf.h.
2423         (Depends-on): Add stdio.
2424         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
2425         (Include): Use <stdio.h> instead of snprintf.h.
2426         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
2427         HAVE_DECL_SNPRINTF.
2428         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
2429         * lib/getaddrinfo.c: Likewise.
2430
2431         * modules/stdio: New file.
2432         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
2433         * lib/snprintf.h: Remove file.
2434         * lib/vsnprintf.h: Remove file.
2435         * lib/.cppi-disable: Remove snprintf.h.
2436         * m4/stdio_h.m4: New file.
2437         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
2438
2439 2007-02-20  Jim Meyering  <jim@meyering.net>
2440
2441         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
2442         used by e.g., mingw.  From Bruno Haible.
2443
2444 2007-02-19  Bruno Haible  <bruno@clisp.org>
2445
2446         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
2447         warnings.
2448         Reported by Ben Pfaff <blp@cs.stanford.edu>.
2449
2450 2007-02-19  Bruno Haible  <bruno@clisp.org>
2451
2452         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
2453         from mingw users.
2454
2455 2007-02-19  Bruno Haible  <bruno@clisp.org>
2456
2457         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
2458         warnings.
2459         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
2460
2461 2007-02-19  Jim Meyering  <jim@meyering.net>
2462
2463         Don't use FD after a successful "fdopendir (fd)".
2464         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
2465         Reset it by calling dirfd on the just-obtained DIR*.
2466
2467         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
2468         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
2469
2470 2007-02-18  Bruno Haible  <bruno@clisp.org>
2471
2472         * lib/readlink.c: Include <unistd.h>.
2473         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
2474         HAVE_READLINK.
2475         * modules/readlink (Depends-on): Add unistd.
2476         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2477         (Include): Add <unistd.h>.
2478
2479         * lib/getlogin_r.h: Remove file.
2480         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
2481         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
2482         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
2483         HAVE_DECL_GETLOGIN_R.
2484         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
2485         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2486         (Include): Use <unistd.h> instead of getlogin_r.h.
2487
2488         * lib/getcwd.h: Remove file.
2489         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
2490         * lib/xgetcwd.c: Likewise.
2491         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
2492         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
2493         * modules/getcwd (Files): Remove lib/getcwd.h.
2494         (Depends-on): Add unistd.
2495         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2496         (Include): Use <unistd.h> instad of getcwd.h.
2497
2498         * lib/ftruncate.c: Include <unistd.h> first.
2499         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
2500         Set HAVE_FTRUNCATE.
2501         * modules/ftruncate (Depends-on): Add unistd.
2502         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2503
2504         * lib/fchdir.c: Include <unistd.h> first.
2505         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
2506         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
2507         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
2508         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2509         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
2510
2511         * lib/dup2.c: Include <unistd.h> first.
2512         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
2513         HAVE_DUP2.
2514         * modules/dup2 (Depends-on): Add unistd.
2515         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2516
2517         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
2518         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
2519         REPLACE_CHOWN. Don't define chown as a macro here.
2520         * modules/chown (Depends-on): Add unistd.
2521         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
2522
2523         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
2524         Add definition for GL_LINK_WARNING.
2525         (chown, dup2): New declarations.
2526         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
2527         link warning.
2528         (ftruncate): New declaration.
2529         (getcwd): New declaration, taken from old getcwd.h.
2530         (getlogin_r): New declaration, taken from old getlogin_r.h.
2531         (readlink): New declaration.
2532         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
2533         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
2534         (gl_PREREQ_UNISTD): Remove macro.
2535         (gl_UNISTD_MODULE_INDICATOR): New macro.
2536         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
2537         many new variables. Don't set UNISTD_H.
2538         * modules/unistd (Description): Change.
2539         (Depends-on): Add link-warning.
2540         (configure.ac): Update.
2541         (Makefile.am): Create unistd.h always. Substitute many new variables
2542         into it.
2543
2544 2007-02-18  Bruno Haible  <bruno@clisp.org>
2545
2546         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
2547         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
2548         HAVE_GETSUBOPT.
2549         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
2550         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
2551         * lib/getsubopt.h: Remove file.
2552         * modules/getsubopt (Files): Remove lib/getsubopt.h.
2553         (Depends-on): Add stdlib.
2554         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2555         (Includes): Use <stdlib.h> instead of getsubopt.h.
2556         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
2557         Set HAVE_GETSUBOPT.
2558         * lib/getsubopt.c: Don't include getsubopt.h.
2559
2560 2007-02-18  Bruno Haible  <bruno@clisp.org>
2561
2562         * modules/fchdir (Depends-on): Add dup2.
2563
2564 2007-02-18  Bruno Haible  <bruno@clisp.org>
2565
2566         * lib/stdlib_.h: Handle glibc's special invocation convention
2567         specially.
2568
2569 2007-02-18  Bruno Haible  <bruno@clisp.org>
2570
2571         * modules/stdlib-tests: New file.
2572         * tests/test-stdlib.c: New file.
2573
2574         * modules/mkstemp (Files): Remove lib/mkstemp.h.
2575         (Depends-on): Add stdlib.
2576         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2577         (Includes): Use <stdlib.h> instead of mkstemp.h.
2578         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
2579         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
2580         * lib/mkstemp.c: Don't include mkstemp.h.
2581         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
2582         * lib/stdlib--.h: Don't include mkstemp.h.
2583
2584         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
2585         (Depends-on): Add stdlib.
2586         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
2587         (Includes): Use <stdlib.h> instead of mkdtemp.h.
2588         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
2589         HAVE_MKDTEMP.
2590         * lib/mkdtemp.c: Don't include mkdtemp.h.
2591         * lib/clean-temp.c: Don't include mkdtemp.h.
2592
2593         * modules/exit (Files): Remove lib/exit.h.
2594         (Depends-on): Add stdlib.
2595         (Makefile.am): Remove lib_SOURCES.
2596         (Include): Use <stdlib.h> instead of exit.h.
2597         * lib/argmatch.c: Don't include exit.h.
2598         * lib/execute.c: Likewise.
2599         * lib/pagealign_alloc.c: Likewise.
2600         * lib/pipe.c: Likewise.
2601         * lib/wait-process.c: Likewise.
2602         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
2603         * lib/exitfail.c: Likewise.
2604         * lib/savewd.c: Likewise.
2605         * lib/xsetenv.c: Likewise.
2606
2607         * modules/stdlib: New file.
2608         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
2609         and extra comments about mkstemp().
2610         * lib/exit.h: Remove file.
2611         * lib/mkdtemp.h: Remove file.
2612         * lib/mkstemp.h: Remove file.
2613         * m4/stdlib_h.m4: New file.
2614         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
2615
2616 2007-02-18  Bruno Haible  <bruno@clisp.org>
2617
2618         * modules/math-tests: New file.
2619         * tests/test-math.c: New file.
2620
2621         * modules/math: New file.
2622         * modules/mathl (Files): Remove lib/mathl.h.
2623         (Depends-on): Add math.
2624         (Makefile.am): Don't mention mathl.h.
2625         (Include): Use <math.h> instead of mathl.h.
2626         * lib/math_.h: New file.
2627         * lib/mathl.h: Remove file.
2628         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
2629         mathl.h.
2630         * lib/asinl.c: Likewise.
2631         * lib/atanl.c: Likewise.
2632         * lib/ceill.c: Likewise.
2633         * lib/cosl.c: Likewise.
2634         * lib/expl.c: Likewise.
2635         * lib/floorl.c: Likewise.
2636         * lib/frexpl.c: Likewise.
2637         * lib/ldexpl.c: Likewise.
2638         * lib/logl.c: Likewise.
2639         * lib/sincosl.c: Likewise.
2640         * lib/sinl.c: Likewise.
2641         * lib/sqrtl.c: Likewise.
2642         * lib/tanl.c: Likewise.
2643         * lib/trigl.c: Likewise.
2644         * m4/math_h.m4: New file.
2645         * MODULES.html.sh (Mathematics): Add math.
2646
2647 2007-02-17  Bruno Haible  <bruno@clisp.org>
2648
2649         * modules/wctype-tests: New file.
2650         * tests/test-wctype.c: New file.
2651
2652         * modules/wchar-tests: New file.
2653         * tests/test-wchar.c: New file.
2654
2655         * modules/unistd-tests: New file.
2656         * tests/test-unistd.c: New file.
2657
2658         * modules/time-tests: New file.
2659         * tests/test-time.c: New file.
2660
2661         * modules/sysexits-tests: New file.
2662         * tests/test-sysexits.c: New file.
2663
2664         * modules/sys_time-tests: New file.
2665         * tests/test-sys_time.c: New file.
2666
2667         * modules/sys_stat-tests: New file.
2668         * tests/test-sys_stat.c: New file.
2669
2670         * modules/sys_socket-tests: New file.
2671         * tests/test-sys_socket.c: New file.
2672
2673         * modules/sys_select-tests: New file.
2674         * tests/test-sys_select.c: New file.
2675
2676         * modules/string-tests: New file.
2677         * tests/test-string.c: New file.
2678
2679         * modules/stdbool-tests: New file.
2680         * tests/test-stdbool.c: New file.
2681
2682         * modules/netinet_in-tests: New file.
2683         * tests/test-netinet_in.c: New file.
2684
2685         * modules/inttypes-tests: New file.
2686         * tests/test-inttypes.c: New file.
2687
2688         * modules/fcntl-tests: New file.
2689         * tests/test-fcntl.c: New file.
2690
2691         * modules/byteswap-tests: New file.
2692         * tests/test-byteswap.c: New file.
2693
2694         * modules/arpa_inet-tests: New file.
2695         * tests/test-arpa_inet.c: New file.
2696
2697 2007-02-17  Bruno Haible  <bruno@clisp.org>
2698
2699         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
2700         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
2701         if the corresponding module is not enabled. Emit link warnings if
2702         the function is used nevertheless.
2703         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
2704         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
2705         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
2706         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
2707         * modules/inttypes (Depends-on): Add link-warning.
2708         (Makefile.am): Copy the contents of build-aux/link-warning.h into
2709         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
2710         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
2711         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
2712         * modules/imaxdiv (configure.ac): Likewise.
2713         * modules/strtoimax (configure.ac): Likewise.
2714         * modules/strtoumax (configure.ac): Likewise.
2715
2716 2007-02-17  Bruno Haible  <bruno@clisp.org>
2717
2718         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
2719         gl_STRING_MODULE_INDICATOR_DEFAULTS.
2720         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
2721         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
2722
2723 2007-02-17  Bruno Haible  <bruno@clisp.org>
2724
2725         * modules/link-warning: New file.
2726         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
2727         * lib/string_.h (GL_LINK_WARNING): Remove definition.
2728         * modules/string (Depends-on): Add link-warning.
2729         (Makefile.am): Copy the contents of build-aux/link-warning.h into
2730         string.h.
2731         * MODULES.html.sh (Support for building libraries and executables): Add
2732         link-warning.
2733
2734 2007-02-17  Bruno Haible  <bruno@clisp.org>
2735
2736         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
2737         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
2738         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
2739         long lines.
2740
2741 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
2742             Bruno Haible  <bruno@clisp.org>
2743
2744         * modules/tmpfile: New file.
2745         * lib/tmpfile.c: New file.
2746         * m4/tmpfile.m4: New file.
2747         * MODULES.html.sh (func_all_modules): New section "Input/output".
2748
2749 2007-02-15  Bruno Haible  <bruno@clisp.org>
2750
2751         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
2752         (supports_delete_on_close): New function.
2753         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
2754
2755 2007-02-14  Bruno Haible  <bruno@clisp.org>
2756
2757         * modules/mbspcasecmp-tests: New file.
2758         * tests/test-mbspcasecmp.sh: New file.
2759         * tests/test-mbspcasecmp.c: New file.
2760
2761         New module mbspcasecmp.
2762         * modules/mbspcasecmp: New file.
2763         * lib/mbspcasecmp.c: New file.
2764         * lib/string_.h (strncasecmp): Change warning message.
2765         (mbspcasecmp): New declaration.
2766         * m4/mbspcasecmp.m4: New file.
2767         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2768         GNULIB_MBSPCASECMP.
2769         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
2770         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
2771
2772 2007-02-14  Bruno Haible  <bruno@clisp.org>
2773
2774         * modules/mbsncasecmp-tests: New file.
2775         * tests/test-mbsncasecmp.sh: New file.
2776         * tests/test-mbsncasecmp.c: New file.
2777
2778         New module mbsncasecmp.
2779         * modules/mbsncasecmp: New file.
2780         * lib/mbsncasecmp.c: New file.
2781         * lib/string_.h (mbsncasecmp): New declaration.
2782         * m4/mbsncasecmp.m4: New file.
2783         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2784         GNULIB_MBSNCASECMP.
2785         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
2786         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
2787
2788 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
2789
2790         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
2791         Verify that it doesn't overlap with our flags.
2792         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
2793         do not have the desired effect in multibyte locales; instead, use
2794         mbscasecmp.
2795         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
2796         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
2797         we don't require GNU fnmatch ourselves (if our users require it, they
2798         should do so explicitly).
2799
2800         Fix regex code so it doesn't rely on strcasecmp.
2801         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
2802         Otherwise, include gnulib's langinfo.h.
2803         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
2804         undesirable behavior in non-C locales.  Instead, rely on localecharset.
2805         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
2806         * modules/regex (FILES): Remove m4/codeset.m4.
2807         (Depends-on): Add localcharset.  Remove strcase.
2808
2809 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2810
2811         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
2812         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
2813
2814 2007-02-13  Bruno Haible  <bruno@clisp.org>
2815
2816         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
2817         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2818
2819 2007-02-12  Bruno Haible  <bruno@clisp.org>
2820
2821         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
2822         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
2823         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
2824         time warning rather than a link error.
2825
2826 2007-02-12  Bruno Haible  <bruno@clisp.org>
2827
2828         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
2829         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
2830         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2831
2832 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
2833
2834         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
2835         args, not 2.
2836
2837 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
2838
2839         New module 'time', so that apps can include <time.h> as per
2840         POSIX and GNU instead of separate include files like time_r.h
2841         and timegm.h.  This implementation tries out a simpler approach
2842         for replacing decls in standard include files (as compared to
2843         the string module), somewhat as an experiment.
2844
2845         * config/srclist.txt: Comment out mktime.c for now.
2846         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
2847         since it doesn't apply any more.  Use generic wording instead.
2848         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
2849         'time'.
2850         * lib/time_.h, m4/time_h.m4, modules/time: New files.
2851         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
2852         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
2853         Don't include <sys/types.h>; no longer needed since we assume C89.
2854         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
2855         * lib/strftime.c: Likewise.
2856         * lib/time_r.c: Likewise.
2857         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
2858         * lib/nanosleep.c: Include <time.h> first, to check interface.
2859         * lib/strptime.c: Likewise.
2860         * lib/time_r.c: Likewise.
2861         * lib/timegm.c: Likewise.
2862         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
2863         needed.
2864         * lib/timegm.c: Don't include timegm.h; no longer needed.
2865         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
2866         time.h now handles any problems in that area.
2867         (struct timespec, nanosleep): Remove; time.h now arranges for these.
2868         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
2869         that time.h defines struct timespec.
2870         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
2871         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
2872         handles that.
2873         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
2874         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
2875         needed.  Set REPLACE_LOCALTIME.
2876         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
2877         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
2878         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
2879         nanosleep; time_h.m4 now does that.  Don't require
2880         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
2881         module handles this now.
2882         * modules/getdate (Depends-on): Remove timespec.  Add time.
2883         * modules/nanosleep (Depends-on): Likewise.
2884         * modules/stat-time (Depends-on): Likewise.
2885         * modules/nanosleep (Include): Include time.h, not timespec.h.
2886         * modules/strptime (Files): Remove lib/strptime.h.
2887         (Depends-on): Add extensions, time.
2888         (Include): Include time.h, not strptime.h.
2889         * modules/time_r (Files): Remove lib/time_r.h.
2890         (Depends-on): Add time.
2891         (Include): Include time.h, not time_r.h.
2892         * modules/timegm: Likewise.
2893         * modules/timespec (Description): Now does timespec-related decls
2894         of our own, instead of struct timespec itself.
2895         (Depends-on): Add time; remove extensions.
2896         (Maintainer): Add self.
2897         * modules/utimecmp (Depends-on): Add time; remove timespec.
2898         * modules/utimens (Depends-on): Likewise.
2899         * modules/xnanosleep (Depends-on): Likewise.
2900
2901 2007-02-11  Bruno Haible  <bruno@clisp.org>
2902
2903         * lib/c-strstr.c: Include allocsa.h.
2904         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2905         * lib/c-strcasestr.c: Include allocsa.h.
2906         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2907         * lib/strcasestr.c: Include allocsa.h.
2908         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
2909         * lib/mbsstr.c: Include allocsa.h.
2910         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
2911         allocsa/freesa instead of malloc/free.
2912         * lib/mbscasestr.c: Include allocsa.h.
2913         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
2914         allocsa/freesa instead of malloc/free.
2915         * modules/c-strstr (Depends-on): Add allocsa.
2916         * modules/c-strcasestr (Depends-on): Likewise.
2917         * modules/strcasestr (Depends-on): Likewise.
2918         * modules/mbsstr (Depends-on): Likewise.
2919         * modules/mbscasestr (Depends-on): Likewise.
2920
2921 2007-02-11  Bruno Haible  <bruno@clisp.org>
2922
2923         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
2924
2925         * modules/mbsspn-tests: New file.
2926         * tests/test-mbsspn.sh: New file.
2927         * tests/test-mbsspn.c: New file.
2928
2929 2007-02-11  Bruno Haible  <bruno@clisp.org>
2930
2931         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
2932
2933         * modules/mbspbrk-tests: New file.
2934         * tests/test-mbspbrk.sh: New file.
2935         * tests/test-mbspbrk.c: New file.
2936
2937 2007-02-11  Bruno Haible  <bruno@clisp.org>
2938
2939         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
2940         unneeded cast.
2941
2942         * modules/mbscspn-tests: New file.
2943         * tests/test-mbscspn.sh: New file.
2944         * tests/test-mbscspn.c: New file.
2945
2946 2007-02-11  Bruno Haible  <bruno@clisp.org>
2947
2948         * modules/mbscasecmp-tests: New file.
2949         * tests/test-mbscasecmp.sh: New file.
2950         * tests/test-mbscasecmp.c: New file.
2951
2952 2007-02-11  Bruno Haible  <bruno@clisp.org>
2953
2954         Ensure O(n) worst-case complexity of mbscasestr.
2955         * lib/mbscasestr.c: Include stdbool.h.
2956         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
2957         functions.
2958         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
2959         the bookkeeping indicates that it's worth it.
2960         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
2961
2962         * modules/mbscasestr-tests: New file.
2963         * tests/test-mbscasestr1.c: New file.
2964         * tests/test-mbscasestr2.sh: New file.
2965         * tests/test-mbscasestr2.c: New file.
2966         * tests/test-mbscasestr3.sh: New file.
2967         * tests/test-mbscasestr3.c: New file.
2968         * tests/test-mbscasestr4.sh: New file.
2969         * tests/test-mbscasestr4.c: New file.
2970         * m4/locale-tr.m4: New file.
2971
2972 2007-02-11  Bruno Haible  <bruno@clisp.org>
2973
2974         Ensure O(n) worst-case complexity of mbsstr.
2975         * lib/mbsstr.c: Include stdbool.h.
2976         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
2977         functions.
2978         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
2979         bookkeeping indicates that it's worth it.
2980         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
2981
2982         * modules/mbsstr-tests: New file.
2983         * tests/test-mbsstr1.c: New file.
2984         * tests/test-mbsstr2.sh: New file.
2985         * tests/test-mbsstr2.c: New file.
2986         * tests/test-mbsstr3.sh: New file.
2987         * tests/test-mbsstr3.c: New file.
2988         * m4/locale-fr.m4: New file.
2989
2990 2007-02-11  Bruno Haible  <bruno@clisp.org>
2991
2992         * lib/mbsrchr.c (mbsrchr): Fix bug.
2993
2994         * modules/mbsrchr-tests: New file.
2995         * tests/test-mbsrchr.sh: New file.
2996         * tests/test-mbsrchr.c: New file.
2997
2998 2007-02-11  Bruno Haible  <bruno@clisp.org>
2999
3000         * lib/mbschr.c (mbschr): Fix bug.
3001
3002         * modules/mbschr-tests: New file.
3003         * tests/test-mbschr.sh: New file.
3004         * tests/test-mbschr.c: New file.
3005         * m4/locale-zh.m4: New file.
3006
3007 2007-02-11  Bruno Haible  <bruno@clisp.org>
3008
3009         Support for copying multibyte string iterators.
3010         * lib/mbiter.h: Include <string.h>.
3011         (mbiter_multi_copy): New function.
3012         (mbi_copy): New macro.
3013         * lib/mbuiter.h: Include <string.h>.
3014         (mbuiter_multi_copy): New function.
3015         (mbui_copy): New macro.
3016
3017 2007-02-11  Bruno Haible  <bruno@clisp.org>
3018
3019         New module mbslen.
3020         * modules/mbslen: New file.
3021         * lib/mbslen.c: New file.
3022         * lib/string_.h (mbslen): New declaration.
3023         * m4/mbslen.m4: New file.
3024         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3025         GNULIB_MBSLEN.
3026         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
3027         * MODULES.html.sh (Internationalization functions): Add mbslen.
3028
3029 2007-02-11  Bruno Haible  <bruno@clisp.org>
3030
3031         Ensure O(n) worst-case complexity of strcasestr substitute.
3032         * lib/strcasestr.c: Include stdbool.h.
3033         (knuth_morris_pratt): New function.
3034         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
3035         bookkeeping indicates that it's worth it.
3036         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
3037
3038         * modules/strcasestr-tests: New file.
3039         * tests/test-strcasestr.c: New file.
3040
3041 2007-02-11  Bruno Haible  <bruno@clisp.org>
3042
3043         Ensure O(n) worst-case complexity of c_strcasestr.
3044         * lib/c-strcasestr.c: Include stdbool.h, string.h.
3045         (knuth_morris_pratt): New function.
3046         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
3047         the bookkeeping indicates that it's worth it.
3048         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
3049
3050         * modules/c-strcasestr-tests: New file.
3051         * tests/test-c-strcasestr.c: New file.
3052
3053 2007-02-11  Bruno Haible  <bruno@clisp.org>
3054
3055         Ensure O(n) worst-case complexity of c_strstr.
3056         * lib/c-strstr.c: Include stdbool.h, string.h.
3057         (knuth_morris_pratt): New function.
3058         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
3059         bookkeeping indicates that it's worth it.
3060         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
3061
3062         * lib/c-strstr.c: Complete rewrite for maintainability.
3063
3064         * modules/c-strstr-tests: New file.
3065         * tests/test-c-strstr.c: New file.
3066
3067 2007-02-11  Bruno Haible  <bruno@clisp.org>
3068
3069         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
3070         5.2.1 and earlier, whereby \055 was treated just like the range
3071         delimiter '-'.
3072         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
3073
3074 2007-02-08  Bruno Haible  <bruno@clisp.org>
3075
3076         * modules/regex (Depends-on): Add stdbool.
3077         Reported by Dalibor Topic <robilad@kaffe.org>.
3078
3079 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
3080
3081         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
3082         Prefer returning from main to exiting from it.
3083         Remove unnecessary parens after sizeof.
3084
3085 2007-02-05  Bruno Haible  <bruno@clisp.org>
3086
3087         New module mbssep.
3088         * modules/mbssep: New file.
3089         * lib/mbssep.c: New file.
3090         * lib/string_.h (strsep): Add a conditional link warning.
3091         (mbssep): New declaration.
3092         * m4/mbssep.m4: New file.
3093         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3094         GNULIB_MBSSEP.
3095         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
3096         * MODULES.html.sh (Internationalization functions): Add mbssep.
3097
3098 2007-02-05  Bruno Haible  <bruno@clisp.org>
3099
3100         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
3101         Optimize search in case of 1 delimiter.
3102
3103 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3104
3105         * lib/acl.h: Include sys/types.h before sys/acl.h.
3106
3107 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
3108
3109         Merge upstream fix for glibc bugzilla #3957:
3110
3111         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
3112
3113         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
3114         bit for RE_HAT_LISTS_NOT_NEWLINE.
3115         (build_charclass_op): Remove bogus comment.
3116
3117 2007-02-05  Simon Josefsson  <simon@josefsson.org>
3118
3119         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
3120
3121 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
3122
3123         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
3124         * lib/memmem.c [!defined _LIBC]: Include config.h.
3125
3126 2007-02-04  Bruno Haible  <bruno@clisp.org>
3127
3128         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
3129         warning message.
3130
3131 2007-02-04  Bruno Haible  <bruno@clisp.org>
3132
3133         New module mbstok_r.
3134         * modules/mbstok_r: New file.
3135         * lib/mbstok_r.c: New file.
3136         * lib/string_.h (strtok_r): Change argument names to match the
3137         comments. Add a conditional link warning.
3138         (mbstok_r): New declaration.
3139         * m4/mbstok_r.m4: New file.
3140         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3141         GNULIB_MBSTOK_R.
3142         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
3143         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
3144
3145 2007-02-04  Bruno Haible  <bruno@clisp.org>
3146
3147         New module mbsspn.
3148         * modules/mbsspn: New file.
3149         * lib/mbsspn.c: New file.
3150         * lib/string_.h (strspn): Add a conditional link warning.
3151         (mbsspn): New declaration.
3152         * m4/mbsspn.m4: New file.
3153         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3154         GNULIB_MBSSPN.
3155         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
3156         * MODULES.html.sh (Internationalization functions): Add mbsspn.
3157
3158 2007-02-04  Bruno Haible  <bruno@clisp.org>
3159
3160         New module mbspbrk.
3161         * modules/mbspbrk: New file.
3162         * lib/mbspbrk.c: New file.
3163         * lib/string_.h (strpbrk): Add a conditional link warning.
3164         (mbspbrk): New declaration.
3165         * m4/mbspbrk.m4: New file.
3166         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3167         GNULIB_MBSPBRK.
3168         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
3169         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
3170
3171 2007-02-04  Bruno Haible  <bruno@clisp.org>
3172
3173         New module mbscspn.
3174         * modules/mbscspn: New file.
3175         * lib/mbscspn.c: New file.
3176         * lib/string_.h (strcspn): Add a conditional link warning.
3177         (mbscspn): New declaration.
3178         * m4/mbscspn.m4: New file.
3179         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3180         GNULIB_MBSCSPN.
3181         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
3182         * MODULES.html.sh (Internationalization functions): Add mbscspn.
3183
3184 2007-02-04  Bruno Haible  <bruno@clisp.org>
3185
3186         New module mbscasestr, reduced goal of strcasestr.
3187         * modules/mbscasestr: New file.
3188         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
3189         (mbscasestr): Renamed from strcasestr.
3190         * lib/strcasestr.c: Don't include mbuiter.h.
3191         (strcasestr): Remove support for multibyte locales.
3192         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
3193         Change the conditional link warning.
3194         (mbscasestr): New declaration.
3195         * m4/mbscasestr.m4: New file.
3196         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
3197         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
3198         REPLACE_STRCASESTR.
3199         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
3200         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
3201         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
3202         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
3203         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
3204         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
3205         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
3206         (Depends-on): Remove mbuiter.
3207         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
3208
3209 2007-02-04  Bruno Haible  <bruno@clisp.org>
3210
3211         Simplify handling of strncasecmp.
3212         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
3213         the conditional link warning.
3214         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
3215         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
3216         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
3217         * modules/strcase (configure.ac): Don't invoke
3218         gl_STRING_MODULE_INDICATOR.
3219         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
3220
3221 2007-02-04  Bruno Haible  <bruno@clisp.org>
3222
3223         New module mbscasecmp, reduced goal of strcasecmp.
3224         * modules/mbscasecmp: New file.
3225         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
3226         (mbscasecmp): Renamed from strcasecmp.
3227         * lib/strcasecmp.c: Don't include mbuiter.h.
3228         (strcasecmp): Remove support for multibyte locales.
3229         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
3230         Change the conditional link warning.
3231         (mbscasecmp): New declaration.
3232         * m4/mbscasecmp.m4: New file.
3233         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
3234         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
3235         REPLACE_STRCASECMP.
3236         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
3237         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3238         GNULIB_MBSCASECMP.
3239         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
3240         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
3241         * modules/strcase (Files): Remove m4/mbrtowc.m4.
3242         (Depends-on): Remove mbuiter.
3243         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
3244
3245 2007-02-04  Bruno Haible  <bruno@clisp.org>
3246
3247         New module mbsstr. Remove module strstr.
3248         * modules/mbsstr: New file.
3249         * modules/strstr: Remove file.
3250         * lib/mbsstr.c: Renamed from lib/strstr.c.
3251         (mbsstr): Renamed from strstr.
3252         * lib/string_.h (strstr): Remove declaration. Change the conditional
3253         link warning.
3254         (mbsstr): New declaration.
3255         * m4/mbsstr.m4: New file.
3256         * m4/strstr.m4: Remove file.
3257         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
3258         REPLACE_STRSTR.
3259         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
3260         Don't initialize GNULIB_STRSTR.
3261         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
3262         substitute GNULIB_STRSTR and REPLACE_STRSTR.
3263         * MODULES.html.sh (Internationalization functions): Add mbsstr.
3264         (Support for systems lacking ANSI C 89): Remove strstr.
3265
3266 2007-02-04  Bruno Haible  <bruno@clisp.org>
3267
3268         New module mbsrchr.
3269         * modules/mbsrchr: New file.
3270         * lib/mbsrchr.c: New file.
3271         * lib/string_.h (strrchr): Add a conditional link warning.
3272         (mbsrchr): New declaration.
3273         * m4/mbsrchr.m4: New file.
3274         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3275         GNULIB_MBSRCHR.
3276         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
3277         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
3278
3279 2007-02-04  Bruno Haible  <bruno@clisp.org>
3280
3281         New module mbschr.
3282         * modules/mbschr: New file.
3283         * lib/mbschr.c: New file.
3284         * lib/string_.h (strchr): Add a conditional link warning.
3285         (mbschr): New declaration.
3286         * m4/mbschr.m4: New file.
3287         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
3288         GNULIB_MBSCHR.
3289         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
3290         * MODULES.html.sh (Internationalization functions): Add mbschr.
3291
3292 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
3293
3294         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
3295
3296         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
3297
3298 2007-02-04  Bruno Haible  <bruno@clisp.org>
3299
3300         New module description section 'configure.ac-early'.
3301         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
3302         (func_get_autoconf_early_snippet): New function.
3303         (func_import, func_create_testdir): Use it. Remove special cases for
3304         modules 'extensions' and 'lock'.
3305         * modules/extensions (configure.ac-early): Require
3306         gl_USE_SYSTEM_EXTENSIONS.
3307         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
3308
3309 2007-02-04  Bruno Haible  <bruno@clisp.org>
3310
3311         Make use of gcj-4.3's -fsource and -ftarget option.
3312         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
3313         and if so try the options -fsource and -ftarget.
3314         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
3315         source_version, ftarget_option, target_version arguments.
3316         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
3317         (is_envjavac_oldgcj_14_14_usable): Renamed from
3318         is_envjavac_gcj_14_14_usable.
3319         (is_envjavac_oldgcj_14_13_usable): Renamed from
3320         is_envjavac_gcj_14_13_usable.
3321         (is_gcj_present): Update.
3322         (is_gcj_43, is_gcj43_usable): New functions.
3323         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
3324         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
3325         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
3326         try the options -fsource and -ftarget.
3327
3328 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
3329
3330         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
3331         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
3332         larger value.
3333
3334 2007-02-03  Jim Meyering  <jim@meyering.net>
3335
3336         Give tools a better chance to allocate space for very large buffers.
3337         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
3338
3339         Make pwd and readlink work also when run with an unreadable parent dir
3340         on systems with openat support.
3341         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
3342         provided getcwd function, even when we have openat support.
3343         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
3344
3345 2007-02-02  Bruno Haible  <bruno@clisp.org>
3346
3347         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
3348         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
3349         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
3350         portability problems if one of these functions is only used on specific
3351         platforms.
3352         Reported by Paul Eggert.
3353
3354 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
3355
3356         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
3357         is causing more trouble than it's curing.
3358         * lib/regex_internal.h (__mempcpy): Remove.
3359         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
3360         (and make the code a tad smaller to boot).
3361         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
3362
3363 2007-02-02  Jim Meyering  <jim@meyering.net>
3364
3365         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
3366         section, not in the Makefile.am: one.
3367
3368 2007-02-02  Eric Blake  <ebb9@byu.net>
3369
3370         * lib/strchrnul.c: Always include config.h first.
3371
3372         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
3373         gnulib strstr is not necessary here.
3374
3375 2007-02-02  Simon Josefsson  <simon@josefsson.org>
3376
3377         * m4/socklen.m4: Fix typo.
3378
3379 2007-02-02  Eric Blake  <ebb9@byu.net>
3380
3381         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
3382         * modules/netinet_in (Makefile.am): Likewise.
3383
3384 2007-02-01  Bruno Haible  <bruno@clisp.org>
3385
3386         * lib/string_.h (GL_LINK_WARNING): New macro.
3387         (strcasecmp, strstr, strcasestr): If provided by the system,
3388         conditionally define as a macro that leads to a warning instead of to
3389         an error.
3390         (strncasecmp): Conditionally define as a macro that leads to a warning.
3391
3392 2007-02-01  Karl Berry  <karl@gnu.org>
3393
3394         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
3395
3396 2007-02-01  Bruno Haible  <bruno@clisp.org>
3397
3398         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
3399         renamings.
3400
3401 2007-02-01  Eric Blake  <ebb9@byu.net>
3402
3403         * modules/regex (Depends-on): Revert dependence on mempcpy.
3404         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
3405         module's definition of mempcpy.
3406         Reported by Paul Eggert.
3407
3408 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
3409
3410         * lib/string_.h: If the gnulib module XYZ is not present, undefine
3411         the symbol XYZ before redefining it.  This fixes a problem with
3412         programs that don't use XYZ, when compiled on systems that define
3413         XYZ to something else.
3414
3415 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
3416
3417         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
3418         occurs when "mkdir -m foo" creates a setgid directory that is (1)
3419         writeable to group or other and (2) is intended to have a special
3420         mode bit that is set or cleared.  In such a case, the directory
3421         should be neither group- nor other-writeable until the special
3422         mode bits are right.
3423
3424 2007-01-31  Eric Blake  <ebb9@byu.net>
3425
3426         * modules/mountlist (Depends-on): Add strstr.
3427
3428         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
3429         bug.
3430         * modules/string (Makefile.am): Remove redundant replacement.
3431         * modules/regex (Depends-on): Add mempcpy.
3432
3433 2007-01-31  Bruno Haible  <bruno@clisp.org>
3434
3435         New module description field 'Link'.
3436         * gnulib-tool (func_usage): Document --extract-link-directive.
3437         (sed_extract_prog): Recognize 'Link' directive.
3438         (func_get_link_directive): New function.
3439         (func_import): Show summary of link directives.
3440         Handle --extract-link-directive option.
3441         * modules/acl (Link): New section.
3442         * modules/clock-time (Link): New section.
3443         * modules/euidaccess (Link): New section.
3444         * modules/gettext (Link): New section.
3445         * modules/iconv (Link): New section.
3446         * modules/lock (Link): New section.
3447         * modules/nanosleep (Link): New section.
3448         * modules/readline (Link): New section.
3449
3450 2007-01-27  Bruno Haible  <bruno@clisp.org>
3451
3452         Enforce the use of gnulib modules for unportable <string.h> functions.
3453         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
3454         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
3455         (gl_HEADER_STRING_H_BODY): Require it.
3456         * lib/string_.h: If the gnulib module XYZ is not present, redefine
3457         the symbol XYZ to one that gives a link error.
3458         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
3459         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
3460         * modules/mempcpy (configure.ac): Likewise.
3461         * modules/memrchr (configure.ac): Likewise.
3462         * modules/stpcpy (configure.ac): Likewise.
3463         * modules/stpncpy (configure.ac): Likewise.
3464         * modules/strcase (configure.ac): Likewise.
3465         * modules/strcasestr (configure.ac): Likewise.
3466         * modules/strchrnul (configure.ac): Likewise.
3467         * modules/strdup (configure.ac): Likewise.
3468         * modules/strndup (configure.ac): Likewise.
3469         * modules/strnlen (configure.ac): Likewise.
3470         * modules/strpbrk (configure.ac): Likewise.
3471         * modules/strsep (configure.ac): Likewise.
3472         * modules/strstr (configure.ac): Likewise.
3473         * modules/strtok_r (configure.ac): Likewise.
3474
3475 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
3476
3477         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
3478
3479 2007-01-30  Jim Meyering  <jim@meyering.net>
3480
3481         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
3482
3483 2007-01-29  Bruno Haible  <bruno@clisp.org>
3484
3485         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
3486         * lib/execute.c: Likewise.
3487         * lib/pipe.c: Likewise.
3488         * lib/printf-args.h: Likewise.
3489         * lib/printf-args.c: Likewise.
3490         * lib/printf-parse.c: Likewise.
3491         * lib/vasnprintf.c: Likewise.
3492
3493 2007-01-29  Eric Blake  <ebb9@byu.net>
3494
3495         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
3496         declaration.
3497
3498 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
3499
3500         * lib/strptime.h (strptime): Use 'restrict' for args where
3501         POSIX requires this.
3502         * lib/strptime.c (strptime): Likewise.
3503         Change license notice from LGPL to GPL, since gnulib-tool will
3504         change this as needed.
3505         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
3506         defined.
3507         Include "strptime.h" first, to check interface.
3508         Do not #undef _LIBC and _NL_CURRENT.
3509         Do not include <stdlib.h>; no longer needed.
3510         Include "time_r.h" and declare ptime_locale_status
3511         only if _LIBC is not defined.
3512         (__P): Remove unused macro.
3513         (match_string): Bring back glibc version, but use it only if _LIBC
3514         is defined.
3515         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
3516         Remove unnecessary assertion and abort() call.
3517         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
3518         * m4/strptime.m4: Fix serial number comment.
3519         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
3520         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
3521         (Depends-on): Add time_r.
3522
3523 2007-01-29  Bruno Haible  <bruno@clisp.org>
3524
3525         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3526         strptime.
3527         * modules/strptime (Depends-on): Add stdbool.
3528         * lib/strptime.h: Include <time.h> always. Add comments.
3529
3530 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
3531
3532         * modules/strptime: New file.
3533         * lib/strptime.h: New file.
3534         * lib/strptime.c: New file.
3535         * m4/strptime.m4: New file.
3536
3537 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
3538
3539         * MODULES.html.sh: New module mpsort.
3540         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
3541
3542         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
3543         a circularity problem with HP-UX ia64 reported by Bob Proulx in
3544         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
3545         All uses changed.
3546         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
3547         All uses changed.
3548         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
3549         to _Restrict_.
3550         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
3551         the parameter matches the prototype.
3552
3553 2007-01-28  Jim Meyering  <jim@meyering.net>
3554
3555         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
3556         sys/time.h here, reverting that part of the previous patch:
3557         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
3558
3559 2007-01-28  Bruno Haible  <bruno@clisp.org>
3560
3561         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
3562         value of $(SYS_TIME_H).
3563         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
3564         remove it conditionally, too. [added by Jim Meyering]
3565         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
3566         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
3567         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
3568         GETTIMEOFDAY_REPLACEMENT to 1.
3569
3570 2007-01-28  Bruno Haible  <bruno@clisp.org>
3571
3572         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
3573         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
3574         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
3575         Set UNISTD_H instead of UNISTD_H2.
3576         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
3577
3578 2007-01-28  Bruno Haible  <bruno@clisp.org>
3579
3580         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
3581         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
3582
3583 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3584
3585         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
3586         (func_create_testdir): Ensure C locale for `grep' and `tr'
3587         character ranges.
3588         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
3589         ACLOCAL_AMFLAGS parsing state machine.
3590
3591 2007-01-27  Bruno Haible  <bruno@clisp.org>
3592
3593         * modules/unistr/base: Update.
3594
3595 2007-01-27  Bruno Haible  <bruno@clisp.org>
3596
3597         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
3598         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
3599         * modules/unistr/u32-mbtouc-unsafe: Renamed from
3600         modules/unistr/u32-mbtouc.
3601         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
3602         * lib/unistr.h: Update.
3603         * lib/linebreak.c: Update.
3604         * modules/unistr/u32-mbtouc: Renamed from
3605         modules/unistr/u32-mbtouc-safe.
3606         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
3607         * lib/unistr.h: Update.
3608         * lib/unistr/u32-to-u8.c: Update.
3609         * lib/unistr/u32-to-u16.c: Update.
3610
3611 2007-01-27  Bruno Haible  <bruno@clisp.org>
3612
3613         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
3614         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
3615         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
3616         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
3617         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
3618         * modules/unistr/u16-mbtouc-unsafe: Renamed from
3619         modules/unistr/u16-mbtouc.
3620         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
3621         * lib/unistr.h: Update.
3622         * lib/linebreak.c: Update.
3623         * modules/linebreak: Update.
3624         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
3625         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
3626         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
3627         * modules/unistr/u16-mbtouc: Renamed from
3628         modules/unistr/u16-mbtouc-safe.
3629         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
3630         * lib/unistr.h: Update.
3631         * lib/unistr/u16-to-u8.c: Update.
3632         * modules/unistr/u16-to-u8: Update.
3633         * lib/unistr/u16-to-u32.c: Update.
3634         * modules/unistr/u16-to-u32: Update.
3635
3636 2007-01-27  Bruno Haible  <bruno@clisp.org>
3637
3638         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
3639         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
3640         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
3641         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
3642         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
3643         * modules/unistr/u8-mbtouc-unsafe: Renamed from
3644         modules/unistr/u8-mbtouc.
3645         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
3646         * lib/unistr.h: Update.
3647         * lib/striconveh.c: Update.
3648         * modules/striconveh: Update.
3649         * lib/linebreak.c: Update.
3650         * modules/linebreak: Update.
3651         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
3652         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
3653         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
3654         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
3655         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
3656         * lib/unistr.h: Update.
3657         * lib/striconveh.c: Update.
3658         * modules/striconveh: Update.
3659         * lib/unistr/u8-to-u16.c: Update.
3660         * modules/unistr/u8-to-u16: Update.
3661         * lib/unistr/u8-to-u32.c: Update.
3662         * modules/unistr/u8-to-u32: Update.
3663
3664 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3665
3666         Sync from Libtool.
3667         * lib/argz.c: Do not include strings.h nor memory.h, include
3668         string.h unconditionally.  Patch by Simon Josefsson.
3669
3670 2007-01-27  Bruno Haible  <bruno@clisp.org>
3671
3672         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
3673         from gl_HEADER_STRING_H_BODY.
3674         (gl_HEADER_STRING_H_BODY): Require it.
3675         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
3676         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
3677         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
3678         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
3679         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
3680         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
3681         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
3682         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
3683         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
3684         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
3685         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
3686         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
3687         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
3688         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
3689         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
3690
3691 2007-01-27  Bruno Haible  <bruno@clisp.org>
3692
3693         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
3694         check_PROGRAMS into noinst_PROGRAMS.
3695         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
3696         check_PROGRAMS in this case.
3697         (func_import): Set for_test to false.
3698         (func_create_testdir): Set for_test to true.
3699
3700 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3701             Bruno Haible  <bruno@clisp.org>
3702
3703         * modules/strcasestr (Files): Remove lib/strcasestr.h.
3704         (Depends-on): Add string.
3705         (Includes): Use <string.h> instead of strcasestr.h.
3706         * modules/string (Makefile.am): Also substitute the value of
3707         REPLACE_STRCASESTR.
3708         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
3709         assume strcasestr is declared in <string.h> not <strings.h>. Also
3710         set REPLACE_STRCASESTR.
3711         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
3712         REPLACE_STRCASESTR.
3713         * lib/strcasestr.h: Remove file.
3714         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
3715         * lib/string_.h (strcasestr): New declaration.
3716
3717 2007-01-27  Bruno Haible  <bruno@clisp.org>
3718
3719         * lib/string_.h: Use 'extern'.
3720
3721 2007-01-27  Jim Meyering  <jim@meyering.net>
3722
3723         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
3724         of set-but-not-used local, "q".
3725
3726         * lib/mempcpy.c: Include <config.h> before <string.h>.
3727         This fixes a compilation error on HP-UX, due to the system's
3728         "restrict"-using mempcpy prototype.
3729
3730 2007-01-26  Bruno Haible  <bruno@clisp.org>
3731
3732         Small optimization.
3733         * lib/javacomp.c: Include c-strstr.h.
3734          (is_envjavac_gcj): Use c_strstr instead of strstr.
3735         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
3736
3737 2007-01-26  Bruno Haible  <bruno@clisp.org>
3738
3739         * MODULES.html.sh (Unicode string functions): Add the new modules.
3740
3741         * modules/uniconv/u32-strconv-to-locale: New file.
3742         * lib/uniconv/u32-strconv-to-locale.c: New file.
3743
3744         * modules/uniconv/u16-strconv-to-locale: New file.
3745         * lib/uniconv/u16-strconv-to-locale.c: New file.
3746
3747         * modules/uniconv/u8-strconv-to-locale: New file.
3748         * lib/uniconv/u8-strconv-to-locale.c: New file.
3749
3750         * modules/uniconv/u32-strconv-from-locale: New file.
3751         * lib/uniconv/u32-strconv-from-locale.c: New file.
3752
3753         * modules/uniconv/u16-strconv-from-locale: New file.
3754         * lib/uniconv/u16-strconv-from-locale.c: New file.
3755
3756         * modules/uniconv/u8-strconv-from-locale: New file.
3757         * lib/uniconv/u8-strconv-from-locale.c: New file.
3758
3759         * modules/uniconv/u32-strconv-to-enc: New file.
3760         * lib/uniconv/u32-strconv-to-enc.c: New file.
3761         * modules/uniconv/u32-strconv-to-enc-tests: New file.
3762         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
3763
3764         * modules/uniconv/u16-strconv-to-enc: New file.
3765         * lib/uniconv/u16-strconv-to-enc.c: New file.
3766         * lib/uniconv/u-strconv-to-enc.h: New file.
3767         * modules/uniconv/u16-strconv-to-enc-tests: New file.
3768         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
3769
3770         * modules/uniconv/u8-strconv-to-enc: New file.
3771         * lib/uniconv/u8-strconv-to-enc.c: New file.
3772         * modules/uniconv/u8-strconv-to-enc-tests: New file.
3773         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
3774
3775         * modules/uniconv/u32-strconv-from-enc: New file.
3776         * lib/uniconv/u32-strconv-from-enc.c: New file.
3777         * modules/uniconv/u32-strconv-from-enc-tests: New file.
3778         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
3779
3780         * modules/uniconv/u16-strconv-from-enc: New file.
3781         * lib/uniconv/u16-strconv-from-enc.c: New file.
3782         * modules/uniconv/u16-strconv-from-enc-tests: New file.
3783         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
3784
3785         * modules/uniconv/u8-strconv-from-enc: New file.
3786         * lib/uniconv/u8-strconv-from-enc.c: New file.
3787         * lib/uniconv/u-strconv-from-enc.h: New file.
3788         * modules/uniconv/u8-strconv-from-enc-tests: New file.
3789         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
3790
3791         * modules/uniconv/u32-conv-from-enc: New file.
3792         * lib/uniconv/u32-conv-from-enc.c: New file.
3793         * modules/uniconv/u32-conv-from-enc-tests: New file.
3794         * tests/uniconv/test-u32-conv-from-enc.c: New file.
3795
3796         * modules/uniconv/u16-conv-from-enc: New file.
3797         * lib/uniconv/u16-conv-from-enc.c: New file.
3798         * lib/uniconv/u-conv-from-enc.h: New file.
3799         * modules/uniconv/u16-conv-from-enc-tests: New file.
3800         * tests/uniconv/test-u16-conv-from-enc.c: New file.
3801
3802         * modules/uniconv/u8-conv-from-enc: New file.
3803         * lib/uniconv/u8-conv-from-enc.c: New file.
3804         * modules/uniconv/u8-conv-from-enc-tests: New file.
3805         * tests/uniconv/test-u8-conv-from-enc.c: New file.
3806
3807         * modules/uniconv/base: New file.
3808         * lib/uniconv.h: New file.
3809
3810 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
3811
3812         * doc/gnulib-tool.texi (Initial import): Update to match current
3813         behavior with strdup module.
3814         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
3815         * lib/memmem.h: Remove; all uses removed.  This is now done
3816         by <string.h>.
3817         * lib/mempcpy.h: Likewise.
3818         * lib/memrchr.h: Likewise.
3819         * lib/stpcpy.h: Likewise.
3820         * lib/stpncpy.h: Likewise.
3821         * lib/strcase.h: Likewise.
3822         * lib/strchrnul.h: Likewise.
3823         * lib/strdup.h: Likewise.
3824         * lib/strndup.h: Likewise.
3825         * lib/strnlen.h: Likewise.
3826         * lib/strpbrk.h: Likewise.
3827         * lib/strsep.h: Likewise.
3828         * lib/strstr.h: Likewise.
3829         * lib/strtok_r.h: Likewise.
3830         * lib/string_.h: New file.
3831         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
3832         Rely on <string.h> instead.
3833         * lib/canon-host.c: Likewise.
3834         * lib/chdir-long.c: Likewise.
3835         * lib/concatpath.c: Likewise.
3836         * lib/exclude.c: Likewise.
3837         * lib/fchdir.c: Likewise.
3838         * lib/getaddrinfo.c: Likewise.
3839         * lib/getcwd.c: Likewise.
3840         * lib/getsubopt.c: Likewise.
3841         * lib/glob.c: Likewise.
3842         * lib/hard-locale.c: Likewise.
3843         * lib/iconvme.c: Likewise.
3844         * lib/javacomp.c: Likewise.
3845         * lib/mempcpy.c: Likewise.
3846         * lib/memrchr.c: Likewise.
3847         * lib/regex_internal.h: Likewise.
3848         * lib/stpncpy.c: Likewise.
3849         * lib/strcasecmp.c: Likewise.
3850         * lib/strchrnul.c: Likewise.
3851         * lib/strdup.c: Likewise.
3852         * lib/striconv.c: Likewise.
3853         * lib/striconveh.c: Likewise.
3854         * lib/striconveha.c: Likewise.
3855         * lib/strncasecmp.c: Likewise.
3856         * lib/strndup.c: Likewise.
3857         * lib/strnlen.c: Likewise.
3858         * lib/strsep.c: Likewise.
3859         * lib/strstr.c: Likewise.
3860         * lib/strtok_r.c: Likewise.
3861         * lib/userspec.c: Likewise.
3862         * lib/w32spawn.h: Likewise.
3863         * lib/xstrndup.c: Likewise.
3864         * lib/mountlist.c (strstr): Remove decl.
3865         * m4/string_h.m4: New file.
3866         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
3867         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
3868         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
3869         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
3870         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
3871         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
3872         Set REPLACE_STRCASECMP if necessary.
3873         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
3874         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
3875         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
3876         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
3877         HAVE_DECL_STRDUP if necessary.
3878         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
3879         since gl_FUNC_STRNDUP does that now.
3880         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
3881         Check for decl here...
3882         (gl_PREREQ_STRNLEN): ... not here.
3883         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
3884         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
3885         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
3886         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
3887         necessary.
3888         * modules/string: New file.
3889         * modules/memmem (Files): Remove special-purpose include file.
3890         (Depends-on): Add string.
3891         (Include): Include <string.h>, not the removed file.
3892         * modules/mempcpy: Likewise.
3893         * modules/memrchr: Likewise.
3894         * modules/stpcpy: Likewise.
3895         * modules/stpncpy: Likewise.
3896         * modules/strcase: Likewise.
3897         * modules/strchrnul: Likewise.
3898         * modules/strdup: Likewise.
3899         * modules/strndup: Likewise.
3900         * modules/strnlen: Likewise.
3901         * modules/strpbrk: Likewise.
3902         * modules/strsep: Likewise.
3903         * modules/strstr: Likewise.
3904         * modules/strtok_r: Likewise.
3905         * tests/test-dirname.c: Don't include "strdup.h", since
3906         <string.h> now suffices.
3907         * tests/test-memmem.c: Don't include "memmem.h", since
3908         <string.h> now suffices.
3909
3910 2007-01-25  Bruno Haible  <bruno@clisp.org>
3911
3912         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
3913         *resultp is 0.
3914
3915         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
3916         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
3917         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
3918         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
3919
3920         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
3921         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
3922         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
3923         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
3924         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
3925         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
3926
3927 2007-01-24  Bruno Haible  <bruno@clisp.org>
3928
3929         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
3930         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
3931         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
3932         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
3933         gl_FUNC_FTS_CORE.
3934         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
3935         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
3936         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
3937         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
3938         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
3939         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
3940         gl_FUNC_FCHOWNAT.
3941         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
3942         gl_FUNC_STRFTIME.
3943         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
3944         Reported by Ralf Wildenhues.
3945
3946 2007-01-24  Bruno Haible  <bruno@clisp.org>
3947
3948         Drop AC_REQUIRE calls that are redundant with the module dependencies.
3949         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
3950         gl_GETADDRINFO.
3951         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
3952         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
3953         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
3954
3955 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
3956
3957         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
3958         Don't use 'exit'; just return from 'main'.
3959         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
3960
3961         * lib/fnmatch_.h: Readjust white space and comments to match
3962         glibc, to avoid spurious diffs.
3963
3964 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
3965
3966         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
3967         2004-12-01 change by Jakub Jelinek, since this code won't compile
3968         if !LIBC.  Problem reported by Bob Proulx.
3969
3970 2007-01-23  Bruno Haible  <bruno@clisp.org>
3971
3972         * lib/striconveh.c: Include c-strcaseeq.h.
3973         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
3974         * modules/striconveh (Depends-on): Add c-strcaseeq.
3975
3976 2007-01-23  Bruno Haible  <bruno@clisp.org>
3977
3978         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
3979
3980         * modules/c-strcaseeq: New file.
3981         * lib/c-strcaseeq.h: New file.
3982
3983         * modules/streq: New file.
3984         * lib/streq.h: New file.
3985
3986 2007-01-23  Bruno Haible  <bruno@clisp.org>
3987
3988         * modules/striconveha-tests: New file.
3989         * tests/test-striconveha.c: New file.
3990
3991         * lib/striconveha.h: Include <stdbool.h>.
3992         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
3993         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
3994         (mem_iconveha_notranslit): Renamed from mem_iconveha.
3995         (mem_iconveha): New function.
3996         (str_iconveha_notranslit): Renamed from str_iconveha.
3997         (str_iconveha): New function.
3998         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
3999         c-strcase.
4000
4001 2007-01-23  Bruno Haible  <bruno@clisp.org>
4002
4003         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
4004         encodings without forgiving before trying any encoding with handler.
4005         (str_iconveha): Try all encodings without forgiving before trying any
4006         encoding with handler.
4007
4008 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
4009
4010         Import the following changes from libc.
4011
4012         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
4013
4014         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
4015
4016         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4017
4018         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
4019         normal_bracket label.
4020
4021         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
4022
4023         [BZ #361]
4024         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
4025         to normal_bracket after fetching the next character.
4026
4027 2007-01-22  Bruno Haible  <bruno@clisp.org>
4028
4029         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
4030         argument.
4031         * lib/striconveh.c (iconv_carefully_1): New function.
4032         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
4033         argument.
4034         (str_cd_iconveh): Update.
4035         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
4036         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
4037         * tests/test-striconveh.c (MAGIC): New macro.
4038         (new_offsets): New function.
4039         (main): Test call with and without offsets.
4040
4041 2007-01-22  Bruno Haible  <bruno@clisp.org>
4042
4043         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
4044         * modules/sys_select (Makefile.am): Likewise.
4045         * modules/sys_socket (Makefile.am): Likewise.
4046         * modules/sys_time (Makefile.am): Likewise.
4047
4048 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
4049
4050         * modules/gettimeofday (License): Change from GPL to LGPL, since
4051         gettimeofday is a library function.
4052
4053 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4054
4055         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
4056
4057 2007-01-21  Bruno Haible  <bruno@clisp.org>
4058
4059         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
4060
4061 2007-01-21  Bruno Haible  <bruno@clisp.org>
4062
4063         * modules/striconveha: New file.
4064         * lib/striconveha.h: New file.
4065         * lib/striconveha.c: New file.
4066         * MODULES.html.sh (Internationalization functions): Add striconveha.
4067         * lib/striconv.c (str_iconv): Optimize the case of an empty input
4068         string.
4069         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
4070
4071 2007-01-21  Bruno Haible  <bruno@clisp.org>
4072
4073         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
4074         * lib/striconveh.c (str_iconveh): Likewise.
4075
4076 2007-01-21  Bruno Haible  <bruno@clisp.org>
4077
4078         * lib/striconveh.h (mem_iconveh): New declaration.
4079         * lib/striconveh.c (mem_iconveh): New function.
4080         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
4081
4082 2007-01-21  Bruno Haible  <bruno@clisp.org>
4083
4084         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
4085
4086         * lib/striconveh.h (mem_cd_iconveh): Change specification.
4087         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
4088         original result buffer.
4089         (str_cd_iconveh): Update.
4090         * tests/test-striconveh.c (main): Update.
4091
4092         * lib/striconv.h (mem_cd_iconv): Change specification.
4093         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
4094         result buffer.
4095         (str_cd_iconv): Update.
4096         * tests/test-striconv.c (main): Update.
4097
4098 2007-01-21  Bruno Haible  <bruno@clisp.org>
4099
4100         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
4101
4102 2007-01-20  Jim Meyering  <jim@meyering.net>
4103
4104         * lib/userspec.c (parse_with_separator): If a user or group string
4105         starts with "+", skip the corresponding name-to-ID look-up, since
4106         such a look-up must fail: user and group names may not include "+".
4107
4108 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
4109
4110         * lib/poll.c: Include sys/time.h and time.h unconditionally,
4111         since we now assume the sys_time module.
4112         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
4113         check for sys/time.h; no longer needed.
4114         * modules/poll (Depends-on): Depend on sys_time.
4115
4116 2007-01-18  Bruno Haible  <bruno@clisp.org>
4117
4118         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
4119         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
4120
4121         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
4122         gettimeofday.
4123
4124         * tests/test-gettimeofday.c: Include <time.h>.
4125         (dummy): Remove variable.
4126
4127         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
4128         gl_HEADER_SYS_TIME_H.
4129         (gl_HEADER_SYS_TIME_H): New macro.
4130
4131         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
4132         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4133         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
4134         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
4135         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4136         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
4137         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
4138         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4139         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
4140         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
4141         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4142
4143         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
4144         last change; it caused a compilation error when cross-compiling to
4145         Cygwin.
4146
4147 2007-01-18  Jim Meyering  <jim@meyering.net>
4148
4149         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
4150         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
4151         than the race-prone "test -d sys || mkdir sys".
4152         (configure.ac): Use AC_PROG_MKDIR_P.
4153         * modules/sys_select: Likewise.
4154         * modules/sys_socket: Likewise.
4155         * modules/sys_time: Likewise.
4156
4157 2007-01-18  Eric Blake  <ebb9@byu.net>
4158
4159         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
4160         replace gettimeofday.
4161         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
4162         name, to avoid infinite recursion.
4163
4164 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
4165
4166         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
4167         module sys_time.
4168         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
4169         assume timespec.h defines struct timeval.
4170         * lib/settime.c: Likewise.
4171         * lib/utimens.c: Likewise.
4172         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
4173         since we now assume the gettimeofday module.
4174         * lib/tempname.c (__gen_tempname): Likewise.
4175         * lib/gettimeofday.h: Remove.
4176         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
4177         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
4178         Include <time.h>, for 'time()'.
4179         (localtime_buffer_addr): Also use this workaround if
4180         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
4181         to simplify the uses.  All uses changed.
4182         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
4183         that #undef is inside {}, and 'const' follows type name consistently.
4184         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
4185         (gettimeofday): Do not use the maximum possible value for
4186         tv->tv_usec, since that might break usages other than ls.c.
4187         Instead, we'll leave ls.c alone.  This undoes today's patch
4188         by Bruno.  Add a compile-time warning for 1s-clock resolution;
4189         we've never observed the problem but might as well keep the
4190         canary.
4191         * lib/nanosleep.c: Include timespec.h first, for interface check.
4192         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
4193         now assume the sys_time module.
4194         * lib/tempname.c: Likewise.
4195         * lib/timespec.h: Likewise.
4196         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
4197         needed.
4198         * lib/strftime.c: Likewise.
4199         * lib/timespec.h: Likewise.
4200         * lib/posixtm.c: Include posixtm.h first, for interface check.
4201         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
4202         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
4203         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
4204         * lib/sys_time_.h: New file.
4205         * lib/timespec.h (struct timespec): Use long int, not long.
4206         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
4207         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
4208         Remove obsolescent call to AC_HEADER_TIME.
4209         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
4210         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
4211         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
4212         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
4213         Likewise.
4214         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
4215         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
4216         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
4217         into the sys_time module.  Check for gettimeofday just once.
4218         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
4219         for gettimeofday signature to just check the signature.  Merely
4220         compile it, since linking doesn't test signature.  Improve test for
4221         whether gettimeofday.o is actually needed.
4222         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
4223         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
4224         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
4225         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4226         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
4227         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
4228         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
4229         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
4230         than worrying about sys/time.h.
4231         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4232         Don't bother worrying about TIME_WITH_SYS_TIME.
4233         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
4234         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
4235         * m4/sys_time_h.m4: New file.
4236         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
4237         Don't include sys/time.h.  Return from main rather than exiting.
4238         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
4239         all uses changed.
4240         * modules/gethrxtime (Depends-on): Add sys_time.
4241         * modules/gettime (Depends-on): Likewise.
4242         * modules/gettimeofday (Depends-on): Likewise.
4243         * modules/nanosleep (Depends-on): Likewise.
4244         * modules/settime (Depends-on): Likewise.
4245         * modules/tempname (Depends-on): Likewise.
4246         * modules/utimens (Depends-on): Likewise.
4247         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
4248         (Include:) Change back to <sys/time.h>.
4249         (Maintainer:) Add self.
4250         * modules/sys_time: New file.
4251         * modules/tempname (Depends-on): Add gettimeofday.
4252         * tests/test-gettimeofday.c: Include <sys/time.h>
4253         rather than gettimeofday.h.
4254
4255 2007-01-17  Bruno Haible  <bruno@clisp.org>
4256
4257         * gnulib-tool (func_get_license): Revert last patch. Instead, let
4258         the license default to GPL.
4259         (func_create_testdir): Don't complain if a module is LGPL and its
4260         tests module depends on GPLed modules.
4261
4262 2007-01-17  Bruno Haible  <bruno@clisp.org>
4263
4264         * lib/gettimeofday.c (gettimeofday): Add code for the case
4265         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
4266         maximum possible value for tv->tv_usec, rather than the minimum one.
4267
4268 2005-10-08  Martin Lambers  <marlam@marlam.de>
4269 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4270 2007-01-16  Bruno Haible  <bruno@clisp.org>
4271
4272         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
4273         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
4274         gl_FUNC_GETTIMEOFDAY.
4275         (Include): Add gettimeofday.h.
4276         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
4277         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
4278         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
4279         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
4280         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
4281         * lib/gettimeofday.h: New file.
4282         * lib/gettimeofday.c: Include <sys/timeb.h>.
4283         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
4284         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
4285         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
4286         fall back on time().
4287
4288         * tests/test-gettimeofday.c: New file.
4289         * modules/gettimeofday-tests: New file.
4290
4291 2007-01-16  Eric Blake  <ebb9@byu.net>
4292
4293         * modules/fnmatch (Depends-on): Depend on wchar.
4294         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
4295         * m4/fnmatch.m4: Likewise.
4296         * modules/mbchar (Makefile.am): Assume <wchar.h>.
4297         * m4/mbchar.m4: Likewise.
4298         * modules/mbswidth (Depends-on): Depend on wchar.
4299         * lib/mbswidth.c: Assume <wchar.h>.
4300         * m4/mbswidth.m4: Likewise.
4301         * modules/quotearg (Depends-on): Depend on wchar.
4302         * lib/quotearg.c: Assume <wchar.h>.
4303         * m4/quotearg.m4: Likewise.
4304         * modules/regex (Depends-on): Depend on wchar.
4305         * lib/regex_internal.h: Assume <wchar.h>.
4306         * m4/regex.m4: Likewise.
4307         * modules/stdint (Depends-on): Depend on wchar.
4308         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
4309         * m4/stdint.m4: Likewise.
4310         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
4311         * modules/strftime (Depends-on): Depend on wchar.
4312         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
4313         * modules/strtol (Depends-on): Depend on wchar.
4314         * lib/strtol.c: Assume <wchar.h>.
4315         * modules/wcwidth (Depends-on): Depend on wchar.
4316         * lib/wcwidth.h: Assume <wchar.h>.
4317         * m4/wcwidth.m4: Likewise.
4318
4319 2007-01-16  Bruno Haible  <bruno@clisp.org>
4320
4321         * modules/csharpexec-script: New, created from...
4322         * modules/csharpexec: ... this.
4323
4324 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
4325
4326         * modules/javaexec-script: New, created from...
4327         * modules/javaexec: ... this.
4328
4329 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4330
4331         * modules/poll (Dependencies): Add sys_select.
4332
4333 2007-01-15  Jim Meyering  <jim@meyering.net>
4334
4335         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
4336         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
4337         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
4338         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
4339
4340 2007-01-15  Bruno Haible  <bruno@clisp.org>
4341
4342         * modules/striconveh: New file.
4343         * lib/striconveh.h: New file.
4344         * lib/striconveh.c: New file.
4345         * MODULES.html.sh (Internationalization functions): Add striconveh.
4346
4347         * modules/striconveh-tests: New file.
4348         * tests/test-striconveh.c: New file.
4349
4350 2007-01-15  Bruno Haible  <bruno@clisp.org>
4351
4352         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
4353         not from GNU libiconv or GNU libc.
4354
4355 2007-01-15  Bruno Haible  <bruno@clisp.org>
4356
4357         * doc/gnulib-intro.texi (Copyright): Explain the different license
4358         terms for module descriptions, autoconf macros, tests, documentation.
4359
4360 2007-01-14  Bruno Haible  <bruno@clisp.org>
4361
4362         * modules/striconv-tests: New file.
4363         * tests/test-striconv.c: New file.
4364
4365 2007-01-14  Bruno Haible  <bruno@clisp.org>
4366
4367         * modules/iconv-tests: New file.
4368         * tests/test-iconv.c: New file.
4369
4370 2007-01-14  Bruno Haible  <bruno@clisp.org>
4371
4372         * gnulib-tool (func_get_license): For test modules, use the license of
4373         the main module.
4374
4375 2007-01-14  Bruno Haible  <bruno@clisp.org>
4376
4377         * modules/iconv (Include): Clarify that <iconv.h> can only be included
4378         if iconv is found to exist.
4379
4380 2007-01-14  Bruno Haible  <bruno@clisp.org>
4381
4382         * modules/c-ctype-tests: New file.
4383         * tests/test-c-ctype.c: New file.
4384
4385 2007-01-14  Bruno Haible  <bruno@clisp.org>
4386
4387         * modules/binary-io-tests: New file.
4388         * tests/test-binary-io.sh: New file.
4389         * tests/test-binary-io.c: New file.
4390
4391 2007-01-14  Bruno Haible  <bruno@clisp.org>
4392
4393         * modules/array-oset-tests: New file.
4394         * tests/test-array_oset.c: New file.
4395
4396 2007-01-14  Bruno Haible  <bruno@clisp.org>
4397
4398         * modules/array-list-tests: New file.
4399         * tests/test-array_list.c: New file.
4400
4401 2007-01-14  Bruno Haible  <bruno@clisp.org>
4402
4403         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
4404         and make.
4405         Reported by Simon Josefsson in
4406         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
4407
4408 2007-01-14  Bruno Haible  <bruno@clisp.org>
4409
4410         * modules/allocsa-tests: New file.
4411         * tests/test-allocsa.c: New file.
4412
4413 2007-01-14  Bruno Haible  <bruno@clisp.org>
4414
4415         * modules/fchdir (Depends-on): Add absolute-header.
4416         * modules/unistd (Depends-on): Likewise.
4417
4418 2006-12-30  Bruno Haible  <bruno@clisp.org>
4419
4420         * modules/fchdir: New file.
4421         * modules/unistd (Files): Add lib/unistd_.h.
4422         (Makefile.am): Generate unistd.h from unistd_.h.
4423         * lib/fchdir.c: New file.
4424         * lib/dirent_.h: New file.
4425         * lib/unistd_.h: New file.
4426         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
4427         * m4/fchdir.m4: New file.
4428         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
4429         (gl_HEADER_UNISTD): Invoke it.
4430         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
4431         function.
4432         * lib/backupfile.c (opendir, closedir): Undefine.
4433         * lib/chown.c (open, close): Undefine.
4434         * lib/clean-temp.c (open, close): Undefine.
4435         * lib/copy-file.c (open, close): Undefine.
4436         * lib/execute.c (open, close): Undefine.
4437         * lib/fsusage.c (open, close): Undefine.
4438         * lib/gc-gnulib.c (open, close): Undefine.
4439         * lib/getcwd.c (opendir, closedir): Undefine.
4440         * lib/glob.c (opendir, closedir): Undefine.
4441         * lib/javacomp.c (open, close): Undefine.
4442         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
4443         * lib/openat-proc.c (open, close): Undefine.
4444         * lib/pagealign_alloc.c (open, close): Undefine.
4445         * lib/pipe.c (open, close): Undefine.
4446         * lib/progreloc.c (open, close): Undefine.
4447         * lib/savedir.c (opendir, closedir): Undefine.
4448         * lib/utime.c (open, close): Undefine.
4449         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
4450
4451 2007-01-10  Bruno Haible  <bruno@clisp.org>
4452
4453         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
4454
4455 2007-01-12  Eric Blake  <ebb9@byu.net>
4456
4457         Provide a robust <wchar.h>.  Further simplifications are now
4458         possible in other modules, but not included here.
4459         * modules/wchar: New module.
4460         * m4/wchar.m4: New file.
4461         * lib/wchar_.h: Likewise.
4462         * modules/mbchar (Depends-on): Depend on wchar, as the first use
4463         of the new module.
4464         * MODULES.html.sh (Extended multibyte and wide character utilities):
4465         New section.
4466
4467 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
4468
4469         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
4470         to a reasonable default for memory allocation.
4471         (xreadlink): Don't allocate a huge buffer, to work around a buggy
4472         file system that reports garbage st_size values for symlinks.
4473         Problem reported by Liyang Hu.
4474
4475 2007-01-11  Simon Josefsson  <simon@josefsson.org>
4476
4477         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
4478         Emacs .#* auto-save files).
4479
4480 2007-01-11  Bruno Haible  <bruno@clisp.org>
4481
4482         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
4483         directory.
4484
4485 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
4486
4487         Use @...@ consistently in lib/wctype_.h.
4488         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
4489         on it being set to 1 or 0.
4490         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
4491         go back to AC_SUBSTing it.
4492         * modules/wctype (Makefile.am): Undo previous change.
4493
4494 2007-01-10  Eric Blake  <ebb9@byu.net>
4495
4496         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
4497         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
4498         * modules/wctype (Makefile.am): Likewise.
4499         Reported by Chris McGuire.
4500
4501 2007-01-10  Jim Meyering  <jim@meyering.net>
4502
4503         fts.c: a small readability/maintainability improvement
4504         * lib/fts.c (fts_read): Make this code slightly more readable and
4505         maintainable by hoisting the "sp->fts_cur = p" assignments to
4506         immediately follow the statements that set P.  Derived from
4507         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
4508
4509 2007-01-10  Eric Blake  <ebb9@byu.net>
4510
4511         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
4512         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
4513         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
4514         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
4515         Reported by Chris McGuire.
4516
4517 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4518
4519         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
4520         in sed script.
4521
4522 2007-01-09  Bruno Haible  <bruno@clisp.org>
4523
4524         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
4525         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
4526         variables.
4527         (func_module): Use them.
4528
4529 2007-01-09  Bruno Haible  <bruno@clisp.org>
4530
4531         * modules/unistr/base: New file.
4532         * lib/unistr.h: New file.
4533
4534         * modules/unistr/u8-to-u16: New file.
4535         * lib/unistr/u8-to-u16.c: New file.
4536
4537         * modules/unistr/u8-to-u32: New file.
4538         * lib/unistr/u8-to-u32.c: New file.
4539
4540         * modules/unistr/u16-to-u8: New file.
4541         * lib/unistr/u16-to-u8.c: New file.
4542
4543         * modules/unistr/u16-to-u32: New file.
4544         * lib/unistr/u16-to-u32.c: New file.
4545
4546         * modules/unistr/u32-to-u8: New file.
4547         * lib/unistr/u32-to-u8.c: New file.
4548
4549         * modules/unistr/u32-to-u16: New file.
4550         * lib/unistr/u32-to-u16.c: New file.
4551
4552         * modules/unistr/u8-check: New file.
4553         * modules/unistr/u16-check: New file.
4554         * modules/unistr/u32-check: New file.
4555         * lib/unistr/u8-check.c: New file.
4556         * lib/unistr/u16-check.c: New file.
4557         * lib/unistr/u32-check.c: New file.
4558
4559         * modules/unistr/u8-chr: New file.
4560         * modules/unistr/u16-chr: New file.
4561         * modules/unistr/u32-chr: New file.
4562         * lib/unistr/u8-chr.c: New file.
4563         * lib/unistr/u16-chr.c: New file.
4564         * lib/unistr/u32-chr.c: New file.
4565
4566         * modules/unistr/u8-cmp: New file.
4567         * modules/unistr/u16-cmp: New file.
4568         * modules/unistr/u32-cmp: New file.
4569         * lib/unistr/u8-cmp.c: New file.
4570         * lib/unistr/u16-cmp.c: New file.
4571         * lib/unistr/u32-cmp.c: New file.
4572
4573         * modules/unistr/u8-cpy: New file.
4574         * modules/unistr/u16-cpy: New file.
4575         * modules/unistr/u32-cpy: New file.
4576         * lib/unistr/u8-cpy.c: New file.
4577         * lib/unistr/u16-cpy.c: New file.
4578         * lib/unistr/u32-cpy.c: New file.
4579         * lib/unistr/u-cpy.h: New file.
4580
4581         * modules/unistr/u8-cpy-alloc: New file.
4582         * modules/unistr/u16-cpy-alloc: New file.
4583         * modules/unistr/u32-cpy-alloc: New file.
4584         * lib/unistr/u8-cpy-alloc.c: New file.
4585         * lib/unistr/u16-cpy-alloc.c: New file.
4586         * lib/unistr/u32-cpy-alloc.c: New file.
4587         * lib/unistr/u-cpy-alloc.h: New file.
4588
4589         * modules/unistr/u8-endswith: New file.
4590         * modules/unistr/u16-endswith: New file.
4591         * modules/unistr/u32-endswith: New file.
4592         * lib/unistr/u8-endswith.c: New file.
4593         * lib/unistr/u16-endswith.c: New file.
4594         * lib/unistr/u32-endswith.c: New file.
4595         * lib/unistr/u-endswith.h: New file.
4596
4597         * modules/unistr/u8-mblen: New file.
4598         * modules/unistr/u16-mblen: New file.
4599         * modules/unistr/u32-mblen: New file.
4600         * lib/unistr/u8-mblen.c: New file.
4601         * lib/unistr/u16-mblen.c: New file.
4602         * lib/unistr/u32-mblen.c: New file.
4603
4604         * modules/unistr/u8-mbtouc: New file.
4605         * modules/unistr/u16-mbtouc: New file.
4606         * modules/unistr/u32-mbtouc: New file.
4607         * lib/unistr/u8-mbtouc.c: New file.
4608         * lib/unistr/u16-mbtouc.c: New file.
4609         * lib/unistr/u32-mbtouc.c: New file.
4610
4611         * modules/unistr/u8-mbtouc-safe: New file.
4612         * modules/unistr/u16-mbtouc-safe: New file.
4613         * modules/unistr/u32-mbtouc-safe: New file.
4614         * lib/unistr/u8-mbtouc-safe.c: New file.
4615         * lib/unistr/u16-mbtouc-safe.c: New file.
4616         * lib/unistr/u32-mbtouc-safe.c: New file.
4617
4618         * modules/unistr/u8-move: New file.
4619         * modules/unistr/u16-move: New file.
4620         * modules/unistr/u32-move: New file.
4621         * lib/unistr/u8-move.c: New file.
4622         * lib/unistr/u16-move.c: New file.
4623         * lib/unistr/u32-move.c: New file.
4624         * lib/unistr/u-move.h: New file.
4625
4626         * modules/unistr/u8-next: New file.
4627         * modules/unistr/u16-next: New file.
4628         * modules/unistr/u32-next: New file.
4629         * lib/unistr/u8-next.c: New file.
4630         * lib/unistr/u16-next.c: New file.
4631         * lib/unistr/u32-next.c: New file.
4632
4633         * modules/unistr/u8-prev: New file.
4634         * modules/unistr/u16-prev: New file.
4635         * modules/unistr/u32-prev: New file.
4636         * lib/unistr/u8-prev.c: New file.
4637         * lib/unistr/u16-prev.c: New file.
4638         * lib/unistr/u32-prev.c: New file.
4639
4640         * modules/unistr/u8-set: New file.
4641         * modules/unistr/u16-set: New file.
4642         * modules/unistr/u32-set: New file.
4643         * lib/unistr/u8-set.c: New file.
4644         * lib/unistr/u16-set.c: New file.
4645         * lib/unistr/u32-set.c: New file.
4646         * lib/unistr/u-set.h: New file.
4647
4648         * modules/unistr/u8-startswith: New file.
4649         * modules/unistr/u16-startswith: New file.
4650         * modules/unistr/u32-startswith: New file.
4651         * lib/unistr/u8-startswith.c: New file.
4652         * lib/unistr/u16-startswith.c: New file.
4653         * lib/unistr/u32-startswith.c: New file.
4654         * lib/unistr/u-startswith.h: New file.
4655
4656         * modules/unistr/u8-stpcpy: New file.
4657         * modules/unistr/u16-stpcpy: New file.
4658         * modules/unistr/u32-stpcpy: New file.
4659         * lib/unistr/u8-stpcpy.c: New file.
4660         * lib/unistr/u16-stpcpy.c: New file.
4661         * lib/unistr/u32-stpcpy.c: New file.
4662         * lib/unistr/u-stpcpy.h: New file.
4663
4664         * modules/unistr/u8-stpncpy: New file.
4665         * modules/unistr/u16-stpncpy: New file.
4666         * modules/unistr/u32-stpncpy: New file.
4667         * lib/unistr/u8-stpncpy.c: New file.
4668         * lib/unistr/u16-stpncpy.c: New file.
4669         * lib/unistr/u32-stpncpy.c: New file.
4670         * lib/unistr/u-stpncpy.h: New file.
4671
4672         * modules/unistr/u8-strcat: New file.
4673         * modules/unistr/u16-strcat: New file.
4674         * modules/unistr/u32-strcat: New file.
4675         * lib/unistr/u8-strcat.c: New file.
4676         * lib/unistr/u16-strcat.c: New file.
4677         * lib/unistr/u32-strcat.c: New file.
4678         * lib/unistr/u-strcat.h: New file.
4679
4680         * modules/unistr/u8-strchr: New file.
4681         * modules/unistr/u16-strchr: New file.
4682         * modules/unistr/u32-strchr: New file.
4683         * lib/unistr/u8-strchr.c: New file.
4684         * lib/unistr/u16-strchr.c: New file.
4685         * lib/unistr/u32-strchr.c: New file.
4686
4687         * modules/unistr/u8-strcmp: New file.
4688         * modules/unistr/u16-strcmp: New file.
4689         * modules/unistr/u32-strcmp: New file.
4690         * lib/unistr/u8-strcmp.c: New file.
4691         * lib/unistr/u16-strcmp.c: New file.
4692         * lib/unistr/u32-strcmp.c: New file.
4693
4694         * modules/unistr/u8-strcpy: New file.
4695         * modules/unistr/u16-strcpy: New file.
4696         * modules/unistr/u32-strcpy: New file.
4697         * lib/unistr/u8-strcpy.c: New file.
4698         * lib/unistr/u16-strcpy.c: New file.
4699         * lib/unistr/u32-strcpy.c: New file.
4700         * lib/unistr/u-strcpy.h: New file.
4701
4702         * modules/unistr/u8-strcspn: New file.
4703         * modules/unistr/u16-strcspn: New file.
4704         * modules/unistr/u32-strcspn: New file.
4705         * lib/unistr/u8-strcspn.c: New file.
4706         * lib/unistr/u16-strcspn.c: New file.
4707         * lib/unistr/u32-strcspn.c: New file.
4708         * lib/unistr/u-strcspn.h: New file.
4709
4710         * modules/unistr/u8-strdup: New file.
4711         * modules/unistr/u16-strdup: New file.
4712         * modules/unistr/u32-strdup: New file.
4713         * lib/unistr/u8-strdup.c: New file.
4714         * lib/unistr/u16-strdup.c: New file.
4715         * lib/unistr/u32-strdup.c: New file.
4716         * lib/unistr/u-strdup.h: New file.
4717
4718         * modules/unistr/u8-strlen: New file.
4719         * modules/unistr/u16-strlen: New file.
4720         * modules/unistr/u32-strlen: New file.
4721         * lib/unistr/u8-strlen.c: New file.
4722         * lib/unistr/u16-strlen.c: New file.
4723         * lib/unistr/u32-strlen.c: New file.
4724         * lib/unistr/u-strlen.h: New file.
4725
4726         * modules/unistr/u8-strmblen: New file.
4727         * modules/unistr/u16-strmblen: New file.
4728         * modules/unistr/u32-strmblen: New file.
4729         * lib/unistr/u8-strmblen.c: New file.
4730         * lib/unistr/u16-strmblen.c: New file.
4731         * lib/unistr/u32-strmblen.c: New file.
4732
4733         * modules/unistr/u8-strmbtouc: New file.
4734         * modules/unistr/u16-strmbtouc: New file.
4735         * modules/unistr/u32-strmbtouc: New file.
4736         * lib/unistr/u8-strmbtouc.c: New file.
4737         * lib/unistr/u16-strmbtouc.c: New file.
4738         * lib/unistr/u32-strmbtouc.c: New file.
4739
4740         * modules/unistr/u8-strncat: New file.
4741         * modules/unistr/u16-strncat: New file.
4742         * modules/unistr/u32-strncat: New file.
4743         * lib/unistr/u8-strncat.c: New file.
4744         * lib/unistr/u16-strncat.c: New file.
4745         * lib/unistr/u32-strncat.c: New file.
4746         * lib/unistr/u-strncat.h: New file.
4747
4748         * modules/unistr/u8-strncmp: New file.
4749         * modules/unistr/u16-strncmp: New file.
4750         * modules/unistr/u32-strncmp: New file.
4751         * lib/unistr/u8-strncmp.c: New file.
4752         * lib/unistr/u16-strncmp.c: New file.
4753         * lib/unistr/u32-strncmp.c: New file.
4754
4755         * modules/unistr/u8-strncpy: New file.
4756         * modules/unistr/u16-strncpy: New file.
4757         * modules/unistr/u32-strncpy: New file.
4758         * lib/unistr/u8-strncpy.c: New file.
4759         * lib/unistr/u16-strncpy.c: New file.
4760         * lib/unistr/u32-strncpy.c: New file.
4761         * lib/unistr/u-strncpy.h: New file.
4762
4763         * modules/unistr/u8-strnlen: New file.
4764         * modules/unistr/u16-strnlen: New file.
4765         * modules/unistr/u32-strnlen: New file.
4766         * lib/unistr/u8-strnlen.c: New file.
4767         * lib/unistr/u16-strnlen.c: New file.
4768         * lib/unistr/u32-strnlen.c: New file.
4769         * lib/unistr/u-strnlen.h: New file.
4770
4771         * modules/unistr/u8-strpbrk: New file.
4772         * modules/unistr/u16-strpbrk: New file.
4773         * modules/unistr/u32-strpbrk: New file.
4774         * lib/unistr/u8-strpbrk.c: New file.
4775         * lib/unistr/u16-strpbrk.c: New file.
4776         * lib/unistr/u32-strpbrk.c: New file.
4777         * lib/unistr/u-strpbrk.h: New file.
4778
4779         * modules/unistr/u8-strrchr: New file.
4780         * modules/unistr/u16-strrchr: New file.
4781         * modules/unistr/u32-strrchr: New file.
4782         * lib/unistr/u8-strrchr.c: New file.
4783         * lib/unistr/u16-strrchr.c: New file.
4784         * lib/unistr/u32-strrchr.c: New file.
4785
4786         * modules/unistr/u8-strspn: New file.
4787         * modules/unistr/u16-strspn: New file.
4788         * modules/unistr/u32-strspn: New file.
4789         * lib/unistr/u8-strspn.c: New file.
4790         * lib/unistr/u16-strspn.c: New file.
4791         * lib/unistr/u32-strspn.c: New file.
4792         * lib/unistr/u-strspn.h: New file.
4793
4794         * modules/unistr/u8-strstr: New file.
4795         * modules/unistr/u16-strstr: New file.
4796         * modules/unistr/u32-strstr: New file.
4797         * lib/unistr/u8-strstr.c: New file.
4798         * lib/unistr/u16-strstr.c: New file.
4799         * lib/unistr/u32-strstr.c: New file.
4800         * lib/unistr/u-strstr.h: New file.
4801
4802         * modules/unistr/u8-strtok: New file.
4803         * modules/unistr/u16-strtok: New file.
4804         * modules/unistr/u32-strtok: New file.
4805         * lib/unistr/u8-strtok.c: New file.
4806         * lib/unistr/u16-strtok.c: New file.
4807         * lib/unistr/u32-strtok.c: New file.
4808         * lib/unistr/u-strtok.h: New file.
4809
4810         * modules/unistr/u8-uctomb: New file.
4811         * modules/unistr/u16-uctomb: New file.
4812         * modules/unistr/u32-uctomb: New file.
4813         * lib/unistr/u8-uctomb.c: New file.
4814         * lib/unistr/u16-uctomb.c: New file.
4815         * lib/unistr/u32-uctomb.c: New file.
4816
4817         * MODULES.html.sh (Unicode string functions): Add the new modules.
4818
4819 2007-01-08  Bruno Haible  <bruno@clisp.org>
4820
4821         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
4822         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
4823         subdirectories.
4824
4825 2007-01-08  Karl Berry  <karl@gnu.org>
4826
4827         * doc/error.texi: mention that main() fns must set program_name
4828         when progname is used.
4829
4830 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
4831
4832         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
4833         WCTYPE_H is empty, for the benefit of builds from non-distclean
4834         directories.  Problem reported by Eric Blake in
4835         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
4836
4837 2007-01-08  Bruno Haible  <bruno@clisp.org>
4838
4839         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
4840         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
4841         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
4842         PROVIDE_CANONICALIZE_FILENAME_MODE.
4843         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
4844
4845 2007-01-08  Bruno Haible  <bruno@clisp.org>
4846
4847         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
4848         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
4849         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
4850         * lib/fts.c: Likewise.
4851         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
4852
4853 2006-12-25  Bruno Haible  <bruno@clisp.org>
4854
4855         * modules/utf8-ucs4-safe: New file.
4856         * lib/utf8-ucs4-safe.h: New file.
4857         * lib/unistr/utf8-ucs4-safe.c: New file.
4858
4859         * modules/utf16-ucs4-safe: New file.
4860         * lib/utf16-ucs4-safe.h: New file.
4861         * lib/unistr/utf16-ucs4-safe.c: New file.
4862
4863         * MODULES.html.sh (Unicode string functions): Add the new modules.
4864
4865 2007-01-08  Bruno Haible  <bruno@clisp.org>
4866
4867         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
4868         (Depends-on): Add unitypes.
4869         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
4870         (u8_mbtouc_aux): Move out to separate file.
4871         (u8_mbtouc): Use ucs4_t, uint8_t types.
4872         * lib/unistr/utf8-ucs4.c: New file.
4873
4874         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
4875         (Depends-on): Add unitypes.
4876         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
4877         (u16_mbtouc_aux): Move out to separate file.
4878         (u16_mbtouc): Use ucs4_t, uint16_t types.
4879         * lib/unistr/utf16-ucs4.c: New file.
4880
4881         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
4882         (Depends-on): Add unitypes.
4883         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
4884         (u8_uctomb_aux): Move out to separate file.
4885         (u8_uctomb): Use ucs4_t, uint8_t types.
4886         * lib/unistr/ucs4-utf8.c: New file.
4887
4888         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
4889         (Depends-on): Add unitypes.
4890         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
4891         (u16_uctomb_aux): Move out to separate file.
4892         (u16_uctomb): Use ucs4_t, uint16_t types.
4893         * lib/unistr/ucs4-utf16.c: New file.
4894
4895 2006-12-25  Bruno Haible  <bruno@clisp.org>
4896
4897         * modules/unitypes: New file.
4898         * lib/unitypes.h: New file.
4899         * MODULES.html.sh (func_all_modules): New section "Unicode string
4900         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
4901         this section. Add unitypes.
4902
4903 2007-01-08  Bruno Haible  <bruno@clisp.org>
4904
4905         Avoid variable names that conflict with those from libtool.
4906         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
4907         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
4908         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
4909         library_names_spec to acl_library_names_spec, hardcode_* to
4910         acl_hardcode_*.
4911         Reported by Ralf Wildenhues.
4912
4913 2007-01-08  Bruno Haible  <bruno@clisp.org>
4914
4915         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
4916         definition.
4917         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
4918         definition.
4919         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
4920         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
4921         definition.
4922         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
4923         definition.
4924         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
4925         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
4926         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
4927         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
4928         definition.
4929         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
4930         definition.
4931         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
4932         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
4933         GC_USE_<algorithm>.
4934         * lib/gc-libgcrypt.c: Likewise.
4935         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
4936         * modules/gc-arctwo (configure.ac): Likewise.
4937         * modules/gc-des (configure.ac): Likewise.
4938         * modules/gc-hmac-md5 (configure.ac): Likewise.
4939         * modules/gc-hmac-sha1 (configure.ac): Likewise.
4940         * modules/gc-md2 (configure.ac): Likewise.
4941         * modules/gc-md4 (configure.ac): Likewise.
4942         * modules/gc-md5 (configure.ac): Likewise.
4943         * modules/gc-random (configure.ac): Likewise.
4944         * modules/gc-rijndael (configure.ac): Likewise.
4945         * modules/gc-sha1 (configure.ac): Likewise.
4946
4947 2007-01-08  Bruno Haible  <bruno@clisp.org>
4948
4949         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
4950         macro definition.
4951         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
4952         definition.
4953         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
4954         definition.
4955         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
4956         * modules/fcntl-safer (configure.ac): Likewise.
4957         * modules/fopen-safer (configure.ac): Likewise.
4958         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
4959         GNULIB_FWRITEERROR macro definition.
4960
4961 2007-01-08  Bruno Haible  <bruno@clisp.org>
4962
4963         * m4/gnulib-common.m4: New file.
4964         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
4965         (func_get_filelist): Add m4/gnulib-common.m4.
4966
4967 2007-01-08  Bruno Haible  <bruno@clisp.org>
4968
4969         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
4970         command.
4971
4972 2007-01-08  Jim Meyering  <jim@meyering.net>
4973
4974         Use a more robust test for a "can't happen" condition.
4975         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
4976         narrowed the st_size value.  Presuming the "can't happen" condition
4977         is true, that narrowing could conceivably convert an invalid st_size
4978         value into a valid one.  Instead, use a change based on Matthew
4979         Woehlke's original patch.
4980
4981         Slight readability improvement: use an assert-like macro
4982         in place of literal "abort ()" uses.
4983         * lib/fts.c (fts_assert): Define.
4984         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
4985         Use this macro instead of a bare 'abort'.
4986
4987 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
4988
4989         Don't worry about using IRIX 5.3's wctype.h broken definitions;
4990         simply work around them.
4991         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
4992         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
4993         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
4994         declaring.
4995         Don't bother to define as macros, since the standard doesn't require it.
4996         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
4997         longer worry about IRIX 5.3.
4998         (HAVE_WCTYPE_CTMP_BUG): Remove.
4999
5000 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
5001
5002         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
5003         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
5004         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
5005         Problems reported by Georg Schwarz for IRIX 5.3.
5006
5007         * gnulib-tool (autoconf_minversion): Take the maximum version number
5008         found, not the minimum.  Problem reported by James Youngman.
5009
5010 2007-01-03  Karl Berry  <karl@gnu.org>
5011
5012         * doc/error.texi: new file, explaining interaction with progname.
5013         * doc/gnulib.texi: include it.  Update copyright.
5014
5015 2007-01-03  Simon Josefsson  <simon@josefsson.org>
5016
5017         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
5018         AC_CANONICAL_HOST, to improve autobuild outputs.
5019
5020 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
5021             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
5022
5023         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
5024         sockets, server sockets, and other file descriptors.  Count errors
5025         to compute the return value.  Reorder the code a bit to be easier
5026         to follow.  Don't set event bits that were not requested (except
5027         POLLERR and POLLHUP).
5028
5029 2007-01-01  Bruno Haible  <bruno@clisp.org>
5030
5031         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
5032
5033 2007-01-03  Jim Meyering  <jim@meyering.net>
5034
5035         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
5036
5037 2007-01-02  Bruno Haible  <bruno@clisp.org>
5038
5039         * modules/settime (Include): Require timespec.h.
5040         * modules/nanosleep (Include): Likewise.
5041
5042 2007-01-01  Bruno Haible  <bruno@clisp.org>
5043
5044         * gnulib-tool (func_emit_copyright_notice): Bump year.
5045         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
5046
5047 2007-01-01  Bruno Haible  <bruno@clisp.org>
5048
5049         Improve support for OpenBSD.
5050         * build-aux/config.rpath (libname_spec): Export.
5051         (library_names_spec): New variable. Export.
5052         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
5053         library_names_spec from the config.rpath output. Locate shared library
5054         through the name pattern in library_names_spec.
5055
5056 2007-01-01  Eric Blake  <ebb9@byu.net>
5057
5058         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
5059
5060 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
5061
5062         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
5063         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
5064         assume the C locale, and avoid an "eval" that could cause trouble.
5065         Problem with SORT reported by Bob Proulx.
5066
5067         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
5068         Define.  Trivial patch from Henning Nielsen Lund, originally
5069         sent to bug-grep@gnu.org today.
5070
5071 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
5072
5073         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
5074         struct stat.  Problem reported by Henning Nielsen Lund.
5075         * lib/acl.c: Include acl.h first, to check interface.  Don't
5076         bother to include sys/types.h and sys/stat.h again.
5077
5078 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
5079
5080         Import the following change from libc; problem reported by
5081         Sven Verdoolaege.
5082
5083         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
5084
5085         [BZ #1373]
5086         * lib/argp.h: Remove __NTH for __argp_usage inline function.
5087
5088 2006-12-28  Jim Meyering  <jim@meyering.net>
5089
5090         * build-aux/announce-gen: Do not assume that the package
5091         builds any of tar.gz, tar.bz2, and .xdelta files.
5092         Suggestion from Simon Josefsson.
5093
5094 2006-12-28  Simon Josefsson  <simon@josefsson.org>
5095
5096         * modules/announce-gen: New file.
5097
5098 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
5099
5100         * lib/mbchar.h: Just include <wctype.h>; the wctype module
5101         handles its gotchas now.
5102         * lib/mbswidth.c: Likewise.
5103         * lib/wcwidth.h: Likewise.
5104         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
5105         and iswcntrl; the wctype module does this stuff now.
5106         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
5107         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
5108         * modules/mbchar (Depends-on): Add wctype.
5109         * modules/mbswidth (Depends-on): Likewise.
5110         * modules/wcwidth (Depends-on): Likewise.
5111
5112 2006-12-27  Eric Blake  <ebb9@byu.net>
5113
5114         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
5115         module uses more than what <wctype.h> is required to provide.
5116
5117 2006-12-26  Eric Blake  <ebb9@byu.net>
5118
5119         * gnulib-tool (sed_extract_prog): Avoid space-tab.
5120
5121 2006-12-26  Eric Blake  <ebb9@byu.net>
5122
5123         * modules/absolute-header: New module.
5124         * modules/fcntl (Depends-on): Depend on it.
5125         * modules/inttypes (Depends-on): Likewise.
5126         * modules/stdint (Depends-on): Likewise.
5127         * modules/sys_stat (Depends-on): Likewise.
5128         * modules/wctype (Depends-on): Likewise.
5129         * MODULES.html.sh (Support for building libraries and
5130         executables): Document it.
5131
5132 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
5133
5134         * gnulib-tool (SED): Remove, undoing previous change.
5135         The problem was that it broke coreutils on Solaris, because
5136         "sed --posix" leaked into a makefile.
5137         (sed): New alias, if 'alias' and GNU sed.
5138
5139 2006-12-24  Jim Meyering  <jim@meyering.net>
5140
5141         Work around an fchownat bug in glibc-2.4:
5142         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
5143         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
5144         in spite of the -P option.
5145         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
5146         New macros.
5147         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
5148         * modules/openat (Files): Add lib/fchownat.c.
5149         * lib/openat.c (fchownat): Don't define here.  Move to...
5150         * lib/fchownat.c: ...this new file.
5151
5152 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
5153
5154         Fix bug reported by Bruno Haible in
5155         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
5156         where quotearg.c didn't compile on Mac OS X 10.2 because it
5157         lacks <wchar.h> and wint_t.
5158         * lib/wctype_.h (__wctype_wint_t): New type.
5159         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
5160         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
5161         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
5162         Arg is now of type __wctype_wint_t, not wint_t.
5163         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
5164         substitute HAVE_WINT_T.
5165         * modules/wctype (Files): Add m4/wint_t.m4.
5166         (wctype.h): Substitute HAVE_WINT_T.
5167
5168 2006-12-23  Bruno Haible  <bruno@clisp.org>
5169
5170         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
5171
5172 2006-12-23  Bruno Haible  <bruno@clisp.org>
5173
5174         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
5175         S_ISLNK.
5176         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
5177         mingw.
5178
5179 2006-12-22  Bruno Haible  <bruno@clisp.org>
5180
5181         * lib/copy-file.c: Include acl.h.
5182         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
5183         Close the file descriptors only after being done with copy_acl.
5184         * modules/copy-file (Depends-on): Add acl.
5185
5186 2006-12-22  Bruno Haible  <bruno@clisp.org>
5187
5188         * gnulib-tool (SED): New variable.
5189         Use $SED instead of sed everywhere.
5190
5191 2006-12-22  Bruno Haible  <bruno@clisp.org>
5192
5193         * modules/no-c++: New file.
5194         * m4/no-c++.m4: New file.
5195         * MODULES.html.sh (Support for building libraries and executables):
5196         Add no-c++.
5197
5198 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
5199
5200         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5201         Include <limits.h>, and use its INT_MAX to rewrite the
5202         j loop so that it does not overflow 'int'.  Problem reported by
5203         Ralf Wildenhues in
5204         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
5205         Play it safe by shifting left by 1 rather than multiplying by 2,
5206         as GCC is less likely to optimize this away when the value
5207         is signed (when it assumes overflow leads to undefined behavior).
5208         Also, don't assume time_t uses two's complement.
5209
5210 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
5211
5212         * MODULES.html.sh: New module wctype.
5213         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
5214         * lib/fnmatch.c: Don't bother to include <wchar.h> before
5215         <wctype.h>, since the new wctype module should fix this.
5216         * lib/quotearg.c: Include <wctype.h> unconditionally, since
5217         the wctype module should arrange for it.
5218         * lib/regex_internal.h: Likewise.
5219         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
5220         since the wctype module should handle this now.
5221         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
5222         * modules/fnmatch (Depends-on): Add wctype.
5223         * modules/quotearg (Depends-on): Likewise.
5224         * modules/regex (Depends-on): Likewise.
5225
5226 2006-12-19  Bruno Haible  <bruno@clisp.org>
5227
5228         * lib/strdup.h [C++]: Wrap definitions in extern "C".
5229         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
5230
5231 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5232
5233         * modules/savewd (Depends-on): Fix dependency on fcntl.
5234
5235 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5236
5237         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
5238         conforms to C99, rather than relying on the user's environment
5239         setting of STDINT_H.
5240
5241 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
5242         and Eric Blake  <ebb9@byu.net>
5243
5244         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
5245         This is more consistent with the other defines here.
5246         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
5247         Port to z/OS.  Problem reported by Paul Gilmartin.
5248         Change local vars to use gl_ prefix rather than ac_.
5249         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
5250         with other defines.
5251         * modules/double-slash-root: New module.
5252         * modules/dirname (Files): Remove m4/double-slash-root.m4.
5253         (Depends-on): Add double-slash-root.
5254         * MODULES.html.sh (File system functions): Mention new module.
5255
5256 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
5257
5258         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
5259         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
5260         This is for the benefit of gzip, which doesn't do i18n.
5261
5262 2006-12-12  Jim Meyering  <jim@meyering.net>
5263
5264         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
5265         Reported by Andreas Schwab <schwab@suse.de>.
5266
5267 2006-12-12  Bruno Haible  <bruno@clisp.org>
5268
5269         Merge these changes.
5270         2006-09-05  Bruno Haible  <bruno@clisp.org>
5271         * lib/iconvme.c (iconv_string): No need to save and restore errno when
5272         iconv_alloc succeeded.
5273         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
5274         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
5275         test for " && dest " at the end - dest is always != NULL there. Call
5276         iconv with 4xNULL arguments initially, to reset the state. Call iconv
5277         with 2xNULL arguments, also to flush the state storage. Handle the
5278         IRIX iconv behaviour. Realloc the final result, to throw away unused
5279         memory.
5280
5281 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
5282
5283         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
5284         and fchmodat unconditionally, since glibc 2.4 has them.
5285         Problem reported by Arkadiusz Miskiewicz.
5286
5287 2006-12-10  Bruno Haible  <bruno@clisp.org>
5288
5289         * gnulib-tool (func_import): Show the include files only for those
5290         modules that are copied and specified.
5291         Reported by Karl Berry.
5292
5293 2006-12-08  Jim Meyering  <jim@meyering.net>
5294
5295         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
5296         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
5297
5298         * build-aux/announce-gen: Add two new options, both optional:
5299         --bootstrap-tools=TOOL_LIST
5300               a comma-separated list of tools, e.g.,
5301               autoconf,automake,bison,gnulib
5302         --gnulib-snapshot-date=DATE
5303               if gnulib is in the bootstrap tool list,
5304               then report this as the snapshot date.
5305               If not specified, use the current date/time.
5306               If you specify a date here, be sure it's UTC.
5307
5308 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5309
5310         * tests/test-argp-2.sh: Fix test to match actual output.
5311         (func_compare): Fix sed script to be portable.
5312
5313 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
5314
5315         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
5316         workaround for this case.  It is not autoconfigured now; offhand
5317         it's hard to see how to autoconfigure it.
5318
5319 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
5320
5321         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
5322         a directory that is about to be chowned.  Such a directory's
5323         initial file permissions should permit the owner only and this
5324         should not be changed until after the chown, since the group and
5325         other bits would be incorrect if they granted permission before
5326         the chown.
5327
5328         Fix porting problem for iswctype reported by Georg Schwarz in:
5329         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
5330         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
5331         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
5332         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
5333         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
5334
5335 2006-12-03  Jim Meyering  <jim@meyering.net>
5336
5337         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
5338         p->fts_statp may not yet be defined.
5339         (fts_read): Instead, set it in the caller, once p->fts_statp is
5340         sure to be defined, and corresponds to a top-level directory.
5341         This bug made du -x fail.  Here's the coreutils test case:
5342         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
5343         Reported by Mike Frysinger.
5344
5345 2006-12-01  Jim Meyering  <jim@meyering.net>
5346
5347         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
5348         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
5349         Reported by Simon Josefsson.
5350
5351 2006-11-30  Jim Meyering  <jim@meyering.net>
5352
5353         * m4/warning.m4: Use the all-permissive copyright notice
5354         recommended by RMS (rather than LGPL).
5355         * m4/vararrays.m4: Likewise.
5356         * m4/flexmember.m4: Likewise.
5357
5358 2006-11-29  Bruno Haible  <bruno@clisp.org>
5359
5360         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5361         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
5362         using +=.
5363         Reported by Simon Josefsson <simon@josefsson.org>.
5364
5365 2006-11-28  James Youngman <jay@gnu.org>
5366
5367         * README: Advise users that they might find the bug-gnulib@gnu.org
5368         and autotools-announce@gnu.org mailing lists useful.
5369
5370 2006-11-28  Bruno Haible  <bruno@clisp.org>
5371
5372         * m4/ptrdiff_max.m4: Remove file.
5373
5374 2006-11-21  Bruno Haible  <bruno@clisp.org>
5375
5376         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
5377         _AC_COMPUTE_INT.
5378         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5379         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
5380         _AC_COMPUTE_INT.
5381         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5382         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
5383         _AC_COMPUTE_INT.
5384         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5385
5386 2006-11-28  Jim Meyering  <jim@meyering.net>
5387
5388         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
5389         warning from "gcc -Wshadow" about shadowing the builtin.
5390
5391 2006-11-27  Bruno Haible  <bruno@clisp.org>
5392
5393         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
5394         _AC_COMPUTE_INT.
5395         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
5396
5397 2006-11-27  Bruno Haible  <bruno@clisp.org>
5398             Paul Eggert  <eggert@cs.ucla.edu>
5399
5400         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
5401
5402 2006-11-26  Bruno Haible  <bruno@clisp.org>
5403
5404         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5405         noinst_LTLIBRARIES.
5406
5407 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
5408             Bruno Haible  <bruno@clisp.org>
5409
5410         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
5411         if compiling with "gcc -ansi".
5412
5413 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
5414
5415         Fix some incompatibilities with gcc -ansi -pedantic.
5416         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
5417         if compiling pedantically with GCC, unless it's C99 or later.
5418         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
5419         it mishandles gcc -ansi -pedantic as well.
5420         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
5421         if gcc -pedantic.
5422         * lib/regexec.c (check_node_accept_bytes): Don't use auto
5423         initializers for struct if -pedantic, unless it's C99 or later.
5424
5425 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
5426
5427         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
5428         Don't close an fd more than once. Identical atimes indicate
5429         success, not failure.
5430
5431 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
5432
5433         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
5434
5435 2006-11-23  Jim Meyering  <jim@meyering.net>
5436
5437         * build-aux/announce-gen: New file.  From coreutils.
5438
5439 2006-11-22  Jim Meyering  <jim@meyering.net>
5440
5441         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
5442         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
5443         (fts_read): Use a temporary to narrow the overused st_size member
5444         before using it in a switch statement.  Reported by Matthew Woehlke.
5445
5446         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
5447         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
5448
5449 2006-11-20  Bruno Haible  <bruno@clisp.org>
5450
5451         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
5452         changequote instead of pairs of brackets.
5453         Reported by Andreas Schwab <schwab@suse.de>.
5454
5455 2006-11-21  Jim Meyering  <jim@meyering.net>
5456
5457         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
5458         so as to remain compatible with older compilers.
5459         Patch from Michael Deutschmann.
5460
5461 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
5462
5463         * MODULES.html.sh (File system functions): Add openat.
5464
5465         * lib/openat.h (rpl_fstatat): New macro, if
5466         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
5467         (fstatat): Define to rpl_fstatat under the same conditions,
5468         unless COMPILING_FSTATAT.
5469         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
5470         seems to have the bug.
5471         * lib/fstatat.c: New file.
5472         * modules/openat (Files): Add it.
5473
5474 2006-11-20  Bruno Haible  <bruno@clisp.org>
5475
5476         * Makefile: New file.
5477
5478 2006-11-20  Jim Meyering  <jim@meyering.net>
5479
5480         The beginnings of syntax-related checks for gnulib.
5481         * lib/Makefile: New file.
5482         * lib/t-idcache: New script.  Ensure that the two halves of
5483         idcache.c stay in sync.
5484
5485         * lib/idcache.c: Adjust comments in user- and group- portions to
5486         be more accurate, and to be consistent with one another.
5487
5488 2006-11-20  Jim Meyering  <jim@meyering.net>
5489
5490         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
5491         continue using the flexible array member (thus, this module performs
5492         half as many malloc calls), with the addition that...
5493         (getgroup, getuser): Consistently record a non-match via an empty
5494         "name" string, and map an empty string match to a NULL return value.
5495         * modules/idcache (Depends-on): Re-add flexmember.
5496
5497         * lib/idcache.c (getuser): Remove all uses of the register keyword.
5498         (getuidbyname, getgroup, getgidbyname): Likewise.
5499
5500         Use cleaner syntax: NULL rather than 0.
5501         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
5502
5503 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
5504
5505         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
5506         It mishandled the case where the group was missing.
5507         Problem reported by Greg Schafer.
5508         * modules/idcache: Likewise.
5509
5510 2006-11-18  Jim Meyering  <jim@meyering.net>
5511
5512         * check-module (%exempt_header): Add exception for some
5513         conditionally-included headers.
5514
5515         * modules/i-ring (Depends-on): Add verify.
5516         (License): Change to LGPL.
5517
5518 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
5519
5520         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
5521         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
5522         and inttostr.h.  Use snprintf rather than uinttostr, so that
5523         LGPLed code doesn't depend on GPLed.
5524
5525 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
5526
5527         * modules/inline (License): Change from GPL to LGPL.
5528
5529 2006-11-17  Jim Meyering  <jim@meyering.net>
5530
5531         * modules/d-type (License): Switch to LGPL.
5532
5533 2006-11-15  Bruno Haible  <bruno@clisp.org>
5534
5535         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
5536
5537 2006-11-15  Eric Blake  <ebb9@byu.net>
5538
5539         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
5540         the module dependency.
5541
5542 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
5543             Bruno Haible  <bruno@clisp.org>
5544
5545         * gnulib-tool (func_create_testdir): Add license consistency check.
5546
5547 2006-11-15  Eric Blake  <ebb9@byu.net>
5548
5549         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
5550         random "(cached)" in configure output.
5551
5552 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5553
5554         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
5555         test for conforming inttypes.h is both announced and cached.
5556
5557         * MODULES.html.sh (seen_modules, seen_files): New variables.
5558         (func_module): Rewrite to use a few less gnulib-tool and sed
5559         invocations.  Avoid a couple of quadratic algorithms for ...
5560         (missed_modules, missed_files): ... these, with ...
5561         (func_append, func_tmpdir): ... these new functions, from
5562         gnulib-tool.  Analogously, install traps for cleanup.
5563
5564         * tests/test-gc.c (main): Remove unused variables.
5565         * tests/test-read-file.c: Include stdlib.h, for 'free'.
5566
5567 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
5568
5569         * modules/inttostr (License): Change to LGPL.
5570
5571 2006-11-14  Eric Blake  <ebb9@byu.net>
5572
5573         * modules/tempname (License): Change to LGPL.
5574
5575 2006-11-14  Eric Blake  <ebb9@byu.net>
5576
5577         * doc/functions.texi (Function Portability): *printf functions on
5578         Cygwin now understand all POSIX size specifiers.
5579
5580 2006-11-14  Bruno Haible  <bruno@clisp.org>
5581
5582         * modules/c-ctype (License): Change to LGPL.
5583
5584 2006-11-12  Bruno Haible  <bruno@clisp.org>
5585
5586         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
5587         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
5588         for GNOME libraries, for which the include files are installed in
5589         subdirectories of $prefix/include.
5590
5591 2006-11-12  Bruno Haible  <bruno@clisp.org>
5592
5593         * m4/lib-link.m4: Require at least autoconf-2.54.
5594         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
5595         name to underscores for the --with option.
5596
5597 2006-11-13  Bruno Haible  <bruno@clisp.org>
5598
5599         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
5600         the tests directory.
5601         Reported by Ralf Wildenhues.
5602
5603 2006-11-13  Bruno Haible  <bruno@clisp.org>
5604
5605         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
5606         (func_emit_initmacro_end): Undo the override here.
5607         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
5608         Works around the famous automake error in coreutils.
5609
5610 2006-11-13  Eric Blake  <ebb9@byu.net>
5611
5612         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
5613         element, not its node.
5614
5615 2006-11-12  Bruno Haible  <bruno@clisp.org>
5616
5617         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
5618         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
5619
5620 2006-11-12  Bruno Haible  <bruno@clisp.org>
5621
5622         * gnulib-tool: New option --local-symlink.
5623         (func_usage): Document it.
5624         (lsymbolic): New variable.
5625         (func_import, func_create_testdir): If --symlink was not specified,
5626         test whether --local-symlink was specified and the file comes from
5627         the local_gnulib_dir.
5628
5629 2006-11-12  Bruno Haible  <bruno@clisp.org>
5630
5631         * gnulib-tool (func_ln): New function.
5632         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
5633
5634 2006-11-12  Bruno Haible  <bruno@clisp.org>
5635
5636         Finish support for source files in subdirectories.
5637         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
5638         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
5639         AUTOMAKE_OPTIONS.
5640         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
5641
5642 2006-11-12  Bruno Haible  <bruno@clisp.org>
5643
5644         * gnulib-tool (func_get_automake_snippet): Synthesize also an
5645         EXTRA_lib_SOURCES augmentation.
5646         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
5647
5648 2006-11-12  Jim Meyering  <jim@meyering.net>
5649
5650         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
5651         file descriptors.  This also averts a failure on systems with
5652         native openat support when a traversed directory lacks "x" access.
5653         * lib/fts_.h: Include "i-ring.h"
5654         (struct FTS) [fts_fd_ring]: New member.
5655         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
5656         (FCHDIR): Add parentheses.
5657         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
5658         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
5659         When descending, rather than simply closing the previous
5660         fts_cwd_fd value, push that file descriptor onto the ring.
5661         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
5662         (fts_open): Initialize the new fd_ring member.
5663         (fts_close): Clear the ring.
5664         (fts_safe_changedir): When possible, use our new fd_ring to skip
5665         the diropen and fstat and dev/ino comparison that would normally
5666         accompany a virtual `chdir ("..")'.
5667
5668         * modules/fts (Depends-on): Add i-ring.
5669         * modules/i-ring: New module.
5670         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
5671         * m4/i-ring.m4: New file.
5672
5673 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5674
5675         * gnulib-tool (func_create_testdir): Fix replacement of
5676         `build-aux' in configure.ac.  Run autotools in gltests
5677         subdirectory.
5678         (func_create_testdir, func_create_megatestdir, test): There is
5679         no need for '--force' in most autotool invocations in a new
5680         tree.  Actually fail the whole test if any of the tools, or the
5681         configure or make stages fail.
5682
5683         Sync from Automake.
5684         * build-aux/gnupload: Revert last change.  Add pointer to upload
5685         instructions of the GNU Maintenance Instructions.
5686         Suggestion by Karl Berry.
5687
5688 2006-11-10  Jim Meyering  <jim@meyering.net>
5689
5690         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
5691
5692 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5693
5694         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
5695         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
5696         (bind_textdomain_codeset) [! ENABLE_NLS]:
5697         Evaluate all the arguments.  That way, callers get compatible behavior
5698         if the arguments have side effects.  Also, it avoids some GCC
5699         diagnostics in some cases; Joel E. Denny reported problems when Bison
5700         was configured with --enable-gcc-warnigs.
5701
5702 2006-11-10  Jim Meyering  <jim@meyering.net>
5703
5704         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
5705         relevant options in CFLAGS (like -O, -fno-inline) are taken into
5706         account.
5707
5708 2006-11-10  Jim Meyering  <jim@meyering.net>
5709
5710         * modules/inline: New file/module.
5711         * modules/xalloc (Files): Remove m4/inline.m4.
5712         (Depends-on): Add inline, instead.
5713         * modules/oset: Likewise.
5714         * modules/list: Likewise.
5715
5716 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
5717
5718         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
5719         Problem reported by Matthew Woehlke.
5720
5721 2006-11-09  Bruno Haible  <bruno@clisp.org>
5722
5723         * lib/tempname.c (gen_tempname): Remove variant that invokes
5724         __gen_tempname.
5725         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
5726         __gen_tempname.
5727
5728 2006-11-08  Bruno Haible  <bruno@clisp.org>
5729
5730         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
5731         to 'yes' instead of 'cross-compiling'.
5732
5733 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
5734
5735         * lib/quotearg.h (quotearg_free): New decl.
5736         * lib/quotearg.c (quotearg_free): New function.
5737         (slot0, nslots, slotvec0, slotvec):
5738         Now file-scope so that quotearg_free can get at them.
5739
5740 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5741
5742         Sync from Automake.
5743         * build-aux/gnupload: Add missing 'gnu' to example URL.
5744         Report by Karl Berry.
5745
5746 2006-11-08  Bruno Haible  <bruno@clisp.org>
5747
5748         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
5749         Suggested by Paul Eggert.
5750
5751 2006-11-08  Jim Meyering  <jim@meyering.net>
5752
5753         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
5754         It's already included if !_LIBC.
5755         (fts_safe_changedir): Add a comment.
5756
5757 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
5758
5759         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
5760         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
5761         Matthew Woehlke.
5762
5763         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
5764         definitions up, to avoid colliding with change below.
5765         (static_inline) [HAVE_INLINE]: New macro.
5766         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
5767         Provide extern decls when !HAVE_INLINE.  Do not define unless
5768         static_inline is defined, either by us or by xmalloc.c.  Use
5769         static_inline rather than static inline.
5770         (XCALLOC): Optimize sizeof(T) = 1 case.
5771         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
5772
5773 2006-11-07  Bruno Haible  <bruno@clisp.org>
5774
5775         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
5776         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
5777         AC_C_INLINE.
5778         * modules/xalloc (Files): Add m4/inline.m4.
5779
5780 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5781
5782         * README: Fix typo.
5783         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
5784         (Miscellanous Notes): ...from this.
5785
5786 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
5787
5788         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
5789         Mention that offsetof should be used instead of sizeof.
5790         From Bruno Haible.
5791
5792 2006-11-07  Bruno Haible  <bruno@clisp.org>
5793
5794         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
5795
5796 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
5797
5798         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
5799         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
5800         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
5801         (gl_tree_add_before, gl_tree_add_after):
5802         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
5803         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
5804         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
5805         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
5806         (gl_linked_add_after, gl_linked_add_at): Likewise.
5807         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
5808         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
5809         (gl_tree_add_before, gl_tree_add_after): Likewise.
5810         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
5811         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
5812         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
5813
5814 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5815
5816         * lib/gl_oset.h: Use C comment style, not C++ comment style.
5817
5818 2006-11-06  Bruno Haible  <bruno@clisp.org>
5819
5820         * m4/inline.m4: New file.
5821         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
5822         * modules/list (Files): Add m4/inline.m4.
5823         * modules/oset (Files): Likewise.
5824
5825 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
5826
5827         * lib/idcache.c: Include <stddef.h>, for offsetof.
5828         (struct userid.name): Change from char * to a flexible array member.
5829         All uses changed.
5830         * modules/idcache (Depends-on): Add flexmember.
5831
5832         * MODULES.html.sh (Core language properties): New module flexmember.
5833         * modules/flexmember, m4/flexmember.m4: New files.
5834
5835         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
5836         inline functions that are identical with the old xnmalloc_inline,
5837         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
5838         that we can avoid some unnecessary integer multiplications and
5839         divisions in the common case where the element size is known at
5840         compile time.
5841         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
5842         needed.
5843         (xnboundedmalloc): Remove.
5844         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
5845         arguments, for consistency with rest of this header.
5846         (xcharalloc): Rewrite using XNMALLOC.
5847         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
5848         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
5849         versions have been moved to lib/xalloc.h and renamed to be the
5850         non-*_inline versions.
5851         (xmalloc, xrealloc): Implement without reference to the xnmalloc
5852         and xnrealloc functions, since those functions are now inline and
5853         now call us.
5854         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
5855         renaming described above.
5856         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
5857         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
5858         captures the dependency in AC_C_INLINE.
5859
5860         New module canonicalize-lgpl, proposed by Charles Wilson in
5861         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
5862         with a few small changes afterwards.
5863         * MODULES.html.sh (File system functions): New module
5864         canonicalize-lgpl.
5865         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
5866         and canonicalize_file_name.
5867         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
5868         * modules/canonicalize-lgpl: New files.
5869
5870 2006-11-05  Bruno Haible  <bruno@clisp.org>
5871
5872         * gnulib-tool (func_import, func_create_testdir): Create directories
5873         also for files in subdirectories of lib/.
5874
5875 2006-11-05  Bruno Haible  <bruno@clisp.org>
5876
5877         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
5878         ANSI C compliant.
5879
5880 2006-11-03  Bruno Haible  <bruno@clisp.org>
5881
5882         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
5883         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
5884         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
5885         (xnboundedmalloc): New inline function.
5886         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
5887         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
5888         xmalloc.
5889         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
5890         xmalloc.
5891         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
5892         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
5893         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
5894         xmalloc.
5895         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
5896         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
5897         xmalloc.
5898         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
5899         gl_tree_add_after): Use XMALLOC instead of xmalloc.
5900         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
5901         xmalloc.
5902         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
5903         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
5904         gl_tree_add_after): Use XMALLOC instead of xmalloc.
5905         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
5906         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
5907         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
5908         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
5909
5910 2006-11-03  Bruno Haible  <bruno@clisp.org>
5911
5912         * lib/c-ctype.h [C++]: Define functions without name mangling.
5913         * lib/fwriteerror.h [C++]: Likewise.
5914         * lib/gcd.h [C++]: Likewise.
5915         * lib/linebreak.h [C++]: Likewise.
5916
5917 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
5918
5919         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
5920         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
5921         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
5922         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5923         Check for functions and headers just once.
5924         Check for declaration of canonicalize_file_name.
5925         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
5926
5927 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5928
5929         * gnulib-tool (func_import): Fix typo in actioncmd.
5930
5931 2006-11-02  Bruno Haible  <bruno@clisp.org>
5932
5933         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
5934         newline sequence in the Makefile.am snippet as a space, like "make"
5935         does.
5936         Reported by Roger Persson <perrog@gmail.com>.
5937
5938 2006-11-01  Bruno Haible  <bruno@clisp.org>
5939
5940         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
5941         already declared in <string.h>.
5942         * lib/strcase.h (strncasecmp): Don't declare it if yes.
5943
5944 2006-11-01  Bruno Haible  <bruno@clisp.org>
5945
5946         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
5947         * lib/strcase.h: Include <string.h>.
5948         (strcasecmp): Define to rpl_strcasecmp here.
5949
5950 2006-11-01  Bruno Haible  <bruno@clisp.org>
5951
5952         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
5953
5954 2006-11-01  Eric Blake  <ebb9@byu.net>
5955
5956         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
5957
5958         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
5959
5960 2006-10-29  Bruno Haible  <bruno@clisp.org>
5961
5962         Make it compile in C++ mode.
5963         * lib/full-write.c (full_rw): Add a cast.
5964
5965 2006-11-01  Bruno Haible  <bruno@clisp.org>
5966
5967         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
5968         be POSIX compliant.
5969         Reported by Roger Persson <perrog@gmail.com>.
5970
5971 2006-11-01  Eric Blake  <ebb9@byu.net>
5972
5973         * lib/getopt_.h: Fix comments.
5974
5975 2006-10-31  Eric Blake  <ebb9@byu.net>
5976
5977         * modules/tmpdir (Depends-on): Add sys_stat.
5978         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
5979         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
5980         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
5981         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
5982         tempname.
5983
5984 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
5985
5986         Avoid some C++ diagnostics reported by Bruno Haible.
5987         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
5988         xmalloc.
5989         (quotearg_alloc): Use xcharalloc rather than xmalloc.
5990         (struct slotvec): Move to top level.
5991         (quotearg_n_options): Rewrite to avoid xmalloc.
5992         * lib/xalloc.h (xcharalloc): New function.
5993         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
5994         [defined __cplusplus]: Add function template that provides result
5995         type propagation.  This part of the change is from Bruno Haible.
5996
5997 2006-10-29  Bruno Haible  <bruno@clisp.org>
5998
5999         Make it compile in C++ mode.
6000         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
6001         * lib/strnlen1.c (strnlen1): Cast memchr result.
6002         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
6003         * lib/clean-temp.c (string_equals, string_hash): Add casts.
6004         (create_temp_dir): Rename local variable 'template'.
6005         (compile_csharp_using_sscli): Add cast.
6006         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
6007         * lib/findprog.c (find_in_path): Likewise.
6008         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
6009         * lib/wait-process.c (register_slave_subprocess): Likewise.
6010
6011 2006-10-22  Bruno Haible  <bruno@clisp.org>
6012
6013         * modules/tsearch: New file.
6014         * lib/tsearch.h: New file.
6015         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
6016         * m4/tsearch.m4: New file.
6017         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
6018
6019 2006-10-29  Eric Blake  <ebb9@byu.net>
6020
6021         * lib/arcfour.c: Assume config.h.
6022         * lib/arctwo.c: Likewise.
6023         * lib/base64.c: Likewise.
6024         * lib/check-version.c: Likewise.
6025         * lib/crc.c: Likewise.
6026         * lib/des.c: Likewise.
6027         * lib/gc-gnulib.c: Likewise.
6028         * lib/gc-libgcrypt.c: Likewise.
6029         * lib/gc-pbkdf2-sha1.c: Likewise.
6030         * lib/getaddrinfo.c: Likewise.
6031         * lib/getdelim.c: Likewise.
6032         * lib/getline.c: Likewise.
6033         * lib/hmac-md5.c: Likewise.
6034         * lib/hmac-sha1.c: Likewise.
6035         * lib/iconvme.c: Likewise.
6036         * lib/md2.c: Likewise.
6037         * lib/md4.c: Likewise.
6038         * lib/memxor.c: Likewise.
6039         * lib/read-file.c: Likewise.
6040         * lib/readline.c: Likewise.
6041         * lib/rijndael-alg-fst.c: Likewise.
6042         * lib/rijndael-api-fst.c: Likewise.
6043         * lib/xgetdomainname.c: Likewise.
6044
6045 2006-10-28  Eric Blake  <ebb9@byu.net>
6046
6047         * lib/xstrndup.c: Assume config.h.
6048
6049 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
6050
6051         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
6052         stat-macros.h is now for our own macros, whereas stat_h is for
6053         macros in the <sys/stat.h> name space.
6054         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
6055         (STAT_MACROS_H): Remove.
6056         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
6057         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
6058         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
6059         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
6060         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
6061         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
6062         Move these macros to ...
6063         * lib/stat_.h: here.  Don't include stat-macros.h.
6064         * lib/canonicalize.c: Don't include stat-macros.h.
6065         * lib/chown.c: Likewise.
6066         * lib/euidaccess.c: Likewise.
6067         * lib/file-type.c: Likewise.
6068         * lib/filemode.c: Likewise.
6069         * lib/glob.c: Likewise.
6070         * lib/isapipe.c: Likewise.
6071         * lib/lchown.c: Likewise.
6072         * lib/lstat.c: Likewise.
6073         * lib/mkdir-p.c: Likewise.
6074         * lib/rmdir.c: Likewise.
6075         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
6076         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
6077         unless mkdir isn't declared, to speed up 'configure'.
6078         Always create sys/stat.h, since it's unlikely any real sys/stat.h
6079         would define all the S_* symbols.
6080         * modules/canonicalize (Depends-on):
6081         Depend on sys_stat, not stat-macros.
6082         * modules/chown: Likewise.
6083         * modules/euidaccess: Likewise.
6084         * modules/filemode: Likewise.
6085         * modules/file-type: Likewise.
6086         * modules/glob: Likewise.
6087         * modules/isapipe: Likewise.
6088         * modules/lchown: Likewise.
6089         * modules/lstat: Likewise.
6090         * modules/mkancesdirs: Likewise.
6091         * modules/rmdir: Likewise.
6092         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
6093         * modules/modechange: Likewise.
6094         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
6095         (configure.ac): Remove gl_STAT_MACROS.
6096         * modules/sys_stat (Depends-on): Remove stat-macros.
6097
6098 2006-10-27  Bruno Haible  <bruno@clisp.org>
6099
6100         * m4/signed.m4: Remove file.
6101         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
6102         invocation.
6103         * modules/vasnprintf (Files): Remove m4/signed.m4.
6104
6105 2006-10-27  Bruno Haible  <bruno@clisp.org>
6106
6107         Update to GNU gettext 0.16.
6108         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
6109         m4/inttypes-h.m4, m4/signed.m4.
6110         * m4/gettext.m4: Update to GNU gettext 0.16.
6111         * m4/intl.m4: New file, from GNU gettext.
6112         * m4/intldir.m4: New file, from GNU gettext.
6113         * config/srclist.txt: Update
6114
6115 2006-10-27  Eric Blake  <ebb9@byu.net>
6116
6117         * MODULES.html.sh: Document tempname.
6118         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
6119         dependencies.
6120         (Files): Move lib/tempname.c...
6121         * modules/tempname: ...to this new module.
6122         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
6123         (gl_PREREQ_TEMPNAME): Move...
6124         * m4/tempname.m4: ...to this new file.
6125         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
6126         * modules/sys_stat (Depends-on): Add stat-macros.
6127         * lib/stat_.h (includes): Pick up stat macros.
6128         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
6129         if stat macros are broken.
6130         * lib/tempname.c (includes): No need to include "stat-macros.h".
6131         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
6132         (direxists, __path_search) [!_LIBC]: Don't compile these in
6133         gnulib; the tmpdir module covers that.
6134         * lib/tempname.h: New file.
6135
6136 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
6137
6138         * COPYING: Explain how gnulib-tool converts licence headers.
6139         Almost all wording by Eric Blake.
6140
6141 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
6142
6143         * lib/mbchar.h (is_basic_table): Make read-only.
6144         * lib/mbchar.c (is_basic_table): Likewise.
6145         Reported by John Darrington.
6146
6147 2006-10-25  Bruno Haible  <bruno@clisp.org>
6148
6149         * lib/progname.h (set_program_name): Undefine before defining.
6150
6151 2006-10-25  Bruno Haible  <bruno@clisp.org>
6152
6153         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
6154         false for non-gcc C++ compilers.
6155         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
6156
6157 2006-10-24  Bruno Haible  <bruno@clisp.org>
6158
6159         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
6160         iconv implementations like Irix iconv.
6161
6162 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6163
6164         * modules/vararrays: New file.
6165         * m4/vararrays.m4: New file, taken from diffutils.
6166         * MODULES.html.sh: New module vararrays.
6167
6168 2006-10-24  Karl Berry  <karl@gnu.org>
6169
6170         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
6171         Don't call GNU Unix.
6172
6173 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6174
6175         * users.txt: Add Libtool.
6176
6177         Sync from Libtool:
6178
6179         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6180
6181         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
6182         to gnulib's policy of including config.h unconditionally.
6183
6184 2006-10-24  Bruno Haible  <bruno@clisp.org>
6185
6186         * modules/wcwidth (Files): Add m4/wint_t.m4.
6187         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
6188         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
6189
6190 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
6191
6192         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
6193         to pacify GCC with some -W flags enabled.  Problem reported by
6194         Bruno Haible.
6195
6196 2006-10-24  Jim Meyering  <jim@meyering.net>
6197
6198         * MODULES.html.sh: Remove uinttostr.  It's not a module.
6199         Reported by Karl Berry.
6200
6201 2006-10-23  Bruno Haible  <bruno@clisp.org>
6202
6203         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
6204
6205 2006-10-24  Bruno Haible  <bruno@clisp.org>
6206
6207         * lib/gl_list.h: Use C comment style, not C++ comment style.
6208
6209 2006-10-23  Eric Blake  <ebb9@byu.net>
6210
6211         * lib/getaddrinfo.c (includes): Add missing include.
6212
6213 2006-10-23  Bruno Haible  <bruno@clisp.org>
6214             Paul Eggert  <eggert@cs.ucla.edu>
6215
6216         Ability to rename obstack_free.
6217         * lib/obstack.h (__obstack_free): New macro. Declare instead of
6218         obstack_free.
6219         (obstack_free): Invoke the __obstack_free macro.
6220         * lib/obstack.c (obstack_free): Use __obstack_free macro.
6221
6222 2006-10-23  Bruno Haible  <bruno@clisp.org>
6223             Paul Eggert  <eggert@cs.ucla.edu>
6224
6225         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
6226         __argc, __argv from the declaration. (They are defined as macros on
6227         mingw.)
6228
6229 2006-10-22  Bruno Haible  <bruno@clisp.org>
6230
6231         * doc/gnulib-intro.texi: New file.
6232         * doc/gnulib.texi: Include it.
6233
6234 2006-10-21  Bruno Haible  <bruno@clisp.org>
6235
6236         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
6237         "Introduction", "Miscellanous Notes", "Particular Modules".
6238
6239 2006-10-21  Bruno Haible  <bruno@clisp.org>
6240
6241         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6242         Change mostlyclean-local rule to avoid sh syntax error from bash
6243         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
6244
6245 2006-10-23  Jim Meyering  <jim@meyering.net>
6246
6247         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
6248         in place of snprintf.
6249
6250         * modules/inttostr (Files): Add lib/uinttostr.c.
6251         * lib/uinttostr.c (inttostr): New file/function.
6252         * lib/inttostr.h (uinttostr): Declare.
6253         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
6254         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
6255         Add uinttostr.
6256         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
6257
6258 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
6259
6260         * lib/canonicalize.c (ELOOP): Define if not already defined.
6261         Problem reported by Bruno Haible in
6262         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
6263
6264 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
6265
6266         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
6267         Problem reported by Perry Smith and Ville Laurikari.
6268
6269         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
6270         uses.
6271
6272 2006-10-19  Bruno Haible  <bruno@clisp.org>
6273
6274         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
6275         for mingw.
6276
6277 2006-10-19  Bruno Haible  <bruno@clisp.org>
6278
6279         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
6280         Needed for mingw.
6281
6282 2006-10-19  Bruno Haible  <bruno@clisp.org>
6283
6284         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
6285
6286 2006-10-19  Bruno Haible  <bruno@clisp.org>
6287
6288         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
6289         it.
6290
6291 2006-10-19  Bruno Haible  <bruno@clisp.org>
6292
6293         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
6294         invocation.
6295
6296 2006-10-19  Bruno Haible  <bruno@clisp.org>
6297
6298         * gnulib-tool (func_create_testdir): Don't include ftruncate and
6299         mountlist by default.
6300
6301 2006-10-16  Bruno Haible  <bruno@clisp.org>
6302
6303         * lib/c-strstr.c: Include c-strstr.h.
6304
6305 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6306
6307         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
6308         in a slash.
6309
6310 2006-10-18  Bruno Haible  <bruno@clisp.org>
6311
6312         * lib/lock.h [C++]: Wrap definitions in extern "C".
6313
6314 2006-10-18  Bruno Haible  <bruno@clisp.org>
6315
6316         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
6317         gl_LIBOBJS list.
6318
6319 2006-10-18  Bruno Haible  <bruno@clisp.org>
6320
6321         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
6322
6323 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
6324
6325         * lib/xstrtol.h: Include gettext.h.
6326         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
6327         Problem reported by Eric Blake.
6328         * modules/xstrtol (Depends-on): Add gettext-h.
6329
6330 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
6331
6332         * lib/strftime.c (advance): New macro.
6333         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
6334         incomplete type, so you can't add 0 to it.  Problem and patch
6335         reported by Eelco Dolstra for dietlibc.
6336
6337 2006-10-18  Jim Meyering  <jim@meyering.net>
6338
6339         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
6340         type for a local, and rename it: s/up/user_proc/.
6341
6342 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
6343
6344         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
6345         READ_UTMP_USER_PROCESS.
6346         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
6347
6348 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
6349
6350         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
6351         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
6352
6353 2006-10-17  Eric Blake  <ebb9@byu.net>
6354
6355         * lib/sigprocmask.c (sigprocmask): Fix typo.
6356
6357         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
6358
6359         * modules/clean-temp (Makefile.am): Don't add to make output...
6360         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
6361         config.h.
6362
6363 2006-10-17  Bruno Haible  <bruno@clisp.org>
6364
6365         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
6366         differently if DEFAULT_TEXT_DOMAIN is set.
6367
6368 2006-10-16  Bruno Haible  <bruno@clisp.org>
6369
6370         * lib/clean-temp.c: Include fwriteerror.h.
6371
6372 2006-10-16  Bruno Haible  <bruno@clisp.org>
6373
6374         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
6375
6376 2006-10-16  Bruno Haible  <bruno@clisp.org>
6377
6378         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
6379         * lib/sigprocmask.h: Include <sys/types.h>.
6380         (sigset_t): Use the system's definition if present.
6381
6382 2006-10-17  Eric Blake  <ebb9@byu.net>
6383
6384         * lib/xvasprintf.c (includes): Assume config.h.
6385         * lib/xasprintf.c (includes): Likewise.
6386
6387 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
6388
6389         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
6390         at least as wide as intmax_t.
6391
6392 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
6393
6394         (Imported from Automake.)
6395         * build-aux/gnupload: Update to version 1.1 of directive file.
6396
6397 2006-10-16  Eric Blake  <ebb9@byu.net>
6398
6399         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
6400         match Automake 1.10a.
6401
6402 2006-10-14  Bruno Haible  <bruno@clisp.org>
6403
6404         * modules/sigprocmask: New file.
6405         * lib/sigprocmask.h: New file.
6406         * lib/sigprocmask.c: New file.
6407         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
6408         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
6409         request sigprocmask.o.
6410         (gl_PREREQ_SIGPROCMASK): New macro.
6411         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
6412         (Depends-on): Add sigprocmask.
6413         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
6414         gt_SIGNALBLOCKING. Test for 'raise' only once.
6415         * lib/fatal-signal.c: Include sigprocmask.h.
6416         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
6417         unblock_fatal_signals): Define always.
6418         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
6419         sigprocmask.
6420
6421 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
6422
6423         Sync from Automake.
6424         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
6425         which incorrectly sets the mode of an existing destination
6426         directory.  In some cases the unpatched install-sh could do the
6427         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
6428         system.  We hope this is rare in practice, but it's clearly worth
6429         fixing.  Problem reported by Alex Unleashed in
6430         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
6431         Also, don't bother to check for -m bugs unless we're using -m;
6432         suggested by Stepan Kasal.
6433
6434 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6435
6436         Sync from Automake.
6437         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
6438         `-c' flag, so they appear at the same position as in %FASTDEP%
6439         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
6440         which ignores unknown options only after the first non-option.
6441         Bug report against M4 by Nelson H. F. Beebe.
6442
6443 2006-10-13  Jim Meyering  <jim@meyering.net>
6444
6445         Fix a bug in yesterday's change.
6446         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
6447         p->fts_statp->st_dev would be used uninitialized.
6448         Ensures that we always call fts_stat on the very first entry.
6449         Miklos Szeredi reported that find -xdev stopped working.
6450
6451 2006-10-12  Bruno Haible  <bruno@clisp.org>
6452
6453         * gnulib-tool (func_get_automake_snippet): Append an automatically
6454         computed EXTRA_DIST augmentation.
6455         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
6456         * modules/alloca-opt (Makefile.am): Likewise.
6457         * modules/allocsa (Makefile.am): Likewise.
6458         * modules/arcfour (Makefile.am): Likewise.
6459         * modules/arctwo (Makefile.am): Likewise.
6460         * modules/argmatch (Makefile.am): Likewise.
6461         * modules/argz (Makefile.am): Likewise.
6462         * modules/atexit (Makefile.am): Likewise.
6463         * modules/backupfile (Makefile.am): Likewise.
6464         * modules/byteswap (Makefile.am): Likewise.
6465         * modules/c-strtod (Makefile.am): Likewise.
6466         * modules/c-strtold (Makefile.am): Likewise.
6467         * modules/calloc (Makefile.am): Likewise.
6468         * modules/canon-host (Makefile.am): Likewise.
6469         * modules/canonicalize (Makefile.am): Likewise.
6470         * modules/chdir-long (Makefile.am): Likewise.
6471         * modules/chdir-safer (Makefile.am): Likewise.
6472         * modules/check-version (Makefile.am): Likewise.
6473         * modules/chown (Makefile.am): Likewise.
6474         * modules/cloexec (Makefile.am): Likewise.
6475         * modules/close-stream (Makefile.am): Likewise.
6476         * modules/closeout (Makefile.am): Likewise.
6477         * modules/crc (Makefile.am): Likewise.
6478         * modules/csharpexec (Makefile.am): Likewise.
6479         * modules/cycle-check (Makefile.am): Likewise.
6480         * modules/des (Makefile.am): Likewise.
6481         * modules/dev-ino (Makefile.am): Likewise.
6482         * modules/dirfd (Makefile.am): Likewise.
6483         * modules/dirname (Makefile.am): Likewise.
6484         * modules/dup2 (Makefile.am): Likewise.
6485         * modules/eealloc (Makefile.am): Likewise.
6486         * modules/error (Makefile.am): Likewise.
6487         * modules/euidaccess (Makefile.am): Likewise.
6488         * modules/exclude (Makefile.am): Likewise.
6489         * modules/exitfail (Makefile.am): Likewise.
6490         * modules/fcntl-safer (Makefile.am): Likewise.
6491         * modules/fcntl (Makefile.am): Likewise.
6492         * modules/file-type (Makefile.am): Likewise.
6493         * modules/fileblocks (Makefile.am): Likewise.
6494         * modules/filemode (Makefile.am): Likewise.
6495         * modules/filenamecat (Makefile.am): Likewise.
6496         * modules/fnmatch (Makefile.am): Likewise.
6497         * modules/fopen-safer (Makefile.am): Likewise.
6498         * modules/fpending (Makefile.am): Likewise.
6499         * modules/fprintftime (Makefile.am): Likewise.
6500         * modules/free (Makefile.am): Likewise.
6501         * modules/fsusage (Makefile.am): Likewise.
6502         * modules/ftruncate (Makefile.am): Likewise.
6503         * modules/fts (Makefile.am): Likewise.
6504         * modules/gc-arcfour (Makefile.am): Likewise.
6505         * modules/gc-des (Makefile.am): Likewise.
6506         * modules/gc-hmac-md5 (Makefile.am): Likewise.
6507         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
6508         * modules/gc-md4 (Makefile.am): Likewise.
6509         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
6510         * modules/gc-sha1 (Makefile.am): Likewise.
6511         * modules/gc (Makefile.am): Likewise.
6512         * modules/getaddrinfo (Makefile.am): Likewise.
6513         * modules/getcwd (Makefile.am): Likewise.
6514         * modules/getdelim (Makefile.am): Likewise.
6515         * modules/getdomainname (Makefile.am): Likewise.
6516         * modules/getgroups (Makefile.am): Likewise.
6517         * modules/gethostname (Makefile.am): Likewise.
6518         * modules/gethrxtime (Makefile.am): Likewise.
6519         * modules/getline (Makefile.am): Likewise.
6520         * modules/getloadavg (Makefile.am): Likewise.
6521         * modules/getlogin_r (Makefile.am): Likewise.
6522         * modules/getndelim2 (Makefile.am): Likewise.
6523         * modules/getopt (Makefile.am): Likewise.
6524         * modules/getpagesize (Makefile.am): Likewise.
6525         * modules/getpass-gnu (Makefile.am): Likewise.
6526         * modules/getpass (Makefile.am): Likewise.
6527         * modules/getsubopt (Makefile.am): Likewise.
6528         * modules/gettime (Makefile.am): Likewise.
6529         * modules/gettimeofday (Makefile.am): Likewise.
6530         * modules/getugroups (Makefile.am): Likewise.
6531         * modules/getusershell (Makefile.am): Likewise.
6532         * modules/glob (Makefile.am): Likewise.
6533         * modules/group-member (Makefile.am): Likewise.
6534         * modules/hard-locale (Makefile.am): Likewise.
6535         * modules/hash (Makefile.am): Likewise.
6536         * modules/hmac-md5 (Makefile.am): Likewise.
6537         * modules/hmac-sha1 (Makefile.am): Likewise.
6538         * modules/human (Makefile.am): Likewise.
6539         * modules/idcache (Makefile.am): Likewise.
6540         * modules/imaxabs (Makefile.am): Likewise.
6541         * modules/imaxdiv (Makefile.am): Likewise.
6542         * modules/inet_ntop (Makefile.am): Likewise.
6543         * modules/inet_pton (Makefile.am): Likewise.
6544         * modules/intprops (Makefile.am): Likewise.
6545         * modules/inttostr (Makefile.am): Likewise.
6546         * modules/inttypes (Makefile.am): Likewise.
6547         * modules/isapipe (Makefile.am): Likewise.
6548         * modules/javaversion (Makefile.am): Likewise.
6549         * modules/lchmod (Makefile.am): Likewise.
6550         * modules/lchown (Makefile.am): Likewise.
6551         * modules/localcharset (Makefile.am): Likewise.
6552         * modules/long-options (Makefile.am): Likewise.
6553         * modules/lstat (Makefile.am): Likewise.
6554         * modules/malloc (Makefile.am): Likewise.
6555         * modules/mathl (Makefile.am): Likewise.
6556         * modules/mbchar (Makefile.am): Likewise.
6557         * modules/md2 (Makefile.am): Likewise.
6558         * modules/md4 (Makefile.am): Likewise.
6559         * modules/md5 (Makefile.am): Likewise.
6560         * modules/memcasecmp (Makefile.am): Likewise.
6561         * modules/memchr (Makefile.am): Likewise.
6562         * modules/memcmp (Makefile.am): Likewise.
6563         * modules/memcoll (Makefile.am): Likewise.
6564         * modules/memcpy (Makefile.am): Likewise.
6565         * modules/memmem (Makefile.am): Likewise.
6566         * modules/memmove (Makefile.am): Likewise.
6567         * modules/mempcpy (Makefile.am): Likewise.
6568         * modules/memrchr (Makefile.am): Likewise.
6569         * modules/memset (Makefile.am): Likewise.
6570         * modules/memxor (Makefile.am): Likewise.
6571         * modules/mkancesdirs (Makefile.am): Likewise.
6572         * modules/mkdir-p (Makefile.am): Likewise.
6573         * modules/mkdir (Makefile.am): Likewise.
6574         * modules/mkdtemp (Makefile.am): Likewise.
6575         * modules/mkstemp (Makefile.am): Likewise.
6576         * modules/mktime (Makefile.am): Likewise.
6577         * modules/modechange (Makefile.am): Likewise.
6578         * modules/mountlist (Makefile.am): Likewise.
6579         * modules/nanosleep (Makefile.am): Likewise.
6580         * modules/obstack (Makefile.am): Likewise.
6581         * modules/openat (Makefile.am): Likewise.
6582         * modules/pagealign_alloc (Makefile.am): Likewise.
6583         * modules/pathmax (Makefile.am): Likewise.
6584         * modules/physmem (Makefile.am): Likewise.
6585         * modules/poll (Makefile.am): Likewise.
6586         * modules/posixtm (Makefile.am): Likewise.
6587         * modules/posixver (Makefile.am): Likewise.
6588         * modules/putenv (Makefile.am): Likewise.
6589         * modules/quote (Makefile.am): Likewise.
6590         * modules/quotearg (Makefile.am): Likewise.
6591         * modules/raise (Makefile.am): Likewise.
6592         * modules/read-file (Makefile.am): Likewise.
6593         * modules/readline (Makefile.am): Likewise.
6594         * modules/readlink (Makefile.am): Likewise.
6595         * modules/readtokens (Makefile.am): Likewise.
6596         * modules/readutmp (Makefile.am): Likewise.
6597         * modules/realloc (Makefile.am): Likewise.
6598         * modules/regex (Makefile.am): Likewise.
6599         * modules/rename-dest-slash (Makefile.am): Likewise.
6600         * modules/rename (Makefile.am): Likewise.
6601         * modules/rijndael (Makefile.am): Likewise.
6602         * modules/rmdir (Makefile.am): Likewise.
6603         * modules/rpmatch (Makefile.am): Likewise.
6604         * modules/safe-read (Makefile.am): Likewise.
6605         * modules/safe-write (Makefile.am): Likewise.
6606         * modules/same-inode (Makefile.am): Likewise.
6607         * modules/same (Makefile.am): Likewise.
6608         * modules/save-cwd (Makefile.am): Likewise.
6609         * modules/savedir (Makefile.am): Likewise.
6610         * modules/setenv (Makefile.am): Likewise.
6611         * modules/settime (Makefile.am): Likewise.
6612         * modules/sha1 (Makefile.am): Likewise.
6613         * modules/sig2str (Makefile.am): Likewise.
6614         * modules/snprintf (Makefile.am): Likewise.
6615         * modules/stat-macros (Makefile.am): Likewise.
6616         * modules/stat-time (Makefile.am): Likewise.
6617         * modules/stdbool (Makefile.am): Likewise.
6618         * modules/stdint (Makefile.am): Likewise.
6619         * modules/stdlib-safer (Makefile.am): Likewise.
6620         * modules/stpcpy (Makefile.am): Likewise.
6621         * modules/stpncpy (Makefile.am): Likewise.
6622         * modules/strcase (Makefile.am): Likewise.
6623         * modules/strcasestr (Makefile.am): Likewise.
6624         * modules/strchrnul (Makefile.am): Likewise.
6625         * modules/strcspn (Makefile.am): Likewise.
6626         * modules/strdup (Makefile.am): Likewise.
6627         * modules/strerror (Makefile.am): Likewise.
6628         * modules/strftime (Makefile.am): Likewise.
6629         * modules/strndup (Makefile.am): Likewise.
6630         * modules/strnlen (Makefile.am): Likewise.
6631         * modules/strpbrk (Makefile.am): Likewise.
6632         * modules/strsep (Makefile.am): Likewise.
6633         * modules/strstr (Makefile.am): Likewise.
6634         * modules/strtod (Makefile.am): Likewise.
6635         * modules/strtoimax (Makefile.am): Likewise.
6636         * modules/strtok_r (Makefile.am): Likewise.
6637         * modules/strtol (Makefile.am): Likewise.
6638         * modules/strtoll (Makefile.am): Likewise.
6639         * modules/strtoul (Makefile.am): Likewise.
6640         * modules/strtoull (Makefile.am): Likewise.
6641         * modules/strtoumax (Makefile.am): Likewise.
6642         * modules/strverscmp (Makefile.am): Likewise.
6643         * modules/sys_socket (Makefile.am): Likewise.
6644         * modules/sys_stat (Makefile.am): Likewise.
6645         * modules/sysexits (Makefile.am): Likewise.
6646         * modules/time_r (Makefile.am): Likewise.
6647         * modules/timegm (Makefile.am): Likewise.
6648         * modules/timespec (Makefile.am): Likewise.
6649         * modules/tmpfile-safer (Makefile.am): Likewise.
6650         * modules/trim (Makefile.am): Likewise.
6651         * modules/unistd-safer (Makefile.am): Likewise.
6652         * modules/unlinkdir (Makefile.am): Likewise.
6653         * modules/unlocked-io (Makefile.am): Likewise.
6654         * modules/userspec (Makefile.am): Likewise.
6655         * modules/utime (Makefile.am): Likewise.
6656         * modules/utimecmp (Makefile.am): Likewise.
6657         * modules/utimens (Makefile.am): Likewise.
6658         * modules/vasnprintf (Makefile.am): Likewise.
6659         * modules/vasprintf (Makefile.am): Likewise.
6660         * modules/vsnprintf (Makefile.am): Likewise.
6661         * modules/xalloc (Makefile.am): Likewise.
6662         * modules/xgetcwd (Makefile.am): Likewise.
6663         * modules/xnanosleep (Makefile.am): Likewise.
6664         * modules/xreadlink (Makefile.am): Likewise.
6665         * modules/xstrtod (Makefile.am): Likewise.
6666         * modules/xstrtol (Makefile.am): Likewise.
6667         * modules/xstrtold (Makefile.am): Likewise.
6668         * modules/yesno (Makefile.am): Likewise.
6669         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
6670
6671 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
6672
6673         * modules/error (Makefile.am): Distribute files through
6674         EXTRA_DIST, not lib_SOURCES.
6675
6676 2006-10-12  Eric Blake  <ebb9@byu.net>
6677
6678         * modules/error (Makefile.am): Distribute files in /lib.
6679         * modules/obstack (Makefile.am): Likewise.
6680
6681 2006-10-12  Bruno Haible  <bruno@clisp.org>
6682
6683         * modules/acl (Makefile.am): Distribute all files in lib/ through
6684         EXTRA_DIST.
6685         * modules/arcfour (Makefile.am): Likewise.
6686         * modules/arctwo (Makefile.am): Likewise.
6687         * modules/argmatch (Makefile.am): Likewise.
6688         * modules/argz (Makefile.am): Likewise.
6689         * modules/atexit (Makefile.am): Likewise.
6690         * modules/backupfile (Makefile.am): Likewise.
6691         * modules/c-strtod (Makefile.am): Likewise.
6692         * modules/c-strtold (Makefile.am): Likewise.
6693         * modules/calloc (Makefile.am): Likewise.
6694         * modules/canon-host (Makefile.am): Likewise.
6695         * modules/canonicalize (Makefile.am): Likewise.
6696         * modules/chdir-long (Makefile.am): Likewise.
6697         * modules/chdir-safer (Makefile.am): Likewise.
6698         * modules/check-version (Makefile.am): Likewise.
6699         * modules/chown (Makefile.am): Likewise.
6700         * modules/cloexec (Makefile.am): Likewise.
6701         * modules/close-stream (Makefile.am): Likewise.
6702         * modules/closeout (Makefile.am): Likewise.
6703         * modules/crc (Makefile.am): Likewise.
6704         * modules/cycle-check (Makefile.am): Likewise.
6705         * modules/des (Makefile.am): Likewise.
6706         * modules/dirfd (Makefile.am): Likewise.
6707         * modules/dirname (Makefile.am): Likewise.
6708         * modules/dup2 (Makefile.am): Likewise.
6709         * modules/euidaccess (Makefile.am): Likewise.
6710         * modules/exclude (Makefile.am): Likewise.
6711         * modules/exitfail (Makefile.am): Likewise.
6712         * modules/fcntl-safer (Makefile.am): Likewise.
6713         * modules/file-type (Makefile.am): Likewise.
6714         * modules/fileblocks (Makefile.am): Likewise.
6715         * modules/filemode (Makefile.am): Likewise.
6716         * modules/filenamecat (Makefile.am): Likewise.
6717         * modules/fnmatch (Makefile.am): Likewise.
6718         * modules/fopen-safer (Makefile.am): Likewise.
6719         * modules/fpending (Makefile.am): Likewise.
6720         * modules/fprintftime (Makefile.am): Likewise.
6721         * modules/free (Makefile.am): Likewise.
6722         * modules/fsusage (Makefile.am): Likewise.
6723         * modules/ftruncate (Makefile.am): Likewise.
6724         * modules/fts (Makefile.am): Likewise.
6725         * modules/gc (Makefile.am): Likewise.
6726         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
6727         * modules/getaddrinfo (Makefile.am): Likewise.
6728         * modules/getcwd (Makefile.am): Likewise.
6729         * modules/getdelim (Makefile.am): Likewise.
6730         * modules/getdomainname (Makefile.am): Likewise.
6731         * modules/getgroups (Makefile.am): Likewise.
6732         * modules/gethostname (Makefile.am): Likewise.
6733         * modules/gethrxtime (Makefile.am): Likewise.
6734         * modules/getline (Makefile.am): Likewise.
6735         * modules/getloadavg (Makefile.am): Likewise.
6736         * modules/getlogin_r (Makefile.am): Likewise.
6737         * modules/getopt (Makefile.am): Likewise.
6738         * modules/getpass (Makefile.am): Likewise.
6739         * modules/getpass-gnu (Makefile.am): Likewise.
6740         * modules/getsubopt (Makefile.am): Likewise.
6741         * modules/gettime (Makefile.am): Likewise.
6742         * modules/gettimeofday (Makefile.am): Likewise.
6743         * modules/getugroups (Makefile.am): Likewise.
6744         * modules/getusershell (Makefile.am): Likewise.
6745         * modules/glob (Makefile.am): Likewise.
6746         * modules/group-member (Makefile.am): Likewise.
6747         * modules/hard-locale (Makefile.am): Likewise.
6748         * modules/hash (Makefile.am): Likewise.
6749         * modules/hmac-md5 (Makefile.am): Likewise.
6750         * modules/hmac-sha1 (Makefile.am): Likewise.
6751         * modules/human (Makefile.am): Likewise.
6752         * modules/idcache (Makefile.am): Likewise.
6753         * modules/imaxabs (Makefile.am): Likewise.
6754         * modules/imaxdiv (Makefile.am): Likewise.
6755         * modules/inet_ntop (Makefile.am): Likewise.
6756         * modules/inet_pton (Makefile.am): Likewise.
6757         * modules/inttostr (Makefile.am): Likewise.
6758         * modules/isapipe (Makefile.am): Likewise.
6759         * modules/lchown (Makefile.am): Likewise.
6760         * modules/long-options (Makefile.am): Likewise.
6761         * modules/lstat (Makefile.am): Likewise.
6762         * modules/malloc (Makefile.am): Likewise.
6763         * modules/mathl (Makefile.am): Likewise.
6764         * modules/mbchar (Makefile.am): Likewise.
6765         * modules/md2 (Makefile.am): Likewise.
6766         * modules/md4 (Makefile.am): Likewise.
6767         * modules/md5 (Makefile.am): Likewise.
6768         * modules/memcasecmp (Makefile.am): Likewise.
6769         * modules/memchr (Makefile.am): Likewise.
6770         * modules/memcmp (Makefile.am): Likewise.
6771         * modules/memcoll (Makefile.am): Likewise.
6772         * modules/memcpy (Makefile.am): Likewise.
6773         * modules/memmem (Makefile.am): Likewise.
6774         * modules/memmove (Makefile.am): Likewise.
6775         * modules/mempcpy (Makefile.am): Likewise.
6776         * modules/memrchr (Makefile.am): Likewise.
6777         * modules/memset (Makefile.am): Likewise.
6778         * modules/memxor (Makefile.am): Likewise.
6779         * modules/mkancesdirs (Makefile.am): Likewise.
6780         * modules/mkdir (Makefile.am): Likewise.
6781         * modules/mkdir-p (Makefile.am): Likewise.
6782         * modules/mkdtemp (Makefile.am): Likewise.
6783         * modules/mkstemp (Makefile.am): Likewise.
6784         * modules/mktime (Makefile.am): Likewise.
6785         * modules/modechange (Makefile.am): Likewise.
6786         * modules/mountlist (Makefile.am): Likewise.
6787         * modules/nanosleep (Makefile.am): Likewise.
6788         * modules/openat (Makefile.am): Likewise.
6789         * modules/pagealign_alloc (Makefile.am): Likewise.
6790         * modules/physmem (Makefile.am): Likewise.
6791         * modules/poll (Makefile.am): Likewise.
6792         * modules/posixtm (Makefile.am): Likewise.
6793         * modules/posixver (Makefile.am): Likewise.
6794         * modules/putenv (Makefile.am): Likewise.
6795         * modules/quote (Makefile.am): Likewise.
6796         * modules/quotearg (Makefile.am): Likewise.
6797         * modules/raise (Makefile.am): Likewise.
6798         * modules/read-file (Makefile.am): Likewise.
6799         * modules/readline (Makefile.am): Likewise.
6800         * modules/readlink (Makefile.am): Likewise.
6801         * modules/readtokens (Makefile.am): Likewise.
6802         * modules/readutmp (Makefile.am): Likewise.
6803         * modules/realloc (Makefile.am): Likewise.
6804         * modules/regex (Makefile.am): Likewise.
6805         * modules/rename (Makefile.am): Likewise.
6806         * modules/rename-dest-slash (Makefile.am): Likewise.
6807         * modules/rijndael (Makefile.am): Likewise.
6808         * modules/rmdir (Makefile.am): Likewise.
6809         * modules/rpmatch (Makefile.am): Likewise.
6810         * modules/safe-read (Makefile.am): Likewise.
6811         * modules/safe-write (Makefile.am): Likewise.
6812         * modules/same (Makefile.am): Likewise.
6813         * modules/save-cwd (Makefile.am): Likewise.
6814         * modules/savedir (Makefile.am): Likewise.
6815         * modules/setenv (Makefile.am): Likewise.
6816         * modules/settime (Makefile.am): Likewise.
6817         * modules/sha1 (Makefile.am): Likewise.
6818         * modules/sig2str (Makefile.am): Likewise.
6819         * modules/snprintf (Makefile.am): Likewise.
6820         * modules/stdlib-safer (Makefile.am): Likewise.
6821         * modules/stpcpy (Makefile.am): Likewise.
6822         * modules/stpncpy (Makefile.am): Likewise.
6823         * modules/strcase (Makefile.am): Likewise.
6824         * modules/strcasestr (Makefile.am): Likewise.
6825         * modules/strchrnul (Makefile.am): Likewise.
6826         * modules/strcspn (Makefile.am): Likewise.
6827         * modules/strdup (Makefile.am): Likewise.
6828         * modules/strerror (Makefile.am): Likewise.
6829         * modules/strftime (Makefile.am): Likewise.
6830         * modules/strndup (Makefile.am): Likewise.
6831         * modules/strnlen (Makefile.am): Likewise.
6832         * modules/strpbrk (Makefile.am): Likewise.
6833         * modules/strsep (Makefile.am): Likewise.
6834         * modules/strstr (Makefile.am): Likewise.
6835         * modules/strtod (Makefile.am): Likewise.
6836         * modules/strtoimax (Makefile.am): Likewise.
6837         * modules/strtok_r (Makefile.am): Likewise.
6838         * modules/strtol (Makefile.am): Likewise.
6839         * modules/strtoll (Makefile.am): Likewise.
6840         * modules/strtoul (Makefile.am): Likewise.
6841         * modules/strtoull (Makefile.am): Likewise.
6842         * modules/strtoumax (Makefile.am): Likewise.
6843         * modules/strverscmp (Makefile.am): Likewise.
6844         * modules/time_r (Makefile.am): Likewise.
6845         * modules/timegm (Makefile.am): Likewise.
6846         * modules/tmpfile-safer (Makefile.am): Likewise.
6847         * modules/unistd-safer (Makefile.am): Likewise.
6848         * modules/unlinkdir (Makefile.am): Likewise.
6849         * modules/userspec (Makefile.am): Likewise.
6850         * modules/utime (Makefile.am): Likewise.
6851         * modules/utimecmp (Makefile.am): Likewise.
6852         * modules/utimens (Makefile.am): Likewise.
6853         * modules/vasnprintf (Makefile.am): Likewise.
6854         * modules/vasprintf (Makefile.am): Likewise.
6855         * modules/vsnprintf (Makefile.am): Likewise.
6856         * modules/xalloc (Makefile.am): Likewise.
6857         * modules/xgetcwd (Makefile.am): Likewise.
6858         * modules/xnanosleep (Makefile.am): Likewise.
6859         * modules/xreadlink (Makefile.am): Likewise.
6860         * modules/xstrtod (Makefile.am): Likewise.
6861         * modules/xstrtol (Makefile.am): Likewise.
6862         * modules/xstrtold (Makefile.am): Likewise.
6863         * modules/yesno (Makefile.am): Likewise.
6864
6865 2006-10-12  Jim Meyering  <jim@meyering.net>
6866
6867         * m4/getloadavg.m4: Revert the change below.
6868
6869         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
6870         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
6871         fail with a symlink, which is what coreutils' ./bootstrap now
6872         creates by default.
6873
6874 2006-10-12  Bruno Haible  <bruno@clisp.org>
6875
6876         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
6877         mingw.
6878         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
6879         MSVC and mingw explicitly.
6880
6881 2006-10-11  Simon Josefsson  <jas@extundo.com>
6882             Bruno Haible  <bruno@clisp.org>
6883
6884         Add support for multiple gnulib-tool invocations in the scope of a
6885         single configure.ac file.
6886         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
6887         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
6888         with the same contents as the _LIBADD variable.
6889         (func_emit_initmacro_start, func_emit_initmacro_end,
6890         func_emit_initmacro_done): New functions.
6891         (func_import, func_create_testdir): Invoke them. Allow the identifiers
6892         gl_LIBOBJS and gl_LTLIBOBJS.
6893
6894 2006-10-11  Bruno Haible  <bruno@clisp.org>
6895
6896         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
6897         (func_create_testdir): Don't create po/Makefile.am, don't invoke
6898         autoreconf. Instead, invoke autopoint explicitly but move back the
6899         *.m4 files from gnulib.
6900
6901 2006-10-11  Bruno Haible  <bruno@clisp.org>
6902
6903         * gnulib-tool (func_usage): Make module names after --create-testdir
6904         optional.
6905         (func_create_testdir): If no module was specified, use nearly all
6906         modules.
6907
6908 2006-10-12  Jim Meyering  <jim@meyering.net>
6909
6910         Big performance improvement for fts-based tools that use FTS_NOSTAT.
6911         Avoid spurious inode-mismatch problems on non-POSIX file systems.
6912         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
6913         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
6914         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
6915         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
6916         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
6917         (fts_set_stat_required): New function.
6918         (fts_open): Defer the calls to fts_stat, if possible or requested.
6919         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
6920         into fts_stat itself.
6921         (fts_read): Perform any required (deferred) fts_stat call.
6922         (fts_build): Likewise, for the directory we're about to open and read.
6923         In the readdir loop, carefully decide whether each entry will require
6924         an eventual call to fts_stat, using dirent.d_type info if available.
6925         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
6926         a command line argument into this function.  Update all callers.
6927         Map a return value of FTS_DOT to FTS_D for a command line argument.
6928         * modules/fts (Depends-on): Add d-type.  Alphabetize.
6929         Thanks to Miklos Szeredi for his tenacity and for the initial
6930         bug report about "find" failing on a FUSE-based file system.
6931
6932         * lib/fts.c (fts_open): Use consistent indentation.
6933
6934 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
6935
6936         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
6937         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
6938         reported by Jim Meyering.  All uses of cache variables renamed
6939         to match Autoconf's.
6940         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
6941         the other one.
6942
6943         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
6944         Fix misspelling in diagnostic.
6945
6946 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
6947
6948         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
6949         defined.  Problem reported by Matthew Woehlke.
6950
6951         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
6952         Add support for Tandem NonStop R series.
6953         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
6954         Use new macro.
6955
6956         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
6957         (has_trailing_slash): Omit size arg; all callers changed.
6958         Omit 'inline', since it doesn't help performance and we'd
6959         need to configure it.
6960         Don't count //, ///, etc. as having a trailing slash.
6961         As a side effect, this removes a C99ism reported by Matthew Woehlke.
6962         (rpl_rename_dest_slash): On failure, use rename's errno rather
6963         than (in some cases) an incorrect or junk errno.
6964         Simplify code by removing need to compute length; this does
6965         cause it to make two passes instead of one over the file name,
6966         but it's worth it.
6967
6968         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
6969         change, since Autoconf's version may no longer be appropriate now
6970         that we are using CVS Autoconf's version.  Add support for Tandem.
6971
6972 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
6973             Bruno Haible  <bruno@clisp.org>
6974
6975         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
6976         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
6977         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
6978         gl_AC_TYPE_LONG_LONG.
6979
6980         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
6981         instead of HAVE_LONG_LONG.
6982         * lib/printf-args.c (printf_fetchargs): Likewise.
6983         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
6984         * lib/vasnprintf.c (VASNPRINTF): Likewise.
6985         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
6986         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
6987         gl_AC_TYPE_LONG_LONG.
6988
6989 2006-10-11  Bruno Haible  <bruno@clisp.org>
6990
6991         * m4/longlong.m4: Add comments.
6992         * m4/ulonglong.m4: Likewise.
6993
6994 2006-10-10  Bruno Haible  <bruno@clisp.org>
6995
6996         Make it possible to #define stpcpy, strdup to aliases.
6997         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
6998         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
6999
7000 2006-10-10  Bruno Haible  <bruno@clisp.org>
7001
7002         Make it possible to #define gcd to an alias.
7003         * lib/gcd.c: Include config.h.
7004
7005 2006-10-10  Bruno Haible  <bruno@clisp.org>
7006
7007         Make it possible to #define c_isascii to an alias.
7008         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
7009         defined. Undefine the macros before defining them, to avoid gcc
7010         warnings.
7011         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
7012         define NO_C_CTYPE_MACROS early.
7013
7014 2006-10-10  Bruno Haible  <bruno@clisp.org>
7015
7016         Make it possible to #define set_program_name to an alias.
7017         * lib/progname.c: Don't undefine set_program_name; instead, undefine
7018         ENABLE_RELOCATABLE early.
7019
7020 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
7021
7022         Port to Tandem NSK OSS, which has 64-bit signed int but at most
7023         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
7024         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
7025         More generally, don't assume that 64-bit signed int is available
7026         if unsigned int is, and vice versa.
7027         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
7028         unsigned symbols, not on their signed counterparts.
7029         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
7030         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
7031         (UINT64_C, UINTMAX_C):
7032         Likewise.
7033         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
7034         unsigned counterparts.
7035         (Have_long_long, Unsigned): New macros.
7036         (Int): Renamed from INT.
7037         (strtoimax): Use the new macros.
7038         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
7039         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
7040         * modules/inttypes (inttypes.h): Substitute
7041         HAVE_UNSIGNED_LONG_LONG_INT.
7042         * modules/stdint (stdint.h): Likewise.
7043         (Files): Add m4/ulonglong.m4.
7044
7045 2006-10-10  Bruno Haible  <bruno@clisp.org>
7046
7047         Fix a gcc -Wshadow warning.
7048         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
7049         to 'bucket'.
7050         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
7051         gl_linked_indexof_from_to): Likewise.
7052         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
7053         Likewise.
7054         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
7055         Likewise.
7056         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
7057         Reported by Eric Blake.
7058
7059 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
7060
7061         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
7062         for NetBSD.  Problem reported by Bruno Haible.
7063
7064 2006-10-09  Jim Meyering  <jim@meyering.net>
7065
7066         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
7067         Patch from Bruno Haible.
7068
7069 2006-10-09  Jim Meyering  <jim@meyering.net>
7070
7071         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
7072         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
7073         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
7074
7075 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7076
7077         Don't include <config.h> twice; this doesn't work in some cases,
7078         e.g., when config.h has "#define intmax_t long long int" and
7079         we include <config.h>, <inttypes.h>, <config.h> in that order.
7080         Problem reported by Matthew Woehlke in:
7081         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
7082         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
7083         * lib/fts-cycle.c: Don't include config.h.
7084         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
7085         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
7086         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
7087         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
7088         inttypes.h.
7089         * lib/xstrtoumax.c: Likewise.
7090         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
7091         __strtol and the like, so that this module is more like its siblings.
7092         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
7093         Remove; no longer needed now that we assume gnulib inttypes.h.
7094
7095 2006-10-08  Bruno Haible  <bruno@clisp.org>
7096
7097         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
7098         option.
7099
7100 2006-10-07  Jim Meyering  <jim@meyering.net>
7101
7102         * modules/inttypes (inttypes.h): Revert what seems to have been
7103         an inadvertent part of today's change: use "|", not "/" in the
7104         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
7105
7106 2006-10-07  Bruno Haible  <bruno@clisp.org>
7107
7108         * modules/sublist: New file.
7109
7110 2006-10-07  Bruno Haible  <bruno@clisp.org>
7111
7112         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
7113         * modules/argz (argz.h): Likewise.
7114         * modules/arpa_inet (arpa/inet.h): Likewise.
7115         * modules/byteswap (byteswap.h): Likewise.
7116         * modules/configmake (configmake.h): Likewise.
7117         * modules/fcntl (fcntl.h): Likewise.
7118         * modules/fnmatch (fnmatch.h): Likewise.
7119         * modules/getopt (getopt.h): Likewise.
7120         * modules/glob (glob.h): Likewise.
7121         * modules/inttypes (inttypes.h): Likewise.
7122         * modules/netinet_in (netinet/in.h): Likewise.
7123         * modules/poll (poll.h): Likewise.
7124         * modules/stdbool (stdbool.h): Likewise.
7125         * modules/stdint (stdint.h): Likewise.
7126         * modules/sys_select (sys/select.h): Likewise.
7127         * modules/sys_socket (sys/socket.h): Likewise.
7128         * modules/sys_stat (sys/stat.h): Likewise.
7129         * modules/sysexits (sysexits.h): Likewise.
7130         * modules/unistd (unistd.h): Likewise.
7131         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7132         Add a "DO NOT EDIT" comment to the generated file.
7133         (func_import): Likewise for gnulib-comp.m4.
7134
7135 2006-10-07  Bruno Haible  <bruno@clisp.org>
7136
7137         * lib/gl_sublist.h: New file.
7138         * lib/gl_sublist.c: New file.
7139
7140 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
7141
7142         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
7143         name (relative to the original working directory) and the file
7144         name component (relative to the temporary working directory).  All
7145         callers changed.
7146         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
7147         * lib/mkdir-p.c (make_dir_parents): Likewise.
7148         * lib/mkdir-p.h (make_dir_parents): Likewise.
7149
7150 2006-10-06  Eric Blake  <ebb9@byu.net>
7151
7152         Define several macros for use by the clean-temp module.
7153         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
7154         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
7155         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
7156
7157         * lib/clean-temp.h (close_stream_temp): New declaration.
7158         * lib/clean-temp.c (includes): Pull in headers according to what
7159         other modules are in use.
7160         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
7161
7162 2006-10-06  Bruno Haible  <bruno@clisp.org>
7163
7164         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
7165         instead of fopen, fwriteerror.
7166
7167 2006-10-06  Bruno Haible  <bruno@clisp.org>
7168
7169         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
7170         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
7171         int.
7172         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
7173         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
7174         Return an error indicator.
7175         Suggested by Eric Blake.
7176
7177 2006-10-06  Bruno Haible  <bruno@clisp.org>
7178
7179         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
7180         Reported by Eric Blake.
7181
7182 2006-10-06  Bruno Haible  <bruno@clisp.org>
7183
7184         * modules/closeout (Description): Mention stderr too.
7185
7186 2006-10-06  Bruno Haible  <bruno@clisp.org>
7187         and Paul Eggert  <eggert@cs.ucla.edu>
7188
7189         * lib/closeout.c (close_stdout): Also close stderr.
7190         * lib/closeout.h: Update comment.
7191
7192 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
7193
7194         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
7195         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
7196         * lib/dirchownmod.c: Include lchown.h.
7197         * lib/lchown.c: Don't include files that lchown.h now includes.
7198         Don't declare chown, since lchown.h now does that.
7199         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
7200         (lchown): Define to rpl_chown if lchown is declared but
7201         does not exist.  Declare using a prototype if lchown is not
7202         declared.  Add a copyright notice.
7203         * lib/mkstemp.h: Include <unistd.h>.
7204         * lib/openat.c: Include lchown.h.
7205
7206         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
7207         we now test for that separately.
7208         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
7209         rather than O_NOFOLLOW, when testing whether it's possible to
7210         avoid a race condition reliably.
7211         * lib/savewd.c (savewd_chdir): Likewise.
7212
7213         Remove macros that are no longer needed now that stdint.h is
7214         reliable.
7215         * lib/fsusage.c (UINTMAX_MAX): Remove.
7216         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
7217         * lib/utimecmp.c (SIZE_MAX): Remove.
7218
7219         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
7220
7221         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
7222         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
7223         O_NOATIME works.
7224
7225 2006-10-05  Bruno Haible  <bruno@clisp.org>
7226
7227         * lib/gl_list.h (gl_sortedlist_search_from_to,
7228         gl_sortedlist_indexof_from_to): New declarations.
7229         (gl_list_implementation): New fields sortedlist_search_from_to,
7230         sortedlist_indexof_from_to.
7231         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
7232         inline functions.
7233         * lib/gl_list.c (gl_sortedlist_search_from_to,
7234         gl_sortedlist_indexof_from_to): New functions.
7235         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
7236         function.
7237         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
7238         (gl_array_sortedlist_search_from_to): New function.
7239         (gl_array_list_implementation): Update.
7240         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
7241         function.
7242         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
7243         (gl_carray_sortedlist_search_from_to): New function.
7244         (gl_carray_list_implementation): Update.
7245         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
7246         gl_linked_sortedlist_indexof_from_to): New functions.
7247         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
7248         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
7249         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
7250         gl_tree_sortedlist_indexof_from_to): New functions.
7251         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
7252         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
7253         Update.
7254         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
7255         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
7256         Update.
7257
7258 2006-10-05  Bruno Haible  <bruno@clisp.org>
7259
7260         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
7261         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
7262         (struct gl_list_implementation): Add fields search_from_to,
7263         indexof_from_to. Remove fields search, indexof.
7264         (gl_list_search): Use the search_from_to method.
7265         (gl_list_search_from, gl_list_search_from_to): New functions.
7266         (gl_list_indexof): Use the indexof_from_to method.
7267         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
7268         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
7269         (gl_list_search_from, gl_list_search_from_to): New functions.
7270         (gl_list_indexof): Use the indexof_from_to method.
7271         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
7272         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
7273         gl_array_indexof. Add start_index, end_index arguments.
7274         (gl_array_search_from_to): Renamed from gl_array_search. Add
7275         start_index, end_index arguments.
7276         (gl_array_remove, gl_array_list_implementation): Update.
7277         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
7278         gl_carray_indexof. Add start_index, end_index arguments.
7279         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
7280         start_index, end_index arguments.
7281         (gl_carray_remove, gl_carray_list_implementation): Update.
7282         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
7283         gl_linked_search. Add start_index, end_index arguments.
7284         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
7285         start_index, end_index arguments.
7286         (gl_linked_remove): Update.
7287         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
7288         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
7289         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
7290         field to 'size_t'.
7291         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
7292         gl_tree_search. Add start_index, end_index arguments.
7293         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
7294         start_index, end_index arguments.
7295         (gl_tree_remove): Update.
7296         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
7297         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
7298         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
7299         function.
7300         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
7301         gl_tree_search. Add start_index, end_index arguments.
7302         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
7303         start_index, end_index arguments.
7304         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
7305         Update.
7306         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
7307
7308 2006-10-05  Bruno Haible  <bruno@clisp.org>
7309
7310         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
7311
7312         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
7313         fwriteerror_temp): New declarations.
7314         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
7315         (descriptors): New variable.
7316         (cleanup): First, close the descriptors.
7317         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
7318         fclose_temp, fwriteerror_temp): New functions.
7319
7320 2006-10-04  Jim Meyering  <jim@meyering.net>
7321
7322         * lib/fts.c (fts_open): Tiny comment change.
7323
7324 2006-10-04  Bruno Haible  <bruno@clisp.org>
7325
7326         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
7327         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
7328         gl_LOCK_BODY.
7329         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
7330         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
7331         gl_LOCK_EARLY_BODY.
7332         (gl_LOCK): Require gl_LOCK_BODY.
7333
7334 2006-10-04  Bruno Haible  <bruno@clisp.org>
7335
7336         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
7337         (gl_oset_search_atleast): New declaration.
7338         (struct gl_oset_implementation): Add field 'search_atleast'.
7339         (gl_oset_search_atleast): New inline function.
7340         * lib/gl_oset.c (gl_oset_search_atleast): New function.
7341         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
7342         (gl_array_oset_implementation): Update.
7343         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
7344         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
7345         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
7346
7347 2006-10-04  Bruno Haible  <bruno@clisp.org>
7348
7349         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
7350
7351 2006-10-03  Bruno Haible  <bruno@clisp.org>
7352
7353         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
7354         from gl_avltreehash_list_implementation.
7355
7356 2006-10-03  Bruno Haible  <bruno@clisp.org>
7357
7358         * lib/gl_oset.c (gl_oset_add): Fix return type.
7359
7360 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
7361
7362         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
7363
7364 2006-10-02  Eric Blake  <ebb9@byu.net>
7365
7366         * modules/strnlen (Depends-on): Add extensions.
7367
7368 2006-10-02  Eric Blake  <ebb9@byu.net>
7369
7370         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
7371         definition in 2.60+.
7372
7373 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
7374
7375         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
7376         checks.
7377
7378 2006-10-02  Bruno Haible  <bruno@clisp.org>
7379
7380         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
7381         to the AUTOMAKE_OPTIONS.
7382         Reported by Jim Meyering.
7383
7384 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
7385
7386         Work around bug in Solaris 10 /proc file system:
7387         /proc/self/fd/NNN/.. isn't the parent directory of
7388         the directory whose file descriptor is NNN.  This needs to
7389         be worked around at run time, not compile time, since a
7390         program might be built on Solaris 8, where things work, and
7391         run on Solaris 10.
7392         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
7393         to use the following interface instead:
7394         (OPENAT_BUFFER_SIZE): New macro.
7395         (openat_proc_name): New function.
7396         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
7397         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
7398         Likewise.
7399         * lib/openat-proc.c: New file.
7400         * modules/openat (Files): Add lib/openat-proc.c.
7401         (Depends-on): Add same-inode, stdbool.
7402         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
7403
7404 2006-09-29  Bruno Haible  <bruno@clisp.org>
7405
7406         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
7407         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
7408         argument. Set stdout_closed before testing for ferror, not after.
7409         (fwriteerror, fwriteerror_no_ebadf): New functions.
7410
7411 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7412
7413         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
7414
7415 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
7416
7417         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
7418         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
7419
7420 2006-09-28  Jim Meyering  <jim@meyering.net>
7421
7422         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
7423         Include <unistd.h>.
7424
7425 2006-09-28  Bruno Haible  <bruno@clisp.org>
7426
7427         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
7428         * modules/linkedhash-list (Depends-on): Likewise.
7429         * modules/rbtreehash-list (Depends-on): Likewise.
7430
7431 2006-09-28  Bruno Haible  <bruno@clisp.org>
7432
7433         * lib/strndup.h: Simplify the redefinition of strndup.
7434         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
7435         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
7436
7437 2006-09-28  Bruno Haible  <bruno@clisp.org>
7438
7439         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
7440         * lib/gl_linkedhash_list.c: Likewise.
7441         * lib/gl_rbtreehash_list.c: Likewise.
7442
7443 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
7444
7445         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
7446         getaddrinfo.
7447
7448         * lib/__fpending.h: Don't include <stdio_ext.h> unless
7449         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
7450         it causes <stdio_ext.h> to cause a compile-time error.
7451         Problem reported by Nelson H. F. Beebe.
7452         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
7453         of HAVE_DECL___PENDING.
7454
7455         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
7456         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
7457         declaration.
7458
7459 2006-09-27  Jim Meyering  <jim@meyering.net>
7460
7461         This file could end up with a definition for a function
7462         named __strndup, rather than rpl_strndup on a system with
7463         incomplete weak_alias support.
7464         * lib/strndup.c (strndup): Rename from __strndup.
7465         Remove #defines that used to map __strndup to strndup.
7466         Don't use K&R prototypes.
7467         Remove LIBC-related code, since this file is not sync'd with glibc.
7468         * lib/strndup.h: Revamp, accordingly.
7469         * m4/strndup.m4: Modernize.
7470
7471 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
7472
7473         * modules/savewd (Depends-on): Add 'raise'.
7474         * lib/savewd.c: Include <signal.h>, for 'raise'.
7475
7476 2006-09-26  Jim Meyering  <jim@meyering.net>
7477
7478         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
7479         when we detect Darwin 8.7.0's acl_get_file bug.
7480         Rearrange to perform the new (below) run-test while $LIBS
7481         contains any acl-related library.  Set USE_ACL at the end.
7482         (gl_ACL_GET_FILE): New function.
7483
7484 2006-09-26  Eric Blake  <ebb9@byu.net>
7485
7486         * lib/verror.c: Include <config.h> unconditionally.
7487
7488 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
7489
7490         * modules/clock-time (Maintainer): Add self.
7491         * modules/getlogin_r (Depends-on): Add extensions.
7492
7493 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7494
7495         * modules/clock-time: New module.
7496         * modules/nanosleep (Depends-on): Add clock-time.
7497         * modules/gethrxtime (Depends-on): Likewise.
7498         * modules/gettime (Depends-on): Likewise.
7499         * modules/settime (Depends-on): Likewise.
7500
7501         * modules/fts-lgpl: Depend on openat.
7502         * modules/mkancesdirs: Depend on savewd.
7503         * modules/mkdir-p: Likewise.
7504
7505 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7506
7507         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
7508
7509         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
7510         `gl_have_arbitrary_file_name_length_limit' to
7511         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
7512         actually works between configure runs.
7513
7514 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7515             Bruno Haible  <bruno@clisp.org>
7516
7517         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
7518
7519 2006-09-25  Jim Meyering  <jim@meyering.net>
7520
7521         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
7522         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
7523
7524 2006-09-25  Eric Blake  <ebb9@byu.net>
7525
7526         * gnulib-tool (func_import, func_create_testdir): Fix typos in
7527         exec's in 2006-09-18 patch when shuffling fds.
7528
7529 2006-09-25  Bruno Haible  <bruno@clisp.org>
7530
7531         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
7532         Reported by Jim Meyering.
7533
7534 2006-09-24  Jim Meyering  <jim@meyering.net>
7535
7536         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
7537         compare a pointer against a literal "0".  That caused failures with
7538         at least HP-UX's hpcc.
7539
7540 2006-09-22  Simon Josefsson  <jas@extundo.com>
7541
7542         * modules/gc-sha1:
7543         * modules/gc-md4:
7544         * modules/gc-hmac-sha1:
7545         * modules/gc-hmac-md5:
7546         * modules/gc-des:
7547         * modules/gc-arcfour: Distribute more files.
7548
7549 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7550
7551         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
7552         (gl_linked_iterator_from_to): Initialize struct completely.
7553         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
7554         (gl_tree_iterator_from_to): Likewise
7555         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
7556         * lib/gl_array_list.c [lint] (gl_array_iterator)
7557         (gl_array_iterator_from_to): Likewise.
7558         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
7559         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
7560         (gl_carray_iterator_from_to): Likewise.
7561
7562         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
7563         * lib/md4.c (md4_process_block): Remove unused variable.
7564         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
7565         parentheses for clarity.
7566
7567 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7568
7569         * modules/bison-i18n (Depends-on): Add gettext.
7570
7571 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7572
7573         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
7574         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
7575         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
7576         also add missing comma that caused broken test.
7577         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
7578         stdlib.h, for `abort'.
7579         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
7580         variables.
7581         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
7582         include unistd.h if present, for `rmdir'.
7583         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
7584         variables.
7585         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
7586         in the process include standard headers for prototypes.
7587         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
7588         gets declared on GNU/Linux.
7589         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
7590         unistd.h, for `rmdir'.
7591         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
7592
7593         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
7594         always true.
7595         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
7596
7597         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
7598
7599 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7600
7601         * gnulib-tool (func_version): Create output all at once.  This
7602         may help avoid triggering unnecessary SIGPIPEs, and at any
7603         rate it doesn't hurt.
7604
7605 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7606             Bruno Haible  <bruno@clisp.org>
7607
7608         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
7609         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7610         * m4/signed.m4 (bh_C_SIGNED): Likewise.
7611
7612         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
7613         (gl_FUNC_VASPRINTF): Invoke it.
7614
7615 2006-09-22  Bruno Haible  <bruno@clisp.org>
7616
7617         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
7618         getloadavg.c as first argument.
7619
7620 2006-09-22  Bruno Haible  <bruno@clisp.org>
7621
7622         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
7623         at the beginning of the gl_INIT macro.
7624         * modules/getloadavg (configure.ac): Pass $gl_source_base to
7625         gl_GETLOADAVG.
7626
7627 2006-09-22  Bruno Haible  <bruno@clisp.org>
7628
7629         * gnulib-tool (func_create_megatestdir): Don't include the config-h
7630         module.
7631         Suggested by Ralf Wildenhues.
7632
7633 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
7634
7635         Import this patch from libc:
7636
7637         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
7638
7639         * lib/regex_internal.c (re_string_reconstruct): Handle
7640         offset < pstr->valid_raw_len && pstr->offsets_needed case.
7641         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
7642         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
7643         re_string_context_at.
7644
7645         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
7646         now requires it.
7647         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
7648         gl_REGEX now does it for us.
7649         (gl_REGEX): Add test taken from
7650         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
7651
7652         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
7653         Check that large offsets work.  Modernize Autoconf usages.
7654         Prefer "yes" to mean a good thing rather than a bad.
7655         Don't put "#define mkstemp" in config.h, as this might interfere
7656         with standard system headers that "#define mkstemp mkstemp64".
7657
7658         * modules/mkstemp (Depends-on): Add extensions, so that
7659         mkstemp is visible on some platforms.
7660         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
7661         (Include): Change to "mkstemp.h" from <stdlib.h>.
7662         (Files): Add mkstemp.h.
7663
7664         * lib/mkstemp.h: New file, since some standard headers
7665         #define mkstemp.
7666         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
7667         Include "mkstemp.h".
7668         Make the _LIBC code resemble glibc original more,
7669         e.g., use K&R style.
7670         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
7671         (mkstemp): Remove, since mkstemp.h does this for us.
7672         * lib/stdlib--.h: Include mkstemp.h.
7673
7674         Import this patch from libc:
7675
7676         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
7677
7678         * lib/tempname.c (__gen_tempname): Change attempts_min
7679         into a macro.  Use preprocessor to decide how to initialize
7680         attempts [Coverity CID 67].
7681
7682 2006-09-20  Bruno Haible  <bruno@clisp.org>
7683
7684         * lib/mkdtemp.c: Import from libc.
7685         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
7686                 * sysdeps/posix/tempname.c (__gen_tempname): Change
7687                 attempts_min into a macro.  Use preprocessor to decide how to
7688                 initialize attempts [Coverity CID 67].
7689         2001-11-27  Paul Eggert  <eggert@twinsun.com>
7690                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
7691                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
7692
7693 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7694
7695         * gnulib-tool (func_exit): New function, to allow to pass the
7696         exit status portably through the trap.  Use everywhere.
7697         (--help, --version): Signal a write error.
7698         (trap): catch SIGPIPE, for write errors.
7699         Exit at the end of the trap, with the correct exit status.
7700
7701 2006-09-19  Karl Berry  <karl@gnu.org>
7702
7703         * doc/gnulib.texi: note about the license texinfo files.
7704
7705 2006-09-19  Eric Blake  <ebb9@byu.net>
7706
7707         * gnulib-tool: Avoid space-tab.
7708
7709 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
7710
7711         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
7712         that prevented coreutils 6.1 from building.  Problem reported
7713         by Petter Reinholdtsen.
7714
7715 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
7716
7717         * gnulib-tool (avoidlist): Fix typo that broke options like
7718         --avoid=lock that are used by coreutils bootstrap.
7719
7720 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
7721
7722         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
7723         more systematically.
7724
7725 2006-09-18  Jim Meyering  <jim@meyering.net>
7726
7727         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
7728
7729 2006-09-18  Bruno Haible  <bruno@clisp.org>
7730
7731         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
7732
7733 2006-09-18  Bruno Haible  <bruno@clisp.org>
7734
7735         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
7736         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
7737         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
7738         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
7739         * m4/gettext.m4: Require autoconf >= 2.52.
7740         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
7741         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
7742         of gl_cv_header_inttypes_h.
7743
7744 2006-09-18  Bruno Haible  <bruno@clisp.org>
7745
7746         * lib/javaversion.c: Include configmake.h.
7747
7748 2006-09-18  Bruno Haible  <bruno@clisp.org>
7749
7750         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
7751         avoid that the while loops be executed in a subshell.
7752
7753 2006-09-18  Bruno Haible  <bruno@clisp.org>
7754
7755         * MODULES.html.sh (func_module): Break long lines.
7756         Suggested by Bruce Korb <bkorb@gnu.org>.
7757
7758 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7759
7760         Speed up by a factor of 1.12.
7761         * gnulib-tool (nl): New variable.
7762         (func_import): Rewrite include directive extraction to only read each
7763         directive once.
7764
7765 2006-09-17  Bruno Haible  <bruno@clisp.org>
7766
7767         * modules/javaversion (Makefile.am): Remove DEFS setting.
7768         (Depends-on): Add configmake, for PKGDATADIR definition.
7769
7770 2006-09-17  Bruno Haible  <bruno@clisp.org>
7771
7772         * gnulib-tool (func_create_testdir): Rewrite all files at once.
7773
7774 2006-09-17  Bruno Haible  <bruno@clisp.org>
7775
7776         * gnulib-tool (func_append): New function, stolen from libtool.m4.
7777         (func_modules_transitive_closure, func_modules_add_dummy,
7778         func_modules_to_filelist, func_import, func_create_testdir,
7779         func_create_megatestdir, ...): Use it wherever possible.
7780         Suggested by Ralf Wildenhues.
7781
7782 2006-09-16  Karl Berry  <karl@gnu.org>
7783
7784         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
7785         to avoid sectioning errors.
7786         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
7787         [ifinfo]: blank line after @center-ed titles.
7788         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
7789         Spell FSF address consistently with others.
7790         (These changes approved by rms.)
7791
7792 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7793
7794         Speed up by a factor of 1.61.
7795         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
7796         already checked module names again.
7797
7798 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7799
7800         Speed up by a factor of 1.13.
7801         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
7802         for new_files, and the input to func_add_or_update.
7803
7804 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7805
7806         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
7807         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
7808
7809 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7810
7811         * modules/mkancesdirs (Depends-on): Add fcntl.
7812         * modules/savewd: New file.
7813         * MODULES.html.sh (File system functions): Add savewd.
7814
7815         * modules/configmake (Makefile.am): Add support for the
7816         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
7817
7818 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7819
7820         * m4/savewd.m4: New file.
7821
7822 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7823
7824         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
7825         (dirchownmod): New arg FD.  All callers changed.
7826         Use FD rather than opening the directory ourself, as opening is
7827         now the caller's responsibility.
7828         * lib/dirchownmod.h: Likewise.
7829         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
7830         hosts that require <sys/types.h> before <sys/stat.h>.  Include
7831         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
7832         (test_dir): Remove.
7833         (mkancesdirs): Return length of prefix of FILE that has already
7834         been made, or -2 if there is a child doing the work.  Redo
7835         algorithm so that it is O(N) rather than O(N**2).  Optimize away
7836         ".", and treat ".." specially since it might stray back into
7837         already-created areas.  Use a subprocess if necessary.  New arg
7838         WD; all users changed.  MAKE_DIR function should now return 1
7839         if it creates a directory that is not readable.  Return -2 if
7840         a child process is spun off.
7841         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
7842         Adjust signature to match code.
7843         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
7844         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
7845         all users changed.
7846         * lib/savewd.c, lib/savewd.h: New files.
7847
7848 2006-09-15  Jim Meyering  <jim@meyering.net>
7849
7850         * modules/rename-dest-slash: New module.
7851         * MODULES.html.sh (posix_compat): Add it here.
7852
7853         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
7854
7855 2006-09-15  Jim Meyering  <jim@meyering.net>
7856
7857         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
7858         file.
7859
7860         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
7861
7862 2006-09-15  Jim Meyering  <jim@meyering.net>
7863
7864         * lib/rename-dest-slash.c (has_trailing_slash): Use
7865         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
7866         (rpl_rename_dest_slash): Perform the cheaper trailing slash
7867         test before testing whether SRC is a directory.
7868         Suggestions from Bruno Haible.
7869
7870         Avoid a warning about an unused variable.
7871         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
7872         into the #ifdef block where it's used.
7873
7874         * lib/rename-dest-slash.c: New file.
7875
7876 2006-09-14  Bruno Haible  <bruno@clisp.org>
7877
7878         * lib/allocsa.c: Include <config.h> unconditionally.
7879         * lib/asnprintf.c: Likewise.
7880         * lib/asprintf.c: Likewise.
7881         * lib/c-strcasecmp.c: Likewise.
7882         * lib/c-strcasestr.c: Likewise.
7883         * lib/c-strncasecmp.c: Likewise.
7884         * lib/c-strstr.c: Likewise.
7885         * lib/classpath.c: Likewise.
7886         * lib/clean-temp.c: Likewise.
7887         * lib/concatpath.c: Likewise.
7888         * lib/copy-file.c: Likewise.
7889         * lib/csharpcomp.c: Likewise.
7890         * lib/csharpexec.c: Likewise.
7891         * lib/execute.c: Likewise.
7892         * lib/fatal-signal.c: Likewise.
7893         * lib/findprog.c: Likewise.
7894         * lib/fwriteerror.c: Likewise.
7895         * lib/gl_array_list.c: Likewise.
7896         * lib/gl_array_oset.c: Likewise.
7897         * lib/gl_avltree_list.c: Likewise.
7898         * lib/gl_avltree_oset.c: Likewise.
7899         * lib/gl_avltreehash_list.c: Likewise.
7900         * lib/gl_carray_list.c: Likewise.
7901         * lib/gl_linked_list.c: Likewise.
7902         * lib/gl_linkedhash_list.c: Likewise.
7903         * lib/gl_list.c: Likewise.
7904         * lib/gl_oset.c: Likewise.
7905         * lib/gl_rbtree_list.c: Likewise.
7906         * lib/gl_rbtree_oset.c: Likewise.
7907         * lib/gl_rbtreehash_list.c: Likewise.
7908         * lib/imaxabs.c: Likewise.
7909         * lib/imaxdiv.c: Likewise.
7910         * lib/javacomp.c: Likewise.
7911         * lib/javaexec.c: Likewise.
7912         * lib/javaversion.c: Likewise.
7913         * lib/linebreak.c: Likewise.
7914         * lib/localcharset.c: Likewise.
7915         * lib/lock.c: Likewise.
7916         * lib/mbchar.c: Likewise.
7917         * lib/mbswidth.c: Likewise.
7918         * lib/mkdtemp.c: Likewise.
7919         * lib/pipe.c: Likewise.
7920         * lib/printf-args.c: Likewise.
7921         * lib/printf-parse.c: Likewise.
7922         * lib/progname.c: Likewise.
7923         * lib/progreloc.c: Likewise.
7924         * lib/readlink.c: Likewise.
7925         * lib/sh-quote.c: Likewise.
7926         * lib/stpcpy.c: Likewise.
7927         * lib/stpncpy.c: Likewise.
7928         * lib/strcasecmp.c: Likewise.
7929         * lib/strcasestr.c: Likewise.
7930         * lib/strcspn.c: Likewise.
7931         * lib/striconv.c: Likewise.
7932         * lib/strncasecmp.c: Likewise.
7933         * lib/strnlen1.c: Likewise.
7934         * lib/strstr.c: Likewise.
7935         * lib/strtok_r.c: Likewise.
7936         * lib/tls.c: Likewise.
7937         * lib/tmpdir.c: Likewise.
7938         * lib/unicodeio.c: Likewise.
7939         * lib/unsetenv.c: Likewise.
7940         * lib/vasnprintf.c: Likewise.
7941         * lib/vasprintf.c: Likewise.
7942         * lib/wait-process.c: Likewise.
7943         * lib/xallocsa.c: Likewise.
7944         * lib/xsetenv.c: Likewise.
7945         * lib/xstriconv.c: Likewise.
7946
7947 2006-09-13  Simon Josefsson  <jas@extundo.com>
7948
7949         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
7950         that internally, suggested by Ralf Wildenhues
7951         <Ralf.Wildenhues@gmx.de>.
7952
7953 2006-09-13  Simon Josefsson  <jas@extundo.com>
7954
7955         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
7956         @LIBOBJS@.
7957         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7958
7959 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
7960
7961         * lib/_fpending.c: Include <config.h> unconditionally, since we no
7962         longer worry about uses that don't define HAVE_CONFIG_H.
7963         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
7964         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
7965         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
7966         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
7967         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
7968         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
7969         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
7970         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
7971         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
7972         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
7973         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
7974         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
7975         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
7976         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
7977         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
7978         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
7979         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
7980         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
7981         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
7982         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
7983         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
7984         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
7985         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
7986         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
7987         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
7988         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
7989         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
7990         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
7991         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
7992         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
7993         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
7994         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
7995         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
7996         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
7997         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
7998         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
7999         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
8000         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
8001         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
8002         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
8003         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
8004         Likewise.
8005
8006 2006-09-13  Eric Blake  <ebb9@byu.net>
8007
8008         * lib/getopt.c: Fix typo in last commit.
8009
8010 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
8011
8012         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
8013         dgettext.
8014
8015 2006-09-12  Jim Meyering  <jim@meyering.net>
8016
8017         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
8018         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
8019         Reported by Nelson H. F. Beebe.
8020
8021 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8022
8023         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
8024         program_invocation_name and program_invocation_short_name are
8025         initialized.
8026         * lib/argp-namefrob.h: Move declarations of program_invocation_name
8027         and program_invocation_short_name to argp.h, so they are visible
8028         to user programs.
8029         * lib/argp.h: Likewise
8030
8031 2006-09-10  Bruno Haible  <bruno@clisp.org>
8032
8033         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
8034         m4/inttypes_h.m4, m4/uintmax_t.m4.
8035
8036 2006-09-10  Bruno Haible  <bruno@clisp.org>
8037
8038         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
8039         gl_AC_TYPE_UINTMAX_T.
8040
8041 2006-09-10  Bruno Haible  <bruno@clisp.org>
8042
8043         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
8044
8045 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8046
8047         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
8048         convention.  Text proposed by Bruno Haible.
8049         (struct argp_option): Document the use of N_() wrappers.
8050
8051         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
8052         '\v', and translate the two parts separately, instead of feeding
8053         the whole string to gettext.  This allows to exclude
8054         '\v' from the strings visible to the translator by writing doc
8055         strings as N_("..") "\v" N_("..").
8056
8057 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
8058
8059         * config/srclist.txt: Undo latest change; the bug was fixed.
8060
8061 2006-09-09  Bruno Haible  <bruno@clisp.org>
8062
8063         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
8064         assignments if building a library without libtool.
8065         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
8066         in func_emit_lib_Makefile_am.
8067         (func_import): When building a static library libfoo.a, arrange to
8068         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
8069         (func_create_testdir): Likewise.
8070         * modules/gc (configure.ac, Makefile.am): If building statically,
8071         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
8072         * modules/iconvme (configure.ac, Makefile.am): Likewise.
8073         * modules/striconv (configure.ac, Makefile.am): Likewise.
8074         Based on a suggestion by Ralf Wildenhues.
8075
8076 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8077
8078         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8079         Check for unistd.h too, since Autoconf doesn't assume POSIX.
8080         Also:
8081
8082         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8083         Add year_2050_test to catch glibc bug 2821
8084         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
8085
8086         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8087         Prefer #ifdef to #if.
8088
8089         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
8090         Return from 'main' instead of calling 'exit'.
8091
8092 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8093
8094         * lib/mktime.c (guess_time_tm): Fix bug where mktime
8095         returned the maximum time_t value rather than (time_t) -1.
8096         Problem originally reported by William Bardwell
8097         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
8098
8099         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
8100         Moved to here ...
8101         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
8102         ... from here.
8103
8104 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8105
8106         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
8107         2821 is fixed.
8108
8109 2006-09-08  Jim Meyering  <jim@meyering.net>
8110
8111         Don't make generated files read-only.  That would bother too many
8112         people.  However, do retain the ability to work when targets are
8113         read-only: remove the destination and temporary files before writing
8114         them (when generated via sed or echo), or by using the -f option for
8115         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
8116         * modules/alloca-opt, modules/argz, modules/arpa_inet:
8117         * modules/byteswap, modules/configmake, modules/fcntl:
8118         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
8119         * modules/localcharset, modules/netinet_in, modules/poll:
8120         * modules/stdbool, modules/stdint, modules/sys_select:
8121         * modules/sys_socket, modules/sys_stat, modules/sysexits:
8122
8123 2006-09-08  Jim Meyering  <jim@meyering.net>
8124
8125         Avoid new build failure on FreeBSD 6.0.
8126         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
8127         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
8128         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
8129
8130 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8131
8132         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
8133
8134 2006-09-07  Jim Meyering  <jim@meyering.net>
8135
8136         Fix global typo in last change: use chmod u-w, not chmod u-x.
8137         Spotted by Paul Eggert and Bruce Korb.
8138         * modules/alloca-opt, modules/argz, modules/arpa_inet:
8139         * modules/byteswap, modules/configmake, modules/fcntl:
8140         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
8141         * modules/localcharset, modules/netinet_in, modules/poll:
8142         * modules/stdbool, modules/stdint, modules/sys_select:
8143         * modules/sys_socket, modules/sys_stat, modules/sysexits:
8144
8145 2006-09-06  Jim Meyering  <jim@meyering.net>
8146
8147         Make generated files be read-only.
8148         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
8149         Ensure that each generated file is now read-only.
8150         * modules/argz: Likewise.
8151         * modules/arpa_inet: Likewise.
8152         * modules/byteswap: Likewise.
8153         * modules/configmake: Likewise.
8154         * modules/fcntl: Likewise.
8155         * modules/fnmatch: Likewise.
8156         * modules/getopt: Likewise.
8157         * modules/glob: Likewise.
8158         * modules/inttypes: Likewise.
8159         * modules/netinet_in: Likewise.
8160         * modules/poll: Likewise.
8161         * modules/stdbool: Likewise.
8162         * modules/stdint: Likewise.
8163         * modules/sys_select: Likewise.
8164         * modules/sys_socket: Likewise.
8165         * modules/sys_stat: Likewise.
8166         * modules/sysexits: Likewise.
8167         * modules/localcharset: Same as above, but continue using temporary
8168         file named "t-$@" (why different?) rather than the "$@-t" used
8169         everywhere else.
8170
8171         * modules/sysexits (Makefile.am): Replace literal occurrences
8172         of "sysexit.h" more readable, and more consistent, "$@".
8173
8174 2006-09-06  Bruno Haible  <bruno@clisp.org>
8175
8176         * modules/striconv: New file.
8177         * modules/xstriconv: New file.
8178         * MODULES.html.sh (Internationalization functions): Add striconv,
8179         xstriconv.
8180
8181 2006-09-06  Bruno Haible  <bruno@clisp.org>
8182
8183         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
8184         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
8185         not using libtool correctly.
8186
8187 2006-09-06  Bruno Haible  <bruno@clisp.org>
8188
8189         * lib/striconv.h: New file.
8190         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
8191         iconvstring.c.
8192         * lib/xstriconv.h: New file.
8193         * lib/xstriconv.c: New file.
8194
8195 2006-09-06  Bruno Haible  <bruno@clisp.org>
8196
8197         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8198         lib_..._LDFLAGS.
8199
8200 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8201
8202         * lib/argz_.h: Sync from Libtool.
8203
8204         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
8205                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8206
8207         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
8208
8209 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
8210
8211         * modules/trim: New file.
8212
8213 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
8214
8215         * lib/trim.h: New file.
8216         * lib/trim.c: New file.
8217
8218 2006-09-05  Bruno Haible  <bruno@clisp.org>
8219
8220         * MODULES.html.sh (String handling): Add trim.
8221
8222 2006-09-04  Karl Berry  <karl@gnu.org>
8223
8224         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
8225         until next release.
8226
8227 2006-09-03  Bruno Haible  <bruno@clisp.org>
8228
8229         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
8230         correctly.
8231
8232 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8233
8234         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
8235         not gl_GETLOADAVG.  Omit unneeded semicolons.
8236         Problems reported by Ralf Wildenhues in
8237         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
8238         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
8239         at the end, which is the usual gnulib style.
8240
8241         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
8242         of doing all the work ourselves.
8243         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
8244         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
8245
8246 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8247
8248         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
8249         Problem reported by Ralf Wildenhues in
8250         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
8251
8252         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
8253         HAVE_STRUCT_STATFS_F_FSTYPENAME.
8254
8255 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8256
8257         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
8258         yesterday's patch by changing test -n to test -z.
8259
8260 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8261
8262         * modules/getloadavg (Files): Add m4/getloadavg.m4.
8263         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
8264         the former is now obsolescent.
8265
8266         * modules/chdir-long (Depends-on): Add fcntl.
8267
8268 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8269
8270         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
8271         obsolescent, and programs should use gnulib instead.
8272         * m4/getloadavg.m4: New file, with contents taken from Autoconf
8273         but with prefixes changed.
8274
8275 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8276
8277         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
8278         or stdbool.h, because they might not exist while configuring.
8279
8280         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
8281         Don't include unistd.h or limits.h; not needed, since chdir-long.h
8282         does that for us.
8283         (O_DIRECTORY): Remove.
8284
8285 2006-08-31  Eric Blake  <ebb9@byu.net>
8286
8287         * gnulib-tool: Don't let emacs change spaces to TAB.
8288
8289 2006-08-31  Bruno Haible  <bruno@clisp.org>
8290
8291         * gnulib-tool: When calling func_import more than once, do it in a
8292         subshell.
8293         Reported by Eric Blake <ebb9@byu.net>.
8294
8295 2006-08-31  Bruno Haible  <bruno@clisp.org>
8296
8297         * gnulib-tool (nl): Remove variable.
8298         (sed_transform_lib_file): Use more robust test for config-h module.
8299         (func_import): Fix typo in 2006-08-25 patch.
8300
8301 2006-08-31  Bruno Haible  <bruno@clisp.org>
8302
8303         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
8304         specified, augment Makefile.am variables instead of assigning them.
8305
8306 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8307
8308         Work around a bug in both the Linux and SunOS 64-bit kernels:
8309         nanosleep mishandles sleeps for longer than 2**31 seconds.
8310         Problem reported by Frank v Waveren in
8311         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
8312         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
8313         Check for nanosleep bug.
8314         (LIB_NANOSLEEP): Append clock_gettime library if needed.
8315
8316 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8317
8318         Work around a bug in both the Linux and SunOS 64-bit kernels:
8319         nanosleep mishandles sleeps for longer than 2**31 seconds.
8320         Problem reported by Frank v Waveren in
8321         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
8322         * lib/nanosleep.c (BILLION): New constant.
8323         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
8324         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
8325         implementation.
8326
8327 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8328
8329         * modules/nanosleep (Depends-on): Add gettime.
8330
8331 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
8332         and Simon Josefsson  <jas@extundo.com>
8333         and Oskar Liljeblad  <oskar@osk.mine.nu>
8334
8335         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
8336         * gnulib-tool (func_import): New license type 'unmodifiable license
8337         text'.
8338         * modules/fdl: Use it.  Longer description.
8339         * module/gpl, module/lgpl: New files.
8340
8341 2006-08-30  Jim Meyering  <jim@meyering.net>
8342
8343         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
8344         shadowing the parameter.
8345
8346 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8347
8348         Sync from Libtool:
8349
8350         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8351
8352         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
8353         sharing with gnulib.  Report by Eric Blake.
8354
8355 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8356
8357         * modules/isapipe: New file.
8358         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
8359
8360 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8361
8362         * modules/configmake (Makefile.am): Add a comment, and omit
8363         the CONFIGMAKE_ prefix from generated macro names.  Suggested
8364         by Bruno Haible.
8365
8366 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8367
8368         * m4/isapipe.m4: New file.
8369
8370 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
8371
8372         * lib/isapipe.c, lib/isapipe.h: New files.
8373
8374 2006-08-29  Jim Meyering  <jim@meyering.net>
8375
8376         * modules/configmake (Makefile.am): Make configmake.h depend on
8377         Makefile.  Otherwise, a stale configmake.h could hang around.
8378
8379 2006-08-29  Eric Blake  <ebb9@byu.net>
8380
8381         * lib/error.c (error_at_line, print_errno_message): Match libc, after
8382         resolution of upstream bug 3044.
8383
8384 2006-08-29  Bruno Haible  <bruno@clisp.org>
8385
8386         * modules/localcharset (Depends-on): Add configmake.
8387         (Makefile.am): Remove setting of LIBDIR through DEFS.
8388
8389 2006-08-29  Bruno Haible  <bruno@clisp.org>
8390
8391         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
8392         defined.
8393
8394 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8395
8396         * modules/fcntl: New file.
8397         * modules/chdir-safer (Depends-on): Add fcntl.
8398         * modules/fts: Likewise.
8399         * modules/mkdir-p: Likewise.
8400
8401         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
8402         This undoes the most recent change, since we're now addressing the
8403         problem in a different way.
8404
8405         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
8406         into output, since the output might be called Makefile.am even
8407         if $makefile_name is something different.
8408         (func_import): Use $makefile_am rather than
8409         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
8410         empty.
8411
8412         * modules/inttypes (Files): Add m4/inttypes-h.m4.
8413
8414 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8415
8416         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
8417         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
8418         recent change to stdint.m4, since we're now addressing the problem in a
8419         different way.
8420
8421 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8422
8423         * m4/fcntl_h.m4: New file.
8424
8425 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
8426
8427         * lib/fcntl_.h: New file.
8428         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
8429         the fcntl module.
8430         * lib/dirchownmod.c: Likewise.
8431         * lib/fts.c: Likewise.
8432
8433         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
8434         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
8435         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
8436         just before including <inttypes.h>, to avoid circular inclusion.
8437
8438 2006-08-28  Jim Meyering  <jim@meyering.net>
8439
8440         * doc/visibility.texi: Actually read and correct the grammar of the
8441         sentence affected by yesterday's change.
8442
8443 2006-08-28  Eric Blake  <ebb9@byu.net>
8444
8445         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
8446         needs wrapper.
8447
8448 2006-08-28  Eric Blake  <ebb9@byu.net>
8449
8450         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
8451
8452 2006-08-28  Eric Blake  <ebb9@byu.net>
8453
8454         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
8455
8456 2006-08-28  Bruno Haible  <bruno@clisp.org>
8457
8458         * modules/c-strstr: New file, from GNU gettext.
8459         * MODULES.html.sh (String handling): Add c-strstr.
8460
8461 2006-08-28  Bruno Haible  <bruno@clisp.org>
8462
8463         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
8464         macros.
8465         Reported by Eric Blake.
8466
8467 2006-08-28  Bruno Haible  <bruno@clisp.org>
8468
8469         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
8470         (VASNPRINTF): Return a string of length > INT_MAX without failing.
8471         * lib/vasprintf.c: Include errno.h, limits.h.
8472         (EOVERFLOW): New fallback definition.
8473         (vasprintf): Test here whether the string length is > INT_MAX.
8474         * lib/vsnprintf.c: Include errno.h, limits.h.
8475         (EOVERFLOW): New fallback definition.
8476         (vsnprintf): Fix bug when generated string was too long for the buffer.
8477         Test here whether the string length is > INT_MAX.
8478
8479 2006-08-28  Bruno Haible  <bruno@clisp.org>
8480
8481         * lib/inttypes_.h (SCNX*): Remove definitions.
8482         Reported by Eric Blake.
8483
8484 2006-08-28  Bruno Haible  <bruno@clisp.org>
8485
8486         * lib/c-strstr.h: New file, from GNU gettext.
8487         * lib/c-strstr.c: New file, from GNU gettext.
8488
8489 2006-08-28  Bruno Haible  <bruno@clisp.org>
8490
8491         * gnulib-tool: Reorder some statements.
8492
8493 2006-08-28  Bruno Haible  <bruno@clisp.org>
8494
8495         * gnulib-tool: New option --makefile-name.
8496         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
8497         $makefile_name.
8498         (func_import): Write $makefile_name to the cache file, and read it from
8499         there unless explicitly specified. Use $makefile_name as file name
8500         instead of Makefile.am. Adjust the recommendations accordingly.
8501
8502 2006-08-28  Bruno Haible  <bruno@clisp.org>
8503
8504         * gnulib-tool (func_verify_module): Check against misapplying patch.
8505
8506 2006-08-28  Bruno Haible  <bruno@clisp.org>
8507
8508         * gnulib-tool (func_relativize, func_relconcat): New functions.
8509         Give an error if --local-dir is given with --update.
8510         Remove trailing slashes from $local_gnulib_dir.
8511         (func_import): Store the relativized $local_gnulib_dir in
8512         gnulib-cache.m4, and read it from there if not specified explicitly.
8513
8514 2006-08-28  Bruno Haible  <bruno@clisp.org>
8515
8516         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
8517         is the current directory. Respect also $local_gnulib_dir.
8518
8519 2006-08-28  Bruno Haible  <bruno@clisp.org>
8520             Simon Josefsson  <jas@extundo.com>
8521
8522         BeOS portability.
8523         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
8524
8525 2006-08-27  Jim Meyering  <jim@meyering.net>
8526
8527         * doc/visibility.texi: Remove duplicate word: "pointer".
8528
8529 2006-08-26  Bruno Haible  <bruno@clisp.org>
8530
8531         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
8532         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
8533         (Makefile.am): Create inttypes.h from inttypes_.h.
8534         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
8535
8536         * modules/imaxabs: New file.
8537
8538         * modules/imaxdiv: New file.
8539
8540 2006-08-26  Bruno Haible  <bruno@clisp.org>
8541
8542         * m4/inttypes.m4: New file.
8543         * m4/_inttypes_h.m4: Remove file.
8544         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
8545         PRI_MACROS_BROKEN.
8546         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
8547
8548         * m4/imaxabs.m4: New file.
8549
8550         * m4/imaxdiv.m4: New file.
8551
8552 2006-08-26  Bruno Haible  <bruno@clisp.org>
8553
8554         * lib/inttypes_.h: New file.
8555         * lib/inttypes.h: Remove file.
8556         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
8557
8558         * lib/imaxabs.c: New file.
8559
8560         * lib/imaxdiv.c: New file.
8561
8562 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8563
8564         New config-h module, so that "make" output needn't be cluttered
8565         by -DHAVE_CONFIG_H.
8566         * MODULES.html.sh (Support for building libraries and executables):
8567         Add config-h.
8568         * modules/config-h: New file.
8569         * gnulib-tool (nl, sed_transform_lib_file): New vars.
8570         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
8571         the config-h module is used.
8572
8573         New configmake module, so that "make" output needn't be cluttered
8574         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
8575         * MODULES.html.sh (Support for building libraries and executables):
8576         Add configmake.
8577         * modules/configmake: New file.
8578
8579 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8580
8581         * m4/config-h.m4: New file.
8582
8583 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8584
8585         * config/srclist.txt: Add elisp-comp.
8586
8587 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8588
8589         * MODULES.html.sh (Support for building libraries and executables):
8590         Add elisp-comp.
8591         * build-aux/elisp-comp: New file.
8592         * modules/elisp-comp: New file.
8593
8594 2006-08-24  Bruno Haible  <bruno@clisp.org>
8595
8596         * gnulib-tool (func_create_testdir): Use non-default values of
8597         sourcebase and m4base.
8598
8599 2006-08-24  Bruno Haible  <bruno@clisp.org>
8600
8601         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
8602         HTML structure.
8603
8604 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
8605
8606         * modules/openat (Depends-on): Add lchown.
8607
8608 2006-08-23  Bruno Haible  <bruno@clisp.org>
8609
8610         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
8611         of gl_LOCK_EARLY instead of gl_LOCK.
8612
8613 2006-08-23  Bruno Haible  <bruno@clisp.org>
8614
8615         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
8616         on OSF/1 to no.
8617         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
8618
8619 2006-08-23  Bruno Haible  <bruno@clisp.org>
8620
8621         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
8622         as unusable.
8623
8624         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
8625         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
8626         (gl_LOCK): New macro.
8627
8628 2006-08-22  Simon Josefsson  <jas@extundo.com>
8629
8630         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
8631         to md5 module.
8632
8633 2006-08-22  Simon Josefsson  <jas@extundo.com>
8634
8635         * MODULES.html.sh: Add "Support for maintaining and release
8636         projects".
8637
8638         * build-aux/gnupload: New file, from coreutils.
8639
8640 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8641
8642         Avoid the need for AC_LIBSOURCES in m4 macros.
8643         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
8644         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
8645         * modules/check-version (EXTRA_DIST): Add check-version.h.
8646         * modules/crc (EXTRA_DIST): Add crc.h.
8647         * modules/des (EXTRA_DIST): Add des.h.
8648         * modules/gc (EXTRA_DIST): Add gc.h.
8649         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
8650         * modules/getline (EXTRA_DIST): Add getline.h.
8651         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
8652         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
8653         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
8654         * modules/md2 (EXTRA_DIST): Add md2.h.
8655         * modules/md4 (EXTRA_DIST): Add md4.h.
8656         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
8657         * modules/read-file (EXTRA_DIST): Add read-file.h.
8658         * modules/readline (EXTRA_DIST): Add readline.h.
8659         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
8660         rijndael-api-fst.h.
8661
8662 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8663
8664         * m4/rijndael.m4 (gl_ARCFOUR):
8665         * m4/arctwo.m4 (gl_ARCTWO):
8666         * m4/check-version.m4 (gl_CHECK_VERSION):
8667         * m4/crc.m4 (gl_CRC):
8668         * m4/des.m4 (gl_DES):
8669         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
8670         * m4/gc.m4 (gl_GC):
8671         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
8672         * m4/getline.m4 (gl_FUNC_GETLINE):
8673         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
8674         * m4/hmac-md5.m4 (gl_HMAC_MD5):
8675         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
8676         * m4/md2.m4 (gl_MD2):
8677         * m4/md4.m4 (gl_MD4):
8678         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
8679         * m4/read-file.m4 (gl_FUNC_READ_FILE):
8680         * m4/readline.m4 (gl_FUNC_READLINE):
8681         * m4/rijndael.m4 (gl_RIJNDAEL):
8682         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
8683         to get the necessary .h files and whatnot.
8684
8685 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
8686
8687         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
8688         gnulib rather than the other way around.
8689         * config/srclistvars.sh (COREUTILS): Remove.
8690
8691 2006-08-22  Jim Meyering  <jim@meyering.net>
8692
8693         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
8694
8695         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
8696
8697 2006-08-22  Eric Blake  <ebb9@byu.net>
8698
8699         * modules/regexprops-generic: New file.
8700         * MODULES.html.sh (Support for building documentation): List it.
8701
8702 2006-08-22  Eric Blake  <ebb9@byu.net>
8703
8704         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
8705         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
8706         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
8707         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
8708
8709 2006-08-22  Bruno Haible  <bruno@clisp.org>
8710
8711         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
8712         and lib_LTLIBRARIES like the other lib_* variables.
8713
8714 2006-08-22  Bruno Haible  <bruno@clisp.org>
8715
8716         * build-aux/x-to-1.in: New file, from GNU gettext.
8717
8718 2006-08-22  Bruno Haible  <bruno@clisp.org>
8719
8720         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
8721         <utmpx.h> exists.
8722
8723 2006-08-22  Bruno Haible  <bruno@clisp.org>
8724
8725         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
8726         <utmpx.h> exists.
8727
8728 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8729
8730         BeOS portability.
8731         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
8732         exist.
8733         Problem reported by Bruno Haible.
8734
8735 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8736
8737         Avoid the need for AC_LIBSOURCES in m4 macros.
8738         * modules/acl (EXTRA_DIST): Add acl.h.
8739         * modules/argmatch (Files): Add m4/argmatch.m4.
8740         (configure.ac): Add gl_ARGMATCH.
8741         (EXTRA_DIST): Renamed from lib_SOURCES, for
8742         consistency with the other modules.  Remove argmatch.c.
8743         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
8744         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
8745         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
8746         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
8747         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
8748         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
8749         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
8750         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
8751         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
8752         * modules/closeout (EXTRA_DIST): Add closeout.h.
8753         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
8754         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
8755         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
8756         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
8757         dirname.h; remove basename.c and stripslash.c.
8758         * modules/exclude (EXTRA_DIST): Add exclude.h.
8759         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
8760         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
8761         * modules/file-type (EXTRA_DIST): Add file-type.h.
8762         * modules/filemode (EXTRA_DIST): Add filemode.h.
8763         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
8764         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
8765         * modules/fpending (EXTRA_DIST): Add __fpending.h.
8766         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
8767         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
8768         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
8769         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
8770         * modules/getdate (EXTRA_DIST): Add getdate.c.
8771         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
8772         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
8773         * modules/getpass (EXTRA_DIST): Add getpass.h.
8774         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
8775         * modules/group-member (EXTRA_DIST): Add group-member.h.
8776         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
8777         * modules/hash (EXTRA_DIST): Add hash.h.
8778         * modules/human (EXTRA_DIST): Add human.h.
8779         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
8780         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
8781         * modules/lchown (EXTRA_DIST): Add lchown.h.
8782         * modules/long-options (EXTRA_DIST): Add long-options.h.
8783         * modules/lstat (EXTRA_DIST): Add lstat.h.
8784         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
8785         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
8786         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
8787         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
8788         * modules/memxor (EXTRA_DIST): Add memxor.h.
8789         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
8790         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
8791         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
8792         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
8793         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
8794         * modules/physmem (EXTRA_DIST): Add physmem.h.
8795         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
8796         * modules/posixver (EXTRA_DIST): Add posixver.h.
8797         * modules/quote (EXTRA_DIST): Add quote.h.
8798         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
8799         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
8800         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
8801         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
8802         regex_internal.h regexec.c.
8803         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
8804         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
8805         * modules/same (EXTRA_DIST): Add same.h.
8806         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
8807         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
8808         * modules/savedir (EXTRA_DIST): Add savedir.h.
8809         * modules/sha1 (EXTRA_DIST): Add sha1.h.
8810         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
8811         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
8812         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
8813         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
8814         * modules/strdup (EXTRA_DIST): Add strdup.h.
8815         * modules/strftime (EXTRA_DIST): Add strftime.h.
8816         * modules/strndup (EXTRA_DIST): Add strndup.h.
8817         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
8818         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
8819         * modules/time_r (EXTRA_DIST): Add time_r.h.
8820         * modules/timespec (EXTRA_DIST): Add timespec.h.
8821         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
8822         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
8823         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
8824         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
8825         * modules/userspec (EXTRA_DIST): Add userspec.h.
8826         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
8827         * modules/utimens (EXTRA_DIST): Add utimens.h.
8828         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
8829         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
8830         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
8831         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
8832         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
8833         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
8834         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
8835         * modules/yesno (EXTRA_DIST): Add yesno.h.
8836
8837 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
8838
8839         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
8840
8841         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
8842         * m4/dev-ino.m4, same-inode.m4: Remove.
8843
8844         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
8845         * m4/acl.m4 (AC_FUNC_ACL):
8846         * m4/backupfile.m4 (gl_BACKUPFILE):
8847         * m4/c-strtod.m4 (gl_C99_STRTOLD):
8848         * m4/canon-host.m4 (gl_CANON_HOST):
8849         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
8850         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
8851         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
8852         * m4/cloexec.m4 (gl_CLOEXEC):
8853         * m4/close-stream.m4 (gl_CLOSE_STREAM):
8854         * m4/closeout.m4 (gl_CLOSEOUT):
8855         * m4/dirfd.m4 (gl_FUNC_DIRFD):
8856         * m4/dirname.m4 (gl_DIRNAME):
8857         * m4/exclude.m4 (gl_EXCLUDE):
8858         * m4/exitfail.m4 (gl_EXITFAIL):
8859         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
8860         * m4/file-type.m4 (gl_FILE_TYPE):
8861         * m4/filemode.m4 (gl_FILEMODE):
8862         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
8863         * m4/fpending.m4 (gl_FUNC_FPENDING):
8864         * m4/fprintftime.m4 (gl_FPRINTFTIME):
8865         * m4/fts.m4 (gl_FUNC_FTS):
8866         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
8867         * m4/getdate.m4 (gl_GETDATE):
8868         * m4/gethrxtime.m4 (gl_GETHRXTIME):
8869         * m4/getpagesize.m4 (gl_GETPAGESIZE):
8870         * m4/getpass.m4 (gl_FUNC_GETPASS):
8871         * m4/gettime.m4 (gl_GETTIME):
8872         * m4/getugroups.m4 (gl_GETUGROUPS):
8873         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
8874         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
8875         * m4/hard-locale.m4 (gl_HARD_LOCALE):
8876         * m4/hash.m4 (gl_HASH):
8877         * m4/idcache.m4 (gl_IDCACHE):
8878         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
8879         * m4/lchown.m4 (gl_FUNC_LCHOWN):
8880         * m4/long-options.m4 (gl_LONG_OPTIONS):
8881         * m4/lstat.m4 (gl_FUNC_LSTAT):
8882         * m4/md5.m4 (gl_MD5):
8883         * m4/memcasecmp.m4 (gl_MEMCASECMP):
8884         * m4/memcoll.m4 (gl_MEMCOLL):
8885         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
8886         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
8887         * m4/memxor.m4 (gl_MEMXOR):
8888         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
8889         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
8890         * m4/modechange.m4 (gl_MODECHANGE):
8891         * m4/mountlist.m4 (gl_MOUNTLIST):
8892         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
8893         * m4/openat.m4 (gl_FUNC_OPENAT):
8894         * m4/pathmax.m4 (gl_PATHMAX):
8895         * m4/physmem.m4 (gl_PHYSMEM):
8896         * m4/posixtm.m4 (gl_POSIXTM):
8897         * m4/posixver.m4 (gl_POSIXVER):
8898         * m4/quote.m4 (gl_QUOTE):
8899         * m4/quotearg.m4 (gl_QUOTEARG):
8900         * m4/readtokens.m4 (gl_READTOKENS):
8901         * m4/readutmp.m4 (gl_READUTMP):
8902         * m4/regex.m4 (gl_REGEX):
8903         * m4/safe-read.m4 (gl_SAFE_READ):
8904         * m4/safe-write.m4 (gl_SAFE_WRITE):
8905         * m4/same.m4 (gl_SAME):
8906         * m4/save-cwd.m4 (gl_SAVE_CWD):
8907         * m4/savedir.m4 (gl_SAVEDIR):
8908         * m4/settime.m4 (gl_SETTIME):
8909         * m4/sha1.m4 (gl_SHA1):
8910         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
8911         * m4/stat-macros.m4 (gl_STAT_MACROS):
8912         * m4/stat-time.m4 (gl_STAT_TIME):
8913         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
8914         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
8915         * m4/strdup.m4 (gl_FUNC_STRDUP):
8916         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
8917         * m4/strndup.m4 (gl_FUNC_STRNDUP):
8918         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
8919         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
8920         * m4/time_r.m4 (gl_TIME_R):
8921         * m4/timespec.m4 (gl_TIMESPEC):
8922         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
8923         * m4/unlinkdir.m4 (gl_UNLINKDIR):
8924         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
8925         * m4/userspec.m4 (gl_USERSPEC):
8926         * m4/utimecmp.m4 (gl_UTIMECMP):
8927         * m4/utimens.m4 (gl_UTIMENS):
8928         * m4/xalloc.m4 (gl_XALLOC):
8929         * m4/xgetcwd.m4 (gl_XGETCWD):
8930         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
8931         * m4/xreadlink.m4 (gl_XREADLINK):
8932         * m4/xstrtod.m4 (gl_XSTRTOD):
8933         * m4/yesno.m4 (gl_YESNO):
8934         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
8935         to get the necessary .h files and whatnot.
8936
8937 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
8938             Bruno Haible  <bruno@clisp.org>
8939
8940         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
8941         /bin/sh understanding of '!' conditional negation.
8942
8943 2006-08-21  Jim Meyering  <jim@meyering.net>
8944
8945         * modules/openat (Depends-on): Really alphabetize.
8946
8947         * modules/acl (Depends-on): Add error and quote.
8948
8949         * check-module (find_included_lib_files): Add at-func.c to the
8950         ok-to-include-more-than-once white list.
8951
8952         * modules/openat (Depends-on): Add lstat.  Alphabetize.
8953
8954 2006-08-21  Bruno Haible  <bruno@clisp.org>
8955
8956         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8957         Emit a pkgdata_DATA variable only if some snippets add contents to it.
8958         Reported by Martin Lambers <marlam@marlam.de>.
8959
8960 2006-08-21  Bruno Haible  <bruno@clisp.org>
8961
8962         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
8963         specify an installation location, don't emit a noinst_LIBRARIES or
8964         noinst_LTLIBRARIES assignment.
8965
8966 2006-08-21  Bruno Haible  <bruno@clisp.org>
8967
8968         BeOS portability.
8969         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
8970         BeOS has mbrtowc() but no <wctype.h>.
8971
8972 2006-08-21  Bruno Haible  <bruno@clisp.org>
8973
8974         BeOS portability.
8975         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
8976         exist.
8977
8978 2006-08-21  Bruno Haible  <bruno@clisp.org>
8979
8980         BeOS portability.
8981         * lib/mbchar.h: Include <wctype.h> only if it exists.
8982
8983 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8984
8985         Remove files that are no longer needed by their respective modules.
8986         * m4/obstack.m4: Remove.
8987         * m4/strerror_r.m4: Remove.
8988         * m4/uint32_t.m4: Remove.
8989         * m4/uintptr_t.m4: Remove.
8990         * m4/ullong_max.m4: Remove.
8991         * m4/xstrtoimax.m4: Remove.
8992         * m4/xstrtoumax.m4: Remove.
8993
8994         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
8995         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
8996         dependencies now capture this.
8997
8998         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
8999         Do not use AC_LIBSOURCES, since gnulib modules now do this.
9000         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
9001         * m4/human.m4 (gl_HUMAN): Likewise.
9002         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
9003         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
9004
9005         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
9006
9007         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
9008         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
9009         stdint.
9010         * m4/human.m4 (gl_HUMAN): Likewise.
9011         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
9012         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
9013         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
9014         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
9015         * m4/xstrtol (gl_XSTRTOL): Likewise.
9016
9017         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
9018         AC_TYPE_LONG_LONG_INT.
9019         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
9020         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
9021         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
9022         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
9023
9024         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
9025         on stdbool.
9026
9027         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
9028         (gl_PREREQ_XSTRTOUL): Remove.
9029
9030         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
9031
9032         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
9033         mode.
9034
9035 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9036
9037         Add and change modules to make it easier for coreutils to use
9038         gnulib-tool.
9039         * modules/backupfile (Files): Remove m4/d-ino.m4.
9040         (Depends-on): Add d-ino.
9041         * modules/cycle-check (Depends-on): Add stdint.
9042         (lib_SOURCES): Add cycle-check.h.
9043         * modules/d-ino: New module.
9044         * modules/d-type: New module.
9045         * modules/error (Files): Remove m4/strerror_r.m4.
9046         * modules/filemode (Files): Add m4/st_dm_mode.m4.
9047         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
9048         m4/inttypes_h.m4, m4/uintmax_t.m4.
9049         (Depends-on): Add stdint.
9050         (lib_SOURCES): Add fsusage.h.
9051         * modules/getcwd (Files): Remove d-ino.m4.
9052         (Depends-on): Add d-ino.
9053         * modules/getndelim2 (Depends-on): Add stdint.
9054         * modules/glob (Files): Remove m4/d-type.m4.
9055         (Depends-on): Add d-type.
9056         * modules/host-os: New module.
9057         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
9058         m4/inttypes_h.m4, m4/uintmax_t.m4.
9059         * Depends-on: Add stdint.
9060         (lib_SOURCES): Add human.h.
9061         * modules/inttostr (Files): Remove m4/intmax_t.m4,
9062         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
9063         m4/uintmax_t.m4, m4/ulonglong.m4.
9064         (Depends-on): Add stdint.
9065         (EXTRA_DIST): Add inttostr.h.
9066         * modules/lchmod: New module.
9067         * modules/link-follow: New module.
9068         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
9069         (Depends-on): Add lchmod.
9070         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
9071         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
9072         (Depends-on): Add stdint.
9073         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
9074         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9075         (Depends-on): Add stdint.
9076         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
9077         * modules/perl: New module.
9078         * modules/regex (Depends-on): Add stdint.
9079         * modules/rmdir-errno: New module.
9080         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
9081         m4/intmax_t.m4.
9082         (Depends-on): Add stdint.
9083         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
9084         m4/uintmax_t.m4.
9085         (Depends-on): Add stdint.
9086         * modules/unlink-busy: New module.
9087         * modules/utimecmp (Depends-on): Add stdint.
9088         * modules/uptime: New module.
9089         * modules/winsz-ioctl: New module.
9090         * modules/winsz-termios: New module.
9091         * modules/xnanosleep (Depends-on): Add nanosleep.
9092         * modules/ullong_max: Remove.
9093         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
9094         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
9095         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
9096         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
9097         (Depends-on): Add inttypes.
9098         (lib_SOURCES): Add xstrtol.h.
9099         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
9100         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
9101         * MODULES.html.sh: Move 'assert' into the assert section.
9102         Move 'dummy' into the linking section.
9103         Remove ullong_max.
9104         Add section for compatibility checks for POSIX:2001 functions,
9105         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
9106         winsz-ioctl, and winsz-termios into it.
9107         Add lchmod.
9108         Add top-level Misc section and put host-os, perl, and uptime
9109         into it.
9110
9111 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9112
9113         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
9114         now assume the stdint module.  Do not include inttypes.h.
9115         * lib/fsusage.h: Likewise.
9116         * lib/getndelim2.c: Likewise.
9117         * lib/human.h: Likewise.
9118         * lib/inttostr.h: Likewise.
9119         * lib/obstack.c: Likewise.
9120         * lib/regex_internal.h: Likewise.
9121         * lib/tempname.c: Likewise.
9122         * lib/utimecmp.c: Likewise.
9123         * lib/xstrtol.h: Likewise.
9124
9125         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
9126
9127         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
9128         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
9129         * lib/xtime.h: Likewise.
9130
9131 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9132
9133         * modules/openat (Files): Add lib/fchmodat.c.
9134         Fixes problem reported by Jay Youngman.
9135
9136 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9137
9138         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
9139         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
9140
9141 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
9142             Bruno Haible  <bruno@clisp.org>
9143
9144         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
9145         and is a script that invokes bison. Tighten the code. Add comments.
9146
9147 2006-08-18  Jim Meyering  <jim@meyering.net>
9148
9149         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
9150         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
9151         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
9152         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
9153
9154 2006-08-18  Bruno Haible  <bruno@clisp.org>
9155
9156         * modules/bison-i18n: New file.
9157         * MODULES.html.sh (Internationalization functions): Add it.
9158
9159 2006-08-18  Bruno Haible  <bruno@clisp.org>
9160
9161         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
9162         sys/statvfs.h. When getmntinfo was found, check its declaration and
9163         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
9164
9165 2006-08-18  Bruno Haible  <bruno@clisp.org>
9166
9167         * m4/bison-i18n.m4: New file, from bison.
9168
9169 2006-08-18  Bruno Haible  <bruno@clisp.org>
9170
9171         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
9172         (ME_DUMMY): Treat "kernfs" as a dummy.
9173         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
9174
9175 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9176
9177         Update from coreutils.
9178
9179         2006-08-15  Jim Meyering  <jim@meyering.net>
9180
9181         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
9182
9183         2006-01-17  Jim Meyering  <jim@meyering.net>
9184
9185         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
9186
9187         2006-01-11  Jim Meyering  <jim@meyering.net>
9188
9189         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
9190         Check for the lchmod function.
9191
9192 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9193
9194         Update from coreutils.
9195
9196         * lib/__fpending.h: Add copyright notice.
9197         * lib/fprintftime.h: Likewise.
9198         * lib/savedir.c: Use (C) in copyright notice.
9199         * lib/savedir.h: Likewise.
9200
9201         2006-08-15  Jim Meyering  <jim@meyering.net>
9202
9203         * lib/at-func.c: New file, with the logic of all emulated at-functions.
9204         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
9205         in support of the EXPECTED_ERRNO macro.
9206         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
9207         definitions.  Instead, define the appropriate symbols and include
9208         "at-func.c".
9209         * lib/mkdirat.c (mkdirat): Likewise.
9210         * lib/fchmodat.c (fchmodat): Likewise.
9211         (ENOSYS): Remove definition.
9212         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
9213         it.  Don't include "unistd--.h" -- it wasn't ever used.
9214
9215         2006-01-17  Jim Meyering  <jim@meyering.net>
9216
9217         Rewrite fts.c not to change the current working directory,
9218         by using openat, fstatat, fdopendir, etc..
9219
9220         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
9221         (HAVE_OPENAT_SUPPORT): Define.
9222         [_LIBC] (fchdir): Don't undef or define; no longer used.
9223         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
9224         Now, this `function' always succeeds, and consumes its file descriptor
9225         parameter -- so callers must not close such FDs.  Update callers.
9226         (diropen_fd, opendirat, cwd_advance_fd): New functions.
9227         (diropen): Add parameter, SP.  Adjust all callers.
9228         Implement using diropen_fd, rather than open.
9229         (fts_open): Initialize new member, fts_cwd_fd.
9230         Remove fts_rft-setting code.
9231         (fts_close): Close fts_cwd_fd, if necessary.
9232         (__opendir2): Define in terms of opendir or opendirat,
9233         depending on whether the FST_NOCHDIR flag is set.
9234         (fts_build): Since fts_safe_changedir consumes its FD, and since
9235         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
9236         and close the dup'd file descriptor upon failure.
9237         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
9238         (fts_safe_changedir): Tweak semantics to reflect that this function
9239         now calls cwd_advance_fd and hence consumes its FD argument.
9240         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
9241         [struct FTS] (fts_rft): Remove now-unused member.
9242         [struct FTS] (fts_cycle.state): Improve comment.
9243
9244         * lib/openat.c (openat_needs_fchdir): New function.
9245         * lib/openat.h (openat_needs_fchdir): Declare it.
9246
9247 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
9248
9249         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
9250         Problem and fix reported by Pádraig Brady in
9251         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
9252
9253 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9254
9255         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
9256
9257 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9258
9259         * lib/memcoll.c (memcoll): Optimize for the common case where the
9260         arguments are bytewise equal.
9261
9262 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9263
9264         * doc/regexprops-generic.texi: Add a copyright notice.
9265
9266 2006-08-15  Bruno Haible  <bruno@clisp.org>
9267
9268         * modules/tmpdir (License): Change to LGPL.
9269
9270 2006-08-15  Bruno Haible  <bruno@clisp.org>
9271
9272         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
9273         module.
9274
9275 2006-08-14  Simon Josefsson  <jas@extundo.com>
9276
9277         * config/srclist.txt: Add gnupload.
9278
9279 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9280
9281         Change copyright notice from LGPL 2 to GPL 2, since that's the
9282         standard form used in the gnulib repository.
9283         * tests/test-lock.c: Likewise.
9284         * tests/test-stdint.c: Likewise.
9285         * tests/test-tls.c: Likewise.
9286
9287         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
9288         prelude-manager.  User shorter URLs for GNU projects, without '?'.
9289         Add copyright notice.
9290
9291         * check-module: Add copyright notice.  Output a copyright
9292         notice if "--version" is specified.
9293         * modules/COPYING: New file.
9294         * tests/test-getaddrinfo.c: Add copyright notice.
9295         * tests/test-verify.c: Likewise.
9296
9297 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9298
9299         Change copyright notice from LGPL 2 to GPL 2, since that's the
9300         standard form used in the gnulib repository.
9301         * lib/lock.c: LGPL -> GPL.
9302         * lib/lock.h: Likewise.
9303         * lib/strnlen1.c: Likewise.
9304         * lib/strnlen1.h: Likewise.
9305         * lib/tls.c: Likewise.
9306         * lib/tls.h: Likewise.
9307         * lib/tmpdir.c: Likewise.
9308
9309         * lib/TODO: Remove; this belongs only in coreutils.
9310
9311 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9312
9313         Add copyright notices to long-enough files that lack them, since
9314         otherwise the files aren't clearly free.  Use the same notice that
9315         getdate.texi already uses.
9316         * doc/alloca-opt.texi: Add copyright notice.
9317         * doc/alloca.texi: Likewise.
9318         * doc/ctime.texi: Likewise.
9319         * doc/functions.texi: Likewise.
9320         * doc/gcd.texi: Likewise.
9321         * doc/gnulib-tool.texi: Likewise.
9322         * doc/inet_ntoa.texi: Likewise.
9323         * doc/visibility.texi: Likewise.
9324
9325         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
9326         * doc/quote.texi: Add copyright notice.
9327
9328         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
9329         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
9330         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
9331         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
9332         is now obsolete, and give a pointer to the Sun list.
9333         Add copyright notice.
9334
9335 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
9336
9337         * config/srclistvars.sh: Add copyright notice.
9338
9339 2006-08-14  Eric Blake  <ebb9@byu.net>
9340
9341         Import the following change from libc:
9342
9343         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
9344
9345         Upstream bug 2997.
9346         * lib/misc/error.c: Add space between program name and message if file
9347         name is missing.
9348
9349 2006-08-12  Karl Berry  <karl@gnu.org>
9350
9351         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
9352         remove, these originate in gnulib now.
9353
9354 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9355
9356         * doc/Makefile (standards.info standards.html standards.dvi):
9357         Also depend on make-stds.texi.
9358
9359 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
9360
9361         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
9362         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
9363
9364         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
9365         in wchar_t.  Problem reported by Eric Blake.
9366
9367         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
9368         LEN is smaller than SIZE.  Suggested by Bruno Haible.
9369         Also, help the compiler to keep LEN in a register.
9370
9371 2006-08-11  Eric Blake  <ebb9@byu.net>
9372
9373         * users.txt: Sort.  Add tar.
9374
9375 2006-08-11  Bruno Haible  <bruno@clisp.org>
9376
9377         * users.txt: New file.
9378
9379 2006-08-11  Bruno Haible  <bruno@clisp.org>
9380
9381         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
9382         before <wchar.h>. Needed for OSF/1 and BSD/OS.
9383
9384 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
9385
9386         * modules/snprintf (Depends-on): Remove minmax.
9387         (Maintainer): Add self and Bruno.
9388
9389 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
9390
9391         * lib/.cppi-disable: Add snprintf.h, socket_.h.
9392         * lib/snprintf.c: Include <errno.h> and <limits.h>.
9393         (EOVERFLOW): Define if the system does not.
9394         Do not include "minmax.h"; it wasn't used.
9395         (snprintf): Don't assume size_t promotes to an unsigned type.
9396         Fix bug when generated string was too long for the buffer: the
9397         buffer's contents are supposed to be the initial prefix of the
9398         output.  Don't assume vasnprintf returns EOVERFLOW if the size
9399         exceeds INT_MAX; do the check ourselves.
9400
9401         Import the following changes from libc:
9402
9403         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
9404
9405         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
9406         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
9407         set wc to the byte which couldn't be converted.
9408         (re_string_reconstruct): Don't clear valid_raw_len before calling
9409         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
9410         tip_context using re_string_context_at.
9411
9412         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
9413
9414         * lib/posix/regex.h: g++ still cannot handled [restrict].
9415
9416         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
9417
9418         * lib/posix/regex.h: Remove special handling for VMS.
9419
9420 2006-08-10  Jim Meyering  <jim@meyering.net>
9421
9422         * modules/same-inode: New module.
9423         * modules/dev-ino: New module.
9424         * modules/cycle-check: Depend on these modules, rather than simply
9425         including their .h files.
9426         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
9427         required via m4/cycle-check.m4.
9428         * modules/same: Depend on new same-inode module, rather than
9429         including same-inode.h.
9430         * modules/chdir-safer: New file.
9431
9432         * modules/chown (Depends-on): Add stat-macros.
9433
9434 2006-08-10  Jim Meyering  <jim@meyering.net>
9435
9436         * m4/cycle-check.m4: New file.
9437         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
9438         * m4/dev-ino.m4, m4/same-inode.m4: New files.
9439
9440 2006-08-10  Eric Blake  <ebb9@byu.net>
9441
9442         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
9443         in from original proposal.
9444
9445 2006-08-10  Eric Blake  <ebb9@byu.net>
9446         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9447
9448         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
9449         namespace.
9450
9451 2006-08-10  Bruno Haible  <bruno@clisp.org>
9452
9453         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
9454         as well.
9455
9456 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9457
9458         Sync from coreutils.
9459
9460         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
9461
9462         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
9463         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
9464
9465 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9466
9467         * modules/restrict: Remove; no longer needed now that we assume
9468         Autoconf 2.59 or later.
9469         * MODULES.html.sh: Remove 'restrict'.
9470         * modules/argp (Depends-on): Remove 'restrict'.
9471         * modules/base64 (Depends-on): Likewise.
9472         * modules/gc (Depends-on): Likewise.
9473         * modules/getaddrinfo (Depends-on): Likewise.
9474         * modules/glob (Depends-on): Likewise.
9475         * modules/inet_ntop (Depends-on): Likewise.
9476         * modules/inet_pton (Depends-on): Likewise.
9477         * modules/memxor (Depends-on): Likewise.
9478         * modules/regex (Depends-on): Likewise.
9479         * modules/strtok_r (Depends-on): Likewise.
9480         * modules/time_r (Depends-on): Likewise.
9481
9482 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
9483
9484         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
9485         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
9486         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
9487         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
9488         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
9489         * m4/memxor.m4 (gl_MEMXOR): Likewise.
9490         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
9491         gl_C_RESTRICT replaced by AC_C_RESTRICT.
9492
9493         Merge from coreutils.
9494         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
9495         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
9496         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
9497         * m4/time_r.m4 (gl_TIME_R): Likewise.
9498
9499 2006-08-09  Karl Berry  <karl@gnu.org>
9500
9501         * config/srclist.txt: no more gettext-tools, per Bruno.
9502
9503 2006-08-08  Eric Blake  <ebb9@byu.net>
9504
9505         * modules/verror: New module.
9506         * MODULES.html.sh: Document it.
9507
9508 2006-08-08  Eric Blake  <ebb9@byu.net>
9509
9510         * lib/verror.h, lib/verror.c: New files.
9511
9512 2006-08-08  Eric Blake  <ebb9@byu.net>
9513
9514         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
9515         verror_at_line output complies with GNU Coding Standards even when
9516         file is NULL.
9517
9518 2006-08-07  Bruno Haible  <bruno@clisp.org>
9519
9520         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
9521         versions of AIX.
9522         Reported by Ralf Wildenhues.
9523
9524 2006-08-07  Bruno Haible  <bruno@clisp.org>
9525
9526         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
9527         in an AC_DEFUN. Needed so that the autoconf snippets can use
9528         AC_REQUIRE.
9529
9530 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9531
9532         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9533         Initialize pkgdata_DATA.
9534         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
9535         overriding it.
9536
9537 2006-08-06  Eric Blake  <ebb9@byu.net>
9538
9539         * lib/error.h: Fold in some upstream changes from glibc.
9540         * lib/error.c: Likewise.
9541
9542 2006-08-04  Bruno Haible  <bruno@clisp.org>
9543
9544         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9545         Make the mostlyclean-local rule depend on mostlyclean-generic.
9546         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
9547
9548 2006-07-31  Bruno Haible  <bruno@clisp.org>
9549
9550         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
9551         <stdlib.h>, <string.h>.
9552
9553 2006-07-30  Bruno Haible  <bruno@clisp.org>
9554
9555         * modules/readlink (License): Change to LGPL.
9556
9557 2006-07-30  Bruno Haible  <bruno@clisp.org>
9558
9559         * modules/javaversion (Makefile.am): Distribute javaversion.java and
9560         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
9561         set PKGDATADIR to point to it.
9562
9563 2006-07-30  Bruno Haible  <bruno@clisp.org>
9564
9565         * modules/csharpexec (configure.ac): Comment out macro invocation.
9566         * modules/javaexec (configure.ac): Likewise.
9567         * modules/javacomp-script (configure.ac): Likewise.
9568
9569         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
9570
9571 2006-07-30  Bruno Haible  <bruno@clisp.org>
9572
9573         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
9574         linked-list.
9575
9576 2006-07-30  Bruno Haible  <bruno@clisp.org>
9577
9578         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
9579
9580 2006-07-30  Bruno Haible  <bruno@clisp.org>
9581
9582         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9583         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
9584         get removed.
9585
9586 2006-07-29  Bruno Haible  <bruno@clisp.org>
9587
9588         Make it possible for gnulib-tool to work with locally modified or
9589         augmented gnulib repositories.
9590         * gnulib-tool (func_usage): Document --local-dir option.
9591         (local_gnulib_dir): New variable.
9592         Handle --local-dir option.
9593         (func_lookup_file): New function.
9594         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
9595         (func_get_description, func_get_filelist, func_get_description,
9596         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
9597         func_get_automake_snippet, func_get_include_directive,
9598         func_get_license, func_get_maintainer): Use func_lookup_file.
9599         (func_import, func_create_testdir): Use func_lookup_file.
9600
9601 2006-07-29  Bruno Haible  <bruno@clisp.org>
9602
9603         * modules/setenv (Depends-on): Add unistd.
9604
9605 2006-07-29  Bruno Haible  <bruno@clisp.org>
9606
9607         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
9608
9609 2006-07-29  Bruno Haible  <bruno@clisp.org>
9610
9611         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
9612
9613 2006-07-29  Bruno Haible  <bruno@clisp.org>
9614
9615         * gnulib-tool (import, update): If there is no Makefile.am, look at
9616         aclocal.m4, instead of bailing out.
9617
9618 2006-07-29  Bruno Haible  <bruno@clisp.org>
9619
9620         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
9621         Categorize the options by when they are useful.
9622
9623 2006-07-29  Bruno Haible  <bruno@clisp.org>
9624
9625         * gnulib-tool (func_usage): Document option --no-libtool.
9626         Handle option --no-libtool.
9627         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
9628         for changed semantics of $libtool variable.
9629         (func_import): Likewise. If libtool is not used, show this through
9630         an option --no-libtool.
9631         (func_create_testdir): Update.
9632
9633 2006-07-29  Bruno Haible  <bruno@clisp.org>
9634
9635         * gnulib-tool (func_import): Extend error message about missing
9636         --doc-base.
9637
9638 2006-07-29  Bruno Haible  <bruno@clisp.org>
9639
9640         * gnulib-tool (func_import): Don't create the $docbase directory if
9641         there is no file to store there.
9642
9643 2006-07-29  Bruno Haible  <bruno@clisp.org>
9644
9645         * gnulib-tool (autoconf_minversion): If a --dir option is given and
9646         relevant, look for configure.ac there, not in the current directory.
9647         Also use a simple search for AC_PREREQ, not "autoconf --trace".
9648
9649 2006-07-29  Bruno Haible  <bruno@clisp.org>
9650
9651         * gnulib-tool (SORT): New variable.
9652         (func_usage): Undocument --assume-autoconf option.
9653         Remove --assume-autoconf option handling.
9654         (autoconf_minversion): Determine from the contents of configure.ac.
9655         (func_import): Remove autoconf_minversion handling.
9656         Suggested by Eric Blake.
9657
9658 2006-07-29  Bruno Haible  <bruno@clisp.org>
9659
9660         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
9661
9662 2006-07-29  Bruno Haible  <bruno@clisp.org>
9663
9664         * config/srclist.txt (*setenv.[ch]): Remove rules.
9665
9666 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9667
9668         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
9669
9670 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9671
9672         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
9673         arpa/inet.h.
9674
9675 2006-07-28  Simon Josefsson  <jas@extundo.com>
9676
9677         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
9678         * modules/inet_pton (Depends-on): Likewise.
9679
9680 2006-07-28  Simon Josefsson  <jas@extundo.com>
9681
9682         * m4/netinet_in_h.m4: New file.
9683
9684 2006-07-28  Simon Josefsson  <jas@extundo.com>
9685
9686         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
9687         #include's.
9688
9689 2006-07-28  Simon Josefsson  <jas@extundo.com>
9690
9691         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
9692         #include's.
9693
9694 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
9695
9696         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
9697         setgid on directories only if they set these bits.
9698         * lib/modechange.h: Remove obsolete comment about masks.
9699
9700 2006-07-28  Eric Blake  <ebb9@byu.net>
9701
9702         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
9703         macro expansion.
9704
9705 2006-07-28  Bruno Haible  <bruno@clisp.org>
9706
9707         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
9708
9709 2006-07-28  Bruno Haible  <bruno@clisp.org>
9710
9711         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
9712
9713 2006-07-28  Bruno Haible  <bruno@clisp.org>
9714
9715         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
9716         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
9717         Define fallbacks.
9718         Avoids link error on FreeBSD 4.x.
9719         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9720
9721         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
9722         encoding.
9723         * lib/mbswidth.c (iswcntrl): Likewise.
9724
9725 2006-07-27  Bruno Haible  <bruno@clisp.org>
9726
9727         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
9728         test.
9729
9730 2006-07-27  Bruno Haible  <bruno@clisp.org>
9731
9732         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
9733         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
9734         defined.
9735
9736 2006-07-26  Eric Blake  <ebb9@byu.net>
9737
9738         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
9739
9740 2006-07-26  Eric Blake  <ebb9@byu.net>
9741
9742         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
9743         like mingw that lack mkstemp.
9744         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
9745         avoid compilation warning on mingw.
9746
9747 2006-07-26  Bruno Haible  <bruno@clisp.org>
9748
9749         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
9750         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
9751         INT_FAST*_MIN, INTPTR_MIN.
9752
9753 2006-07-25  Bruno Haible  <bruno@clisp.org>
9754
9755         * modules/version-etc (Depends-on): Add stdarg.
9756
9757 2006-07-25  Bruno Haible  <bruno@clisp.org>
9758
9759         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
9760         complex commands.
9761
9762 2006-07-25  Bruno Haible  <bruno@clisp.org>
9763
9764         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
9765         defined in <stdarg.h> or config.h.
9766
9767 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
9768
9769         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
9770         (gl_STDIO_SAFER): Remove.
9771
9772 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
9773
9774         * MODULES.html.sh (File stream based Input/Output):
9775         Add fopen-safer, tmpfile-safer; remove stdio-safer.
9776         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
9777         * modules/fopen-safer, modules/tmpfile-safer: New files.
9778         * modules/stdio-safer: Remove.
9779
9780 2006-07-24  Bruno Haible  <bruno@clisp.org>
9781
9782         * modules/tmpdir: New file.
9783         * MODULES.html.sh (File system functions): Add it.
9784
9785 2006-07-24  Bruno Haible  <bruno@clisp.org>
9786
9787         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
9788         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
9789
9790 2006-07-24  Bruno Haible  <bruno@clisp.org>
9791
9792         * modules/clean-temp: New file.
9793
9794 2006-07-24  Bruno Haible  <bruno@clisp.org>
9795
9796         * m4/tmpdir.m4: New file, from GNU gettext.
9797
9798 2006-07-24  Bruno Haible  <bruno@clisp.org>
9799
9800         * lib/tmpdir.h: New file, from GNU gettext.
9801         * lib/tmpdir.c: New file, from GNU gettext.
9802
9803 2006-07-24  Bruno Haible  <bruno@clisp.org>
9804
9805         * lib/clean-temp.h: New file, from GNU gettext.
9806         * lib/clean-temp.c: New file, from GNU gettext.
9807
9808 2006-07-23  Eric Blake  <ebb9@byu.net>
9809
9810         * modules/stdio-safer (Files): Add tmpfile-safer.c.
9811         (Depends-on): Add binary-io.
9812
9813 2006-07-23  Eric Blake  <ebb9@byu.net>
9814
9815         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
9816
9817 2006-07-23  Eric Blake  <ebb9@byu.net>
9818
9819         * lib/tmpfile-safer.c: New file.
9820         * lib/stdio-safer.h (fopen_safer): Add prototype.
9821         * lib/stdio--.h (tmpfile): Make safer.
9822
9823 2006-07-23  Bruno Haible  <bruno@clisp.org>
9824
9825         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
9826         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
9827         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
9828         gl_linked_remove_at): Use it.
9829
9830 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9831         and Simon Josefsson <jas@extundo.com>
9832
9833         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
9834
9835         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
9836
9837 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9838
9839         * modules/close-stream: New file.
9840         * modules/closeout (Description): Make it clear that it exits
9841         with a diagnostic on error.
9842         (Depends-on): Add close-stream.  Remove fpending, stdbool.
9843         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
9844
9845 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9846
9847         * m4/close-stream.m4: New file.
9848
9849 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
9850
9851         * lib/close-stream.c, lib/close-stream.h: New files.
9852
9853 2006-07-22  Bruno Haible  <bruno@clisp.org>
9854
9855         Merge from GNU gettext 0.15.
9856
9857         2006-05-01  Bruno Haible  <bruno@clisp.org>
9858
9859                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
9860
9861         2006-07-22  Bruno Haible  <bruno@clisp.org>
9862
9863                 * modules/javaversion: New file.
9864                 * MODULES.html.sh (Java): Add javaversion.
9865
9866         2006-03-12  Bruno Haible  <bruno@clisp.org>
9867
9868                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
9869
9870         2005-12-04  Bruno Haible  <bruno@clisp.org>
9871
9872                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
9873                 (untested).
9874
9875         2006-06-21  Bruno Haible  <bruno@clisp.org>
9876
9877                 Avoid warnings from recent versions of mcs.
9878                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
9879                 -o, -L, -r any more. Use options documented since mcs-1.0
9880                 instead. Similarly for -g.
9881
9882         2005-12-04  Bruno Haible  <bruno@clisp.org>
9883
9884                 * build-aux/csharpcomp.sh.in: Suffix for resources is
9885                 .resources, not .resource.
9886
9887         2005-07-09  Bruno Haible  <bruno@clisp.org>
9888
9889                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
9890                 add a .dll suffix.
9891                 Reported by Mark Junker <mjscod@gmx.de>.
9892
9893         2006-07-22  Bruno Haible  <bruno@clisp.org>
9894
9895                 * modules/gettext: Upgrade to gettext-0.15.
9896                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
9897                 m4/visibility.m4.
9898                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
9899
9900 2006-07-22  Bruno Haible  <bruno@clisp.org>
9901
9902         Merge from GNU gettext 0.15.
9903
9904         2006-03-25  Bruno Haible  <bruno@clisp.org>
9905
9906                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
9907
9908         2006-07-21  Bruno Haible  <bruno@clisp.org>
9909
9910                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
9911                 "1.1".
9912
9913         2006-05-09  Bruno Haible  <bruno@clisp.org>
9914
9915                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
9916                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
9917                 for the conftestver execution.
9918
9919         2006-05-01  Bruno Haible  <bruno@clisp.org>
9920
9921                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
9922                 optional target-version argument. Verify that the compiler
9923                 groks source of the specified source-version, or add -source
9924                 option as necessary. Verify that the compiler produces
9925                 bytecode in the specified target-version, or add -target and
9926                 -source options as necessary. Make the result of the test
9927                 available as variable CONF_JAVAC. Also log error output in
9928                 config.log.
9929
9930         2006-03-11  Bruno Haible  <bruno@clisp.org>
9931
9932                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
9933
9934         2006-05-09  Bruno Haible  <bruno@clisp.org>
9935
9936                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
9937                 CLASSPATH_SEPARATOR to a semicolon.
9938
9939         2006-03-12  Bruno Haible  <bruno@clisp.org>
9940
9941                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
9942                 available as variable CONF_JAVA, for subsequent autoconf
9943                 tests. Also log error output in config.log.
9944
9945         2006-07-19  Bruno Haible  <bruno@clisp.org>
9946
9947                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
9948                 that getline works on glibc2 systems. Needed to avoid trouble
9949                 in relocatable.c.
9950                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
9951
9952         2005-12-04  Bruno Haible  <bruno@clisp.org>
9953
9954                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
9955                 launcher (untested).
9956
9957         2005-12-04  Bruno Haible  <bruno@clisp.org>
9958
9959                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
9960
9961         2006-07-22  Bruno Haible  <bruno@clisp.org>
9962
9963                 * gettext.m4: Update from GNU gettext-0.15.
9964                 * nls.m4: Likewise.
9965                 * po.m4: Likewise.
9966                 * inttypes-pri.m4: Likewise.
9967                 * inttypes-h.m4: Renamed from inttypes.m4.
9968                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
9969
9970 2006-07-22  Bruno Haible  <bruno@clisp.org>
9971
9972         Merge from GNU gettext 0.15.
9973
9974         2005-07-05  Bruno Haible  <bruno@clisp.org>
9975
9976                 * printf-args.c (printf_fetchargs): Work around broken
9977                 definition of wint_t on mingw.
9978
9979         2005-02-12  Bruno Haible  <bruno@clisp.org>
9980
9981                 * xallocsa.h: Add extern "C" for C++.
9982
9983         2006-05-17  Bruno Haible  <bruno@clisp.org>
9984
9985                 Cygwin portability.
9986                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
9987
9988         2006-04-30  Bruno Haible  <bruno@clisp.org>
9989
9990                 * progreloc.c: Include <mach-o/dyld.h> if available.
9991                 (find_executable): Use _NSGetExecutablePath when possible.
9992
9993         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9994
9995                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
9996                 function.
9997
9998         2005-12-29  Bruno Haible  <bruno@clisp.org>
9999
10000                 * progreloc.c (set_program_name_and_installdir): Fix
10001                 compilation error.
10002
10003         2005-12-04  Bruno Haible  <bruno@clisp.org>
10004
10005                 Cygwin portability.
10006                 * progreloc.c: Include <windows.h> also on Cygwin.
10007                 (find_executable): Add support for Cygwin.
10008                 (set_program_name_and_installdir): Handle also platforms with
10009                 nonempty EXEEXT.
10010
10011         2006-07-11  Bruno Haible  <bruno@clisp.org>
10012
10013                 * javacomp.c: Fix a comment.
10014                 Reported by Jim Meyering.
10015
10016         2006-04-30  Bruno Haible  <bruno@clisp.org>
10017
10018                 * javacomp.h (compile_java_class): Add source_version,
10019                 target_version arguments.
10020                 * javacomp.c: Rewritten to choose only a compiler that
10021                 respects the specified source_version and target_version.
10022
10023         2006-06-27  Bruno Haible  <bruno@clisp.org>
10024
10025                 Assume correct S_ISDIR macro.
10026                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
10027
10028         2006-07-22  Bruno Haible  <bruno@clisp.org>
10029
10030                 * javaversion.h: New file, from GNU gettext.
10031                 * javaversion.c: New file, from GNU gettext.
10032                 * javaversion.java: New file, from GNU gettext.
10033                 * javaversion.class: New file, from GNU gettext.
10034
10035         2006-05-17  Bruno Haible  <bruno@clisp.org>
10036
10037                 Cygwin portability.
10038                 * javaexec.c (execute_java_class): Test for jview program
10039                 also on Cygwin.
10040
10041         2006-04-09  Bruno Haible  <bruno@clisp.org>
10042
10043                 * fatal-signal.c: Don't include string.h.
10044                 (at_fatal_signal): Use a copying loop instead of memcpy.
10045
10046         2005-12-04  Bruno Haible  <bruno@clisp.org>
10047
10048                 * csharpexec.c: Add support for 'clix' launcher (untested).
10049                 (execute_csharp_using_sscli): New function.
10050                 (execute_csharp_program): Call it.
10051
10052         2006-06-21  Bruno Haible  <bruno@clisp.org>
10053
10054                 Avoid warnings from recent versions of mcs.
10055                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
10056                 -o, -L, -r any more. Use options documented since mcs-1.0
10057                 instead. Similarly for -g.
10058
10059         2005-07-09  Bruno Haible  <bruno@clisp.org>
10060
10061                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
10062                 add a .dll suffix.
10063                 Reported by Mark Junker <mjscod@gmx.de>.
10064
10065         2006-06-17  Bruno Haible  <bruno@clisp.org>
10066
10067                 * config.charset: Update for NetBSD 3.0.
10068
10069         2006-05-17  Bruno Haible  <bruno@clisp.org>
10070
10071                 Cygwin portability.
10072                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
10073
10074         2006-05-16  Bruno Haible  <bruno@clisp.org>
10075
10076                 * localcharset.c [CYGWIN]: Include <windows.h>.
10077                 (get_charset_aliases): For Cygwin, return the same CPxxx
10078                 aliases list as under WIN32.
10079                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
10080                 the environment variables. Fall back to GetACP().
10081
10082         2006-04-05  Bruno Haible  <bruno@clisp.org>
10083
10084                 * config.charset: Update Juan Manuel Guerrero's address.
10085
10086         2005-02-12  Bruno Haible  <bruno@clisp.org>
10087
10088                 * allocsa.h: Add extern "C" for C++.
10089
10090         2005-02-10  Bruno Haible  <bruno@clisp.org>
10091
10092                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
10093                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
10094
10095         2006-07-22  Bruno Haible  <bruno@clisp.org>
10096
10097                 * gettext.h: Update to GNU gettext-0.15.
10098
10099 2006-07-22  Bruno Haible  <bruno@clisp.org>
10100
10101         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
10102         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
10103         lib-prefix.m4, longdouble.m4, ssize_t.m4.
10104
10105 2006-07-21  Eric Blake  <ebb9@byu.net>
10106
10107         * modules/stdlib-safer: New file.
10108         * MODULES.html.sh (File stream based Input/Output): Add
10109         stdlib-safer.
10110
10111 2006-07-21  Eric Blake  <ebb9@byu.net>
10112
10113         * lib/stdlib-safer.h: New file from coreutils, required by
10114         stdlib--.h.
10115
10116 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
10117
10118         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
10119
10120 2006-07-20  Bruno Haible  <bruno@clisp.org>
10121
10122         * gnulib-tool: Recognize new option --assume-autoconf.
10123         (autoconf_minversion): New variable.
10124         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
10125
10126 2006-07-20  Bruno Haible  <bruno@clisp.org>
10127
10128         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
10129
10130 2006-07-19  Derek R. Price  <derek@ximbiot.com>
10131
10132         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
10133         Reindent and repaginate.
10134
10135 2006-07-19  Derek Price  <derek@ximbiot.com>
10136
10137         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
10138         Correct grammar.
10139
10140 2006-07-17  Bruno Haible  <bruno@clisp.org>
10141
10142         * modules/list: New file.
10143         * modules/array-list: New file.
10144         * modules/carray-list, modules/carray-list-tests: New files.
10145         * modules/linked-list, modules/linked-list-tests: New files.
10146         * modules/avltree-list, modules/avltree-list-tests: New files.
10147         * modules/rbtree-list, modules/rbtree-list-tests: New files.
10148         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
10149         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
10150         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
10151         * modules/oset: New file.
10152         * modules/array-oset: New file.
10153         * modules/avltree-oset, modules/avltree-oset-tests: New files.
10154         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
10155         * tests/test-carray_list.c: New file.
10156         * tests/test-linked_list.c: New file.
10157         * tests/test-avltree_list.c: New file.
10158         * tests/test-rbtree_list.c: New file.
10159         * tests/test-linkedhash_list.c: New file.
10160         * tests/test-avltreehash_list.c: New file.
10161         * tests/test-rbtreehash_list.c: New file.
10162         * tests/test-avltree_oset.c: New file.
10163         * tests/test-rbtree_oset.c: New file.
10164         * MODULES.html.sh (Container data structures): New section.
10165
10166 2006-07-17  Bruno Haible  <bruno@clisp.org>
10167
10168         * m4/gl_list.m4: New file.
10169
10170 2006-07-17  Bruno Haible  <bruno@clisp.org>
10171
10172         * lib/gl_list.h: New file.
10173         * lib/gl_list.c: New file.
10174         * lib/gl_array_list.h: New file.
10175         * lib/gl_array_list.c: New file.
10176         * lib/gl_carray_list.h: New file.
10177         * lib/gl_carray_list.c: New file.
10178         * lib/gl_linked_list.h: New file.
10179         * lib/gl_linked_list.c: New file.
10180         * lib/gl_anylinked_list1.h: New file.
10181         * lib/gl_anylinked_list2.h: New file.
10182         * lib/gl_avltree_list.h: New file.
10183         * lib/gl_avltree_list.c: New file.
10184         * lib/gl_anyavltree_list1.h: New file.
10185         * lib/gl_anyavltree_list2.h: New file.
10186         * lib/gl_rbtree_list.h: New file.
10187         * lib/gl_rbtree_list.c: New file.
10188         * lib/gl_anyrbtree_list1.h: New file.
10189         * lib/gl_anyrbtree_list2.h: New file.
10190         * lib/gl_anytree_list1.h: New file.
10191         * lib/gl_anytree_list2.h: New file.
10192         * lib/gl_linkedhash_list.h: New file.
10193         * lib/gl_linkedhash_list.c: New file.
10194         * lib/gl_anyhash_list1.h: New file.
10195         * lib/gl_anyhash_list2.h: New file.
10196         * lib/gl_avltreehash_list.h: New file.
10197         * lib/gl_avltreehash_list.c: New file.
10198         * lib/gl_rbtreehash_list.h: New file.
10199         * lib/gl_rbtreehash_list.c: New file.
10200         * lib/gl_anytreehash_list1.h: New file.
10201         * lib/gl_anytreehash_list2.h: New file.
10202
10203         * lib/gl_oset.h: New file.
10204         * lib/gl_oset.c: New file.
10205         * lib/gl_array_oset.h: New file.
10206         * lib/gl_array_oset.c: New file.
10207         * lib/gl_avltree_oset.h: New file.
10208         * lib/gl_avltree_oset.c: New file.
10209         * lib/gl_rbtree_oset.h: New file.
10210         * lib/gl_rbtree_oset.c: New file.
10211         * lib/gl_anytree_oset.h: New file.
10212
10213 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10214
10215         * m4/mkancesdirs.m4: New file.
10216         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
10217         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
10218         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
10219         it.
10220
10221 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10222
10223         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
10224         * lib/mkancesdirs.h: New files.
10225         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
10226         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
10227         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
10228         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
10229         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
10230         callers changed.  Revamp internals significantly, by not
10231         attempting to create directories that are temporarily more
10232         permissive than the final results.  Do not attempt to use
10233         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
10234         This removes some race conditions, fixes some bugs, and simplifies
10235         things.  Use new dirchownmod function to do owner and mode changes.
10236         * lib/mkdir-p.h: Likewise.
10237         * lib/modechange.c (octal_to_mode): New function.
10238         (struct mode_change): New member mentioned.
10239         (make_node_op_equals): New arg mentioned.  All callers changed.
10240         (mode_compile): Keep track of which mode bits the user has explicitly
10241         mentioned.
10242         (mode_adjust): New arg DIR, so that we implement the X op correctly.
10243         New arg PMODE_BITS, to keep track of which mode bits the user
10244         mentioned; it treats S_ISUID and S_ISGID speciall.
10245         All callers changed.
10246         * lib/modechange.h: Likewise.
10247
10248 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
10249
10250         * MODULES.html.sh: Add mkancestors.
10251         * modules/mkancesdirs: New module.
10252         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
10253         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
10254         The chdir-safer and afs files are now orphans; I'll remove them
10255         unless someone speaks up.
10256         Add lib/dirchownmod.c, lib/dirchownmod.h.
10257         (Depends-on): Remove alloca, chown, save-cwd, dirname.
10258         Add lchown, mkancesdirs.
10259         (Maintainer): Add self.
10260
10261 2006-07-15  Karl Berry  <karl@gnu.org>
10262
10263         * gnulib-tool: help message wording/arrangement.
10264
10265 2006-07-14  Simon Josefsson  <jas@extundo.com>
10266
10267         * doc/gnulib.texi (Libtool and Windows): New section.
10268
10269 2006-07-12  Simon Josefsson  <jas@extundo.com>
10270
10271         * modules/gendocs (License): Fix license, approved by Karl.
10272
10273 2006-07-12  Eric Blake  <ebb9@byu.net>
10274
10275         * MODULES.html.sh: Add gendocs.
10276
10277 2006-07-11  Eric Blake  <ebb9@byu.net>
10278
10279         * modules/fdl: New module, to install doc/fdl.texi.
10280         * MODULES.html.sh: Add new section for documentation modules.
10281         * gnulib-tool: Avoid space-tab.
10282         (--doc-base): New option, to manage files from doc.
10283
10284 2006-07-11  Eric Blake  <ebb9@byu.net>
10285
10286         * m4/absolute-header.m4: Fix comments to match recent change.
10287
10288 2006-07-11  Eric Blake  <ebb9@byu.net>
10289
10290         * gnulib-tool: List --doc-base before --tests-base.
10291
10292 2006-07-11  Derek R. Price  <derek@ximbiot.com>
10293
10294         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
10295
10296 2006-07-11  Bruno Haible  <bruno@clisp.org>
10297
10298         * README: Mention where to put documentation.
10299
10300 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10301
10302         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
10303
10304 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
10305
10306         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
10307         to stdint.m4.
10308
10309 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
10310
10311         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
10312         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
10313         "no/such/file/stdint.h" when there is no such file, so that
10314         the resulting C code can be parsed by dodgy compilers.
10315         Problems reported by Bob Proulx.
10316
10317 2006-07-10  Derek R. Price  <derek@ximbiot.com>
10318
10319         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
10320         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
10321         macros into the GNU _D_EXACT_NAMLEN.
10322         * lib/savedir.c:  Likewise.
10323         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
10324
10325 2006-07-10  Derek R. Price  <derek@ximbiot.com>
10326         and Paul Eggert  <eggert@cs.ucla.edu>
10327
10328         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
10329         * m4/savedir.m4:
10330         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
10331         macros into the GNU _D_EXACT_NAMLEN.
10332
10333 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10334
10335         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
10336         around the absolute name, to work around a problem with the HP-UX
10337         11.23 native C compiler, reported by Bob Proulx.
10338
10339 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10340
10341         * doc/maintain.texi, make-stds.texi: Sync from
10342         <http://savannah.gnu.org/projects/gnustandards>.
10343
10344 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
10345
10346         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
10347
10348 2006-07-09  Jim Meyering  <jim@meyering.net>
10349
10350         * m4/glob.m4: Remove a doubled word in a comment.
10351
10352 2006-07-09  Jim Meyering  <jim@meyering.net>
10353
10354         * lib/argp-pv.c: Remove a doubled word in a comment.
10355         * lib/check-version.c (check_version): Likewise.
10356         * lib/javacomp.c (compile_java_class): Likewise.
10357
10358 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
10359
10360         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
10361         for the benefit of people using Autoconf 2.60.  If you want to
10362         support older Autoconf versions you can copy m4/onceonly_2_57.m4
10363         (or m4/onceonly.m4, if pre-2.57) manually.
10364
10365 2006-07-08  Jim Meyering  <jim@meyering.net>
10366
10367         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
10368         comment.
10369         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
10370         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
10371         comment.
10372
10373 2006-07-08  Jim Meyering  <jim@meyering.net>
10374
10375         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
10376
10377 2006-07-07  Simon Josefsson  <jas@extundo.com>
10378
10379         * tests/test-crc.c: Change expected crc value, the test vector
10380         were probably computed using the old broken crc.c?
10381
10382 2006-07-06  Simon Josefsson  <jas@extundo.com>
10383
10384         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
10385         now the canonical place for the M4 file).
10386
10387         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
10388         from the sys_socket dependency now.
10389
10390         * modules/inet_pton (Files): Ditto.
10391
10392         * modules/inet_ntop (Files): Ditto.
10393
10394 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10395
10396         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
10397         not gl_PREREQ_GETUSERSHELL.
10398
10399 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10400
10401         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
10402         with only one argument, for Autoconf 2.60.
10403         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
10404         expand to nothing, so add a shell command to avoid syntax error.
10405         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
10406
10407 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10408
10409         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
10410
10411 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10412
10413         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
10414         no longer needed.  Check for isblank decl.
10415         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
10416         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
10417         of existence.
10418
10419 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10420
10421         * lib/getloadavg.c: Use __VMS, not VMS.
10422         * lib/getopt.c: Likewise.
10423         * lib/getpagesize.h: Likewise.
10424         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
10425         and probably does not work.
10426
10427 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10428
10429         * lib/.cppi-disable: Add wcwidth.
10430         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
10431         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
10432         (ISGRAPH): Remove.  All uses changed to isgraph.
10433         (FOLD) [!defined _LIBC]: Remove special case.
10434         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
10435         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
10436         HAVE_ISBLANK.
10437         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
10438         case.
10439
10440 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
10441
10442         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
10443         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
10444         brackets.  Other minor changes to suppress some compiler
10445         warnings.
10446
10447 2006-07-06  Derek R. Price  <derek@ximbiot.com>
10448         and Paul Eggert  <eggert@cs.ucla.edu>
10449
10450         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
10451         of invoking obsolescent AC_HEADER_DIRENT macro.
10452         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
10453         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
10454         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
10455         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
10456         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
10457         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
10458         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
10459         * m4/readdir.m4: Remove; no longer needed.
10460
10461 2006-07-06  Derek R. Price  <derek@ximbiot.com>
10462         and Paul Eggert  <eggert@cs.ucla.edu>
10463
10464         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
10465         Don't worry about this obsolete case any more.
10466         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
10467         directories.
10468         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
10469         worry about this obsolete case any more.
10470         * lib/fts.c: Likewise.
10471         * lib/getcwd.c: Likewise.
10472         * lib/glob.h: Likewise.
10473         * lib/savedir.c: Likewise.
10474
10475 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10476
10477         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
10478         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
10479         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
10480         needed.
10481         All uses removed.
10482         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10483         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
10484         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
10485         needed.
10486         * m4/getdate.m4 (gl_GETDATE): Likewise.
10487         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
10488         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
10489         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
10490         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10491         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
10492         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
10493         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
10494         needed.
10495
10496 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10497
10498         * lib/memcasecmp.c: Include <limits.h>.
10499         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
10500         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
10501         Don't assume isdigit succeeds only on '0' through '9'.
10502
10503 2006-07-05  Eric Blake  <ebb9@byu.net>
10504
10505         * modules/getaddrinfo (Depends-on): Add snprintf.
10506
10507 2006-07-05  Eric Blake  <ebb9@byu.net>
10508
10509         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
10510         to avoid 'header present but could not be compiled' on cygwin.
10511
10512 2006-07-05  Eric Blake  <ebb9@byu.net>
10513
10514         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
10515         missing from netdb.h.
10516         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
10517
10518 2006-07-05  Derek R. Price  <derek@ximbiot.com>
10519
10520         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
10521         no longer needed.
10522         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
10523         * m4/getdate.m4 (gl_GETDATE): Likewise.
10524         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
10525         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
10526         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
10527         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
10528         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
10529
10530 2006-07-05  Derek R. Price  <derek@ximbiot.com>
10531
10532         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
10533         All uses of is_space replaced by isspace.
10534         * lib/exit.h: Don't talk about STDC_HEADERS.
10535         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
10536         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
10537         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
10538         replaced by isprint etc.
10539         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
10540         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10541         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
10542         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
10543         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
10544         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
10545
10546 2006-07-05  Bruno Haible  <bruno@clisp.org>
10547
10548         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
10549         the function exists, before testing against AIX.
10550         Reported by Martin Lambers <marlam@marlam.de>.
10551
10552 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10553
10554         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
10555         From Mark D. Baushke.
10556
10557 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
10558
10559         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
10560         to the absolute name, not just one, to bypass Sun C 5.8's
10561         "warning: #include of /usr/include/... may be non-portable".
10562
10563 2006-07-04  Eric Blake  <ebb9@byu.net>
10564
10565         * modules/dirname-tests: New test module.
10566         * tests/test-dirname.c: New file, replacing dirname.c
10567         TEST_DIRNAME section that was recently deleted.
10568
10569 2006-07-04  Bruno Haible  <bruno@clisp.org>
10570
10571         Assume ANSI C header files and <ctype.h> functions.
10572         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
10573         (mbsnwidth): Use isprint, iscntrl instead.
10574
10575 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10576
10577         Merge from coreutils.
10578         * MODULES.html.sh: Add xstrtold.
10579         * modules/xstrtold: New file.
10580         * modules/cycle-check (Files): Add lib/same-inode.h.
10581         * modules/dirname (Files): Add m4/double-slash-root.m4.
10582         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
10583         * modules/mkdir-p (Files): Add lib/same-inode.h.
10584         * modules/same (Files): Add lib/same-inode.h.
10585
10586 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10587
10588         * m4/absolute-header.m4: Renamed from full-header-path.m4.
10589         This is to keep the terminology clean; POSIX talks about
10590         "absolute pathnames", not "full pathnames", but the GNU
10591         Coding Standards say to use "path" for something else;
10592         so use "absolute" to keep both sides happy.
10593         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
10594         Set gl_absolute_header, not gl_full_header_path.
10595         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
10596         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
10597         All uses changed.
10598
10599         Merge from coreutils.
10600
10601         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
10602
10603         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
10604         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
10605         want to require the building of c-strtod.o.
10606         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
10607         needs -lm directly.
10608         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
10609
10610         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10611
10612         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
10613         --as-needed option if available.  Problem reported by Albert Chin in
10614         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
10615         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
10616         cc merely issues a bunch of annoying warnings for --as-needed
10617         (this problem was reported by Bob Proulx).  Also, try linking with
10618         -lm to detect a bug in binutils 2.16 (this problem was reported
10619         by Ralf Wildenhues).
10620
10621         2006-06-18  Jim Meyering  <jim@meyering.net>
10622
10623         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
10624         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
10625         macro.
10626         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
10627         also check for glibc-2.4's abort-inducing bug.
10628
10629         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
10630         Low-probability clean-up should be to use rmdir to get rid of
10631         the just-created directory, not unlink.
10632
10633         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
10634         configure fail, and request a bug report to inform us about it.
10635         Add a comment that, barring reports to the contrary, in 2007 we'll
10636         assume ftruncate is universally available.
10637
10638         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10639
10640         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
10641
10642         2006-03-12  Jim Meyering  <jim@meyering.net>
10643
10644         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
10645         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
10646         * m4/same.m4 (gl_SAME): Likewise.
10647         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
10648
10649         2006-03-11  Eric Blake  <ebb9@byu.net>
10650
10651         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
10652         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
10653         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
10654         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
10655
10656 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10657
10658         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
10659         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
10660         reported by Mark D. Baushke, one in
10661         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
10662
10663         Merge from coreutils.
10664
10665         * lib/.cppi-disable: Add stdint_.h.
10666         * lib/.cvsignore: Add stdint.h.
10667
10668         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
10669
10670         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
10671         both double and long double versions.
10672         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
10673         * lib/xstrtold.c: New file.
10674         * lib/xstrtod.h (xstrtold): New decl.
10675
10676         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
10677
10678         * lib/filemode.c (setst): Remove.
10679         (strmode): Rewrite to avoid setst.  This makes the code shorter,
10680         (arguably) clearer, and the generated code is a bit smaller on my
10681         Debian GNU/Linux stable x86 host.
10682
10683         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
10684
10685         * lib/filemode.c: Include "filemode.h" first, to test the interface.
10686         Assume that filemode.h includes sys/types.h and sys/stat.h.
10687         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
10688         (ftypelet): Reorder to put common cases first, for efficiency.
10689         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
10690         to do 'M'.
10691         (strmode): Renamed from mode_string, and now stores 12 bytes instead
10692         of 10, for compatibility with FreeBSD.  All callers changed.
10693         (filemodestring): Now stores 12 bytes instead of 10, and sets file
10694         types that can't be deduced solely from st_mode.  First arg is now a
10695         const pointer.
10696         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
10697         (strmode): Renamed from mode_string.
10698         (filemodestring): New decl.
10699         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
10700         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
10701         needed.
10702         (S_ISPORT, S_ISWHT): New macros, if not already defined.
10703
10704         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
10705
10706         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
10707         fsusage.h now does that.  Include fsusage.h first, to test interface.
10708         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
10709         at most one method (the old code could have generated decls that
10710         didn't conform to C89, not that this was ever exercised).
10711         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
10712
10713         2006-03-19  Jim Meyering  <jim@meyering.net>
10714
10715         Work even in a chroot where d_ino values for entries in "/"
10716         don't match the stat.st_ino values for the same names.
10717         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
10718         number, iterate through all entries again, using lstat instead.
10719         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
10720         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
10721
10722         * lib/getcwd.c (__getcwd): Clarify a comment.
10723         Use memcpy in place of a call to strcpy.
10724
10725         2006-03-12  Jim Meyering  <jim@meyering.net>
10726
10727         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
10728         matches that of the current directory (which we're about to chdir ".."
10729         out of), then save the dev-ino of the parent, instead.
10730
10731         * lib/same-inode.h (SAME_INODE): New file/macro.
10732         * lib/chdir-safer.c (SAME_INODE): Remove definition.
10733         Include "same-inode.h", instead.
10734         * lib/same.c: Likewise.
10735         * lib/cycle-check.h: Include "same-inode.h".
10736         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
10737         * lib/cycle-check.c (SAME_INODE): Remove definition.
10738         * lib/root-dev-ino.h: Include "same-inode.h".
10739
10740         2006-03-11  Eric Blake  <ebb9@byu.net>
10741
10742         * lib/same.c (same_name): s/base_name/last_component/
10743         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
10744         * lib/filenamecat.c (file_name_concat): Likewise.
10745
10746         2006-03-11  Eric Blake  <ebb9@byu.net>,
10747                     Paul Eggert  <eggert@cs.ucla.edu>
10748
10749         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
10750         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
10751         drive prefix.
10752         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
10753         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
10754         (last_component): New method.
10755         * lib/dirname.c (dir_len): Determine when drive letters need a
10756         subsequent slash.  Preserve // when it is special.
10757         (dir_name): Don't append dot when drive letter is absolute.
10758         [TEST_DIRNAME]: Move into a full-blown gnulib test.
10759         * lib/basename.c (base_name): New semantics - malloc the result.
10760         Preserve // when it is special.  Preserve relative files that look
10761         like drive letters.
10762         (base_len): Preserve // when it is special.
10763         (last_component): New method, similar to old base_name semantics.
10764         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
10765         base_name.  Strip redundant slashes from ///.
10766
10767 2006-07-03  Jim Meyering  <jim@meyering.net>
10768
10769         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
10770         macro is used before the first cycle_check call.
10771
10772 2006-07-03  Eric Blake  <ebb9@byu.net>
10773
10774         * modules/dirname (Depends-on): Add xstrndup.
10775
10776 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
10777
10778         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
10779         test cases, so that config.log is a bit easier to follow.
10780
10781 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
10782
10783         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
10784         both are 64 bits, since this seems to be the tradition, and this
10785         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
10786         we ever run into a host that prefers long long to long in this
10787         case, we'll need another configure-time test.  Problem reported by
10788         Jim Meyering.
10789
10790 2006-07-02  Eric Blake  <ebb9@byu.net>
10791
10792         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
10793
10794 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10795
10796         * modules/inttypes (Depends-on): No longer depends on stdint.
10797         * modules/stdint (Description): Say more about assumptions.
10798         Say that the fast types might differ.  Say macros are used.
10799         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
10800         (Makefile.am): Revise list of substituted symbols to match
10801         new stdint.m4.
10802         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
10803         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
10804         * tests/test-stdint.c (verify_same_types)
10805         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
10806         the code conforms to C99/C89.
10807         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
10808         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
10809
10810 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10811
10812         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
10813         but fix a bug, by requiring at least 64 bits.
10814         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
10815         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
10816         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
10817         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
10818
10819         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
10820         changes.  Make 2.59 a prerequisite.  Check and substitute for
10821         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
10822         inttypes.h.  Do not use special include files; just use the
10823         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
10824         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
10825         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
10826         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
10827         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
10828         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
10829         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
10830         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
10831         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
10832         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
10833         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
10834         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
10835         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
10836         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
10837         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
10838         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
10839         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
10840         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
10841         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
10842         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
10843         WINT_MAX.  Check for C99 conformance more strictly, by detecting
10844         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
10845         not check for things that C99 does not require, e.g., int8_t.  If
10846         a test isn't needed unless <stdint.h> isn't working, and is
10847         unlikely to be needed for any other reason, then don't do it
10848         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
10849         size_t, since we assume C89 freestanding at least.  Do not check
10850         for sig_atomic_t, wchar_t, or wint_t, since the code now does
10851         the right thing even if the types are not defined.  Instead use:
10852         (gl_STDINT_TYPE_PROPERTIES): New macro.
10853         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
10854         testing whether <sys/types.h> clashes, as Autoconf does this for
10855         us now.  All uses removed.
10856         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
10857         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
10858         (gl_CHECK_TYPE_SAME):
10859         Remove; no longer needed.
10860         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
10861         exists, since we'll return 0 anyway in that case.
10862         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
10863
10864 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10865
10866         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
10867         possible collision with system files.
10868         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
10869         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
10870         WCHAR_MIN and WCHAR_MAX in this case.
10871         (<stddef.h>): Do not include; no longer needed.
10872         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
10873         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
10874         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
10875         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
10876         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
10877         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
10878         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
10879         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
10880         !defined(__c99))]: Include in this case too, since it's harmless
10881         now.
10882         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
10883         dangerous to do so.
10884         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
10885         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
10886         (_STDINT_MIN, _STDINT_MAX): New macros.
10887         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
10888         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
10889         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
10890         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
10891         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
10892         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
10893         macros, not typedefs; this simplifies things quite a bit.
10894         Use long int for all types narrower than int64_t.
10895         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
10896         Define in terms of long long int or int64_t or long int,
10897         not int64_t or int32_t.  This saves some compile-time testing.
10898         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
10899         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
10900         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
10901         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
10902         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
10903         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
10904         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
10905         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
10906         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
10907         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
10908         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
10909         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
10910         undef any previous version and define our own version, for
10911         simplicity and consistency with the new macros for types.
10912         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
10913         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
10914         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
10915         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
10916         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
10917         @WINT_T_SUFFIX@ to keep things simple here.
10918         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
10919         Simplify by assuming typical 8/16/32/64 host, since we're
10920         already doing that elsewhere anyway.
10921         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
10922         and assume long long int is 64 bits if available.  This
10923         speeds up 'configure'.
10924
10925 2006-07-01  Eric Blake  <ebb9@byu.net>
10926
10927         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
10928         Reported by Andreas Buening.
10929
10930 2006-07-01  Eric Blake  <ebb9@byu.net>
10931
10932         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
10933
10934 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
10935
10936         * lib/getaddrinfo.c: fixed typo
10937
10938 2006-06-29  Jim Meyering  <jim@meyering.net>
10939
10940         * modules/strftime (Maintainer): Add my name, since with the
10941         FPRINTFTIME changes strftime.c has forked from glibc.
10942
10943 2006-06-29  Eric Blake  <ebb9@byu.net>
10944
10945         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
10946
10947 2006-06-29  Eric Blake  <ebb9@byu.net>
10948
10949         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
10950
10951 2006-06-29  Eric Blake  <ebb9@byu.net>
10952
10953         * lib/stat_.h: New file.
10954
10955 2006-06-29  Eric Blake  <ebb9@byu.net>
10956
10957         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
10958         unused static function.
10959
10960 2006-06-29  Eric Blake  <ebb9@byu.net>
10961
10962         * doc/functions.texi (Function Portability): Document missing lstat
10963         on mingw.
10964
10965 2006-06-29  Eric Blake  <ebb9@byu.net>
10966
10967         * MODULES.html.sh: Add sys_stat.
10968         * modules/sys_stat: New module.
10969         * modules/mkstemp (Depends-on): Add sys_stat.
10970
10971 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10972
10973         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
10974
10975 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10976
10977         * m4/c-bs-a.m4: Removed.
10978
10979 2006-06-29  Derek R. Price  <derek@ximbiot.com>
10980
10981         * lib/strftime.c: Assume strftime() exists.
10982
10983 2006-06-29  Derek Price  <derek@ximbiot.com>
10984
10985         * modules/c-bs-a: Removed - \a is C89.
10986         * MODULES.html.sh: Remove c-bs-a.
10987
10988 2006-06-29  Bruno Haible  <bruno@clisp.org>
10989
10990         * modules/wcwidth (License): Change to LGPL.
10991
10992 2006-06-28  Simon Josefsson  <jas@extundo.com>
10993
10994         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
10995         on _WIN32.
10996
10997         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
10998         getnameinfo.
10999
11000 2006-06-28  Simon Josefsson  <jas@extundo.com>
11001
11002         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
11003
11004 2006-06-28  Simon Josefsson  <jas@extundo.com>
11005
11006         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
11007         functions there.  It will succeed on Windows XP, but on Windows
11008         2000 and (presumably) earlier, it will fail, and use the internal
11009         re-implementation.
11010         (use_win32_p): New function.
11011         (getaddrinfo): Use strtoul on servname, to support numeric ports.
11012         Support AI_NUMERICSERV to disable getservbyname.
11013         (getnameinfo): New function, only supports
11014         NI_NUMERICHOST|NI_NUMERICSERV for now.
11015
11016         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
11017         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
11018         getnameinfo.
11019
11020 2006-06-28  Eric Blake  <ebb9@byu.net>
11021
11022         * modules/wcwidth: New file.
11023         * modules/mbchar (Depends-on): Add wcwidth.
11024         * modules/mbswidth (Depends-on): Add wcwidth.
11025         * MODULES.html.sh: Add wcwidth.
11026
11027 2006-06-28  Eric Blake  <ebb9@byu.net>
11028
11029         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
11030         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
11031
11032 2006-06-28  Eric Blake  <ebb9@byu.net>
11033
11034         * lib/xvasprintf.h: Fix comments.
11035
11036 2006-06-28  Eric Blake  <ebb9@byu.net>
11037
11038         * lib/mbchar.h (wcwidth): Include wcwidth.h.
11039         * lib/mbswidth.c (wcwidth): Move from here...
11040         * lib/wcwidth.h: ...to this new file.
11041
11042 2006-06-28  Derek R. Price  <derek@ximbiot.com>
11043
11044         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
11045
11046         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
11047         it's obsolete.
11048         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
11049
11050 2006-06-28  Derek R. Price  <derek@ximbiot.com>
11051
11052         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
11053         Autoconf 2.60 says this stuff was obsolete.
11054
11055 2006-06-28  Bruno Haible  <bruno@clisp.org>
11056
11057         * modules/wcwidth (Files): Add m4/wchar_t.m4.
11058
11059 2006-06-28  Bruno Haible  <bruno@clisp.org>
11060
11061         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
11062         gt_TYPE_WCHAR_T.
11063
11064 2006-06-28  Bruno Haible  <bruno@clisp.org>
11065
11066         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
11067         declaration for wcwidth.
11068         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
11069
11070 2006-06-28  Bruno Haible  <bruno@clisp.org>
11071
11072         * lib/mkdtemp.c [MINGW]: Include <io.h>.
11073         (mkdir): Define using _mkdir.
11074
11075 2006-06-28  Bruno Haible  <bruno@clisp.org>
11076
11077         * lib/getaddrinfo.h: Fix POSIX URL.
11078         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
11079         _WIN32.
11080         (use_win32_p): Make static.
11081         (getaddrinfo): Reject service name if it is empty or does not consist
11082         solely of decimal digits, or if its value is > 65535.
11083         (getnameinfo): Remove useless casts.
11084
11085 2006-06-27  Simon Josefsson  <jas@extundo.com>
11086
11087         * modules/sys_select: New file, suggested by Bruno Haible, Paul
11088         Eggert and Martin Lambers.
11089
11090 2006-06-27  Simon Josefsson  <jas@extundo.com>
11091
11092         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
11093         Eggert and Martin Lambers.
11094
11095 2006-06-27  Bruno Haible  <bruno@clisp.org>
11096
11097         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
11098         result to 0, not to empty.
11099         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
11100
11101 2006-06-27  Bruno Haible  <bruno@clisp.org>
11102
11103         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
11104
11105 2006-06-26  Simon Josefsson  <jas@extundo.com>
11106
11107         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
11108         present.
11109
11110 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
11111
11112         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
11113         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
11114         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
11115
11116 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
11117
11118         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
11119
11120 2006-06-26  Bruno Haible  <bruno@clisp.org>
11121
11122         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
11123
11124 2006-06-26  Bruno Haible  <bruno@clisp.org>
11125
11126         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
11127
11128 2006-06-26  Bruno Haible  <bruno@clisp.org>
11129
11130         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
11131         SGI C compiler in pre-C99 mode.
11132         Suggested by Mark D. Baushke and Larry Jones.
11133
11134 2006-06-26  Bruno Haible  <bruno@clisp.org>
11135
11136         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
11137         WCHAR_MAX.
11138         Reported by Mark D. Baushke and Larry Jones.
11139
11140 2006-06-26  Bruno Haible  <bruno@clisp.org>
11141
11142         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
11143         in pre-C99 mode.
11144         Suggested by Mark D. Baushke and Larry Jones.
11145
11146 2006-06-23  Simon Josefsson  <jas@extundo.com>
11147             Bruno Haible  <bruno@clisp.org>
11148
11149         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
11150         Emit mostlyclean-local rule.
11151         (func_emit_tests_Makefile_am): Likewise.
11152         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
11153
11154 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
11155
11156         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
11157
11158 2006-06-23  Bruno Haible  <bruno@clisp.org>
11159
11160         * tests/test-stdint.c: Update to match ISO C 99 Technical
11161         Corrigendum 1.
11162
11163 2006-06-23  Bruno Haible  <bruno@clisp.org>
11164
11165         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
11166
11167 2006-06-23  Bruno Haible  <bruno@clisp.org>
11168
11169         * lib/stdint_.h: Treat IRIX like OpenBSD.
11170
11171 2006-06-23  Bruno Haible  <bruno@clisp.org>
11172
11173         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
11174         ISO C 99 Technical Corrigendum 1.
11175
11176 2006-06-22  Simon Josefsson  <jas@extundo.com>
11177
11178         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
11179         MinGW.
11180
11181 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11182
11183         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
11184         needed.  Some compiler complained about some of them.  Problem reported
11185         by Larry Jones in
11186         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
11187
11188 2006-06-21  Simon Josefsson  <jas@extundo.com>
11189
11190         * tests/test-getaddrinfo.c: New file.
11191
11192         * modules/getaddrinfo-tests: New file.
11193
11194         * MODULES.html.sh: Add inet_pton.
11195
11196         * modules/inet_pton: New file.
11197
11198 2006-06-21  Simon Josefsson  <jas@extundo.com>
11199
11200         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
11201         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
11202         of using the (limited) gnulib implementation on Windows XP.
11203
11204         * m4/inet_pton.m4: New file.
11205
11206 2006-06-21  Simon Josefsson  <jas@extundo.com>
11207
11208         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
11209         variable.
11210
11211         * lib/socket_.h: Don't define WINVER.
11212
11213         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
11214         slightly modified to work in gnulib.
11215
11216 2006-06-21  Simon Josefsson  <jas@extundo.com>
11217
11218         * doc/gnulib.texi (Windows sockets): Add.
11219
11220 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
11221
11222         * lib/read-file.c (fread_file): Start with buffer allocation of
11223         0 bytes rather than 1 byte; this simplifies the code.
11224         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
11225         code to free buffer and save/restore errno.
11226         (internal_read_file): Remove unused local.
11227
11228 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
11229
11230         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
11231         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
11232         Problem reported by Denis Excoffier in
11233         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
11234
11235 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11236
11237         * modules/sys_socket, modules/socklen: Include sys/types since
11238         FreeBSD 4.x's sys/socket.h needs it.
11239
11240 2006-06-19  Simon Josefsson  <jas@extundo.com>
11241
11242         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
11243
11244 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
11245
11246         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
11247
11248 2006-06-19  Bruno Haible  <bruno@clisp.org>
11249
11250         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
11251         and FULL_PATH_INTTYPES_H in angle brackets.
11252         Reported by Mark D. Baushke <mdb@gnu.org>.
11253
11254 2006-06-17  Eric Blake  <ebb9@byu.net>
11255
11256         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
11257         errno.
11258
11259 2006-06-17  Bruno Haible  <bruno@clisp.org>
11260
11261         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
11262         <sys/inttypes.h>.
11263
11264 2006-06-17  Bruno Haible  <bruno@clisp.org>
11265
11266         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
11267         whether errno is declared. Assume <errno.h> declares errno.
11268
11269 2006-06-17  Bruno Haible  <bruno@clisp.org>
11270
11271         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
11272
11273 2006-06-17  Bruno Haible  <bruno@clisp.org>
11274
11275         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
11276         problem on Solaris 2.5.1.
11277
11278 2006-06-16  Eric Blake  <ebb9@byu.net>
11279
11280         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
11281         * lib/unicodeio.c [!defined errno]: Likewise.
11282         * lib/strtol.c [!defined errno]: Likewise.
11283         * lib/strtod.c [!defined errno]: Likewise.
11284
11285 2006-06-15  Eric Blake  <ebb9@byu.net>
11286
11287         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
11288
11289 2006-06-15  Eric Blake  <ebb9@byu.net>
11290
11291         * config/srclist.txt (ssize_t.m4): Lose sync.
11292
11293 2006-06-15  Bruno Haible  <bruno@clisp.org>
11294
11295         * modules/stdint (Files): Include m4/full-header-path.m4,
11296         m4/size_max.m4, m4/wchar_t.m4.
11297         (Makefile.am): Many more substitutions.
11298         * modules/stdint-tests: New file.
11299         * tests/test-stdint.c: New file.
11300
11301 2006-06-15  Bruno Haible  <bruno@clisp.org>
11302
11303         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
11304         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
11305         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
11306         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
11307         gl_CHECK_TYPE_SAME): New macros.
11308
11309 2006-06-15  Bruno Haible  <bruno@clisp.org>
11310
11311         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
11312
11313 2006-06-15  Bruno Haible  <bruno@clisp.org>
11314
11315         * lib/stdint_.h: Rewritten to be fully auto-configured.
11316         Fixes bug on HP-UX/IA64.
11317
11318 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
11319
11320         * lib/getdate.y (__attribute__): Don't define if already defined.
11321         Problem reported by Larry Jones.
11322         * lib/utimens.c (__attribute__): Likewise.
11323
11324 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
11325
11326         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
11327         reported by Andreas Schwab.
11328
11329 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11330             Bruno Haible  <bruno@clisp.org>
11331
11332         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
11333         check for the declaration of strnlen and a run test that exposes the
11334         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
11335         rpl_strndup.
11336
11337 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11338             Bruno Haible  <bruno@clisp.org>
11339
11340         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
11341
11342 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11343
11344         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
11345         compile test, for Tru64 4.0D.
11346
11347 2006-05-28  Karl Berry  <karl@gnu.org>
11348
11349         * config/srclist.txt (printf-args.c): lose sync.
11350
11351 2006-05-26  Martin Lambers  <marlam@marlam.de>
11352
11353         * lib/getpass.c: Updates the test for the native W32 API, and adds
11354         missing includes, thus fixing compilation warnings.
11355
11356 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11357
11358         * lib/exclude.c (exclude_fnmatch): New function.
11359         (excluded_file_name): Call exclude_fnmatch.
11360         * lib/exclude.h (excluded_file_name): New prototype
11361
11362 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
11363
11364         * lib/tempname.c (small_open, large_open): New macros.
11365         (__open, __open64) [!_LIBC]: Remove.
11366         (__gen_tempname): Use small_open and large_open instead of __open
11367         and __open64.  This fixes a portability bug on HP-UX 11.11i
11368         reported by Simon Wing-Tang in
11369         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
11370
11371 2006-05-24  Bruno Haible  <bruno@clisp.org>
11372
11373         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
11374         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
11375         Reported by Thorsten Maerz <torte@netztorte.de> via
11376         Aaron Stone <aaron@serendipity.cx>.
11377
11378 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
11379
11380         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
11381         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
11382         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
11383         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
11384         not really conditional on the cache.
11385         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
11386
11387 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
11388
11389         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
11390         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
11391         (my_usleep): Don't mishandle maximum value.
11392
11393 2006-05-19  Jim Meyering  <jim@meyering.net>
11394
11395         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
11396
11397 2006-05-17  Bruno Haible  <bruno@clisp.org>
11398
11399         Cygwin portability.
11400         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
11401
11402 2006-05-17  Bruno Haible  <bruno@clisp.org>
11403
11404         * lib/stdint_.h: Fix recognition of Cygwin.
11405
11406 2006-05-15  Bruno Haible  <bruno@clisp.org>
11407
11408         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
11409         on libtool patch by Ralf Wildenhues.
11410
11411 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11412
11413         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
11414         test for C99 conformance; (bool) 0.5 is an integer constant
11415         expression, but (bool) -0.5 is not.  Problem reported by Fedor
11416         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
11417
11418 2006-05-11  Simon Josefsson  <jas@extundo.com>
11419
11420         * m4/xvasprintf.m4: Fix obvious typo.
11421
11422 2006-05-11  Jim Meyering  <jim@meyering.net>
11423
11424         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
11425         James Lemley.
11426
11427 2006-05-10  Simon Josefsson  <jas@extundo.com>
11428
11429         * lib/md4.c: Typo fix, update copyright years.
11430         (K1, K2): Don't use L because it turn computations into 64-bit on
11431         64-bit platforms.
11432
11433 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
11434
11435         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
11436         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
11437         unwanted sign propagation, e.g., on hosts with 64-bit int.
11438         There still are some problems with reeelly weird theoretical hosts
11439         (e.g., 33-bit int) but it's not worth worrying about now.
11440         * lib/sha1.c (rol): Likewise.
11441         (K1, K2, K3, K4): Remove unnecessary L suffix.
11442
11443 2006-05-10  Bruno Haible  <bruno@clisp.org>
11444
11445         * lib/des.c: Cast to avoid warnings.
11446
11447 2006-05-09  Bruno Haible  <bruno@clisp.org>
11448
11449         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
11450         (Depends-on): Depend also on xsize, stdarg.
11451         (configure.ac): Add gl_XVASPRINTF.
11452
11453 2006-05-09  Bruno Haible  <bruno@clisp.org>
11454
11455         * m4/xvasprintf.m4: New file.
11456
11457 2006-05-09  Bruno Haible  <bruno@clisp.org>
11458
11459         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
11460         (EOVERFLOW): Define fallback value.
11461         (xstrcat): New function.
11462         (xvasprintf): Recognize the special case of a string concatenation.
11463
11464 2006-05-08  Eric Blake  <ebb9@byu.net>
11465
11466         * gnulib-tool (func_version): Base copyright year on CVS date.
11467         (func_emit_copyright_notice): New function.
11468         (func_emit_lib_Makefile_am): Use it.
11469         (func_emit_tests_Makefile_am): Likewise.
11470         (func_import): Likewise.
11471
11472 2006-05-08  Bruno Haible  <bruno@clisp.org>
11473
11474         * modules/stdarg: New file.
11475         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
11476
11477 2006-05-08  Bruno Haible  <bruno@clisp.org>
11478
11479         * m4/stdarg.m4: New file, from GNU gettext.
11480
11481 2006-05-08  Bruno Haible  <bruno@clisp.org>
11482
11483         * config/srclist.txt (build-aux/config.rpath): different from latest
11484         release.
11485
11486 2006-05-08  Bruno Haible  <bruno@clisp.org>
11487
11488         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
11489
11490 2006-05-05  Jim Meyering  <jim@meyering.net>
11491
11492         * m4/warning.m4: New file, derived from bison's file by the same name.
11493
11494 2006-05-03  Bruno Haible  <bruno@clisp.org>
11495
11496         * lib/stdint_.h: Shorter URL.
11497         * lib/inttypes.h: Likewise.
11498
11499 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11500
11501         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
11502
11503 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11504
11505         * lib/verify.h: Document the internals better.  Most of this change
11506         was written by Bruno Haible.
11507
11508 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
11509
11510         * doc/verify.texi: New file, partly based on a proposal by
11511         Bruno Haible.
11512
11513 2006-05-02  Bruno Haible  <bruno@clisp.org>
11514
11515         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
11516         test from here...
11517         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
11518
11519 2006-04-29  Bruno Haible  <bruno@clisp.org>
11520
11521         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
11522         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
11523
11524 2006-04-29  Bruno Haible  <bruno@clisp.org>
11525
11526         * gnulib-tool: Make --update option actually work.
11527
11528 2006-04-29  Bruno Haible  <bruno@clisp.org>
11529
11530         * doc/gcd.texi: New file.
11531         * doc/gnulib.texi: Include it.
11532
11533 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
11534
11535         * lib/getdate.y (get_date): When adding relative date, start with the
11536         initial time, not with the result of the first mktime call.
11537
11538 2006-04-25  Bruno Haible  <bruno@clisp.org>
11539
11540         * gnulib-tool (func_import): Output the include directives in three
11541         blocks, sorted separately.
11542         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11543
11544 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11545
11546         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
11547         to define main with arguments, for C++.  Reported by Eric Blake.
11548         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
11549         Prefer 'int main ()' to 'int main (void)', for C++.
11550         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
11551         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
11552         for 'main', for C99 and C++.
11553
11554 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
11555
11556         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
11557         Don't assume that exit status -1 is valid.
11558         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
11559         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
11560         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
11561         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
11562         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
11563         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
11564         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
11565         functions can be used without declaring them, or that you can
11566         exit with status -1.
11567         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
11568
11569 2006-04-24  Karl Berry  <karl@gnu.org>
11570
11571         * config/srclist.txt (longdouble.m4): sync lost.
11572
11573 2006-04-24  Eric Blake  <ebb9@byu.net>
11574
11575         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
11576
11577 2006-04-24  Bruno Haible  <bruno@clisp.org>
11578
11579         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
11580         poll() implementation in AIX.
11581         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11582
11583 2006-04-24  Bruno Haible  <bruno@clisp.org>
11584
11585         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
11586         assigned exactly once.
11587
11588 2006-04-23  Claudio Fontana  <claudio@gnu.org>
11589             Bruno Haible  <bruno@clisp.org>
11590
11591         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
11592         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
11593         for AM_CPPFLAGS.
11594
11595 2006-04-23  Bruno Haible  <bruno@clisp.org>
11596
11597         * modules/copy-file: Depend on unistd.
11598         * modules/execute: Likewise.
11599         * modules/fatal-signal: Likewise.
11600         * modules/findprog: Likewise.
11601         * modules/mkdtemp : Likewise.
11602         * modules/pipe: Likewise.
11603         * modules/wait-process: Likewise.
11604
11605 2006-04-23  Bruno Haible  <bruno@clisp.org>
11606
11607         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
11608         condition was already detected.
11609         Reported by Ben Pfaff <blp@cs.stanford.edu>.
11610
11611 2006-04-23  Bruno Haible  <bruno@clisp.org>
11612
11613         * lib/copy-file.c: Include <unistd.h> unconditionally.
11614         * lib/execute.c: Likewise.
11615         * lib/fatal-signal.c: Likewise.
11616         * lib/findprog.c: Likewise.
11617         * lib/mkdtemp.c: Likewise.
11618         * lib/pipe.h: Likewise.
11619         * lib/pipe.c: Likewise.
11620         * lib/wait-process.h: Likewise.
11621
11622 2006-04-23  Bruno Haible  <bruno@clisp.org>
11623
11624         * gnulib-tool (func_usage): Fix --import description. Document
11625         --update.
11626         (func_import): Create temporary file in a temporary directory, if
11627         --dry-run is specified. Silence errors from 'grep' when there are no
11628         m4 files in $m4dir.
11629         (func_create_testdir): Silence errors from 'grep' when there are no
11630         m4 files in $m4dir.
11631         Reported by Karl Berry <karl@freefriends.org>.
11632
11633 2006-04-20  Bruno Haible  <bruno@clisp.org>
11634
11635         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
11636         one argument, so that the code will be portable to Autoconf 2.60.
11637         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
11638         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
11639         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
11640
11641 2006-04-19  Derek Price  <derek@ximbiot.com>
11642             Eric Blake  <ebb9@byu.net>
11643
11644         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
11645         rather than "/full/path.h".  Update comment to match.  Shorten &
11646         generalize m4_translit call via AS_TR_CPP.
11647
11648 2006-04-19  Derek Price  <derek@ximbiot.com>
11649             Eric Blake  <ebb9@byu.net>
11650
11651         * lib/inttypes.h: Correct grammar in comment.
11652
11653 2006-04-18  Derek Price  <derek@ximbiot.com>
11654             Paul Eggert  <eggert@cs.ucla.edu>
11655
11656         * modules/inttypes: New file.
11657         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
11658
11659 2006-04-18  Derek Price  <derek@ximbiot.com>
11660             Paul Eggert  <eggert@cs.ucla.edu>
11661
11662         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
11663         New files.
11664
11665 2006-04-18  Derek Price  <derek@ximbiot.com>
11666             Paul Eggert  <eggert@cs.ucla.edu>
11667
11668         * lib/inttypes.h: New file.
11669         * lib/strtoimax.c: Assume <inttypes.h>.
11670
11671 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
11672
11673         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
11674         isn't mounted.  Problem reported by Kir Kolyshkin.
11675
11676 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
11677
11678         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
11679         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
11680         Derek R. Price.
11681         * lib/regex.h (RE_DUP_MAX): Update comment to match current
11682         implementation.
11683
11684 2006-04-12  Eric Blake  <ebb9@byu.net>
11685
11686         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
11687         is now done automatically by the corresponding Autoconf macro.
11688
11689 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
11690
11691         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
11692         time_r.h.
11693
11694 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11695
11696         Merge regex changes from libc, removing some of our
11697         POSIX-conformance changes that were rejected and redoing them in a
11698         less-intrusive way.
11699
11700         * lib/regcomp.c (re_compile_internal, init_dfa):
11701         Length arg is now size_t, not Idx.  All uses changed.
11702         (peek_token): Forward decl now says internal_function.
11703         (__re_error_msgid, __re_error_msgid_idx):
11704         Now static rather than extern with attribute_hidden.
11705         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
11706         For some reason libc prefers K&R style defns for external functions.
11707         (regerror) [!defined _LIBC]: Likewise.
11708         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
11709         (seek_collating_symbol_entry, lookup_collation_sequence_value):
11710         (build_range_exp, build_collating_symbol):
11711         Use K&R-style defn.
11712         (re_compile_fastmap): Use '\0' to memset, not 0.
11713         (utf8_sb_map): Make the calculations more obvious.
11714         (init_dfa, parse_bracket_exp, build_charclass_op):
11715         Call calloc and cast result, as glibc does.
11716         (init_word_char, fetch_token, peek_token, peek_token_bracket):
11717         (build_range_exp, build_collating_symbol):
11718         Now internal functions.
11719
11720         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
11721
11722         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
11723         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
11724         Don't depend on VMS; depend on __VMS instead, for POSIX
11725         namespace cleanness.
11726         (regoff_t): Define to ssize_t, not long int.
11727
11728         Remove the REG_ macros named below.  Instead, make the old names
11729         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
11730         __USE_GNU_REGEX.
11731         (REG_BACKSLASH_ESCAPE_IN_LISTS):
11732         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
11733         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
11734         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
11735         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
11736         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
11737         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
11738         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
11739         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
11740         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
11741         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
11742         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
11743         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
11744         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
11745         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
11746         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
11747         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
11748         (REG_NREGS):
11749         Remove.  All uses replaced by the old RE_* names.
11750         (RE_BACKSLASH_ESCAPE_IN_LISTS):
11751         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
11752         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
11753         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
11754         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
11755         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
11756         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
11757         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
11758         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
11759         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
11760         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
11761         Don't bother having these macros be independent of each others'
11762         values, since they no longer exist in the POSIX name space.
11763
11764         Rename the following member names back to their old names,
11765         unless !__USE_GNU_REGEX.  All uses changed back.
11766         (buffer): Renamed from re_buffer.
11767         (allocated): Renamed from re_allocated.
11768         (used): Renamed from re_used.
11769         (syntax): Renamed from re_syntax.
11770         (fastmap): Renamed from re_fastmap.
11771         (translate): Renamed from re_translate.
11772         (can_be_null): Renamed from re_can_be_null.
11773         (regs_allocated): Renamed from re_regs_allocated.
11774         (fastmap_accurate): Renamed from re_fastmap_accurate.
11775         (no_sub): Renamed from re_no_sub.
11776         (not_bol): Renamed from re_not_bol.
11777         (not_eol): Renamed from re_not_eol.
11778         (newline_anchor): Renamed from re_newline_anchor.
11779         (num_regs): Renamed from rm_num_regs.
11780         (start): Renamed from rm_start.
11781         (end): Renamed from rm_end.
11782
11783         (free_state): Move up a bit.
11784
11785         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
11786         #define to be empty.
11787         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
11788         when that is what is intended.
11789         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
11790         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
11791         (MAX): New macro.
11792         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
11793         All uses changed back to re_malloc, etc.  It's now the caller's
11794         responsibility to check for overflow; all callers changed.
11795         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
11796         (re_x2nrealloc): Remove.
11797         (free_state): Remove decl.
11798
11799         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
11800         (re_set_registers, re_exec):
11801         Use K&R-style defn.
11802
11803         2006-01-31  Roland McGrath  <roland@redhat.com>
11804
11805         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
11806         Reported by Mike Frysinger <vapier@gentoo.org>.
11807
11808         2006-01-15  Andreas Jaeger  <aj@suse.de>
11809
11810         [BZ #1950]
11811         * lib/regex_internal.c (re_string_reconstruct): Adjust for
11812         build_wcs_upper_buffer change.
11813         (build_wcs_upper_buffer): Change return type.
11814
11815         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
11816
11817         * lib/regex_internal.h: Include <stdint.h> if available.
11818
11819         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
11820
11821         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
11822
11823         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
11824
11825         * lib/regcomp.c: Adjust for changed secondary hash function.
11826
11827         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
11828
11829         * lib/regex.h: Pretty printing.
11830         Clean up namespace a bit.
11831
11832         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
11833
11834         * lib/regexec.c (update_cur_sifted_state, check_arrival,
11835         check_arrival_add_next_nodes): Avoid using uninitialized variable.
11836
11837         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11838                     Ulrich Drepper  <drepper@redhat.com>
11839
11840         [BZ #1302]
11841         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
11842         changed.
11843         (bitset_word_t): Renamed from bitset_word.  All uses changed.
11844
11845         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
11846
11847         [BZ #281]
11848         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
11849         * lib/regcomp.c: Remove unnecessary uses of
11850         unsigned RE_TRANSLATE_TYPE.
11851         * lib/regex_internal.h: Likewise.
11852         * lib/regex_internal.c: Likewise.
11853         * lib/regexec.c: Likewise.
11854         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
11855
11856         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
11857
11858         * lib/regexec.c (find_recover_state): Remove unnecessary
11859         initialization.
11860         (transit_state_bkref): Make DFA a const pointer.
11861         (get_subexp): Likewise.
11862         (check_arrival): Likewise.
11863         (update_cur_sifted_state): Likewise.
11864         (re_search_internal): Likewise.
11865         (prune_impossible_nodes): Likewise.
11866         (acquire_init_state_context): Likewise.
11867         (proceed_next_node): Likewise.
11868         (set_regs): Likewise.
11869         (free_fail_stack_return): Likewise.
11870         (check_arrival_expand_ecl): Mark DFA parameter as const.
11871         (check_arrival_expand_ecl_sub): Likewise.
11872         (check_subexp_limits): Likewise.
11873         (sub_epsilon_src_nodes):  Likewise.
11874         (add_epsilon_src_nodes):  Likewise.
11875         (merge_state_array): Likewise.
11876         (update_regs): Likewise.
11877         (build_trtable): Likewise.
11878         (sift_states_backward): Mark MCTX parameter as const.
11879         (build_sifted_states): Likewise.
11880         (update_cur_sifted_state): Likewise.
11881         (sift_states_mkref): Likewise.
11882         (check_arrival_expand_ecl): Mark eclosure as const.
11883         (check_dst_limits_calc_pos_1): Likewise.
11884         * lib/regex_internal.h (re_match_context_t): Make dfa a const
11885         pointer.
11886
11887         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
11888
11889         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
11890         (transit_state_sb): Likewise.
11891         (transit_state_mb): Likewise.
11892         (sift_states_iter_mb): Likewise.
11893         (check_arrival_add_next_nodes): Likewise.
11894         (check_node_accept_bytes): Change first parameter to pointer-to-const.
11895         [_LIBC] (re_search_2_stub): Use mempcpy.
11896
11897         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
11898         mbrtowc for very simple UTF-8 case.
11899
11900         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
11901         a pointer-to-const.
11902         (re_acquire_state_context): Likewise.
11903         * lib/regex_internal.h: Adjust prototypes.
11904
11905         * lib/regex.c: Prevent using C++ compilers.
11906
11907         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
11908         (re_acquire_state_context): Likewise.
11909
11910 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11911
11912         * modules/regex (Depends-on): Add ssize_t.
11913
11914 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11915
11916         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
11917         translation table.
11918
11919 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
11920
11921         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
11922
11923 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
11924             Bruno Haible  <bruno@clisp.org>
11925
11926         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
11927         <sys/types.h> and <inttypes.h>.
11928
11929 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11930
11931         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
11932         `__error_t_defined', so argp.h will not typedef the former.
11933
11934 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
11935
11936         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
11937         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
11938         glibc names.  Even if glibc is changed to conform to POSIX, the
11939         traditional names will be available anyway, since regex depends on
11940         the extensions module.  Also, fix a longstanding typo in the
11941         implementation of Spencer ERE test #75 from grep 2.3.  Problems
11942         reported by Emanuele Giaquinta.  Also, change sense of cached
11943         variable, so that the message makes sense.
11944
11945 2006-03-24  Simon Josefsson  <jas@extundo.com>
11946
11947         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
11948         including some doc fixes.
11949         (base64_encode_alloc): Fix +1 bug on allocation failures.
11950
11951 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11952
11953         * lib/base64.c (base64_encode): Do not read past end of array with
11954         unsanitized input on systems with CHAR_BIT > 8.
11955
11956 2006-03-24  Eric Blake  <ebb9@byu.net>
11957
11958         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
11959
11960 2006-03-22  Karl Berry  <karl@gnu.org>
11961
11962         * config/srclist.txt (*setenv.[ch]): get from coreutils.
11963         * config/srclistvars.sh (COREUTILS): new var.
11964
11965 2006-03-17  Jim Meyering  <jim@meyering.net>
11966
11967         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
11968         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
11969
11970 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
11971
11972         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
11973         no longer needs it.  Instead, check that regoff_t is as least
11974         as wide as ptrdiff_t.
11975
11976         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
11977         so that our regex.h stays compatible with the installed regex.
11978         This is helpful for installers who configure --without-included-regex.
11979         Problem reported by Emanuele Giaquinta.
11980
11981 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
11982
11983         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
11984         Typedef to long int, not to off_, as POSIX will likely change
11985         in that direction.
11986
11987 2006-03-15  Eric Blake  <ebb9@byu.net>
11988
11989         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
11990
11991 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11992
11993         * lib/argp-help.c (validate_uparams): Fix typo
11994         * lib/argp-parse.c (argp_default_options): Consistently begin help
11995         messages with a lowercase letter.
11996
11997 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
11998
11999         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
12000         overrun buffers and shouldn't be used (much as gets shouldn't be
12001         used).
12002         * lib/time_r.c (asctime_r, ctime_r): Likewise.
12003
12004 2006-03-08  Simon Josefsson  <jas@extundo.com>
12005
12006         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
12007         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12008
12009 2006-03-08  Simon Josefsson  <jas@extundo.com>
12010
12011         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
12012         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12013
12014 2006-03-08  Simon Josefsson  <jas@extundo.com>
12015
12016         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
12017         signal that configure disabled the device.
12018
12019 2006-03-08  Simon Josefsson  <jas@extundo.com>
12020
12021         * build-aux/maint.mk: Fix refresh-po, to handle no translated
12022         languages.
12023
12024 2006-03-07  Simon Josefsson  <jas@extundo.com>
12025
12026         * modules/getopt (Depends-on): Add unistd.
12027
12028         * modules/unistd: New file.
12029
12030 2006-03-07  Simon Josefsson  <jas@extundo.com>
12031
12032         * modules/gc-random: New file.
12033
12034 2006-03-07  Simon Josefsson  <jas@extundo.com>
12035
12036         * m4/unistd_h.m4: New file.
12037
12038 2006-03-07  Simon Josefsson  <jas@extundo.com>
12039
12040         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
12041         test to be side-effect free by storing the result in the cache
12042         variable gl_cv_lib_readline, and moving the assignment of
12043         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
12044         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12045
12046 2006-03-07  Simon Josefsson  <jas@extundo.com>
12047
12048         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
12049         error on missing devices (the functions will return an error).
12050
12051         * m4/gc.m4: Move random stuff to gc-random.m4
12052
12053 2006-03-07  Simon Josefsson  <jas@extundo.com>
12054
12055         * lib/unistd_.h: New file.
12056
12057 2006-03-07  Simon Josefsson  <jas@extundo.com>
12058
12059         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
12060
12061 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12062
12063         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
12064         Problem reported by Juan Manuel Guerrero.
12065
12066 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12067
12068         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
12069         the unistd module.
12070         * lib/getlogin_r.c: Likewise.
12071         * lib/getlogin_r.h: Likewise.
12072         * lib/glob.c: Likewise.
12073         * lib/pagealign_alloc.c: Likewise.
12074         * lib/unistd_.h: Remove; no longer needed.
12075
12076 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
12077
12078         * MODULES.html.sh (Support for systems lacking POSIX:2001):
12079         Add unistd.
12080         * modules/c-stack (Depends-on): Add unistd.
12081         * modules/getlogin_r: Likewise.
12082         * modules/glob: Likewise.
12083         * modules/pagealign_alloc: Likewise.
12084         * modules/unistd (Files): Remove lib/unistd_.h.
12085         (EXTRA_DIST): Remove.
12086         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
12087         need unistd_.h.
12088         (MOSTLYCLEANFILES): Remove unistd.h-t.
12089
12090 2006-03-03  Simon Josefsson  <jas@extundo.com>
12091
12092         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
12093
12094 2006-03-03  Simon Josefsson  <jas@extundo.com>
12095
12096         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
12097         libidn and bison.
12098
12099 2006-03-03  Simon Josefsson  <jas@extundo.com>
12100
12101         * build-aux/maint.mk: Add indent target.
12102
12103 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
12104
12105         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
12106         our replacement poll.h in any case, to avoid a differing
12107         declaration from a system header.  Seen on AIX.
12108
12109 2006-03-01  Simon Josefsson  <jas@extundo.com>
12110
12111         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
12112         <kasal@ucw.cz>.
12113
12114 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12115
12116         * modules/gettime (Depends-on): Add extensions module.
12117         * modules/nanosleep (Depends-on): Likewise.
12118         * modules/settime (Depends-on): Likewise.
12119
12120 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12121
12122         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
12123         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
12124         pedantically.
12125         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
12126         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
12127
12128         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
12129         not "==".  Reported by Ralf Wildenhues.
12130
12131 2006-03-01  Karl Berry  <karl@gnu.org>
12132
12133         * doc/Copyright/request-*: new files, synced from gnuorg.
12134
12135 2006-03-01  Karl Berry  <karl@gnu.org>
12136
12137         * config/srclist.txt (Copyright/*): new entries.
12138
12139 2006-02-28  Simon Josefsson  <jas@extundo.com>
12140
12141         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
12142
12143 2006-02-27  Simon Josefsson  <jas@extundo.com>
12144
12145         * lib/base64.h: Indent #define's.  From Jim Meyering
12146         <jim@meyering.net>.
12147
12148 2006-02-27  Jim Meyering  <jim@meyering.net>
12149
12150         Revert the change of 2006-02-24, so these files can continue
12151         to be sync'd from gettext.
12152         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
12153         of `config.h'.
12154
12155 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
12156
12157         * modules/intprops: New file.
12158         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
12159         Add intprops.
12160         * modules/getloadavg (Files): Remove lib/intprops.h.
12161         (Depends-on): Add intprops.
12162         * modules/human: Likewise.
12163         * modules/inttostr: Likewise.
12164         * modules/openat: Likewise.
12165         * modules/sig2str: Likewise.
12166         * modules/userspec: Likewise.
12167         * modules/utimecmp: Likewise.
12168         * modules/xnanosleep: Likewise.
12169         * modules/xstrtol: Likewise.
12170
12171 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
12172
12173         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
12174         * modules/lock-tests (TESTS): Use $(EXEEXT).
12175         * modules/tls-tests: Likewise.
12176         * modules/argp-tests: Likewise.
12177         (check_PROGRAMS): New var, replacing...
12178         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
12179
12180 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12181
12182         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
12183         `config.h'.
12184
12185 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
12186
12187         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
12188
12189 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12190
12191         Sync from coreutils.
12192         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
12193         gl_CHDIR_SAFER.
12194
12195 2006-02-22  Jim Meyering  <jim@meyering.net>
12196
12197         Sync from coreutils.
12198         * m4/chdir-safer.m4: New file.
12199
12200 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
12201
12202         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
12203         AT_FDCWD exceeds INT_MAX.
12204         * lib/openat.h (AT_FDCWD): Likewise.
12205
12206 2006-02-17  Eric Blake  <address@hidden>
12207
12208         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
12209
12210 2006-02-16  Simon Josefsson  <jas@extundo.com>
12211
12212         * modules/getaddrinfo (Depends-on): Add sys_socket.
12213
12214 2006-02-15  Simon Josefsson  <jas@extundo.com>
12215
12216         * build-aux/maint.mk: Add dsyntax-check rule.
12217
12218 2006-02-15  Eric Blake  <ebb9@byu.net>
12219
12220         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
12221         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
12222         'present but cannot compile' warnings on cygwin.
12223         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
12224         use ws2tcpip.h if sys/socket.h works.
12225         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
12226         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
12227
12228 2006-02-14  Simon Josefsson  <jas@extundo.com>
12229
12230         * modules/maintainer-makefile (Files): Rename.
12231
12232         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
12233         and (the local) Makefile.cfg to maint-cfg.mk.
12234
12235         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
12236         to the latter.
12237
12238         * modules/maintainer-makefile: New module.
12239
12240         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
12241         severaly stripped to make it possible to build it up from scratch
12242         with reliable tests.
12243
12244         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
12245         fixes to permit overriding the default actions when configure and
12246         makefile are not available.
12247
12248 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
12249
12250         Sync from coreutils.
12251         * modules/lstat (Depends-on): Don't depend on xalloc.
12252         (License): Change from GPL to LGPL, since this is now simply a
12253         replacement for a libc function.
12254
12255 2006-02-14  Jim Meyering  <jim@meyering.net>
12256
12257         Sync from coreutils.
12258
12259         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
12260         failure on deficient systems, and simplify gnulib lgpl dependencies.
12261         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
12262         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
12263
12264         * lib/xalloc-die.c: Remove unused definition of N_.
12265
12266 2006-02-14  Jim Meyering  <jim@meyering.net>
12267
12268         Sync from coreutils.
12269         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
12270         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
12271         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
12272         double-quote uses of that variable, to accommodate the rare case in
12273         which getmntent is available in none of the libraries checked.  This
12274         happens at least on FreeBSD 5.0.
12275
12276 2006-02-13  Simon Josefsson  <jas@extundo.com>
12277
12278         * gnulib-tool (Usage): Fix --import, from
12279         karl@freefriends.org (Karl Berry).
12280
12281 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
12282
12283         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
12284
12285 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
12286
12287         * lib/argp-namefrob.h: Restore changes accidentally lost during the
12288         "autoupdate" on 2005-12-12.
12289
12290 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
12291
12292         * modules/closeout (Depends-on): Remove atexit.
12293
12294 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
12295
12296         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
12297         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
12298
12299 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
12300
12301         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
12302         __EXTENSIONS__ if this causes compilation to fail.  Problem
12303         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
12304         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
12305
12306 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
12307
12308         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
12309         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
12310         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
12311         All uses changed.
12312
12313 2006-01-26  Simon Josefsson  <jas@extundo.com>
12314
12315         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
12316         prototype is visible on mingw32.
12317
12318         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
12319         for mingw32.
12320
12321         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
12322         mingw32).
12323
12324 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
12325
12326         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
12327         attempt to open for write; this always fails, at least on POSIX
12328         hosts.  This reinstates the 2006-01-09 change, which was
12329         inadvertently removed.
12330
12331 2006-01-26  Bruno Haible  <bruno@clisp.org>
12332
12333         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
12334         Reported by Paul Eggert.
12335
12336 2006-01-26  Bruno Haible  <bruno@clisp.org>
12337             Paul Eggert  <eggert@cs.ucla.edu>
12338
12339         * lib/stdbool_.h (_Bool)
12340         [(! (defined __cplusplus || defined __BEOS__)
12341           && !defined __GNUC__
12342           && !(defined __HP_cc || defined __xlc__
12343                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
12344                || defined __sgi))]:
12345         #define to signed char in these cases too; this simplifies
12346         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
12347         etc., separately) and makes it more conservative.
12348
12349 2006-01-25  Simon Josefsson  <jas@extundo.com>
12350
12351         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
12352         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
12353         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
12354
12355 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
12356
12357         * lib/argp-namefrob.h: Bugfix. Remove stray #
12358
12359 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
12360
12361         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
12362         so that we test the test.
12363         Check for yet another HP-UX cc bug involving *bool |= bool.
12364
12365 2006-01-25  Karl Berry  <karl@gnu.org>
12366
12367         * config/srclist.txt (vasnprintf.c): sync lost.
12368
12369 2006-01-25  Jim Meyering  <jim@meyering.net>
12370
12371         Sync from the stable (b5) branch of coreutils:
12372
12373         * lib/fts.c (fts_children): Don't let close() clobber errno from
12374         failed fchdir().
12375
12376         * lib/fts.c (fts_stat): When following a symlink-to-directory,
12377         don't necessarily interpret stat-fails+lstat-succeeds as indicating
12378         a dangling symlink.  That can also happen at least for ELOOP.
12379         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
12380         FYI, this bug predates the inclusion of fts.c in coreutils.
12381
12382         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
12383         in their own block, so pre-c99 compilers don't object.
12384
12385         Avoid the double-free (first in fts_read, second in fts_close) that
12386         would occur when an `active' directory is made inaccessible (e.g.,
12387         via chmod a-x) during a traversal.
12388         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
12389         before returning.  Reproduce this failure by
12390         mkdir -p a/b; cd a; chmod a-x . b
12391         Reported by Stavros Passas.
12392
12393 2006-01-25  Jim Meyering  <jim@meyering.net>
12394
12395         * lib/fileblocks.c: Remove more useless parentheses.
12396         * lib/readutmp.h: Likewise.
12397
12398 2006-01-25  Bruno Haible  <bruno@clisp.org>
12399
12400         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
12401         warnings.
12402         Reported by Paul Eggert.
12403
12404 2006-01-25  Bruno Haible  <bruno@clisp.org>
12405
12406         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
12407         rid of a trap command. For Solaris sh.
12408         Reported by Mark D. Baushke <mdb@gnu.org>.
12409
12410 2006-01-24  Simon Josefsson  <jas@extundo.com>
12411
12412         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
12413         Bruno.
12414
12415 2006-01-24  Karl Berry  <karl@gnu.org>
12416
12417         * config/srclist.txt (argp-namefrob.h): sync lost.
12418
12419 2006-01-24  Jim Meyering  <jim@meyering.net>
12420
12421         * modules/openat (Files): Add lib/intprops.h.
12422         From Mark D. Baushke.
12423
12424 2006-01-24  Jim Meyering  <jim@meyering.net>
12425
12426         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
12427         Reported by Mark D. Baushke.
12428
12429 2006-01-24  Jim Meyering  <jim@meyering.net>
12430
12431         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
12432
12433 2006-01-24  Bruno Haible  <bruno@clisp.org>
12434
12435         * modules/strnlen (Maintainer): Change from glibc to all.
12436
12437 2006-01-24  Bruno Haible  <bruno@clisp.org>
12438
12439         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
12440         Patch by Paul Eggert.
12441
12442 2006-01-24  Bruno Haible  <bruno@clisp.org>
12443
12444         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
12445         already has it.
12446         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
12447         2005-11-26.
12448
12449         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
12450         'signed char' to avoid problems with the built-in _Bool type.
12451         Reported by Paul Eggert on 2005-11-26.
12452
12453 2006-01-24  Bruno Haible  <bruno@clisp.org>
12454
12455         * gnulib-tool (func_import): Avoid constructing complicated sed
12456         expressions inside backquote.
12457         Report and solution by Mark D. Baushke <mdb@gnu.org>.
12458
12459 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
12460
12461         These changes imported from libc.
12462         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
12463         test and two separate function calls.
12464         * lib/strndup.c (__strndup): Add libc_hidden_def.
12465
12466 2006-01-23  Simon Josefsson  <jas@extundo.com>
12467
12468         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
12469         Remove the test_*_SOURCES variable: automake infers it by default.
12470         * modules/tls-tests: Likewise.
12471
12472 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12473
12474         Work around porting bugs reported by Dieter in
12475         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
12476         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
12477         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
12478         Include "getopt.h" first, to check interface.
12479         (getenv): Declare only if defined HAVE_DECL_GETENV &&
12480         !HAVE_DECL_GETENV.
12481         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
12482         (__strndup): Revert to K&R-style function dfns, the glibc style.
12483         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
12484         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
12485         Include strnlen.h first, to get prototype properly.
12486         (strnlen): Renamed from __strnlen.
12487         Remove weak alias.
12488
12489 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12490
12491         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
12492
12493 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12494
12495         * config/srclist.txt: Adjust to reflect glibc reorganization.
12496         This affects only comments.
12497
12498 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12499
12500          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
12501          Reported by Bruce Korb <bkorb@gnu.org>.
12502
12503 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
12504
12505         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
12506         to pacify gcc -Wswitch-default.
12507
12508 2006-01-22  Bruno Haible  <bruno@clisp.org>
12509
12510         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
12511         temporary buffer for sprintf, take into account the precision also
12512         for 'd', 'i', 'u', 'o', 'x', 'X'.
12513
12514 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
12515
12516         * modules/argp-tests: New module
12517         * tests/test-argp.c: New file
12518         * tests/test-argp-2.sh: New file
12519
12520 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
12521
12522         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
12523         (__argp_base_name): Removed
12524         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
12525         typo.
12526         (__argp_base_name): Provide macro definition or extern declaration
12527         depending on the configuration
12528
12529 2006-01-20  Simon Josefsson  <jas@extundo.com>
12530
12531         * modules/inet_ntop (Depends-on): Depend on sys_socket.
12532
12533 2006-01-20  Simon Josefsson  <jas@extundo.com>
12534
12535         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
12536
12537 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12538
12539         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
12540         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
12541         Suggested by Bruno Haible.
12542
12543 2006-01-20  Karl Berry  <karl@gnu.org>
12544
12545         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
12546         until changes propagate, I guess.
12547
12548 2006-01-19  Simon Josefsson  <jas@extundo.com>
12549
12550         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
12551
12552 2006-01-19  Simon Josefsson  <jas@extundo.com>
12553
12554         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
12555
12556 2006-01-19  Simon Josefsson  <jas@extundo.com>
12557
12558         * gnulib-tool: Set check_PROGRAMS.
12559
12560         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
12561         modules/des-tests, modules/gc-arcfour-tests,
12562         modules/gc-arctwo-tests, modules/gc-des-tests,
12563         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
12564         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
12565         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
12566         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
12567         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
12568         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
12569         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
12570         test_*_SOURCES.
12571
12572 2006-01-18  Simon Josefsson  <jas@extundo.com>
12573
12574         * modules/socklen (Depends-on): Depend on sys_socket.
12575
12576 2006-01-18  Simon Josefsson  <jas@extundo.com>
12577
12578         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
12579         modules/des-tests, modules/gc-arcfour-tests,
12580         modules/gc-arctwo-tests, modules/gc-des-tests,
12581         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
12582         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
12583         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
12584         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
12585         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
12586         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
12587         $(EXEEXT) to automake TESTS variable, for mingw32.
12588
12589 2006-01-17  Simon Josefsson  <jas@extundo.com>
12590
12591         * modules/socklen (Include): Need sys/socket.h.
12592
12593 2006-01-17  Bruno Haible  <bruno@clisp.org>
12594
12595         * modules/ssize_t (Include): Add <sys/types.h>.
12596
12597 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
12598
12599         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
12600         it's not portable and it doesn't work with cross-compiles.
12601         Problem reported by Bruno Haible.  Fix missing-$ typo in
12602         'test "gl_cv_ignore_unused_libraries" ...' that prevented
12603         -zignore from being used with Sun's C compiler.
12604
12605 2006-01-12  Simon Josefsson  <jas@extundo.com>
12606
12607         * lib/base64.c: Fix warning, reported by Bruno Haible
12608         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
12609
12610 2006-01-12  Bruno Haible  <bruno@clisp.org>
12611
12612         * modules/ldd: New file.
12613         * build-aux/ldd.sh.in: New file.
12614         * MODULES.html.sh (Support for building libraries and executables): Add
12615         ldd.
12616
12617 2006-01-12  Bruno Haible  <bruno@clisp.org>
12618
12619         * m4/ldd.m4: New file.
12620
12621 2006-01-12  Bruno Haible  <bruno@clisp.org>
12622
12623         * gnulib-tool (func_import, func_create_testdir): Don't go into an
12624         endless loop while replacing $auxdir with build-aux.
12625
12626 2006-01-11  Simon Josefsson  <jas@extundo.com>
12627
12628         * lib/stdint_.h (SIZE_MAX): Add missing (.
12629
12630 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
12631
12632         Sync from coreutils.
12633         * lib/md5.c: Fix commentary typos.
12634         (alignof, UNALIGNED_P): No need for a GCC-specific version.
12635         * lib/md5.h (__attribute__): Remove; unused.
12636         * lib/sha1.c: Fix commentary to match md5 better.
12637         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
12638         so that we don't need to worry about alignment.  All uses changed.
12639         This merges the 2005-10-28 md5 change into sha1.
12640
12641 2006-01-11  Jim Meyering  <jim@meyering.net>
12642
12643         Sync from coreutils.
12644         * lib/md5.c (OP): Fix spacing.
12645
12646 2006-01-11  Bruno Haible  <bruno@clisp.org>
12647
12648         Ensure automatic ordering between gl_LOCK and gl_ARGP.
12649         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
12650         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
12651
12652 2006-01-11  Bruno Haible  <bruno@clisp.org>
12653
12654         Ensure automatic ordering between gl_LOCK and gl_ARGP.
12655         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
12656         the "early" section as well.
12657
12658 2006-01-11  Bruno Haible  <bruno@clisp.org>
12659
12660         Avoid "ar: no archive members specified" error on MacOS X.
12661         * gnulib-tool (func_modules_add_dummy): New function.
12662         (func_import, func_create_testdir): Invoke it.
12663
12664 2006-01-11  Bruno Haible  <bruno@clisp.org>
12665
12666         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
12667         with $auxdir in AC_CONFIG_FILES statements.
12668
12669 2006-01-11  Bruno Haible  <bruno@clisp.org>
12670
12671         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12672         Initialize also noinst_HEADERS to empty.
12673
12674 2006-01-11  Bruno Haible  <bruno@clisp.org>
12675
12676         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
12677         variables.
12678         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
12679         autoreconf.
12680
12681 2006-01-11  Bruno Haible  <bruno@clisp.org>
12682
12683         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
12684         overridable by the user.
12685         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12686
12687 2006-01-10  Simon Josefsson  <jas@extundo.com>
12688
12689         * modules/sys_socket: New file.
12690
12691 2006-01-10  Simon Josefsson  <jas@extundo.com>
12692
12693         * m4/sys_socket_h.m4: New file.
12694
12695 2006-01-10  Simon Josefsson  <jas@extundo.com>
12696
12697         * lib/socket_.h: New file.
12698
12699 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12700
12701         * modules/readutmp (Maintainer): Add myself.
12702
12703 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12704
12705         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
12706         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
12707         People who are still concerned with buggy memcmp implementations
12708         can invoke gl_FUNC_MEMCMP themselves.
12709
12710 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
12711
12712         * lib/regex_internal.h (BITSET_WORD_BITS):
12713         Work around a bug in 64-bit PGC (before version 6.1-2), where the
12714         preprocessor mishandles large unsigned values as if they were signed.
12715         Problem reported by Claudio Fontana in
12716         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
12717
12718 2006-01-10  Jim Meyering  <jim@meyering.net>
12719
12720         Avoid the double-free (first in fts_read, second in fts_close) that
12721         would occur when an `active' directory is made inaccessible (e.g.,
12722         via chmod a-x) during a traversal.
12723         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
12724         before returning.  Reproduce this failure by
12725         mkdir -p a/b; cd a; chmod a-x . b
12726         Reported by Stavros Passas.
12727
12728         Sync from coreutils.
12729         * lib/sha1.c: Tweak grammar in a comment.
12730
12731 2006-01-10  Jim Meyering  <jim@meyering.net>
12732
12733         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
12734         Patch by Joerg Sonnenberger.
12735
12736 2006-01-10  Bruno Haible  <bruno@clisp.org>
12737
12738         * modules/readutmp: Depend on module free.
12739         * modules/strtok_r: Depend on module restrict.
12740
12741 2006-01-10  Bruno Haible  <bruno@clisp.org>
12742
12743         * modules/gettext (configure.ac): Add an invocation of
12744         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
12745
12746 2006-01-10  Bruno Haible  <bruno@clisp.org>
12747
12748         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
12749         Reported by Werner Lemberg <wl@gnu.org>.
12750
12751 2006-01-10  Bruno Haible  <bruno@clisp.org>
12752
12753         * lib/localcharset.c: Update from GNU gettext.
12754
12755 2006-01-10  Bruno Haible  <bruno@clisp.org>
12756
12757         * lib/argp.h (__const): Remove macro. Use const instead.
12758         * lib/argp-fmtstream.h (__const): Likewise.
12759         * lib/glob_.h (__const): Remove macro.
12760         * lib/glob-libc.h: Use const instead of __const.
12761
12762 2006-01-10  Bruno Haible  <bruno@clisp.org>
12763
12764         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
12765         variable.
12766         Needed to avoid an automake error regarding the 'gettext' module.
12767
12768 2006-01-09  Simon Josefsson  <jas@extundo.com>
12769
12770         * modules/inet_ntop (Depends-on): Add restrict.
12771
12772 2006-01-09  Simon Josefsson  <jas@extundo.com>
12773
12774         * modules/gc-rijndael-tests (License): Put under LGPL.
12775
12776         * modules/gc-des-tests (License): Likewise.
12777
12778         * modules/gc-arcfour-tests (License): Likewise.
12779
12780         * modules/gc-arctwo-tests (License): Likewise.
12781
12782         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
12783
12784         * modules/gc-hmac-sha1-tests (Files): Likewise.
12785
12786         * modules/gc-hmac-md5-tests (License): Likewise.
12787
12788         * modules/gc-sha1-tests (License): Likewise.
12789
12790         * modules/gc-md5-tests (License): Likewise.
12791
12792         * modules/gc-md4-tests (License): Likewise.
12793
12794         * modules/gc-md2-tests (License): Likewise.
12795
12796         * modules/gc-tests (License): Likewise.
12797
12798         * modules/des-tests (License): Likewise.
12799
12800         * modules/md4-tests (License): Likewise.
12801
12802         * modules/md2-tests (License): Likewise.
12803
12804 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12805
12806         Sync from coreutils:
12807
12808         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
12809         * modules/lib-ignore: New file.
12810         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
12811         chdir-safer.m4, lchmod.m4.
12812         * modules/openat: Add mkdirat.c, openat-priv.h.
12813
12814 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12815
12816         Sync from coreutils.
12817         * m4/lib-ignore.m4: New file.
12818         * m4/lchmod.m4: New file.
12819
12820 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12821
12822         Sync from coreutils.
12823         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
12824         for write access: POSIX says that must fail.
12825         * lib/fts.c (diropen): Likewise.
12826         * lib/save-cwd.c (save_cwd): Likewise.
12827         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
12828         well, for minor improvements on hosts that lack O_DIRECTORY.
12829         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
12830         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
12831         Fall back on chown if open failed with EACCES.
12832
12833         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
12834         Report an error at compile-time if only a 1-second nominal clock
12835         resolution is found.
12836
12837         * lib/lchmod.h: New file.
12838         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
12839         (make_dir_parents): Use lchown rather than chown, and
12840         lchmod rather than chmod.
12841
12842         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
12843         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
12844         "proc" reported by n0dalus.
12845
12846         * lib/mountlist.c: Include <limits.h>.
12847         (dev_from_mount_options)
12848         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
12849         New function.  It no longer assumes "dev=" has the System V meaning
12850         on Linux (since it doesn't).  It also parses "dev=" more carefully.
12851         (read_file_system_list)
12852         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
12853         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
12854         dev= in that case.
12855
12856         * lib/posixtm.h (PDS_PRE_2000): New macro.
12857         * lib/posixtm.c (year): Arg is now syntax_bits rather than
12858         allow_century.  All usages changed.  Reject dates outside the range
12859         1969-1999 if PDS_PRE_2000 is used.
12860
12861 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
12862
12863         Sync from coreutils.
12864         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
12865         (Time of day items): Mention the possibility of leap seconds.
12866         Problem reported by Dr. David Alan Gilbert.
12867
12868 2006-01-09  Jim Meyering  <jim@meyering.net>
12869
12870         Sync from coreutils.
12871
12872         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
12873
12874         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
12875
12876         * lib/modechange.c (mode_compile): Reject an invalid mode string
12877         that starts with an octal digit.  From Andreas Gruenbacher.
12878
12879         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
12880         and dup to open_safer and dup_safer, respectively.
12881         (openat_permissive): Fix typo in comment.
12882
12883         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
12884         "gettext.h"; either no longer needed or are guaranteed by openat.h.
12885         (_): Remove; no longer needed.
12886         (openat): Renamed from rpl_openat; no need for rpl_openat
12887         since openat.h renames openat for us.
12888         Replace most of the body with a call to openat_permissive,
12889         to avoid duplicate code.
12890         Port to (probably hypothetical) environments were mode_t is
12891         wider than int.
12892         (openat_permissive): Require mode arg, so that we can check
12893         types better.  Put it just after flags.  Change cwd failure
12894         indicator from pointer-to-bool to pointer-to-errno-value.
12895         All callers changed.
12896         Invoke openat_save_fail and/or openat_restore_fail if
12897         cwd_errno is null, so that openat can call us.
12898         (openat_permissive, fdopendir, fstatat, unlinkat):
12899         Simplify errno handling to avoid some duplicate code,
12900         as it's OK to set errno on success.
12901         * lib/openat.h: Revamp code so that function macros depend on
12902         __OPENAT_PREFIX only, not also on AT_FDCWD.
12903         (openat_ro): Remove.  Caller changed to use openat_permissive.
12904         (openat_permissive): Now a macro, if not a function.
12905         (openat_restore_fail, openat_save_fail): Now always functions,
12906         since mkdirat needs them even if __OPENAT_PREFIX is defined.
12907
12908         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
12909         and openat.c.
12910         * lib/mkdirat.c: Include openat-priv.h.
12911         Remove definitions of macros defined therein.
12912         * lib/openat.c: Likewise.
12913
12914         * lib/mkdirat.c (mkdirat): New file and function.
12915         * lib/openat.h (mkdirat): Declare.
12916
12917         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
12918
12919         * lib/openat.h (openat_permissive): Declare.
12920         (openat_ro): Define.
12921
12922         * lib/openat.c (EXPECTED_ERRNO): New macro.
12923         (openat_permissive): New function -- used in remove.c rewrite.
12924         (all functions): Set errno just before returning, only if there
12925         was an actual failure.
12926         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
12927
12928         Emulate openat-family functions using Linux's procfs, if possible.
12929         Idea and some code based on Ulrich Drepper's glibc changes.
12930
12931         * lib/openat.c: (BUILD_PROC_NAME): New macro.
12932         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
12933         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
12934         before falling back on save_cwd and restore_cwd.
12935         (fdopendir, fstatat, unlinkat): Likewise.
12936
12937         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
12938         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
12939
12940         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
12941         as second argument to va_arg.  Otherwise, some versions of gcc
12942         warn that `if this code is reached, the program will abort'.
12943
12944 2006-01-09  Jim Meyering  <jim@meyering.net>
12945
12946         Sync from coreutils.
12947         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
12948         Require openat-priv.h.
12949
12950 2006-01-09  Bruno Haible  <bruno@clisp.org>
12951
12952         * modules/strnlen (Include): Use strnlen.h.
12953
12954 2006-01-09  Bruno Haible  <bruno@clisp.org>
12955
12956         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
12957
12958 2006-01-09  Bruno Haible  <bruno@clisp.org>
12959
12960         * lib/sysexit_.h (EX_OK): New macro.
12961         Suggested by Martin Lambers <marlam@marlam.de>.
12962
12963 2006-01-09  Bruno Haible  <bruno@clisp.org>
12964
12965         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
12966         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
12967
12968 2006-01-09  Bruno Haible  <bruno@clisp.org>
12969
12970         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
12971         numbers.
12972
12973 2006-01-09  Bruno Haible  <bruno@clisp.org>
12974
12975         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
12976         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
12977         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
12978         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
12979
12980 2006-01-09  Bruno Haible  <bruno@clisp.org>
12981
12982         * build-aux/javacomp.sh.in: New file, moved from lib/.
12983         * modules/javacomp-script (Files): Update.
12984         (configure.ac): Add AC_CONFIG_FILES invocation.
12985         (EXTRA_DIST): Remove variable.
12986
12987         * build-aux/javaexec.sh.in: New file, moved from lib/.
12988         * modules/javaexec (Files): Update.
12989         (configure.ac): Add AC_CONFIG_FILES invocation.
12990         (EXTRA_DIST): Remove javaexec.sh.in.
12991
12992         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
12993         * modules/csharpcomp-script (Files): Update.
12994         (configure.ac): Add AC_CONFIG_FILES invocation.
12995         (EXTRA_DIST): Remove variable.
12996
12997         * build-aux/csharpexec.sh.in: New file, moved from lib/.
12998         * modules/csharpexec (Files): Update.
12999         (configure.ac): Add AC_CONFIG_FILES invocation.
13000         (EXTRA_DIST): Remove csharpexec.sh.in.
13001
13002 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
13003
13004         Sync from coreutils.
13005
13006         Add POSIX ACL support
13007         * lib/acl.h (copy_acl, set_acl): Add declarations.
13008         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
13009         systems other than Linux.
13010         (chmod_or_fchmod): New function: use fchmod when possible,
13011         and chmod otherwise.
13012         (file_has_acl): Add a POSIX ACL implementation, with a
13013         Linux-specific subcase.
13014         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
13015         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
13016         acls are unsupported.
13017         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
13018         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
13019         are unsupported.
13020
13021 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
13022
13023         Sync from coreutils.
13024         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
13025
13026 2006-01-07  Bruno Haible  <bruno@clisp.org>
13027
13028         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
13029         gl_EARLY.
13030
13031 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13032
13033         * lib/strftime.c (tzname): Don't declare if it is already #defined.
13034         Problem reported for Mingw by Mark Junker.
13035
13036 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13037
13038         * README: Gnulib normally doesn't generate a tarball.
13039
13040 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
13041
13042         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
13043         long int, not int, for nanosecond counts, so that people who are
13044         used to POSIX struct timespec won't be surprised.  Reported by Jim
13045         Meyering.
13046
13047 2005-12-28  Bruno Haible  <bruno@clisp.org>
13048
13049         * build-aux/config.rpath: Update from GNU gettext.
13050
13051 2005-12-16  Jim Meyering  <jim@meyering.net>
13052
13053         * modules/fprintftime: New module.
13054         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
13055
13056 2005-12-16  Jim Meyering  <jim@meyering.net>
13057
13058         * m4/fprintftime.m4: New file.
13059
13060 2005-12-16  Jim Meyering  <jim@meyering.net>
13061
13062         * lib/fprintftime.c, lib/fprintftime.h: New files.
13063
13064 2005-12-15  Simon Josefsson  <jas@extundo.com>
13065
13066         * modules/socklen (configure.ac): Fix M4 macro name, to align with
13067         new m4/socklen.m4.
13068
13069 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13070
13071         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
13072         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
13073
13074 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
13075
13076         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
13077         * lib/argp-help.c (fill_in_uparams): Check if the constructed
13078         struct uparams is valid. Fall back to the default values if it is
13079         not.
13080
13081 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13082
13083         * modules/argp (Files): Add argp-pin.c
13084         (Depends-on): dirname
13085         (lib_SOURCES): Add argp-pin.c
13086
13087 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13088
13089         * m4/argp.m4:  Check if program_invocation_name and
13090         program_invocation_short_name are declared and define appropriate
13091         macros if they are not.
13092
13093 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13094
13095         * lib/argp-help.c (__argp_base_name): New function
13096         (__argp_short_program_name): Rewrite using __argp_base_name
13097         * lib/argp-namefrob.h: Define program_invocation_name and
13098         program_invocation_short_name if requested
13099         (__argp_base_name): Add prototype
13100         * lib/argp-parse.c (argp_def): Use gettext wrappers
13101         (argp_default_parser): Use __argp_base_name
13102         * lib/argp-pin.c: New file. Defines program_invocation_name and
13103         program_invocation_short_name on systems that lack them.
13104
13105 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13106
13107         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
13108         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
13109         porting problem reported by Georg Schwarz in
13110         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
13111
13112 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13113
13114         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
13115         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
13116         porting problem reported by Georg Schwarz in
13117         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
13118
13119 2005-12-05  Bruno Haible  <bruno@clisp.org>
13120
13121         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
13122         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
13123         Reported by Mark Junker <mjscod@gmx.de>.
13124
13125 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
13126
13127         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
13128         Use implementation from Albert Chin, with some
13129         comments/corrections by Stepan Kasal and myself.
13130
13131 2005-12-02  Bruno Haible  <bruno@clisp.org>
13132
13133         * gnulib-tool (func_import): Accept GPLed build tool modules when
13134         --lgpl is given.
13135         * modules/csharpcomp-script: New file.
13136         * modules/csharpcomp: Depend on it.
13137         * modules/javacomp-script: New file.
13138         * modules/javacomp: Depend on it.
13139         Suggested by Simon Josefsson.
13140
13141 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
13142
13143         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
13144         statement, to work around an HP-UX 10.20 compiler bug reported by
13145         Peter O'Gorman.
13146
13147 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
13148
13149         * modules/savedir (Depends-on): Add openat.
13150
13151 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
13152
13153         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
13154         (uintmax_t) [defined uintmax_t]: Do not declare.
13155         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
13156         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
13157         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
13158         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
13159         sake of portability to weird hosts that C allows (though we don't
13160         know of any practical examples).
13161
13162         * lib/savedir.h (fdsavedir): New decl.
13163         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
13164         contains most of the former guts of savedir.
13165         (savedir): Use savedirstream.
13166         Include "openat.h".
13167
13168 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13169
13170         * modules/obstack (Files): Add m4/ulonglong.m4.
13171         Problem reported by Davide Angelocola.
13172
13173 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
13174
13175         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
13176         coreutils no longer futzes with rounding modes.
13177
13178 2005-11-14  Jim Meyering  <jim@meyering.net>
13179
13180         * lib/mkstemp-safer.c: Include <config.h>, required for possible
13181         replacement of mkstemp.
13182
13183 2005-11-10  Simon Josefsson  <jas@extundo.com>
13184
13185         * lib/readline.c: Remove EOL.
13186
13187 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13188
13189         * modules/gethrxtime (Depends-on): Add gettime.
13190
13191 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13192
13193         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
13194         or gettimeofday; no longer needed.
13195
13196 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13197
13198         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
13199         time business.
13200         (gethrxtime) [! (HAVE_NANOUPTIME
13201         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
13202         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
13203         our own approximation.
13204
13205 2005-11-08  Eric Blake  <ebb9@byu.net>
13206
13207         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
13208
13209 2005-11-08  Eric Blake  <ebb9@byu.net>
13210
13211         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
13212
13213 2005-11-04  Bruno Haible  <bruno@clisp.org>
13214
13215         * gnulib-tool: Implement --update mode.
13216
13217 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13218
13219         Fix porting problem reported by Theodoros V. Kalamatianos.
13220         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
13221         Don't assume that futimes failing means we must fail.
13222
13223 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13224
13225         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
13226         variables to suggest the intended function of the PATH_MAX check.
13227
13228 2005-10-30  Kean Johnston  <jkj@sco.com>
13229
13230         Trivial changes to support SCO systems.
13231         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
13232         as PATH_MAX.
13233         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
13234         where __ptr is null when no I/O is pending.
13235
13236 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13237
13238         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
13239         leave errno alone.  Problem reported by Dmitry V. Levin.
13240
13241 2005-10-28  Simon Josefsson  <jas@extundo.com>
13242
13243         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
13244         Test more.
13245
13246         * tests/test-gc-md2.c, tests/test-md2.c: New files.
13247
13248         * modules/md2, modules/md2-tests: New files.
13249
13250 2005-10-28  Simon Josefsson  <jas@extundo.com>
13251
13252         * m4/inet_ntop.m4: More tests.
13253
13254         * m4/gc-md2.m4, md2.m4: New file.
13255
13256 2005-10-28  Simon Josefsson  <jas@extundo.com>
13257
13258         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
13259         "restrict" keywords, as per POSIX.  Protect the function
13260         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
13261         Don't use K&R prototypes.  Check the sprintf return values.
13262         Re-define EAFNOSUPPORT if not present.  Indent.
13263
13264         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
13265         suggested by Bruno Haible <bruno@clisp.org>.
13266
13267         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
13268
13269         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
13270
13271         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
13272         libgcrypt).
13273
13274         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
13275
13276         * lib/md2.h, lib/md2.c: New files.
13277
13278 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
13279
13280         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
13281         errno alone.  Problem reported by Frederic Jolliton.
13282
13283 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
13284
13285         * modules/verify (License): Change from GPL to LGPL.  This is a
13286         tiny module and there are apparently near-equivalents that are
13287         under the BSD license.
13288
13289 2005-10-24  Simon Josefsson  <jas@extundo.com>
13290
13291         * modules/sha1: Relicense to LGPL.
13292
13293 2005-10-24  Simon Josefsson  <jas@extundo.com>
13294
13295         * lib/md4.h: Shrink buffer size, now that we changed the type.
13296
13297 2005-10-23  Simon Josefsson  <jas@extundo.com>
13298
13299         * gnulib-tool (func_import): Fix --tests-base.
13300
13301 2005-10-22  Simon Josefsson  <jas@extundo.com>
13302
13303         * modules/arcfour (Depends-on): Need stdint.
13304
13305 2005-10-22  Simon Josefsson  <jas@extundo.com>
13306
13307         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
13308         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
13309
13310 2005-10-22  Simon Josefsson  <jas@extundo.com>
13311
13312         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
13313         suggested by Bruno Haible <bruno@clisp.org>.
13314
13315 2005-10-22  Simon Josefsson  <jas@extundo.com>
13316
13317         * lib/crc.h: Include stddef.h, for size_t.
13318
13319 2005-10-22  Simon Josefsson  <jas@extundo.com>
13320
13321         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
13322         arcfour_context struct (simplify test vector testing in GNU
13323         Shishi).
13324
13325 2005-10-21  Simon Josefsson  <jas@extundo.com>
13326
13327         * modules/des, modules/des-tests: New files.
13328
13329         * modules/gc-des, modules/gc-des-tests: New files.
13330
13331         * tests/test-des.c, tests/test-gc-des.c: New file.
13332
13333 2005-10-21  Simon Josefsson  <jas@extundo.com>
13334
13335         * modules/arctwo, modules/arctwo-tests: New files.
13336
13337         * tests/test-arctwo.c: New file.
13338
13339         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
13340
13341         * tests/test-gc-arctwo.c: New file.
13342
13343 2005-10-21  Simon Josefsson  <jas@extundo.com>
13344
13345         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
13346         Bruno Haible <bruno@clisp.org>.
13347
13348         * m4/gc-des.m4: New file.
13349
13350 2005-10-21  Simon Josefsson  <jas@extundo.com>
13351
13352         * m4/arctwo.m4: New file.
13353
13354         * m4/gc-arctwo.m4: New file.
13355
13356 2005-10-21  Simon Josefsson  <jas@extundo.com>
13357
13358         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
13359         block.
13360
13361 2005-10-21  Simon Josefsson  <jas@extundo.com>
13362
13363         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
13364         <bruno@clisp.org>.
13365
13366         * lib/hmac-sha1.c (hmac_sha1): Likewise.
13367
13368         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
13369         Bruno Haible <bruno@clisp.org>.
13370
13371         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
13372         <bruno@clisp.org>.
13373
13374 2005-10-21  Simon Josefsson  <jas@extundo.com>
13375
13376         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
13377
13378 2005-10-21  Simon Josefsson  <jas@extundo.com>
13379
13380         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
13381
13382 2005-10-21  Simon Josefsson  <jas@extundo.com>
13383
13384         * lib/des.h, lib/des.c: New files.
13385
13386         * lib/gc-gnulib.c: Support DES.c
13387
13388 2005-10-21  Simon Josefsson  <jas@extundo.com>
13389
13390         * lib/arctwo.h, lib/arctwo.c: New files.
13391
13392         * lib/gc-gnulib.c: Support ARCTWO.
13393
13394 2005-10-21  Simon Josefsson  <jas@extundo.com>
13395
13396         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
13397         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13398
13399 2005-10-21  Simon Josefsson  <jas@extundo.com>
13400
13401         * gnulib-tool (func_import, func_create_testdir): Define automake
13402         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
13403         Makefile.am snippet),
13404         suggested by Bruno Haible <bruno@clisp.org>.
13405
13406         * modules/gc (Makefile.am): Use it.
13407
13408 2005-10-21  Bruno Haible  <bruno@clisp.org>
13409
13410         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
13411         patch.
13412
13413 2005-10-19  Simon Josefsson  <jas@extundo.com>
13414
13415         * tests/test-gc-rijndael.c: New file.
13416
13417         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
13418
13419 2005-10-19  Simon Josefsson  <jas@extundo.com>
13420
13421         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
13422         interface too.
13423
13424 2005-10-19  Simon Josefsson  <jas@extundo.com>
13425
13426         * tests/test-gc-arcfour.c: New file.
13427
13428         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
13429
13430 2005-10-19  Simon Josefsson  <jas@extundo.com>
13431
13432         * modules/gc-md4, modules/gc-md4-tests: New file.
13433
13434         * tests/test-gc-md4.c: New file.
13435
13436 2005-10-19  Simon Josefsson  <jas@extundo.com>
13437
13438         * m4/gc-md4.m4: New file.
13439
13440 2005-10-19  Simon Josefsson  <jas@extundo.com>
13441
13442         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
13443         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
13444         <kasal@ucw.cz>.
13445
13446 2005-10-19  Simon Josefsson  <jas@extundo.com>
13447
13448         * m4/gc-arcfour.m4: New file.
13449
13450         * m4/gc-rijndael.m4: New file.
13451
13452 2005-10-19  Simon Josefsson  <jas@extundo.com>
13453
13454         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
13455
13456 2005-10-19  Simon Josefsson  <jas@extundo.com>
13457
13458         * lib/gc-gnulib.c: Support ARCFOUR.
13459
13460 2005-10-19  Simon Josefsson  <jas@extundo.com>
13461
13462         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
13463         support.
13464
13465         * lib/gc.h: Add ECB enum type.
13466
13467         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
13468
13469 2005-10-18  Simon Josefsson  <jas@extundo.com>
13470
13471         * tests/test-md5.c: New file.
13472
13473         * modules/md5-tests: New file.
13474
13475 2005-10-18  Simon Josefsson  <jas@extundo.com>
13476
13477         * tests/test-md4.c: New file.
13478
13479         * modules/md4, modules/md4-tests: New files.
13480
13481 2005-10-18  Simon Josefsson  <jas@extundo.com>
13482
13483         * m4/md4.m4: New file.
13484
13485 2005-10-18  Simon Josefsson  <jas@extundo.com>
13486
13487         * lib/md4.h, lib/md4.c: New files, based on md5.?.
13488
13489 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
13490
13491         * gnulib-tool (func_create_testdir): Omit the second check whether
13492         BUILT_SOURCES in nonempty.
13493
13494 2005-10-17  Simon Josefsson  <jas@extundo.com>
13495
13496         * tests/test-rijndael.c: New file.
13497
13498 2005-10-17  Simon Josefsson  <jas@extundo.com>
13499
13500         * modules/sha1: Depend on stdint instead of md5.
13501
13502         * modules/md5: Depend on stdint, remove uint32_t.
13503
13504 2005-10-17  Simon Josefsson  <jas@extundo.com>
13505
13506         * modules/gc-sha1-tests: New file.
13507
13508         * tests/test-gc-sha1.c: New file.
13509
13510 2005-10-17  Simon Josefsson  <jas@extundo.com>
13511
13512         * m4/md5.m4: Remove call to uint32_t.m4.
13513
13514 2005-10-17  Simon Josefsson  <jas@extundo.com>
13515
13516         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
13517
13518         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
13519         md5.h.
13520
13521         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
13522
13523         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
13524
13525 2005-10-17  Simon Josefsson  <jas@extundo.com>
13526
13527         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
13528
13529 2005-10-17  Simon Josefsson  <jas@extundo.com>
13530
13531         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
13532
13533 2005-10-17  Simon Josefsson  <jas@extundo.com>
13534
13535         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
13536
13537         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
13538
13539 2005-10-17  Bruno Haible  <bruno@clisp.org>
13540
13541         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
13542         that it can also be used in a test.
13543
13544 2005-10-16  Bruno Haible  <bruno@clisp.org>
13545
13546         * gnulib-tool (func_emit_tests_Makefile_am): Also define
13547         TESTS_ENVIRONMENT, so that individual tests can augment it.
13548
13549         * gnulib-tool (func_create_testdir): Use an intermediate target for
13550         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
13551         macros, like $(ALLOCA_H), which cannot be passed through the command
13552         line.
13553
13554 2005-10-15  Simon Josefsson  <jas@extundo.com>
13555
13556         * modules/rijndael-tests: New file.
13557
13558         * modules/rijndael: New file.
13559
13560 2005-10-15  Simon Josefsson  <jas@extundo.com>
13561
13562         * m4/rijndael.m4: New file.
13563
13564 2005-10-15  Simon Josefsson  <jas@extundo.com>
13565
13566         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
13567
13568         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
13569
13570 2005-10-14  Simon Josefsson  <jas@extundo.com>
13571
13572         * tests/test-arcfour.c: New file.
13573
13574         * modules/arcfour, modules/arcfour-tests: New files.
13575
13576 2005-10-14  Simon Josefsson  <jas@extundo.com>
13577
13578         * m4/arcfour.m4: New file.
13579
13580 2005-10-14  Simon Josefsson  <jas@extundo.com>
13581
13582         * lib/arcfour.h, lib/arcfour.c: New files.
13583
13584 2005-10-14  Roland McGrath  <roland@redhat.com>
13585
13586         Import from libc.  [BZ #1331]
13587         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
13588         macro argument.
13589         Reported by Matej Vela <vela@debian.org>.
13590
13591 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
13592
13593         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
13594         include <wchar.h>; no longer needed.
13595
13596 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
13597
13598         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
13599
13600 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
13601         and  Ulrich Drepper  <drepper@redhat.com>
13602
13603         Import from libc.
13604         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
13605         instead of inline stream orientation test and two separate
13606         function calls.  Pay no attention to USE_IN_LIBIO.
13607
13608 2005-10-13  Simon Josefsson  <jas@extundo.com>
13609
13610         * modules/gc-hmac-md5-tests: New file.
13611
13612         * tests/test-gc-hmac-sha1.c: New file.
13613
13614         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
13615
13616         * modules/gc-hmac-md5-tests: New file.
13617
13618         * tests/test-gc-md5.c: New file.
13619
13620         * modules/gc-md5-tests: New file.
13621
13622 2005-10-13  Simon Josefsson  <jas@extundo.com>
13623
13624         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
13625         Move memory allocation outside of loop.
13626
13627 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
13628
13629         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
13630         intermediate directory is in a read-only file system.  Problem
13631         reported by Eric Blake.
13632
13633 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
13634
13635         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
13636
13637 2005-10-12  Simon Josefsson  <jas@extundo.com>
13638
13639         * tests/test-hmac-sha1.c: New file.
13640
13641         * modules/hmac-sha1-tests: New file.
13642
13643         * modules/hmac-sha1: New file.
13644
13645 2005-10-12  Simon Josefsson  <jas@extundo.com>
13646
13647         * modules/gc-sha1: New file.
13648
13649 2005-10-12  Simon Josefsson  <jas@extundo.com>
13650
13651         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
13652
13653         * tests/test-gc-pbkdf2-sha1.c: New file.
13654
13655 2005-10-12  Simon Josefsson  <jas@extundo.com>
13656
13657         * modules/gc-md5, modules/gc-hmac-md5: New files.
13658
13659         * modules/gc (Files): Remove md5, memxor and hmac files.
13660
13661 2005-10-12  Simon Josefsson  <jas@extundo.com>
13662
13663         * m4/gc-pbkdf2-sha1.m4: New file.
13664
13665         * m4/gc-hmac-sha1.m4: New file.
13666
13667         * m4/gc-sha1: New file.
13668
13669         * m4/hmac-sha1.m4: New file.
13670
13671 2005-10-12  Simon Josefsson  <jas@extundo.com>
13672
13673         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
13674
13675         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
13676
13677 2005-10-12  Simon Josefsson  <jas@extundo.com>
13678
13679         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
13680         suggested by Bruno Haible <bruno@clisp.org>.
13681
13682 2005-10-12  Simon Josefsson  <jas@extundo.com>
13683
13684         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
13685
13686 2005-10-12  Simon Josefsson  <jas@extundo.com>
13687
13688         * lib/gc-pbkdf2-sha1.c: New file.
13689
13690         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
13691
13692 2005-10-12  Simon Josefsson  <jas@extundo.com>
13693
13694         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
13695
13696         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
13697
13698 2005-10-12  Simon Josefsson  <jas@extundo.com>
13699
13700         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
13701         GC_USE_HMAC_MD5, respectively.
13702
13703         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
13704         (gc_md5): Fix typo.
13705
13706         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
13707
13708         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
13709
13710         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
13711
13712 2005-10-12  Bruno Haible  <bruno@clisp.org>
13713
13714         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
13715         Reported by Stepan Kasal <kasal@ucw.cz>.
13716
13717 2005-10-11  Simon Josefsson  <jas@extundo.com>
13718
13719         * tests/test-crc.c: New file.
13720
13721         * modules/crc, modules/crc-tests: New files.
13722
13723 2005-10-11  Simon Josefsson  <jas@extundo.com>
13724
13725         * m4/crc.m4: New file.
13726
13727 2005-10-11  Simon Josefsson  <jas@extundo.com>
13728
13729         * lib/gc.h: Add gc_hash and gc_hash_buffer.
13730
13731         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
13732
13733         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
13734
13735 2005-10-11  Simon Josefsson  <jas@extundo.com>
13736
13737         * lib/crc.h, lib/crc.c: New files.
13738
13739         * lib/gc.h (gc_hash_buffer): Add doc.
13740
13741 2005-10-11  Bruno Haible  <bruno@clisp.org>
13742
13743         * modules/c-strcasestr: New file.
13744         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
13745
13746 2005-10-11  Bruno Haible  <bruno@clisp.org>
13747
13748         * modules/c-strcase: New file.
13749         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
13750
13751 2005-10-11  Bruno Haible  <bruno@clisp.org>
13752
13753         * lib/strcasecmp.c: Include limits.h.
13754         (strcasecmp): Avoid integer overflow on exotic platforms.
13755         * lib/strncasecmp.c: Include limits.h.
13756         (strncasecmp): Avoid integer overflow on exotic platforms.
13757         Reported by Paul Eggert.
13758
13759 2005-10-11  Bruno Haible  <bruno@clisp.org>
13760
13761         * lib/c-strcasestr.h: New file, from GNU gettext.
13762         * lib/c-strcasestr.c: New file, from GNU gettext.
13763
13764 2005-10-11  Bruno Haible  <bruno@clisp.org>
13765
13766         * lib/c-strcase.h: New file, from GNU gettext.
13767         * lib/c-strcasecmp.c: New file, from GNU gettext.
13768         * lib/c-strncasecmp.c: New file, from GNU gettext.
13769
13770 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13771
13772         * modules/mempcpy (License): GPL -> LGPL.
13773         * modules/strchrnul (License): Likewise.
13774         * modules/sysexits (License): Likewise.
13775
13776 2005-10-08  Simon Josefsson  <jas@extundo.com>
13777
13778         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
13779
13780 2005-10-07  Simon Josefsson  <jas@extundo.com>
13781
13782         * m4/memxor.m4: Remove gl_C_RESTRICT call.
13783
13784 2005-10-06  Simon Josefsson  <jas@extundo.com>
13785
13786         * tests/test-hmac-md5.c: New file.
13787
13788         * modules/hmac-md5-tests: New file.
13789
13790         * modules/hmac-md5: New file.
13791
13792 2005-10-06  Simon Josefsson  <jas@extundo.com>
13793
13794         * m4/hmac-md5.m4: New file.
13795
13796         * m4/memxor.m4: Require gl_C_RESTRICT.
13797
13798 2005-10-06  Simon Josefsson  <jas@extundo.com>
13799
13800         * lib/memxor.c (memxor): Avoid casts and warnings.
13801
13802 2005-10-06  Simon Josefsson  <jas@extundo.com>
13803
13804         * lib/hmac-md5.c: New file.
13805
13806         * lib/hmac.h: New file.
13807
13808 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
13809
13810         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
13811         promotes to int, not unsigned int, to catch the AIX 5.3
13812         compiler bug.
13813
13814 2005-10-05  Simon Josefsson  <jas@extundo.com>
13815
13816         * modules/memxor: New file.
13817
13818         * modules/iconv (Files): Move config.rpath to havelib, it is used
13819         there.
13820
13821         * modules/havelib (Files): Add config.rpath.
13822
13823 2005-10-05  Simon Josefsson  <jas@extundo.com>
13824
13825         * m4/memxor.m4: New file.
13826
13827 2005-10-05  Simon Josefsson  <jas@extundo.com>
13828
13829         * lib/memxor.c (memxor): Fix compiler error.
13830
13831         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
13832         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
13833
13834         * lib/memxor.h, lib/memxor.c: New files.
13835
13836         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
13837         we assume all systems have it, suggested by Jim Meyering
13838         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
13839         any systems lack sys/socket.h; mingw32 is known to lack it, but we
13840         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
13841         same reasons.
13842
13843 2005-10-05  Simon Josefsson  <jas@extundo.com>
13844
13845         * config/srclist.txt: Add glibc bug 1423 for md5.h.
13846
13847 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
13848
13849         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
13850         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
13851         needed, since the source code now assumes these .h files.
13852
13853 2005-10-05  Derek Price  <derek@ximbiot.com>
13854
13855         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
13856
13857 2005-10-05  Bruno Haible  <bruno@clisp.org>
13858
13859         * modules/stdint (License): Change to LGPL.
13860
13861 2005-10-04  Simon Josefsson  <jas@extundo.com>
13862
13863         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
13864         D. Baushke" <mdb@gnu.org>.
13865
13866 2005-10-04  Bruno Haible  <bruno@clisp.org>
13867
13868         * lib/verify.h (verify_true): Provide alternative definition for C++.
13869
13870 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
13871
13872         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
13873         (SSIZE_MAX): New macro, if not already defined.
13874         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
13875         than 2 GiB.
13876
13877 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13878
13879         Sync from coreutils.
13880         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
13881         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
13882         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
13883         ULLONG_MAX doesn't work with 2.7.2.1.
13884
13885 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13886
13887         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
13888         From Ben Pfaff.
13889
13890         * modules/exclude (Depends-on): Depend on verify.
13891         * modules/strtoimax (Depends-on): Likewise.
13892         * modules/utimecmp (Depends-on): Likewise.
13893
13894 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
13895
13896         * lib/exclude.c: Include verify.h.
13897         (verify): Remove.  All callers changed to use verify.h's version.
13898         * lib/strtoimax.c: Likewise.
13899         * lib/utimecmp.c: Likewis.e
13900
13901         Sync from coreutils.
13902         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
13903         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
13904         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
13905         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
13906         bother returning ENOSYS if settimeofday or stime fails; just let
13907         them return whatever errno they want to return.
13908         * lib/utimens.c: Include unistd.h, for dup2.
13909         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
13910         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
13911
13912 2005-10-02  Jim Meyering  <jim@meyering.net>
13913
13914         Sync from coreutils.
13915         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
13916         from glibc-2.2.5 that fails for read-only files.
13917
13918 2005-10-02  Jim Meyering  <jim@meyering.net>
13919
13920         Sync from coreutils.
13921         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
13922         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
13923         `#if HAVE_CONFIG_H'.
13924         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
13925         Remove AT_FDCWD test.
13926         Do not consume the fd unless successful.
13927         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
13928         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
13929         block, so that we don't even try to compile it if settimeofday is
13930         available.  This works around a compilation failure on OSF1 V5.1,
13931         due to stime requiring a `long int*' while tv_sec is `int'.
13932
13933 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
13934
13935         Sync from coreutils.
13936         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
13937         against `yes', rather than just testing for nonempty.
13938
13939 2005-10-01  Simon Josefsson  <jas@extundo.com>
13940
13941         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
13942         and Darwin.
13943
13944         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
13945         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
13946         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
13947         freeaddrinfo and gai_strerror are declared by the POSIX headers.
13948         Check if struct addrinfo is declared.
13949
13950 2005-10-01  Simon Josefsson  <jas@extundo.com>
13951
13952         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
13953         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
13954         AI_* and EAI_* definitions.  Protect function declarations.
13955
13956 2005-10-01  Jim Meyering  <jim@meyering.net>
13957
13958         Sync from coreutils.
13959
13960         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
13961         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
13962         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
13963         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
13964         in the inet and nsl libraries.  Required on Solaris 5.7.
13965
13966 2005-10-01  Jim Meyering  <jim@meyering.net>
13967
13968         Sync from coreutils.
13969         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
13970         in the inet and nsl libraries.  Required on Solaris 5.7.
13971
13972 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
13973
13974         * lib/getdelim.c (getdelim): Remove unused variables.
13975
13976 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
13977
13978         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
13979         so that the code works even with ancient cpp.  Portability problem
13980         with GCC 2.7.2.1 reported by Thomas M.Ott.
13981
13982 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
13983
13984         * modules/regex (Depends-on): Add strcase.
13985
13986         * modules/gethostname (Licence): Change from GPL to LGPL, since
13987         gethostname.c is a trivial implementation of a standard library
13988         function.
13989         * modules/poll (License): Change from GPL to LGPL, since it's
13990         derived from LGPL code.
13991
13992 2005-09-27  Jim Meyering  <jim@meyering.net>
13993
13994         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
13995         HAVE_CONFIG_H.
13996
13997         * lib/intprops.h (signed_type_or_expr__): Define.
13998         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
13999         for unsigned types.
14000
14001 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
14002
14003         * lib/verify.h (verify_expr): Remove, replacing with:
14004         (verify_true): New macro that returns true instead of void.
14005         (verify_type__): Remove.
14006         (verify): Use verify_true rather than verify_type__.
14007
14008 2005-09-26  Bruno Haible  <bruno@clisp.org>
14009
14010         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
14011         is necessary.
14012         (lib_SOURCES): Remove mbchar.c.
14013         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
14014         (Files): Add m4/mbrtowc.m4.
14015         * modules/mbiter: Likewise.
14016         * modules/mbuiter: Likewise.
14017
14018 2005-09-26  Bruno Haible  <bruno@clisp.org>
14019
14020         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
14021         compile mbchar.c if they are not both present.
14022         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
14023         * m4/mbiter.m4 (gl_MBITER): Likewise.
14024         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
14025         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
14026         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
14027
14028 2005-09-25  Jim Meyering  <jim@meyering.net>
14029
14030         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
14031         also uses socklen_t.
14032
14033 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
14034
14035         * lib/utimens.c (ENOSYS): Define if not already defined.
14036         (futimens): Support having a null PATH if the file descriptor
14037         is nonnegative.
14038
14039         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
14040         Remove.
14041         (__attribute): Define to empty unless GCC 3.1 or later.
14042         This works around a core dump on OpenBSD 3.4, which has GCC
14043         2.95.3, which dumps core when given __attribute__(()).  It also
14044         simplifies other tests, since we really don't want to bother with
14045         worrying about which ancient version of GCC supported what.
14046         Original problem reported by Yoann Vandoorselaere, with part of
14047         the fix suggested by Derek Price.
14048
14049 2005-09-24  Jim Meyering  <jim@meyering.net>
14050
14051         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
14052         so we can once again use a positive bitfield width of 1 -- now we
14053         don't have to explain why we were using a bitfield width of 2.
14054
14055 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
14056
14057         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
14058         and similarly for the other external symbols.  Problem reported
14059         by James Gallager.
14060
14061         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
14062         bug reported by Jim Meyering.
14063
14064         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
14065         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
14066         not needed, since socklen is a prerequisite module.
14067
14068 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
14069
14070         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
14071         Problem reported by Eric Blake.
14072         (getaddrinfo): Initialize se so that it's not garbage.
14073         Redo internal storage allocation so that it doesn't make unportable
14074         assumptions about alignment.
14075         Fix a memory leak.
14076
14077         * lib/utimens.c (futimens): Use futimesat if available.
14078         Prefer it to futimes since it doesn't have the futimes bug.
14079
14080         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
14081         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
14082         Instead, declare a function that returns a pointer to an array,
14083         and use verify_type__ to declare the size of the array.
14084         Problem and germ of a solution reported by Bruno Haible.
14085         (verify_type__): Use 2, not 1, for bitfield size, to avoid
14086         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
14087
14088 2005-09-23  Jim Meyering  <jim@meyering.net>
14089
14090         Sync from coreutils.
14091         Correct build failure (socklen_t not defined) on at least
14092         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
14093         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
14094
14095 2005-09-23  Jim Meyering  <jim@meyering.net>
14096
14097         * modules/getaddrinfo (Depends-on): Add socklen.
14098
14099 2005-09-23  Bruno Haible  <bruno@clisp.org>
14100
14101         * tests/test-verify.c: New file.
14102
14103 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14104
14105         Sync from coreutils.
14106
14107         * modules/argmatch (Depends-on): Add verify.
14108         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
14109         unistd-safer.
14110         * modules/save-cwd (Depends-on): Likewise.
14111
14112         * modules/openat (Files): Add lib/openat-die.c.
14113         (Depends-on): Remove error, exitfail.
14114         Add dirname.
14115
14116         * modules/verify: New file.
14117         * MODULES.html.sh (Diagnostics <assert.h>): New section,
14118         with "verify" module.
14119
14120 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14121
14122         Sync from coreutils.
14123
14124         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
14125         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
14126         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
14127         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
14128         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
14129         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
14130         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
14131         Don't bother checking for string.h, stdlib.h, unistd.h.
14132         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
14133         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
14134         module's job.
14135         * m4/jm-macros.m4 (gl_MACROS): Likewise.
14136         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
14137
14138         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
14139         (gl_GETDATE): Use it.
14140
14141         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
14142
14143 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14144
14145         Sync from coreutils.
14146
14147         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
14148         stat-time.h.
14149         * lib/argmatch.h: Include verify.h
14150         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
14151         (ARGMATCH_ASSERT): Remove; unused.
14152         * lib/canonicalize.c: Assume STDC_HEADERS.
14153         * lib/exclude.c: Include "strcase.h".
14154         * lib/regex_internal.h [!defined _LIBC]: Likewise.
14155         * lib/getusershell.c: Include stdio--.h rather than stdio.h
14156         and stdio-safer.h.
14157         (getusershell): Call fopen, not fopen_safer.
14158         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
14159         Do not include unistd-safer.h.
14160         (save_cwd): Don't call fd_safer; no longer needed
14161         now that we include fcntl--.h.
14162
14163         * lib/getdate.y (relative_time): New type.
14164         (RELATIVE_TIME_0): New constant.
14165         (parser_control): Use relative_time instead of doing it ourselves.
14166         (%union): Add new relative_time rel member.
14167         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
14168         Now typeless.
14169         (relunit, relunit_snumber): Now of type rel.
14170         (zone, rel, relunit, get_date): Adjust to above changes.
14171
14172         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
14173         Do not include unistd-safer.h.
14174         (getloadavg): Don't call fd_safer; no longer needed
14175         now that we include fcntl--.h.
14176
14177         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
14178         (make_dir_parents): Treat ENOSYS like EEXIST.
14179
14180         Improve quality of diagnostics on restore_cwd failure.
14181         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
14182         (make_dir_parents): Last arg is now int * (for errno), not bool *.
14183         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
14184         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
14185         each time through the loop.  Do not diagnose restore_cwd failure;
14186         that is the caller's job (and perhaps the caller does not care).
14187
14188         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
14189         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
14190         If the file already exists but is not a directory, don't bother
14191         to try to make its parents.
14192         Close potential file descriptor leak if we can't chdir("/") (!).
14193         Don't always return true if chdir($PWD) fails; return true only
14194         if the requested action was done successfully (except for the
14195         chdir($PWD)).
14196         Don't log final directory unless we actually made it.
14197         Refactor to avoid duplicate code to fix up permissions.
14198         Don't attempt to fix up parent permissions if chdir($PWD) fails.
14199
14200         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
14201         to make it a bit faster and (I hope) clearer.
14202         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
14203         Fix bug in formats like %2N.
14204
14205         * lib/verify.h: New file.
14206
14207 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
14208
14209         Sync from coreutils.
14210         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
14211
14212 2005-09-22  Jim Meyering  <jim@meyering.net>
14213
14214         Sync from coreutils.
14215
14216         * m4/lstat.m4 (gl_FUNC_LSTAT):
14217         Use AC_LIBSOURCES to require lstat.c and lstat.h.
14218         Remove obsolete comment.
14219         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
14220         * m4/xstrtod.m4: Likewise.
14221
14222         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
14223
14224 2005-09-22  Jim Meyering  <jim@meyering.net>
14225
14226         Sync from coreutils.
14227
14228         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
14229
14230         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
14231         the .tm_year member, since otherwise gcc-4.0 would now warn about
14232         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
14233
14234         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
14235         order to avoid an unsuppressible warning from gcc on 64-bit systems.
14236
14237         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
14238         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
14239         when run in a time zone for which daylight savings time is in effect
14240         for the starting date.
14241
14242         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
14243         stop us from restricting permissions of just-created absolute-named
14244         directories.
14245         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
14246         to restore initial working directory.
14247         * lib/mkdir-p.c (make_dir_parents): New parameter:
14248         different_working_dir, to tell caller if/when we change the working
14249         directory and are unable to return to the initial one.
14250         * lib/mkdir-p.h (make_dir_parents): Update prototype.
14251         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
14252         `return false'.  This fixes a bug introduced on 2004-07-30.
14253
14254         * lib/openat.c (fdopendir): Be sure to close the supplied
14255         file descriptor before returning.  This makes our replacement
14256         implementation a little closer to Solaris's, where fdopendir
14257         ties the file descriptor to the returned DIR* pointer.
14258         * lib/openat.c (unlinkat): New function.
14259         * lib/openat.h (unlinkat): Add prototype.
14260         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
14261         (openat_restore_fail): Rename from openat_restore_die.
14262         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
14263
14264         Provide an alternative to exiting immediately upon save_cwd or
14265         restore_cwd failure.  Now, an application can arrange e.g.,
14266         to perform a longjump in that case.
14267         * lib/openat.c: Include dirname.h.
14268         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
14269         (rpl_openat, fdopendir, fstatat): Call openat_save_die
14270         and openat_restore_die rather than calling error directly.
14271         Don't include "error.h" or "exitfail.h"; they're no longer needed.
14272
14273         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
14274         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
14275         define.
14276
14277         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
14278         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
14279                             int utc, int nanoseconds);
14280         Background:
14281         date should not have to allocate a megabyte of virtual memory to
14282         handle a format argument like +%1048575T.  When implemented with
14283         strftime, it must allocate such a buffer, use strftime to fill it
14284         in, print it, then free it.
14285         With fprintftime, it simply prints everything and exits.
14286         With no need for memory allocation, that's one fewer way to fail.
14287         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
14288         optional field width, not before, so we accept %9:z, not %:9z.
14289         (my_strftime): Be sure to use L_('x') for literals.
14290
14291         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
14292         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
14293         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
14294         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
14295         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
14296         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
14297         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
14298         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
14299         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
14300         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
14301         * lib/xgethostname.c, lib/xreadlink.c:
14302         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
14303
14304         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
14305         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
14306         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
14307         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
14308         and don't include <sys/file.h>).
14309
14310 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
14311
14312         Sync from coreutils.
14313
14314         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
14315         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
14316         [!LDAV_DONE]: Avoid unused variable warning.
14317
14318 2005-09-21  Bruno Haible  <bruno@clisp.org>
14319
14320         * lib/unicodeio.h (unicode_to_mb): New declaration.
14321
14322 2005-09-20  Derek Price  <derek@ximbiot.com>
14323
14324         * lib/getaddrinfo.c: Don't include <netdb.h> included from
14325         getaddrinfo.h.
14326
14327 2005-09-20  Bruno Haible  <bruno@clisp.org>
14328
14329         * gnulib-tool: Remove trailing slashes from the values specified for
14330         --source-base, --m4-base, --tests-base, --aux-dir.
14331         Suggested by Simon Josefsson <jas@extundo.com>.
14332
14333 2005-09-20  Bruno Haible  <bruno@clisp.org>
14334
14335         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
14336         func_modules_to_filelist, func_import, func_create_testdir): Make all
14337         sorting results locale-independent, so that gnulib-cache.m4 doesn't
14338         change when gnulib-tool is invoked in a different locale.
14339
14340 2005-09-19  Simon Josefsson  <jas@extundo.com>
14341
14342         * m4/socklen.m4: Fix typo.
14343
14344 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14345
14346         Use a consistent style for including <config.h>.
14347         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
14348         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
14349         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
14350         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
14351         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
14352         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
14353         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
14354         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
14355         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
14356         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
14357         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
14358         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
14359         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
14360         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
14361         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
14362         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
14363         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
14364         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
14365         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
14366         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
14367         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
14368         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
14369         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
14370         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
14371         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
14372         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
14373         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
14374         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
14375         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
14376         lib/xstrtoumax.c, lib/yesno.c:
14377         Standardize inclusion of config.h.
14378         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
14379         lib/inttostr.h:  Removed inclusion of config.h from header files.
14380         * lib/inttostr.c:  Adjusted in-tree users.
14381         * lib/timespec.h: Remove superfluous warning to include config.h.
14382         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
14383         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
14384         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
14385         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
14386         config.h with HAVE_CONFIG_H.
14387
14388 2005-09-19  Jim Meyering  <jim@meyering.net>
14389
14390         * modules/pathmax (License): Change to LGPL.
14391
14392 2005-09-19  Derek Price  <derek@ximbiot.com>
14393
14394         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
14395
14396 2005-09-19  Bruno Haible  <bruno@clisp.org>
14397
14398         * gnulib-tool (import): Provide default for --tests-base.
14399
14400 2005-09-19  Bruno Haible  <bruno@clisp.org>
14401
14402         * doc/quote.texi: New file, extracted from gnulib.texi.
14403         * doc/ctime.texi: New file, extracted from gnulib.texi.
14404         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
14405         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
14406         * doc/gnulib.texi: Include them.
14407
14408 2005-09-18  Bruno Haible  <bruno@clisp.org>
14409
14410         Portability fix.
14411         * gnulib-tool (func_readlink): New function.
14412         (func_ln_if_changed): Use it.
14413
14414 2005-09-18  Bruno Haible  <bruno@clisp.org>
14415
14416         * gnulib-tool: Support --with-tests also with --import.
14417         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
14418         (func_import): Use variables $testsbase and $inctests. Emit a
14419         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
14420         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
14421         SUBDIRS += $testsdir.
14422         (func_create_testdir): Update.
14423
14424 2005-09-18  Bruno Haible  <bruno@clisp.org>
14425
14426         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
14427         instead of $dry_run.
14428         (func_cp_if_changed, func_mv_if_changed): Remove functions.
14429         (func_ln_if_changed): Don't handle dry-run here.
14430         (func_import): In dry-run mode, detect more precisely which actions
14431         would be performed, and don't use "...ing" verbs.
14432
14433 2005-09-18  Bruno Haible  <bruno@clisp.org>
14434
14435         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
14436         (func_import): Use join on two temporary files instead of three nested
14437         loops, in order to determine which files are new or old.
14438
14439 2005-09-18  Bruno Haible  <bruno@clisp.org>
14440
14441         * gnulib-tool (func_import): Comment out code that spits out the
14442         new files with --dry-run.
14443
14444 2005-09-18  Bruno Haible  <bruno@clisp.org>
14445
14446         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
14447
14448 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14449
14450         * lib/stat-time.h: New file.
14451         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
14452         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
14453         in a different way.
14454         (timespec_cmp): New function.
14455         * lib/utimecmp.c: Include stat-time.h.
14456         (SYSCALL_RESOLUTION): Depend on whether various struct stat
14457         members exist, not on the obsolescent ST_MTIM_NSEC.
14458         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
14459
14460 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14461
14462         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
14463
14464 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
14465
14466         * MODULES.html.sh (File system functions): Add stat-time.
14467         * modules/stat-time: New file.
14468         * modules/timespec (Files): Remove m4/st_mtim.m4; this
14469         is now done in a different way, by the stat-time module.
14470         * modules/utimecmp (Depends-on): Add stat-time.
14471
14472 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
14473
14474         * m4/st_mtim.m4: Remove.  Superseded by...
14475         * m4/stat-time.m4: New file.
14476         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
14477         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
14478
14479 2005-09-15  Derek Price  <derek@ximbiot.com>
14480
14481         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
14482
14483 2005-09-15  Derek Price  <derek@ximbiot.com>
14484
14485         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
14486         * lib/regex_internal.c: Ditto, using this...
14487         (__GNUC_PREREQ): ...new macro.
14488         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
14489         using...
14490         (__GNUC_PREREQ): ...this new macro.
14491
14492         * lib/strstr.h: Include string.h. Define strstr as a macro here.
14493
14494 2005-09-15  Derek Price  <derek@ximbiot.com>
14495             Paul Eggert  <eggert@cs.ucla.edu>
14496
14497         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
14498         changes, consolidating in...
14499         * lib/regex_internal.h: ...this file.
14500
14501 2005-09-13  Jim Meyering  <jim@meyering.net>
14502
14503         * lib/canon-host.c: Filter through gnu indent and reword comments
14504         slightly.
14505         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
14506
14507 2005-09-13  Derek Price  <derek@ximbiot.com>
14508
14509         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
14510         failure.
14511         Reported by Jim Meyering  <jim@meyering.net>.
14512
14513 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14514
14515         * lib/base64.c: Typo.
14516         (base64_encode): Put b64str in initialized data section.
14517
14518 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
14519
14520         Merge glibc and coreutils changes into gnulib, plus a few
14521         extra fixes.
14522         * lib/md5.c: Use #error rather than a string.
14523         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
14524         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
14525         (__attribute__): Define to empty for non recent-GCC.
14526         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
14527         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
14528         Renamed from their non-__ counterparts, with new macros replacing
14529         them if not _LIBC.  Add __THROW attribute.
14530         (rol): Remove.
14531         (struct md5_ctx): Align buffer if using GCC.
14532         * lib/sha1.h (struct sha1_ctx): Likewise.
14533         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
14534         The old name was backwards.
14535         (NOTSWAP): Remove; not used.
14536         (rol): New macro, moved here from md5.h.
14537         (sha1_process_block): Remove a FIXME that doesn't make sense.
14538
14539 2005-09-12  Derek Price  <derek@ximbiot.com>
14540
14541         Return usable errors from canon-host.
14542         * lib/canon-host.h: New file.
14543         * lib/canon-host.c (canon_host): Wrap...
14544         (canon_host_r): ...this new function, which now relies exclusively on
14545         getaddrinfo.
14546         (ch_strerror): New function.
14547         (last_cherror): New global.
14548         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
14549         interface.
14550         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
14551         void *.
14552         (freeaddrinfo): Free ai->ai_canonname when set.
14553
14554 2005-09-12  Derek Price  <derek@ximbiot.com>
14555
14556         Make canon-host require getaddrinfo.
14557         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
14558         AC_LIBSOURCE canon-host.h.  Call...
14559         (gl_PREREQ_CANON_HOST): ...this new function, which requires
14560         gl_GETADDRINFO.
14561         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
14562
14563 2005-09-12  Derek Price  <derek@ximbiot.com>
14564
14565         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
14566         LGPL.
14567         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
14568
14569 2005-09-12  Derek Price  <derek@ximbiot.com>
14570
14571         * lib/gai_strerror.c: Include config.h when available.  Include
14572         getaddrinfo.h before other headers to test interface.
14573         Reported by Larry Jones <lawrence.jones@ugs.com>.
14574
14575 2005-09-12  Derek Price  <derek@ximbiot.com>
14576             Paul Eggert  <eggert@cs.ucla.edu>
14577
14578         * modules/glob (Files): Add glob-libc.h.
14579
14580 2005-09-12  Derek Price  <derek@ximbiot.com>
14581             Paul Eggert  <eggert@cs.ucla.edu>
14582
14583         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
14584         glob_.h, glob-libc.h.
14585         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
14586
14587 2005-09-12  Derek Price  <derek@ximbiot.com>
14588             Paul Eggert  <eggert@cs.ucla.edu>
14589
14590         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
14591         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
14592         protecting things that should be done only in gnulib contexts.
14593         * lib/glob_.h: New file, containing only the glob things needed for
14594         gnulib.
14595         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
14596         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
14597         (glob, globfree, glob_pattern_p): Now defined simply in terms of
14598         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
14599         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
14600         and to respect the namespace rules better.
14601
14602 2005-09-08  Simon Josefsson  <jas@extundo.com>
14603
14604         * modules/socklen: New file.
14605
14606 2005-09-08  Simon Josefsson  <jas@extundo.com>
14607
14608         * m4/socklen.m4: New file.
14609
14610 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14611
14612         * modules/utimens (Files): Add m4/utimbuf.m4, since
14613         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
14614         Reported by Sergey Poznyakoff.
14615
14616 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14617
14618         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
14619         definitions, since that's the preferred style in glibc.
14620         Fix a minor spacing issue, and update copyright notice to match
14621         glibc's.
14622
14623 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
14624
14625         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
14626
14627 2005-09-06  Simon Josefsson  <jas@extundo.com>
14628
14629         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
14630         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
14631
14632 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14633
14634         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
14635         warning.
14636
14637 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
14638
14639         * config/srclist.txt: Add glibc bug 1302.
14640
14641 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
14642
14643         Change bitset word type from unsigned int to unsigned long int,
14644         as this has better performance on typical 64-bit hosts.
14645         Port bitset code to hosts with unusual word sizes.
14646         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
14647         (build_collating_symbol):
14648         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
14649         argument is a bitset.  This is merely a style issue, but it makes
14650         it clearer that an entire array is expected.
14651         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
14652         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
14653         Port to the case where bitset_word is not the same as unsigned int.
14654         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
14655         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
14656         Likewise.
14657         * lib/regexec.c (check_dst_limits_calc_pos_1,
14658         check_subexp_matching_top):
14659         (build_trtable, group_nodes_into_DFAstates):
14660         Likewise.
14661         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
14662         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
14663         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
14664         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
14665         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
14666         * lib/regcomp.c (optimize_subexps, lower_subexp):
14667         Work even if bitset_word has holes in its bitwise representation.
14668         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
14669         * lib/regexec.c (check_dst_limits_calc_pos_1,
14670         check_subexp_matching_top):
14671         Likewise.
14672         * lib/regex_internal.c (re_string_reconstruct):
14673         Don't assume UCHAR_MAX == 255.
14674         * lib/regex_internal.h (bitset_set_all): Likewise.
14675         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
14676         All uses changed.
14677         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
14678         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
14679         All uses changed.
14680         (BITSET_WORD_MAX): New macro.
14681         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
14682         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
14683         (bitset_empty, bitset_copy):
14684         Prefer sizeof (bitset) to multiplying it out ourselves.
14685         (bitset_not_merge): Remove; unused.
14686         (bitset_contain): Return bool, not unsigned int with one bit on.
14687         All callers changed.
14688         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
14689         alignment than re_node_set; do this by defining a new internal
14690         type struct dests_alloc and using it to allocate memory.
14691
14692 2005-09-05  Bruno Haible  <bruno@clisp.org>
14693
14694         * gnulib-tool (func_import): Fix comparison in handling of symbolic
14695         links.
14696
14697 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
14698
14699         * modules/size_max (Makefile.am): Add size_max.h
14700
14701 2005-09-04  Derek Price  <derek@ximbiot.com>
14702
14703         * gnulib-tool (func_import): Fix reversed $symbolic logic.
14704
14705 2005-09-03  Simon Josefsson  <jas@extundo.com>
14706
14707         * gnulib-tool: Fix typo.
14708
14709 2005-09-03  Simon Josefsson  <jas@extundo.com>
14710
14711         * config/srclist.txt: Add glibc bug 1293.
14712
14713 2005-09-03  Derek Price  <derek@ximbiot.com>
14714
14715         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
14716         From Larry Jones <lawrence.jones@ugs.com>.
14717
14718 2005-09-02  Simon Josefsson  <jas@extundo.com>
14719
14720         * modules/socklen: New file.
14721
14722 2005-09-02  Simon Josefsson  <jas@extundo.com>
14723
14724         * modules/havelib: New module.
14725
14726         * modules/gettext, modules/iconv, modules/lock, modules/readline:
14727         Use havelib.
14728
14729 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
14730
14731         Check for arithmetic overflow when calculating sizes, to prevent
14732         some buffer-overflow issues.  These patches are conservative, in the
14733         sense that when I couldn't determine whether an overflow was possible,
14734         I inserted a run-time check.
14735         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
14736         macros.
14737         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
14738         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
14739         (re_xnrealloc, re_x2nrealloc): New inline functions.
14740         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
14741         parse_bracket_exp):
14742         (build_equiv_class, build_charclass): Check for arithmetic overflow
14743         in size expression calculations.
14744         * lib/regex_internal.c (re_string_realloc_buffers):
14745         (build_wcs_upper_buffer, re_node_set_add_intersect):
14746         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
14747         (re_dfa_add_node, register_state): Likewise.
14748         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
14749         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
14750         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
14751         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
14752
14753 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
14754
14755         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14756         m4/ulonglong.m4.  Problem reported by Martin Lambers.
14757
14758 2005-09-02  Bruno Haible  <bruno@clisp.org>
14759
14760         Support for lib vs. lib64 distinction on biarch platforms.
14761         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
14762         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
14763         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
14764
14765 2005-09-02  Bruno Haible  <bruno@clisp.org>
14766
14767         * gnulib-tool (import): In the other first-use case, provide defaults
14768         as well.
14769
14770 2005-09-02  Bruno Haible  <bruno@clisp.org>
14771
14772         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
14773         patches not yet found in the latest gettext release.
14774
14775 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
14776
14777         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
14778         to avoid a collision with bits/local_lim.h in glibc.
14779         All uses changed.  Problem reported by Dmitry V. Levin in
14780         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
14781
14782         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
14783         bugs in int versus size_t comparisons.
14784         (re_string_context_at): Fix bug where the code assumed that
14785         Idx is signed.
14786
14787         Use bool where appropriate.
14788         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
14789         All callers changed.
14790         (calc_eclosure_iter): Likewise, for ROOT arg.
14791         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
14792         (build_charclass_op): Likewise, for NON_MATCH arg.
14793         * lib/regex_internal.c (re_string_allocate, re_string_construct):
14794         (re_string_construct_common): Likewise, for ICASE arg.
14795         * lib/regexec.c (re_search_2_stub, re_search_stub):
14796         Likewise, for RET_LEN arg.
14797         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
14798         (set_regs): Likewise, for FL_BACKTRACK arg.
14799         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
14800         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
14801         (calc_eclosure_iter, parse_bracket_exp):
14802         Use bool for internal variables that are booleans.
14803         * lib/regexec.c (re_search_internal, check_matching,
14804         proceed_next_node):
14805         (set_regs, build_sifted_states, sift_states_bkref):
14806         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
14807         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
14808         (find_collation_sequence_value):
14809         Likewise.
14810         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
14811         (re_node_set_compare):
14812         Return bool, not int. All callers changed.
14813         * lib/regexec.c (check_halt_node_context, check_dst_limits):
14814         (build_trtable, check_node_accept): Likewise.
14815         * lib/regex_internal.h: Include stdbool.h.
14816
14817         Fix bugs uncovered when converting to bool.
14818         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
14819         failure instead of charging ahead blindly.
14820         * lib/regex_internal.c (register_state): Likewise.
14821         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
14822         for freeing internal storage.
14823         (group_nodes_into_DFA_states): Use unsigned int, not int, for
14824         bitset pieces used as boolean, to avoid undefined behavior
14825         on hosts that do int overflow checking.
14826
14827 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
14828
14829         * config/srclist.txt: Add glibc bugs 1285-1287.
14830
14831 2005-09-01  Jim Meyering  <jim@meyering.net>
14832
14833         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
14834         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
14835         Require gl_STAT_MACROS, too.
14836
14837 2005-09-01  Bruno Haible  <bruno@clisp.org>
14838
14839         * gnulib-tool (import): In the first-use case, provide defaults.
14840
14841 2005-09-01  Bruno Haible  <bruno@clisp.org>
14842
14843         * gnulib-tool (func_import): Remove the .tmp files.
14844
14845 2005-09-01  Bruno Haible  <bruno@clisp.org>
14846
14847         * gnulib-tool (func_import): Fix handling of symbolic links.
14848
14849 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14850
14851         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
14852         old glibc regex code mishandles strings longer than 2**31 bytes.
14853         This patch fixes this when the regex code is used in gnulib
14854         (i.e., outside glibc).
14855
14856         This patch should not affect the use of the regex code inside
14857         glibc.  No doubt this problem also needs to be handled for glibc
14858         as well, but the result will be an incompatible change to the
14859         glibc ABI, and the old ABI will have to be supported too.  That
14860         can be the the subject for another patch.
14861
14862         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
14863         governing whether the rest of this patch is active.  By default,
14864         the macro is disabled and the patch has no effect.
14865         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
14866         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
14867         (struct re_pattern_buffer, re_search, re_search_2, re_match):
14868         (re_match_2, re_set_registers): Use the new types.
14869         * lib/regex_internal.h (Idx, re_hashval_t): New types.
14870         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
14871         New macros.
14872         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
14873         (re_string_context_at, bin_tree_t, re_dfastate_t):
14874         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
14875         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
14876         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
14877         (re_string_char_size_at, re_string_wchar_at):
14878         (re_string_elem_size_at):
14879         Use the new types and macros to port to 64-bit hosts.
14880         Use unsigned types for internal values, so that the code
14881         mostly works even for arrays larger than SSIZE_MAX.
14882         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
14883         (search_duplicated_node, calc_eclosure_iter, fetch_number):
14884         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
14885         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
14886         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
14887         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
14888         (calc_inveclosure, parse_dup_op, build_range_exp):
14889         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
14890         (fetch_number, create_token_tree, mark_opt_subexp):
14891         Likewise.
14892         * lib/regex_internal.c (re_string_construct_common,
14893         create_ci_newstate):
14894         (create_cd_newstate, re_string_allocate, re_string_construct):
14895         (re_string_realloc_buffers, build_wcs_upper_buffer):
14896         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
14897         (re_string_reconstruct, re_string_peek_byte_case):
14898         (re_string_fetch_byte_case, re_string_context_at):
14899         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
14900         (re_node_set_init_copy, re_node_set_add_intersect):
14901         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14902         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14903         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
14904         (re_acquire_state, re_acquire_state_context, register_state):
14905         Likewise.
14906         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
14907         search_cur_bkref_entry):
14908         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
14909         (re_search_internal, re_search_2_stub, re_search_stub)
14910         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
14911         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
14912         (update_cur_sifted_state, check_dst_limits):
14913         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
14914         (check_subexp_limits, sift_states_bkref, merge_state_array):
14915         (check_subexp_matching_top, get_subexp, get_subexp_sub):
14916         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
14917         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
14918         (expand_bkref_cache, check_node_accept_bytes):
14919         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
14920         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
14921         (acquire_init_state_context, check_halt_node_context):
14922         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
14923         (sift_states_backward, clean_state_log_if_needed):
14924         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
14925         (find_recover_state, transit_state_sb, transit_state_mb):
14926         (transit_state_bkref, build_trtable, match_ctx_clean):
14927         Likewise.
14928         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
14929         to work around an assumption that REG_MISSING is negative.
14930
14931         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
14932         (seek_collating_symbol_entry) [defined _LIBC]:
14933         (lookup_collation_sequence_value) [defined _LIBC]:
14934         (build_range_exp, build_collating_symbol) [defined _LIBC]:
14935         Use prototypes rather than old-style function definitions.
14936         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
14937         (transit_state_sb) [0]:
14938         (find_collation_sequence_value) [defined _LIBC]: Likewise.
14939
14940         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
14941         rm_eo.
14942
14943         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
14944         (optimize_subexps, lower_subexp):
14945         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
14946         since the signed shift might overflow.  Use 1u<<31 instead.
14947         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
14948         Likewise.
14949         * lib/regexec.c (check_dst_limits_calc_pos_1,
14950         check_subexp_matching_top): Likewise.
14951
14952         * lib/regcomp.c (optimize_subexps, lower_subexp):
14953         Use CHAR_BIT rather than 8, for clarity.
14954         * lib/regexec.c (check_dst_limits_calc_pos_1):
14955         (check_subexp_matching_top): Likewise.
14956         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
14957         have to worry about portability issues when shifting it left.
14958         Remove no-longer-needed test for table_size > 0.
14959         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
14960         in a word, as the resulting behavior is undefined.
14961         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
14962         in one case, a <= should have been an <, and in another case the
14963         whole test was missing.
14964         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
14965         the standard name CHAR_BIT.
14966         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
14967         this is not true on one's complement and signed-magnitude hosts.
14968
14969         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
14970         next_last_offset.
14971         (struct re_dfa_t): Remove unused member states_alloc.
14972         * lib/regcomp.c (init_dfa): Don't initialize unused members.
14973
14974 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14975
14976         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
14977         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
14978         and large-file glibc and in 32-bit large-file Solaris.
14979
14980 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14981
14982         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
14983         lengths fit in regoff_t; this isn't true if regoff_t is the same
14984         width as size_t.
14985         * lib/regex.c (re_search_internal): 5th arg is LAST_START
14986         (= START + RANGE) instead of RANGE.  This avoids overflow
14987         problems when regoff_t is the same width as size_t.
14988         All callers changed.
14989         (re_search_2_stub): Check for overflow when adding the
14990         sizes of the two strings.
14991         (re_search_stub): Check for overflow when adding START
14992         to RANGE; if it occurs, substitute the extreme value.
14993
14994 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
14995
14996         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
14997
14998 2005-08-31  Jim Meyering  <jim@meyering.net>
14999
15000         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
15001         a pointer-to-const.
15002         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
15003         (register_state): Likewise.
15004         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
15005         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
15006         (group_nodes_into_DFAstates): Likewise.
15007
15008 2005-08-31  Jim Meyering  <jim@meyering.net>
15009
15010         * check-module: Add a FIXME comment.
15011
15012 2005-08-31  Eric Blake  <ebb9@byu.net>
15013
15014         * modules/unistd-safer (Files): Add unistd--.h.
15015         * modules/stdio-safer (Files): Add stdio--.h.
15016
15017 2005-08-31  Derek Price  <derek@ximbiot.com>
15018
15019         * lib/getdelim.c (getdelim): Return EOF on EOF.
15020         Reported by Larry Jones <lawrence.jones@ugs.com>.
15021
15022 2005-08-31  Bruno Haible  <bruno@clisp.org>
15023
15024         Avoid unnecessary diffs in the generated lib/Makefile.am.
15025         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
15026         the generated files.
15027         (func_import): Don't set cmd.
15028
15029 2005-08-31  Bruno Haible  <bruno@clisp.org>
15030
15031         * lib/strstr.c: Include <stddef.h>, for NULL.
15032         * lib/strcasestr.c: Likewise.
15033         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
15034
15035 2005-08-31  Bruno Haible  <bruno@clisp.org>
15036
15037         * gnulib-tool: New option --macro-prefix.
15038         (func_import): Use macro_prefix.
15039         (import): Handle option --macro-prefix.
15040
15041 2005-08-31  Bruno Haible  <bruno@clisp.org>
15042
15043         * gnulib-tool (import): Rename most ac_* variables to cached_*.
15044         Also use new variables cached_lgpl, cached_libtool.
15045
15046 2005-08-31  Bruno Haible  <bruno@clisp.org>
15047
15048         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
15049         always instantiating them.
15050
15051 2005-08-31  Bruno Haible  <bruno@clisp.org>
15052
15053         * gnulib-tool (func_import): Read the previous cached settings
15054         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
15055         earlier added by gnulib but are now dropped. Warn when a gnulib file
15056         overwrites a non-gnulib file.
15057
15058 2005-08-31  Bruno Haible  <bruno@clisp.org>
15059
15060         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
15061         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
15062         projects that don't keep autogenerated files in CVS. Put into
15063         actioncmd only the specified modules, not the transitive closure.
15064
15065 2005-08-31  Bruno Haible  <bruno@clisp.org>
15066
15067         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
15068         Create directories that shall be filled.
15069         (import): Don't look for gl_* macros in configure.ac. Recurse across
15070         all directories containing a gnulib-cache.m4 files, if meaningful.
15071
15072 2005-08-31  Bruno Haible  <bruno@clisp.org>
15073
15074         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
15075         (import): Set seen_libtool when we see gl_LIBTOOL.
15076
15077 2005-08-31  Bruno Haible  <bruno@clisp.org>
15078
15079         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
15080         declaration macro definitions from generated gnulib.m4.
15081
15082 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
15083
15084         * lib/iconvme.h: Add prototype for iconv_alloc.
15085
15086 2005-08-29  Simon Josefsson  <jas@extundo.com>
15087
15088         * lib/iconvme.c: Fix errno.
15089
15090 2005-08-29  Bruno Haible  <bruno@clisp.org>
15091
15092         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
15093         that it works when the directory contains spaces.
15094
15095 2005-08-29  Bruno Haible  <bruno@clisp.org>
15096
15097         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
15098
15099 2005-08-29  Bruno Haible  <bruno@clisp.org>
15100
15101         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
15102         Emit more advice.
15103
15104 2005-08-29  Bruno Haible  <bruno@clisp.org>
15105         and Stepan Kasal  <kasal@ucw.cz>
15106
15107         * check-module: If more parameters are given, check each of them
15108         separately; add more exceptions, as noted by Jim Meyering.
15109         (check_module): New procedure.
15110         (%exempt_header): Now contains all exceptions.
15111
15112 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
15113
15114         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
15115
15116 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15117
15118         * lib/iconvme.c: Split iconv_string into iconv_alloc.
15119
15120 2005-08-28  Bruno Haible  <bruno@clisp.org>
15121
15122         * m4/gnulib-tool.m4: New file.
15123
15124 2005-08-27  Jim Meyering  <jim@meyering.net>
15125
15126         * modules/unistd-safer (Files): Add pipe-safer.c.
15127         * modules/fcntl-safer (Files): Add creat-safer.c.
15128
15129 2005-08-27  Jim Meyering  <jim@meyering.net>
15130
15131         * m4/stdlib-safer.m4: New file.  From coreutils.
15132         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
15133         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
15134         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
15135         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
15136         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
15137
15138 2005-08-27  Jim Meyering  <jim@meyering.net>
15139
15140         * lib/fopen-safer.c: Merge minor changes from coreutils.
15141         * lib/dup-safer.c: Likewise.
15142         * lib/fd-safer.c: Likewise.
15143
15144         Merge from coreutils.
15145         * lib/stdio--.h: New file.
15146         * lib/stdlib--.h: New file.
15147         * lib/mkstemp-safer.c: New file.
15148
15149         GNU tar needs these.
15150         * lib/pipe-safer.c: New file.
15151         * lib/creat-safer.c: New file.
15152         * lib/fcntl--.h (creat): Define to creat_safer.
15153         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
15154         * lib/unistd--.h (pipe): Define to pipe_safer.
15155         * lib/unistd-safer.h: Declare pipe_safer.
15156
15157 2005-08-26  Simon Josefsson  <jas@extundo.com>
15158
15159         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
15160         Haible <bruno@clisp.org>.
15161
15162 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
15163
15164         * lib/regex_internal.h: Remove all references to
15165         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
15166         or better.
15167         (bitset_not, bitset_merge, bitset_not_merge):
15168         (bitset_mask, re_string_allocate, re_string_construct):
15169         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
15170         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
15171         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
15172         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
15173         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15174         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15175         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
15176         (re_acquire_state_context):
15177         Remove unnecessary forward decls.
15178         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
15179         Put __attribute at function definition,
15180         now that the function decl has been removed.
15181         * lib/regex_internal.c (re_string_peek_byte_case):
15182         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
15183         Likewise.
15184
15185 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
15186
15187         * m4/regex.m4: Add AC_PREREQ(2.50).
15188         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
15189
15190 2005-08-25  Simon Josefsson  <jas@extundo.com>
15191
15192         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
15193         __fsetlocking.
15194
15195 2005-08-25  Simon Josefsson  <jas@extundo.com>
15196
15197         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
15198         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
15199         GLIBC specific code.
15200
15201 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15202
15203         Make regex safe for g++.  This fixes one real bug (an "err"
15204         that should have been "*err").  g++ problem reported by
15205         Sam Steingold.
15206         * lib/regex_internal.h (re_calloc): New macro, consistent with
15207         re_malloc etc.  All callers of calloc changed to use re_calloc.
15208         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
15209         not int.  All callers changed.
15210         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
15211         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
15212         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
15213         (find_recover_state): Change "err" to "*err"; this fixes what
15214         appears to be a real bug.
15215         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
15216         versus int.
15217
15218 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15219
15220         * modules/regex (Depends-on): Add malloc, since the code
15221         assumes that !malloc(0) means failure.
15222
15223 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15224
15225         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
15226
15227         alloca modernization/simplification for regex.
15228         * lib/regex.c: Remove portability cruft for alloca.  This no longer
15229         needs to be at the start of the file, and can be moved into
15230         regex_internal.h and simplified.
15231         * lib/regex_internal.h: Include <alloca.h>.
15232         (__libc_use_alloca) [!defined _LIBC]: New macro.
15233         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
15234         now works outside glibc.
15235
15236 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
15237
15238         * config/srclist.txt: Add glibc bugs 1241, 1245.
15239
15240 2005-08-25  Jim Meyering  <jim@meyering.net>
15241
15242         * lib/open-safer.c: Include <config.h>.
15243         Otherwise, we'd lose LARGEFILE support in any file using
15244         e.g. "fcntl--.h"
15245
15246 2005-08-25  Bruno Haible  <bruno@clisp.org>
15247
15248         * m4/minmax.m4: Require autoconf 2.52.
15249         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
15250         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
15251         alternatives of translit over the alphabet.
15252         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
15253
15254 2005-08-24  Simon Josefsson  <jas@extundo.com>
15255
15256         * tests/test-getpass.c: New file.
15257
15258 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15259
15260         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
15261         for GNU regex features.
15262
15263 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15264
15265         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
15266         * lib/regex.h (regerror): Likewise.
15267
15268         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
15269         requires this.  (The code never needed it.)
15270
15271         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
15272         All uses of recently-renamed identifiers changed to use the new,
15273         POSIX-compliant names.  The code will build and run just fine
15274         without these changes, but it's better to eat our own dog food
15275         and use the standard-conforming names.
15276
15277         * lib/regex.h: Fix a multitude of POSIX name space violations.
15278         These changes have an effect only for programs that define
15279         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
15280         do not change anything for programs compiled in the normal way.
15281         Also, there is no effect on the ABI.
15282
15283         (_REGEX_SOURCE): New macro.
15284         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
15285         defined and _GNU_SOURCE is not; this fixes a name space violation.
15286
15287         Rename the following macros to obey POSIX requirements.
15288         The old names are still visible as macros if _REGEX_SOURCE is defined.
15289         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
15290         RE_BACKSLASH_ESCAPE_IN_LISTS.
15291         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
15292         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
15293         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
15294         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
15295         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
15296         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
15297         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
15298         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
15299         (REG_INTERVALS): renamed from RE_INTERVALS.
15300         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
15301         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
15302         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
15303         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
15304         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
15305         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
15306         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
15307         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
15308         RE_UNMATCHED_RIGHT_PAREN_ORD.
15309         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
15310         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
15311         (REG_DEBUG): renamed from RE_DEBUG.
15312         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
15313         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
15314         unusual, since we can't clash with the POSIX REG_ICASE.
15315         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
15316         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
15317         (REG_NO_SUB): renamed from RE_NO_SUB.
15318         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
15319         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
15320         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
15321         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
15322         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
15323         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
15324         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
15325         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
15326         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
15327         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
15328         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
15329         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
15330         RE_SYNTAX_POSIX_MINIMAL_BASIC.
15331         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
15332         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
15333         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
15334         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
15335         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
15336         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
15337         (REG_FIXED): Renamed from REGS_FIXED.
15338         (REG_NREGS): Renamed from RE_NREGS.
15339
15340         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
15341         of other REG_* macros, since POSIX says the user is allowed to
15342         #undef these macros selectively.
15343
15344         (reg_errcode_t): Update comment stating what other tables need
15345         to be consistent.
15346
15347         Rename the following enum values to obey POSIX requirements.
15348         The old names are still visible as macros.
15349         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
15350         is not defined, since GNU is supposed to be a superset of POSIX as
15351         much as possible, and since we want reg_errcode_t to be a signed
15352         type for implementation consistency.
15353         (_REG_NOERROR): Renamed from REG_NOERROR.
15354         (_REG_NOMATCH): Renamed from REG_NOMATCH.
15355         (_REG_BADPAT): Renamed from REG_BADPAT.
15356         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
15357         (_REG_ECTYPE): Renamed from REG_ECTYPE.
15358         (_REG_EESCAPE): Renamed from REG_EESCAPE.
15359         (_REG_ESUBREG): Renamed from REG_ESUBREG.
15360         (_REG_EBRACK): Renamed from REG_EBRACK.
15361         (_REG_EPAREN): Renamed from REG_EPAREN.
15362         (_REG_EBRACE): Renamed from REG_EBRACE.
15363         (_REG_BADBR): Renamed from REG_BADBR.
15364         (_REG_ERANGE): Renamed from REG_ERANGE.
15365         (_REG_ESPACE): Renamed from REG_ESPACE.
15366         (_REG_BADRPT): Renamed from REG_BADRPT.
15367         (_REG_EEND): Renamed from REG_EEND.
15368         (_REG_ESIZE): Renamed from REG_ESIZE.
15369         (_REG_ERPAREN): Renamed from REG_ERPAREN.
15370         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
15371         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
15372         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
15373         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
15374
15375         (_REG_RE_NAME, _REG_RM_NAME): New macros.
15376         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
15377         changed.  But support the old name if the new one is not defined
15378         and if _REGEX_SOURCE.
15379
15380         Change the following member names in struct re_pattern_buffer.
15381         The old names are still supported if !_REGEX_SOURCE.
15382         The new names are always supported, regardless of _REGEX_SOURCE.
15383         (re_buffer): Renamed from buffer.
15384         (re_allocated): Renamed from allocated.
15385         (re_used): Renamed from used.
15386         (re_syntax): Renamed from syntax.
15387         (re_fastmap): Renamed from fastmap.
15388         (re_translate): Renamed from translate.
15389         (re_can_be_null): Renamed from can_be_null.
15390         (re_regs_allocated): Renamed from regs_allocated.
15391         (re_fastmap_accurate): Renamed from fastmap_accurate.
15392         (re_no_sub): Renamed from no_sub.
15393         (re_not_bol): Renamed from not_bol.
15394         (re_not_eol): Renamed from not_eol.
15395         (re_newline_anchor): Renamed from newline_anchor.
15396
15397         Change the following member names in struct re_registers.
15398         The old names are still supported if !_REGEX_SOURCE.
15399         The new names are always supported, regardless of _REGEX_SOURCE.
15400         (rm_num_regs): Renamed from num_regs.
15401         (rm_start): Renamed from start.
15402         (rm_end): Renamed from end.
15403
15404         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
15405         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
15406         Prepend __ to parameter names.
15407
15408         Undo yesterday's changes.
15409
15410 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
15411
15412         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
15413         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
15414         lib/regex.c.
15415
15416 2005-08-24  Jim Meyering  <jim@meyering.net>
15417
15418         Sync from coreutils.
15419         * m4/fcntl-safer.m4: New file.
15420
15421         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
15422         and object files for this module.
15423
15424 2005-08-24  Jim Meyering  <jim@meyering.net>
15425
15426         Sync from coreutils.
15427         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
15428
15429 2005-08-24  Jim Meyering  <jim@meyering.net>
15430
15431         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
15432         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
15433
15434 2005-08-24  Jim Meyering  <jim@meyering.net>
15435
15436         * modules/fcntl-safer: New module.
15437         * modules/fts (Depends-on): Add fcntl-safer.
15438         * MODULES.html.sh (File descriptor based Input/Output):
15439         Add fcntl-safer.
15440
15441 2005-08-24  Bruno Haible  <bruno@clisp.org>
15442
15443         Support for unit test modules.
15444         * modules/README: Mention tests modules.
15445         * modules/TEMPLATE-TESTS: New file.
15446         * gnulib-tool: New options --extract-tests-module, --with-tests and
15447         --tests-base (unused for the moment).
15448         (testsbase, inctests): New variables.
15449         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
15450         (func_verify_module): Exclude TEMPLATE-TESTS.
15451         (func_verify_nontests_module, func_verify_tests_module): New functions.
15452         (func_get_dependencies): Add implicit dependency for tests modules.
15453         (func_get_tests_module): New function.
15454         (func_modules_transitive_closure): When --with-tests was specified,
15455         include the unit tests as well, unless explicitly avoided.
15456         (func_emit_lib_Makefile_am): Ignore the tests modules here.
15457         (func_emit_tests_Makefile_am): New function.
15458         (func_create_testdir): When --with-tests was specified, emit a
15459         tests/ directory.
15460         * MODULES.html.sh (Future developments): Update.
15461
15462 2005-08-24  Bruno Haible  <bruno@clisp.org>
15463
15464         * modules/tls-tests: New file.
15465         * tests/test-tls.c: New file, from GNU gettext.
15466
15467 2005-08-24  Bruno Haible  <bruno@clisp.org>
15468
15469         * modules/lock-tests: New file.
15470         * tests/test-lock.c: New file, from GNU gettext.
15471
15472 2005-08-24  Bruno Haible  <bruno@clisp.org>
15473
15474         * lib/lock.h: Add multiple inclusion guard.
15475         * lib/tls.h: Add multiple inclusion guard.
15476
15477 2005-08-24  Bruno Haible  <bruno@clisp.org>
15478
15479         * gnulib-tool: Add support for the --aux-dir option to
15480         --create-testdir, --create-megatestdir, --test, --megatest.
15481         (func_create_testdir, func_create_megatestdir): Optionally emit a
15482         AC_CONFIG_AUX_DIR directive.
15483         (create-testdir, create-megatestdir, test, megatest): Provide a
15484         default value for $auxdir.
15485
15486 2005-08-24  Bruno Haible  <bruno@clisp.org>
15487
15488         * gnulib-tool (import): Use compound statement instead of subshell
15489         where possible.
15490
15491 2005-08-24  Bruno Haible  <bruno@clisp.org>
15492
15493         * gnulib-tool (import): Change --aux-dir default to "build-aux".
15494
15495 2005-08-24  Bruno Haible  <bruno@clisp.org>
15496
15497         * gnulib-tool (func_version): Update.
15498
15499 2005-08-24  Bruno Haible  <bruno@clisp.org>
15500
15501         * gnulib-tool (func_import, func_create_testdir,
15502         func_create_megatestdir): Quote all autoconf macro arguments.
15503
15504 2005-08-24  Bruno Haible  <bruno@clisp.org>
15505
15506         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
15507         option --force, because --force causes the aclocal.m4 of each
15508         subdirectory to be newer than the corresponding config.h.in.
15509
15510 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15511
15512         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
15513         All contents moved to gl_REGEX.
15514         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
15515         assume that it does.
15516
15517 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15518
15519         * lib/regex.h (REG_NOSYS)
15520         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
15521         Define, since POSIX requires it as of 2001.
15522         (_REG_ENOSYS)
15523         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
15524         New private symbol, used to keep the enum signed in all cases.
15525         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
15526         Youngman in
15527         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
15528
15529         * lib/regex_internal.c (re_string_skip_chars, register_state):
15530         (calc_state_hash):
15531         Remove forward decls; no longer needed now that we use prototypes.
15532         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
15533         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
15534         (clean_state_log_if_needed): Likewise.
15535
15536 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
15537
15538         * config/srclist.txt: Add glibc bugs 1231-1233.
15539
15540 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15541
15542         Fix problems reported by Sam Steingold in
15543         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
15544         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
15545         assumed that reg_errcode_t is a signed type, which is not
15546         necessarily true if _XOPEN_SOURCE is not defined.
15547         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
15548         since some compilers warn about it otherwise.
15549
15550 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15551
15552         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
15553         (init_word_char, create_initial_state, duplicate_node_closure):
15554         (fetch_token, peek_token_bracket, build_range_exp):
15555         (build_collating_symbol): Remove forward decls; no longer needed
15556         now that we use prototypes.
15557
15558         * lib/regcomp.c:
15559         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
15560         (re_compile_fastmap_iter, regcomp, regerror, regfree):
15561         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
15562         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
15563         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
15564         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
15565         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
15566         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
15567         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
15568         (build_range_exp, build_collating_symbol, parse_bracket_exp):
15569         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
15570         (build_charclass, build_charclass_op, fetch_number, create_tree):
15571         (create_token_tree, mark_opt_subexp, duplicate_tree):
15572         Use prototypes rather than old-style definitions.
15573
15574         * lib/regex_internal.c:
15575         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
15576         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
15577         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
15578         (re_string_reconstruct, re_string_peek_byte_case):
15579         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
15580         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
15581         (re_node_set_init_copy, re_node_set_add_intersect):
15582         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
15583         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
15584         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
15585         (re_acquire_state, re_acquire_state_context, register_state):
15586         (create_ci_newstate, create_cd_newstate, free_state):
15587         Likewise.
15588         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
15589         re_search_2):
15590         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
15591         (re_search_internal, prune_impossible_nodes):
15592         (acquire_init_state_context, check_matching, static):
15593         (check_halt_node_context, check_halt_state_context, proceed_next_node):
15594         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
15595         (update_regs, sift_states_backward, build_sifted_states):
15596         (clean_state_log_if_needed, merge_state_array):
15597         (update_cur_sifted_state, add_epsilon_src_nodes):
15598         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
15599         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
15600         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
15601         (find_recover_state, check_subexp_matching_top, transit_state_mb):
15602         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
15603         (check_arrival, check_arrival_add_next_nodes):
15604         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
15605         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
15606         (check_node_accept_bytes, check_node_accept, extend_buffers):
15607         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
15608         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
15609         (sift_ctx_init):
15610         Likewise.
15611
15612         * lib/regex_internal.h:
15613         (re_string_allocate, re_string_construct, re_string_reconstruct):
15614         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
15615         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
15616         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
15617         (re_string_context_at, re_string_peek_byte_case):
15618         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
15619         is defined, since we now use prototypes always.
15620
15621         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
15622         C89 or better.  All uses removed.
15623
15624 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
15625
15626         * config/srclist.txt: Add glibc bugs 1220-1227.
15627
15628 2005-08-20  Jim Meyering  <jim@meyering.net>
15629
15630         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
15631         of unused local, dfa.
15632
15633 2005-08-20  Bruno Haible  <bruno@clisp.org>
15634
15635         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
15636
15637 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15638
15639         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
15640         (re_node_set_insert_last, re_dfa_add_node):
15641         Rename local variables to avoid GCC shadowing warnings.
15642
15643 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15644
15645         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
15646         [defined lint]: Suppress bogus uninitialized-variable warnings.
15647
15648         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
15649         and let the caller return REG_ESPACE if out of space.  This
15650         removes an uninitialied-variable warning with GCC 4.0.1, and also
15651         avoids taking the address of a local variable.  All callers
15652         changed.
15653
15654 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15655
15656         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
15657         $LIBCSRC/posix/regexec.c.
15658         Add glibc bug 1217 for regcomp.c.
15659
15660 2005-08-19  Jim Meyering  <jim@meyering.net>
15661
15662         * lib/regexec.c (proceed_next_node): Redo local variables to
15663         avoid GCC shadowing warnings.
15664
15665 2005-08-18  Bruno Haible  <bruno@clisp.org>
15666
15667         * lib/strstr.c (strstr): Fix return value in multibyte case.
15668         * lib/strcasestr.c (strcasestr): Likewise.
15669
15670 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15671
15672         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
15673
15674 2005-08-17  Jim Meyering  <jim@meyering.net>
15675
15676         Make the %s format (seconds since the epoch) work for a negative
15677         number and when used with a zero-padded field width, e.g. %015s.
15678
15679         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
15680         label so that it precedes the code to set `digits'.  Otherwise,
15681         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
15682         print `00-22'.  Now, it prints `-0022', as it should.
15683
15684 2005-08-17  Bruno Haible  <bruno@clisp.org>
15685
15686         * modules/strstr (Files): Add m4/mbrtowc.m4.
15687         (Depends-on): Add mbuiter.
15688
15689 2005-08-17  Bruno Haible  <bruno@clisp.org>
15690
15691         * modules/strcasestr: New file.
15692         * MODULES.html.sh (String handling, based on ANSI C 89): Add
15693         strcasestr.
15694
15695 2005-08-17  Bruno Haible  <bruno@clisp.org>
15696
15697         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
15698
15699 2005-08-17  Bruno Haible  <bruno@clisp.org>
15700
15701         * modules/mbuiter: New file.
15702         * MODULES.html.sh (Extended multibyte and wide character utilities):
15703         Add mbuiter.
15704
15705 2005-08-17  Bruno Haible  <bruno@clisp.org>
15706
15707         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
15708         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
15709
15710 2005-08-17  Bruno Haible  <bruno@clisp.org>
15711
15712         * m4/strcasestr.m4: New file.
15713
15714 2005-08-17  Bruno Haible  <bruno@clisp.org>
15715
15716         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
15717         * lib/strstr.c: Completely rewritten, with multibyte locale support.
15718
15719 2005-08-17  Bruno Haible  <bruno@clisp.org>
15720
15721         * lib/strcasestr.h: New file.
15722         * lib/strcasestr.c: New file.
15723
15724 2005-08-17  Bruno Haible  <bruno@clisp.org>
15725
15726         * lib/strcasecmp.c: Use mbuiter.h.
15727
15728 2005-08-17  Bruno Haible  <bruno@clisp.org>
15729
15730         * lib/mbuiter.h: New file.
15731
15732 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
15733
15734         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
15735         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
15736         and gl_GETOPT are both invoked via different paths (as happens
15737         with GNU tar CVS because it uses both argp and getopt), the former
15738         wins.
15739
15740 2005-08-16  Bruno Haible  <bruno@clisp.org>
15741
15742         * modules/tls: New file.
15743         * MODULES.html.sh (Multithreading): Add tls.
15744
15745 2005-08-16  Bruno Haible  <bruno@clisp.org>
15746
15747         * modules/strnlen1: New file.
15748         * MODULES.html.sh (String handling): Add strnlen1.
15749
15750 2005-08-16  Bruno Haible  <bruno@clisp.org>
15751
15752         * modules/strcase (Files): Add m4/mbrtowc.m4.
15753         (Depends-on): Add strnlen1, mbchar.
15754
15755 2005-08-16  Bruno Haible  <bruno@clisp.org>
15756
15757         * modules/mbiter: New file.
15758         * MODULES.html.sh (Extended multibyte and wide character utilities):
15759         Add mbiter.
15760
15761 2005-08-16  Bruno Haible  <bruno@clisp.org>
15762
15763         * modules/mbfile: New file.
15764         * MODULES.html.sh (Extended multibyte and wide character utilities):
15765         Add mbfile.
15766
15767 2005-08-16  Bruno Haible  <bruno@clisp.org>
15768
15769         * modules/mbchar: New file.
15770         * MODULES.html.sh (Extended multibyte and wide character utilities):
15771         New section.
15772
15773 2005-08-16  Bruno Haible  <bruno@clisp.org>
15774
15775         * m4/tls.m4: New file, from GNU gettext.
15776
15777 2005-08-16  Bruno Haible  <bruno@clisp.org>
15778
15779         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
15780         always.
15781         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
15782
15783 2005-08-16  Bruno Haible  <bruno@clisp.org>
15784
15785         * m4/mbiter.m4: New file.
15786
15787 2005-08-16  Bruno Haible  <bruno@clisp.org>
15788
15789         * m4/mbfile.m4: New file.
15790
15791 2005-08-16  Bruno Haible  <bruno@clisp.org>
15792
15793         * m4/mbchar.m4: New file.
15794
15795 2005-08-16  Bruno Haible  <bruno@clisp.org>
15796
15797         * lib/tls.h: New file, from GNU gettext.
15798         * lib/tls.c: New file, from GNU gettext.
15799
15800 2005-08-16  Bruno Haible  <bruno@clisp.org>
15801
15802         * lib/strnlen1.h: New file.
15803         * lib/strnlen1.c: New file.
15804
15805 2005-08-16  Bruno Haible  <bruno@clisp.org>
15806
15807         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
15808         (mbi_init): Update.
15809         (mbi_avail, mbi_advance): Let the iteration end before the terminating
15810         NUL byte, not after it.
15811
15812 2005-08-16  Bruno Haible  <bruno@clisp.org>
15813
15814         * lib/strcase.h (strcasecmp): Add note in comments.
15815         * lib/strncasecmp.c: Use code from strcasecmp.c.
15816         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
15817         (strcasecmp): Work correctly in multibyte locales.
15818
15819 2005-08-16  Bruno Haible  <bruno@clisp.org>
15820
15821         * lib/mbiter.h: New file.
15822
15823 2005-08-16  Bruno Haible  <bruno@clisp.org>
15824
15825         * lib/mbfile.h: New file.
15826
15827 2005-08-16  Bruno Haible  <bruno@clisp.org>
15828
15829         * lib/mbchar.h: New file.
15830         * lib/mbchar.c: New file.
15831
15832 2005-08-16  Bruno Haible  <bruno@clisp.org>
15833
15834         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
15835         the valid ones. Makes the comparison operations transitive:
15836         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
15837         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
15838
15839 2005-08-15  Simon Josefsson  <jas@extundo.com>
15840
15841         * modules/ssize_t (License): Change to 'unlimited'.
15842
15843         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
15844
15845 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
15846
15847         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
15848         Add comments for each pending glibc patch.
15849
15850 2005-08-15  Bruno Haible  <bruno@clisp.org>
15851
15852         * lib/regex.h (__restrict_arr): Don't define to __restrict if
15853         __cplusplus is defined.
15854
15855 2005-08-14  Jim Meyering  <jim@meyering.net>
15856
15857         Sync from coreutils.
15858
15859         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
15860         Use the hash-table-based cycle-detection code not just when
15861         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
15862         Reported by James Youngman in
15863         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
15864         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
15865         FTS_TIGHT_CYCLE_CHECK.
15866         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
15867         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
15868         once again.
15869         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
15870         * lib/fts.c (fd_safer): Remove decl.
15871         Include fcntl--.h rather than unistd-safer.h
15872         (fts_safe_changedir): Don't call fd_safer; no longer needed
15873         now that we include fcntl--.h.
15874
15875 2005-08-12  Simon Josefsson  <jas@extundo.com>
15876
15877         * modules/getndelim2: Use ssize_t module.
15878         * modules/getnline: Likewise.
15879         * modules/safe-read: Likewise.
15880         * modules/xreadlink: Likewise.
15881
15882         * modules/ssize_t: New file.
15883
15884 2005-08-12  Simon Josefsson  <jas@extundo.com>
15885
15886         * m4/readline.m4: Look for termcap, curses or ncurses if required.
15887
15888 2005-08-12  Simon Josefsson  <jas@extundo.com>
15889
15890         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15891         ssize_t.
15892
15893 2005-08-12  Simon Josefsson  <jas@extundo.com>
15894
15895         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
15896         readline, getdelim and check_version.
15897         (Support for systems lacking ISO C 99: Sizes of integer types):
15898         Add size_max.
15899
15900 2005-08-12  Bruno Haible  <bruno@clisp.org>
15901
15902         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
15903
15904 2005-08-11  Simon Josefsson  <jas@extundo.com>
15905
15906         * modules/readline: New file.
15907
15908         * modules/strnlen (Files): Add strnlen.h.
15909
15910 2005-08-11  Simon Josefsson  <jas@extundo.com>
15911
15912         * m4/readline.m4: New file.
15913
15914 2005-08-11  Simon Josefsson  <jas@extundo.com>
15915
15916         * lib/readline.h, readline.c: New file.
15917
15918 2005-08-11  Simon Josefsson  <jas@extundo.com>
15919
15920         * doc/gnulib.texi (Initial import, Finishing touches): Mention
15921         gl_AVOID.
15922
15923 2005-08-11  Bruno Haible  <bruno@clisp.org>
15924
15925         * lib/strnlen.h (strnlen): Change parameter name to match comment.
15926
15927 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
15928
15929         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
15930
15931 2005-08-10  Simon Josefsson  <jas@extundo.com>
15932
15933         * tests/test-iconvme.c: New file.
15934
15935 2005-08-10  Simon Josefsson  <jas@extundo.com>
15936
15937         * m4/strnlen.m4: New file.
15938
15939         * m4/strndup.m4: Don't check for strnlen declaration, done in
15940         strnlen.m4.
15941
15942 2005-08-10  Simon Josefsson  <jas@extundo.com>
15943
15944         * lib/strndup.c: Use strnlen.h.
15945
15946         * lib/strnlen.h: New file.
15947
15948 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
15949
15950         * README: Typos.
15951
15952 2005-08-02  Simon Josefsson  <jas@extundo.com>
15953
15954         * modules/readline: New file.
15955
15956 2005-08-02  Simon Josefsson  <jas@extundo.com>
15957
15958         * modules/getdelim: New file.
15959
15960         * modules/getline: Rewrite, don't use getndelim2.
15961
15962 2005-08-02  Simon Josefsson  <jas@extundo.com>
15963
15964         * m4/getline.m4: Separate out getdelim stuff into separate module.
15965
15966         * m4/getdelim.m4: New file.
15967
15968 2005-08-02  Simon Josefsson  <jas@extundo.com>
15969
15970         * lib/getline.h, getline.c: Rewrite.
15971
15972         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
15973
15974 2005-07-31  Bruno Haible  <bruno@clisp.org>
15975
15976         * lib/lock.h (gl_lock_initializer): New macro.
15977         (gl_lock_define_initialized): Use it.
15978         (gl_rwlock_initializer): New macro.
15979         (gl_rwlock_define_initialized): Use it.
15980         (gl_recursive_lock_initializer): New macro.
15981         (gl_recursive_lock_define_initialized): Use it.
15982
15983 2005-07-30  Karl Berry  <karl@gnu.org>
15984
15985         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
15986         Report from Ben Pfaff, regarding getopt.
15987
15988 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
15989
15990         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
15991         normal way.
15992         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
15993         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
15994         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
15995         (gl_GETOPT): Use the new macros.  Most of the implementation
15996         is moved to the new macros.  This is for programs like Emacs
15997         that don't want all the functionality of gl_GETOPT.
15998
15999 2005-07-26  Bruno Haible  <bruno@clisp.org>
16000
16001         * m4/lock.m4: Update from GNU gettext.
16002
16003 2005-07-26  Bruno Haible  <bruno@clisp.org>
16004
16005         * lib/lock.h: Update from GNU gettext.
16006         * lib/lock.c: Update from GNU gettext.
16007
16008 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
16009
16010         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
16011         obsolescent AC_TRY_RUN.  Include the default includes files, for
16012         'exit'.
16013
16014 2005-07-24  Bruno Haible  <bruno@clisp.org>
16015
16016         * modules/visibility: New file.
16017         * MODULES.html.sh (Misc): Add visibility.
16018
16019 2005-07-24  Bruno Haible  <bruno@clisp.org>
16020
16021         * m4/visibility.m4: New file.
16022
16023 2005-07-24  Bruno Haible  <bruno@clisp.org>
16024
16025         * doc/visibility.texi: New file.
16026
16027 2005-07-22  Bruno Haible  <bruno@clisp.org>
16028
16029         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
16030         $(ALLOCA_H), redundant through BUILT_SOURCES.
16031         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
16032         redundant through BUILT_SOURCES.
16033         * modules/byteswap (Makefile.am): Remove explicit dependency on
16034         $(BYTESWAP_H), redundant through BUILT_SOURCES.
16035         * modules/fnmatch (Makefile.am): Remove explicit dependency on
16036         $(FNMATCH_H), redundant through BUILT_SOURCES.
16037         * modules/getopt (Makefile.am): Remove explicit dependency on
16038         $(GETOPT_H), redundant through BUILT_SOURCES.
16039         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
16040         redundant through BUILT_SOURCES.
16041         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
16042         redundant through BUILT_SOURCES.
16043         * modules/stdbool (Makefile.am): Remove explicit dependency on
16044         $(STDBOOL_H), redundant through BUILT_SOURCES.
16045         * modules/stdint (Makefile.am): Remove explicit dependency on
16046         $(STDINT_H), redundant through BUILT_SOURCES.
16047         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
16048         Remove explicit dependency on $(SYSEXITS_H).
16049         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
16050
16051 2005-07-18  Simon Josefsson  <jas@extundo.com>
16052
16053         * lib/check-version.c (check_version): Accept identical versions too.
16054
16055 2005-07-18  Bruno Haible  <bruno@clisp.org>
16056
16057         * modules/lock: New file.
16058         * MODULES.html.sh (Multithreading): New section.
16059
16060 2005-07-18  Bruno Haible  <bruno@clisp.org>
16061
16062         * m4/lock.m4: New file, from GNU gettext.
16063
16064 2005-07-18  Bruno Haible  <bruno@clisp.org>
16065
16066         * lib/lock.h: New file, from GNU gettext.
16067         * lib/lock.c: New file, from GNU gettext.
16068
16069 2005-07-18  Bruno Haible  <bruno@clisp.org>
16070
16071         * lib/lock.h (gl_once_t): New type.
16072         (gl_once_define, gl_once): New macros.
16073         * lib/lock.c (fresh_once): New variable.
16074         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
16075         functions.
16076
16077 2005-07-16  Simon Josefsson  <jas@extundo.com>
16078
16079         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
16080         workaround, suggested by Bruno.
16081
16082 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
16083
16084         * modules/xalloc (Depends-on): Add xalloc-die.
16085         * modules/xvasprintf (Depends-on): Add xalloc-die.
16086
16087 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
16088
16089         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
16090         with a minor change.
16091
16092 2005-07-15  Bruno Haible  <bruno@clisp.org>
16093
16094         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
16095         When using lib/poll.c, define poll as rpl_poll.
16096
16097 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
16098
16099         * modules/argp (Depends-on): Remove unlocked-io.
16100
16101 2005-07-14  Derek Price  <derek@ximbiot.com>
16102
16103         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
16104         for glob symlink bug.
16105
16106 2005-07-14  Bruno Haible  <bruno@clisp.org>
16107
16108         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
16109         Instead, test for *_unlocked function declarations directly.
16110
16111 2005-07-11  Simon Josefsson  <jas@extundo.com>
16112
16113         * modules/size_max: New file.
16114
16115         * modules/xsize: Depend on size_max module for size_max.m4.
16116
16117 2005-07-11  Simon Josefsson  <jas@extundo.com>
16118
16119         * lib/size_max.h: New file.
16120
16121 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
16122
16123         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
16124         copyright symbol and the year.
16125         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
16126         (version_etc_va): Use parameterized copyright notice.
16127         Reword to conform to the current GNU coding standards.
16128
16129 2005-07-11  Karl Berry  <karl@gnu.org>
16130
16131         * doc/gnulib.texi (Quoting): new node.
16132         (Initial import): more info, from Patrice.
16133
16134 2005-07-11  Bruno Haible  <bruno@clisp.org>
16135
16136         * gnulib-tool (func_usage): Document option --avoid.
16137         (Command line options): Handle --avoid.
16138         (func_acceptable): New function.
16139         (func_modules_transitive_closure): Use it.
16140
16141 2005-07-11  Bruno Haible  <bruno@clisp.org>
16142
16143         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
16144         Reported by Jim Meyering.
16145
16146 2005-07-10  Bruno Haible  <bruno@clisp.org>
16147
16148         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
16149         Needed when size_t is smaller than 'unsigned int'.
16150         Reported by Paul Eggert.
16151
16152 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16153
16154         * modules/argp (Depends-on): Add unlocked-io
16155
16156 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16157
16158         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
16159         block of defines.
16160
16161 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
16162
16163         * config/srclist.txt: Comment out regcomp.c, since we have a porting
16164         fix now.
16165
16166 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
16167         and Paul Eggert  <eggert@cs.ucla.edu>
16168
16169         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
16170         in wint_t, not wchar_t.  Remove now-unnecessary cast.
16171
16172 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16173
16174         * modules/regex (Files): Add lib/regex_internal.c,
16175         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
16176         (Depends-on): Add extensions.
16177         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
16178
16179 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16180
16181         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
16182         pathconf.
16183         * m4/same.m4 (gl_SAME): Likewise.
16184         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
16185
16186         * m4/regex.m4: Adjust to new libc regex implementation.
16187         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
16188         all the .c and .h parts of (the new) regex.
16189         Quote the m4 stuff better.
16190         Check for RE_ICASE bug of old gnulib.
16191         Check for REG_STARTEND of recent libc.
16192         Rename local variables from jm_* to gl_*.
16193         Quote operand of "test -f".
16194         Say "recent enough" version of libc, not "version 2".
16195         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
16196         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
16197         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
16198         Remove check for btowc, isascii.
16199         Require AM_LANGINFO_CODESET.
16200
16201 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16202
16203         * lib/regex.c, regex.h: Sync from libc.
16204         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
16205         * lib/regexec.c:
16206         New files, synced from libc, except that regex_internal.h
16207         currently has a small porting fix.
16208
16209 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
16210
16211         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
16212         regex_internal.c, regexec.c.
16213         Add regex_internal.h too, but as a comment, since the libc version
16214         is currently broken in gnulib mode.
16215
16216 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
16217
16218         Support programs like Emacs that use gnulib but not gettext.
16219         * MODULES.html.sh (Internationalization functions): Add gettext-h.
16220         * modules/gettext-h: New file.
16221         * modules/gettext (Files): Remove lib/gettext.h.
16222         (Depends-on): Add gettext-h.
16223         (Makefile.am): Remove lib_SOURCES.
16224         * modules/argmatch, modules/c-stack, modules/closeout:
16225         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
16226         * modules/execute, modules/file-type, modules/getaddrinfo:
16227         * modules/getopt, modules/human, modules/javacomp:
16228         * modules/javaexec, modules/mkdir-p, modules/obstack:
16229         * modules/openat, modules/pagealign_alloc, modules/pipe:
16230         * modules/quotearg, modules/regex, modules/rpmatch:
16231         * modules/unicodeio, modules/userspec, modules/version-etc:
16232         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
16233         * modules/xsetenv:
16234         Depend on gettext-h, not gettext.
16235
16236 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
16237
16238         * gnulib-tool (func_import): Add support for 'public domain' license.
16239         * modules/alloca, modules/atexit, modules/memmove:
16240         Now public domain, not GPL.
16241         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
16242         * modules/realloc, modules/strerror, modules/strtod:
16243         Now LGPL, not GPL.
16244
16245 2005-07-05  Bruno Haible  <bruno@clisp.org>
16246
16247         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
16248         autoconf CVS. Needed for mingw.
16249
16250 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16251
16252         Remove the dependency of the strftime module on the tzset module.
16253         * modules/strftime (Depends-on): Remove dependency on tzset.
16254
16255 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16256
16257         Remove the dependency of the strftime module on the tzset module.
16258         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
16259         gl_FUNC_TZSET_CLOBBER.
16260
16261 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
16262
16263         Remove the dependency of the strftime module on the tzset module.
16264         * lib/strftime.c (my_strftime)
16265         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
16266         Copy the input structure, to work around some of the bug with
16267         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
16268         Solaris releases, you should also use the tzset module, but we won't
16269         require it as a dependency any more since we don't want LGPLed code
16270         to depend on GPLed code.
16271
16272 2005-07-02  Jim Meyering  <jim@meyering.net>
16273
16274         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
16275         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
16276         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
16277         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
16278
16279 2005-07-02  Jim Meyering  <jim@meyering.net>
16280
16281         * lib/backupfile.c (backup_args): Change a `0' to NULL.
16282
16283 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
16284
16285         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
16286         declares only 'struct timespec;' (!).
16287
16288 2005-07-01  Jim Meyering  <jim@meyering.net>
16289
16290         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
16291         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
16292         * lib/save-cwd.c, tempname.c:
16293         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
16294         and don't include <sys/file.h>).
16295
16296 2005-06-29  Jim Meyering  <jim@meyering.net>
16297
16298         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
16299         type name.  Use the variable name instead.
16300         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
16301         Likewise.
16302
16303 2005-06-28  Simon Josefsson  <jas@extundo.com>
16304
16305         * modules/check-version (Files): Add check-version.m4.
16306
16307 2005-06-28  Simon Josefsson  <jas@extundo.com>
16308
16309         * m4/check-version.m4: New file, suggested by Jim Meyering
16310         <jim@meyering.net>.
16311
16312 2005-06-28  Simon Josefsson  <jas@extundo.com>
16313
16314         * lib/check-version.h, lib/check-version.c: New files.
16315
16316 2005-06-28  Simon Josefsson  <jas@extundo.com>
16317
16318         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
16319         collision with global variable.  Better indentation.  Don't
16320         increment buffer pointer beyond buffer end.  Based on comments
16321         from Paul Eggert <eggert@cs.ucla.edu>.
16322
16323         * lib/base64.h: Indent.
16324
16325 2005-06-28  Simon Josefsson  <jas@extundo.com>
16326
16327         * doc/gnulib.texi (Library version handling): New section.
16328
16329 2005-06-28  Jim Meyering  <jim@meyering.net>
16330
16331         * check-module (find_included_lib_files): Hard-code another
16332         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
16333         but modules/fts-lgpl (correctly) does not list those files.
16334
16335         * modules/canonicalize (Files): Add lib/pathmax.h.
16336
16337 2005-06-25  Simon Josefsson  <jas@extundo.com>
16338
16339         * modules/check-version: New file.
16340
16341 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
16342
16343         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
16344         initializer of struct addrinfo, as an indication that we don't
16345         care how many members the structure has.
16346
16347 2005-06-24  Derek Price  <derek@ximbiot.com>
16348         and Bruno Haible  <bruno@clisp.org>
16349
16350         Remove stat module & update lstat.
16351         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
16352         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
16353         * m4/stat.m4: Remove this file.
16354
16355 2005-06-24  Derek Price  <derek@ximbiot.com>
16356         and Bruno Haible  <bruno@clisp.org>
16357
16358         Remove stat module & update lstat.
16359         * lib/stat.c: Remove this file...
16360         (slash_aware_lstat): ...moving this content and its support...
16361         * lib/lstat.c (rpl_lstat): ...into here.
16362         * lib/lstat.h: New file.
16363
16364 2005-06-24  Derek Price  <derek@ximbiot.com>
16365         and Bruno Haible  <bruno@clisp.org>
16366
16367         Remove stat module & update lstat.
16368         * config/srclist.txt (libc sources): Remove stat.
16369
16370 2005-06-24  Derek Price  <derek@ximbiot.com>
16371         and Bruno Haible  <bruno@clisp.org>
16372
16373         Remove stat module & update lstat.
16374         * MODULES.html.sh (stat): Remove.
16375         * MODULES.html: Regenerated.
16376         * modules/lstat (Description): Correct function name.
16377         (Files): Add "lstat.h".
16378         (Depends-on): Remove stat, add xalloc, stat-macros.
16379         * modules/stat: Remove this file.
16380         (Include): Add "lstat.h", remove <sys/stat.h>.
16381
16382 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
16383
16384         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
16385         (ranged_convert): Don't save conversion in a temporary struct.
16386         This causes a warning with GCC 4.0.0, and anyway in the typical
16387         case it's not worth the extra 100 bytes or so of code.
16388         (ranged_convert, __mktime_internal): When calling a function via a
16389         pointer P, use P () rather than (*P) (), as we now assume C89 or
16390         better.
16391
16392 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16393
16394         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
16395         "who -r" failed to give output.  Problem reported by Tim Waugh.
16396
16397         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
16398         (xcalloc): Use it to avoid needless tests.
16399         Problem reported by Jim Meyering.
16400
16401 2005-06-20  Derek Price  <derek@ximbiot.com>
16402
16403         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
16404         unnecessary for Autoconfs > 2.59c.
16405
16406 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16407
16408         * lib/argp.h (__option_is_short): Check upper limit of
16409         __key. Isprint() requires its argument to have the value
16410         of an unsigned char or EOF.
16411
16412 2005-06-16  Jim Meyering  <jim@meyering.net>
16413
16414         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
16415         when either N or S is zero.
16416
16417 2005-06-16  Derek Price  <derek@ximbiot.com>
16418
16419         * m4/bison.m4: Declare YACC & YFLAGS precious.
16420
16421 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
16422
16423         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
16424         multibyte string or pattern, fall back on unibyte matching.
16425         Problem reported by James Youngman.
16426
16427 2005-06-08  Bruno Haible  <bruno@clisp.org>
16428
16429         * modules/csharpcomp: New file.
16430         * MODULES.html.sh (C#): Add csharpcomp.
16431
16432 2005-06-08  Bruno Haible  <bruno@clisp.org>
16433
16434         * m4/csharpcomp.m4: New file, from GNU gettext.
16435
16436 2005-06-08  Bruno Haible  <bruno@clisp.org>
16437
16438         * lib/csharpcomp.h: New file, from GNU gettext.
16439         * lib/csharpcomp.c: New file, from GNU gettext.
16440         * lib/csharpcomp.sh.in: New file, from GNU gettext.
16441
16442 2005-06-08  Bruno Haible  <bruno@clisp.org>
16443
16444         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
16445         warning on mingw.
16446
16447 2005-06-07  Derek Price  <derek@ximbiot.com>
16448
16449         Sync from CVS.
16450         * lib/glob_.h: Indent nested #ifdef.
16451
16452 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16453
16454         Sync from coreutils.
16455         Use "file name" when talking about file names, instead of "filename"
16456         or "path", as per the GNU coding standards.
16457         * lib/mkdir-p.c: Renamed from makepath.c.
16458         (make_dir_parents): Renamed from make_path.  All callers changed.
16459         * lib/mkdir-p.h: Likewise.  All includers changed.
16460         * lib/filenamecat.c: Renamed from path-concat.c.
16461         (file_name_concat): Renamed from path_concat.  All callers changed.
16462         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
16463         * lib/filenamecat.h: Likewise.  All includers changed.
16464         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
16465         in comments or local variable names.
16466         * lib/basename.c: Likewise.
16467         * lib/canonicalize.c, canonicalize.h: Likewise.
16468         * lib/dirname.c, dirname.h: Likewise.
16469         * lib/euidaccess.c: Likewise.
16470         * lib/exclude.c: Likewise
16471         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
16472         * lib/fsusage.c, fsuage.h: Likewise.
16473         * lib/fts.c, fts_.h: Likewise.
16474         * lib/getcwd.c: Likewise.
16475         * lib/getloadavg.c: Likewise.
16476         * lib/mkstemp.c: Likewise.
16477         * lib/mountlist.c, mountlist.h: Likewise.
16478         * lib/openat.c, openat.h: Likewise.
16479         * lib/readlink-stub.c: Likewise.
16480         * lib/readutmp.c, readutmp.h: Likewise.
16481         * lib/rename.c: Likewise.
16482         * lib/rmdir.c: Likewise.
16483         * lib/same.c: Likewise.
16484         * lib/savedir.c: Likewise.
16485         * lib/stripslash.c: Likewise.
16486         * lib/tempname.c: Likewise.
16487         * lib/xreadlink.c: Likewise.
16488         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
16489         All uses changed.
16490         * lib/exclude.h: Likewise.
16491
16492         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
16493         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16494         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
16495         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16496         * lib/pathmax.h: Include <limits.h> unconditionally, since other
16497         files have been getting away with it for years (MORE/BSD 4.3
16498         is extinct now).
16499         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
16500         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
16501
16502         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
16503         Define to 256, not 255, as per modern POSIX.
16504
16505 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16506
16507         Sync from coreutils.
16508         Use "file name" when talking about file names, instead of "filename"
16509         or "path", as per the GNU coding standards.
16510         * MODULES.html.sh: mkdir-p renamed from makepath.
16511         filenamecat renamed from path-concat.
16512         * modules/filenamecat: Renamed from modules/path-concat.
16513         (Files): filenamecat.h and filenamecat.c renamed from
16514         path-concat.h and path-concat.c.
16515         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
16516         (Include): filenamecat.h, not path-concat.h.
16517         * modules/mkdir-p: Renamed from modules/makepath.
16518         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
16519         makepath.c.
16520         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
16521         (Include): mkdir-p.h, not makepath.h.
16522
16523 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
16524
16525         Sync from coreutils.
16526         * m4/mkdir-p.m4: Renamed from makepath.m4.
16527         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
16528         Rename files from makepath.c to mkdir-p.c, and from
16529         makepath.h to mkdir-p.h.
16530         * m4/filenamecat.m4: Renamed from path-concat.m4.
16531         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
16532         Rename files from path-concat.c to filenamecat.c,
16533         and from path-concat.h to filenamecat.h.
16534         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
16535         "file name" in local variables or comments.
16536         * m4/rename.m4: Likewise.
16537
16538 2005-06-01  Bruno Haible  <bruno@clisp.org>
16539
16540         * modules/csharpexec: New file.
16541         * MODULES.html.sh (C#): New section.
16542
16543 2005-06-01  Bruno Haible  <bruno@clisp.org>
16544
16545         * m4/csharp.m4: New file, from GNU gettext.
16546         * m4/csharpexec.m4: New file, from GNU gettext.
16547
16548 2005-06-01  Bruno Haible  <bruno@clisp.org>
16549
16550         * lib/csharpexec.h: New file, from GNU gettext.
16551         * lib/csharpexec.c: New file, from GNU gettext.
16552         * lib/csharpexec.sh.in: New file, from GNU gettext.
16553
16554 2005-05-31  Derek Price  <derek@ximbiot.com>
16555             Paul Eggert  <eggert@cs.ucla.edu>
16556
16557         Sync from cvs.
16558         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
16559
16560 2005-05-31  Derek Price  <derek@ximbiot.com>
16561             Paul Eggert  <eggert@cs.ucla.edu>
16562
16563         Sync from cvs.
16564         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
16565
16566 2005-05-29  Derek Price  <derek@ximbiot.com>
16567
16568         * config/srclist.txt (glob_.h, glob.c): Add these files.
16569
16570 2005-05-29  Derek Price  <derek@ximbiot.com>
16571
16572         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
16573         * modules/glob: New file.
16574         * modules/getlogin_r: Add link to POSIX spec in description.
16575
16576 2005-05-29  Derek Price  <derek@ximbiot.com>
16577             Paul Eggert  <eggert@cs.ucla.edu>
16578
16579         * m4/glob.m4: New file.
16580
16581 2005-05-29  Derek Price  <derek@ximbiot.com>
16582             Paul Eggert  <eggert@cs.ucla.edu>
16583
16584         * lib/glob_.h, lib/glob.c: New files.
16585
16586 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16587
16588         * modules/fts (Files): Remove m4/inttypes-pri.m4.
16589         * modules/fts-lgpl (Depends-on): Remove gettext.
16590
16591 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16592
16593         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
16594         and don't require gt_INTTYPES_PRI.
16595
16596 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
16597
16598         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
16599
16600         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
16601         the configuration hassle isn't worth it.
16602         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
16603         (LONGEST_MODIFIER, PRIuMAX): Remove.
16604
16605 2005-05-27  Bruno Haible  <bruno@clisp.org>
16606
16607         * lib/getlogin_r.h: Remove second include of <stddef.h>.
16608
16609 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
16610
16611         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
16612         _POSIX_PTHREAD_SEMANTICS for Solaris.
16613
16614 2005-05-25  Derek Price  <derek@ximbiot.com>
16615
16616         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
16617
16618 2005-05-25  Derek Price  <derek@ximbiot.com>
16619             Paul Eggert  <eggert@cs.ucla.edu>
16620
16621         * modules/getlogin_r, m4/getlogin_r.m4: New files.
16622         * lib/getlogin_r.c, getlogin_r.h: New files.
16623
16624 2005-05-25  Bruno Haible  <bruno@clisp.org>
16625             Derek Price  <derek@ximbiot.com>
16626
16627         * lib/getlogin_r.h: Simplify API documentation.
16628
16629 2005-05-23  Derek Price  <derek@ximbiot.com>
16630
16631         * modules/minmax (Files): Add m4/minmax.m4.
16632         (configure.ac): Add gl_MINMAX.
16633
16634 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
16635
16636         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
16637         so that unistd-safer.h (GPL'ed code) need not be included.
16638
16639 2005-05-22  Bruno Haible  <bruno@clisp.org>
16640
16641         * m4/minmax.m4: New file.
16642         Based on a patch by Derek Price <derek@ximbiot.com>.
16643
16644 2005-05-22  Bruno Haible  <bruno@clisp.org>
16645
16646         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
16647         (INT64_MIN): Fix definition.
16648         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
16649
16650         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
16651         NEED_SIGNED_INT_TYPES.
16652
16653         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
16654         HAVE_SYSTEM_INTTYPES.
16655
16656 2005-05-22  Bruno Haible  <bruno@clisp.org>
16657
16658         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
16659         Also include <sys/param.h> if it defines MIN, MAX.
16660         Based on a patch by Derek Price <derek@ximbiot.com>.
16661
16662 2005-05-21  Jim Meyering  <jim@meyering.net>
16663
16664         * modules/fts (Files): Add m4/inttypes-pri.m4.
16665         (Depends-on): Add lstat and remove gettext.  Alphabetize.
16666
16667 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16668
16669         New fts module.
16670         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
16671         (setup_dir, free_dir): New functions.
16672         (enter_dir, leave_dir): Define trivial
16673         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
16674         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
16675         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
16676         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
16677         Move to fts-cycle.c.
16678         (fts_open): Use setup_dir.
16679         (fts_close): Use free_dir.
16680         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
16681         This adds a label and some gotos, but the alternatives were messier.
16682         Check for memory allocation failure when entering a dir.
16683         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
16684         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
16685         (FTS): New member fts_cycle, that is a union that contains the
16686         old active_dir_ht and cycle_state.  All uses changed to mention
16687         fts_cycle.ht and fts_cycle.state.
16688         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
16689         fts.c, with the following changes:
16690         (setup_dir, free_dir): New functions.
16691         (enter_dir): Now returns bool.  Return true if successful, false
16692         if memory exhausted.  All callers changed.
16693         Do not bother partly cleaning up on
16694         memory allocation failure; that is free_dir's job.
16695         However, free ad if hash_insert fails, to avoid memory leak.
16696         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
16697         fts->fts_options to see which union member to use.
16698
16699 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16700
16701         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
16702         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
16703
16704 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16705
16706         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
16707
16708 2005-05-20  Jim Meyering  <jim@meyering.net>
16709
16710         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
16711         Now a macro, to pacify GCC.
16712
16713 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
16714
16715         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
16716         of -1.
16717
16718 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
16719
16720         * lib/chown.c (rpl_chown): Return -1 on failure.
16721
16722 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
16723
16724         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
16725         Don't check for stddef.h.
16726         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
16727         don't use its results.
16728         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
16729         since we include them unconditionally.  Don't require
16730         AM_STDBOOL_H, since stdbool is a prerequisite.
16731         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
16732         since we assume C89 or better.
16733         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
16734         as we don't use their results.
16735         Don't check for fchdir, memmove, memset, strrchr, as we use
16736         them unconditionally.
16737         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
16738         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
16739
16740 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
16741
16742         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
16743         Include <stddef.h> unconditionally, since we assume C89 now.
16744         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
16745         * lib/fts.c: Include fts_.h first, to check interface.
16746         Do not include intprops.h; no longer needed.
16747         Include cycle-check.h and hash.h, since fts_.h no longer does.
16748         Remove unnecessary casts of closedir to void.
16749         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
16750         decide whether to decrement nlinks.
16751         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
16752         (FTS): Use struct hash_table * instead of Hash_table, so that
16753         we no longer need to include hash.h here.
16754
16755 2005-05-18  Jim Meyering  <jim@meyering.net>
16756
16757         * modules/dirfd (License): Change to LGPL.  Most of the code
16758         is already in the public domain.
16759
16760 2005-05-18  Jim Meyering  <jim@meyering.net>
16761
16762         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
16763         Reported by Yoann Vandoorselaere.
16764
16765 2005-05-17  Jim Meyering  <jim@meyering.net>
16766
16767         * m4/fts.m4: New file, from coreutils.
16768
16769 2005-05-17  Jim Meyering  <jim@meyering.net>
16770
16771         * lib/fts.c, lib/fts_.h: New files, from coreutils.
16772
16773 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16774
16775         Sync from coreutils.
16776         * m4/unlinkdir.m4: New file.
16777
16778 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16779
16780         Sync from coreutils.
16781         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
16782         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
16783         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
16784         White space changes only.
16785         * lib/makepath.c (make_path): Port to hosts where leading "//" is
16786         special.
16787         * lib/yesno.c: Include getline.h, not ctype.h.
16788         (yesno): Don't remove leading white space; POSIX doesn't allow it.
16789         Use getline to remove arbitrary restriction on response length.
16790
16791 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
16792
16793         * config/srclist-update: Spell out "Street" in FSF postal
16794         mail address; this is the style the FSF seems to prefer.
16795
16796         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
16797         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
16798         this updates FSF postal mail address.
16799
16800         Sync from coreutils.
16801         * modules/unlinkdir: New file.
16802         * modules/yesno (Depends-on): Add getline.
16803         * MODULES.html.sh (File system functions): Add unlinkdir.
16804
16805 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16806
16807         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
16808         lib/strsep.h:
16809         Change the initial comment to refer to GPL, not LGPL.
16810         gnulib-tool will change it to LGPL as needed.
16811
16812         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
16813         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
16814         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
16815         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
16816         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
16817         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
16818         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
16819         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
16820         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
16821         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
16822         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
16823         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
16824         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
16825         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
16826         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
16827         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
16828         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
16829         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
16830         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
16831         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
16832         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
16833         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
16834         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
16835         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
16836         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
16837         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
16838         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
16839         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
16840         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
16841         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
16842         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
16843         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
16844         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
16845         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
16846         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
16847         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
16848         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
16849         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
16850         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
16851         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
16852         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
16853         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
16854         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
16855         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
16856         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
16857         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
16858         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
16859         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
16860         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
16861         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
16862         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16863         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
16864         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
16865         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
16866         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
16867         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
16868         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
16869         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
16870         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
16871         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
16872         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
16873         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
16874         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
16875         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
16876         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
16877         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
16878         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
16879         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
16880         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
16881         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
16882         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
16883         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
16884         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
16885         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
16886         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
16887         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
16888         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
16889         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
16890         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
16891         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
16892         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
16893         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
16894         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
16895         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
16896         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
16897         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
16898         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
16899         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
16900         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
16901         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
16902         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
16903         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
16904         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
16905         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
16906         lib/yesno.c, lib/yesno.h:
16907         Update FSF postal mail address.
16908
16909 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16910
16911         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
16912         tests/test-memmem.c, tests/test-stpncpy.c:
16913         Update FSF postal mail address.
16914
16915 2005-05-13  Bruno Haible  <bruno@clisp.org>
16916
16917         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
16918         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
16919         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
16920         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
16921         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
16922         Add support for 64-bit integers in the MSVC compiler.
16923
16924 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16925
16926         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
16927
16928 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
16929
16930         * gnulib-tool (func_import): Sort and uniquify recommended includes.
16931
16932 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
16933
16934         * doc/getdate.texi (General date syntax): Don't say that date
16935         date --iso-8601=ns generates acceptable dates; it doesn't yet.
16936         Problem reported by Nic Ferrier.
16937
16938 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16939
16940         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
16941         specified in ai_socktype. Fix invalid ai_protocol
16942         check. ai_protocol is usually set to 0 or depending on
16943         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
16944         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
16945         ai_socktype / ai_protocol in the returned addrinfo structure.
16946
16947 2005-05-10  Simon Josefsson  <jas@extundo.com>
16948
16949         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
16950         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
16951
16952 2005-05-10  Karl Berry  <karl@gnu.org>
16953
16954         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
16955         (from http://www.gnu.org/licenses).
16956         * doc/COPYING.LIB: also rename to COPYING.LESSER.
16957         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
16958         fdl.texi suffices.
16959
16960 2005-05-10  Karl Berry  <karl@gnu.org>
16961
16962         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
16963         (COPYING.DOC): remove.
16964
16965         * config/srclist-update: new FSF address.
16966
16967 2005-05-10  Derek Price  <derek@ximbiot.com>
16968
16969         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
16970         possible.
16971
16972 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16973             Bruno Haible  <bruno@clisp.org>
16974
16975         * modules/inet_ntop: New file.
16976         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16977         inet_ntop.
16978
16979 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16980             Bruno Haible  <bruno@clisp.org>
16981
16982         * m4/inet_ntop.m4: New file.
16983
16984 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
16985             Bruno Haible  <bruno@clisp.org>
16986
16987         * lib/inet_ntop.h: New file.
16988         * lib/inet_ntop.c: New file, from glibc with modifications.
16989
16990 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
16991
16992         * modules/time_r (License): Change to LGPL.
16993         * modules/extensions (License): Change to LGPL.  Actually,
16994         the license is more permissive than that, but currently gnulib-tool
16995         doesn't know how to handle more-permissive licenses.
16996
16997         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
16998         Problem reported by Dave Love.
16999
17000 2005-05-08  Jim Meyering  <jim@meyering.net>
17001
17002         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
17003         blank.
17004
17005 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
17006
17007         * modules/argmatch (Depends-on): Add stdbool.
17008         * modules/backupfile (Depends-on): Likewise.
17009         * modules/chdir-long (Depends-on): Likewise.
17010         * modules/closeout (Depends-on): Likewise.
17011         * modules/cycle-check (Depends-on): Likewise.
17012         * modules/dirname (Depends-on): Likewise.
17013         * modules/fnmatch (Depends-on): Likewise.
17014         * modules/fsusage (Depends-on): Likewise.
17015         * modules/fwriteerror (Depends-on): Likewise.
17016         * modules/getcwd (Depends-on): Likewise.
17017         * modules/getloadavg (Depends-on): Likewise.
17018         * modules/hard-locale (Depends-on): Likewise.
17019         * modules/makepath (Depends-on): Likewise.
17020         * modules/mountlist (Depends-on): Likewise.
17021         * modules/nanosleep (Depends-on): Likewise.
17022         * modules/posixtm (Depends-on): Likewise.
17023         * modules/quotearg (Depends-on): Likewise.
17024         * modules/readtokens (Depends-on): Likewise.
17025         * modules/readtokens0 (Depends-on): Likewise.
17026         * modules/readutmp (Depends-on): Likewise.
17027         * modules/save-cwd (Depends-on): Likewise.
17028         * modules/strftime (Depends-on): Likewise.
17029         * modules/userspec (Depends-on): Likewise.
17030         * modules/utimecmp (Depends-on): Likewise.
17031         * modules/xgetcwd (Depends-on): Likewise.
17032         * modules/xnanosleep (Depends-on): Likewise.
17033         * modules/xstrtod (Depends-on): Likewise.
17034         * modules/yesno (Depends-on): Likewise.
17035
17036 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
17037
17038         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
17039         needless checks.
17040
17041 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17042
17043         Merge from coreutils.  Among other things,
17044         add bulletproofing for cases where stdin, stdout, or stderr are closed.
17045         * lib/fd-safer.c: New file.
17046         * lib/fcntl-safer.h, open-safer.c: Remove.
17047         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
17048         * lib/dup-safer.c: Include unistd-safer.h first.
17049         Don't include errno.h.
17050         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
17051         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
17052         * lib/file-type.c: Rely on file-type.h change.
17053         * lib/getloadavg.c: Include unistd-safer.h.
17054         (getloadavg): Use safer open.
17055         * lib/getusershell.c: Include "stdio-safer.h".
17056         (getusershell): Use safer fopen.
17057         * lib/long-options.c (long_options): Use NULL rather than 0.
17058         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
17059         'free'.
17060         * lib/modechange.c: Likewise.
17061         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
17062         (MODE_DONE): New constant.
17063         (struct mode_change): Remove 'next' member.
17064         (make_node_op_equals): New function; like the old one of the
17065         same name, except it allocates an array.
17066         (mode_compile, mode_create_from_ref): Use it.
17067         (mode_compile): Allocate result as an array, not a linked list.
17068         Parse octal string ourself, so that we catch mistakes like "+0".
17069         (mode_adjust): Arg is an array, not a linked list.
17070         * lib/modechange.c: Include stat-macros.h, xalloc.h.
17071         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
17072         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
17073         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
17074         Remove.  This is now stat-macros.h's job.
17075         (talloc): Remove.  All callers replaced by xalloc, so that
17076         our invokers don't have to worry about reporting memory failures.
17077         (make_node_op_equals): Remove.
17078         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
17079         New constants.
17080         (struct mode_change): Moved here from modechange.h.
17081         (mode_append_entry): Remove.
17082         (mode_compile): Remove MASKED_OPS arg, since it encouraged
17083         apps to have incorrect behavior.  Use simpler algorithm for head
17084         and tail.  Don't futz with umask; that's now the job of mode_adjust.
17085         Detect more invalid usages rather than having somewhat-random behavior.
17086         Don't insert an "a=" action, as that leads to incorrect behavior.
17087         (mode_compile, mode_create_from_ref): Return NULL on error instead
17088         of an enum, since now there's only one way to have an error.  All
17089         callers changed.
17090         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
17091         at the correct time.  Simplify calculation of "+u" and its ilk.
17092         Don't mishandle "+X".
17093         (mode_free): Remove "register" and localize decls.
17094         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
17095         (struct mode_change): Move to modechange.c; callers don't
17096         need to see this stuff.
17097         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
17098         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
17099         (mode_change, mode_adjust): Reflect the new signatures noted above.
17100         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
17101         that might redefine system include files.
17102         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
17103         (my_usleep): Use NULL rather than (void *) 0.
17104         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
17105         Use siginterrupt to specify that system calls should be interrupted.
17106         (rpl_nanosleep): Move initialization of suspended closer to call of
17107         my_usleep.
17108         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
17109         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
17110         (desirable_utmp_entry): New function.
17111         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
17112         using x2nrealloc, to simplify logic.
17113         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
17114         size calculation.  Do not assume utmp file is a regular file.
17115         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
17116         (READ_UTMP_CHECK_PIDS): New constant.
17117         * lib/save-cwd.c: Include unistd-safer.h.
17118         (save_cwd): Use fd_safer.
17119         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
17120         [!_LIBC] Include "stat-macros.h" instead.
17121         * lib/unistd-safer.h (fd_safer): New decl.
17122
17123 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17124
17125         * modules/getloadavg (Depends-on): Add unistd-safer.
17126         * modules/getusershell (Depends-on): Add stdio-safer.
17127         * modules/lstat (Depends-on): Remove xalloc.
17128         * modules/mkstemp (Depends-on): Add stat-macros.
17129         * modules/modechange (Depends-on): Remove xstrtol.
17130         Add stat-macros, xalloc.
17131         * modules/save-cwd (Depends-on): Add unistd-safer.
17132         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
17133         * modules/unistd-safer (Files): Add lib/fd-safer.c
17134         (Makefile.am): Remove lib_SOURCES.
17135
17136         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
17137         Remove fcntl-safer; unistd-safer supersedes it.
17138
17139 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17140
17141         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
17142         AC_HEADER_STAT.
17143         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
17144         (gl_PREREQ_CHOWN): Remove.
17145         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
17146         it.  Don't require AC_HEADER_STAT.
17147         (gl_PREREQ_LSTAT): Remove.
17148         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
17149         Don't require AC_HEADER_STAT.
17150         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
17151         (gl_PREREQ_RMDIR): Remove.
17152         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
17153         mention stat-macros.h or AC_HEADER_STAT, since we'll make
17154         the stat-macros module a prerequisite.
17155         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
17156         * m4/filemode.m4 (gl_FILEMODE): Likewise.
17157         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
17158         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
17159         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
17160         variable names.
17161         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
17162         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
17163         variable prefixes.
17164         * m4/fcntl-safer.m4: Remove.
17165         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
17166         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
17167         Invoke gl_PREREQ_FD_SAFER.
17168         (gl_PREREQ_FD_SAFER): New macro.
17169         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
17170         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
17171         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
17172         Remove duplicate call to AC_LIBOBJ(readutmp).
17173         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
17174
17175         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
17176         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
17177
17178 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
17179
17180         * MODULES.html.sh (Misc): Add byteswap.
17181
17182 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17183
17184         * modules/getcwd (Depends-on): Add extensions.
17185         * modules/openat (Depends-on): Likewise.
17186
17187 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17188
17189         * modules/byteswap: New file.
17190
17191 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17192
17193         * m4/byteswap.m4: New file.
17194
17195 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
17196
17197         * lib/byteswap_.h: New file.
17198
17199 2005-04-25  Karl Berry  <karl@gnu.org>
17200
17201         * m4/gettext.m4: Update from GNU gettext 0.14.4.
17202
17203 2005-04-25  Albert Chin  <china@thewrittenword.com>
17204
17205         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
17206         Toolkit C bug.
17207
17208 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
17209
17210         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
17211         (func_ln_if_changed) Remove forcibly for no error message
17212         in case file does not exist.
17213
17214 2005-04-19  Simon Josefsson  <jas@extundo.com>
17215
17216         * gnulib-tool (Options): Make --symlink mean --symbolic.
17217
17218 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
17219
17220         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
17221
17222 2005-04-16  Simon Josefsson  <jas@extundo.com>
17223
17224         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
17225
17226 2005-04-15  Simon Josefsson  <jas@extundo.com>
17227
17228         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
17229
17230 2005-04-15  Simon Josefsson  <jas@extundo.com>
17231
17232         * gnulib-tool: Rename --symlink to --symbolic.
17233
17234 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
17235
17236         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
17237         symbolic links to files instead of copying/moving.  Add --aux-dir,
17238         specifying directory relative --dir where auxiliary build tools
17239         are placed.
17240
17241 2005-04-14  Bruno Haible  <bruno@clisp.org>
17242
17243         * modules/allocsa (License): Change to LGPL.
17244         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
17245
17246 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
17247
17248         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
17249         that "UTC +1 second" continues to work.  Problem reported
17250         by Dmitry V. Levin.
17251         (relunit_snumber): New rule.
17252         (relunit): Use it.
17253
17254 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
17255
17256         * lib/getdate.y (universal_time_zone_table): New constant.
17257         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
17258         universal_time_zone_table.
17259         (lookup_zone): Prefer universal_time_zone_table to
17260         local_time_zone_table, so that "GMT" time stamps are allowed in
17261         London during the summer.  Problem reported by Ian Abbott.
17262
17263 2005-04-12  Jim Meyering  <jim@meyering.net>
17264
17265         * lib/human.c (humblock): Set *options even when returning due to
17266         xstrtoumax conversion failure.  Thanks to a used-uninitialized
17267         warning from gcc-4.
17268
17269 2005-04-09  Jim Meyering  <jim@meyering.net>
17270
17271         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
17272         -Wuninitialized: initialize tm0.tm_year.
17273
17274 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
17275
17276         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
17277         count, since there's no maximum.  All uses changed.
17278         Add member dsts_seen.
17279         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
17280         not being INT_MAX.
17281         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
17282         Use pc_rels_seen to decide whther a date is absolute.
17283
17284         * lib/getdate.y (number): Don't overwrite year.
17285         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
17286         check.
17287
17288 2005-04-02  Simon Josefsson  <jas@extundo.com>
17289
17290         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
17291         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
17292
17293 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
17294
17295         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
17296         where no absolute path name can be longer than PATH_MAX.
17297
17298 2005-03-27  Jim Meyering  <jim@meyering.net>
17299
17300         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
17301
17302 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
17303
17304         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
17305         "one's complement" -> "ones' complement" in comment, as per Knuth.
17306         "value of type" -> "type or expression" in comment.
17307         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
17308
17309 2005-03-26  Jim Meyering  <jim@meyering.net>
17310
17311         Comment nits.
17312         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
17313         Correct typos: s/or/of/.
17314
17315 2005-03-26  Jim Meyering  <jim@meyering.net>
17316
17317         * modules/check-include-files: Move to ../ and rename to...
17318         * check-module: ...this.
17319
17320 2005-03-25  Jim Meyering  <jim@meyering.net>
17321
17322         * modules/xvasprintf (Files): Add xalloc.h.
17323
17324 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
17325
17326         * modules/gettext (Files): config/config.rpath ->
17327         build-aux/config.rpath
17328         * modules/iconv (Files): Likewise.
17329         Problem reported by Oskar Liljeblad.
17330
17331 2005-03-23  Jim Meyering  <jim@meyering.net>
17332
17333         * modules/check-include-files: New script to check for
17334         missing dependencies, multiple includes, etc.
17335
17336         * modules/c-strtold (Depends-on): Add xalloc.
17337         * modules/c-strtod (Depends-on): Add xalloc.
17338         * modules/hash (Depends-on): Add xalloc.
17339         (Files): Remove lib/xalloc.h.
17340
17341         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
17342         * modules/userspec (Files): Add lib/inttostr.h.
17343
17344 2005-03-23  Jim Meyering  <jim@meyering.net>
17345
17346         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
17347
17348 2005-03-22  Jim Meyering  <jim@meyering.net>
17349
17350         * modules/stat-macros: New module.
17351         * modules/canonicalize, modules/euidaccess, modules/file-type,
17352         * modules/filemode, modules/lchown, modules/makepath,
17353         * modules/rmdir, modules/stat: Depend on new stat-macros module
17354         rather than listing lib/stat-macros.h manually.
17355         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
17356
17357 2005-03-22  Jim Meyering  <jim@meyering.net>
17358
17359         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
17360
17361 2005-03-22  Bruno Haible  <bruno@clisp.org>
17362
17363         * config/srclist.txt: Replace target directory 'config' with
17364         'build-aux'.
17365         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
17366         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
17367         ../build-aux/.
17368
17369 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
17370
17371         * modules/chdir-long (Depends-on): Add mempcpy.
17372
17373         * modules/acl, modules/backupfile, modules/c-strtod,
17374         modules/c-strtold, modules/canon-host, modules/canonicalize,
17375         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
17376         modules/exclude, modules/exitfail, modules/file-type,
17377         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
17378         modules/getdate, modules/getline, modules/getpagesize,
17379         modules/getpass, modules/getugroups, modules/group-member,
17380         modules/hard-locale, modules/hash, modules/human, modules/idcache,
17381         modules/inttostr, modules/long-options, modules/makepath,
17382         modules/md5, modules/memcasecmp, modules/memcoll,
17383         modules/modechange, modules/mountlist, modules/path-concat,
17384         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
17385         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
17386         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
17387         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
17388         modules/strftime, modules/strndup, modules/strverscmp,
17389         modules/timespec, modules/unlocked-io, modules/userspec,
17390         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
17391         modules/yesno:
17392         Remove lib_SOURCES line from Makefile.am section, as this is now
17393         done automatically by the corresponding Autoconf macro.
17394
17395 2005-03-21  Jim Meyering  <jim@meyering.net>
17396
17397         Changes imported from coreutils.
17398
17399         * lib/cycle-check.c: Don't include xalloc.h.
17400
17401         * lib/path-concat.c: Don't include assert.h.
17402         (path_concat): Remove assertion that would have triggered
17403         for ABASE starting with more than one slash.
17404         Reported by Andreas Schwab.
17405
17406         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
17407         properly when ABASE is an absolute file name.
17408         Correct the description of this function.
17409         Include <assert.h>.
17410         Add an assertion and a test driver.
17411         This fixes a bug introduced on 2004-07-02.
17412         Andreas Schwab reported the resulting failure of cp --parents:
17413         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
17414
17415 2005-03-21  Jim Meyering  <jim@meyering.net>
17416
17417         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
17418         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
17419
17420 2005-03-21  Jim Meyering  <jim@meyering.net>
17421         and  Paul Eggert  <eggert@cs.ucla.edu>
17422
17423         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
17424         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
17425         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
17426         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
17427         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
17428         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
17429         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
17430         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
17431         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
17432         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
17433         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
17434         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
17435         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
17436         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
17437         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
17438         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
17439         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
17440         for these modules.
17441
17442 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
17443
17444         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
17445         (which shouldn't happen), generate nothing instead of returning 0
17446         immediately, so that nstrftime (NULL, ...) doesn't return 0.
17447
17448 2005-03-16  Bruno Haible  <bruno@clisp.org>
17449
17450         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
17451         HAVE_LONGLONG_64BIT.
17452
17453 2005-03-16  Bruno Haible  <bruno@clisp.org>
17454
17455         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
17456         HAVE_LONGLONG_64BIT.
17457
17458 2005-03-16  Bruno Haible  <bruno@clisp.org>
17459
17460         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
17461         HAVE_LONGLONG_64BIT.
17462
17463 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
17464
17465         * lib/strftime.c (my_strftime): Prepend space to format so that we can
17466         reliably distinguish strftime failure from empty output on POSIX
17467         hosts.
17468
17469 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
17470
17471         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
17472         (iconv_string): Don't guess a size-zero buffer, as that might cause
17473         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
17474         result would be 'too large', where 'too large' is (heuristically)
17475         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
17476         overflow concerns.  This will prevent some unwanted malloc failures
17477         when the inputs are very large.
17478
17479 2005-03-15  Karl Berry  <karl@gnu.org>
17480
17481         * config/srclist.txt (config.rpath): from gettext.
17482         * config/config.rpath: update.
17483
17484 2005-03-15  Bruno Haible  <bruno@clisp.org>
17485
17486         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
17487         to 'negate'.
17488
17489         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
17490         variable.
17491
17492         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
17493         results.
17494
17495 2005-03-14  Simon Josefsson  <jas@extundo.com>
17496
17497         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
17498         <fx@gnu.org>.
17499
17500 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
17501
17502         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
17503         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
17504         intprops.h.
17505         * lib/strtol.c: Likewise.
17506
17507 2005-03-14  Jim Meyering  <jim@meyering.net>
17508
17509         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
17510         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
17511         to be nonzero so that we (and caller) can detect the difference
17512         between a valid zero-length expansion and an error return, even
17513         when the underlying strftime fails before writing anything into
17514         that location.
17515
17516 2005-03-14  Bruno Haible  <bruno@clisp.org>
17517
17518         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
17519         Update from GNU gettext 0.14.3.
17520
17521 2005-03-10  Jim Meyering  <jim@meyering.net>
17522
17523         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
17524
17525 2005-03-10  Jim Meyering  <jim@meyering.net>
17526
17527         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
17528         so that this module works on systems without fchdir.
17529
17530 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
17531
17532         Factor int-properties macros into a single file, except for
17533         glibc-related files.
17534         * lib/intprops.h: New file.
17535         * lib/getloadavg.c: Include it instead of limits.h.
17536         (INT_STRLEN_BOUND): Remove.
17537         * lib/human.c: Include intprops.h.
17538         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
17539         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
17540         302/1000.
17541         * lib/inttostr.h: Include intprops.h instead of limits.h.
17542         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
17543         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
17544         for consistency with intprops.h.
17545         (time_t_is_integer, twos_complement_arithmetic): Use them.
17546         * lib/sig2str.h: Include <signal.h>, intprops.h.
17547         (INT_STRLEN_BOUND): Remove.
17548         * lib/strftime.c (TYPE_SIGNED): Remove.
17549         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
17550         * lib/strtol.c: Adjust comments to match intprops.h.
17551         * lib/userspec.c: Include intprops.h.
17552         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
17553         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
17554         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
17555         instead of rolling our own expressions.
17556         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
17557
17558         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
17559         instead of int.
17560         (my_strftime): Do not mishandle years close to INT_MAX, by doing
17561         the right thing even if adding 1900 would overflow.  Similarly
17562         for tm_mon + 1 and tm_yday + 1.
17563         Make %Y always equivalent to %C%y, and similarly for %G and %g.
17564         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
17565         (DO_SIGNED_NUMBER): New macro.
17566         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
17567
17568 2005-03-07  Bruno Haible  <bruno@clisp.org>
17569
17570         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
17571
17572 2005-03-07  Bruno Haible  <bruno@clisp.org>
17573
17574         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
17575
17576 2005-03-04  Derek R. Price  <derek@ximbiot.com>
17577
17578         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
17579         (func_import): Only replace files via --import when they have actually
17580         changed.
17581
17582 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17583
17584         * m4/mmap-anon.m4: New file.
17585         * m4/pagealign_alloc.m4: New file.
17586
17587 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17588             Bruno Haible  <bruno@clisp.org>
17589
17590         * modules/pagealign_alloc: New file.
17591         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
17592
17593 2005-03-03  Derek R. Price  <derek@ximbiot.com>
17594             Bruno Haible  <bruno@clisp.org>
17595
17596         * lib/pagealign_alloc.h: New file.
17597         * lib/pagealign_alloc.c: New file.
17598
17599 2005-03-03  Bruno Haible  <bruno@clisp.org>
17600
17601         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
17602         Use an all-permissive copyright notice, recommended by RMS.
17603
17604 2005-03-02  Bruno Haible  <bruno@clisp.org>
17605
17606         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
17607         of AIX, the replacement has to be done only after <string.h> is
17608         included, therefore not in config.h. stpncpy.h does the replacement,
17609         and stpncpy.c uses it.
17610
17611 2005-03-02  Bruno Haible  <bruno@clisp.org>
17612
17613         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
17614         stpncpy.c uses it.
17615
17616 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17617
17618         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
17619         The workaround isn't strictly needed for POSIX conformance, and
17620         it's too much of a pain to configure and maintain.  We'll ask
17621         people to fix their kernels instead.
17622         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
17623         (NANOSLEEP_BUG_WORKAROUND): Remove.
17624         (xnanosleep): Remove the workaround.
17625
17626 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17627
17628         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
17629         Reported by Derek Price.
17630         (Include): Add "timespec.h".
17631
17632         * modules/xnanosleep (Depends-on): Remove gethrxtime.
17633
17634 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
17635
17636         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
17637         to detect nanosleep bug.
17638
17639 2005-03-01  Bruno Haible  <bruno@clisp.org>
17640
17641         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
17642
17643 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
17644
17645         * modules/gethrxtime: New file.
17646         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
17647         (Depends-on): Add gethrxtime.
17648         (configure.ac): Add gl_XNANOSLEEP.
17649         (Makefile.am): Remove lib_SOURCES line.
17650
17651 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
17652
17653         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
17654         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
17655
17656 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
17657
17658         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
17659         * lib/timespec.h (gettime): Return void, since it always
17660         succeeds now.  All uses changed.
17661         * lib/gettime.c (gettime) Likewise.
17662         [HAVE_NANOTIME]: Prefer nanotime.
17663         Assume gettimeofday succeeds, as POSIX requires.
17664         Assime time () succeeds, since other code already does.
17665         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
17666         (timespec_subtract): Remove.
17667         (NANOSLEEP_BUG_WORKAROUND): New constant.
17668         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
17669         things considerably.  Use it only on GNU/Linux hosts, since the
17670         workaround shouldn't be needed elsewhere.
17671
17672 2005-02-24  Bruno Haible  <bruno@clisp.org>
17673
17674         * modules/gettext (Files): Add m4/glibc2.m4.
17675
17676 2005-02-24  Bruno Haible  <bruno@clisp.org>
17677
17678         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
17679         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
17680         * m4/progtest.m4:
17681         Update from GNU gettext 0.14.2.
17682         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
17683
17684 2005-02-24  Bruno Haible  <bruno@clisp.org>
17685
17686         * lib/localcharset.c: Update from GNU gettext 0.14.2.
17687         * lib/config.charset: Update from GNU gettext 0.14.2.
17688
17689 2005-02-24  Bruno Haible  <bruno@clisp.org>
17690
17691         * lib/gettext.h: Update from GNU gettext 0.14.2.
17692
17693 2005-02-23  Simon Josefsson  <jas@extundo.com>
17694
17695         * m4/iconvme.m4: New file.
17696
17697 2005-02-23  Jim Meyering  <jim@meyering.net>
17698
17699         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
17700         change.
17701         Thanks to Bruno Haible for catching it.
17702
17703 2005-02-22  Simon Josefsson  <jas@extundo.com>
17704
17705         * modules/iconvme: New file.
17706
17707         * MODULES.html.sh: Add iconvme.
17708
17709 2005-02-22  Simon Josefsson  <jas@extundo.com>
17710
17711         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
17712
17713 2005-02-22  Simon Josefsson  <jas@extundo.com>
17714
17715         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
17716
17717 2005-02-22  Jim Meyering  <jim@meyering.net>
17718
17719         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
17720         s/ifndef/ifdef/.
17721
17722 2005-02-20  Neil Conway  <neilc@samurai.com>
17723
17724         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
17725         returned by OSX/Darwin if the specified buffer is not large
17726         enough for the hostname.
17727
17728 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17729
17730         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
17731         pass it to _help, otherwise the latter coredumps trying to
17732         dereference state.root_argp.
17733
17734 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17735
17736         * modules/chdir-long (Depends-on): Add memrchr.
17737         * modules/memrchr (Files): Add lib/memrchr.h.
17738         (Include): "memrchr.h".
17739
17740 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17741
17742         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
17743
17744 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
17745
17746         * lib/memrchr.h: New file.
17747         * lib/chdir-long.c: Include it.
17748         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
17749         Don't bother including stddef.h.
17750
17751 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
17752
17753         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
17754         inclusion.
17755         Include <sys/types.h>, for dev_t.
17756         (ME_DUMMY, ME_REMOTE): Move from here....
17757         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
17758         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
17759         Dmitry V. Levin.
17760         Include mountlist.h first, to test the interface.
17761
17762 2005-01-29  Bruno Haible  <bruno@clisp.org>
17763
17764         * lib/progname.c (program_name): Initialize.
17765         Needed when linking statically on MacOS X.
17766
17767 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
17768
17769         Sync from coreutils.
17770         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
17771         (Depends-on): Add c-strtod.
17772         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
17773
17774 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
17775
17776         Sync from coreutils.
17777         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
17778
17779         Remove files that are specific to coreutils.
17780         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
17781
17782 2005-01-28  Bruno Haible  <bruno@clisp.org>
17783
17784         * modules/javacomp: New file.
17785         * MODULES.html.sh (Java): Add javacomp.
17786
17787 2005-01-28  Bruno Haible  <bruno@clisp.org>
17788
17789         * m4/javacomp.m4: New file, from GNU gettext.
17790
17791 2005-01-28  Bruno Haible  <bruno@clisp.org>
17792
17793         * lib/javacomp.sh.in: New file, from GNU gettext.
17794         * lib/javacomp.h: New file, from GNU gettext.
17795         * lib/javacomp.c: New file, from GNU gettext.
17796
17797 2005-01-26  Simon Josefsson  <jas@extundo.com>
17798
17799         * lib/gai_strerror.c: Use GPL in header.
17800
17801 2005-01-26  Bruno Haible  <bruno@clisp.org>
17802
17803         * modules/javaexec: New file.
17804         * MODULES.html.sh (Java): Add javaexec.
17805
17806 2005-01-26  Bruno Haible  <bruno@clisp.org>
17807
17808         * m4/javaexec.m4: New file, from GNU gettext.
17809
17810 2005-01-26  Bruno Haible  <bruno@clisp.org>
17811
17812         * lib/javaexec.sh.in: New file, from GNU gettext.
17813         * lib/javaexec.h: New file, from GNU gettext.
17814         * lib/javaexec.c: New file, from GNU gettext.
17815
17816 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17817
17818         * modules/lchown (Depends-on): Remove lchown.h
17819
17820 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17821
17822         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
17823         must be defined if the header file was not found, in order
17824         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
17825
17826 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17827
17828         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
17829         initializers for struct pentry_state.
17830         (__argp_error): Check return value of __asprintf
17831         (__argp_failure): Translate error message
17832
17833         * lib/argp-parse.c: Removed braces around the expansion of N_()
17834
17835 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
17836
17837         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
17838         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
17839         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
17840         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
17841         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
17842         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
17843         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
17844         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
17845         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
17846         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
17847         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
17848         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
17849         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
17850         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
17851         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
17852         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
17853         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
17854         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
17855         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
17856         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
17857         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
17858         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
17859         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
17860         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
17861         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
17862         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
17863         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
17864         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
17865         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
17866         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
17867         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
17868         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
17869         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
17870         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
17871         xstrtol.m4, xstrtoumax.m4, yesno.m4:
17872         Use an all-permissive copyright notice, recommended by RMS.
17873
17874 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
17875
17876         * modules/chdir-long (Depends-on): Remove mempcpy.
17877
17878 2005-01-21  Jim Meyering  <jim@meyering.net>
17879
17880         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
17881         same value as for Solaris 9.
17882
17883         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
17884         component length.  This included changing the parameter to be
17885         of type `char *' rather than `char const *'.
17886         * lib/chdir-long.h (chdir_long): Update prototype.
17887
17888         * lib/openat.c (fdopendir, fstatat): New functions.
17889         * lib/openat.h: Include headers required for use of DIR and struct
17890         stat.
17891         [AT_SYMLINK_NOFOLLOW]: Define.
17892         (fdopendir, fstatat): Add prototypes.
17893
17894 2005-01-21  Bruno Haible  <bruno@clisp.org>
17895
17896         * modules/classpath: New file.
17897         * MODULES.html.sh (Java): Add classpath.
17898
17899 2005-01-21  Bruno Haible  <bruno@clisp.org>
17900
17901         * lib/classpath.h: New file, from GNU gettext.
17902         * lib/classpath.c: New file, from GNU gettext.
17903
17904 2005-01-20  Simon Josefsson  <jas@extundo.com>
17905
17906         * modules/version-etc-fsf: New file.
17907
17908 2005-01-20  Simon Josefsson  <jas@extundo.com>
17909
17910         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
17911         * lib/version-etc.c: Remove version_etc_copyright.
17912         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
17913         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
17914
17915 2005-01-20  Simon Josefsson  <jas@extundo.com>
17916
17917         * lib/base64.h (isbase64): Add.
17918
17919         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
17920         using a unsigned prototype, don't inline.
17921         (base64_decode): Use it.
17922
17923 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17924
17925         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
17926         it.
17927
17928 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17929
17930         * lib/save-cwd.c (save_cwd): Remove code to support the case
17931         where fchdir is missing or flaky.
17932
17933 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
17934
17935         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
17936
17937 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
17938
17939         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
17940         AC_LIBSOURCES now does this.
17941         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
17942         with new ullong_max module.
17943
17944 2005-01-19  Bruno Haible  <bruno@clisp.org>
17945
17946         * modules/sh-quote: New file.
17947         * MODULES.html.sh (Executing programs): Add sh-quote.
17948
17949 2005-01-19  Bruno Haible  <bruno@clisp.org>
17950
17951         * lib/sh-quote.h: New file, from GNU gettext.
17952         * lib/sh-quote.c: New file, from GNU gettext.
17953
17954 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17955
17956         Merge from coreutils.
17957         * m4/ullong_max.m4: New file.
17958         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
17959         (gl_MACROS): Assume localeconv exists.
17960
17961 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17962
17963         Merge changes from coreutils, as described below in several
17964         changelogs dated today.
17965
17966         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
17967         (O_DIRECTORY): Remove; not needed here, since "." must be
17968         a directory.  All uses removed.
17969         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
17970         universal on Suns, and we also need to test for IRIX.
17971         Revamp code to use 'if' rather than '#if'.
17972         Avoid unnecessary comparison of cwd->desc to 0.
17973
17974         * lib/utimens.c (futimens): Robustify the previous patch, by checking
17975         for known valid error numbers rather than observed invalid ones.
17976
17977 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
17978
17979         * modules/ullong_max: New file.
17980
17981         * modules/chdir-long, modules/openat: New files.
17982         * modules/save-cwd (Depends-on): Depend on chdir-long.
17983         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
17984
17985 2005-01-18  Jim Meyering  <jim@meyering.net>
17986
17987         Merge from coreutils.
17988         * m4/chdir-long.m4, m4/openat.m4: New files.
17989         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
17990         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
17991         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
17992         is sane and DOES follow symlinks.  Besides, testing 20 different
17993         systems found no broken chown implementations.
17994         Prompted by a change in rsync's copy of this macro.
17995         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
17996
17997         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
17998
17999         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
18000         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
18001         NULL-means-set-to-current-time semantics.
18002         Remove temporary file immediately, rather than waiting
18003         for configure's at-exit trap code to do it.
18004
18005 2005-01-18  Jim Meyering  <jim@meyering.net>
18006
18007         * lib/version-etc.c (version_etc_copyright): Update copyright date.
18008
18009         * lib/utimens.c (futimens): Account for the fact that futimes
18010         can also fail with errno == ENOSYS or errno == ENOENT.
18011         Patch from Dmitry V. Levin.
18012
18013         Change the name of the robust chdir function from chdir to chdir_long.
18014         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
18015         (restore_cwd): Use chdir_long, not chdir.
18016         * lib/chdir-long.c: Renamed from chdir.c.
18017         * lib/chdir-long.h: Renamed from chdir.h.
18018         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
18019         Hurd.
18020
18021 2005-01-18  Bruno Haible  <bruno@clisp.org>
18022
18023         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
18024         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
18025         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
18026         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
18027         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
18028         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
18029         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
18030         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
18031         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
18032         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
18033         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
18034         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
18035         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
18036         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
18037         Use an all-permissive copyright notice, recommended by RMS.
18038
18039 2005-01-18  Bob Proulx  <bob@proulx.com>
18040
18041         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
18042         simplify offsetof() macro construct to avoid compile failure with
18043         native HP-UX 11.0 ANSI C compiler.
18044
18045 2005-01-17  Bruno Haible  <bruno@clisp.org>
18046
18047         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
18048         redundant because stpncpy.m4 takes care of it.
18049
18050 2005-01-17  Bruno Haible  <bruno@clisp.org>
18051
18052         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
18053
18054 2005-01-17  Bruno Haible  <bruno@clisp.org>
18055
18056         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
18057         used.
18058
18059 2005-01-17  Bruno Haible  <bruno@clisp.org>
18060
18061         * lib/fwriteerror.h (fwriteerror): Change specification to include
18062         fclose.
18063         * lib/fwriteerror.c: Include <stdbool.h>.
18064         (fwriteerror): At the end, close the file stream. Record whether
18065         stdout was already closed.
18066
18067 2005-01-17  Bruno Haible  <bruno@clisp.org>
18068
18069         * lib/execute.c (environ): Declare if needed.
18070         * lib/pipe.c (environ): Likewise.
18071         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
18072
18073 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18074
18075         * modules/argp: Depend on vsnprintf
18076
18077 2005-01-10  Jim Meyering  <jim@meyering.net>
18078
18079         * modules/closeout (Depends-on): Add atexit.
18080
18081 2005-01-06  Bruno Haible  <bruno@clisp.org>
18082
18083         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
18084
18085 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
18086
18087         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
18088         definitions to be after all include files, to avoid collisions.
18089         Problem reported by Bob Proulx.
18090
18091 2005-01-04  Jim Meyering  <jim@meyering.net>
18092
18093         Changes imported from coreutils.
18094         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
18095         as the mkstemp template, use a temporary directory and an
18096         8.3-friendly template to avoid trouble on systems like DJGPP.
18097         Reported by Juan M. Guerrero via Stepan Kasal.
18098         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
18099         close. Remove the temporary directory right away, rather than waiting
18100         for configure's at-exit trap code to do it.
18101         Suggestion from Stepan Kasal.
18102
18103 2005-01-01  Simon Josefsson  <jas@extundo.com>
18104
18105         * gnulib-tool: Print #include directives when --import'ing.
18106
18107 2004-12-28  Simon Josefsson  <jas@extundo.com>
18108
18109         * tests/test-base64.c: Include required header files.  Remove
18110         unused variables.
18111
18112 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18113
18114         * modules/error (Depends-on): Remove gettext.
18115
18116 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
18117
18118         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
18119         not needed.  This removes a dependency on the gettext module.
18120         [defined _LIBC]: Do not include <libintl.h>; not needed.
18121
18122 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18123
18124         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
18125         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
18126
18127 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
18128
18129         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
18130         HAVE_DECL_STRTOLD.
18131
18132 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18133
18134         * modules/getdate (Depends-on): Remove alloca-opt.
18135
18136 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18137
18138         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
18139
18140 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
18141
18142         * lib/argp-parse.c: Include <stddef.h>.
18143         (alignof, alignto): New macros.
18144         (parser_init): Don't assume that void * is aligned sufficiently
18145         for struct option.
18146
18147         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
18148         need to extend the stack.
18149         (YYINITDEPTH): New macro, so that the initial stack isn't overly
18150         large.
18151
18152 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18153
18154         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
18155
18156 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
18157
18158         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
18159         (2004-10-24) change.  Apparently this was a false alarm.
18160
18161         * modules/getdate: Depend on alloca-opt, not alloca.
18162
18163 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
18164
18165         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
18166         Remove now-obsolete comment about AIX.
18167         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
18168         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
18169         (YYMAXDEPTH): New macro.
18170
18171 2004-12-18  Simon Josefsson  <jas@extundo.com>
18172
18173         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
18174
18175 2004-12-18  Bruno Haible  <bruno@clisp.org>
18176
18177         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
18178
18179 2004-12-18  Bruno Haible  <bruno@clisp.org>
18180
18181         * lib/fatal-signal.c (fatal_signals): Make non-const.
18182         (init_fatal_signals): New function.
18183         (uninstall_handlers, install_handlers): Ignore signals that were set to
18184         SIG_IGN.
18185         (at_fatal_signal): Call init_fatal_signals.
18186         (init_fatal_signal_set): Likewise. Ignore signals that were set to
18187         SIG_IGN.
18188         Reported by Paul Eggert.
18189
18190 2004-12-18  Bruno Haible  <bruno@clisp.org>
18191
18192         * doc/alloca.texi: New file.
18193         * doc/alloca-opt.texi: New file.
18194
18195 2004-12-17  Jim Meyering  <jim@meyering.net>
18196
18197         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
18198         Otherwise, install-sh could exit with improper exit status when
18199         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
18200
18201 2004-12-16  Simon Josefsson  <jas@extundo.com>
18202
18203         * tests/test-base64.c: Add license.
18204
18205 2004-12-15  Stepan Kasal  <address@hidden>
18206
18207         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
18208
18209 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
18210
18211         * modules/getcwd (Files): Add m4/d-ino.m4.
18212         Suggested by Mark D. Baushke.
18213
18214 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
18215
18216         * lib/getdate.y (textint): New member "negative".
18217         (time_zone_hhmm): New function.
18218         Expect 14 shift-reduce conflicts, not 13.
18219         (o_colon_minutes): New rule.
18220         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
18221         (yylex): Set the "negative" member of signed numbers.
18222
18223 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
18224
18225         * doc/getdate.texi (Time of day items, Time zone items):
18226         Describe new formats +00:00, UTC+00:00.
18227
18228 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
18229
18230         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
18231         spurious "-l"s.  Problem reported by Stepan Kasal.
18232
18233 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
18234
18235         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
18236         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
18237
18238 2004-12-04  Simon Josefsson  <jas@extundo.com>
18239
18240         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
18241         Vandoorselaere <yoann@prelude-ids.org>.
18242
18243 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18244
18245         Changes imported from coreutils.
18246         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
18247         exist.
18248         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
18249
18250 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18251
18252         Changes imported from coreutils.
18253         * lib/hard-locale.c: Assume <locale.h> exists.
18254         Include "strdup.h".
18255         (GLIBC_VERSION): New macro.
18256         (hard_locale): Assume setlocale exists.
18257         Rewrite to avoid #ifdef.
18258         Use strdup rather than malloc + strcpy.
18259         * lib/human.c: Assume <locale.h> exists.
18260         (human_readable): Assume localeconv exists.
18261
18262 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
18263
18264         * modules/hard-locale (Depends-on): Add strdup.
18265
18266 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
18267
18268         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
18269         convert T2, not T.  (Imported from libc.)
18270
18271 2004-11-30  Simon Josefsson  <jas@extundo.com>
18272
18273         * modules/restrict (License): Change to LGPL.
18274
18275 2004-11-30  Simon Josefsson  <jas@extundo.com>
18276
18277         * m4/restrict.m4: Add copyright and copying conditions.
18278
18279 2004-11-30  Simon Josefsson  <jas@extundo.com>
18280
18281         * m4/base64.m4: New file.
18282
18283 2004-11-30  Simon Josefsson  <jas@extundo.com>
18284
18285         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
18286         base64.
18287
18288         * tests/test-base64.c: New file.
18289
18290         * modules/base64: New file.
18291
18292 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
18293
18294         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
18295         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
18296
18297         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
18298
18299 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
18300
18301         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
18302         (__getcwd.c): Don't restore errno; glibc doesn't.
18303         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
18304         first, falling back to our code only if its results look suspicious.
18305         Ensure that the resulting buffer is only as large as necessary.
18306
18307         * lib/readutmp.c: Include readutmp.h first.
18308         Include <errno.h>, since readutmp.h no longer does that.
18309         * lib/readutmp.h: Don't include <errno.h>,
18310         <sys/param.h>, <time.h>; not needed to establish interface.
18311         (errno): Remove decl.
18312         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
18313         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
18314         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
18315
18316 2004-11-28  Simon Josefsson  <jas@extundo.com>
18317
18318         * lib/base64.h, base64.c: New file.
18319
18320 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
18321
18322         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
18323
18324 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
18325
18326         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
18327         (Depends-on): Remove pathmax, same.  Add mempcpy.
18328         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
18329         (Makefile.am): Append getcwd.h to lib_SOURCES.
18330         (Include): Add getcwd.h.
18331         (Maintainer): Change from Jim Meyering to "all, glibc",
18332         since getdate now uses intended-for-glibc code.
18333         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
18334         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
18335
18336 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
18337
18338         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
18339         HP's ANSI C compiler.
18340         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
18341         Declaring int functions causes warnings on some modern systems and
18342         shouldn't be needed to compile on ancient ones.
18343         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
18344         defined.
18345
18346         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
18347         with the following changes.
18348         (__set_errno): Parenthesize properly.
18349         Include <stdbool.h>.
18350         (MIN, MAX, MATCHING_INO): New macros.
18351         (__getcwd): Define with prototype, not K&R form.
18352         Use heuristics to allocate default buffer on stack if possible.
18353         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
18354         behavior, and to avoid the PATH_MAX limit when computing
18355         ../../../../...
18356         Use MATCHING_INO to compare inode number to file.
18357         Check for arithmetic overflow in size calculations.
18358         Fix bug in reallocation of dot array that caused getcwd to fail
18359         on directories nested deeper than 75.
18360         Be more careful about saving errno on error.
18361         Do not use realloc; use only free+malloc, as this is a bit
18362         more flexible and avoids a needless copy operation.
18363         Do not inspect st_dev and st_ino for symbolic links; POSIX
18364         doesn't specify the latter.
18365         Check for closedir errors.
18366         Avoid needless casts.
18367         Use "#ifdef weak_alias" around weak_alias, to be like other
18368         glibc code.
18369         The following changes to getcwd.c have effect only when used in
18370         gnulib; they have no effect inside glibc proper.
18371         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
18372         as alloca isn't used.
18373         (alloca, __alloca): Likewise.
18374         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
18375         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18376         unconditionally, as gnulib assumes C89 or better.
18377         Do not include <sys/param.h>.
18378         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
18379         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
18380         better.
18381         (NULL) [!defined NULL]: Remove; we assume C89 or better.
18382         Include <dirent.h> in a way that is compatible with modern Autoconf.
18383         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
18384         New macros, if not already defined.
18385         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
18386         Use "_LIBC", not "defined _LIBC", for consistency.
18387         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
18388         a mempcpy module.
18389         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
18390         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
18391         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
18392         credit only to Jim Meyering and adjust the copyright dates.
18393         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
18394         <stdlib.h>, <unistd.h>, "pathmax.h".
18395         Instead, include "xgetcwd.h" (first) and "getcwd.h".
18396         (INITIAL_BUFFER_SIZE): Remove.
18397         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
18398
18399 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
18400
18401         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
18402         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
18403         Use the _ONCE methods, for efficiency.
18404         Check for fcntl.h.  In test program, include <errno.h>
18405         and <fcntl.h> if available.  Remove old K&R cruft from
18406         test program.  Check for common errors in GNU/Linux,
18407         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
18408         don't do AC_LIBOBJ, as that's getcwd.m4's job.
18409         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
18410         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
18411         name accordingly.
18412         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
18413         accommodate new getcwd.c.
18414         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
18415         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
18416         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
18417         that's all we need now.
18418
18419 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18420
18421         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
18422         argp-parse.c depends on getopt internals, that means we should
18423         always use our getopt, to be on the safe side.
18424         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
18425         order not to spoil the result of an eventual previous invocation
18426         of gl_GETOPT_SUBSTITUTE.
18427
18428 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18429
18430         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
18431         redefinition warnings. To avoid them, include the defines
18432         in `#if !defined __need_getopt ... #endif'. The only place
18433         where __getopt_argv_const is used is in definitions
18434         of getopt_long and getopt_long_only below, which are as well
18435         protected by `#ifndef __need_getopt'.
18436         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
18437         __need_getopt after including <stdio.h> and <unistd.h> These
18438         headers might have defined it.
18439
18440 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
18441
18442         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
18443
18444 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
18445
18446         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
18447         (futimens): New function, which uses futimes if available.
18448         (futimens, utimens): Support timespec==NULL, with same semantics
18449         as utime and utimens.
18450         * lib/utimens.h (futimens): New decl.
18451
18452 2004-11-23  Jim Meyering  <jim@meyering.net>
18453
18454         * lib/getopt_.h: Remove trailing blanks.
18455
18456 2004-11-23  Jim Meyering  <jim@meyering.net>
18457
18458         * lib/__fpending.c: Add comment.
18459
18460 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
18461
18462         * modules/canonicalize (Depends-on): Add xreadlink.
18463         Problem reported by James Youngman.
18464
18465 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
18466
18467         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
18468         New macros.
18469         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
18470         optopt): Use them instead of invoking ## directly; otherwise, the
18471         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
18472
18473 2004-11-19  Bruno Haible  <bruno@clisp.org>
18474
18475         * lib/strtok_r.c: Move comments from here...
18476         * lib/strtok_r.h: ... to here.
18477
18478 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
18479
18480         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
18481         implementations that mishandle size_t overflow.
18482
18483 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
18484
18485         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
18486         might fail.  Problem reported by Yoann Vandoorselaere.
18487         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
18488         implementations that mishandle size_t overflow.
18489
18490 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18491
18492         * modules/canon-host (Depends-on): Add strdup.
18493
18494 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18495
18496         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
18497
18498 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18499
18500         * lib/canon-host.c: Include "strdup.h".
18501         (canon_host): Use getaddrinfo if available, so that IPv6 works.
18502         Use strdup instead of malloc/strcpy to duplicate strings.
18503
18504         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
18505         (human_space_before_unit): New constant.
18506         * lib/human.c (human_readable): Support it.
18507
18508         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
18509         (xgetcwd): Set errno correctly when failing.
18510         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
18511         the failure is actually due to a PATH_MAX problem.
18512
18513         Further getopt changes to make it more likely that glibc will
18514         buy the changes back.
18515         * lib/getopt.c (POSIXLY_CORRECT): New constant.
18516         (getopt): Use it, so to preserve glibc semantic
18517         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
18518         when compiling for libc.
18519         * lib/getopt_.h (__getopt_argv_const): Bring it back.
18520         (getopt_long, getopt_long_only): Use it.
18521
18522         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
18523         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
18524         (getopt): Argv is now char * const *, as per standard.
18525         (_getopt_internal_r, _getopt_internal): Argv is now char **,
18526         not char *__getopt_argv_const *.
18527         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
18528         _getopt_long_only_r): Likewise.
18529         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
18530         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
18531         _getopt_long_r, _getopt_long_only_r): Likewise.
18532         * lib/getopt_.h (__getopt_argv_const): Remove.
18533         (getopt): Argv is now char * const *, as per standard.
18534
18535         * lib/getdate.y (tORDINAL): New token.
18536         (day, relunit): Allow it for relative times.
18537         (relative_time_table): Use tORDINAL for ordinals.
18538
18539 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
18540
18541         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
18542         Document that "second" isn't allowed as an ordinal number.
18543
18544 2004-11-16  Jim Meyering  <jim@meyering.net>
18545
18546         * modules/closeout (Depends-on): Add fpending.
18547
18548 2004-11-15  Jim Meyering  <jim@meyering.net>
18549
18550         * lib/closeout.c: Include "__fpending.h" once again.
18551         Include <stdbool.h>.
18552         (close_stdout): Don't fail just because stdout was closed initially,
18553         since some programs don't write to stdout in the normal course of
18554         operation (other than --version and --help), and we don't want this
18555         function to make e.g. `touch file >&-' fail.
18556         But do fail if it was closed and someone has tried to write to it.
18557         E.g., `printf foo >&-' must fail.
18558
18559 2004-11-13  Jim Meyering  <jim@meyering.net>
18560
18561         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
18562
18563 2004-11-12  Simon Josefsson  <jas@extundo.com>
18564
18565         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
18566         small doc fix is still pending.
18567
18568 2004-11-11  Simon Josefsson  <jas@extundo.com>
18569
18570         * modules/strtok_r: New file.
18571
18572         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18573         strtok_r.
18574
18575 2004-11-11  Simon Josefsson  <jas@extundo.com>
18576
18577         * m4/strtok_r.m4: New file.
18578
18579         * m4/getopt.m4: Replace opterr.
18580
18581 2004-11-11  Simon Josefsson  <jas@extundo.com>
18582
18583         * lib/strtok_r.h, strtok_r.c: New file.
18584
18585 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
18586
18587         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
18588         of replacing opterr, getopt, etc.  This should handle the
18589         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
18590
18591 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
18592
18593         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
18594         we can stop lying to compilers about the constness of argv when we
18595         are compiled outside glibc.
18596         (getopt, getopt_long, getopt_long_only): Use it.
18597         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
18598         _getopt_internal, getopt): Likewise.
18599         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
18600         _getopt_long_only_r): Likewise.
18601         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
18602         _getopt_long_r, _getopt_long_only_r): Likewise.
18603
18604         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
18605         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
18606         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
18607         the other external symbols.
18608         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
18609         declaration, since the above renaming now works around collisions.
18610
18611 2004-11-11  Jim Meyering  <jim@meyering.net>
18612
18613         * lib/linebreak.c: Remove trailing blanks.
18614         * lib/alloca_.h: Likewise.
18615         * lib/acosl.c: Likewise.
18616         * lib/euidaccess.c: Likewise.
18617         * lib/allocsa.h: Likewise.
18618
18619 2004-11-10  Simon Josefsson  <jas@extundo.com>
18620
18621         * m4/getaddrinfo.m4: New file.
18622
18623 2004-11-10  Simon Josefsson  <jas@extundo.com>
18624
18625         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
18626
18627 2004-11-10  Simon Josefsson  <jas@extundo.com>
18628
18629         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18630         getaddrinfo.
18631
18632         * modules/getaddrinfo: New file.
18633
18634 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
18635
18636         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
18637
18638 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
18639
18640         * lib/mktime.c (SHR): New macro, which is a portable
18641         substitute for >> that should work even on Crays.
18642         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
18643         Problem reported by Mark D. Baushke in
18644         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
18645         * lib/getdate.y (SHR): Likewise.
18646         (tm_diff): Use it.
18647         * lib/strftime.c (SHR): Likewise.
18648         (tm_diff): Use it.
18649         * lib/quotearg.c (struct quoting_options): Use unsigned int for
18650         quote_these_too, so that right shifts are well defined.  All uses
18651         changed.
18652
18653 2004-11-10  Jim Meyering  <jim@meyering.net>
18654
18655         Ensure that no close failure goes unreported.
18656         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
18657         return early when it seems there's nothing to flush.
18658         Don't include __fpending.h.
18659
18660 2004-11-10  Jim Meyering  <jim@meyering.net>
18661
18662         * modules/closeout (Depends-on): Remove fpending.
18663
18664 2004-11-10  Jim Meyering  <jim@meyering.net>
18665
18666         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
18667
18668 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
18669
18670         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
18671         gl_FUNC_STRFTIME.
18672         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
18673         and AC_REQUIRE when possible, to avoid duplicate checks.
18674         Check for <wchar.h>.
18675
18676 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
18677
18678         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
18679
18680 2004-11-09  Bruno Haible  <bruno@clisp.org>
18681
18682         * m4/sockpfaf.m4: New file.
18683
18684 2004-11-05  Bruno Haible  <bruno@clisp.org>
18685
18686         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
18687         Reported by Mark D. Baushke <mdb@cvshome.org>.
18688
18689 2004-11-04  Bruno Haible  <bruno@clisp.org>
18690
18691         2004-09-11  Bruno Haible  <bruno@clisp.org>
18692                 * allocsa.valgrind: New file.
18693         2004-02-06  Bruno Haible  <bruno@clisp.org>
18694                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
18695                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
18696                 Reported by Christopher Seip <chris.seip@hp.com>.
18697
18698 2004-11-04  Bruno Haible  <bruno@clisp.org>
18699
18700         * modules/allocsa (Files): Add lib/allocsa.valgrind.
18701         (Makefile.am): Distribute it.
18702
18703 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
18704
18705         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
18706         with errno == ERANGE if the buffer is too small.
18707         Problem reported by Mark D. Baushke.
18708
18709 2004-11-03  Albert Chin  <china@thewrittenword.com>
18710             Paul Eggert  <eggert@cs.ucla.edu>
18711
18712         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
18713         equivalent, substitute $ac_type for equivalent type rather than
18714         blindly using uint32_t *always* which won't work if uint32_t is not
18715         available.  Define _UINT32_T to work around typedef of uint32_t if
18716         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
18717         2.5.1.
18718
18719 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18720
18721         * m4/jm-macros.m4: Sync from coreutils.
18722         (gl_MACROS): Check for mbrlen, for pathchk.
18723         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
18724
18725 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18726
18727         * lib/xreadlink.c (MAXSIZE): New macro.
18728         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
18729         size does not exceed MAXSIZE.  Avoid cast.
18730         As suggested by Mark D. Baushke in
18731         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
18732         if readlink fails with buffer size just under MAXSIZE, try again
18733         with MAXSIZE.
18734
18735 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
18736
18737         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
18738
18739 2004-11-02  Derek R. Price  <derek@ximbiot.com>
18740         and  Paul Eggert  <eggert@cs.ucla.edu>
18741
18742         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
18743         (get_date): Overparenthesize to avoid GCC warning.
18744
18745 2004-11-02  Bruno Haible  <bruno@clisp.org>
18746
18747         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
18748         returns void.
18749
18750 2004-11-02  Bruno Haible  <bruno@clisp.org>
18751
18752         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
18753         function returns void.
18754
18755 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
18756
18757         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
18758         fflush_unlocked, flockfile, funlockfile, funlockfile,
18759         fputs_unlocked, putc_unlocked.
18760
18761 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
18762
18763         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
18764         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
18765         already declared.
18766
18767 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18768
18769         * modules/getdate (Files): Add doc/getdate.texi.
18770         (Depends-on): Add setenv, xalloc.
18771
18772 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18773
18774         * lib/getdate.y: Add support for TZ="foo" within a date string.
18775         Fix some bugs near time_t boundaries.  Reject dates with
18776         out-of-range components, e.g., "Sept 31".
18777         Include <stdlib.h>, "setenv.h", "xalloc.h".
18778         (ISDIGIT_LOCALE): Remove; unused.
18779         Note that the TZ and time functions used here are not reentrant.
18780         (mktime_ok, get_tz): New functions.
18781         (TZBUFSIZE): New constant.
18782         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
18783         This requires that we sometimes generate our own TZ="XXX..." setting.
18784
18785 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
18786
18787         * doc/getdate.texi: New file, from coreutils with modifications for
18788         the new TZ parsing.
18789
18790 2004-10-27  Derek R. Price  <derek@ximbiot.com>
18791
18792         * lib/mktime.c (not_equal_tm): Remove redundant check.
18793
18794 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
18795
18796         * modules/regex (lib_SOURCES): Add regex.c.
18797         Reported by James Youngman in
18798         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
18799
18800 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
18801
18802         * lib/getdate.y: Use Bison 1.875 features, and some minor
18803         code cleanups.  This change does not affect semantics.
18804         Don't include <stdlib.h>; no longer needed.
18805         Don't include unlocked-io.h; only the "#if TEST" code uses
18806         stdio, and performance isn't crucial there.
18807         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
18808         Bison 1.875 features as described below.
18809         All uses of "PC." replaced by "pc->".
18810         (YYSTYPE): Add a forward declaration.
18811         (yylex, yyerror): Use full prototypes in forward decls.
18812         Use "%pure-parser" rather than obsolescent "%pure_parser".
18813         Use %parse-param and %lex-param instead of obsolescent
18814         YYPARSE_PARAM and YYLEX_PARAM.
18815         (meridian_table, month_and_day_table, time_units_table,
18816         relative_time_table, time_zone_table, military_table,
18817         lookup_zone, lookup_word, get_date):
18818         Use NULL instead of 0 where appropriate.
18819         (to_hour): Avoid abort (), to avoid a dependency on
18820         stdlib.h.
18821         (yyerror, yylex): Now accepts parser_control * arg.
18822         (main) [TEST]: Use '\0' rather than 0 for char.
18823
18824 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
18825
18826         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
18827
18828 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
18829
18830         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
18831         It's now the caller's responsibility to handle the case where
18832         !HAVE_GETPAGESIZE && !defined getpagesize.
18833
18834         * lib/mktime.c (leapyear): Arg is long int, not int.
18835
18836 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
18837
18838         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
18839
18840 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
18841
18842         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
18843         missing.  Problem reported by James Youngman.
18844
18845 2004-10-16  Simon Josefsson  <jas@extundo.com>
18846
18847         * gnulib-tool: Fix comments.  Fix parse problem.
18848         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
18849
18850 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
18851
18852         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
18853         implementation of getopt_long.  Problem reported by Alexander Taler in:
18854         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
18855
18856 2004-10-15  Bruno Haible  <bruno@clisp.org>
18857
18858         * gnulib-tool: Untabify. Initialize supplied_libname.
18859         (func_usage): More homogenous output.
18860         (func_modules_transitive_closure, func_modules_to_filelist,
18861         func_emit_lib_Makefile_am): New functions.
18862         (func_import): New function, extracted from big case statement. Use
18863         func_get_license, func_modules_transitive_closure,
18864         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
18865         opt_lgpl. Don't use test -a, as it's not portable.
18866         (func_create_testdir): Use func_modules_transitive_closure,
18867         func_modules_to_filelist, func_emit_lib_Makefile_am.
18868
18869 2004-10-15  Bruno Haible  <bruno@clisp.org>
18870
18871         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
18872
18873 2004-10-15  Bruno Haible  <bruno@clisp.org>
18874
18875         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
18876         the portions belonging to each module.
18877         Suggested by Derek Robert Price <derek@ximbiot.com>.
18878
18879 2004-10-12  Simon Josefsson  <jas@extundo.com>
18880
18881         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
18882         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
18883         to real functions.
18884
18885 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18886
18887         * modules/vsnprintf: New file.
18888
18889 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18890
18891         * m4/vsnprintf.m4: New file.
18892
18893 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18894
18895         * lib/vsnprintf.h: New file.
18896         * lib/vsnprintf.c: New file.
18897
18898 2004-10-11  Bruno Haible  <bruno@clisp.org>
18899
18900         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
18901         vsnprintf.
18902
18903 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
18904
18905         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
18906
18907 2004-10-07  Bruno Haible  <bruno@clisp.org>
18908
18909         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
18910         fits into the provided buffer.
18911
18912 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
18913
18914         * lib/diacrit.c, diacrit.h: Add GPL notice.
18915
18916         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
18917         notice.
18918         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
18919         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
18920         This avoids a potential constant-folding bug.
18921
18922 2004-10-05  Bruno Haible  <bruno@clisp.org>
18923
18924         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
18925         for the declaration of strsep.
18926
18927 2004-10-05  Bruno Haible  <bruno@clisp.org>
18928
18929         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
18930
18931 2004-10-04  Simon Josefsson  <jas@extundo.com>
18932
18933         * modules/memmem: New file.
18934         * tests/test-memmem.c: New file.
18935         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
18936
18937 2004-10-04  Simon Josefsson  <jas@extundo.com>
18938
18939         * m4/memmem.m4: New file.
18940
18941 2004-10-04  Simon Josefsson  <jas@extundo.com>
18942
18943         * lib/memmem.h: New file.
18944         * lib/memmem.c: New file, taken from glibc.
18945
18946 2004-10-04  Simon Josefsson  <jas@extundo.com>
18947
18948         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
18949         '#ifdef USE_UNLOCKED_IO'.
18950
18951 2004-10-04  Simon Josefsson  <jas@extundo.com>
18952
18953         * config/srclist.txt: Add memmem from glibc.
18954
18955 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18956
18957         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
18958
18959         * modules/argmatch, modules/argp, modules/closeout, modules/error,
18960         modules/exclude, modules/getdate, modules/getline,
18961         modules/getndelim2, modules/getpass, modules/getpass-gnu,
18962         modules/getusershell, modules/linebuffer, modules/md5,
18963         modules/mountlist, modules/posixtm, modules/readtokens,
18964         modules/readutmp, modules/regex, modules/sha1,
18965         modules/version-etc, modules/yesno:
18966         Remove dependency on unlocked-io.
18967
18968 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18969
18970         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
18971
18972         * m4/unlocked-io.m4: Add copyright notice.
18973         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
18974
18975 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18976
18977         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
18978         * lib/xmalloc.c (xmemdup): Likewise.
18979         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
18980         XFREE): Remove these long-obsolescent macros.
18981         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
18982         * lib/xstrdup.c: Remove.
18983
18984         * lib/regex.c (re_comp): Cast gettext return value to char *,
18985         Problem reported by Martin Neitzel via Mark D. Baushke.
18986
18987 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
18988
18989         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
18990         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
18991         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
18992         regex.c, sha1.c, version-etc.c, yesno.c:
18993         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
18994         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
18995         the includer's responsibility.
18996
18997         Sync from coreutils.
18998
18999         * lib/modechange.c (mode_compile): Don't decrement a pointer that
19000         points to the start of a string, as the C Standard says the
19001         resulting behavior is undefined.
19002
19003         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
19004         simple -> simple_backups, numbered_existing ->
19005         numbered_existing_backups, numbered -> numbered_backups
19006         to avoid shadowing problems.  All uses changed.
19007         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
19008         * lib/backupfile.c (check_extension, numbered_backup):
19009         Rename locals to avoid shadowing 'basename'.
19010         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
19011         once.
19012
19013         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
19014         * lib/.cvsignore: Add getopt.h.
19015
19016 2004-10-04  Bruno Haible  <bruno@clisp.org>
19017
19018         * modules/README: New file.
19019         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
19020         not a module.
19021
19022 2004-10-02  Jim Meyering  <jim@meyering.net>
19023
19024         * lib/dirfd.h, getpagesize.h: Add copyright notice.
19025
19026 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19027
19028         * modules/strsep: New file.
19029
19030 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19031
19032         * m4/strsep.m4: New file.
19033
19034 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
19035
19036         * lib/strsep.h: New file.
19037         * lib/strsep.c: New file.
19038
19039 2004-10-01  Simon Josefsson  <jas@extundo.com>
19040
19041         * lib/snprintf.c (snprintf): Handle size==0.
19042
19043 2004-10-01  Simon Josefsson  <jas@extundo.com>
19044             Bruno Haible  <bruno@clisp.org>
19045
19046         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
19047         (snprintf): Declare 'args'.
19048
19049 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
19050
19051         * lib/snprintf.c: Remove comments as to why each header is needed.
19052
19053 2004-10-01  Bruno Haible  <bruno@clisp.org>
19054
19055         * MODULES.html.sh: Add strsep.
19056
19057 2004-09-30  Simon Josefsson  <jas@extundo.com>
19058
19059         * modules/snprintf: New file.
19060
19061 2004-09-30  Simon Josefsson  <jas@extundo.com>
19062
19063         * m4/snprintf.m4: New file.
19064
19065 2004-09-30  Simon Josefsson  <jas@extundo.com>
19066
19067         * lib/snprintf.h, lib/snprintf.c: New files.
19068
19069 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19070
19071         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
19072         (hol_entry_help): Never translate an empty string.
19073         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
19074         * lib/argp.h (OPTION_NO_TRANS): New option.
19075
19076 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19077
19078         * modules/argp (Maintainer): Replace Simon Josefsson
19079         by Sergey Poznyakoff.
19080
19081 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19082
19083         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
19084         changes merged back into glibc.
19085
19086 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
19087
19088         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
19089
19090 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
19091
19092         * lib/xvasprintf.c: Include xalloc.h.
19093         (xvasprintf): Use xalloc_die, not xmalloc_die.
19094
19095 2004-09-29  Bruno Haible  <bruno@clisp.org>
19096
19097         * modules/alloca-opt: New file, derived from modules/alloca.
19098         * modules/allocsa: Depend on alloca-opt instead of alloca.
19099         * modules/setenv: Likewise.
19100         * modules/vasnprintf: Likewise.
19101         * MODULES.html.sh: Add alloca-opt.
19102
19103 2004-09-28  Simon Josefsson  <jas@extundo.com>
19104
19105         * gnulib-tool: New parameter --lgpl, to asseert that modules are
19106         LGPL, and to replace license template from GPL to LGPL.
19107
19108 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
19109
19110         * modules/dummy: Change license to LGPL.
19111
19112 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
19113
19114         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
19115
19116 2004-09-24  Simon Josefsson  <jas@extundo.com>
19117
19118         * modules/minmax (License): Change from GPL to LGPL.
19119
19120 2004-09-23  Simon Josefsson  <jas@extundo.com>
19121
19122         * gnulib-tool (--import): Typo.
19123
19124 2004-09-23  Simon Josefsson  <jas@extundo.com>
19125
19126         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
19127
19128 2004-09-22  Bruno Haible  <bruno@clisp.org>
19129
19130         * modules/*: Add 'License' field.
19131         * gnulib-tool: Accept --extract-license option.
19132         (func_get_license): New function.
19133
19134 2004-09-21  Bruno Haible  <bruno@clisp.org>
19135
19136         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
19137         Reported by Simon Josefsson.
19138
19139 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
19140
19141         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
19142         gl_AC_TYPE_LONG_LONG.
19143
19144 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
19145
19146         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
19147
19148 2004-09-18  Simon Josefsson  <jas@extundo.com>
19149         and  Paul Eggert  <eggert@cs.ucla.edu>
19150
19151         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
19152         calls with autoreconf.  Define GL_LIB.
19153
19154 2004-09-14  Karl Berry  <karl@gnu.org>
19155
19156         * config/srclist.txt: unsync setenv.c, sigh.
19157
19158 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19159
19160         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
19161         Problem reported by Bruno Haible in:
19162         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
19163
19164 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
19165
19166         * config/srclist.txt: Comment out argp-pvh.c.
19167
19168 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
19169
19170         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
19171         in case some system header has #define'd it.  Problem reported by
19172         Soeren D. Schulze in
19173         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
19174
19175 2004-09-09  Karl Berry  <karl@gnu.org>
19176
19177         * regex.[ch]: delete from the root.  These were supposed to be
19178                 synced with emacs cvs, but this has not happened for about
19179                 a year, and anyway nothing else uses emacs regex.[ch].
19180                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
19181                 lib/regex[.ch] is untouched.
19182
19183 2004-09-09  Bruno Haible  <bruno@clisp.org>
19184
19185         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
19186
19187 2004-09-09  Bruno Haible  <bruno@clisp.org>
19188
19189         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
19190         modifications.
19191         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
19192
19193 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
19194
19195         * modules/xvasprintf: New file.
19196         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
19197
19198 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
19199
19200         * lib/xvasprintf.h: New file.
19201         * lib/xvasprintf.c: New file.
19202         * lib/xasprintf.c: New file.
19203
19204 2004-09-08  Bruno Haible  <bruno@clisp.org>
19205
19206         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
19207
19208 2004-09-08  Bruno Haible  <bruno@clisp.org>
19209
19210         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
19211         length is > INT_MAX.
19212         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
19213         more.
19214
19215 2004-09-08  Bruno Haible  <bruno@clisp.org>
19216
19217         * lib/stdint_.h: New file, taken from GNU clisp.
19218
19219 2004-09-08  Bruno Haible  <bruno@clisp.org>
19220             Oskar Liljeblad  <oskar@osk.mine.nu>
19221
19222         * modules/stdint: New file.
19223         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
19224
19225 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19226
19227         Import from coreutils.
19228         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
19229         strings on unbounded length.  alloca's performance benefits aren't
19230         that important here.
19231         (V_STRDUP): Remove.
19232         (parse_with_separator): New function, with most of the internals
19233         of the old parse_user_spec.  Allow user to omit both user and group,
19234         for compatibility with FreeBSD.
19235         Clone only the user name, not the entire spec.
19236         Do not set *uid, *gid unless entirely successful.
19237         Avoid memory leak in some failing cases.
19238         Fix regression for USER.GROUP reported by Dmitry V. Levin in
19239         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
19240         (parse_user_spec): Rewrite to use parse_with_separator.
19241
19242 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19243
19244         * modules/userspec: Don't depend on alloca.
19245
19246 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19247
19248         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
19249
19250 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
19251
19252         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
19253         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
19254         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
19255
19256 2004-08-16  Simon Josefsson  <jas@extundo.com>
19257
19258         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
19259         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
19260         Add --dry-run for --import.
19261         Let user provided command line parameters override configure.ac
19262         settings.
19263
19264 2004-08-12  Simon Josefsson  <jas@extundo.com>
19265
19266         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
19267         as discussed with Paul Eggert in threads rooted at
19268         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
19269         and
19270         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
19271         Before, the test was empty, and relied on ELIDE_CODE in source
19272         code.)
19273         (gl_PREREQ_GETOPT): New macro.
19274         (gl_GETOPT): Use them.
19275
19276 2004-08-12  Simon Josefsson  <jas@extundo.com>
19277
19278         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
19279         * lib/getopt_.h: Renamed from getopt.h.
19280
19281 2004-08-12  Simon Josefsson  <jas@extundo.com>
19282
19283         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
19284         Change default library name from libfoo to libgnu.
19285         Now, if you have a configure.ac that says:
19286                 gl_SOURCE_BASE(gl)
19287                 gl_M4_BASE(gl/m4)
19288                 gl_MODULES(error getopt etcetera)
19289                 gl_INIT
19290         you can import all you need by running:
19291                 ../gnulib/gnulib-tool --import
19292
19293         * modules/getopt (Files): Rename getopt.h to getopt_.h.
19294         (Makefile.am): Rewrite, use logic from argz.
19295         (Include): Use <getopt.h> instead of "getopt.h".
19296
19297 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19298
19299         * modules/argp (Files): Add m4/unlocked-io.m4.
19300         (Depends-on): Add extensions.
19301
19302 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19303
19304         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
19305         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
19306         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
19307         Check for program_invocation_name, program_invocation_short_name,
19308         flockfile, funlockfile, features.h, _getopt_long_only_r.
19309
19310 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19311
19312         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
19313         its complicated substitute.
19314         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
19315         and program_invocation_name.
19316         (__argp_basename) [!_LIBC]: Remove; the only use was
19317         replaced by its body.
19318         (__argp_short_program_name): Change condition from
19319         !defined __argp_short_program_name to
19320         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
19321         to match argp-namefrob.h.
19322         (__argp_failure): Don't assume strerror_r returns char *.
19323         * lib/argp-parse.c (N_): Define unconditionally.
19324         (argp_default_options): Fill out initializers with 0 to avoid
19325         gcc warnings.
19326
19327 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
19328
19329         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
19330         getopt1.c.
19331
19332 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19333
19334         Merge from coreutils.
19335
19336         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
19337
19338         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
19339         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
19340
19341 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19342
19343         Merge from coreutils.
19344
19345         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
19346         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
19347         for Reliant Unix 5.43.
19348
19349         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
19350         (union fooround): Use uintmax_t, not long int.
19351         The rest is a merge from libc:
19352         [defined _LIBC]: Include <shlib-compat.h>.
19353         (_obstack) [defined _LIBC]: Remove after 2.3.4.
19354
19355         * lib/settime.c (settime): Recode to avoid warning with
19356         Sun Forte C 6U2.
19357
19358         * lib/strverscmp.c: Convert to UTF-8.
19359
19360 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
19361
19362         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
19363         m4/uintmax_t.m4.
19364
19365 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19366
19367         * modules/xalloc-die: New file.
19368         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
19369
19370         * modules/md5 (Files): Add m4/uint32_t.m4.
19371         * modules/sha1: Renamed from modules/sha.
19372         (Files):
19373         Rename lib/sha.h to lib/sha1.h.
19374         Rename lib/sha.c to lib/sha1.c.
19375         Rename m4/sha.m4 to m4/sha1.m4.
19376         (lib_SOURCES): Likewise.
19377         (configure.ac): Rename gl_SHA to gl_SHA1.
19378         (Include): sha.h -> sha1.h.
19379
19380 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19381
19382         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
19383         * m4/sha1.m4: Renamed from sha.m4.
19384         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
19385
19386 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
19387
19388         * lib/obstack.h (obstack_empty_p):
19389         Don't assume that chunk->contents is suitably aligned.
19390         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
19391         Likewise. Problem reported by Benno in
19392         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
19393
19394         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
19395         readable.  This could be improved further but it'd take some work.
19396
19397 2004-08-08  Simon Josefsson  <jas@extundo.com>
19398
19399         * modules/xgethostname (Depends-on): Remove exit and error (not
19400         used).
19401
19402         * modules/getpass-gnu: Add getpass.h.
19403         (Depends-on): Add stdbool.
19404         * modules/getpass: Add getpass.h.
19405
19406 2004-08-08  Simon Josefsson  <jas@extundo.com>
19407
19408         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
19409         Check getpass declaration.
19410
19411 2004-08-08  Simon Josefsson  <jas@extundo.com>
19412
19413         * lib/xgethostname.c: Don't include error.h (not used).
19414
19415         * lib/getpass.h: Add.
19416         * lib/getpass.c: Include getpass.h first.
19417
19418 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
19419
19420         * lib/xalloc-die.c: New file.
19421         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
19422         All uses removed.
19423         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
19424         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
19425         xalloc-die.c.
19426         (_, N_, xalloc_die): Move to xalloc-die.c.
19427         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
19428         so that we needn't mess with xalloc_msg_memory_exhausted.
19429
19430         * lib/sha1.h: Renamed from sha.h.
19431         (SHA1_H): Renamed from _SHA_H.
19432         (sha1_ctx): Renamed from sha_ctx.
19433         (sha1_init_ctx): Renamed from sha_init_ctx.
19434         (sha1_process_block): Renamed from sha_process_block.
19435         (sha1_process_bytes): Renamed from sha_process_bytes.
19436         (sha1_finish_ctx): Renamed from sha_finish_ctx.
19437         (sha1_read_ctx): Renamed from sha_read_ctx.
19438         (sha1_stream): Renamed from sha_stream.
19439         (sha1_buffer): Renamed from sha_buffer.
19440         * lib/sha1.c: Likewise; renamed from sha.c.
19441         Do not include <sys/types.h>.
19442         Include <stddef.h> rather than <stdlib.h>.
19443
19444 2004-08-08  Bruno Haible  <bruno@clisp.org>
19445
19446         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
19447         FILESYSTEM_PREFIX_LEN.
19448         * lib/progreloc.c: Likewise.
19449         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
19450
19451 2004-08-06  Simon Josefsson  <jas@extundo.com>
19452
19453         * modules/progname (Depends-on): Don't depend on stdbool.
19454
19455 2004-08-06  Simon Josefsson  <jas@extundo.com>
19456
19457         * modules/getsubopt: New file.
19458         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19459         getsubopt.
19460
19461 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19462
19463         More merge from coreutils.
19464
19465         * m4/utimens.m4, m4/utimecmp.m4: New files.
19466         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
19467         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
19468         prereq.m4, sha.m4: Import changes from coreutils.
19469
19470 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19471
19472         More merge from coreutils.
19473         * modules/raise, modules/readtokens0, modules/utimens:
19474         * modules/utimecmp, module/xnanosleep: New files.
19475         * modules/strftime: Add lib/strftime.h.
19476         Change include from <time.h> to "strftime.h".
19477         * modules/yesno: Add lib/yesno.h.
19478         * modules/backupfile: Remove lib/addext.c.
19479         * modules/euidaccess: Add stat-macros.h.
19480         * modules/canonicalize, modules/euidaccess,
19481         modules/filemode, modules/lchown, modules/makepath,
19482         modules/rmdir, modules/stat: Likewise.
19483
19484 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19485
19486         Merge from tar.
19487         * lib/argp-help.c (make_hol, hol_append): Don't assume that
19488         SIZE_MAX is a valid preprocessor constant.
19489         (__argp_basename): Change from "#ifndef _LIBC"
19490         to "#ifndef __argp_short_program_name", so that
19491         we don't compile these functions for tar.
19492
19493         More merges from coreutils.
19494         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
19495         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
19496         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
19497         * lib/addext.c: Remove; no longer needed.
19498         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
19499         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
19500         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
19501         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
19502         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
19503         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
19504         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
19505         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
19506         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
19507         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
19508         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
19509         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
19510         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
19511         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
19512         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
19513         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
19514         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
19515         Import changes from coreutils.
19516
19517 2004-08-05  Simon Josefsson  <jas@extundo.com>
19518
19519         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
19520
19521 2004-08-05  Simon Josefsson  <jas@extundo.com>
19522
19523         * m4/getsubopt.m4: New file.
19524
19525 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19526
19527         Merge from coreutils.
19528
19529         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
19530         * m4/getcwd-path-max.m4: New files.
19531
19532         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
19533         FILESYSTEM_PREFIX_LEN ->
19534         FILE_SYSTEM_PREFIX_LEN.
19535         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
19536         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
19537         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
19538         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
19539
19540         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
19541         prerequisite modules now handle the DOS stuff.
19542         Don't check for unistd.h.
19543
19544 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19545
19546         Merge from coreutils.
19547
19548         * lib/.gdb-history: Remove; this doesn't belong here.
19549
19550         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
19551         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
19552         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
19553         * lib/getcwd.c: New files.
19554
19555         * lib/dirname.h: Include <stdbool.h>.
19556         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
19557         for consistency with POSIX terminology.  All uses changed.
19558         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
19559         (strip_trailing_slashes): Use bool for booleans.
19560         * lib/stripslash.c (strip_trailing_slashes): Likewise.
19561
19562         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
19563         sometimes returns a positive errno value even when it succeeds.
19564         (print_errno_message) [!LIBC]: Fall back on strerror if
19565         __strerror_r fails.
19566
19567         * lib/path-concat.c (mempcpy): Don't define if a system header defines
19568         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
19569         (longest_relative_suffix): New function.
19570         (path_concat): Use it.  Assume first argument is not NULL.
19571         Port to DOS.  Omit redundant separators.
19572         Report an error instead of returning NULL.
19573         Use mempcpy instead of memcpy.
19574         (xpath_concat): Remove: not declared or used.
19575
19576         * lib/same.h: Include <stdbool.h>
19577         (same_name): Return bool, not int.
19578         * lib/same.c (same_name): Likewise.
19579         (errno): Don't declare; we assume C89 or better now.
19580
19581         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
19582         if not already defined.
19583
19584         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
19585         * lib/dup-safer.c (errno): Likewise.
19586
19587 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
19588
19589         Merge from coreutils.
19590         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
19591         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
19592         * modules/path-concat: Don't depend on strdup.
19593
19594 2004-08-03  Simon Josefsson  <jas@extundo.com>
19595
19596         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
19597         * lib/progname.h: Don't include stdbool.h.
19598
19599 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19600
19601         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
19602         * MODULES.html.sh (func_all_modules): Remove fatal.
19603
19604 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19605
19606         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
19607
19608 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
19609
19610         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
19611         working.
19612
19613 2004-08-02  Simon Josefsson  <jas@extundo.com>
19614
19615         * lib/getsubopt.h: New file, with comments from Bruno Haible.
19616         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
19617         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
19618
19619 2004-08-01  Simon Josefsson  <jas@extundo.com>
19620
19621         * lib/xgetdomainname.c: Include stdlib.h, for free().
19622
19623 2004-07-19  Bruno Haible  <bruno@clisp.org>
19624
19625         * MODULES.html.sh (func_all_modules): Add dummy.
19626
19627 2004-07-16  Simon Josefsson  <jas@extundo.com>
19628
19629         * modules/dummy: New file.
19630
19631 2004-07-16  Simon Josefsson  <jas@extundo.com>
19632
19633         * lib/dummy.c: New file.
19634
19635 2004-07-16  Bruno Haible  <bruno@clisp.org>
19636
19637         * lib/backupfile.h: Add extern "C" for C++.
19638         * lib/closeout.h: Likewise.
19639         * lib/copy-file.h: Likewise.
19640         * lib/findprog.h: Likewise.
19641         * lib/full-write.h: Likewise.
19642         * lib/pathname.h: Likewise.
19643         * lib/progname.h: Likewise.
19644         * lib/stpcpy.h: Likewise.
19645         * lib/stpncpy.h: Likewise.
19646         * lib/strcase.h: Likewise.
19647         * lib/strstr.h: Likewise.
19648         * lib/xalloc.h: Likewise.
19649
19650         * lib/mbswidth.h: Add extern "C" for C++.
19651         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
19652
19653 2004-07-13  Robert Millan  <robertmh@gnu.org>
19654
19655         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
19656
19657 2004-07-09  Simon Josefsson  <jas@extundo.com>
19658
19659         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
19660         failed without this.)
19661
19662 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
19663
19664         * modules/chown (Files): Add lib/fchown-stub.c, since
19665         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
19666
19667 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
19668
19669         * lib/fchown-stub.c: New file.
19670
19671 2004-06-24  Jim Meyering  <jim@meyering.net>
19672
19673         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
19674
19675 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19676
19677         * modules/argz: Omit "#include".
19678
19679         * MODULES.html.sh (func_all_modules): Add calloc, to match
19680         2004-06-01 addition of calloc module.
19681
19682 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19683
19684         * m4/argz.m4: New file, which is autoupdated from libtool.
19685
19686 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19687
19688         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
19689         libtool.
19690
19691 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19692
19693         * config/srclist-update: Don't insist on "USA." before the
19694         close-comment, as libtool omits the period and puts the */ on a
19695         separate line.
19696         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
19697         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
19698
19699 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
19700
19701         * modules/argz: New file.
19702         * MODULES.html.sh (func_all_modules): Add argz.
19703
19704 2004-06-12  Jim Meyering  <jim@meyering.net>
19705         and  Paul Eggert  <eggert@cs.ucla.edu>
19706
19707         * modules/hash (Files): Add lib/xalloc.h.
19708         * modules/pipe (Depends-on): Add wait-process.
19709         * modules/stat (Depends-on): Add xalloc.
19710         * modules/userspec (Files): Add lib/userspec.h.
19711         * modules/xstrto
19712
19713         Upgrade from gettext-0.13.
19714         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
19715         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
19716         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
19717
19718 2004-06-10  Jim Meyering  <jim@meyering.net>
19719
19720         * lib/calloc.c: New file.
19721
19722 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
19723
19724         * lib/getdate.y (yylex): Allow space between sign and number.
19725         Problem reported by Dan Jacobson.
19726
19727 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
19728
19729         Merge from coreutils CVS.
19730
19731         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
19732         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
19733         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
19734         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
19735         xstrtol.m4: Fix copyright date and/or serial number.
19736
19737         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
19738         See if we need an fchown replacement.
19739         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
19740         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
19741         and use the replacement function if we detect either defect.
19742
19743         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
19744         gl_UTIMECMP.
19745
19746 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
19747         and  Jim Meyering  <jim@meyering.net>
19748
19749         Merge from coreutils CVS.
19750
19751         * lib/stat-macros.h: New file, with contents from file-type.h
19752         and coreutils' system.h.
19753         * lib/file-type.c: Include "stat-macros.h".
19754         * lib/file-type.h (file_type): Move all macro definitions to new file,
19755         stat-macros.h.
19756
19757         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
19758         Wrap old code with this conditional.
19759         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
19760         function that does not dereference symlinks.
19761         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
19762
19763         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
19764         dependency problems.
19765         (xreadlink): Accept new arg SIZE, for efficiency.
19766         All decls and uses changed.
19767         * lib/xreadlink.h: Include <stddef.h>, for size_t.
19768
19769         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
19770         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
19771
19772         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
19773         sysexits.h.
19774
19775 2004-06-01  Jim Meyering  <jim@meyering.net>
19776
19777         * m4/calloc.m4: New file.
19778
19779 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
19780
19781         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
19782         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
19783         Also, fix a typo in a diagnostic.
19784
19785 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
19786
19787         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
19788         or AC_FUNC_REALLOC.
19789
19790 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
19791
19792         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
19793         macros to be defined.
19794         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
19795         the allocator returns NULL because the requested size is zero.
19796
19797 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
19798
19799         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
19800         var.  Add comment explaining why libc still defines it.  This
19801         merges the following patch from glibc:
19802         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
19803
19804 2004-05-20  Andreas Schwab  <schwab@suse.de>
19805
19806         * m4/free.m4: Replace free if it not known to work, not the other
19807         way round.
19808
19809 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
19810
19811         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
19812         present in glibc since revision 1.1 of this file.
19813         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
19814         obstack_alignment_mask, obstack_alloc, obstack_base,
19815         obstack_blank, obstack_blank_fast, obstack_chunk_size,
19816         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
19817         obstack_grow0, obstack_init, obstack_int_grow,
19818         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
19819         obstack_next_free, obstack_object_size, obstack_ptr_grow,
19820         obstack_ptr_grow_fast, obstack_room): Remove declarations of
19821         nonexistent functions.
19822
19823 2004-05-18  Karl Berry  <karl@gnu.org>
19824
19825         * config/srclist.txt: break link for vasnprintf.c.
19826
19827 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
19828
19829         Port obstack to the AS/400, where pointers are 16 bytes wide and
19830         you cannot cast an integer to a valid pointer.  This patch is
19831         currently waiting to be integrated into glibc; see
19832         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
19833
19834         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
19835         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
19836         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
19837         (struct obstack): temp member is now a union of a pointer and
19838         an integer, instead of an integer.  All integer uses changed.
19839         This does not affect the physical layout of struct obstack,
19840         except on hosts (like the AS/400) where the size or alignment of
19841         void * is greater than that of ptrdiff_t.
19842         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
19843         __STDC__)]: Store temporary in pointer member of union, not
19844         integer member.
19845         * lib/obstack.c: Include <stddef.h>, for offsetof.
19846         (struct fooalign): Remove; it doesn't need a name.
19847         (union fooround): Change double to long double, and add void *.
19848         (DEFAULT_ALIGNMENT): Use offsetof to compute.
19849         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
19850         not a macro.  Hence the values are always int; so remove all
19851         casts-to-int in uses.
19852
19853 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
19854
19855         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
19856         we can get this patch merged into glibc.
19857
19858 2004-05-17  Derek R. Price  <derek@ximbiot.com>
19859             Paul Eggert  <eggert@cs.ucla.edu>
19860
19861         * m4/argp: Depend on alloca.
19862
19863 2004-05-17  Derek R. Price  <derek@ximbiot.com>
19864             Paul Eggert  <eggert@cs.ucla.edu>
19865
19866         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
19867         freecoding.
19868
19869 2004-05-17  Bruno Haible  <bruno@clisp.org>
19870
19871         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
19872         precision that consists of a '.' followed by an empty digit string.
19873         Patch by Tor Lillqvist <tml@iki.fi>.
19874
19875 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
19876
19877         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
19878         for backward compatibility with older code.  We need our own
19879         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
19880         it under some other name, and our alloca.h will define it.
19881
19882 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
19883             Derek Price  <derek@ximbiot.com>
19884
19885         * lib/alloca.c: Include <alloca.h>, to get our interface.
19886         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
19887         include <alloca.h> first.  Use C89 prototype for alloca; this
19888         requires including <stddef.h> for size_t.  Use extern "C" if C++.
19889         Use #elif for simplicity, since we can assume C89 now.
19890         Don't try to source the system alloca.h since it will not be found
19891         and to prevent recursively including its replacement.
19892         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
19893         * lib/regex.c: Likewise.
19894
19895 2004-05-16  Derek Price  <derek@ximbiot.com>
19896             Paul Eggert  <eggert@cs.ucla.edu>
19897
19898         getline cleanup.  This changes the getndelim2 API: both order of
19899         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
19900         no delimiter).
19901
19902         * lib/getline.c: Don't include stddef.h or stdio.h, since our
19903         interface does that.
19904         (getline): Always use getdelim, so that we don't have two
19905         copies of this code.
19906         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
19907         if available.
19908         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
19909         (GETNDELIM2_MAXIMUM): New macro.
19910         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
19911         instead of the old practice of delim2==0.  All callers changed.
19912         Return -1 on overflow, instead of returning junk.
19913         Do not set *linesize unless allocation succeeds.
19914         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
19915         that we include sys/types.h.
19916         * lib/getnline.h: Likewise.
19917         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
19918         (getndelim2): Reorder arguments.
19919         * lib/getnline.c (getnline, getndelim):
19920         Don't discard the NMAX argument.
19921         (getnline): Invoke getndelim, to avoid code duplication.
19922         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
19923         of (size_t) -1 by callers of the getnline family.
19924
19925 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19926
19927         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
19928         Check for gettimeofday.
19929         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
19930         Check for settimeofday, stime.
19931
19932 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
19933
19934         * lib/nanosleep.c (suspended): Change its type from int to
19935         sig_atomic_t volatile.
19936         (first_call): Make it private to rpl_nanosleep, and have it
19937         be zero initially as that's a bit faster.
19938         (my_usleep): Round up fractional times instead of truncating them,
19939         as this is the usual meaning for 'sleep'.
19940
19941         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
19942         doesn't work.
19943         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
19944         (ENOSYS): Define if not defined.
19945         (settime): Fall back on stime if it exists and settimeofday fails.
19946         But don't bother with fallbacks if a method fails with errno == EPERM.
19947
19948 2004-05-11  Jim Meyering  <jim@meyering.net>
19949
19950         Prior to this change, the save_cwd caller required read access to the
19951         current directory on most systems (ones with the fchdir function).
19952
19953         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
19954         fails, try write-only, and finally, resort to using xgetcwd.
19955
19956 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
19957
19958         * lib/obstack.c, obstack.h: Import changes from libc.
19959
19960 2004-04-28  Bruno Haible  <bruno@clisp.org>
19961
19962         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
19963         also implicitly appends .exe to executables.
19964         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
19965         accepts Windows pathnames.
19966         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
19967         Treat Cygwin like Windows, since it now accepts Windows pathnames.
19968         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
19969         Treat Cygwin like Windows, since it now accepts Windows pathnames.
19970         Reported by Derek Robert Price <derek@ximbiot.com>.
19971
19972 2004-04-21  Karl Berry  <karl@gnu.org>
19973
19974         * config/srclist.txt (localcharset.c): break sync.
19975
19976 2004-04-20  Paul Eggert  <eggert@twinsun.com>
19977
19978         * m4/host-os.m4: Add a copyright notice.
19979
19980 2004-04-20  Jim Meyering  <jim@meyering.net>
19981
19982         Change UTILS_ to gl_ in AC_DEFINE'd names.
19983         Change utils_- and jm_-prefixed variables, too.
19984         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
19985         UTILS_FUNC_MKDIR_TRAILING_SLASH.
19986         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
19987
19988         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
19989         Don't emit trailing blanks.
19990         Also rename jm_-prefixed variables to have gl_ prefix.
19991
19992         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
19993         Also rename jm_-prefixed variables to have gl_ prefix.
19994
19995         * m4/jm-macros.m4: Reflect the renamings.
19996         * m4/prereq.m4: Likewise.
19997
19998 2004-04-20  Jim Meyering  <jim@meyering.net>
19999
20000         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
20001         memory.
20002
20003 2004-04-20  Jim Meyering  <jim@meyering.net>
20004             Bruno Haible  <bruno@clisp.org>
20005
20006         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
20007         memory when realloc fails.
20008
20009 2004-04-19  Jim Meyering  <jim@meyering.net>
20010
20011         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
20012         now that readutmp.c may call `free (0)'.
20013
20014 2004-04-19  Bruno Haible  <bruno@clisp.org>
20015
20016         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
20017         * m4/inttypes_h.m4: Likewise.
20018         * m4/stdint_h.m4: Likewise.
20019         * m4/intmax_t.m4: Likewise.
20020         * m4/uintmax_t.m4: Likewise.
20021
20022 2004-04-18  Jim Meyering  <jim@meyering.net>
20023
20024         * m4/prereq.m4: Don't forbid jm_ prefix.
20025
20026         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
20027         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
20028         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
20029         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
20030         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
20031         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
20032         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
20033         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
20034         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
20035         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
20036         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
20037         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
20038         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
20039         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
20040         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
20041         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
20042         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
20043         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
20044         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
20045
20046 2004-04-18  Jim Meyering  <jim@meyering.net>
20047
20048         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
20049         failure, don't leak memory and do call END_UTMP_ENT.
20050
20051 2004-04-16  Jim Meyering  <jim@meyering.net>
20052
20053         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
20054         coreutils' stat program.
20055         (gl_PREREQ): Don't require jm_PREREQ_STAT.
20056
20057 2004-04-11  Paul Eggert  <eggert@twinsun.com>
20058
20059         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
20060         C89.
20061         (CHAR_BIT): Remove, since we assume C89.
20062         Include <stdint.h> if available, as per current Autoconf CVS advice.
20063
20064 2004-03-31  Jim Meyering  <jim@meyering.net>
20065
20066         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
20067         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
20068         * m4/xalloc.m4: Likewise.
20069
20070 2004-03-30  Paul Eggert  <eggert@twinsun.com>
20071
20072         Merge from coreutils.
20073
20074         * m4/inttostr.m4: New file.
20075         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
20076         Require AM_STDBOOL_H and gl_TIMESPEC instead.
20077         Require gl_CLOCK_TIME.
20078         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
20079
20080 2004-03-30  Paul Eggert  <eggert@twinsun.com>
20081
20082         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
20083         not bool, to be more consistent with Unix conventions.
20084         Suggested by Bruno Haible.
20085
20086         Merge from coreutils.
20087
20088         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
20089         * lib/umaxtostr.c: New files.
20090
20091         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
20092         the usual <time.h> dance.
20093         (get_date): Change signature to support fractional time stamps.
20094         All callers changed.
20095         * lib/getdate.y: Include "getdate.h" first, as we can now
20096         assume C89 and don't need to worry about 'const'.
20097         Similarly, include "unlocked-io.h" near start, not in middle.
20098         Include <limits.h>.
20099         (textint.value): Use long int rather than int.
20100         (textint.digits): Use size_t rather than int.
20101         (BILLION, LOG10_BILLION): New constants.
20102         (parser_control): New member rel_ns.  Members day_ordinal,
20103         time_zone, month, day, hour, minutes, rel_year, rel_month,
20104         rel_day, rel_hour, rel_minutes, rel_seconds
20105         are now long int, not int.  Member seconds is now struct timespec,
20106         not int.  New member timespec_seen.  Members dates_seen, days_seen,
20107         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
20108         not int.
20109         (%union.intval): Now long int, not int.
20110         New member timespec.
20111         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
20112         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
20113         (spec): Now is a timespec or an item list.
20114         (timespec, items): New nonterminals.
20115         (time, rel, relunit, number, get_date):
20116         Add support for fractional seconds.
20117         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
20118         (gmtime, localtime, mktime): Remove decls; not needed with C89.
20119         (to_hour): First arg is now long int, not int.
20120         (to_year): Returns long int, not int.
20121         Don't treat year -70 like 70.
20122         (tm_diff): Returns long int, not int.
20123         (lookup_word): Use bool instead of int when appropriate.
20124         (yylex): Use size_t for count, not int.
20125         Detect overflow when parsing large integer constants.
20126         Add support for fractions.
20127         (get_date): Make pointers 'const' if possible.
20128         Use more-portable code to detect integer overflow.
20129         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
20130         Don't use ctime; it's not reliable if the year has >4 digits.
20131
20132         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
20133         This is for compatibility with BSD.
20134
20135         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
20136         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
20137         From coreutils' system.h.
20138
20139         * lib/userspec.c: Don't include "posixver.h".
20140         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
20141         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
20142         compatible extension.  Simplify code by removing a boolean int
20143         that was always nonzero if a string was nonnull.
20144
20145 2004-03-30  Jim Meyering  <jim@meyering.net>
20146
20147         Merge from coreutils.
20148
20149         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
20150         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
20151         on some systems one must include <grp.h> before it.
20152         Reported by Christian Krackowizer.
20153
20154 2004-03-30  Jim Meyering  <jim@meyering.net>
20155
20156         Merge from coreutils.
20157
20158         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
20159
20160         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
20161         an empty input stream.
20162
20163         * lib/readtokens.c: Include <stdbool.h>.
20164         (readtoken): Use `size_t' rather than int/long.
20165         All callers adjusted.
20166         Use `bool' rather than `int' where appropriate.
20167         Use memset rather than an explicit loop.
20168         Use x2nrealloc rather than xrealloc.
20169         Allow the use of `\0' as a delimiter.
20170         (readtokens): Likewise.
20171         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
20172
20173 2004-03-30  Jim Meyering  <jim@meyering.net>
20174
20175         * m4/realloc.m4: Remove file, since now it does no more than
20176         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
20177         the `configure.ac' section of module/realloc.
20178         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
20179
20180 2004-03-30  Bruno Haible  <bruno@clisp.org>
20181
20182         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
20183         nonnull.
20184
20185 2004-03-29  Paul Eggert  <eggert@twinsun.com>
20186
20187         Merge changes to getloadavg.c from coreutils and Emacs.
20188
20189         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
20190         Define to an expression, not to the empty string.
20191         Include cloexec.h and xalloc.h.
20192         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
20193         Use set_cloexec_flag rather than rolling our own.
20194         * lib/cloexec.c, lib/cloexec.h: New files.
20195
20196 2004-03-29  Paul Eggert  <eggert@twinsun.com>
20197
20198         * m4/cloexec.m4: New file.
20199
20200 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20201
20202         * lib/getopt.h: Sync with libc CVS.
20203
20204 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20205             Bruno Haible  <bruno@clisp.org>
20206
20207         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
20208         mbswidth.
20209
20210 2004-03-18  Paul Eggert  <eggert@twinsun.com>
20211             Bruno Haible  <bruno@clisp.org>
20212
20213         * lib/mbswidth.h: Include <wchar.h> only if
20214         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
20215         <wchar.h>.
20216         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
20217
20218 2004-03-09  Paul Eggert  <eggert@twinsun.com>
20219
20220         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
20221         Sync with libc CVS.
20222         * lib/getopt_int.h: New file, also synced from libc.
20223
20224 2004-03-09  Paul Eggert  <eggert@twinsun.com>
20225
20226         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
20227         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
20228         Bring back getopt.c, getopt.h, getopt1.c.
20229
20230 2004-03-07  Paul Eggert  <eggert@twinsun.com>
20231
20232         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
20233         All uses changed.  Check for sa_sigaction member; this fixes
20234         a bug first reported by Jason Andrade in
20235         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
20236
20237 2004-03-07  Paul Eggert  <eggert@twinsun.com>
20238
20239         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
20240         '#if' expressions.  Unlike the code it replaces, it does not
20241         depend on (defined _SC_PAGESIZE).  However, it does depend on
20242         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
20243         first reported by Jason Andrade in
20244         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
20245
20246 2004-02-25  Simon Josefsson  <jas@extundo.com>
20247
20248         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
20249
20250 2004-02-25  Simon Josefsson  <jas@extundo.com>
20251
20252         * lib/strdup.h: New file.
20253         * lib/strdup.c: Include it.
20254         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
20255         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
20256
20257 2004-02-23  Karl Berry  <karl@gnu.org>
20258
20259         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
20260         (from fencepost.gnu.org:/gd/gnuorg).
20261
20262 2004-02-23  Karl Berry  <karl@gnu.org>
20263
20264         * config/srclistvars.sh (GNUORG) [karl]: redefine.
20265         * config/srclist.txt: add maintain/standards documents.
20266
20267 2004-02-18  Bruno Haible  <bruno@clisp.org>
20268
20269         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
20270         Reported by Derek Robert Price <derek@ximbiot.com>.
20271
20272 2004-02-16  Karl Berry  <karl@gnu.org>
20273
20274         * config/mkinstalldirs, install-sh: update from automake.
20275
20276 2004-02-06  Karl Berry  <karl@gnu.org>
20277
20278         * m4/po.m4: update from gettext 0.14.1.
20279
20280 2004-02-06  Karl Berry  <karl@gnu.org>
20281
20282         * lib/config.charset: update from gettext 0.14.1.
20283
20284 2004-02-05  Paul Eggert  <eggert@twinsun.com>
20285
20286         Add comments and code, prompted by suggestions from Bruno Haible
20287         for sh-quote.
20288         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
20289         describing the enum quoting_style values.
20290         * lib/quotearg.c (quotearg_alloc): New function.
20291         (quotearg_buffer_restyled): Treat lone { and } as special.
20292         Treat = as special.  Work around bug with older shells
20293         that "see" a '\' that is really the 2nd byte of a multibyte char.
20294         Quote empty string with shell_quoting_style.
20295
20296 2004-02-03  Bruno Haible  <bruno@clisp.org>
20297
20298         * m4/pipe.m4: New file, from GNU gettext.
20299
20300 2004-02-03  Bruno Haible  <bruno@clisp.org>
20301
20302         * lib/pipe.h: New file, from GNU gettext.
20303         * lib/pipe.c: New file, from GNU gettext.
20304
20305 2004-01-27  Bruno Haible  <bruno@clisp.org>
20306
20307         * m4/execute.m4: New file, from GNU gettext.
20308
20309 2004-01-27  Bruno Haible  <bruno@clisp.org>
20310
20311         * lib/execute.h: New file, from GNU gettext.
20312         * lib/execute.c: New file, from GNU gettext.
20313         * lib/w32spawn.h: New file, from GNU gettext.
20314
20315 2004-01-24  Paul Eggert  <eggert@twinsun.com>
20316
20317         Merge from diffutils.
20318
20319         * lib/file-type.c (file_type): Add typed memory objects.
20320         * lib/file-type.h (S_TYPEISTMO): New macro.
20321
20322         * lib/c-stack.h (c_stack_action): Remove argv argument.
20323         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
20324         (die): Don't calculate message unless segv_action returns.
20325         (get_stack_location, min_address_from_argv, max_address_from_argv,
20326         volatile stack_base, volatile_stack_size): Remove.
20327         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
20328         that every segmentation violation is a stack overflow.  (Ouch!)
20329         See Debian bug 136249 (still outstanding) for more info about why
20330         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
20331
20332 2004-01-24  Paul Eggert  <eggert@twinsun.com>
20333
20334         Exit-status fix from coreutils.
20335
20336         Use exit_failure consistently in place of EXIT_FAILURE,
20337         so that program exit statuses are consistent on failure.
20338
20339         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
20340         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
20341         * lib/argmatch.h: Comment fix to match the above.
20342         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
20343         Now a macro referring to exit_failure, instead of a separate
20344         variable.  Include "exitfail.h" to get it.
20345         * lib/xstrtol.h: Include "exitfail.h".
20346         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
20347
20348         * lib/long-options.c (parse_long_options): Use prototype
20349         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
20350         for clarity.
20351
20352 2004-01-21  Jim Meyering  <jim@meyering.net>
20353
20354         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
20355         so as not to conflict with a different-sized __mktime_internal
20356         function in GNU libc.
20357         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
20358         Problem building statically-linked `ls' reported by Michael Brunnbauer.
20359
20360 2004-01-20  Karl Berry  <karl@gnu.org>
20361
20362         * config/config.guess: update from config.
20363
20364         * config/srclistvars.sh: GNUWWWLICENSES for karl.
20365
20366 2004-01-20  Bruno Haible  <bruno@clisp.org>
20367
20368         Safer stack allocation.
20369         * lib/setenv.c: Include allocsa.h.
20370         (alloca): Remove fallback definition.
20371         (freea): Remove macro.
20372         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
20373         instead of freea.
20374
20375 2004-01-20  Bruno Haible  <bruno@clisp.org>
20376
20377         * m4/eealloc.m4: New file, from GNU gettext.
20378
20379 2004-01-20  Bruno Haible  <bruno@clisp.org>
20380
20381         * m4/allocsa.m4: New file, from GNU gettext.
20382
20383 2004-01-20  Bruno Haible  <bruno@clisp.org>
20384
20385         * lib/xallocsa.h: New file, from GNU gettext.
20386         * lib/xallocsa.c: New file, from GNU gettext.
20387
20388 2004-01-20  Bruno Haible  <bruno@clisp.org>
20389
20390         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
20391
20392 2004-01-20  Bruno Haible  <bruno@clisp.org>
20393
20394         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
20395         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
20396         specially.
20397
20398 2004-01-20  Bruno Haible  <bruno@clisp.org>
20399
20400         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
20401         patch.
20402
20403 2004-01-20  Bruno Haible  <bruno@clisp.org>
20404
20405         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
20406
20407 2004-01-20  Bruno Haible  <bruno@clisp.org>
20408
20409         * lib/eealloc.h: New file.
20410
20411 2004-01-20  Bruno Haible  <bruno@clisp.org>
20412
20413         * lib/binary-io.h: Avoid warnings on Cygwin.
20414
20415 2004-01-20  Bruno Haible  <bruno@clisp.org>
20416
20417         * lib/allocsa.h: New file, from GNU gettext.
20418         * lib/allocsa.c: New file, from GNU gettext.
20419
20420 2004-01-18  Karl Berry  <karl@gnu.org>
20421
20422         * doc/gpl.texi, doc/lgpl.texi: new files.
20423
20424 2004-01-18  Karl Berry  <karl@gnu.org>
20425
20426         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
20427         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
20428
20429 2004-01-15  Paul Eggert  <eggert@twinsun.com>
20430
20431         Merge from coreutils.
20432
20433         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
20434         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
20435         (gl_DEFAULT_POSIX2_VERSION): Move
20436         the documentation from 'configure' into 'config.hin',
20437         so that 'configure --help' isn't burdened by it and
20438         we don't have to worry about its formatting there.
20439         Reword the documentation so that it's more succinct
20440         and can be run together into a single paragraph.
20441         * m4/same.m4 (gl_SAME): Check for pathconf.
20442
20443 2004-01-15  Paul Eggert  <eggert@twinsun.com>
20444
20445         Merge from coreutils.
20446
20447         * lib/posixver.c: Include posixver.h.
20448
20449         * lib/same.c: Include <stdbool.h>, <limits.h>.
20450         (_POSIX_NAME_MAX): Define if not defined.
20451         (MIN): New macro.
20452         (same_name): If file names are silently truncated, report
20453         that the file names are the same if they are the same after
20454         the silent truncation.
20455
20456         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
20457         conversion function.
20458         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
20459         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
20460         longer needed.
20461
20462 2004-01-15  Jim Meyering  <jim@meyering.net>
20463
20464         Merge from coreutils.
20465
20466         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
20467         if no library is required.
20468         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
20469         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
20470         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
20471         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
20472         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
20473         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
20474         value, $ac_cv_search_crypt, if it's "none required".
20475         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
20476         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
20477         not gl_FUNC_GETLOADAVG.
20478         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
20479         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
20480
20481 2004-01-15  Jim Meyering  <jim@meyering.net>
20482
20483         Merge from coreutils.
20484
20485         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
20486         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
20487         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
20488
20489         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
20490         optional configure-time default.
20491
20492         * lib/version-etc.c (version_etc_copyright): Update copyright date.
20493
20494         * lib/xreadlink.c (xreadlink): Correct outdated comment.
20495
20496 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
20497
20498         Merge from coreutils.
20499
20500         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
20501         value, $ac_cv_search_nanosleep, if it's "none required".
20502
20503 2004-01-14  Paul Eggert  <eggert@twinsun.com>
20504
20505         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
20506         with like-named macro in fnmatch.c.
20507         (EXT): Use an internal constant instead.
20508
20509         Merge fnmatch patches from glibc.
20510         * lib/fnmatch.c (mbsinit): Remove define.
20511         Add libc_hidden_ver (__fnmatch, fnmatch).
20512         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
20513         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
20514
20515 2004-01-14  Karl Berry  <karl@gnu.org>
20516
20517         * config/install-sh: update from automake.
20518
20519 2004-01-13  Karl Berry  <karl@gnu.org>
20520
20521         * config/install-sh: update from automake.
20522
20523 2004-01-09  Karl Berry  <karl@gnu.org>
20524
20525         * config/install-sh: update from automake.
20526
20527 2004-01-05  Karl Berry  <karl@gnu.org>
20528
20529         * config/config.{sub,guess}: update from config.
20530
20531 2003-12-31  Karl Berry  <karl@gnu.org>
20532
20533         * config/depcomp: update from automake.
20534
20535 2003-12-14  Karl Berry  <karl@gnu.org>
20536
20537         * lib/config.charset: update from gettext-runtime.
20538
20539 2003-12-03  Paul Eggert  <eggert@twinsun.com>
20540
20541         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
20542         Bug reported by Alfred M. Szmidt.
20543
20544 2003-12-03  Bruno Haible  <bruno@clisp.org>
20545
20546         * m4/gettext.m4: Upgrade from gettext-0.13.
20547         * m4/po.m4: Upgrade from gettext-0.13.
20548         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
20549         * m4/intmax.m4: New file, from gettext-0.13.
20550         * m4/printf-posix.m4: New file, from gettext-0.13.
20551
20552 2003-11-29  Karl Berry  <karl@gnu.org>
20553
20554         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
20555
20556 2003-11-25  Paul Eggert  <eggert@twinsun.com>
20557             Bruno Haible  <bruno@clisp.org>
20558
20559         * lib/printf-parse.h: Don't include sys/types.h.
20560         (ARG_NONE): New macro.
20561         (char_directive): Change type of *arg_index fields to size_t.
20562         * lib/printf-parse.c: Don't include sys/types.h.
20563         (SSIZE_MAX): Remove macro.
20564         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
20565         Remove unnecessary overflow check.
20566         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
20567         fields.
20568
20569 2003-11-25  Bruno Haible  <bruno@clisp.org>
20570
20571         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
20572
20573 2003-11-25  Bruno Haible  <bruno@clisp.org>
20574
20575         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
20576         gt_TYPE_SSIZE_T.
20577
20578 2003-11-24  Paul Eggert  <eggert@twinsun.com>
20579
20580         * modules/alloca: Remove dependency on xalloc.
20581
20582 2003-11-24  Paul Eggert  <eggert@twinsun.com>
20583
20584         * lib/alloca.c: Remove dependency on xalloc module.
20585         (xalloc_die): Remove.
20586         (memory_full) [!defined emacs]: New macro.
20587         [!defined emacs]: Don't include xalloc.h.
20588         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
20589         address arithmetic overflows.  Change datatypes a bit to avoid
20590         unnecessary casts.
20591
20592 2003-11-22  Jim Meyering  <jim@meyering.net>
20593
20594         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
20595         s/size/size_t/.
20596
20597 2003-11-21  Karl Berry  <karl@gnu.org>
20598
20599         * config/config.{sub,guess}: update from config.
20600
20601 2003-11-18  Karl Berry  <karl@gnu.org>
20602
20603         * config/config.{sub,guess}: update from config.
20604
20605         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
20606
20607 2003-11-17  Paul Eggert  <eggert@twinsun.com>
20608
20609         * README: Mention that S+T cannot overflow if S is the size of
20610         an existing object and T is sufficiently small.
20611
20612 2003-11-17  Jim Meyering  <jim@meyering.net>
20613
20614         On systems without utime and without a utimes function capable of
20615         dealing with a NULL struct utimbuf* argument, this utime replacement
20616         could -- in unusual circumstances -- leak a file descriptor.
20617         * lib/utime.c: Include <unistd.h> and <errno.h>.
20618         (utime_null): Be sure to close `fd' and to preserve errno.
20619         Reported by Geoff Collyer via Arnold Robbins.
20620
20621 2003-11-17  Bruno Haible  <bruno@clisp.org>
20622
20623         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
20624         (Depends-on): Add xsize.
20625
20626 2003-11-17  Bruno Haible  <bruno@clisp.org>
20627
20628         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
20629
20630 2003-11-17  Bruno Haible  <bruno@clisp.org>
20631
20632         * lib/vasnprintf.c (alloca): Remove fallback definition.
20633         (freea): Remove definition.
20634         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
20635         Reported by Paul Eggert.
20636
20637 2003-11-16  Paul Eggert  <eggert@twinsun.com>
20638             Bruno Haible  <bruno@clisp.org>
20639
20640         Protect against address arithmetic overflow.
20641         * lib/printf-args.h: Include stddef.h.
20642         (arguments): Change type of field 'count' to size_t.
20643         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
20644         'unsigned int' where appropriate.
20645         * lib/printf-parse.h: Include sys/types.h.
20646         (char_directive): Change type of *arg_index fields to ssize_t.
20647         (char_directives): Change type of fields 'count', max_*_length to
20648         size_t.
20649         * lib/printf-parse.c: Include sys/types.h and xsize.h.
20650         (SSIZE_MAX): Define fallback value.
20651         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
20652         instead of 'int' where appropriate. Check a_allocated, d_allocated
20653         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
20654         * lib/vasnprintf.c: Include xsize.h.
20655         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
20656         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
20657         overflow. Avoid wraparound when converting a width or precision from
20658         decimal to binary.
20659
20660 2003-11-16  Bruno Haible  <bruno@clisp.org>
20661
20662         Update from GNU gettext.
20663         * lib/printf-parse.c: Generalize to it can be compiled for wide
20664         strings.
20665         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
20666         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
20667         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
20668         SNPRINTF): New macros.
20669         Don't include <alloca.h> if the file is used inside libintl.
20670         (local_wcslen): New function, for Solaris 2.5.1.
20671         (VASNPRINTF): Use it instead of wcslen.
20672
20673 2003-11-16  Bruno Haible  <bruno@clisp.org>
20674
20675         * lib/xsize.h (xmax): New function.
20676         (xsum, xsum3, xsum4): Declare as "pure" functions.
20677
20678 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20679
20680         * modules/xalloc (Files): Undo latest change, since xalloc.h
20681         no longer needs SIZE_MAX or PTRDIFF_MAX.
20682
20683 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20684
20685         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
20686         gl_PTRDIFF_MAX.
20687
20688 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20689
20690         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
20691         "return", to pacify some unknown compiler.  Problem reported
20692         by Joerg Schilling.
20693
20694 2003-11-12  Paul Eggert  <eggert@twinsun.com>
20695
20696         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
20697         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
20698         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
20699         heuristic is just as accurate as far as we know, and it removes a
20700         dependency on size_max.m4 and ptrdiff_max.m4.
20701
20702 2003-11-11  Bruno Haible  <bruno@clisp.org>
20703
20704         * modules/xsize (Files): Add m4/size_max.m4.
20705         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
20706
20707 2003-11-11  Bruno Haible  <bruno@clisp.org>
20708
20709         * m4/size_max.m4: New file.
20710         * m4/ptrdiff_max.m4: New file.
20711         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
20712         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
20713         (gl_XALLOC): Invoke it.
20714
20715 2003-11-11  Bruno Haible  <bruno@clisp.org>
20716
20717         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
20718         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
20719         defined.
20720
20721 2003-11-10  Paul Eggert  <eggert@twinsun.com>
20722
20723         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
20724         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
20725         rejected some allocations of exactly SIZE_MAX - 2 bytes.
20726         From Bruno Haible.
20727         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
20728         not (size_t) -1, since it's defined here.
20729
20730 2003-11-09  Karl Berry  <karl@gnu.org>
20731
20732         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
20733
20734 2003-11-06  Paul Eggert  <eggert@twinsun.com>
20735
20736         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
20737         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
20738         Reject sizes of exactly SIZE_MAX bytes.
20739         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
20740         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
20741
20742 2003-11-05  Bruno Haible  <bruno@clisp.org>
20743
20744         * lib/xsize.h: Include limits.h, to avoid a possible collision with
20745         SIZE_MAX defined in <limits.h> on Solaris.
20746
20747 2003-11-04  Jim Meyering  <jim@meyering.net>
20748
20749         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
20750         variable names, rather than @VAR@.
20751         * modules/poll: Likewise.
20752
20753 2003-11-04  Bruno Haible  <bruno@clisp.org>
20754
20755         * modules/xsize: New file.
20756         * modules/linebreak: Depend on xsize.
20757         * MODULES.html.sh (func_all_modules): Add xsize.
20758
20759 2003-11-04  Bruno Haible  <bruno@clisp.org>
20760
20761         * m4/xsize.m4: New file.
20762
20763 2003-11-04  Bruno Haible  <bruno@clisp.org>
20764
20765         * lib/xsize.h: New file.
20766         * lib/linebreak.c: Include xsize.h.
20767         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
20768         argument for overflow.
20769         Suggested by Paul Eggert.
20770
20771 2003-11-03  Karl Berry  <karl@gnu.org>
20772
20773         * config/config.{guess,sub}: update from config.
20774
20775 2003-11-03  Jim Meyering  <jim@meyering.net>
20776
20777         * modules/userspec (lib_SOURCES): Add userspec.h.
20778         (Include): Add "userspec.h".
20779         Improve description.
20780
20781 2003-11-03  Jim Meyering  <jim@meyering.net>
20782
20783         * lib/userspec.c: Include "userspec.h".
20784         * lib/userspec.h: New file.
20785
20786 2003-11-03  Bruno Haible  <bruno@clisp.org>
20787
20788         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
20789
20790 2003-11-03  Bruno Haible  <bruno@clisp.org>
20791
20792         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
20793         available, to avoid (extremely rare) race condition.
20794         Suggested by Paul Eggert.
20795
20796 2003-11-02  Karl Berry  <karl@gnu.org>
20797
20798         * config/srclist.txt (vasprintf.c): sync broken, sigh.
20799
20800 2003-10-31  Paul Eggert  <eggert@twinsun.com>
20801
20802         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
20803         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
20804         (read_filesystem_list): Set and use me_type_malloced.
20805         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
20806         whatever the type happens to be), for brevity and consistency.
20807         Check for size calculation overflow on Alphas running OSF/1.
20808
20809 2003-10-31  Jim Meyering  <jim@meyering.net>
20810
20811         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
20812
20813         * lib/linebuffer.c: Include <string.h> for declaration of memset.
20814
20815 2003-10-30  Paul Eggert  <eggert@twinsun.com>
20816             Bruno Haible  <bruno@clisp.org>
20817
20818         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
20819         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
20820
20821 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
20822
20823         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
20824         netbsd*-gnu*.  Suggested by Robert Millan.
20825
20826 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20827
20828         * modules/group-member: Depend on stdbool.
20829
20830 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20831
20832         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
20833
20834 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20835
20836         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
20837         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
20838         after the 'gnu' in these cases.  This fixes some bugs in the
20839         previous change, and is based on suggestions by Robert Millan.
20840
20841 2003-10-29  Paul Eggert  <eggert@twinsun.com>
20842
20843         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
20844         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
20845         no longer needed.
20846         * lib/quotearg.c (quotearg_n_options): Use it.
20847         * lib/group-member.c: Include <stdbool.h>.
20848         (free_group_info): Arg is now const *; don't free arg.
20849         (get_group_info): Now returns bool and accepts struct group_info *,
20850         rather than returning a malloc'ed struct group_info *.
20851         All uses changed.  Check for overflow in internal size calculation.
20852
20853         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
20854         rather than xmalloc/xrealloc.
20855         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
20856         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
20857         conformance bug: the old code used a pointer after freeing the
20858         storage that it addressed.
20859         * lib/hash.c (hash_initialize): Simplify the code by using
20860         xalloc_oversized rather than doing it by hand.
20861         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
20862         the buffer preserved.  Use free and xmalloc instead.
20863         * lib/quotearg.c (quotearg_n_options): Likewise.
20864         Use a simpler test for size overflow.  Don't use xalloc_oversized
20865         because unsigned int might be wider than size_t (!); this suggests
20866         that we should switch from unsigned int to size_t for slot numbers.
20867
20868 2003-10-28  Paul Eggert  <eggert@twinsun.com>
20869
20870         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
20871         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
20872         NetBSD kernels.  Requested by Richard Stallman.
20873
20874 2003-10-27  Paul Eggert  <eggert@twinsun.com>
20875
20876         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
20877         to allocate the returned structure.  Do not allocate a subarray,
20878         as x2nrealloc will do that.
20879         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
20880         instead of xnrealloc.
20881         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
20882
20883 2003-10-27  Bruno Haible  <bruno@clisp.org>
20884
20885         * lib/stdbool_.h: Better support for BeOS.
20886
20887 2003-10-26  Paul Eggert  <eggert@twinsun.com>
20888
20889         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
20890         now uses inline.
20891
20892 2003-10-26  Paul Eggert  <eggert@twinsun.com>
20893
20894         * lib/xalloc.h (xalloc_oversized): New static inline function, for
20895         callers that want to do their own size-overflow checking.  Include
20896         <stdbool.h>, since xalloc_oversized returns bool.
20897         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
20898         to use xalloc_oversized.
20899
20900         Add two functions x2realloc, x2nrealloc, for programs that grow
20901         arrays dynamically by doubling their sizes.
20902         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
20903         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
20904         New functions.
20905
20906         Port to C99 semantics for 'inline' of external functions.
20907         Bug reported by Bruno Haible.
20908         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
20909         with the old contents of xnmalloc.
20910         (xnmalloc, xmalloc): Use it.
20911         (xnrealloc_inline): New static inline function,
20912         with the old contents of xnrealloc.
20913         (xnrealloc, xrealloc): Use it.
20914
20915         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
20916         that.
20917
20918 2003-10-26  Karl Berry  <karl@gnu.org>
20919
20920         * config/srclist.txt (COPYING.DOC): no longer available from
20921         /gd/gnuorg; don't know where the ultimate source is.
20922
20923 2003-10-25  Paul Eggert  <eggert@twinsun.com>
20924
20925         Fix several address-calculation bugs in the hash modules,
20926         plus some minor code cleanup.
20927
20928         * lib/hash.h: Include <stdbool.h>, for bool.
20929         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
20930         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
20931         hash_get_n_entries, hash_get_max_bucket_length,
20932         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
20933         hash_rehash): Use size_t rather than unsigned.
20934         * lib/hash.c (struct hash_table, hash_get_n_buckets,
20935         hash_get_n_buckets_used, hash_get_n_entries,
20936         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
20937         hash_get_entries, hash_do_for_each, hash_string, is_prime,
20938         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
20939         Likewise.
20940         (SIZE_MAX): Define if not defined.
20941         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
20942         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
20943         hash_print):
20944         Use const * when possible.
20945         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
20946         (check_tuning): Fix bug: if tuning parameters were very close to
20947         0 or 1, rounding errors could have caused subscript violations.
20948         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
20949         (hash_initialize): Add 'fail:' label
20950         to free table and return NULL, and use it to simplify code.
20951         Use calloc rather than clearing the storage ourself.
20952         (hash_initialize, hash_rehash): Check for arithmetic overflow in
20953         buffer size calculations.
20954         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
20955         Include <stddef.h>, for size_t.
20956         * lib/hash-pjw.c (hash_pjw): Likewise.
20957         Switch to method described by Bruno Haible.
20958         Include <limits.h>, for CHAR_BIT.
20959         (SIZE_BITS): New macro.
20960
20961 2003-10-23  Paul Eggert  <eggert@twinsun.com>
20962
20963         * m4/getline.m4 (AM_FUNC_GETLINE):
20964         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
20965         hosts.  Problem reported by Derek Robert Price in
20966         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
20967         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
20968         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
20969
20970 2003-10-21  Paul Eggert  <eggert@twinsun.com>
20971
20972         * lib/getndelim2.c (getndelim2): When size calculation overflows,
20973         ceiling the allocation at NMAX bytes rather than silently
20974         discarding input bytes before NMAX is reached.  This makes
20975         a difference only if NMAX exceeds SIZE_MAX / 2.
20976
20977         * lib/obstack.c: Merge from glibc.
20978         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
20979         Add libc_hidden_def (_obstack_newchunk).
20980         (_obstack_free) [! defined _LIBC]: Remove.
20981         [defined _LIBC]: Make a strong alias from obstack_free, rather than
20982         a clone of the function body.
20983         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
20984         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
20985
20986         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
20987         glibc.
20988         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
20989         arg to memcpy.
20990
20991         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
20992         (obstack_ptr_grow_fast, obstack_int_grow_fast):
20993         Don't use lvalue casts, as GCC plans to remove support for them
20994         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
20995         was also present in the non-GCC version, indicating that this
20996         code had always been buggy and had never been widely used.
20997         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
20998         Use the fast variant of each macro, rather than copying the
20999         definiens of the fast variant; that way, we'll be more likely to
21000         catch future bugs in the fast variants.
21001
21002 2003-10-20  Bruno Haible  <bruno@clisp.org>
21003
21004         * modules/wait-process: New file.
21005         * MODULES.html.sh (func_all_modules): Add wait-process.
21006
21007 2003-10-20  Bruno Haible  <bruno@clisp.org>
21008
21009         * m4/wait-process.m4: New file.
21010
21011 2003-10-20  Bruno Haible  <bruno@clisp.org>
21012
21013         * lib/wait-process.h: New file, from GNU gettext.
21014         * lib/wait-process.c: New file, from GNU gettext.
21015
21016 2003-10-19  Jim Meyering  <jim@meyering.net>
21017
21018         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
21019         HPUX 10.20.
21020
21021 2003-10-18  Karl Berry  <karl@gnu.org>
21022
21023         * config/config.guess: update from config.
21024
21025 2003-10-16  Paul Eggert  <eggert@twinsun.com>
21026
21027         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
21028         (getgroups): First arg is int, not size_t.
21029         Don't let 'free' mangle errno.
21030
21031 2003-10-16  Paul Eggert  <eggert@twinsun.com>
21032
21033         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
21034
21035 2003-10-16  Karl Berry  <karl@gnu.org>
21036
21037         * config/config.{guess,sub}: update from config.
21038
21039 2003-10-16  Jim Meyering  <jim@meyering.net>
21040
21041         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
21042         memcpy.
21043
21044 2003-10-15  Paul Eggert  <eggert@twinsun.com>
21045
21046         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
21047         (SIZE_MAX): Remove.
21048         (new_exclude, add_exclude_file): Initial size no longer needs to
21049         be a power of 2.
21050         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
21051         our own address arithmetic overflow checking.
21052
21053         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
21054         (fnmatch): Do not alloca more than 2000 wide characters;
21055         instead, use malloc for large buffers.
21056         Check for address arithmetic overflow, and return -1
21057         with errno set to ENOMEM in that case.
21058         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
21059         (NEW_PATTERN): Do not alloca more than 8000 bytes;
21060         instead, return -1.  Check for address arithmetic overflow.
21061
21062 2003-10-14  Paul Eggert  <eggert@twinsun.com>
21063
21064         Handle invalid suffixes and overflow independently, so that
21065         callers can treat them independently as needed.  Fix some bugs in
21066         suffix handling, e.g., "100k@" was not diagnosed as an invalid
21067         suffix for a human-readable blocksize.  The major caller-visible
21068         change is the addition of a new
21069         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
21070         that both overflow and suffix chars were found.
21071
21072         * lib/human.c (humblock): Don't check separately for invalid suffix
21073         char; that is xstrtoumax's job (now that its bug is fixed).
21074         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
21075         INTMAX_MAX]: New macros.
21076         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
21077         TYPE_MAXIMUM): New macros.
21078         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
21079         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
21080         if overflow occurs, as it's what __strtol does and it's more useful
21081         in practice.
21082         (__xstrtol): If __strtol reports some error other than ERANGE,
21083         reflect it to the caller as LONGINT_INVALID.  If it reports
21084         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
21085         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
21086         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
21087         value.
21088         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
21089         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
21090         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
21091         [defined UINTMAX_MAX]: New macros.
21092
21093 2003-10-14  Bruno Haible  <bruno@clisp.org>
21094
21095         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
21096
21097 2003-10-14  Bruno Haible  <bruno@clisp.org>
21098
21099         * m4/sig_atomic_t: New file, from GNU gettext.
21100         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
21101
21102 2003-10-14  Bruno Haible  <bruno@clisp.org>
21103
21104         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
21105         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
21106         Also use volatile where needed.
21107
21108 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21109
21110         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
21111         Change maintainer from Bruno Haible to 'all'.
21112
21113 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21114
21115         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
21116
21117 2003-10-12  Paul Eggert  <eggert@twinsun.com>
21118
21119         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
21120         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
21121         and define in terms of the other primitives.
21122         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
21123         (SIZE_MAX): Define if not already defined.
21124         (array_size_overflow): New function.
21125         (xalloc_die): Abort instead of exiting if 'error' returns.
21126         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
21127         (xmalloc, xrealloc): Use them.
21128         (xcalloc): Check for address arithmetic overflow.
21129         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
21130         a bit faster than strcpy.
21131
21132 2003-10-10  Simon Josefsson  <jas@extundo.com>
21133
21134         * modules/argp (Depends-on): Add restrict and strcase.
21135
21136 2003-10-10  Simon Josefsson  <jas@extundo.com>
21137
21138         * m4/argp.m4: Add AC_C_INLINE.
21139
21140 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21141
21142         Merge getpass from libc, plus a few fixes.
21143
21144         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
21145         Include <stdbool.h>.
21146         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
21147         __fsetlocking to empty.
21148         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
21149         do include <bits/libc-lock.h>.
21150         Do not include <fcntl.h>; not needed.
21151         [_LIBC]: Include <wchar.h>.
21152         (NOTCANCEL_MODE): New macro.
21153         (flockfile, funlockfile) [_LIBC]: New macros.
21154         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
21155         [!_LIBC]: New macros.
21156         (call_fclose): New function.
21157         (getpass): Use it.  Save tty stream separately; this simplifies the
21158         code and makes it more reliable if stdin happens to equal stdout.
21159         Invoke __fsetlocking on tty.
21160         Handle thread cancellation if needed.
21161         Namespace cleanup (use __tcgetattr, __getline).
21162         Use bool for Booleans.
21163         [USE_IN_LIBIO]: Handle wide streams.
21164         [!_LIBC]: Unconditionally do the fseek, since we don't know what
21165         stream might go where.
21166
21167         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
21168         doesn't have to include <stdio.h> before us.
21169         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
21170         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
21171         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
21172         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
21173         if not declared, so that we can use getpass.c code from libc without
21174         rewriting it.
21175         (flockfile, ftrylockfile, funlockfile): New macros.
21176
21177 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21178
21179         * modules/getpass: Depend on stdbool.
21180
21181 2003-10-08  Paul Eggert  <eggert@twinsun.com>
21182
21183         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
21184
21185 2003-10-07  Karl Berry  <karl@gnu.org>
21186
21187         * config/config.{guess,sub}: update from config.
21188
21189 2003-10-06  Jim Meyering  <jim@meyering.net>
21190             Bruno Haible  <bruno@clisp.org>
21191
21192         This lets translators provide better translations for the
21193         "Written by ..." part of --version output.
21194         * lib/version-etc.h: Include stdarg.h.
21195         (version_etc_copyright): Declare as readonly.
21196         (version_etc): Make this function variadic with a NULL-terminated list
21197         of author name strings.
21198         (version_etc_va): New declaration.
21199         * lib/version-etc.c: Include stdarg.h, stdlib.h.
21200         (version_etc_copyright): Declare as readonly.
21201         (version_etc_va): New function. Provide a different translatable string
21202         for each possible number of authors < 10. Abbreviate when there are 10
21203         authors or more.
21204         (version_etc): Make this function variadic. Call version_etc_va.
21205         Suggestion from Gary V. Vaughan.
21206
21207         * lib/long-options.h (parse_long_options): Change prototype: the
21208         authors string is moved to the end and becomes variadic.
21209         * lib/long-options.c: Include stdarg.h.
21210         (parse_long_options): Make this function variadic, too.
21211         Call version_etc_va, not version_etc.
21212
21213 2003-10-06  Bruno Haible  <bruno@clisp.org>
21214
21215         * modules/version-etc-2: Remove file.
21216         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
21217
21218 2003-10-06  Bruno Haible  <bruno@clisp.org>
21219
21220         * modules/fatal-signal: New file.
21221         * MODULES.html.sh (func_all_modules): Add fatal-signal.
21222
21223 2003-10-06  Bruno Haible  <bruno@clisp.org>
21224
21225         * m4/fatal-signal.m4: New file.
21226         * m4/signalblocking.m4: New file, from GNU gettext.
21227
21228 2003-10-06  Bruno Haible  <bruno@clisp.org>
21229
21230         * lib/version-etc-2.h: Remove file.
21231         * lib/version-etc-2.c: Remove file.
21232
21233 2003-10-06  Bruno Haible  <bruno@clisp.org>
21234
21235         * lib/fatal-signal.h: New file, from GNU gettext.
21236         * lib/fatal-signal.c: New file, from GNU gettext.
21237
21238 2003-10-05  Paul Eggert  <eggert@twinsun.com>
21239
21240         * README: Rework advice for preventing empty .o files.
21241         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
21242         not <sys/types.h>.
21243
21244 2003-10-04  Karl Berry  <karl@gnu.org>
21245
21246         * lib/argp*: update from libc.
21247
21248 2003-10-04  Karl Berry  <karl@gnu.org>
21249
21250         * config/config.{guess,sub}: update from config.
21251
21252 2003-10-02  Bruno Haible  <bruno@clisp.org>
21253
21254         * modules/lchown (Include): Add lchown.h.
21255         * modules/time_r (Include): Use "..." syntax.
21256         * modules/xgetdomainname (Include): Add xgetdomainname.h.
21257
21258 2003-10-01  Simon Josefsson  <jas@extundo.com>
21259
21260         * MODULES.html.sh (func_all_modules): Move gethostname from section
21261         'based on' to section 'lacking' POSIX:2001.
21262
21263 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
21264
21265         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
21266         to output mode on the same stream.
21267
21268 2003-09-29  Paul Eggert  <eggert@twinsun.com>
21269
21270         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
21271         Fix arg typo in previous patch.
21272
21273 2003-09-28  Jim Meyering  <jim@meyering.net>
21274
21275         * lib/error.c: Correct cpp indentation.
21276
21277 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21278
21279         * modules/free: New file.
21280
21281 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21282
21283         * m4/free.m4: New file.
21284
21285 2003-09-27  Paul Eggert  <eggert@twinsun.com>
21286
21287         * lib/minmax.h (MIN, MAX)
21288         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
21289         Omit the special code that used __typeof__, since we worry that
21290         it could be more trouble than it's worth.  See:
21291         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
21292         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
21293
21294         * lib/free.c: New file.
21295
21296 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
21297
21298         Trivial fixes to Makefile.am parts of module listings.
21299         * modules/strstr: Append strstr.h to lib_SOURCES.
21300         * modules/strcase: Likewise, for strcase.h.
21301
21302 2003-09-27  Karl Berry  <karl@gnu.org>
21303
21304         * config/mkinstalldirs: update from automake.
21305
21306 2003-09-26  Paul Eggert  <eggert@twinsun.com>
21307
21308         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
21309         (error_tail): Do not loop, reallocating temporary buffer, since
21310         the output cannot contain more wide characters than the input
21311         contains bytes, the size must be big enough already.  This avoids
21312         one potential size overflow calculation.  Check for size overflow
21313         when calculating temporary buffer size.  Free temporary buffer
21314         when done, if it was allocated with malloc; this plugs a memory
21315         leak.  Remove casts from void * to pointers, that are no longer
21316         needed now that we're assuming C89 or better.
21317
21318         Merge error changes from glibc.
21319
21320         * lib/error.c, error.h: Update copyright notice header to match glibc.
21321         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
21322         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
21323         Disable cancellation while printing error.
21324         * lib/error.h: Prepend __ to parameter names.
21325
21326 2003-09-26  Jim Meyering  <jim@meyering.net>
21327
21328         * lib/error.c (error_tail): Move some declarations
21329         into inner scope where the local variables are used.
21330
21331 2003-09-26  Bruno Haible  <bruno@clisp.org>
21332
21333         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
21334         stpncpy().
21335         Don't define stpncpy through config.h; it's now done through stpncpy.h.
21336
21337 2003-09-26  Bruno Haible  <bruno@clisp.org>
21338
21339         * lib/stpncpy.h (gnu_stpncpy): New declaration.
21340         (stpncpy): Define as alias for gnu_stpncpy.
21341         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
21342
21343 2003-09-25  Simon Josefsson  <jas@extundo.com>
21344
21345         * lib/xgetdomainname.h: New file.
21346         * lib/xgetdomainname.c: New file.
21347
21348 2003-09-25  Simon Josefsson  <jas@extundo.com>
21349             Bruno Haible  <bruno@clisp.org>
21350
21351         * modules/getdomainname: New file.
21352         * modules/xgetdomainname: New file.
21353         * MODULES.html.sh (func_all_modules): Add getdomainname,
21354         xgetdomainname.
21355
21356 2003-09-25  Simon Josefsson  <jas@extundo.com>
21357             Bruno Haible  <bruno@clisp.org>
21358
21359         * m4/getdomainname.m4: New file.
21360
21361 2003-09-25  Simon Josefsson  <jas@extundo.com>
21362             Bruno Haible  <bruno@clisp.org>
21363
21364         * lib/getdomainname.h: New file.
21365         * lib/getdomainname.c: New file.
21366
21367 2003-09-25  Karl Berry  <karl@gnu.org>
21368
21369         * lib/argp-fmtstream.c, argp-help.c: update from libc.
21370
21371 2003-09-25  Karl Berry  <karl@gnu.org>
21372
21373         * config/install-sh: update from automake.
21374
21375 2003-09-25  Bruno Haible  <bruno@clisp.org>
21376
21377         * modules/version-etc-2: New file, from modules/version-etc with
21378         modifications.
21379         * MODULES.html.sh (func_all_modules): Add version-etc-2.
21380
21381 2003-09-25  Bruno Haible  <bruno@clisp.org>
21382
21383         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
21384         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
21385
21386 2003-09-24  Simon Josefsson  <jas@extundo.com>
21387
21388         * modules/xgethostname: Add xgethostname.h.
21389
21390 2003-09-24  Paul Eggert  <eggert@twinsun.com>
21391
21392         * lib/linebuffer.c (freebuffer): Don't free the argument, just
21393         the buffer associated with the argument.  Bug reported by
21394         Simon Josefsson.
21395
21396 2003-09-24  Paul Eggert  <eggert@twinsun.com>
21397
21398         * README: Document assumptions that 'int' is at least 32 bits
21399         wide, that integer arithmetic is 2's complement without overflow,
21400         that there are no holes in integer values, that adding sizes of
21401         two nonoverlapping objects can't overflow, and that all-bits-zero
21402         yields scalar zero.  Fix spelling and capitalization typos.
21403
21404 2003-09-19  Karl Berry  <karl@gnu.org>
21405
21406         * lib/argp.h: update from libc.
21407
21408 2003-09-17  Paul Eggert  <eggert@twinsun.com>
21409
21410         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
21411         to avoid spurious warnings like "AC_RUN_IFELSE was called before
21412         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
21413
21414 2003-09-17  Paul Eggert  <eggert@twinsun.com>
21415
21416         * gnulib-tool: Use "test -h", not "test -L", for portability
21417         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
21418         (tags_regexp): Remove, since \| doesn't conform to POSIX.
21419         (sed_extract_prog): Issue s commands one-by-one, rather than
21420         using \| in one s command.
21421
21422 2003-09-16  Paul Eggert  <eggert@twinsun.com>
21423
21424         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
21425         input error, instead of returning NULL the next time we are called
21426         (and therefore losing track of errno).
21427
21428 2003-09-16  Bruno Haible  <bruno@clisp.org>
21429
21430         * gnulib-tool (func_create_testdir): Warn about duplicated
21431         dependencies.
21432
21433 2003-09-15  Paul Eggert  <eggert@twinsun.com>
21434
21435         * modules/argmatch, modules/fatal, modules/obstack,
21436         modules/xalloc, modules/xgethostname: Sort dependencies by
21437         importance, not alphabetically.
21438
21439 2003-09-15  Paul Eggert  <eggert@twinsun.com>
21440
21441         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
21442         fails, so that the caller gets the proper errno.
21443
21444         * lib/readutmp.c (read_utmp): Likewise.
21445         Check for fstat error.  Close stream and free storage
21446         when failing.
21447
21448 2003-09-14  Karl Berry  <karl@gnu.org>
21449
21450         * config/srclist.txt (strdup.c): disable for c89 changes.
21451
21452 2003-09-14  Jim Meyering  <jim@meyering.net>
21453
21454         * lib/getloadavg.c: Correct cpp indentation.
21455         * lib/strdup.c: Likewise.
21456         * lib/vasnprintf.c: Likewise.
21457
21458 2003-09-14  Bruno Haible  <bruno@clisp.org>
21459
21460         * modules/fwriteerror: New file.
21461         * MODULES.html.sh (func_all_modules): Add fwriteerror.
21462
21463 2003-09-14  Bruno Haible  <bruno@clisp.org>
21464
21465         * lib/fwriteerror.h: New file.
21466         * lib/fwriteerror.c: New file.
21467
21468 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21469
21470         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
21471         modules/xgethostname, modules/xalloc: Depend on exit.
21472
21473 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21474
21475         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
21476
21477         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
21478         and AC_MINIX, too, so that their extensions are available.
21479
21480         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
21481         This macro has been superseded by gl_BACKUPFILE.
21482
21483         More patches to assume C89 or better.
21484
21485         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
21486
21487         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
21488         unconditionally.
21489         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
21490         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
21491         Include <string.h>, <stdlib.h> unconditionally.
21492         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
21493         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
21494         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
21495         headers or for string.h.
21496         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
21497         or strtoul.
21498
21499         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
21500         headers.
21501         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
21502         * m4/userspec.m4 (gl_USERSPEC): Likewise.
21503         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
21504         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
21505         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
21506         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
21507         memcpy, memset.
21508         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
21509         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
21510         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
21511         strtol.
21512         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
21513         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
21514         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
21515         strtoul.
21516
21517 2003-09-12  Paul Eggert  <eggert@twinsun.com>
21518
21519         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
21520         * lib/obstack.c [!defined _LIBC]: Likewise.
21521         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
21522         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
21523         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
21524
21525         More changes to assume C89 or better.
21526
21527         * lib/error.c (error_tail): Assume vprintf.
21528
21529         * lib/argmatch.c (getenv): Remove decl.
21530         * lib/progreloc.c (get_full_program_name): Define via prototype.
21531         * lib/setenv.c (clearenv): Likewise.
21532         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
21533         needed.
21534         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
21535         (malloc, memcpy): Remove decls.
21536         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
21537         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
21538         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21539         (memcpy): Remove macro.
21540         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
21541         (__P): Remove.  All uses removed.
21542         (PTR): Remove.  All uses changed to void *.
21543         (CHAR_BIT, NULL): Remove.
21544         (spaces, zeros, memset_space, memset_zero)
21545         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
21546         Remove.
21547         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
21548         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
21549         Define with prototype.
21550         Remove now-unnecessary prototype decl.
21551         (extra_args_spec): Assume ANSI C.  All uses changed.
21552         (extra_args_spec_iso): Remove.
21553         (my_strftime, emacs_strftimeu): Define via prototype.
21554         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
21555         unconditionally.
21556         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
21557         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
21558         (strtoul, strtol): Remove decls.
21559         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
21560         LONG_MAX): Remove.
21561         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
21562         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
21563         (LOCALE_PARAM_PROTO): New macro.
21564         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
21565         (INTERNAL (strtol), strtol): Define with a prototype.
21566         (PARAMS): Remove.  All uses removed.
21567         * lib/tempname.c: Include <string.h> unconditionally.
21568         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
21569         * lib/xgethostname.c (main): Define with a prototype.
21570         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
21571         Include <stdlib.h> unconditionally.
21572         (calloc, malloc, realloc, free): Remove decls.
21573         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
21574         Include <stdlib.h> unconditionally.  Sort include file names.
21575         (strtod): Remove.
21576         (xstrtod): Define with a prototype.
21577         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
21578         (strtol, strtoul): Remove decls.
21579
21580 2003-09-11  Paul Eggert  <eggert@twinsun.com>
21581
21582         More patches to assume C89 or better.
21583         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
21584         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
21585         string.h, memchr, STDC_HEADERS.
21586
21587 2003-09-11  Paul Eggert  <eggert@twinsun.com>
21588
21589         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
21590         Include <stdlib.h>, <string.h> unconditionally.
21591         Remove now-unnecessary cast to char *.
21592         * lib/strnlen.c: Include <string.h> unconditionally.
21593         * lib/yesno.c (yesno): Define with a prototype.
21594
21595 2003-09-11  Bruno Haible  <bruno@clisp.org>
21596
21597         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
21598
21599 2003-09-10  Jim Meyering  <jim@meyering.net>
21600
21601         * lib/error.c: Correct indentation of cpp directives.
21602
21603 2003-09-10  Bruno Haible  <bruno@clisp.org>
21604
21605         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
21606         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
21607         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
21608         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
21609         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
21610         <stdlib.h> and <string.h> checks.
21611         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
21612         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
21613
21614 2003-09-10  Bruno Haible  <bruno@clisp.org>
21615
21616         * lib/strcspn.c: Include <string.h> unconditionally.
21617         * lib/strpbrk.c: Include <string.h> unconditionally.
21618         * lib/strstr.c: Include <string.h> unconditionally.
21619         * lib/unicodeio.c: Include <string.h> unconditionally.
21620         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
21621         * lib/unsetenv.c: Likewise.
21622         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
21623         * lib/yesno.c: Include <stdlib.h> unconditionally.
21624         (rpmatch): Add prototype.
21625
21626 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21627
21628         More patches to assume C89 or better.
21629         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
21630         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
21631         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
21632         or for string.h.
21633         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
21634         stdlib.h.
21635         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
21636         C headers.
21637         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
21638         string.h.
21639         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
21640         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
21641         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
21642         or for string.h.
21643         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
21644         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
21645         C headers.
21646         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
21647         memcpy.
21648         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
21649         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
21650         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
21651         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
21652         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
21653         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
21654         string.h, free.
21655         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
21656         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
21657         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
21658         C headers, or for string.h.
21659         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
21660         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
21661         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
21662         headers, memory.h, stdlib.h, string.h, strings.h.
21663         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
21664         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
21665         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
21666         strchr.
21667         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
21668         headers, memory.h, string.h.
21669         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
21670         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
21671         free.
21672         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
21673         headers.
21674         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
21675         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
21676         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
21677         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
21678         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
21679
21680 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21681
21682         More K&R removal.
21683
21684         * lib/acosl.c (main): Use a prototype.
21685         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
21686         tanl.c: Likewise.
21687
21688         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
21689
21690         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
21691         (getopt, etopt_long, getopt_long_only, _getopt_internal)
21692         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
21693         with a prototype.
21694         * lib/getopt.c (const): Remove macro.
21695         Include <string.h> unconditionally.
21696         (my_index): Remove; all uses changed to strchr.
21697         (strlen): Remove decl.
21698         (exchange): Remove forward decl; no longer needed.
21699         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
21700         Define with prototype.
21701         * lib/getopt1.c (const): Remove macro.
21702         (getopt_long, getopt_long_only, main): Define with prototype.
21703
21704         * lib/getugroups.c: Include <string.h> unconditionally.
21705
21706         * lib/getusershell.c: Include <stdlib.h> unconditionally.
21707         (getusershell, setusershell, endusershell, readname, main):
21708         Define with prototypes.
21709
21710         * lib/group-member.c: Include group-member.h first.
21711         Include <stdlib.h> unconditionally.
21712
21713         * lib/hard-locale.c: Include hard-locale.h first.
21714         Include <stdlib.h>, <string.h> unconditionally.
21715
21716         * lib/hash.c (free, malloc): Remove decls.
21717         Include <stdlib.h> unconditionally.
21718
21719         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
21720         (getenv): Do not declare.
21721
21722         * lib/idcache.c: Include <string.h> unconditionally.
21723
21724         * lib/long-options.c: Include long-options.h first, to test interface.
21725         Include <stdlib.h> unconditionally.
21726
21727         * lib/makepath.c: Include makepath.h first, to test interface.
21728         Include <stdlib.h> and <string.h> unconditionally.
21729
21730         * lib/linebuffer.c: Include <stdlib.h>.
21731         (free): Remove decl.
21732
21733         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
21734         stddef.h. rpl_malloc returns void *, not char *.
21735         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
21736         prototype.
21737
21738         * lib/md5.h: Include <limits.h> unconditionally.
21739         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
21740         (__P): Remove; all uses removed.
21741         * lib/md5.c: Include "md5.h" first.
21742         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
21743         md5_buffer, md5_process_bytes, md5_process_block):
21744         Define with prototypes.
21745         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
21746         * lib/sha.c: Include "sha.h" first.
21747         Include <stdlib.h>, <string.h> unconditionally.
21748
21749         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
21750         * lib/memcmp.c (__ptr_t): Likewise.
21751         * lib/memrchr.c (__ptr_t): Likewise.
21752         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
21753         Include <string.h> unconditionally.
21754         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
21755         * lib/memchr.c: Include <stdlib.h> unconditionally.
21756         * lib/memchr.c (LONG_MAX): Remove.
21757         * lib/memrchr.c (LONG_MAX): Likewise.
21758         * lib/memchr.c (__memchr): Define via a prototype.
21759         * lib/memrchr.c (__memrchr): Likewise.
21760         * lib/memcmp.c (__P): Remove, and remove all uses.
21761         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
21762         Remove forward decls; no longer needed.
21763         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
21764         Use types required by C89 in prototype.
21765
21766         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
21767         * lib/savedir.c: Likewise.
21768         * lib/mkdir.c (free): Remove decl.
21769         * lib/rmdir.c (rmdir): Define with a prototype.
21770         * lib/savedir.c: Include savedir.h first, to test interface.
21771
21772         * lib/mktime.c (STDC_HEADERS): Remove.
21773         Include <stdlib.h>, <string.h> unconditionally.
21774
21775         * lib/modechange.c: Include <stdlib.h> unconditionally.
21776         (malloc): Remove decl.
21777
21778         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
21779         (free): Remove decl.
21780
21781         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
21782         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
21783         (This type really should be intptr_t, but that's a C99ism.)
21784         (_obstack_memcpy): Remove: all uses changed to memcpy.
21785         Include <string.h> unconditionally.
21786         (struct obstack): Assume __STDC__ for types of members
21787         chunkfun, freefun, extra_arg.
21788         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
21789         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
21790         obstack_begin, obstack_specify_allocation,
21791         obstack_specify_allocation_with_arg, obstack_chunkfun,
21792         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
21793         Remove unprototyped decls and the macros that use them.
21794         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
21795         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
21796         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
21797         (defined __STDC__ && __STDC__)]:
21798         Remove nonprototyped code.
21799         Include <stdlib.h> unconditionally.
21800         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
21801         _obstack_allocated_p, _obstack_free, obstack_free,
21802         _obstack_memory_used, print_and_abort):
21803         Define using prototypes.
21804         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
21805         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
21806         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
21807         obstack_next_free, obstack_object_size, obstack_room) [0]:
21808         Remove unused, unprototyped code.
21809
21810         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
21811
21812         * lib/physmem.c (physmem_total, physmem_available, main): Define
21813         with prototypes.
21814
21815         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
21816         (main): Define with a prototype.
21817
21818         * lib/posixver.c (getenv): Remove decl.
21819
21820         * lib/putenv.c (malloc): Returns void *, not char *.
21821         Include <string.h> unconditionally.
21822         (strchr, memcpy, NULL): Do not define.
21823
21824         * lib/readtokens.c: Include readtokens.h first, to test interface.
21825         Include <stdlib.h>, <string.h> unconditionally.
21826         (init_tokenbuffer): Define with a prototype.
21827
21828         * lib/regex.c (PARAMS): Remove.  All uses removed.
21829         All uses of _RE_ARGS removed, too.
21830         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21831         unconditionally.
21832         (bzero): Assume memset exists.
21833         (memcmp, memcpy, NULL): Remove.
21834         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
21835         char, or assignments to local vars of type signed char.
21836         (init_syntax_once, PREFIX(extract_number_and_incr),
21837         PREFIX(print_partial_compiled_pattern),
21838         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
21839         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
21840         PREFIX(regex_grow_registers), PREFIX(regex_compile),
21841         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
21842         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
21843         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
21844         wcs_compile_range, byte_compile_range, truncate_wchar,
21845         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
21846         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
21847         count_mbs_length, wcs_re_match_2_internal,
21848         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
21849         PREFIX(alt_match_null_string_p),
21850         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
21851         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
21852         regfree, PREFIX(extract_number)): Define with prototype.  Remove
21853         now-unnecessary declaration, if any.
21854         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
21855         regcomp, regexec):
21856         Remove now-unnecessary casts among pointer types.
21857         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
21858
21859         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
21860         (free): Remove decl.
21861
21862         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
21863
21864         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
21865         (free): Remove decl.
21866
21867         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
21868         * lib/xgetcwd.c: Likewise.
21869
21870         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
21871         (free): Remove decl.
21872
21873         * lib/strchrnul.c (strchrnul): Define with a prototype.
21874         Fix bug: c_in was not converted to char before searching.
21875
21876         The following changes are not K&R related:
21877
21878         * lib/group-member.h: Include <sys/types.h>, so that this file is
21879         self-contained.
21880         * lib/makepath.h: Likewise.
21881
21882         * lib/getusershell.c (readname, default_index, line_size, readname):
21883         Use size_t, not int, for sizes.
21884         (readname): If the size overflows, report an error instead of
21885         looping forever.
21886
21887 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21888
21889         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
21890         libc.
21891
21892 2003-09-09  Paul Eggert  <eggert@twinsun.com>
21893
21894         * README: New section: portability guidelines.
21895
21896 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
21897
21898         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
21899         C89 spec.
21900
21901 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
21902
21903         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
21904
21905 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21906
21907         Assume C89 or better; remove K&R cruft.
21908         A few of these changes were first proposed by Derek Robert Price
21909         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
21910
21911         * lib/addext.c: Include <string.h> unconditionally.
21912         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
21913         Don't declare getenv or malloc.
21914
21915         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
21916         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
21917         (NULL): Remove.
21918         (find_stack_direction, alloca): Use prototypes.
21919
21920         * lib/atexit.c (atexit): Define using a prototype.
21921
21922         * lib/basename.c, dirname.c, stripslash.c:
21923         Include <string.h> unconditionally.
21924
21925         * lib/bcopy.c: Include <stddef.h>.
21926         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
21927
21928         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
21929
21930         * lib/error.h (error, error_at_line, error_print_progname)
21931         [! (defined (__STDC__) && __STDC__)]: Remove decls.
21932         * lib/error.c: Include error.h first, to check interface.
21933         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
21934         (VA_START): Remove; all uses changeed to va_start.
21935         (exit, strerror): Remove decls.
21936         (error_print_progname): Prototype uncondionally.
21937         Don't include <errno.h>; no longer needed.
21938         (private_strerror): Remove.
21939         (error_tail): Always define.
21940         (error, error_at_line): Assume C89 or better; always use prototypes.
21941         * lib/fatal.c: Include "fatal.h" first, to test interface.
21942         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
21943         (VA_START): Remove; all uses changed to va_start.
21944         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
21945         this case.
21946         (exit): Remove decl.
21947         (fatal): Prototype unconditionally.  Assume va_start works.
21948         Abort at end, to pacify gcc.
21949
21950         * lib/euidaccess.c (main): Define with a prototype.
21951
21952         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
21953
21954         * lib/exitfail.c: Include <stdlib.h> unconditionally.
21955
21956         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
21957         prototypes.
21958         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
21959         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
21960         (getenv): Remove decl.
21961         (fnmatch): Define using a prototype.
21962         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
21963         (FCT): Define using a prototype.
21964
21965         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
21966
21967         * lib/gethostname.c: Include <stddef.h>.
21968         (gethostname): Define with prototype.  Length is size_t, not int.
21969
21970 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21971
21972         Assume C89 or better; remove K&R cruft.
21973         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
21974         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
21975         string.h, getenv, malloc.
21976         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
21977         headers.
21978         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
21979         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
21980         do not check for strerror.
21981         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
21982         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
21983         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
21984         do not check for doprnt or vprintf.
21985         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
21986         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
21987
21988 2003-09-08  Paul Eggert  <eggert@twinsun.com>
21989
21990         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
21991         getversion.c should have been removed then, but was accidentally
21992         preserved.
21993
21994         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
21995         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
21996
21997 2003-09-08  Karl Berry  <karl@gnu.org>
21998
21999         * config/config.sub, config.guess, srclistvars.sh: update from savannah
22000                 config, forget about prep.
22001
22002         * config/depcomp, missing: update from automake.
22003
22004 2003-09-07  Paul Eggert  <eggert@twinsun.com>
22005
22006         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
22007         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
22008
22009 2003-09-07  Paul Eggert  <eggert@twinsun.com>
22010
22011         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
22012         copy_tm_result.  Bug reported by Simon Josefsson in
22013         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
22014
22015 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22016
22017         * m4/time_r.m4: New file.
22018         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
22019         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
22020         is. Check for timegm declaration.
22021         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
22022         Do not check for gmtime_r.
22023         Replace mktime if __mktime_internal does not exist and if mktime
22024         hasn't been replaced already.
22025
22026 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22027
22028         * lib/time_r.c, lib/time_r.h: New files.
22029
22030         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
22031         __localtime_r.
22032         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
22033         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
22034
22035         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
22036         __gmtime_r.
22037         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
22038         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
22039         Include <time_r.h>.
22040
22041         * lib/timegm.c: Switch to glibc implementation, with the following
22042         changes:
22043         [defined HAVE_CONFIG_H]: Include <config.h>.
22044         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
22045         (__mktime_internal) [!defined _LIBC]: New decl.
22046         (__gmtime_r) [!defined _LIBC]: New macro and function.
22047         (timegm): Use a prototype, since gnulib assumes C89.
22048         Do not bother declaring tmp to be const, as it's not really usefu.
22049         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
22050         (timegm): Declare only if HAVE_DECL_TIMEGM.
22051
22052 2003-09-06  Paul Eggert  <eggert@twinsun.com>
22053
22054         * MODULES.html.sh (func_all_modules): Add time_r.
22055         * modules/time_r: New file.
22056         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
22057         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
22058
22059 2003-09-03  Paul Eggert  <eggert@twinsun.com>
22060
22061         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
22062         Bug reported by Lute Kamstra in
22063         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
22064
22065         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
22066         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
22067         course with correspondingly smaller numbers for tomorrow and
22068         yesterday.  From Tadayoshi Funaba.  Originally installed into
22069         sh-utils on 1999-08-07, but the patch got lost (I guess during the
22070         coreutils merge?).
22071
22072 2003-08-31  Simon Josefsson  <jas@extundo.com>
22073
22074         * modules/timegm: New file.
22075         * MODULES.html.sh (func_all_modules): Add timegm.
22076
22077 2003-08-31  Simon Josefsson  <jas@extundo.com>
22078
22079         * m4/timegm.m4: New file.
22080
22081 2003-08-31  Simon Josefsson  <jas@extundo.com>
22082
22083         * lib/timegm.h: New file.
22084         * lib/timegm.c: New file.  Based on
22085         wget-1.8.2/src/http.c:mktime_from_utc.
22086
22087 2003-08-31  Karl Berry  <karl@gnu.org>
22088
22089         * lib/argp.h: update from libc.
22090
22091 2003-08-28  Bruno Haible  <bruno@clisp.org>
22092
22093         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
22094         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
22095         followed by '#define fnmatch fnmatch_posix' gives an error.
22096
22097 2003-08-28  Bruno Haible  <bruno@clisp.org>
22098
22099         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
22100         warning on QNX, which defines O_BINARY to 000000.
22101
22102 2003-08-27  Jim Meyering  <jim@meyering.net>
22103
22104         * m4/mkstemp.m4: Require that the system mkstemp be able to create
22105         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
22106         would fail after 32.  Reported by Danny Levinson.  Details here:
22107         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
22108
22109 2003-08-24  Bruno Haible  <bruno@clisp.org>
22110
22111         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
22112         MSVC7 <stdio.h> is included later.
22113
22114 2003-08-22  Simon Josefsson  <jas@extundo.com>
22115
22116         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
22117
22118 2003-08-20  Karl Berry  <karl@gnu.org>
22119
22120         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
22121
22122 2003-08-20  Bruno Haible  <bruno@clisp.org>
22123
22124         * modules/progname: New file.
22125         * MODULES.html.sh (func_all_modules): Add progname.
22126
22127 2003-08-20  Bruno Haible  <bruno@clisp.org>
22128
22129         * lib/progname.h: New file, from GNU gettext.
22130         * lib/progname.c: New file, from GNU gettext.
22131         * lib/progreloc.c: New file, from GNU gettext.
22132
22133 2003-08-19  Jim Meyering  <jim@meyering.net>
22134
22135         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
22136         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
22137
22138 2003-08-19  Bruno Haible  <bruno@clisp.org>
22139
22140         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
22141         more.
22142
22143 2003-08-19  Bruno Haible  <bruno@clisp.org>
22144
22145         * lib/xstrdup.c: Assume <string.h> exists.
22146
22147 2003-08-18  Paul Eggert  <eggert@twinsun.com>
22148
22149         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
22150         in makefile rules.
22151
22152 2003-08-18  Jim Meyering  <jim@meyering.net>
22153
22154         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
22155         * m4/lib-ld.m4: Likewise.
22156
22157 2003-08-18  Jim Meyering  <jim@meyering.net>
22158
22159         * lib/setenv.h: Indent nested cpp directive.
22160         * lib/vasnprintf.c: Remove trailing blanks.
22161
22162 2003-08-17  Simon Josefsson  <jas@extundo.com>
22163
22164         * modules/xstrndup: New file.
22165         * MODULES.html.sh (func_all_modules): Add xstrndup.
22166
22167 2003-08-17  Simon Josefsson  <jas@extundo.com>
22168
22169         * modules/argp: Fix autoconf macro name. Add more dependencies.
22170
22171 2003-08-17  Simon Josefsson  <jas@extundo.com>
22172
22173         * m4/xstrndup.m4: New file.
22174
22175 2003-08-17  Simon Josefsson  <jas@extundo.com>
22176
22177         * m4/argp.m4: New file.
22178
22179 2003-08-17  Simon Josefsson  <jas@extundo.com>
22180             Bruno Haible  <bruno@clisp.org>
22181
22182         * lib/xstrndup.h: New file.
22183         * lib/xstrndup.c: New file.
22184
22185 2003-08-17  Bruno Haible  <bruno@clisp.org>
22186
22187         * modules/strndup (Files, Include): Add lib/strndup.h.
22188
22189 2003-08-17  Bruno Haible  <bruno@clisp.org>
22190
22191         * modules/euidaccess (Files): Add lib/euidaccess.h.
22192
22193 2003-08-17  Bruno Haible  <bruno@clisp.org>
22194
22195         * lib/strndup.h: New file.
22196
22197 2003-08-17  Bruno Haible  <bruno@clisp.org>
22198
22199         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
22200         like AC_GNU_SOURCE.
22201         * modules/extensions (configure.ac): Comment out the invocation of
22202         gl_USE_SYSTEM_EXTENSIONS.
22203
22204 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22205
22206         Merges from coreutils, etc.
22207         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
22208         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
22209         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
22210         fixing a typo.
22211         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
22212         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
22213
22214 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22215
22216         Document merge from coreutils.
22217         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
22218         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
22219         * modules/utime: Add m4/utimes-null.m4.
22220
22221 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22222
22223         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
22224         space, undoing this 2003-08-12 change:
22225         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
22226
22227 2003-08-16  Paul Eggert  <eggert@twinsun.com>
22228
22229         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
22230         strtoul.c from libc, undoing this 2003-08-12 change:
22231         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
22232
22233 2003-08-16  Jim Meyering  <jim@meyering.net>
22234
22235         Merges from coreutils.
22236         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
22237         prefix.  Adjust cache variables similarly.  Create 500 rather than
22238         just 300 files, to exercise bug on Darwin6.5, too.
22239         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
22240         $missing_dir.
22241         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
22242         AM_SYS_POSIX_TERMIOS.
22243         Reported by mkc@mathdogs.com.
22244         Also change use of $am_cv_sys_posix_termios
22245         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
22246         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
22247         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
22248         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
22249         in /proc/mounts until it finds one with matching device number.  This
22250         is unnecessary when the FILE argument *is* a mount point.  No stat call
22251         is necessary in that case.  So, disable the statvfs-testing code on
22252         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
22253         as RedHat bug# 84846.
22254         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
22255         to 1MB, so as not to render systems with no stack size limit (e.g.,
22256         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
22257         Include <unistd.h>.  On some systems,
22258         it is required for the definition of _SC_PAGESIZE.
22259
22260 2003-08-16  Jim Meyering  <jim@meyering.net>
22261
22262         Merge from coreutils.
22263         * lib/xstrtoimax.c: #else #if -> #elif.
22264         * lib/xstrtoumax.c: Likewise.
22265
22266 2003-08-16  Jim Meyering  <jim@meyering.net>
22267
22268         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
22269         * m4/utimes.m4: Removed.
22270         * m4/utimes-null.m4: Renamed from utimes.m4.
22271
22272         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
22273         to 1MB, so as not to render systems with no stack size limit (e.g.,
22274         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
22275         Include <unistd.h>.  On some systems,
22276         it is required for the definition of _SC_PAGESIZE.
22277
22278 2003-08-16  Jim Meyering  <jim@meyering.net>
22279         and Paul Eggert  <eggert@cs.ucla.edu>
22280
22281         Merges from coreutils, etc.
22282
22283         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
22284         using the latest version from cvs.  This avoids problems with #line
22285         directives using a vendor (Sun) compiler.
22286         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
22287         Don't set GETGROUPS_LIB here; now it's
22288         done via getgroups.m4's wrapper function.
22289         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
22290         rather than just in sh-util/configure.in, so that the
22291         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
22292         same.
22293         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
22294         AC_FUNC_GETLOADAVG where to find getloadavg.c.
22295         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
22296         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
22297         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
22298         Remove code that is now done by the newly-required macros.
22299         Append $(EXEEXT) to DF_PROG.
22300         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
22301         Do not invoke or require the following here,
22302         since prereq.m4 or some gnulib .m4 now does this for us:
22303         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
22304         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
22305         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
22306         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
22307         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
22308         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
22309         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
22310         AC_FUNC_OBSTACK.
22311         Do not replace the following functions, as this is now the job
22312         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
22313         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
22314         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
22315         atexit getpass, strdup, getpagesize.
22316         Replace 'raise'.
22317         Do not check for the following functions, as this is now the job
22318         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
22319         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
22320         setregid.
22321         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
22322         Check for sys/sysctl.h.
22323         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
22324         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
22325         of checking for ssize_t ourselves.
22326
22327         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
22328         Require every macro that gnulib/modules/* suggests for us.
22329         (jm_PREREQ_ADDEXT): New macro.
22330         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
22331         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
22332
22333         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
22334         (gl_PHYSMEM): Use it.
22335         Also check for `table' function.
22336         Check for new headers and functions.
22337         Add check for sys/sysmp.h.
22338         With suggestions from Kaveh Ghazi.
22339         Ignore headers that are present but cannot be compiled.  This
22340         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
22341         C 5.4.
22342
22343 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22344
22345         Document merge from coreutils.
22346         * modules/userspec: Depend on posixver.
22347         * modules/strftime: Depend on tzset.
22348
22349 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22350
22351         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
22352         rather than tab, after '#' in shell-script copyright notices.
22353         Suggested by Bruno Haible.
22354
22355 2003-08-15  Paul Eggert  <eggert@twinsun.com>
22356
22357         * config/srclist-update: Use three spaces, rather than tab, after '#'
22358         in shell-script copyright notices.  Suggested by Bruno Haible.
22359         Remove unnecessary parenthesization in regular expression.
22360
22361 2003-08-15  Jim Meyering  <jim@meyering.net>
22362
22363         Merge from coreutils.
22364         * lib/xgethostname.c: Include <stdlib.h>.
22365         (xghostname): Don't exit for anything other than memory-related
22366         failure; just return NULL.
22367         * lib/userspec.c: Include "posixver.h".
22368         (parse_user_spec): Accept `.' as a separator only
22369         in pre-POSIX-200112 mode.
22370         * lib/strtoimax.c: Use #elif rather than #else #if.
22371         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
22372         Remove function, now that we can rely on a working tzset function.
22373         [!_LIBC]: Ensure that the required autoconf test has been run.
22374         [!defined _NL_CURRENT && HAVE_STRFTIME]:
22375         Use underlying_strftime for %r.
22376         * lib/sha.c: Merge in some clean-up and optimization changes from
22377         glibc.
22378         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
22379         Ensure that it is a multiple of 64.
22380         Rearrange loop exit tests so as to avoid performing an
22381         additional fread after encountering an error or EOF.
22382         * lib/realloc.c: Update copyright date.
22383
22384 2003-08-15  Jim Meyering  <jim@meyering.net>
22385         and Paul Eggert  <eggert@twinsun.com>
22386
22387         Merge from coreutils.
22388         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
22389         member but strut utmpx does not.  Needed for AIX 4.3.3.
22390         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
22391
22392 2003-08-15  Jim Meyering  <jim@meyering.net>
22393         and Paul Eggert  <eggert@cs.ucla.edu>
22394
22395         Merges from coreutils, etc.
22396         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
22397         Require gl_FUNC_TZSET_CLOBBER.
22398         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
22399         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
22400         members.
22401
22402 2003-08-14  Paul Eggert  <eggert@twinsun.com>
22403
22404         Help the merge from coreutils.
22405         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
22406         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
22407         * m4/tzset.m4: Use it too.
22408
22409 2003-08-14  Paul Eggert  <eggert@twinsun.com>
22410
22411         * modules/tzset: New file.
22412
22413 2003-08-14  Jim Meyering  <jim@meyering.net>
22414
22415         Merges from coreutils.
22416         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
22417         variable names, rather than @FNMATCH_H@.
22418         * modules/alloca: Likewise for $(ALLOCA_H).
22419
22420         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
22421         the three copies of the literal target, `fnmatch.h'.
22422         * modules/alloca (alloca.h): Likewise.
22423
22424 2003-08-14  Jim Meyering  <jim@meyering.net>
22425
22426         Merge from coreutils.
22427         * m4/tzset.m4: New file.
22428         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
22429         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
22430         otherwise, AIX 5.1 systems would end up using the latter.
22431         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
22432         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
22433         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
22434         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
22435
22436 2003-08-14  Jim Meyering  <jim@meyering.net>
22437
22438         Merge from coreutils.
22439         * lib/obstack.h: Whitespace changes.
22440         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
22441         and xcalloc return values.
22442         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
22443         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
22444         hang on OSF/1 5.1 for DIR on both local and remote file systems.
22445         Reported by (and fix confirmed by) Nelson H. F. Beebe.
22446         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
22447         error from mntctl.
22448         Use mntctl's return value to drive the entry-processing loop, since
22449         we can't rely on the value of the vmt_length member in the last
22450         entry.  On some systems doing so could result in exhausting
22451         virtual memory.  Based in part on a patch from Mike Jetzer.
22452
22453 2003-08-14  Jim Meyering  <jim@meyering.net>
22454         and Paul Eggert  <eggert@twinsun.com>
22455
22456         Merges from coreutils, plus other fixes.
22457         * lib/physmem.c: Merge in portability changes from gcc/libiberty
22458         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
22459         for credits and details.  Thanks to Kaveh Ghazi for helping
22460         to keep these files in sync.
22461         (ARRAY_SIZE): Define it.
22462         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
22463         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
22464         (memcasecmp): Don't assume size_t fits in unsigned int.
22465         Remove casts and duplicate code.
22466         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
22467         (memcpy): Remove definition.
22468         Merge in some clean-up and optimization changes from glibc.
22469         [BLOCKSIZE]: Move definition to top of file.
22470         Ensure that it is a multiple of 64.
22471         Rearrange loop exit tests so as to avoid performing an
22472         additional fread after encountering an error or EOF.
22473         * lib/md5.h (md5_uintptr): Define.
22474         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
22475         return to the initial working directory.  Preserve errno
22476         for caller.
22477         * lib/idcache.c: Include "xalloc.h".
22478         (xmalloc, xrealloc): Remove decls.
22479         (getuser): Remove casts no longer required in C89.
22480         * lib/human.c: Include stdio.h, for sprintf.
22481         * lib/group-member.c: Include "xalloc.h".
22482         (xmalloc, xrealloc): Remove decls.
22483         (get_group_info): Remove casts no longer required in C89.
22484         * lib/getusershell.c (readname): Remove casts no longer required in
22485         C89.
22486         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
22487         * lib/getline.c: Whitespace fix, from coreutils.
22488
22489 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22490
22491         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
22492         Check for isascii.
22493
22494         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
22495         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
22496         Undo previous (whitespace-only) change.
22497
22498 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22499
22500         * lib/exclude.c: Include <ctype.h>
22501         (IN_CTYPE_DOMAIN): New macro.
22502         (is_space): New fn.
22503         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
22504         and empty lines.
22505
22506         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
22507         Undo previous (whitespace-only) change.
22508
22509 2003-08-13  Paul Eggert  <eggert@twinsun.com>
22510
22511         * config/srclist-update: Change update back to the old behavior,
22512         leaving whitespace alone.  Use one 'sed' command rather than a
22513         pipeline.
22514         (fixlicense): Now a variable, not a function.
22515         (remove_trailing_blanks): Remove.
22516         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
22517         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
22518         Undo previous (whitespace-only) change.
22519
22520 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22521
22522         Merge from coreutils.
22523         * modules/euidaccess: Add lib_SOURCES, include for new
22524         file euidaccess.h
22525
22526 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22527
22528         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
22529         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
22530         Normalize leading white space and remove trailing white space.
22531
22532         Merge from coreutils
22533         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
22534
22535         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
22536         0.12.1.  These files are now being upgraded automatically by
22537         ../config/srclist-update.
22538
22539 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22540
22541         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
22542         Normalize leading white space and remove trailing white space.
22543         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
22544         notice, as per ../config/srclist-update.
22545
22546         Merge from coreutils.
22547         * lib/euidaccess.h: New file.
22548         * lib/euidaccess.c: Include it.
22549         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
22550         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
22551         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
22552
22553 2003-08-12  Paul Eggert  <eggert@twinsun.com>
22554
22555         * config/srclist-update: Add copyright notice.
22556         (remove_id_lines, remove_trailing_blanks): New constants.
22557         (fixfile): Use them to normalize spacing a bit in copied files.
22558         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
22559         Normalize leading white space and remove trailing white space.
22560
22561         * config/texinfo.tex: Sync with texinfo.
22562
22563         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
22564         strtoul.c from libc, to merge coreutils whitespace changes.
22565
22566         * config/srclist.txt: Get the following m4 files from gettext:
22567         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
22568         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
22569         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
22570         wint_t.m4.
22571
22572 2003-08-12  Karl Berry  <karl@gnu.org>
22573
22574         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
22575         been made.
22576
22577 2003-08-11  Paul Eggert  <eggert@twinsun.com>
22578
22579         * modules/gnu-source, m4/gnu-source.m4:
22580         Remove; we're assuming Autoconf 2.54 or later now.
22581         Suggested by Bruno Haible.
22582         * MODULES.html.sh (func_all_modules): Remove gnu-source.
22583
22584 2003-08-11  Bruno Haible  <bruno@clisp.org>
22585
22586         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
22587
22588 2003-08-11  Bruno Haible  <bruno@clisp.org>
22589
22590         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
22591         (vasnprintf): Use it instead of wcslen.
22592
22593 2003-08-11  Bruno Haible  <bruno@clisp.org>
22594
22595         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
22596         value to ensure that _Bool promotes to int. Use #define for _Bool when
22597         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
22598
22599 2003-08-10  Karl Berry  <karl@gnu.org>
22600
22601         * lib/regex.h: update from libc (whitespace fix).
22602
22603 2003-08-09  Paul Eggert  <eggert@twinsun.com>
22604
22605         Merge some files from coreutils.  These changes were
22606         originally made by Jim Meyering.
22607         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
22608         many older Unixes require this.
22609         * lib/alloca.c (alloca): Remove cast to argument of free;
22610         no longer needed in C89.
22611         * lib/alloca_.h, regex.h: Fix white space to match
22612         what GNU indent does.
22613
22614 2003-08-09  Paul Eggert  <eggert@twinsun.com>
22615
22616         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
22617         apparently Emacs's Unicode mode got confused before my 2003-08-05
22618         checkin.
22619
22620 2003-08-08  Paul Eggert  <eggert@twinsun.com>
22621
22622         * m4/extensions.m4: New file.
22623         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
22624         Require gl_USE_SYSTEM_EXTENSIONS.
22625         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
22626         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
22627
22628 2003-08-08  Paul Eggert  <eggert@twinsun.com>
22629
22630         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
22631         * modules/extensions, modules/gnu-source: New files.
22632         * modules/timespec, modules/unlocked-io: Depend on extensions.
22633
22634 2003-08-07  Paul Eggert  <eggert@twinsun.com>
22635
22636         * modules/restrict: New file.
22637         * MODULES.html.sh (func_all_modules): Add restrict.
22638         * modules/regex: Depend on restrict.
22639
22640 2003-08-07  Paul Eggert  <eggert@twinsun.com>
22641
22642         * m4/restrict.m4: New file.
22643         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
22644
22645 2003-08-07  Bruno Haible  <bruno@clisp.org>
22646
22647         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
22648         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
22649
22650 2003-08-07  Bruno Haible  <bruno@clisp.org>
22651
22652         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
22653         makes the module 'getndelim2' compatible with the module 'getline'.
22654
22655 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22656
22657         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
22658         byte with "\201" to avoid glitches when editing that source file
22659         with multi-gnome-terminal.
22660
22661 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22662
22663         * lib/bumpalloc.h: Remove.
22664
22665 2003-08-05  Paul Eggert  <eggert@twinsun.com>
22666
22667         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
22668         * modules/bumpalloc: Remove.
22669
22670 2003-08-04  Paul Eggert  <eggert@twinsun.com>
22671
22672         * lib/getloadavg.c: Change copyright notice and spacing to conform to
22673         GNU coding style.
22674
22675         Merge from coreutils.
22676         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
22677         1. From glibc.
22678         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
22679         from Karl Berry, implemented by Jim Meyering.
22680         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
22681         from Dmitry V. Levin.
22682         Remove anachronistic cast of xrealloc.
22683         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
22684         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
22685         type. Otherwise, it wouldn't compile with at least /bin/cc on
22686         ymp-cray-unicos9.0.2.X.
22687         Combine two mostly-identical uses of alloca into one.
22688         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
22689
22690 2003-08-04  Dave Love  <d.love@dl.ac.uk>
22691
22692         [From Emacs.]
22693
22694         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
22695         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
22696         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
22697         obsolete NLIST_NAME_UNION.
22698         [__GNU__]: Undef BSD and FSCALE.
22699         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
22700
22701 2003-08-03  Paul Eggert  <eggert@twinsun.com>
22702
22703         * lib/stdbool_.h (_Bool): Make it signed char, instead of
22704         an enum type, so that it's guaranteed to promote to int.  See:
22705         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
22706
22707 2003-08-03  Karl Berry  <karl@gnu.org>
22708
22709         * config/depcomp: update from automake.
22710
22711 2003-07-31  Paul Eggert  <eggert@twinsun.com>
22712
22713         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
22714         (strerror): Don't assume that a printable int fits in 14 bytes.
22715
22716 2003-07-31  Bruno Haible  <bruno@clisp.org>
22717
22718         * modules/getpass-gnu: New file.
22719         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
22720
22721 2003-07-31  Bruno Haible  <bruno@clisp.org>
22722
22723         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
22724
22725 2003-07-24  Karl Berry  <karl@gnu.org>
22726
22727         * config/missing: update from automake.
22728
22729 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
22730             Bruno Haible  <bruno@clisp.org>
22731
22732         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
22733         * lib/getline.c (getline, getdelim): Likewise.
22734         Remove _GNU_SOURCE define; now it's defined in config.h through
22735         m4/getline.m4.
22736
22737 2003-07-23  Karl Berry  <karl@gnu.org>
22738
22739         * config/config.sub: update from prep.
22740
22741 2003-07-22  Paul Eggert  <eggert@twinsun.com>
22742
22743         * modules/xalloc (Depends-on): Add exitfail.
22744         * modules/xmemcoll: Likewise.
22745
22746 2003-07-22  Paul Eggert  <eggert@twinsun.com>
22747
22748         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
22749         over-parenthesization in macros.
22750
22751         Sync with coreutils.
22752
22753         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
22754         required by C99.
22755
22756         Use `exit_failure' for xalloc and xmemcoll instead of their own
22757         private exit-failure variables.
22758         * lib/xalloc.h (xalloc_exit_failure): Remove.
22759         * lib/xmalloc.c: Likewise.  Include exitfail.h.
22760         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
22761         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
22762         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
22763         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
22764
22765 2003-07-20  Jim Meyering  <jim@meyering.net>
22766
22767         * modules/closeout (Depends-on): Add exitfail.
22768         Suggestion from Bruno Haible.
22769
22770 2003-07-19  Karl Berry  <karl@gnu.org>
22771
22772         * config/config.sub: update from prep.
22773
22774 2003-07-18  Paul Eggert  <eggert@twinsun.com>
22775
22776         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
22777         Remove.
22778         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
22779         to test that it can stand by itself.  Include "exitfail.h".
22780         Clients should set exit_failure instead.
22781         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
22782
22783 2003-07-18  Bruno Haible  <bruno@clisp.org>
22784
22785         * modules/getndelim2: New file.
22786         * modules/getline: Share files with module getndelim2.
22787         * modules/getnline: Depend on getndelim2 instead of sharing files with
22788         it. Add getnline.c to lib_SOURCES.
22789         * MODULES.html.sh (func_all_modules): Add getndelim2.
22790
22791 2003-07-18  Bruno Haible  <bruno@clisp.org>
22792
22793         * m4/getndelim2.m4: New file.
22794         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
22795         invoke gl_PREREQ_GETNDELIM2.
22796         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
22797         gl_PREREQ_GETNDELIM2.
22798         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
22799         gl_GETNDELIM2.
22800
22801 2003-07-18  Bruno Haible  <bruno@clisp.org>
22802
22803         * lib/getndelim2.h: New file.
22804         * lib/getndelim2.c: Make into a module of its own. Include config.h,
22805         getndelim2.h.
22806         (getndelim2): Make non-static. Change return type to ssize_t.
22807         * lib/getline.h: Change argument names.
22808         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
22809         * lib/getnline.c: Include getndelim2.h.
22810
22811 2003-07-18  Andreas Schwab  <schwab@suse.de>
22812
22813         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
22814
22815 2003-07-17  Karl Berry  <karl@gnu.org>
22816
22817         * config/config.sub: update from prep.
22818
22819 2003-07-17  Bruno Haible  <bruno@clisp.org>
22820
22821         * modules/getnline: New file.
22822         * modules/getline: Add lib/getndelim2.c to source file list.
22823         * MODULES.html.sh (func_all_modules): Add getnline.
22824
22825 2003-07-17  Bruno Haible  <bruno@clisp.org>
22826
22827         * m4/getnline.m4: New file.
22828
22829 2003-07-17  Bruno Haible  <bruno@clisp.org>
22830
22831         * m4/Makefile.am.in: Remove file.
22832         * m4/Makefile.am: Remove file.
22833         * m4/Makefile.in: Remove file.
22834
22835 2003-07-17  Bruno Haible  <bruno@clisp.org>
22836
22837         * lib/getnline.h: New file.
22838         * lib/getnline.c: New file.
22839         * lib/getndelim2.c: New file, extracted from getline.c.
22840         (getndelim2): Renamed from getdelim2, with added nmax argument.
22841         * lib/getline.c: Include getndelim2.c.
22842         (getdelim2): Moved out to getndelim2.c.
22843         (getline, getdelim): Update.
22844
22845 2003-07-17  Bruno Haible  <bruno@clisp.org>
22846
22847         * lib/Makefile.am: Remove file.
22848         * lib/Makefile.in: Remove file.
22849
22850 2003-07-17  Bruno Haible  <bruno@clisp.org>
22851
22852         * configure.in: Remove file.
22853         * Makefile.in: Remove file.
22854
22855 2003-07-17  Bruno Haible  <bruno@clisp.org>
22856
22857         * MODULES.html.sh: Put the </BODY> right before </HTML>.
22858
22859 2003-07-16  Karl Berry  <karl@gnu.org>
22860
22861         * config/srclist-update: was running fixlicense twice, which caused
22862                 texinfo.tex to be nullified for some reason.  Simplify,
22863                 $gplsrc is no longer needed as far as I can see?
22864
22865 2003-07-16  Jim Meyering  <jim@meyering.net>
22866
22867         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
22868
22869 2003-07-15  Paul Eggert  <eggert@twinsun.com>
22870
22871         * config/srclist.txt: Get the following files from gettext-runtime/intl
22872         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
22873         ref-del.sin.  From Bruno Haible.
22874         * config/srclist-update (fixfile): Change grep pattern again, since the
22875         previous fix didn't work (there was another trailing $).  Use
22876         '[$]' to escape the $s.
22877
22878 2003-07-15  Karl Berry  <karl@gnu.org>
22879
22880         * lib/vasnprintf.c: update from gettext.
22881
22882 2003-07-15  Karl Berry  <karl@gnu.org>
22883
22884         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
22885         gets expanded when surrounded by '$'.
22886
22887 2003-07-15  Jim Meyering  <jim@meyering.net>
22888
22889         * modules/save-cwd: Don't depend on error.  From Derek Price.
22890
22891 2003-07-15  Jim Meyering  <jim@meyering.net>
22892
22893         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
22894
22895 2003-07-14  Simon Josefsson  <jas@extundo.com>
22896
22897         * modules/mempcpy: New file.
22898         * MODULES.html.sh (func_all_modules): Add mempcpy.
22899
22900 2003-07-14  Simon Josefsson  <jas@extundo.com>
22901
22902         * m4/mempcpy.m4: New file.
22903
22904 2003-07-14  Simon Josefsson  <jas@extundo.com>
22905
22906         * lib/mempcpy.h: New file.
22907         * lib/mempcpy.c: New file.
22908
22909 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22910
22911         * modules/getdate, modules/posixtm: Depend on mktime.
22912
22913 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22914
22915         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
22916         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
22917         unicodeio.c, unicodeio.h, unlocked-io.h:
22918         Switch from LGPL to GPL.
22919
22920 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22921
22922         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
22923         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
22924         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
22925         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
22926         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
22927         updated automatically by ../config/srclist-update.  This changes
22928         their license from LPGL to GPL.
22929
22930 2003-07-14  Paul Eggert  <eggert@twinsun.com>
22931
22932         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
22933         assumed to refer to the root of the most recent stable gettext version.
22934         * config/srclistvars.sh: Add defaults for eggert.
22935         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
22936         Match "This program" as well as "The program".  This is needed
22937         for gettext.
22938
22939 2003-07-14  Jim Meyering  <jim@meyering.net>
22940
22941         Don't emit diagnostics.  Let callers do that.
22942         * lib/save-cwd.c: Don't include "error.h".
22943         (save_cwd): Don't call error.  Ensure that errno is valid
22944         when returning nonzero.
22945
22946         * lib/save-cwd.h (restore_cwd): Update prototype.
22947         * lib/save-cwd.c (restore_cwd): Remove two parameters.
22948         Simplify.  Don't call error upon failure.  Let callers do that.
22949         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
22950         when auditing is enabled.  But don't bother updating the #if.
22951
22952 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
22953
22954         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
22955         it breaks C++ compilation.
22956         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
22957
22958 2003-07-10  Simon Josefsson  <jas@extundo.com>
22959
22960         * modules/strchrnul (Makefile.am): Add strchrnul.h.
22961
22962 2003-07-10  Jim Meyering  <jim@meyering.net>
22963
22964         * m4/clock_time.m4: Remove trailing blank.
22965         * m4/intmax_t.m4: Likewise.
22966
22967 2003-07-10  Jim Meyering  <jim@meyering.net>
22968
22969         * lib/vasnprintf.c: Remove trailing blanks.
22970         Make cpp indentation consistent.
22971
22972 2003-07-09  Paul Eggert  <eggert@twinsun.com>
22973
22974         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
22975         posixver.c, strftime.c, strnlen.c, strverscmp.c:
22976         Switch from LGPL to GPL.
22977
22978 2003-07-09  Paul Eggert  <eggert@twinsun.com>
22979
22980         * config/srclist.txt: Sort sublists.  Add
22981         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
22982         that differ from gnulib for one reason or another; we'd like this list
22983         to be smaller but for now let's document what we have.
22984
22985 2003-07-08  Paul Eggert  <eggert@twinsun.com>
22986
22987         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
22988         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
22989         and sweeter "eval x=$x".
22990         * config/srclist.txt: Get lib/argp* from glibc.
22991
22992 2003-07-07  Paul Eggert  <eggert@twinsun.com>
22993
22994         * lib/mktime.c: Fix some boundary cases and remove need for floating
22995         point.
22996
22997         Issue a compile-time diagnostic if time_t is floating point, or if
22998         two's complement arithmetic is not in effect, or if arithmetic
22999         right shift does not propagate the sign.  These assumptions were
23000         all in the original code but they weren't checked.
23001
23002         (TIME_T_MIDPOINT, verify): New macros.
23003         (__isleap): Remove; it has integer overflow problems.
23004         (leapyear): New function, without those problems.
23005         (ydhms_tm_diff): Remove; splitting into two parts.
23006         (ydhms_diff): New function, containing the arithmetic part of
23007         the old ydhms_tm_diff function.  Issue a compile-time
23008         diagnostic if we are not using C99 integer division.
23009         Avoid casts when possible.
23010         (guess_time_tm): New function, containing the checking part of
23011         the old ydhms_tm_diff function.  Return the new value, rather than
23012         the difference between it and the old.  Accept a new argument T
23013         so that *T specifies the old value.  Check for overflow in the result.
23014
23015         (__mktime_internal): Use a time_t offset, not a long int offset.
23016         This undoes the 2003-06-04 change, which is no longer needed now
23017         that we have better overflow checking.
23018         (localtime_offset): Likewise.
23019
23020         (__mktime_internal): Avoid harmful overflow on hosts where time_t
23021         and long are 64-bit but int is only 32-bit.
23022         (ydhms_diff): Use long int to store year1 and yday1.
23023         Issue a compile-time diagnostic if long int is not wide enough.
23024
23025         (__mktime_internal): Use long int to store adjusted year and yday.
23026         Use plain C rather than preprocessor commands, if that doesn't
23027         affect efficiency.
23028         Check for overflow (and try to repair) after each probe
23029         rather than checking only at the very end.  This avoids some bugs
23030         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
23031         does not equal GMT offset at maximum time).
23032         Use integer to check for overflow rather than floating point; this
23033         is more portable to non-IEEE hosts, and is a tad faster.
23034         When we detect that we are oscillating between two values,
23035         don't check whether tm_isdst has the requested value, since
23036         we already know the answer.  When tm_isdst has the wrong value,
23037         use a different heuristic to find the right one, based on the
23038         extreme values actually observed in practice in tz2003a,
23039         rather than the (overly optimistic) "previous 3 calendar quarters".
23040
23041         (not_equal_tm, print_tm, check_result): Use "const T" rather than
23042         "T const" to accommodate glibc style.
23043         (check_result): Use less-confusing report format.  "long" -> "long int.
23044         (main): Likewise.
23045         Don't loop if the iteration overflows time_t.
23046         Allow a negative step in the iteration.
23047
23048 2003-07-06  Karl Berry  <karl@gnu.org>
23049
23050         * config/depcomp: update from automake.
23051         * config/config.sub: update from prep.
23052
23053 2003-07-03  Karl Berry  <karl@gnu.org>
23054
23055         * config/config.guess: update from prep.
23056
23057 2003-07-01  Paul Eggert  <eggert@twinsun.com>
23058
23059         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
23060         xreadlink.c now includes it unconditionally.
23061
23062 2003-07-01  Paul Eggert  <eggert@twinsun.com>
23063
23064         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
23065         having it depend on HAVE_SYS_TYPES_H.
23066
23067 2003-07-01  Bruno Haible  <bruno@clisp.org>
23068
23069         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
23070         <sys/types.h> should be sufficient.
23071         Reported by Paul Eggert.
23072
23073 2003-06-26  Karl Berry  <karl@gnu.org>
23074
23075         * config/depcomp: update from automake.
23076
23077 2003-06-26  Bruno Haible  <bruno@clisp.org>
23078
23079         * modules/human: Depend on module stdbool.
23080
23081 2003-06-25  Bruno Haible  <bruno@clisp.org>
23082
23083         * modules/readlink: New file.
23084         * modules/xreadlink: Depend on it.
23085         * MODULES.html.sh (func_all_modules): Add readlink.
23086
23087 2003-06-25  Bruno Haible  <bruno@clisp.org>
23088
23089         * m4/readlink.m4: New file.
23090
23091 2003-06-25  Bruno Haible  <bruno@clisp.org>
23092
23093         * lib/readlink.c: New file.
23094
23095 2003-06-22  Karl Berry  <karl@gnu.org>
23096
23097         * config/srclist.txt: update mkinstalldirs from automake.
23098         * config/mkinstalldirs: update.
23099
23100 2003-06-22  Bruno Haible  <bruno@clisp.org>
23101
23102         Portability to mingw32.
23103         * m4/ssize_t.m4: New file, from GNU gettext.
23104         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
23105         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
23106
23107 2003-06-22  Bruno Haible  <bruno@clisp.org>
23108
23109         * modules/safe-read: Add m4/ssize_t.m4.
23110         * modules/xreadlink: Add m4/ssize_t.m4.
23111
23112 2003-06-20  Bruno Haible  <bruno@clisp.org>
23113
23114         Assume C89, so PARAMS isn't needed.
23115         * lib/unicodeio.h (PARAMS): Remove.
23116         * lib/unicodeio.c: Don't use PARAMS.
23117
23118 2003-06-18  Karl Berry  <karl@gnu.org>
23119
23120         * config/config.{guess,sub}: update from prep.
23121
23122 2003-06-18  Jim Meyering  <jim@meyering.net>
23123
23124         Merge changes from coreutils.
23125         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
23126         Remove explicit declarations of xmalloc and realloc.
23127         Include xalloc.h.
23128         (read_utmp): Remove anachronistic cast of xmalloc.
23129
23130 2003-06-17  Paul Eggert  <eggert@twinsun.com>
23131
23132         Assume C89, so PARAMS isn't needed.
23133         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
23134         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
23135         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
23136         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
23137         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
23138         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
23139         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
23140         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
23141         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
23142         lib/xstrtod.h, lib/xstrtol.h: Likewise.
23143         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
23144         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
23145         no longer needed. Anyway, config.h should always be included before any
23146         other file.
23147
23148 2003-06-11  Simon Josefsson  <jas@extundo.com>
23149
23150         * modules/sysexits: New file.
23151         * MODULES.html.sh (func_all_modules): Add sysexits.
23152
23153 2003-06-11  Simon Josefsson  <jas@extundo.com>
23154
23155         * lib/sysexit_.h: New file.
23156
23157 2003-06-11  Derek Price  <derek@ximbiot.com>
23158
23159         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
23160         necessary.
23161
23162 2003-06-11  Bruno Haible  <bruno@clisp.org>
23163
23164         * m4/sysexits.m4: New file.
23165
23166 2003-06-10  Simon Josefsson  <jas@extundo.com>
23167
23168         * lib/argp.h: New file, from glibc.
23169         * lib/argp-ba.c: New file, from glibc.
23170         * lib/argp-eexst.c: New file, from glibc.
23171         * lib/argp-fmtstream.c: New file, from glibc.
23172         * lib/argp-fmtstream.h: New file, from glibc.
23173         * lib/argp-fs-xinl.c: New file, from glibc.
23174         * lib/argp-help.c: New file, from glibc.
23175         * lib/argp-namefrob.h: New file, from glibc.
23176         * lib/argp-parse.c: New file, from glibc.
23177         * lib/argp-pv.c: New file, from glibc.
23178         * lib/argp-pvh.c: New file, from glibc.
23179         * lib/argp-xinl.c: New file, from glibc.
23180
23181 2003-06-10  Simon Josefsson  <jas@extundo.com>
23182
23183         * modules/strchrnul: New file.
23184
23185 2003-06-10  Simon Josefsson  <jas@extundo.com>
23186
23187         * modules/argp: New file.
23188
23189 2003-06-10  Simon Josefsson  <jas@extundo.com>
23190
23191         * m4/strchrnul.m4: New file.
23192
23193 2003-06-10  Simon Josefsson  <jas@extundo.com>
23194
23195         * lib/strchrnul.h: New file.
23196         * lib/strchrnul.c: New file.
23197
23198 2003-06-10  Bruno Haible  <bruno@clisp.org>
23199
23200         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
23201
23202 2003-06-07  Karl Berry  <karl@gnu.org>
23203
23204         * config/config.{guess,sub}: update from prep.
23205
23206 2003-06-07  Jim Meyering  <jim@meyering.net>
23207
23208         * modules/strtod: Use $(...) notation, not @...@ for
23209         AC_REPLACE'd variables.
23210         * modules/localcharset: Likewise.
23211
23212 2003-06-07  Jim Meyering  <jim@meyering.net>
23213
23214         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
23215         in place of my name in the copyright comment.
23216         Remove definition and uses of __P.
23217
23218         From coreutils.
23219         * lib/stat.c: Don't declare xmalloc explicitly.
23220         Instead, include "xalloc.h".
23221         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
23222         xrealloc, and xcalloc return values.
23223         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
23224         Improve comment.
23225         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
23226
23227 2003-06-07  Bruno Haible  <bruno@clisp.org>
23228
23229         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
23230         avoid AC_CONFIG_LINKS.
23231         * modules/fnmatch (Makefile.am): Use explicit creation rule for
23232         fnmatch.h, to avoid AC_CONFIG_LINKS.
23233         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
23234
23235 2003-06-07  Bruno Haible  <bruno@clisp.org>
23236
23237         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
23238         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
23239         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
23240         directory.
23241         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
23242         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
23243         directory.
23244
23245 2003-06-06  Jim Meyering  <jim@meyering.net>
23246
23247         Merge from coreutils.
23248         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
23249         Consolidate declarations and initializations of *_base* locals.
23250
23251         Merge from coreutils.
23252         This avoids a core dump on systems without GNU putenv,
23253         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
23254         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
23255         (unsetenv): New static function, from GNU libc.
23256         (rpl_putenv): Use it.
23257
23258         * lib/modechange.c: Remove trailing blanks.
23259
23260         Merge from coreutils.
23261         * lib/fsusage.c: Remove declaration of statfs.
23262         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
23263
23264         * lib/posixtm.c: Include <stdbool.h> unconditionally.
23265
23266 2003-06-06  Jim Meyering  <jim@meyering.net>
23267
23268         * lib/stdbool_.h: Renamed from stdbool.h.in.
23269
23270 2003-06-06  Jim Meyering  <jim@meyering.net>
23271             Bruno Haible  <bruno@clisp.org>
23272
23273         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
23274         Adjust Makefile.am snippet not to redirect directly to target.
23275         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
23276
23277 2003-06-05  Paul Eggert  <eggert@twinsun.com>
23278
23279         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
23280         mismatch, look in future quarters as well as past.  This fixes a
23281         bug when processing fall-backwards gaps immediately after a long
23282         period of daylight-saving time.
23283
23284         * lib/mktime.c: Assume freestanding C89 or better.
23285         (HAVE_LIMITS_H): Remove.  Assume it's 1.
23286         (__P): Remove; not used.
23287         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
23288         (mktime, not_equal_tm, print_tm, check_result,
23289         main): Use prototypes.  Use const * where appropriate.
23290         (main): Fix typo in testing code that uncovered by above changes.
23291         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
23292
23293 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23294
23295         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
23296         locale.h, localeconv.  This merges changes from coreutils.
23297
23298         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
23299         It can be removed after the next Autoconf is released.
23300         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
23301         needed.
23302
23303 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23304
23305         * lib/mktime.c: Fix Debian bug 177940
23306         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
23307         (localtime_offset): Now long int, not time_t, because we want it
23308         to be guaranteed to be signed.  All uses changed.
23309         (__mktime_internal): If overflow would occur when adding offset,
23310         don't add it.
23311
23312         Merge 'human' changes from coreutils.  Rewrite to support
23313         locale-specific notations like thousands separators.
23314         * lib/human.c: Simplify authorship notice.
23315         Include human.h immediately after config.h.
23316         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
23317         <limits.h>: Do not include, since human.h does.
23318         (SIZE_MAX, UINTMAX_MAX): New macros.
23319         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
23320         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
23321         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
23322         (power_letter): Renamed from suffixes.
23323         (generate_suffix_backwards): Remove.
23324         (adjust_value): Now takes int style (because of human.h changes)
23325         and long double value (for greater precision on some platforms).
23326         (group_number): New function.
23327         (human_readable): Use it.  Use integer options, not enum.
23328         Put the options before the sizes in the arg list.
23329         Support all the new options.
23330         The old human_readable function has been removed;
23331         use inttostr.h instead.
23332         (human_readable, default_block_size, humblock):
23333         Use uintmax_t, not int, for block sizes.
23334         (human_readable_inexact, block_size_types): Remove.
23335         (block_size_opts): New constant.
23336         (human_options): Renamed from human_block_size, with new signature
23337         that allows block sizes up to UINTMAX_MAX.  All callers changed.
23338         * lib/human.h: Add copyright and authorship notice.
23339         Include <limits.h> and <stdbool.h> unconditionally.
23340         (PARAMS): Remove.  All uses removed.
23341         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
23342         (enum human_inexact_style): Remove tag; now a nameless enum.
23343         (human_floor, human_ceiling, human_round_to_even): Now have
23344         values 2, 0, 1 rather than -1, 1, 0.
23345         (human_group_digits, human_suppress_point_zero, human_autoscale,
23346         human_base_1024, human_SI, human_B): New constants.
23347         (human_readable_inexact, human_block_size): Remove.
23348         (human_readable): Size args are now uintmax_t, not int.
23349         (human_options): New decl.
23350
23351         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
23352         unnecessary now that we assume C89 or better.  This change
23353         imported from coreutils.
23354
23355         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
23356         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
23357         in the 2003-05-30 sync from glibc.
23358
23359         .h files should stand alone, but we shouldn't include <sys/types.h>
23360         if we can get away with just <stddef.h>.
23361
23362         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
23363         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
23364         rather than <sys/types.h>, as we merely need size_t.
23365         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
23366         to get size_t.
23367         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
23368         Include <stdio.h>, to get FILE.
23369         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
23370         memcasecmp.h has included <stddef.h> and all we need is size_t.
23371         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
23372         our interface, instead of including <sys/types.h>
23373
23374 2003-06-04  Paul Eggert  <eggert@twinsun.com>
23375
23376         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
23377         now, as glibc mktime is buggy on non-glibc systems.
23378
23379 2003-06-03  Karl Berry  <karl@gnu.org>
23380
23381         * config/config.sub: update from prep.
23382
23383 2003-06-02  Paul Eggert  <eggert@twinsun.com>
23384
23385         [from coreutils]
23386         Fix some minor time-related bugs with POSIX time arguments.
23387         Some valid time stamps were being rejected (notably -1, and
23388         time stamps before 1900 on 64-bit hosts).  And some invalid
23389         time stamps were being accepted, e.g. September 31.
23390
23391         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
23392         that we can return (time_t) -1 successfully.
23393         * lib/posixtm.c: Likewise.
23394         [HAVE_STDBOOL_H]: Include <stdbool.h>.
23395         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
23396         (t): Remove static var.
23397         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
23398         of static var.  All uses changed.
23399         (year): Do not reject years before 1900; they can occur with
23400         64-bit time_t.
23401         (posix_time_parse): Do not check for out-of-range components;
23402         that is now the caller's responsibility, since our checks were
23403         only approximations.
23404         (posixtime): Use mktime to check for out-of-range components,
23405         since it knows them exactly.
23406         If mktime returns (time_t) -1, check whether an error actually occurred
23407         by invoking localtime on -1.
23408         (main) [TEST_POSIXTIME]: Check for input data errors, and report
23409         posixtime failures better.
23410         Improve the test data (in comments only).
23411
23412 2003-06-02  Karl Berry  <karl@gnu.org>
23413
23414         * config/mkinstalldirs (version): new variable.
23415         (--version): new option.
23416         (usage): improve message.
23417
23418 2003-05-30  Karl Berry  <karl@gnu.org>
23419
23420         * lib/mktime.c: update from libc.
23421
23422 2003-05-30  Bruno Haible  <bruno@clisp.org>
23423
23424         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
23425         * config/config.rpath: Upgrade to gettext-0.12.1.
23426
23427 2003-05-30  Bruno Haible  <bruno@clisp.org>
23428
23429         * m4/gettext.m4: Upgrade to gettext-0.12.1.
23430         * m4/nls.m4: New file, from gettext-0.12.1.
23431         * m4/po.m4: New file, from gettext-0.12.1.
23432         * m4/progtest.m4: Upgrade to gettext-0.12.1.
23433
23434 2003-05-30  Bruno Haible  <bruno@clisp.org>
23435
23436         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
23437         * lib/localcharset.h: Likewise.
23438         * lib/localcharset.c: Likewise.
23439
23440 2003-05-29  Karl Berry  <karl@gnu.org>
23441
23442         * config/config.rpath: update from gettext.
23443
23444 2003-05-28  Paul Eggert  <eggert@twinsun.com>
23445
23446         Assume the headers required for C89 freestanding compilers.
23447         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
23448         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
23449         * m4/human.m4 (gl_HUMAN): Likewise.
23450         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
23451         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
23452         * m4/userspec.m4 (gl_USERSPEC): Likewise.
23453         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
23454         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
23455         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
23456
23457 2003-05-28  Paul Eggert  <eggert@twinsun.com>
23458
23459         Assume the headers required for C89 freestanding compilers.
23460         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
23461         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
23462         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
23463         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
23464         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
23465         define, since <limits.h> is guaranteed to do that.
23466         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
23467         * lib/exclude.c: Include <stdbool.h> unconditionally.
23468         * lib/tempname.c: Include <stddef.h> unconditionally.
23469         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
23470         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
23471         <stddef.h> does that.
23472         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
23473         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
23474         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
23475         needed.
23476         * lib/xstrtol.c: Likewise.
23477         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
23478         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
23479
23480         * lib/addext.c (addext): Use assignment rather than cast, to avoid
23481         warnings on some platforms.
23482
23483         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
23484         arbitrarily.
23485
23486 2003-05-26  Jim Meyering  <jim@meyering.net>
23487
23488         Merge in a change from coreutils:
23489         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
23490         that is guaranteed to be `no'.  Use `no_such_member' to indicate
23491         that condition, rather than `-1' which is slightly misleading.
23492         Change the name of the cache variable to have the gl_ prefix.
23493         Prompted by a patch from Richard Dawe for DJGPP.
23494
23495 2003-05-24  Karl Berry  <karl@gnu.org>
23496
23497         * config/config.guess: update from prep.
23498
23499 2003-05-22  Karl Berry  <karl@gnu.org>
23500
23501         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
23502
23503 2003-05-20  Karl Berry  <karl@gnu.org>
23504
23505         * config/config.guess: update from prep.
23506
23507 2003-05-18  Karl Berry  <karl@gnu.org>
23508
23509         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
23510         might actually be set by the user.
23511
23512         * config/depcomp, install-sh, mdate-sh: update from automake.
23513
23514 2003-05-17  Bruno Haible  <bruno@clisp.org>
23515
23516         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
23517         invalid expansion for AC_EGREP_CPP.
23518         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
23519         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
23520         Suggested by Akim Demaille <akim@epita.fr> in
23521         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
23522
23523 2003-05-12  Jim Meyering  <jim@meyering.net>
23524
23525         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
23526         the space-padded-by-default conversion specifiers, %e, %k, %l.
23527
23528 2003-05-12  Bruno Haible  <bruno@clisp.org>
23529
23530         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
23531         the string is longer than 4 KB.
23532
23533 2003-05-11  Karl Berry  <karl@gnu.org>
23534
23535         * config/config.{guess,sub}: update from prep.
23536
23537 2003-05-09  Bruno Haible  <bruno@clisp.org>
23538
23539         * modules/error: Add m4/strerror_r.m4 to file list.
23540
23541 2003-05-03  Bruno Haible  <bruno@clisp.org>
23542
23543         Upgrade to Unicode-4.0.
23544         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
23545         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
23546         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
23547         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
23548         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
23549         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
23550         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
23551         Change width of U+E0100..U+E01EF from 1 to 0.
23552
23553 2003-04-25  Jim Meyering  <jim@meyering.net>
23554
23555         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
23556         of type size_t, not int.
23557
23558 2003-04-25  Bruno Haible  <bruno@clisp.org>
23559
23560         * lib/copy-file.c: Include <stddef.h>, for size_t.
23561
23562 2003-04-21  Paul Eggert  <eggert@twinsun.com>
23563
23564         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
23565         code which expansion is under static control.  Patch imported from
23566         Akim Demaille's patch to Bison; see
23567         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
23568
23569 2003-04-14  Bruno Haible  <bruno@clisp.org>
23570
23571         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
23572
23573 2003-04-11  Jim Meyering  <jim@meyering.net>
23574
23575         Merge changes from Coreutils.
23576
23577         2003-03-22  Jim Meyering  <jim@meyering.net>
23578
23579         * lib/strftime.c (widen): Cast alloca return value to proper type.
23580
23581         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
23582
23583         From GNU libc.
23584         * lib/strftime.c (my_strftime): Handle very large width
23585         specifications for numeric values correctly.  Improve checks for
23586         overflow.
23587
23588         2003-01-19  Jim Meyering  <jim@meyering.net>
23589
23590         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
23591         definitions.
23592         (nl_get_alt_digit) [! defined my_strftime]: Define.
23593         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
23594         _nl_get_alt_digit and _nl_get_walt_digit.
23595
23596         * lib/strftime.c (my_strftime): Merge in locale-related changes from
23597         libc. These changes have no effect outside of _LIBC.
23598
23599 2003-04-10  Bruno Haible  <bruno@clisp.org>
23600
23601         * modules/findprog: New file.
23602         * MODULES.html.sh (func_all_modules): Add it.
23603
23604 2003-04-10  Bruno Haible  <bruno@clisp.org>
23605
23606         * m4/findprog.m4: New file.
23607         * m4/eaccess.m4: New file.
23608
23609 2003-04-10  Bruno Haible  <bruno@clisp.org>
23610
23611         * lib/findprog.h: New file, from GNU gettext.
23612         * lib/findprog.c: New file, from GNU gettext.
23613
23614 2003-04-05  Jim Meyering  <jim@meyering.net>
23615
23616         Merge changes from Coreutils.
23617
23618         * lib/exclude.h (PARAMS): Remove definition and uses.
23619         * lib/exclude.c: Remove uses of `PARAMS'.
23620
23621         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
23622         Add test-cases for DOS filenames. Declare program_name.
23623         (main): Set up program_name.  Patch by Rich Dawe.
23624
23625         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
23626         error from mntctl.
23627         Use mntctl's return value to drive the entry-processing loop, since
23628         we can't rely on the value of the vmt_length member in the last
23629         entry.  On some systems doing so could result in exhausting
23630         virtual memory.  Based in part on a patch from Mike Jetzer.
23631
23632 2003-04-04  Bruno Haible  <bruno@clisp.org>
23633
23634         * modules/linebreak: New file.
23635         * MODULES.html.sh (func_all_modules): Add it.
23636
23637 2003-04-04  Bruno Haible  <bruno@clisp.org>
23638
23639         * m4/linebreak.m4: New file.
23640
23641 2003-04-04  Bruno Haible  <bruno@clisp.org>
23642
23643         * lib/linebreak.h: New file, from GNU gettext.
23644         * lib/linebreak.c: New file, from GNU gettext with slight
23645         modifications.
23646         * lib/lbrkprop.h: New file, from GNU gettext.
23647
23648 2003-04-03  Bruno Haible  <bruno@clisp.org>
23649
23650         * modules/utf8-ucs4: New file.
23651         * modules/utf16-ucs4: New file.
23652         * modules/ucs4-utf8: New file.
23653         * modules/ucs4-utf16: New file.
23654         * MODULES.html.sh (func_all_modules): Add them.
23655
23656 2003-04-03  Bruno Haible  <bruno@clisp.org>
23657
23658         * m4/utf-ucs4.m4: New file.
23659         * m4/ucs4-utf.m4: New file.
23660
23661 2003-04-03  Bruno Haible  <bruno@clisp.org>
23662
23663         * lib/utf8-ucs4.h: New file, from GNU gettext.
23664         * lib/utf16-ucs4.h: New file, from GNU gettext.
23665         * lib/ucs4-utf8.h: New file, from GNU gettext.
23666         * lib/ucs4-utf16.h: New file, from GNU gettext.
23667
23668 2003-04-02  Bruno Haible  <bruno@clisp.org>
23669
23670         * modules/binary-io: New file.
23671         * MODULES.html.sh (func_all_modules): Add it.
23672
23673 2003-04-02  Bruno Haible  <bruno@clisp.org>
23674
23675         * lib/binary-io.h: New file, from GNU gettext.
23676
23677 2003-04-01  Bruno Haible  <bruno@clisp.org>
23678
23679         * modules/pathname: New file.
23680         * MODULES.html.sh (func_all_modules): Add it.
23681
23682 2003-04-01  Bruno Haible  <bruno@clisp.org>
23683
23684         * lib/pathname.h: New file, from GNU gettext.
23685         * lib/concatpath.c: New file, from GNU gettext.
23686
23687 2003-03-30  Bruno Haible  <bruno@clisp.org>
23688
23689         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
23690
23691 2003-03-30  Bruno Haible  <bruno@clisp.org>
23692
23693         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
23694         function chown() doesn't exist.
23695
23696 2003-03-28  Bruno Haible  <bruno@clisp.org>
23697
23698         * modules/copy-file: New file.
23699         * MODULES.html.sh (func_all_modules): Add it.
23700
23701 2003-03-28  Bruno Haible  <bruno@clisp.org>
23702
23703         * m4/copy-file.m4: New file.
23704
23705 2003-03-28  Bruno Haible  <bruno@clisp.org>
23706
23707         * lib/copy-file.h: New file, from GNU gettext.
23708         * lib/copy-file.c: New file, from GNU gettext.
23709
23710 2003-03-18  Jim Meyering  <jim@meyering.net>
23711
23712         * lib/quote.c (quote_n): Fix typo in comment.
23713
23714 2003-03-18  Bruno Haible  <bruno@clisp.org>
23715
23716         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
23717         checking.
23718         * m4/onceonly_2_57.m4: Likewise.
23719
23720 2003-03-17  Bruno Haible  <bruno@clisp.org>
23721
23722         * m4/onceonly.m4: Require autoconf 2.54 or newer.
23723         (m4_quote): Remove macro.
23724         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
23725
23726 2003-03-14  Jim Meyering  <jim@meyering.net>
23727
23728         Merge changes from Coreutils.
23729         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
23730         to be const, in order to avoid warnings.
23731         (obstack_room): Likewise.
23732         (obstack_empty_p): Likewise.
23733
23734 2003-03-14  Bruno Haible  <bruno@clisp.org>
23735
23736         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
23737         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
23738
23739 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23740
23741         Merge changes from Bison.
23742         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
23743         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
23744         when compiling Bison 1.875's `bitset bset = obstack_alloc
23745         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
23746         * lib/hash.c: Include <stdbool.h> unconditionally.
23747
23748 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23749
23750         * m4/onceonly.m4 (m4_quote): New macro.
23751         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
23752         Quote AC_FOREACH variable-expansions properly.
23753
23754 2003-03-13  Paul Eggert  <eggert@twinsun.com>
23755
23756         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
23757
23758 2003-03-09  Paul Eggert  <eggert@twinsun.com>
23759
23760         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
23761         Reported by Bruce Becker; see:
23762         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
23763
23764 2003-03-03  Paul Eggert  <eggert@twinsun.com>
23765             Bruno Haible  <bruno@clisp.org>
23766
23767         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
23768         Reported by John Hughes, see
23769         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
23770
23771 2003-02-20  Bruno Haible  <bruno@clisp.org>
23772
23773         * MODULES.html.sh (func_all_modules): Add poll.
23774
23775 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23776
23777         * modules/poll: New file.
23778
23779 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23780
23781         * lib/poll_.h: New file.
23782         * lib/poll.c: New file.
23783
23784 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
23785
23786         * m4/poll.m4: New file.
23787
23788 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23789
23790         * modules/mathl: New file.
23791
23792 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23793
23794         * lib/mathl.h: New file.
23795         * lib/acosl.c: New file.
23796         * lib/asinl.c: New file.
23797         * lib/atanl.c: New file.
23798         * lib/ceill.c: New file.
23799         * lib/cosl.c: New file.
23800         * lib/expl.c: New file.
23801         * lib/floorl.c: New file.
23802         * lib/frexpl.c: New file.
23803         * lib/ldexpl.c: New file.
23804         * lib/logl.c: New file.
23805         * lib/sincosl.c: New file.
23806         * lib/sinl.c: New file.
23807         * lib/sqrtl.c: New file.
23808         * lib/tanl.c: New file.
23809         * lib/trigl.c: New file.
23810         * lib/trigl.h: New file.
23811
23812 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
23813
23814         * m4/mathl.m4: New file.
23815
23816 2003-02-18  Bruno Haible  <bruno@clisp.org>
23817
23818         * MODULES.html.sh (func_all_modules): Add mathl.
23819
23820 2003-02-17  Bruno Haible  <bruno@clisp.org>
23821
23822         * modules/mkdtemp: New module.
23823         * MODULES.html.sh (func_all_modules): Add it.
23824
23825 2003-02-17  Bruno Haible  <bruno@clisp.org>
23826
23827         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
23828
23829 2003-02-17  Bruno Haible  <bruno@clisp.org>
23830
23831         * lib/mkdtemp.h: New file, from GNU gettext.
23832         * lib/mkdtemp.c: New file, from GNU gettext.
23833
23834 2003-02-02  Jim Meyering  <jim@meyering.net>
23835
23836         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
23837         e.g. glibc-2.2.93.
23838
23839 2003-01-31  Bruno Haible  <bruno@clisp.org>
23840
23841         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
23842         'rpl_rename'.
23843         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
23844         'rpl_strnlen'.
23845         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
23846         'rpl_strtod'.
23847         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
23848         'rpl_utime'.
23849
23850 2003-01-31  Bruno Haible  <bruno@clisp.org>
23851
23852         * lib/rename.c: #undef rename before defining rpl_rename.
23853         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
23854
23855 2003-01-30  Bruno Haible  <bruno@clisp.org>
23856
23857         * modules/vasnprintf, modules/vasprintf: New modules.
23858         * MODULES.html.sh (func_all_modules): Add them.
23859
23860 2003-01-30  Bruno Haible  <bruno@clisp.org>
23861
23862         * m4/signed.m4: New file, from GNU gettext.
23863         * m4/longdouble.m4: New file, from GNU gettext.
23864         * m4/wchar_t.m4: New file, from GNU gettext.
23865         * m4/wint_t.m4: New file, from GNU gettext.
23866         * m4/vasnprintf.m4: New file.
23867         * m4/vasprintf.m4: New file.
23868
23869 2003-01-30  Bruno Haible  <bruno@clisp.org>
23870
23871         * lib/printf-args.h: New file, from GNU gettext.
23872         * lib/printf-args.c: New file, from GNU gettext.
23873         * lib/printf-parse.h: New file, from GNU gettext.
23874         * lib/printf-parse.c: New file, from GNU gettext.
23875         * lib/vasnprintf.h: New file, from GNU gettext.
23876         * lib/vasnprintf.c: New file, from GNU gettext.
23877         * lib/asnprintf.c: New file, from GNU gettext.
23878         * lib/vasprintf.h: New file, from GNU gettext with modifications.
23879         * lib/vasprintf.c: New file, from GNU gettext.
23880         * lib/asprintf.c: New file, from GNU gettext.
23881
23882 2003-01-29  Bruno Haible  <bruno@clisp.org>
23883
23884         * modules/stpncpy: New module.
23885         * MODULES.html.sh (func_all_modules): Add it.
23886
23887 2003-01-29  Bruno Haible  <bruno@clisp.org>
23888
23889         * m4/stpncpy.m4: New file.
23890
23891 2003-01-29  Bruno Haible  <bruno@clisp.org>
23892
23893         * lib/stpncpy.h: New file, from GNU gettext with modifications.
23894         * lib/stpncpy.c: New file, from GNU gettext with modifications.
23895
23896 2003-01-28  Bruno Haible  <bruno@clisp.org>
23897
23898         * modules/c-ctype: New module.
23899         * MODULES.html.sh (func_all_modules): Add it.
23900
23901 2003-01-28  Bruno Haible  <bruno@clisp.org>
23902
23903         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
23904         Paul Eggert.
23905         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
23906         Paul Eggert.
23907
23908 2003-01-27  Bruno Haible  <bruno@clisp.org>
23909
23910         * modules/xsetenv: New module.
23911         * MODULES.html.sh (func_all_modules): Add it.
23912
23913 2003-01-27  Bruno Haible  <bruno@clisp.org>
23914
23915         * lib/xsetenv.h: New file, from GNU gettext.
23916         * lib/xsetenv.c: New file, from GNU gettext.
23917
23918 2003-01-23  Jim Meyering  <jim@meyering.net>
23919
23920         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
23921         from working on systems without dirfd (at least Irix and OSF1/Tru64).
23922
23923 2003-01-23  Bruno Haible  <bruno@clisp.org>
23924
23925         * modules/minmax: New module.
23926         * MODULES.html.sh (func_all_modules): Add it.
23927
23928 2003-01-23  Bruno Haible  <bruno@clisp.org>
23929
23930         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
23931         Eggert.
23932
23933 2003-01-22  Bruno Haible  <bruno@clisp.org>
23934
23935         * modules/exit: New module.
23936         * MODULES.html.sh (func_all_modules): Add it.
23937
23938 2003-01-22  Bruno Haible  <bruno@clisp.org>
23939
23940         * lib/exit.h: New file, from GNU gettext.
23941
23942 2003-01-19  Bruno Haible  <bruno@clisp.org>
23943
23944         * gnulib-tool: Recognize option --extract-maintainer.
23945         (func_get_maintainer): New function.
23946         * modules/*: Add Maintainer entry.
23947
23948 2003-01-16  Jim Meyering  <jim@meyering.net>
23949
23950         * m4/regex.m4: The `regex' struct is both input and output.
23951         Initialize it before each use.  Patch by Tim Waugh.
23952
23953 2003-01-16  Bruno Haible  <bruno@clisp.org>
23954
23955         * MODULES.html.sh: Add a table of contents. Add the module name as
23956         leftmost column. Add hyperlinks.
23957
23958 2003-01-15  Bruno Haible  <bruno@clisp.org>
23959
23960         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
23961
23962 2003-01-15  Bruno Haible  <bruno@clisp.org>
23963
23964         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
23965         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
23966         suffix.
23967
23968 2003-01-15  Bruno Haible  <bruno@clisp.org>
23969
23970         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
23971
23972 2003-01-15  Bruno Haible  <bruno@clisp.org>
23973
23974         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
23975         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
23976
23977 2003-01-14  Jim Meyering  <jim@meyering.net>
23978
23979         * lib/same.c (same_name): Tweak a comment.
23980
23981 2003-01-14  Bruno Haible  <bruno@clisp.org>
23982
23983         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
23984         when a string comparison is sufficient.
23985
23986 2003-01-14  Bruno Haible  <bruno@clisp.org>
23987
23988         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
23989         'unsigned int'.
23990
23991 2003-01-14  Bruno Haible  <bruno@clisp.org>
23992
23993         * lib/hash-pjw.c: Add comment about low quality of this function.
23994
23995 2003-01-13  Bruno Haible  <bruno@clisp.org>
23996
23997         * modules/stpcpy: Distribute lib/stpcpy.h.
23998         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
23999
24000 2003-01-13  Bruno Haible  <bruno@clisp.org>
24001
24002         * modules/*: Add a description.
24003         * modules/strpbrk: Fix Makefile.am snippet.
24004         * modules/strtoimax: Fix dependencies.
24005         * modules/strtoumax: Likewise.
24006
24007 2003-01-13  Bruno Haible  <bruno@clisp.org>
24008
24009         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
24010         * modules/alloca (Makefile.am): All object files depend on alloca.h.
24011         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
24012
24013 2003-01-13  Bruno Haible  <bruno@clisp.org>
24014
24015         * gnulib-tool (func_create_testdir): Store config/* files in the main
24016         directory.
24017         * config.rpath: Move to ...
24018         * config/config.rpath: ... here.
24019         * modules/gettext: Contains config/config.rpath, not config.rpath.
24020         * modules/iconv: Likewise.
24021
24022 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24023
24024         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24025         to avoid collisions with libcurses and libreadline.
24026
24027         * m4/getstr.m4: Remove.
24028         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
24029
24030 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24031
24032         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24033         to avoid collisions with libcurses and libreadline.
24034
24035         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
24036         * lib/getstr.h, getstr.c: Remove.
24037         * lib/getline.c: Include "getline.h", to check interface.
24038         Move body of old getstr.c here: this defines MIN_CHUNK and
24039         declares getdelim2, which is renamed from getstr.
24040         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
24041
24042         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
24043         All uses changed.
24044         * lib/linebuffer.h: Likewise.
24045         (readline): Remove backward-compatibility macro.
24046
24047 2003-01-12  Paul Eggert  <eggert@twinsun.com>
24048
24049         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
24050         to avoid collisions with libcurses and libreadline.
24051         * getstr: Remove.
24052         * MODULES.html.sh: Remove getstr.
24053         * modules/getline: Depend on unlocked-io, not getstr.
24054
24055 2003-01-12  Jim Meyering  <jim@meyering.net>
24056
24057         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
24058
24059 2003-01-10  Bruno Haible  <bruno@clisp.org>
24060
24061         * modules/alloca: Change Makefile.am requirements. Simplify Include
24062         requirements. Add lib/alloca_.h to file list.
24063
24064 2003-01-10  Bruno Haible  <bruno@clisp.org>
24065
24066         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
24067
24068 2003-01-10  Bruno Haible  <bruno@clisp.org>
24069
24070         * lib/alloca_.h: New file.
24071         * lib/getdate.y: Unconditionally include alloca.h.
24072         * lib/makepath.c: Likewise.
24073         * lib/setenv.c: Likewise.
24074         * lib/userspec.c: Likewise.
24075
24076 2003-01-09  Karl Berry  <karl@gnu.org>
24077
24078         * MODULES.html.sh: include `dirname $0` in PATH, to find
24079         gnulib-tool.
24080
24081 2003-01-09  Bruno Haible  <bruno@clisp.org>
24082
24083         * modules/stdbool: Change configure.ac, Makefile.am requirements.
24084         Simplify Include requirements. Add lib/stdbool.h.in to file list.
24085
24086 2003-01-09  Bruno Haible  <bruno@clisp.org>
24087
24088         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
24089
24090 2003-01-09  Bruno Haible  <bruno@clisp.org>
24091
24092         * lib/stdbool.h.in: New file.
24093
24094 2003-01-09  Bruno Haible  <bruno@clisp.org>
24095
24096         * gnulib-tool (func_all_modules): Ignore files ending in ~.
24097         * MODULES.html.sh: Likewise.
24098
24099 2003-01-08  Jim Meyering  <jim@meyering.net>
24100
24101         * lib/full-write.c: Undefine and define-away `const' after inclusion
24102         of errno.h, not before.  Suggestion from Bruno Haible.
24103
24104 2003-01-08  Bruno Haible  <bruno@clisp.org>
24105
24106         * modules/full-read: Depend on full-write.
24107
24108 2003-01-08  Bruno Haible  <bruno@clisp.org>
24109
24110         * lib/safe-read.c: Include specification header first, to ensure its
24111         selfcontainedness.
24112         * lib/full-write.c: Likewise.
24113
24114 2003-01-07  Jim Meyering  <jim@meyering.net>
24115
24116         * lib/full-write.c: Rework so that it may serve to define full_read,
24117         too.
24118         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
24119
24120 2003-01-07  Bruno Haible  <bruno@clisp.org>
24121
24122         * lib/strtoimax.c: Include <stdint.h> as an alternative to
24123         <inttypes.h>.
24124         * lib/xstrtol.h: Likewise.
24125         * lib/xstrtoimax.c: Likewise.
24126         * lib/xstrtoumax.c: Likewise.
24127         * lib/human.h: Likewise.
24128
24129         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
24130         on systems that have <inttypes.h> but not <stdint.h>.
24131
24132 2003-01-07  Bruno Haible  <bruno@clisp.org>
24133
24134         * MODULES.html.sh: Add copyright notice.
24135         (missed_files): Omit CVS directory entries.
24136         (func_module): Make it work with sed-3.02.
24137         * MODULES.txt: Remove file.
24138
24139 2003-01-06  Jim Meyering  <jim@meyering.net>
24140
24141         * lib/version-etc.c: Update year in translatable copyright string.
24142
24143 2003-01-03  Karl Berry  <karl@gnu.org>
24144
24145         * config/config.{guess,sub}: update from prep.
24146
24147 2003-01-02  Karl Berry  <karl@gnu.org>
24148
24149         * doc/COPYING.DOC: belatedly updated to 1.2.
24150
24151 2003-01-01  Karl Berry  <karl@gnu.org>
24152
24153         * gnulib-tool (func_verify_module): report module name $module in
24154         error message, not $1.
24155         * gnulib-tool (create-testdir): don't complain if destdir couldn't
24156         be created, only if it doesn't exist.
24157         * gnulib-tool (last_checkin_date): don't expand the $Date here.
24158
24159 2002-12-31  Paul Eggert  <eggert@twinsun.com>
24160
24161         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
24162
24163 2002-12-31  Paul Eggert  <eggert@twinsun.com>
24164
24165         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
24166         memcmp if strcoll doesn't work.
24167
24168 2002-12-31  Bruno Haible  <bruno@clisp.org>
24169
24170         * lib/utime.c (utime_null): No need to call ftruncate if the file was
24171         nonempty.
24172
24173 2002-12-31  Bruno Haible  <bruno@clisp.org>
24174
24175         * lib/memcoll.c (STRCOLL): New macro.
24176         (memcoll): Use it.
24177
24178 2002-12-31  Bruno Haible  <bruno@clisp.org>
24179
24180         * lib/localcharset.h: New file.
24181         * lib/localcharset.c: Include it.
24182         * lib/unicodeio.c: Likewise.
24183
24184 2002-12-31  Bruno Haible  <bruno@clisp.org>
24185
24186         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
24187         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
24188
24189 2002-12-31  Bruno Haible  <bruno@clisp.org>
24190
24191         * lib/getline.h: Include <stddef.h>, for size_t.
24192
24193         * lib/unicodeio.h: Include <stddef.h>, for size_t.
24194         * lib/unicodeio.c: Don't include <stddef.h>.
24195
24196 2002-12-31  Bruno Haible  <bruno@clisp.org>
24197
24198         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
24199         HAVE_TM_ZONE.
24200
24201 2002-12-24  Karl Berry  <karl@gnu.org>
24202
24203         * config/config.guess: update from prep.
24204
24205 2002-12-24  Bruno Haible  <bruno@clisp.org>
24206
24207         General infrasructure.
24208         * m4/README: Rewritten.
24209         * m4/onceonly.m4: New file.
24210         * m4/onceonly_2_57.m4: New file.
24211
24212         Module atexit.
24213         * m4/atexit.m4: New file.
24214
24215         Module strtod.
24216         * m4/strtod.m4: New file.
24217
24218         Module strtol.
24219         * m4/strtol.m4: New file.
24220
24221         Module strtoul.
24222         * m4/strtoul.m4: New file.
24223
24224         Module memchr.
24225         * m4/memchr.m4: New file.
24226
24227         Module memcmp.
24228         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
24229         (jm_FUNC_MEMCMP): Invoke it.
24230
24231         Module memcpy.
24232         * m4/memcpy.m4: New file.
24233
24234         Module memmove.
24235         * m4/memmove.m4: New file.
24236
24237         Module memset.
24238         * m4/memset.m4: New file.
24239
24240         Module strcspn.
24241         * m4/strcspn.m4: New file.
24242
24243         Module strpbrk.
24244         * m4/strpbrk.m4: New file.
24245
24246         Module strstr.
24247         * m4/strstr.m4: New file.
24248
24249         Module strerror.
24250         * m4/strerror.m4: New file.
24251
24252         Module mktime.
24253         * m4/mktime.m4: Renamed from jm-mktime.m4.
24254         (gl_PREREQ_MKTIME): New macro.
24255         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
24256
24257         Module malloc.
24258         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
24259         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
24260         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
24261
24262         Module realloc.
24263         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
24264         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
24265         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
24266
24267         Module strftime.
24268         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
24269         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
24270         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
24271         gl_TM_GMTOFF.
24272         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
24273
24274         Module xalloc.
24275         * m4/xalloc.m4: New file.
24276
24277         Module alloca.
24278         * m4/alloca.m4: New file.
24279
24280         Module putenv.
24281         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
24282         (jm_FUNC_PUTENV): Invoke it.
24283
24284         Module setenv.
24285         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
24286         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
24287         when invoked twice.
24288         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
24289         gt_FUNC_SETENV.
24290
24291         Module memrchr.
24292         * m4/memrchr.m4: New file.
24293
24294         Module stpcpy.
24295         * m4/stpcpy.m4: New file.
24296
24297         Module strcase.
24298         * m4/strcase.m4: New file.
24299
24300         Module strdup.
24301         * m4/strdup.m4: New file.
24302
24303         Module strnlen.
24304         * m4/strnlen.m4: New file.
24305
24306         Module strndup.
24307         * m4/strndup.m4: New file.
24308
24309         Module xstrtod.
24310         * m4/xstrtod.m4: New file.
24311
24312         Module xstrtol.
24313         * m4/xstrtol.m4: New file.
24314
24315         Module getdate.
24316         * m4/getdate.m4: New file.
24317
24318         Module unlocked-io.
24319         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
24320         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
24321         * m4/jm-glibc-io.m4n: Remove file.
24322
24323         Module long-options.
24324         * m4/long-options.m4: New file.
24325
24326         Module md5.
24327         * m4/md5.m4: New file.
24328
24329         Module sha.
24330         * m4/sha.m4: New file.
24331
24332         Module getstr.
24333         * m4/getstr.m4: New file.
24334
24335         Module getline.
24336         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
24337         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
24338         <sys/types.h>, for size_t. Use the function name gnu_getline, not
24339         simply getline. Infoke gl_PREREQ_GETLINE.
24340
24341         Module obstack.
24342         * m4/obstack.m4: New file.
24343
24344         Module hash.
24345         * m4/hash.m4: New file.
24346
24347         Module readtokens.
24348         * m4/readtokens.m4: New file.
24349
24350         Module strverscmp.
24351         * m4/strverscmp.m4: New file.
24352
24353         Module stdbool.
24354         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
24355         OSF/1.
24356
24357         Module strtoll.
24358         * m4/strtoll.m4: New file.
24359
24360         Module strtoull.
24361         * m4/strtoull.m4: New file.
24362
24363         Module strtoimax.
24364         * m4/strtoimax.m4: New file.
24365
24366         Module strtoumax.
24367         * m4/strtoumax.m4: New file.
24368
24369         Module xstrtoimax.
24370         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
24371         jm_AC_PREREQ_XSTRTOIMAX.
24372         Moved the strtol prerequisites to strtol.m4.
24373         Moved the strtoll prerequisites to strtoll.m4.
24374         Moved the strtoimax prerequisites to strtoimax.m4.
24375
24376         Module xstrtoumax.
24377         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
24378         jm_AC_PREREQ_XSTRTOUMAX.
24379         Moved the strtoul prerequisites to strtoul.m4.
24380         Moved the strtoull prerequisites to strtoull.m4.
24381         Moved the strtoumax prerequisites to strtoumax.m4.
24382
24383         Module chown.
24384         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
24385         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
24386
24387         Module dup2.
24388         * m4/dup2.m4: New file.
24389
24390         Module ftruncate.
24391         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
24392         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
24393
24394         Module getgroups.
24395         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
24396         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
24397
24398         Module gettimeofday.
24399         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
24400         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
24401         gl_PREREQ_GETTIMEOFDAY.
24402
24403         Module mkdir.
24404         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
24405         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
24406
24407         Module mkstemp.
24408         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
24409         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
24410         jm_AC_TYPE_UINTMAX_T.
24411         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
24412
24413         Module stat.
24414         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
24415         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
24416
24417         Module lstat.
24418         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
24419         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
24420
24421         Module timespec.
24422         * m4/timespec.m4 (gl_TIMESPEC): New macro.
24423         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
24424         * m4/st_mtim.m4: Indentation.
24425
24426         Module nanosleep.
24427         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
24428         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
24429         gl_PREREQ_NANOSLEEP.
24430
24431         Module regex.
24432         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
24433         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
24434         (gl_REGEX): New macro.
24435
24436         Module rename.
24437         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
24438         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
24439
24440         Module rmdir.
24441         * m4/rmdir.m4: New file.
24442
24443         Module utime.
24444         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
24445         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
24446         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
24447
24448         Module dirname.
24449         * m4/dirname.m4: New file.
24450
24451         Module getopt.
24452         * m4/getopt.m4: New file.
24453
24454         Module unistd-safer.
24455         * m4/unistd-safer.m4: New file.
24456
24457         Module fnmatch.
24458         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
24459         declaration.
24460         (gl_PREREQ_FNMATCH_EXTRA): New macro.
24461         (gl_FUNC_FNMATCH_POSIX): New macro.
24462         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
24463         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
24464         simply fnmatch.
24465
24466         Module exclude.
24467         * m4/exclude.m4: New file.
24468
24469         Module human.
24470         * m4/human.m4: New file.
24471
24472         Module acl.
24473         * m4/acl.m4: Nop.
24474
24475         Module backupfile.
24476         * m4/backupfile.m4: New file.
24477         * m4/d-ino.m4: Indentation.
24478
24479         Module fsusage.
24480         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
24481         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
24482         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
24483
24484         Module dirfd.
24485         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
24486         requirements.
24487
24488         Module euidaccess.
24489         * m4/euidaccess.m4: New file.
24490
24491         Module file-type.
24492         * m4/file-type.m4: New file.
24493
24494         Module fileblocks.
24495         * m4/fileblocks.m4: New file.
24496
24497         Module filemode.
24498         * m4/filemode.m4: New file.
24499
24500         Module isdir.
24501         * m4/isdir.m4: New file.
24502
24503         Module lchown.
24504         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
24505         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
24506
24507         Module makepath.
24508         * m4/makepath.m4: New file.
24509
24510         Module modechange.
24511         * m4/modechange.m4: New file.
24512
24513         Module mountlist.
24514         * m4/mountlist.m4: New file.
24515         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
24516         Indentation.
24517
24518         Module path-concat.
24519         * m4/path-concat.m4: New file.
24520
24521         Module pathmax.
24522         * m4/pathmax.m4: New file.
24523
24524         Module same.
24525         * m4/same.m4: New file.
24526
24527         Module save-cwd.
24528         * m4/save-cwd.m4: New file.
24529
24530         Module savedir.
24531         * m4/savedir.m4: New file.
24532
24533         Module xgetcwd.
24534         * m4/xgetcwd.m4: New file.
24535         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
24536
24537         Module xreadlink.
24538         * m4/xreadlink.m4: New file.
24539
24540         Module safe-read.
24541         * m4/safe-read.m4: New file.
24542
24543         Module safe-write.
24544         * m4/safe-write.m4: New file.
24545
24546         Module closeout.
24547         * m4/closeout.m4: New file.
24548
24549         Module stdio-safer.
24550         * m4/stdio-safer.m4: New file.
24551
24552         Module getpass.
24553         * m4/getpass.m4: New file.
24554
24555         Module getugroups.
24556         * m4/getugroups.m4: New file.
24557
24558         Module group-member.
24559         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
24560         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
24561
24562         Module idcache.
24563         * m4/idcache.m4: New file.
24564
24565         Module userspec.
24566         * m4/userspec.m4: New file.
24567
24568         Module gettime.
24569         * m4/clock_time.m4: New file.
24570         * m4/gettime.m4: New file.
24571
24572         Module settime.
24573         * m4/settime.m4: New file.
24574
24575         Module posixtm.
24576         * m4/posixtm.m4: New file.
24577
24578         Module gethostname.
24579         * m4/gethostname.m4: New file.
24580
24581         Module canon-host.
24582         * m4/canon-host.m4: New file.
24583
24584         Module gettext.
24585         * m4/codeset.m4: New file, from gettext-0.11.5.
24586         * m4/gettext.m4: New file, from gettext-0.11.5.
24587         * m4/glibc21.m4: New file, from gettext-0.11.5.
24588         * m4/iconv.m4: New file, from gettext-0.11.5.
24589         * m4/intdiv0.m4: New file, from gettext-0.11.5.
24590         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
24591         * m4/inttypes.m4: New file, from gettext-0.11.5.
24592         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
24593         * m4/isc-posix.m4: New file, from gettext-0.11.5.
24594         * m4/lcmessage.m4: New file, from gettext-0.11.5.
24595         * m4/lib-ld.m4: New file, from gettext-0.11.5.
24596         * m4/lib-link.m4: New file, from gettext-0.11.5.
24597         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
24598         * m4/progtest.m4: New file, from gettext-0.11.5.
24599         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
24600         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
24601         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
24602
24603         Module localcharset.
24604         * m4/localcharset.m4: New file.
24605
24606         Module hard-locale.
24607         * m4/hard-locale.m4: New file.
24608
24609         Module mbswidth.
24610         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
24611         onceonly macros.
24612         * m4/mbrtowc.m4: Add comment.
24613
24614         Module memcasecmp.
24615         * m4/memcasecmp.m4: New file.
24616
24617         Module memcoll.
24618         * m4/memcoll.m4: New file.
24619
24620         Module unicodeio.
24621         * m4/unicodeio.m4: New file.
24622
24623         Module rpmatch.
24624         * m4/rpmatch.m4: New file.
24625
24626         Module yesno.
24627         * m4/yesno.m4: New file.
24628
24629         Module exitfail.
24630         * m4/exitfail.m4: New file.
24631
24632         Module c-stack.
24633         * m4/c-stack.m4 (gl_C_STACK): New macro.
24634         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
24635
24636         Module error.
24637         * m4/error.m4 (gl_ERROR): New macro.
24638         (jm_PREREQ_ERROR): Use onceonly macros.
24639
24640         Module fatal.
24641         * m4/fatal.m4: New file.
24642
24643         Module getloadavg.
24644         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
24645         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
24646
24647         Module getpagesize.
24648         * m4/getpagesize.m4: New file.
24649
24650         Module getusershell.
24651         * m4/getusershell.m4: New file.
24652
24653         Module physmem.
24654         * m4/physmem.m4: New file.
24655
24656         Module posixver.
24657         * m4/posixver.m4: New file.
24658
24659         Module quotearg.
24660         * m4/quotearg.m4: New file.
24661
24662         Module quote.
24663         * m4/quote.m4: New file.
24664
24665         Module readutmp.
24666         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
24667
24668         Module sig2str.
24669         * m4/sig2str.m4: New file.
24670
24671         Other.
24672         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
24673         ulonglong.m4.
24674         * m4/intmax_t.m4: New file.
24675         * m4/d-type.m4: Indentation.
24676         * m4/jm-macros.m4: Update.
24677         * m4/prereq.m4 (jm_PREREQ): Update.
24678         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
24679         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
24680         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
24681         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
24682         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
24683         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
24684         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
24685         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
24686         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
24687         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
24688         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
24689         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
24690         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
24691         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
24692         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
24693         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
24694         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
24695         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
24696         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
24697
24698 2002-12-24  Bruno Haible  <bruno@clisp.org>
24699
24700         * MODULES.txt: Update according to m4/ changes.
24701
24702         Module gettext.
24703         * config.rpath: New file, from gettext-0.11.5.
24704
24705         * modules/*: New module descriptions.
24706         * gnulib-tool: New file.
24707         * MODULES.html.sh: New file.
24708
24709 2002-12-21  Karl Berry  <karl@gnu.org>
24710
24711         * doc/fdl.texi: update to version 1.2.
24712
24713 2002-12-19  Karl Berry  <karl@gnu.org>
24714
24715         * config/config.guess: update from prep.
24716
24717 2002-12-18  Bruno Haible  <bruno@clisp.org>
24718
24719         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
24720         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
24721
24722 2002-12-17  Bruno Haible  <bruno@clisp.org>
24723
24724         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
24725         stdlib.h, string.h.
24726
24727 2002-12-17  Bruno Haible  <bruno@clisp.org>
24728
24729         * lib/canon-host.c (strdup): Remove unused declaration.
24730
24731         * lib/fsusage.c: Include full_read.h.
24732         (get_fs_usage): Use full_read instead of safe_read.
24733
24734         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
24735
24736 2002-12-12  Karl Berry  <karl@gnu.org>
24737
24738         * config/config.guess: update from prep.
24739
24740 2002-12-11  Bruno Haible  <bruno@clisp.org>
24741
24742         * m4/setenv.m4: New file, from gettext-0.11.5.
24743
24744 2002-12-11  Bruno Haible  <bruno@clisp.org>
24745
24746         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
24747         not unsetenv().
24748         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
24749         modifications:
24750
24751         2002-12-11  Bruno Haible  <bruno@clisp.org>
24752
24753                 * setenv.c (alloca): Fall back to malloc.
24754                 (freea): New macro.
24755                 (setenv): Use freea() to free memory allocated with alloca().
24756
24757         2002-11-13  Bruno Haible  <bruno@clisp.org>
24758
24759                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
24760                 function declarations.
24761                 * unsetenv.c (unsetenv): Likewise.
24762
24763         2002-03-04  Bruno Haible  <bruno@clisp.org>
24764
24765                 Portability to AIX 4.3.3.
24766                 * unsetenv.c: New file, extracted from setenv.c.
24767                 * setenv.c: Move the unsetenv() function to unsetenv.c.
24768
24769         2001-12-20  Bruno Haible  <bruno@clisp.org>
24770
24771                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
24772                 use malloc instead. For SunOS 4.
24773
24774         2001-12-11  Bruno Haible  <bruno@clisp.org>
24775
24776                 * setenv.c: Declare alloca.
24777                 (compar_fn_t): New typedef.
24778                 (KNOWN_VALUE, STORE_VALUE): Use it.
24779
24780         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
24781         setenv.h.
24782
24783 2002-12-10  Paul Eggert  <eggert@twinsun.com>
24784
24785         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
24786         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
24787         Choose values that are less likely to collide with system fnmatch
24788         options.
24789         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
24790         defined (e.g., a pure POSIX system).
24791         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
24792         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
24793
24794 2002-12-06  Paul Eggert  <eggert@twinsun.com>
24795
24796         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
24797         a pain in practice to deal with generated m4 files.  This change
24798         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
24799
24800         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
24801         and jm-glibc-io.m4, as they are no longer a special case.
24802         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
24803         kludge and the auto-generation stuff.  Check only whether the
24804         functions are declared, not whether they exist, since older hosts
24805         that don't declare the functions can't use the optimization anyway.
24806
24807 2002-12-06  Jim Meyering  <jim@meyering.net>
24808
24809         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
24810
24811         Merge in changes from libc's misc/error.c, in preparation
24812         for the merge of gnulib's changes back into libc.
24813
24814         * lib/error.c (_): Define only if not already defined.
24815         Move definition to follow all #include directives.
24816         Include unlocked-io.h only if !_LIBC.
24817         [_LIBC]: Include <libio/libioP.h>.
24818         [USE_IN_LIBIO]: Include <libio/iolibio.h>
24819         (fflush): Tweak definition to use INTUSE.
24820         (putc): Define.
24821
24822 2002-12-05  Paul Eggert  <eggert@twinsun.com>
24823
24824         * lib/alloca.c [defined emacs]: Include "lisp.h".
24825         (xalloc_die) [defined emacs]: New macro.
24826         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
24827         [! defined emacs]: Include <xalloc.h>.
24828         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
24829         (pointer): Typedef to POINTER_TYPE *.
24830         (malloc): Remove decl; we now always use xmalloc.
24831         (alloca): Use old-style definition, since Emacs needs this.
24832         Check for arithmetic overflow when computing combined size.
24833
24834 2002-12-04  Paul Eggert  <eggert@twinsun.com>
24835
24836         Do not generate unlocked-io.h automatically, since it's easier to
24837         maintain it by hand.
24838
24839         * lib/unlocked-io.h: New file, from GNU diffutils,
24840         but with proper copyright notice and attribution.
24841         * lib/gen-uio: Remove.
24842         * lib/Makefile.am: Add copyright notice.
24843         (libfetish_a_SOURCES): Add unlocked-io.h.
24844         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
24845         (DISTCLEANFILES, io_functions): Remove macros.
24846         (EXTRA_DIST): Remove gen_uio.
24847         (unlocked-io.h): Remove rule.
24848
24849 2002-12-04  Jim Meyering  <jim@meyering.net>
24850
24851         Reflect the fact that stat.c and lstat.c are no longer generated.
24852         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
24853         (DISTCLEANFILES): Likewise.
24854         (EXTRA_DIST): Likewise.
24855         (all_local): Don't depend on stat.c or lstat.c.
24856         (stat.c, lstat.c): Remove rules.
24857         (EXTRA_DIST): Remove xstat.in.
24858
24859         * lib/xstat.in: Remove file.  Contents moved into stat.c.
24860         * lib/stat.c: New file.  Contents mostly from xstat.in.
24861         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
24862         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
24863
24864         * lib/safe-read.c: Rework so that it may serve to define safe_write,
24865         too.
24866         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
24867
24868 2002-12-03  Jim Meyering  <jim@meyering.net>
24869
24870         * lib/safe-read.c, safe-write.c: Change variable names and comments,
24871         but not semantics, to minimize the differences between these two files.
24872         (safe_read): Change comment to mention SAFE_READ_ERROR.
24873
24874         * lib/safe-read.c (IS_EINTR): Define.
24875         (safe_read): Use IS_EINTR in place of in-function cpp directives.
24876
24877 2002-12-02  Jim Meyering  <jim@meyering.net>
24878
24879         * lib/safe-read.c (EINTR): Define.
24880         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24881         (INT_MAX): Provide fallback.
24882         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
24883
24884         * lib/safe-read.h (SAFE_READ_ERROR): Define.
24885
24886 2002-12-02  Bruno Haible  <bruno@clisp.org>
24887
24888         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
24889         Define, taken from safe-read.c.
24890         (INT_MAX): Provide fallback.
24891         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
24892         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
24893
24894         * lib/safe-read.c (EINTR): Remove definition.
24895         (safe_read): Don't use EINTR if it is absent.
24896
24897 2002-12-01  Jim Meyering  <jim@meyering.net>
24898
24899         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
24900         zero.
24901         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
24902
24903 2002-11-27  Paul Eggert  <eggert@twinsun.com>
24904
24905         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
24906         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
24907         with `if (! (value < limit)) abort ();', for readability.
24908
24909 2002-11-26  Karl Berry  <karl@gnu.org>
24910
24911         * lib/strdup.c: copy from libc again, with jim's ok.
24912         * lib/.cppi-disable: re-add strdup.c
24913
24914 2002-11-25  Karl Berry  <karl@gnu.org>
24915
24916         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
24917         instead of "strtol.c".
24918
24919 2002-11-25  Karl Berry  <karl@gnu.org>
24920
24921         * config/install-sh: update from automake for variable quoting, $0 in
24922         error msgs, etc.
24923
24924         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
24925         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
24926         entry.
24927
24928 2002-11-25  Jim Meyering  <jim@meyering.net>
24929
24930         * lib/mktime.c: Sync from libc, now that it has the latest fix.
24931
24932 2002-11-24  Karl Berry  <karl@gnu.org>
24933
24934         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
24935         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
24936
24937 2002-11-24  Jim Meyering  <jim@meyering.net>
24938
24939         Update from coreutils:
24940
24941         * lib/mktime.c: Merge in changes from libc.
24942
24943         Avoid a link-time failure on some Linux systems.
24944         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
24945         (otherwise).
24946         (__mon_yday): Declare with the STATIC attribute.
24947         (__mktime_internal): Likewise.
24948         Based on a report from Greg Schafer.
24949
24950 2002-11-23  Jim Meyering  <jim@meyering.net>
24951
24952         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
24953         Use `unsigned', not `int', as type of index.
24954
24955         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
24956
24957         * lib/fsusage.c: Remove unneeded parentheses around operands of
24958         `defined'.
24959
24960 2002-11-22  Paul Eggert  <eggert@twinsun.com>
24961
24962         * lib/quotearg.h: Allow multiple inclusion by surrounding with
24963         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
24964         so that we can be included first.
24965         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
24966         * lib/quotearg.c: Include quotearg.h immediately after config.h.
24967         No need to include stddef.h or sys/types.h any more.
24968         Surround local include files with "", not "<>".
24969         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
24970         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
24971         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
24972         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
24973         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
24974         (ISPRINT): Remove; no longer needed now that we assume C89.
24975
24976         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
24977         Preserve errno.
24978
24979         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
24980         quotearg_char): Use SIZE_MAX rather than
24981         (size_t) -1 when we are talking about "infinity".
24982
24983         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
24984
24985 2002-11-22  Paul Eggert  <eggert@twinsun.com>
24986
24987         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
24988         hint that one should use `if (! x) abort ();' rather than `assert
24989         (x);', and anyway it's one less thing to worry about configuring.
24990         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
24991         hash_rehash, hash_insert): Use abort rather than assert.
24992
24993 2002-11-22  Bruno Haible  <bruno@clisp.org>
24994
24995         * lib/safe-read.h: Assume C89. Add comments.
24996         (safe_read): Change return type to size_t.
24997         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
24998         byte counts > SSIZE_MAX correctly.
24999         * lib/safe-write.h: New file.
25000         * lib/safe-write.c: New file.
25001         * lib/full-read.h: New file.
25002         * lib/full-read.c: New file.
25003         * lib/full-write.h: Assume C89. Add comments.
25004         * lib/full-write.c: Include safe-write.h.
25005         (full_write): Rewritten to use safe_write.
25006         Suggested by Jim Meyering and Paul Eggert.
25007
25008 2002-11-21  Jim Meyering  <jim@meyering.net>
25009
25010         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
25011
25012         Merge in changes from the coreutils.
25013
25014         2002-09-25  Paul Eggert  <eggert@twinsun.com>
25015         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
25016         <stdint.h>.
25017         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
25018         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
25019         int.  Work more efficiently if X is the same width as uintmax_t.
25020         Do not compare X to -1, to avoid bogus compiler warning.
25021         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
25022         Don't assume that f_frsize and f_bsize are the same type.
25023
25024         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
25025         warning on FreeBSD.
25026
25027         * lib/makepath.c (make_path): Restore umask *before* creating the final
25028         component.
25029         (make_path): Minor reformatting.
25030
25031         * lib/xmalloc.c: Adjust to work with new autoconf macros,
25032         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
25033         HAVE_MALLOC/HAVE_REALLOC.
25034
25035         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
25036         dummy ones.  At least on GNU/Linux systems, `auto' means something
25037         else.
25038         From Michael Stone.
25039
25040 2002-11-21  Bruno Haible  <bruno@clisp.org>
25041
25042         Remove case insensitive option matching.
25043         * lib/argmatch.h (argcasematch): Remove declaration.
25044         (ARGCASEMATCH): Remove macro.
25045         (__xargmatch_internal): Remove case_sensitive argument.
25046         (XARGMATCH): Update.
25047         (XARGCASEMATCH): Remove macro.
25048         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
25049         case_sensitive argument.
25050         (argcasematch): Remove function.
25051         (__xargmatch_internal): Remove case_sensitive argument.
25052         (main): Use XARGMATCH instead of XARGCASEMATCH.
25053
25054         * lib/xmalloc.c: Change compile-time error message. Add comment about
25055         required autoconf version.
25056
25057 2002-11-20  Paul Eggert  <eggert@twinsun.com>
25058
25059         Merge argmatch cleanups from Bison.  Assume C89.
25060
25061         * lib/argmatch.c: Include config.h here, not in argmatch.h.
25062         Include stdlib.h, for EXIT_FAILURE.
25063         Always include <string.h>, since we assume C89.
25064         (EXIT_FAILURE): Remove pre-C89 bug workaround.
25065         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
25066         Include <stddef.h> instead, since it's all we need for size_t.
25067         (PARAMS): Remove.  All uses removed.
25068         (ARRAY_CARDINALITY): Do not bother to #undef.
25069         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
25070         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
25071         Remove unnecessary parentheses.
25072         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
25073         Insert necessary parentheses.
25074         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
25075         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
25076
25077 2002-11-19  Bruno Haible  <bruno@clisp.org>
25078
25079         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
25080         * lib/mbswidth.h: Include <stddef.h>, for size_t.
25081
25082         * lib/mbswidth.h (PARAMS): Remove macro.
25083         (mbswidth, mbsnwidth): Use ANSI C function declarations.
25084         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
25085
25086         * lib/gcd.h (PARAMS): Remove macro.
25087         (gcd): Use ANSI C function declarations.
25088         * lib/gcd.c (gcd): Likewise.
25089
25090 2002-11-15  Bruno Haible  <bruno@clisp.org>
25091
25092         * lib/strcspn.c: Include <stddef.h>.
25093         (strcspn): Use ANSI C function declaration. Change return type to
25094         size_t. Use NULL.
25095         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
25096         (strpbrk): Use NULL.
25097         * lib/strpbrk.h (PARAMS): Remove macro.
25098         (strpbrk): Use ANSI C function declaration.
25099         * lib/strstr.c: Don't include <sys/types.h>.
25100         * lib/strstr.h (PARAMS): Remove macro.
25101         (strstr): Use ANSI C function declarations.
25102
25103 2002-11-14  Karl Berry  <karl@gnu.org>
25104
25105         * config/mkinstalldirs: `do' on separate line, instead of
25106         `for var; do'.
25107
25108 2002-11-06  Bruno Haible  <bruno@clisp.org>
25109
25110         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
25111         * lib/gcd.c (gcd): Likewise.
25112
25113 2002-11-05  Bruno Haible  <bruno@clisp.org>
25114
25115         * lib/gcd.h: New file, from gettext-0.11.5.
25116         * lib/gcd.c: New file, from gettext-0.11.5.
25117
25118 2002-11-05  Bruno Haible  <bruno@clisp.org>
25119
25120         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25121         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25122         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25123         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
25124
25125         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
25126         <libintl.h>.
25127         * lib/makepath.c: Include gettext.h instead of <locale.h> and
25128         <libintl.h>.
25129
25130         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
25131         * lib/human.c: Include gettext.h instead of <libintl.h>.
25132         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
25133         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
25134         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
25135         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
25136         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
25137         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
25138         (textdomain): Remove definition.
25139         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
25140
25141         * lib/long-options.c: Remove include of <libintl.h> and definition of
25142         _.
25143         * lib/same.c: Remove include of <libintl.h> and definition of _.
25144
25145 2002-11-04  Owen Taylor  <otaylor@redhat.com>
25146
25147         * lib/config.charset: A few additions for Solaris.
25148
25149 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
25150
25151         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
25152         * lib/localcharset.c (locale_charset): Declare as extern "C".
25153
25154 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
25155
25156         * lib/config.charset: msdos in uk_UA uses CP1125.
25157
25158 2002-11-04  Bruno Haible  <bruno@clisp.org>
25159
25160         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
25161         * lib/strcase.h: New file, from GNU gettext-0.11.5.
25162         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
25163         * lib/strstr.h: New file, from GNU gettext-0.11.5.
25164         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
25165
25166 2002-11-04  Bruno Haible  <bruno@clisp.org>
25167
25168         * lib/localcharset.c (locale_charset): Don't return an empty string.
25169
25170 2002-11-04  Bruno Haible  <bruno@clisp.org>
25171
25172         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
25173         aliases.
25174
25175 2002-11-04  Bruno Haible  <bruno@clisp.org>
25176
25177         * lib/config.charset: Update for newest glibc. Add canonical names
25178         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
25179
25180 2002-11-04  Bruno Haible  <bruno@clisp.org>
25181
25182         * lib/config.charset: Add support for NetBSD.
25183
25184 2002-11-04  Bruno Haible  <bruno@clisp.org>
25185
25186         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
25187
25188 2002-11-01  Bruno Haible  <bruno@clisp.org>
25189
25190         * configure.in: Add AC_CONFIG_AUX_DIR call.
25191         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
25192         test/Makefile.
25193         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
25194
25195 2002-09-28  Karl Berry  <karl@gnu.org>
25196
25197         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
25198         installed automake until the next release, since changes have been
25199         made.
25200
25201 2002-09-25  Karl Berry  <karl@gnu.org>
25202
25203         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
25204         * lib/getopt*: copy from libc/posix.
25205         * lib/gettext.h: copy from gettext.
25206         * lib/.cppi-disable: add strdup.c, gettext.h.
25207
25208 2002-09-25  Karl Berry  <karl@gnu.org>
25209
25210         * config/srclist.txt: enable gettext.h check.
25211         * config/config.{guess,sub}: update from prep.
25212         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
25213                 from automake 1.6.3.
25214         See srclist*.
25215
25216 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
25217
25218         * regex.c (PATFETCH): Remove the translating fetch.
25219         (PATFETCH_RAW): Rename to PATFETCH.
25220         (set_image_of_range): New fun.
25221         (SET_RANGE_TABLE_WORK_AREA): Use it.
25222         (regex_compile): Don't translate the pattern chars so eagerly.
25223         Only do it when inserting an `exactn' bytecode or when handling
25224         a char-range.
25225         (mutually_exclusive_p): Avoid empty statement.
25226
25227 2002-07-06  Jim Meyering  <meyering@lucent.com>
25228
25229         * m4/README: Don't mention Makefile.am.in.
25230         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
25231
25232 2002-07-01  Jim Meyering  <meyering@lucent.com>
25233
25234         * lib/c-stack.c: Include sys/time.h.
25235         From Volker Borchert.
25236
25237 2002-06-26  Paul Eggert  <eggert@twinsun.com>
25238
25239         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
25240
25241 2002-06-26  Paul Eggert  <eggert@twinsun.com>
25242
25243         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
25244         New macro.  Use it uniformly instead of
25245         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
25246         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
25247         reported by Vin Shelton.
25248
25249 2002-06-22  Paul Eggert  <eggert@twinsun.com>
25250
25251         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
25252         Do not assume SA_SIGINFO behavior.
25253         Bug reported by Jim Meyering on NetBSD 1.5.2.
25254
25255 2002-06-22  Jim Meyering  <meyering@lucent.com>
25256
25257         * m4/c-stack.m4: New file, from diffutils-2.8.2.
25258         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
25259
25260         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
25261         now that configure.ac uses AC_GNU_SOURCE.
25262         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
25263         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
25264
25265         Update to latest tools.  Suggestions from Paul Eggert.
25266         * m4/stdbool.m4: New file, from diffutils-2.8.2.
25267         * m4/gnu-source.m4: Update from diffutils-2.8.2.
25268         * m4/fnmatch.m4: Likewise.
25269         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
25270         to AC_HEADER_STDBOOL
25271
25272 2002-06-22  Jim Meyering  <meyering@lucent.com>
25273
25274         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
25275         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
25276
25277 2002-06-22  Jim Meyering  <meyering@lucent.com>
25278
25279         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
25280
25281         * lib/exitfail.c, exitfail.h: Likewise.
25282         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
25283
25284         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
25285         of fnmatch.h.
25286         (EXTRA_DIST): Add fnmatch_loop.c.
25287         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
25288
25289         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
25290         * lib/fnmatch.c: Update from diffutils-2.8.2.
25291         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
25292         * lib/fnmatch.h: Remove file.
25293
25294 2002-06-21  Jim Meyering  <meyering@lucent.com>
25295
25296         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
25297         * m4/mbrtowc.m4: Likewise.
25298
25299         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
25300         * m4/mbswidth.m4: Reflect name change:
25301         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
25302         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
25303
25304         * m4/lib-link.m4: Update from gettext-0.11.2.
25305         * m4/gettext.m4: Likewise.
25306
25307         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
25308         From Alfred M. Szmidt.
25309
25310 2002-06-18  Paul Eggert  <eggert@twinsun.com>
25311
25312         * lib/file-type.h: Report an error if neither S_ISREG nor
25313         S_IFREG is defined, instead of using a test specific to glibc
25314         2.2.  This should be safe, since POSIX requires S_ISREG and
25315         Unix Version 7 had S_IFREG.  We don't need to check for
25316         <sys/types.h> since we don't use any symbols that it defines.
25317
25318 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
25319
25320         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
25321         $@-t, so that each temporary file name is unique and valid in the first
25322         8 characters, for operation under DOS.
25323
25324 2002-06-15  Paul Eggert  <eggert@twinsun.com>
25325
25326         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
25327
25328 2002-06-15  Jim Meyering  <meyering@lucent.com>
25329
25330         Work even with DJGPP 2.03, which lacks support for symlinks.
25331         From Richard Dawe.
25332         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
25333         is defined.
25334         * lib/lchown.c (S_ISLNK): Likewise.
25335
25336 2002-06-15  Jim Meyering  <meyering@lucent.com>
25337
25338         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
25339         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
25340         have been included before this file.
25341
25342 2002-06-14  Jim Meyering  <meyering@lucent.com>
25343
25344         * lib/file-type.h: Use the version from diffutils-2.8.2.
25345         * lib/file-type.c: Likewise.
25346
25347 2002-06-07  Jim Meyering  <meyering@lucent.com>
25348
25349         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
25350         They're needed at least for NetBSD 1.5.2.
25351         ($statxfs_includes): Include those same headers.
25352         ($statxfs_includes): Include sys/vfs.h if available.
25353         ($statxfs_includes): Likewise for sys/statvfs.h.
25354         Check for the following members in both structs statfs and statvfs:
25355         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
25356
25357 2002-06-01  Jim Meyering  <meyering@lucent.com>
25358
25359         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
25360         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
25361
25362 2002-05-28  Jim Meyering  <meyering@lucent.com>
25363
25364         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
25365         Reported by Volker Borchert.
25366
25367 2002-05-27  Jim Meyering  <meyering@lucent.com>
25368
25369         Fix a problem seen only on nonconforming systems whereby ls.c's
25370         use of localtime, and then of gettimeofday would cause trouble:
25371         the localtime call used to initialize rpl_gettimeofday's save
25372         mechanism would clobber ls's current local time information so
25373         that in any long listing the first file would always be listed
25374         with date 1970-01-01.  Analysis by Volker Borchert.
25375
25376         * lib/gettimeofday.c (localtime): Undefine.
25377         (rpl_localtime): New function.
25378
25379 2002-05-27  Jim Meyering  <meyering@lucent.com>
25380
25381         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
25382         localtime.
25383
25384         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
25385         use the replacement function; it wouldn't resolve at link time.
25386         Reported by Volker Borchert.
25387
25388 2002-05-22  Jim Meyering  <meyering@lucent.com>
25389
25390         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
25391         file-type.h.
25392         * lib/file-type.h: New file.
25393         * lib/file-type.c (file_type): New file/function.  Extracted from
25394         diffutils.
25395
25396 2002-04-30  Jim Meyering  <meyering@lucent.com>
25397
25398         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
25399
25400 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25401
25402         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
25403
25404 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25405
25406         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
25407         Do not check for alloca.h (no longer used) or stdbool.h (was never
25408         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
25409
25410 2002-04-29  Paul Eggert  <eggert@twinsun.com>
25411
25412         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
25413
25414 2002-04-29  Jim Meyering  <meyering@lucent.com>
25415
25416         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
25417         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
25418         Use AC_FUNC_STRNLEN here instead.
25419
25420         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
25421         With autoconf-2.53a, it's part of AC_PROG_CC.
25422
25423 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25424
25425         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
25426         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
25427
25428 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25429
25430         * lib/sig2str.h, lib/sig2str.c: New files.
25431         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
25432
25433 2002-04-28  Paul Eggert  <eggert@twinsun.com>
25434
25435         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
25436         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
25437         of 127, since 64 is the largest conceivable number for ancient
25438         nonstandard hosts.
25439         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
25440
25441 2002-04-28  Jim Meyering  <meyering@lucent.com>
25442
25443         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
25444
25445 2002-04-24  Jim Meyering  <meyering@lucent.com>
25446
25447         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
25448         (jm_PREREQ): Use it.
25449
25450         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
25451         mach/mach.h fcntl.h.
25452         Check for this function: setlocale.
25453
25454 2002-04-24  Jim Meyering  <meyering@lucent.com>
25455
25456         * lib/gettext.h: New file, from Gettext.
25457         * lib/Makefile.am (INCLUDES): Remove -I../intl.
25458         (libfetish_a_SOURCES): Add gettext.h.
25459
25460 2002-04-16  Jim Meyering  <meyering@lucent.com>
25461
25462         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
25463         ut_pid, ut_id, ut_exit.
25464
25465 2002-04-16  Jim Meyering  <meyering@lucent.com>
25466
25467         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
25468         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
25469         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
25470
25471 2002-04-12  Jim Meyering  <meyering@lucent.com>
25472
25473         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
25474         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
25475         existence of the getmntinfo function.  Needed for Darwin 5.3.
25476
25477         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
25478         This is necessary at least on Darwin 5.3.
25479
25480         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
25481         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
25482         strnlen.o in the library, and that makes some versions of ranlib
25483         object.
25484
25485 2002-04-12  Jim Meyering  <meyering@lucent.com>
25486
25487         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
25488
25489 2002-04-09  Jim Meyering  <meyering@lucent.com>
25490
25491         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
25492         to be more precise.  Rather than saying we're checking whether the
25493         function `works', say what we're testing.
25494         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
25495         Reported by Bruno Haible.
25496
25497 2002-03-10  Jim Meyering  <meyering@lucent.com>
25498
25499         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
25500         Suggestion from Santiago Vila.
25501
25502 2002-03-08  Jim Meyering  <meyering@lucent.com>
25503
25504         * lib/rename.c: Mention that this wrapper is needed also on
25505         mips-dec-ultrix4.4 systems.
25506
25507 2002-03-02  Jim Meyering  <meyering@lucent.com>
25508
25509         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
25510         not HAVE_CLOCK_SETTIME.
25511
25512 2002-02-27  Paul Eggert  <eggert@twinsun.com>
25513
25514         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
25515         Check for clock_settime.
25516
25517 2002-02-27  Paul Eggert  <eggert@twinsun.com>
25518
25519         * lib/nanosleep.h: Rename to....
25520         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
25521
25522         * lib/gettime.c: New file.
25523         * lib/settime.c: New file.
25524         * lib/stime.c: Remove.
25525
25526         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
25527         timespec.h.  Remove nanosleep.h.
25528
25529 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25530
25531         * m4/acl.m4: New file.
25532         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
25533         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
25534
25535 2002-02-25  Paul Eggert  <eggert@twinsun.com>
25536
25537         * lib/acl.c, lib/acl.h: New files.
25538         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
25539
25540 2002-02-24  Jim Meyering  <meyering@lucent.com>
25541
25542         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
25543         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
25544         cause trouble.  Reported by Nelson Beebe.
25545
25546 2002-02-23  Paul Eggert  <eggert@twinsun.com>
25547
25548         * lib/path-concat.c (xpath_concat): Reorder code to pacify
25549         compilers that don't know that xalloc_die never returns.
25550
25551 2002-02-20  Jim Meyering  <meyering@lucent.com>
25552
25553         * lib/getdate.c: Regenerate using bison-1.33.
25554
25555 2002-02-17  Jim Meyering  <meyering@lucent.com>
25556
25557         * config/config.guess (main): Don't use `head -1'; it's no longer
25558         portable. Use `sed 1q' instead.
25559
25560 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
25561
25562         * m4/codeset.m4: Upgrade to gettext-0.11.
25563         * m4/gettext.m4: Upgrade to gettext-0.11.
25564         * m4/glibc21.m4: Upgrade to gettext-0.11.
25565         * m4/iconv.m4: Upgrade to gettext-0.11.
25566         * m4/isc-posix.m4: Upgrade to gettext-0.11.
25567         * m4/lcmessage.m4: Upgrade to gettext-0.11.
25568         * m4/lib-ld.m4: New file, from gettext-0.11.
25569         * m4/lib-link.m4: New file, from gettext-0.11.
25570         * m4/lib-prefix.m4: New file, from gettext-0.11.
25571         * m4/progtest.m4: Upgrade to gettext-0.11.
25572
25573 2002-02-15  Paul Eggert  <eggert@twinsun.com>
25574
25575         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
25576         (jm_PREREQ): Use it.
25577
25578 2002-02-15  Paul Eggert  <eggert@twinsun.com>
25579
25580         * lib/posixver.c, lib/posixver.h: New files.
25581         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
25582
25583 2002-02-02  Paul Eggert  <eggert@twinsun.com>
25584             Bruno Haible  <bruno@clisp.org>
25585
25586         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
25587         (fwrite_success_callback): New declaration.
25588         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
25589         print_unicode_char. Call failure callback instead of error.
25590         (fwrite_success_callback): New function.
25591         (exit_failure_callback): New function.
25592         (fallback_failure_callback): New function.
25593         (print_unicode_char): Call unicode_to_mb.
25594
25595 2002-01-26  Jim Meyering  <meyering@lucent.com>
25596
25597         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
25598         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
25599
25600 2002-01-26  Jim Meyering  <meyering@lucent.com>
25601
25602         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
25603
25604 2002-01-22  Paul Eggert  <eggert@twinsun.com>
25605
25606         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
25607
25608 2002-01-22  Jim Meyering  <meyering@lucent.com>
25609
25610         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
25611         Otherwise, some versions of automake would omit the rule that makes
25612         Makefile from Makefile.in.
25613
25614 2002-01-21  Paul Eggert  <eggert@twinsun.com>
25615
25616         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
25617         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
25618         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
25619         (memcoll): Set errno to zero if there is no error.
25620
25621         * lib/quotearg.c (quotearg_buffer_restyled):
25622         Fix bug with quoting buffers containing NUL when backslashing escapes.
25623         This bug was exposed by the other changes in this patch.
25624         (quotearg_n_options): New arg ARGSIZE.
25625         All callers changed.
25626         (quoting_options_from_style): New function.
25627         (quotearg_n_style): Use it.
25628         (quotearg_n_style_mem): New function.
25629
25630         * lib/quotearg.h (quotearg_n_style_mem): New function.
25631
25632 2002-01-19  Jim Meyering  <meyering@lucent.com>
25633
25634         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
25635         Remove useless quotes: DF_PROG="df".
25636         * m4/strnlen.m4: New file.
25637
25638 2002-01-16  Paul Eggert  <eggert@twinsun.com>
25639
25640         * lib/backupfile.c (ISDIGIT): Comment fix.
25641         * lib/getdate.y (ISDIGIT): Likewise.
25642         * lib/posixtm.c (ISDIGIT, year): Likewise.
25643         * lib/strverscmp.c (ISDIGIT): Likewise.
25644         * lib/userspec.c (ISDIGIT): Likewise.
25645
25646 2002-01-16  Jim Meyering  <meyering@lucent.com>
25647
25648         * lib/getdate.y: Add three semicolons, each just before a closing
25649         brace. Bison (as of version 1.31) no longer papers over that mistake.
25650
25651 2002-01-05  Jim Meyering  <meyering@lucent.com>
25652
25653         * lib/version-etc.c (version_etc_copyright): Update copyright year.
25654
25655 2001-12-19  Paul Eggert  <eggert@twinsun.com>
25656
25657         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
25658         not silently exit merely because the output buffer happens to
25659         have nothing pending.
25660
25661 2001-12-18  Paul Eggert  <eggert@twinsun.com>
25662
25663         See the big note in ../ChangeLog.
25664         * lib/human.c (suffixes): Prefer K to k for 1024.
25665         (generate_suffix_backwards): New function.
25666         (human_readable_inexact): Use it.
25667         * lib/xstrtol.c (__xstrtol): If there is no number but there
25668         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
25669         Accept 'K' as well as 'k'.
25670
25671 2001-12-15  Jim Meyering  <meyering@lucent.com>
25672
25673         * lib/regex.h (__restrict_arr): Update from libc.
25674
25675         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
25676         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
25677         (STREQ): Define.
25678
25679 2001-12-14  Jim Meyering  <meyering@lucent.com>
25680
25681         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
25682         Suggestion from Bruno Haible.
25683
25684 2001-12-10  Jim Meyering  <meyering@lucent.com>
25685
25686         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
25687         xrealloc, Instead, include "xalloc.h".
25688         (initbuffer): Don't cast xmalloc return value to char*.
25689         (readline): Reword comment.
25690         Don't cast xrealloc return value to char*
25691         Return NULL, not 0.
25692
25693 2001-12-09  Jim Meyering  <meyering@lucent.com>
25694
25695         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
25696         about `signed and unsigned type in conditional expression'.
25697         * lib/posixtm.c (posix_time_parse): Likewise.
25698
25699         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
25700
25701         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
25702         to avoid a pedantic warning.
25703
25704         * lib/getstr.c: Don't include assert.h.
25705         (getstr): Remove warning-evoking assertions.
25706         Return -1 if offset parameter is out of bounds.
25707         Change the type of a local from int to size_t.
25708
25709         * lib/strftime.c (my_strftime_localtime_r): Include this function
25710         definition in the `#if ! HAVE_TM_GMTOFF' block.
25711
25712         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
25713         Include xalloc.h instead.
25714
25715 2001-12-02  Jim Meyering  <meyering@lucent.com>
25716
25717         * lib/tempname.c: Don't declare getenv, thus reverting the change of
25718         2001-11-18.  It's no longer necessary, now that stdlib.h is always
25719         included.
25720
25721         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
25722         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
25723
25724 2001-11-30  Akim Demaille  <akim@epita.fr>
25725
25726         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
25727         before being defined.
25728
25729 2001-11-27  Paul Eggert  <eggert@twinsun.com>
25730
25731         * lib/quotearg.h (quotearg_n, quotearg_n_style):
25732         First arg is int, not unsigned.
25733         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
25734         (SIZE_MAX, UINT_MAX): New macros.
25735         (quotearg_n_options): Abort if N is negative.
25736         Avoid overflow check on hosts where size_t is 64 bits and int
25737         is 32 bits, as overflow is impossible there.
25738         Fix off-by-one typo that caused unnecessary reallocation.
25739
25740 2001-11-27  Jim Meyering  <meyering@lucent.com>
25741
25742         * lib/tempname.c: Merge with version from libc.
25743         * lib/regex.c: Likewise.
25744
25745         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
25746         systems for which STDC_HEADERS is 0, it was not included, resulting in
25747         a warning about an integer-to-pointer conversion problem with getenv.
25748         Reported by Volker Borchert.
25749
25750 2001-11-26  Jim Meyering  <meyering@lucent.com>
25751
25752         * lib/gtod.h: Remove file.
25753         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
25754         * lib/gettimeofday.c: Don't include gtod.h.
25755         (GTOD_init): Remove function.
25756         (rpl_gettimeofday): Do its job here instead, rather than aborting.
25757         Suggestion from Volker Borchert.
25758
25759 2001-11-23  Jim Meyering  <meyering@lucent.com>
25760
25761         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
25762         it.
25763         * lib/hash.c (struct hash_table): Define it here instead.
25764
25765 2001-11-22  Jim Meyering  <meyering@lucent.com>
25766
25767         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
25768
25769 2001-11-20  Jim Meyering  <meyering@lucent.com>
25770
25771         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
25772         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
25773
25774 2001-11-19  Jim Meyering  <meyering@lucent.com>
25775
25776         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
25777         directory.  Use "conftestXXXXXX" as the template.
25778         Suggestion from Paul Eggert.
25779
25780         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
25781         immediately, so the test doesn't mistakenly hit the max-open-files
25782         limit.
25783
25784 2001-11-18  Paul Eggert  <eggert@twinsun.com>
25785
25786         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
25787         (TEMPORARIES): New macro.
25788         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
25789         removes an artificial limitation (e.g. HP-UX 10.20, where
25790         TMP_MAX is 17576).
25791
25792 2001-11-18  Jim Meyering  <meyering@lucent.com>
25793
25794         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
25795
25796 2001-11-18  Jim Meyering  <meyering@lucent.com>
25797
25798         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
25799         on SunOS 4.
25800
25801         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
25802         files will be created before anything else.
25803
25804 2001-11-17  Paul Eggert  <eggert@twinsun.com>
25805
25806         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
25807         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
25808
25809 2001-11-17  Jim Meyering  <meyering@lucent.com>
25810
25811         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
25812         Prompted by a report from Bob Proulx.
25813
25814         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
25815         Instead, require UTILS_FUNC_MKSTEMP.
25816
25817 2001-11-17  Jim Meyering  <meyering@lucent.com>
25818
25819         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
25820         Now, that's done as part of AC_FUNC_STRTOD.
25821
25822 2001-11-17  Jim Meyering  <meyering@lucent.com>
25823
25824         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
25825         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
25826         rather than group writable.  Patch by Juan F. Codagnone.
25827
25828         * lib/readtokens.c: Remove explicit declarations of xmalloc and
25829         xrealloc, Instead, include "xalloc.h".
25830
25831         * lib/mountlist.c: Include unlocked-io.h after all system headers.
25832         Remove explicit declarations of xmalloc, xrealloc,
25833         and xstrdup.  Instead, include "xalloc.h".
25834
25835         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
25836         unlocked-io.h.
25837         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
25838         Likewise.
25839         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
25840
25841         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
25842         Reported by Padraig Brady.
25843
25844         * lib/mkstemp.c: #undef mkstemp.
25845         Include config.h.
25846         (rpl_mkstemp): Rename from mkstemp.
25847         Protoize.
25848
25849 2001-11-16  Jim Meyering  <meyering@lucent.com>
25850
25851         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
25852         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
25853         determine the amount of total physical memory, use pstat_getstatic.
25854         HPUX-11 doesn't define _SC_PHYS_PAGES.
25855         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
25856         If sysconf couldn't be used to determine the amount of available
25857         physical memory, use both pstat_getstatic and pstat_getdynamic.
25858         Based on a patch from Bob Proulx.
25859
25860 2001-11-10  Jim Meyering  <meyering@lucent.com>
25861
25862         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
25863         (jm_PREREQ): Use it.
25864
25865 2001-11-09  Jim Meyering  <meyering@lucent.com>
25866
25867         * m4/jm-macros.m4: Require autoconf-2.52f.
25868         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
25869         Use these AC_-prefixed names, not the AM_-prefixed ones.
25870
25871         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
25872
25873 2001-11-05  Jim Meyering  <meyering@lucent.com>
25874
25875         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
25876
25877 2001-11-04  Jim Meyering  <meyering@lucent.com>
25878
25879         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
25880         $DEFS.
25881
25882 2001-11-03  Jim Meyering  <meyering@lucent.com>
25883
25884         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
25885         of AC_DEFUN.
25886
25887         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
25888         know the name of the variable in the macro definition.
25889
25890 2001-11-03  Jim Meyering  <meyering@lucent.com>
25891
25892         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
25893         in argmatch_to_argument call.
25894
25895         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
25896         argument.
25897
25898         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
25899         e.g., a fault due to an attempt to free a NULL pointer.
25900
25901 2001-11-01  Jim Meyering  <meyering@lucent.com>
25902
25903         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
25904         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
25905
25906 2001-11-01  Jim Meyering  <meyering@lucent.com>
25907
25908         * lib/dirfd.c, lib/dirfd.h: New files.
25909         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
25910
25911         * lib/hash.c (hash_print) [TESTING]: Clean up.
25912
25913 2001-10-22  Paul Eggert  <eggert@twinsun.com>
25914
25915         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
25916         to avoid a warning if -Wall.
25917
25918 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
25919
25920         * README: New file
25921         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
25922         (per RMS's instructions, this is now the canonical source)
25923         * lgpl/, gpl/: New directories.
25924
25925 2001-10-21  Paul Eggert  <eggert@twinsun.com>
25926
25927         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
25928
25929 2001-10-21  Jim Meyering  <meyering@lucent.com>
25930
25931         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
25932         this code would end up calling gettext even in packages built
25933         with --disable-nls.
25934         * lib/getopt.c (_): Likewise.
25935         * lib/regex.c (_): Likewise.
25936
25937 2001-10-20  Paul Eggert  <eggert@twinsun.com>
25938
25939         * m4/error.m4 (jm_PREREQ_ERROR):
25940         Do not invoke AC_CHECK_FUNCS with strerror_r, as
25941         AC_FUNC_STRERROR_R does that.
25942         Check for strerror declaration.
25943
25944         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
25945         are supposed to have them these days.
25946         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
25947         Merge changes from latest Autoconf CVS.
25948         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
25949         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
25950         POSIX decided to standardize on the int flavor of strerror_r.
25951
25952 2001-10-20  Paul Eggert  <eggert@twinsun.com>
25953
25954         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
25955         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
25956         Use strerror_r that is only a macro, even if it is not a function.
25957         (strerror): Check for HAVE_DECL_STRERROR before declaring.
25958         (private_strerror): Use prototypes, not old-style function definition.
25959         (print_errno_message): New function.
25960         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
25961         char*-flavored one.
25962         (error_tail, error, error_at_line): Use it.
25963
25964 2001-10-11  Jim Meyering  <meyering@lucent.com>
25965
25966         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
25967         and quote_n (1, ... to avoid clobbering a buffer.
25968
25969 2001-10-05  Jim Meyering  <meyering@lucent.com>
25970
25971         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
25972         hash-pjw.h.
25973         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
25974         * lib/hash-pjw.h: New file.
25975
25976 2001-09-30  Jim Meyering  <meyering@lucent.com>
25977
25978         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
25979         `struct fsstat' has the `f_fstypename' member.
25980         Use that to define FS_TYPE, which is now used to make
25981         the getfsstat link test tighter.
25982
25983 2001-09-30  Jim Meyering  <meyering@lucent.com>
25984
25985         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
25986         Include <sys/ucred.h>, for Apple Darwin.
25987         Include sys/mount.h and sys/fs_types.h only if available.
25988         (FS_TYPE): Define.
25989         (read_filesystem_list): Use FS_TYPE.
25990
25991 2001-09-29  Paul Eggert  <eggert@twinsun.com>
25992
25993         * lib/exclude.c (excluded_filename): 0 -> false, since it's
25994         a boolean context.
25995
25996 2001-09-29  Jim Meyering  <meyering@lucent.com>
25997
25998         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
25999         [one-argument getmntent function]): Include stdio.h before mntent.h.
26000         SunOS 4.1.x needs it for the declaration of `FILE'.
26001         Patch by Volker Borchert.
26002
26003         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
26004         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
26005         sys/fs_types.h, and make the link-test for getfsstat guard #include
26006         directives with appropriate #if HAVE_*_H tests so that we can
26007         detect getfsstat on Apple Darwin1.3.7 systems.
26008         Reported by Nelson Beebe.
26009         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
26010
26011 2001-09-28  Paul Eggert  <eggert@twinsun.com>
26012
26013         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
26014         #defines strtoimax.  Also treat the other strto* functions
26015         like strtoimax.
26016
26017         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
26018         Check for strtoul and strtoumax,
26019         as those declarations are made even in the signed case.
26020         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
26021         Likewise, for strtol and strtoimax.
26022
26023 2001-09-28  Paul Eggert  <eggert@twinsun.com>
26024
26025         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
26026         #defines strtoimax.  Also treat the other strto* functions
26027         like strtoimax.
26028
26029         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
26030         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
26031         (strtoimax, strtoumax): Do not declare if already defined as a macro.
26032
26033 2001-09-26  Jim Meyering  <meyering@lucent.com>
26034
26035         Most macros in unlocked-io.h had the wrong number of arguments.
26036         * lib/gen-uio: New script.
26037         (USE_UNLOCKED_IO): Define to 1 if not already defined.
26038         * lib/unlocked-io.hin: Remove file.
26039         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
26040         rather than trying to embed it here.
26041         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
26042         Reported by Padraig Brady.
26043
26044 2001-09-25  Volker Borchert  <bt@teknon.de>
26045
26046         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
26047         `result'.
26048
26049 2001-09-24  Jim Meyering  <meyering@lucent.com>
26050
26051         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
26052
26053 2001-09-23  Jim Meyering  <meyering@lucent.com>
26054
26055         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
26056         instead of the mere test for existence of mntent.h.  The latter
26057         would get a false-positive on AIX 3.4 systems.
26058         In the outer getmntent if-block, don't die if neither of the getmntent
26059         tests succeeds.  Instead, just fall through and continue with the
26060         remaining tests.
26061
26062 2001-09-23  Jim Meyering  <meyering@lucent.com>
26063
26064         * lib/mountlist.c: Remove useless parentheses in #if directives.
26065         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
26066         the deprecated MOUNTED symbol is no longer defined in mntent.h.
26067
26068 2001-09-22  Jim Meyering  <meyering@lucent.com>
26069
26070         * m4/gettext.m4: New file.  From gettext.
26071         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
26072         * m4/progtest.m4: Likewise
26073         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
26074         * m4/glibc21.m4: Likewise.
26075
26076         * m4/libintl.m4: Remove.  No longer used.
26077
26078 2001-09-22  Jim Meyering  <meyering@lucent.com>
26079
26080         * lib/localcharset.c: Update from latest gettext.
26081         * lib/config.charset: Likewise.
26082
26083 2001-09-20  Jim Meyering  <meyering@lucent.com>
26084
26085         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
26086         strtoimax.
26087         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
26088         strtoumax.
26089
26090 2001-09-20  Jim Meyering  <meyering@lucent.com>
26091
26092         * lib/xstrtol.c (strtoimax): Guard declaration with
26093         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
26094         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
26095         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
26096         (strtoumax): Likewise, for completeness (it wasn't necessary).
26097
26098 2001-09-17  Paul Eggert  <eggert@twinsun.com>
26099
26100         * lib/strtoimax.c (HAVE_LONG_LONG):
26101         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
26102         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
26103         to work around bug in IBM C compiler.
26104
26105 2001-09-17  Jim Meyering  <meyering@lucent.com>
26106
26107         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
26108         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
26109         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
26110         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
26111         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
26112         whenever the right hand side need not be expanded by the shell.
26113
26114 2001-09-16  Paul Eggert  <eggert@twinsun.com>
26115
26116         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
26117         library.  It's not correct, as some older glibcs are buggy.
26118         fnmatch wasn't fixed until glibc 2.2.
26119
26120         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
26121         special shell magic here.
26122
26123 2001-09-16  Jim Meyering  <meyering@lucent.com>
26124
26125         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
26126         * m4/jm-macros.m4: Require it.
26127
26128 2001-09-16  Jim Meyering  <meyering@lucent.com>
26129
26130         * lib/mkdir.c: New file.
26131
26132 2001-09-15  Jim Meyering  <meyering@lucent.com>
26133
26134         * m4/jm-macros.m4: Check for help2man.
26135
26136 2001-09-11  Jim Meyering  <meyering@lucent.com>
26137
26138         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
26139         The body, by Paul Eggert, was moved here from configure.in.
26140         * m4/jm-macros.m4: Require UTILS_HOST_OS.
26141
26142 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26143
26144         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
26145         (jm_PREREQ): Use it.
26146
26147 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26148
26149         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
26150         Use ssize_t, not int, to store result of readlink.
26151         Check for ssize_t overflow as well as size_t overflow,
26152         as POSIX says the result of readlink is implementation-defined
26153         when ssize_t overflows.
26154         Remove unnecessary cast to char*.
26155         Use free+malloc instead of realloc, as the storage doesn't need
26156         to be preserved and it's clearer and can be more efficient that way.
26157         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
26158         * lib/xreadlink.h (xreadlink): Update prototype.
26159
26160 2001-09-04  Paul Eggert  <eggert@twinsun.com>
26161
26162         * lib/xgetcwd.c: Revert some of the previous change; intead,
26163         fix the HAVE_GETCWD_NULL code to behave more like the
26164         !HAVE_GETCWD_NULL code used to.
26165
26166         Include "xalloc.h".
26167         (xgetcwd): Do not return NULL when memory is exhausted; instead,
26168         invoke xalloc_die.
26169
26170 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26171
26172         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
26173         sys/param.h, as pathmax.h includes them.
26174
26175 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26176
26177         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
26178         (jm_PREREQ_XGETCWD): New macro.
26179
26180         * m4/getcwd.m4: New file.
26181
26182 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26183
26184         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
26185         like the HAVE_GETCWD_NULL code.
26186         Include pathmax.h if not HAVE_GETCWD.
26187         Do not include xalloc.h.
26188         (INITIAL_BUFFER_SIZE): New symbol.
26189         Do not use xmalloc / xrealloc, since the caller is responsible for
26190         handling errors.  Preserve errno around `free' during failure.
26191         Do not overrun buffer when using getwd.
26192
26193 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26194
26195         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
26196         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
26197         getcwd (NULL, 0).
26198
26199 2001-09-03  Paul Eggert  <eggert@twinsun.com>
26200
26201         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
26202         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
26203         spotted by Jim Meyering.
26204
26205 2001-09-03  Jim Meyering  <meyering@lucent.com>
26206
26207         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
26208         failure.
26209
26210 2001-09-02  Jim Meyering  <meyering@lucent.com>
26211
26212         * lib/error.c: Update from GNU libc.
26213
26214 2001-09-01  Jim Meyering  <meyering@lucent.com>
26215
26216         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
26217         Used by df.
26218
26219 2001-09-01  Jim Meyering  <meyering@lucent.com>
26220
26221         * lib/xreadlink.c: New file.
26222         * lib/xreadlink.h: New file.
26223         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
26224         xreadlink.h.
26225
26226         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
26227         doesn't conflict with sparc Solaris 7's definition in
26228         /usr/include/sys/int_types.h.
26229
26230         * lib/exclude.c: Use `""', not `<>' to #include non-system header
26231         files.
26232         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
26233         and strncasecmp as r-values.  Unixware didn't have declarations.
26234
26235 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26236
26237         * lib/xstrtol.h: Add copyright notice.
26238         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
26239         LONGINT_INVALID_SUFFIX_CHAR.
26240
26241 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26242
26243         * lib/xstrtol.c (strtoimax): New decl.
26244
26245 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26246
26247         * lib/xgetcwd.c: Don't include pathmax.h.
26248         Include stdlib.h and unistd.h if available.
26249         Include xalloc.h.
26250         (xmalloc, xstrdup, free): Remove decls.
26251         (xgetcwd): Don't assume sizes fit in unsigned.
26252         Check for overflow when computing sizes.
26253         Simplify reallocation code.
26254
26255 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26256
26257         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
26258         a directory's st_size can have an arbitrary value, so the old
26259         usage could waste an arbitrary amount of memory.  All uses
26260         changed.
26261         * lib/savedir.h: Update prototype.
26262
26263 2001-08-31  Paul Eggert  <eggert@twinsun.com>
26264
26265         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
26266
26267         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
26268         old strtoimax.c.
26269
26270         Also, make the following further changes to make this file's
26271         configuration more similar to that of strtol.c:
26272         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
26273         (strtoumax, uintmax_t, strtoull, strtol): Remove.
26274         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
26275         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
26276         changed to signed values.
26277
26278         And make the following changes as well:
26279         Fix copyright notice, as 1999 was missing.
26280         (verify): New macro.
26281         (strtoimax): Check sizes at compile-time, not run-time.
26282         Prefer strtol to strtoll if both work.
26283         (main): Remove; it was not that useful and was a pain to maintain.
26284
26285         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
26286
26287 2001-08-31  Jim Meyering  <meyering@lucent.com>
26288
26289         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
26290         Use an initial, malloc'd, buffer of length 128 rather than
26291         a statically allocated one of length 1024.
26292
26293 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26294
26295         Simplify code, partly by assuming autoconf 2.52 semantics.
26296
26297         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
26298
26299         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
26300         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
26301         All uses removed.
26302         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
26303         Move AC_REQUIRE to next-to-top level, to avoid confusion.
26304         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
26305         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
26306         jm_AC_HEADER_INTTYPES_H.
26307         * m4/jm-macros.m4 (jm_MACROS): Likewise.
26308
26309         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
26310
26311         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
26312         Quote first arg of AC_DEFUN.
26313         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
26314         since they are needed to parse the include file even if we need
26315         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
26316         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
26317         but with opposite signedness.
26318
26319 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26320
26321         Merge 'exclude' changes from tar 1.13.22.
26322         This fixes one or two unlikely storage allocation overflow bugs,
26323         but doesn't change user-visible behavior otherwise.
26324
26325 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26326
26327         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
26328         (jm_PREREQ_EXCLUDE): New macro.
26329
26330 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26331
26332         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
26333         tm to be declared.
26334
26335 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26336
26337         * lib/hash.c: Remove '2001' from copyright notice.
26338
26339 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26340
26341         * lib/full-write.h: New file.
26342         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
26343         * lib/full-write.c: Correct credits, as cccp.c no longer
26344         exists and anyway it was so heavily changed from the old cccp
26345         code as to be unrecognizable.  Include full-write.h.
26346         (full_write) Return size_t, with short writes meaning failure.
26347         All callers changed.  This fixes a bug with large buffers
26348         on 64-bit hosts.
26349         * lib/utime.c: Include full-write.h.
26350
26351 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26352
26353         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
26354         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
26355         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
26356         Include if available.
26357         (<xalloc.h>): Include
26358         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
26359         (verify): New macro.  Use it to verify that EXCLUDE macros do not
26360         collide with FNM macros.
26361         (struct patopts): New struct.
26362         (struct exclude): Use it, as exclude patterns now come with options.
26363         (new_exclude): Support above changes.
26364         (new_exclude, add_exclude_file):
26365         Initial size must now be a power of two to simplify overflow checking.
26366         (free_exclude, fnmatch_no_wildcards): New function.
26367         (excluded_filename): No longer requires options arg, as the options
26368         are determined by add_exclude.  Now returns bool, not int.
26369         (excluded_filename, add_exclude):
26370         Add support for the fancy new exclusion options.
26371         (add_exclude, add_exclude_file): Now takes int options arg.
26372         Check for arithmetic overflow when computing sizes.
26373         (add_exclude_file): xrealloc might modify errno, so don't
26374         realloc until after errno might be used.
26375
26376         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
26377         New macros.
26378         (free_exclude): New decl.
26379         (add_exclude, add_exclude_file): Now takes int options arg.
26380         (excluded_filename): No longer requires options arg, as the options
26381         are determined by add_exclude.  Now returns bool, not int.
26382
26383 2001-08-30  Paul Eggert  <eggert@twinsun.com>
26384
26385         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
26386
26387 2001-08-27  Jim Meyering  <meyering@lucent.com>
26388
26389         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
26390
26391         * lib/version-etc.c (N_): Remove definition.
26392         Revert most of last change.
26393         Instead, simply don't mark the `Copyright...' string for translation.
26394         Based on advice from Paul Eggert.
26395
26396         * lib/strtoxmax.c: Tweak comment.
26397
26398 2001-08-26  Jim Meyering  <meyering@lucent.com>
26399
26400         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
26401
26402         * m4/xstrtoimax.m4: New file.
26403         * m4/xstrtoumax.m4: Add comments explaining why we
26404         AC_REPLACE_FUNCS(strtol).
26405
26406 2001-08-26  Jim Meyering  <meyering@lucent.com>
26407
26408         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
26409         of copyright with `%s' so translators don't get an untranslated
26410         message in 2002.
26411         (COPYRIGHT_YEAR): Define.
26412         (version_etc): Use fprintf rather than fputs.
26413         Suggestion from Ulrich Drepper.
26414
26415         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
26416
26417         * lib/strtoll.c: New file, from GNU libc.
26418         * lib/xstrtoimax.c: New file.
26419
26420         * lib/xstrtol.h: Add xstrtoimax.
26421         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
26422         * lib/strtoimax.c: New file.  Likewise, but first define
26423         STRTOUXMAX_SIGNED.
26424
26425         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
26426         ...
26427         * lib/strtoxmax.c: ... then renamed to this.
26428
26429 2001-08-18  Paul Eggert  <eggert@twinsun.com>
26430
26431         * m4/inttypes.m4: Add AC_PREREQ(2.13).
26432         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
26433         (jm_AC_TYPE_INTMAX_T): New macro.
26434         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
26435
26436         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
26437
26438         * m4/longlong.m4: Renamed from ulonglong.m4.
26439         * m4/inttypes.m4: Renamed from inttypes_h.m4.
26440         * m4/uintmax_t.m4: Removed.
26441
26442 2001-08-13  Paul Eggert  <eggert@twinsun.com>
26443
26444         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
26445         Port to Solaris 8, where 'sed' requires a space after the 'r'
26446         command, and where sh dislikes "$/".  Clean up the spacing a bit.
26447         Redirect output to $tmp just once.
26448
26449 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
26450
26451         * lib/addext.c (<errno.h>): Include.
26452         (errno): Declare if not defined.
26453         (addext): Work correctly when pathconf returns -1 and leaves
26454         errno alone because there is no limit.  Also, work even if
26455         pathconf returns a value greater than SIZE_MAX.
26456
26457 2001-08-12  Jim Meyering  <meyering@lucent.com>
26458
26459         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
26460         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
26461         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
26462         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
26463         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
26464         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
26465         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
26466         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
26467         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
26468         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
26469         utime.m4, utimes.m4, xstrtoumax.m4:
26470         Quote the first argument in each use of AC_DEFUN.
26471
26472 2001-08-12  Jim Meyering  <meyering@lucent.com>
26473
26474         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
26475         Simply `return getcwd (NULL, 0);'.
26476         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
26477         Use 1300 as initial value for length, not PATH_MAX.
26478
26479         * lib/pathmax.h: Clean up cpp syntax.
26480
26481 2001-08-12  Jim Meyering  <meyering@lucent.com>
26482
26483         * lib/gettimeofday.c: New file.
26484         * lib/gtod.h: New file.
26485         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
26486
26487 2001-08-05  Jim Meyering  <meyering@lucent.com>
26488
26489         * m4/jm-macros.m4: Require autoconf-2.52.
26490
26491 2001-08-04  Jim Meyering  <meyering@lucent.com>
26492
26493         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
26494         stmt, to get in sync with glibc.
26495
26496 2001-08-03  Paul Eggert  <eggert@twinsun.com>
26497
26498         The following changes are from gettext 0.10.39 as maintained by
26499         Bruno Haible.
26500
26501         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
26502         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
26503         with inverted sense.  All uses changed.
26504
26505         * lib/mbswidth.c: Don't include <limits.h>.
26506         Include <stdlib.h> and <string.h> unconditionally.
26507         (iswcntrl, mbsinit, ISCNTRL): New macros.
26508         (mbsnwidth): Use K&R style function declarations.
26509         Don't bother checking for MB_LEN_MAX == 1, since the compiler
26510         can optimize it when MB_CUR_MAX == 1.
26511         The width of control characters is zero, not 1.
26512
26513 2001-08-03  Paul Eggert  <eggert@twinsun.com>
26514
26515         The following changes are from gettext 0.10.39 as maintained by
26516         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
26517
26518         * m4/codeset.m4: Upgrade to serial AM1.
26519         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
26520         all uses changed.  Quote first arg of AC_DEFUN.
26521         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
26522
26523         * m4/iconv.m4: Upgrade to serial AM2.
26524         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
26525         Add --with-libconv-prefix.
26526         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
26527         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
26528         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
26529         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
26530         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
26531
26532         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
26533         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
26534         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
26535         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
26536         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
26537         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
26538         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
26539         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
26540         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
26541
26542         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
26543         string.h any more.
26544
26545         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
26546         not the default value.
26547
26548         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
26549         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
26550         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
26551         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
26552         Also check for iswcntrl, used for wcwidth fallback.
26553         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
26554         to Autoconf 2.13.
26555
26556 2001-08-03  Jim Meyering  <meyering@lucent.com>
26557
26558         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
26559         as it was in the original.  Reported by Paul Eggert.
26560
26561 2001-07-16  Jim Meyering  <meyering@lucent.com>
26562
26563         * m4/gettimeofday.m4: New file.
26564         Prompted by a report from Bernhard Baehr.
26565
26566 2001-07-15  Jim Meyering  <meyering@lucent.com>
26567
26568         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
26569         stuff. Now it's in ../Makefile.cfg.
26570
26571 2001-07-15  Jim Meyering  <meyering@lucent.com>
26572
26573         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
26574         (BUILT_SOURCES): Add unlocked-io.h.
26575         (io_functions): Define.
26576         (unlocked-io.h): New rule.
26577         (DISTCLEANFILES): Add unlocked-io.h.
26578         (all-local): Depend on unlocked-io.h, to ensure it is created.
26579
26580         * lib/unlocked-io.hin: New file
26581
26582         * lib/regex.c: Update from glibc.
26583
26584 2001-07-05  Jim Meyering  <meyering@lucent.com>
26585
26586         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
26587         recommendation.
26588         (libfetish_a_SOURCES): Put all .h files here instead.
26589         Remove a thus-exposed (better checks in automake) duplicate and
26590         two unnecessary .h files.
26591
26592 2001-07-04  Jim Meyering  <meyering@lucent.com>
26593
26594         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
26595         that generates jm-glibc-io.m4 so that it doesn't trigger any make
26596         distcheck failure.
26597
26598 2001-07-02  Jim Meyering  <meyering@lucent.com>
26599
26600         The following changes were prompted by suggestions from Bruno Haible.
26601
26602         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
26603         is now generated.
26604         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
26605         definition of EXTRA_DIST.
26606         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
26607         ensure that the generated file is created/updated whenever the list
26608         of $(unlocked_functions) is changed.
26609         (jm-glibc-io.m4): New rule.
26610         (unlocked-io.h): New rule -- currently unused.
26611
26612 2001-06-24  Jim Meyering  <meyering@lucent.com>
26613
26614         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
26615         unmatched right bracket, rather than kludging it with an extra,
26616         falsely-matching quote in a comment.  Patch by Akim Demaille.
26617
26618 2001-06-11  Jim Meyering  <meyering@lucent.com>
26619
26620         * lib/regex.c: Update from GNU libc.
26621
26622 2001-05-27  Jim Meyering  <meyering@lucent.com>
26623
26624         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
26625         Check for ut_type in struct utmp.
26626
26627 2001-05-27  Jim Meyering  <meyering@lucent.com>
26628
26629         * lib/readutmp.h (UT_TYPE): Define.
26630
26631 2001-05-24  Jim Meyering  <meyering@lucent.com>
26632
26633         * lib/argmatch.c: Include "quote.h".
26634         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
26635         quote function.  Reported by Göran Uddeborg.
26636
26637 2001-05-22  Jim Meyering  <meyering@lucent.com>
26638
26639         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
26640         now that we use the package-supplied version unconditionally.
26641         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
26642
26643 2001-05-21  Jim Meyering  <meyering@lucent.com>
26644
26645         * m4/regex.m4: Change a couple backticks to single quotes to avoid
26646         shell syntax errors.
26647
26648 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
26649
26650         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
26651
26652 2001-05-20  Paul Eggert  <eggert@twinsun.com>
26653
26654         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
26655         Don't bother to check library strftime, since
26656         we'll be using our own my_strftime function anyway.
26657         Define my_strftime instead of strftime.
26658
26659 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
26660
26661         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
26662         which is not yet declared.
26663
26664 2001-05-15  Jim Meyering  <meyering@lucent.com>
26665
26666         * m4/regex.m4: Use proper quoting so brackets appear in the test
26667         program.
26668         Reported by, and with help from, Bruno Haible.
26669
26670 2001-05-13  Jim Meyering  <meyering@lucent.com>
26671
26672         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
26673         undefined.
26674
26675 2001-05-11  Paul Eggert  <eggert@twinsun.com>
26676
26677         dirname code cleanup.  base_name now behaves more compatibly
26678         with POSIX basename when given file names that have trailing
26679         slashes, and similarly for dir_name.  Add new primitives
26680         base_len and dir_len.  Put the directory-name-related decls
26681         into dirname.h.
26682
26683         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
26684         * lib/backupfile.c (base_name): Likewise.
26685         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
26686         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
26687         * lib/makepath.c (strip_trailing_slashes): Likewise.
26688         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
26689         ISSLASH): Likewise.
26690         * lib/rename.c (strip_trailing_slashes): Likewise.
26691         * lib/same.c (base_name): Likewise.
26692         * lib/stripslash.c (ISSLASH): Likewise.
26693
26694         * lib/addext.c: Include <dirname.h> after size_t is defined.
26695         * lib/backupfile.c: Likewise.
26696
26697         * lib/addext.c (addext): Use base_len to trim redundant
26698         trailing slashes instead of doing it ourselves.
26699         But do not trim the last slash if it is not redundant.
26700
26701         * lib/backupfile.c (find_backup_file_name,
26702         max_backup_version): Use base_len instead of rolling it ourselves.
26703         Handle the case of "" and (on DOS) "C:" correctly.
26704
26705         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
26706         needed. Include <string.h>, <dirname.h>.
26707         (base_name): Allow file names ending in slashes, other than names
26708         that are all slashes.  In this case, return the basename followed
26709         by the slashes.  This is more general, and can be used in places
26710         where the original base_name purposely had an assertion failure.
26711         (base_len): New function.
26712
26713         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
26714         Do not include <assert.h>; no longer needed.
26715         Include xalloc.h.
26716         (memrchr): Remove decl.
26717         (dir_name_r): Remove.
26718         (dir_len): Renamed from dirlen.  All callers changed.
26719         Rewrite in terms of base_name, for simplicity and consistency.
26720         (dir_name): Never return NULL.  All callers changed.
26721         Do not include <stdlib.h> in test program; no longer needed.
26722         return 0; is fine for test program.
26723
26724         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
26725         New macros.
26726         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
26727
26728         * lib/path-concat.c (path_concat): Use base_len to compute
26729         base length, not strlen; this means we cannot rely on memcpy
26730         to null-terminate.
26731
26732         * lib/same.c (STREQ): Remove.
26733         (same_name): Handle the case where the basename ends in trailing '/'.
26734
26735         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
26736         a slash was stripped.  Do not strip the last slash after a
26737         file system prefix.
26738
26739 2001-05-11  Paul Eggert  <eggert@twinsun.com>
26740
26741         * lib/Makefile.am (libfetish_a_SOURCES):
26742         Add strftime.c, since we now compile it on all hosts.
26743
26744         * lib/strftime.c (my_strftime):
26745         Define to nstrftime if emacs, but only if my_strftime is not defined.
26746         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
26747         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
26748         Add one more extra argument: a nanoseconds value.
26749         All uses changed.
26750         (ns): New macro.
26751         (my_strftime function): Add %N format.
26752         (emacs_strftimeu): Renamed from emacs_strftime,
26753         with extra ut argument.
26754
26755 2001-05-09  Paul Eggert  <eggert@twinsun.com>
26756
26757         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
26758
26759 2001-04-21  Jim Meyering  <meyering@lucent.com>
26760
26761         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
26762         doesn't interfere.
26763
26764 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
26765
26766         * m4/ftruncate.m4: Check for chsize.
26767         Link with ftruncate.o unconditionally if ftruncate is missing.
26768         This was required when cross-compiling to i586-mingw32msvc.
26769
26770 2001-04-08  Jim Meyering  <meyering@lucent.com>
26771
26772         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
26773         recomputed; that's necessary when the offset spans a DST transition.
26774         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
26775
26776 2001-04-02  Jim Meyering  <meyering@lucent.com>
26777
26778         * lib/regex.h, regex.c: Update from GNU libc.
26779
26780 2001-03-24  Jim Meyering  <meyering@lucent.com>
26781
26782         * m4/jm-macros.m4: Require autoconf-2.49d.
26783
26784 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
26785
26786         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
26787
26788 2001-03-19  Paul Eggert  <eggert@twinsun.com>
26789
26790         * lib/version-etc.c (version_etc_copyright): Update to 2001.
26791
26792 2001-03-17  Jim Meyering  <meyering@lucent.com>
26793
26794         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
26795         now that the version in autoconf is equivalent.
26796         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
26797
26798         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
26799         Suggestion from Akim Demaille.
26800
26801         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
26802         (jm_PREREQ_TEMPNAME): New function.
26803
26804 2001-03-16  Paul Eggert  <eggert@twinsun.com>
26805
26806         * lib/tempname.c (uint64_t): Define to uintmax_t if
26807         not defined, and if UINT64_MAX is not defined.
26808         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
26809         Reported by John David Anglin.
26810
26811 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
26812
26813         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
26814         resolve alias if codeset is empty.
26815         * lib/config.charset (BeOS): Use wildcard syntax.
26816
26817 2001-03-13  Jim Meyering  <meyering@lucent.com>
26818
26819         * lib/path-concat.c (path_concat)
26820         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
26821         concatenating e.g., `C:' and `foo'.
26822         From Bruno Haible.
26823
26824 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
26825
26826         * lib/localcharset.c (locale_charset): Don't use
26827         setlocale(LC_CTYPE,NULL). Don't return NULL.
26828         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
26829
26830 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
26831
26832         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
26833         support for DOS/DJGPP.
26834
26835 2001-03-01  Paul Eggert  <eggert@twinsun.com>
26836
26837         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
26838         lacks mkstemp.  Compile our own tempname.c if we compile our own
26839         mkstemp.c, as mkstemp relies on tempname.
26840
26841 2001-03-01  Jim Meyering  <meyering@lucent.com>
26842
26843         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
26844         AH_VERBATIM really does output its argument verbatim.
26845
26846 2001-02-28  Paul Eggert  <eggert@twinsun.com>
26847
26848         * lib/Makefile.am (libfetish_a_SOURCES):
26849         Add dup-safer.c, fopen-safer.c.
26850         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
26851
26852         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
26853         * lib/unistd-safer.h: New files.
26854
26855 2001-02-25  Paul Eggert  <eggert@twinsun.com>
26856
26857         The mkstemp replacement is taken from glibc 2.2.2, with some
26858         portability fixes for use outside glibc, as follows:
26859
26860         * lib/tempname.c (struct_stat64): New macro.
26861         (direxists, __gen_tempname): Use it.
26862         This avoids a portability problem with Solaris 8.
26863
26864         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
26865         (<stddef.h>, <stdint.h>, <string.h>):
26866         Include only if STDC_HEADERS || _LIBC.
26867         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
26868         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
26869         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
26870         (__set_errno): Define this macro if <errno.h> doesn't.
26871         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
26872         Define these macros if <stdio.h> doesn't.
26873         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
26874         Define these macros if <sys/stat.h>
26875         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
26876         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
26877         __xstat64): Define if not _LIBC.
26878         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
26879         (__gen_tempname): Invoke gettimeofday only if
26880         HAVE_GETTIMEOFDAY || _LIBC;
26881         otherwise, fall back on plain "time".
26882         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
26883
26884         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
26885
26886         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
26887
26888 2001-02-18  Paul Eggert  <eggert@twinsun.com>
26889
26890         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
26891
26892 2001-02-17  Paul Eggert  <eggert@twinsun.com>
26893
26894         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
26895         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
26896         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
26897         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
26898
26899 2001-02-17  Paul Eggert  <eggert@twinsun.com>
26900
26901         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
26902         Remove workaround macros for hosts that have mbrtowc but not
26903         mbstate_t, as we now insist on proper declarations for both
26904         before using mbrtowc.
26905
26906 2001-02-17  Jim Meyering  <meyering@lucent.com>
26907
26908         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
26909         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
26910         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
26911         UnixWare 7.1.1.
26912
26913         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
26914         rather than AC_CACHE_VAL.
26915
26916 2001-02-17  Jim Meyering  <meyering@lucent.com>
26917
26918         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
26919         around included file name.
26920
26921         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
26922
26923         * lib/strftime.c: Update from GNU libc (the only changes were to
26924         comments).
26925
26926 2001-02-17  Jim Meyering  <meyering@lucent.com>
26927
26928         * lib/regex.c: Update from libc.
26929
26930 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
26931
26932         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
26933         clash.
26934
26935 2001-02-16  Paul Eggert  <eggert@twinsun.com>
26936
26937         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
26938         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
26939         Reported by Mark Hounschell via Paul Eggert.
26940
26941 2001-02-07  Jim Meyering  <meyering@lucent.com>
26942
26943         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
26944
26945 2001-02-05  Jim Meyering  <meyering@lucent.com>
26946
26947         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
26948         it includes the patch required for `large file' support with at least
26949         HP-UX's 10.20 /bin/cc.
26950
26951 2001-02-03  Jim Meyering  <meyering@lucent.com>
26952
26953         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
26954         AS_IF, now that it works once again (mysteriously).
26955         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
26956
26957 2001-01-30  Jim Meyering  <meyering@lucent.com>
26958
26959         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
26960         * m4/chown.m4: Rename conftestchown to conftest.chown.
26961         * m4/rename.m4: s/conftestdir/conftest.d1/ and
26962         s/conftestdir2/conftest.d2/.
26963         * m4/utimes.m4: s/conftestdata/conftest.data/
26964         Inspired by Pavel Roskin's change in autoconf.
26965
26966 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
26967
26968         * lib/config.charset: Update for FreeBSD 4.2.
26969
26970 2001-01-27  Jim Meyering  <meyering@lucent.com>
26971
26972         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
26973         a use of AS_IF.
26974         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
26975
26976 2001-01-26  Jim Meyering  <meyering@lucent.com>
26977
26978         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
26979         quotearg.c includes it.
26980
26981 2001-01-26  Jim Meyering  <meyering@lucent.com>
26982
26983         * lib/quotearg.c: Include stddef.h.
26984         * lib/quote.c: Include stddef.h.
26985         Reported by Axel Kittenberger.
26986
26987         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
26988         line in double quotes so that it evokes a better diagnostic.
26989         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
26990         Reported by Axel Kittenberger.
26991
26992 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
26993
26994         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
26995         as if it was a `charset'.
26996
26997 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
26998
26999         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
27000         has const.
27001
27002 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
27003
27004         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
27005         to avoid a warning.  Add back 'const' to inptr.
27006
27007 2001-01-20  Jim Meyering  <meyering@lucent.com>
27008
27009         Be sure that headers are checked before used in code compiled
27010         for the type checks.
27011         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
27012         In place of that, invoke jm_CHECK_ALL_TYPES.
27013         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
27014         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
27015         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
27016         The check for ssize_t was mistakenly run before the test for unistd.h.
27017
27018         The configure-time check for stdbool.h was missing.
27019         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
27020         (jm_PREREQ_HASH): New function.
27021
27022 2001-01-17  Jim Meyering  <meyering@lucent.com>
27023
27024         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
27025         for autoconf-2.49c.
27026         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
27027
27028 2001-01-16  Jim Meyering  <meyering@lucent.com>
27029
27030         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
27031         From Bruno Haible.
27032
27033 2001-01-14  Jim Meyering  <meyering@lucent.com>
27034
27035         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
27036         foo and bar.  Create conftestdir/ in the script, not in the C code.
27037         Remove directories in the script, not in the C code.
27038         Remove conftestdir{,2} before trying to create the directory.
27039         Make the entire configure script fail if the mkdir fails.
27040
27041 2001-01-14  Jim Meyering  <meyering@lucent.com>
27042
27043         * lib/rename.c: New file.  From Volker Borchert.
27044         Include stdlib.h, string.h or strings.h, and xalloc.h.
27045         Use strip_trailing_slashes rather than open-coding it.
27046
27047 2001-01-03  Paul Eggert  <eggert@twinsun.com>
27048
27049         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
27050
27051 2001-01-03  Jim Meyering  <meyering@lucent.com>
27052
27053         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
27054         of local `inptr' to avoid warning with some system declarations of
27055         iconv.
27056
27057 2001-01-02  Volker Borchert  <bt@teknon.de>
27058
27059         * m4/rename.m4: New file.
27060         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
27061
27062 2001-01-01  Jim Meyering  <meyering@lucent.com>
27063
27064         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
27065         even on systems with utmpx.h.  It's necessary for the declaration of
27066         utmp's ut_user member.  Reported by Andreas Jaeger.
27067
27068         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
27069         available. They are required for the declarations of getgrgid and
27070         getpwuid resp.
27071         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
27072         Reported by Andreas Jaeger.
27073
27074 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
27075
27076         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
27077         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
27078         so `make install' also works in VPATH builds.
27079
27080 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
27081
27082         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
27083         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
27084         can be used in subdirectories.
27085
27086 2000-12-29  Paul Eggert  <eggert@twinsun.com>
27087
27088         * lib/modechange.c: Do not assume that mode_t uses the
27089         traditional octal encoding.  E.g. "chmod 1 FOO" should set
27090         the other-execute bit of FOO even if S_IXOTH != 1.
27091
27092         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
27093         WOTH, XOTH, ALLM): New macros.
27094         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
27095          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
27096         Use them.
27097         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
27098         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
27099         (mode_compile):
27100         No need to use uintmax_t; unsigned long is long enough.
27101         Don't bother to get suffix since we don't use it.
27102
27103 2000-12-26  Jim Meyering  <meyering@lucent.com>
27104
27105         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
27106         better with autoheader.
27107
27108 2000-12-24  Jim Meyering  <meyering@lucent.com>
27109
27110         * lib/hash.c (is_prime): Return explicit boolean values.
27111         (hash_get_first): Return NULL to appease Irix5.6's 89.
27112         Reported by Nelson Beebe.
27113
27114 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
27115
27116         * lib/localcharset.c (locale_charset): Add support for Win32.
27117
27118 2000-12-18  Paul Eggert  <eggert@twinsun.com>
27119
27120         * lib/physmem.h, lib/physmem.c: New files.
27121
27122         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
27123         (noinst_HEADERS): Add physmem.h.
27124
27125         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
27126         't' for compatibility with Solaris 8 sort.
27127
27128 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
27129
27130         * lib/config.charset: Add support for BeOS.
27131
27132 2000-12-17  Jim Meyering  <meyering@lucent.com>
27133
27134         * m4/dos.m4 (jm_AC_DOS): New file and macro.
27135         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
27136
27137 2000-12-16  Jim Meyering  <meyering@lucent.com>
27138
27139         This bug had a serious impact on chown: `chown N:M FILE' (for integer
27140         N and M) would have treated it like `chown N:N FILE'.
27141
27142         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
27143
27144 2000-12-16  Jim Meyering  <meyering@lucent.com>
27145
27146         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
27147         SHELLS_FILE to a file name that's useful on djgpp systems.
27148         Include stdlib.h.
27149         (ADDITIONAL_DEFAULT_SHELLS): Define.
27150         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
27151         Based mostly on a patch from Prashant TR.
27152
27153 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
27154
27155         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
27156         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
27157         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
27158
27159 2000-12-08  Andreas Schwab  <schwab@suse.de>
27160
27161         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
27162         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
27163
27164 2000-12-07  Jim Meyering  <meyering@lucent.com>
27165
27166         * lib/stripslash.c (ISSLASH): Define.
27167         (strip_trailing_slashes): Use ISSLASH rather than comparing against
27168         `/'.
27169         From Prashant TR.
27170
27171         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
27172         (dir_name_r): Declare this function as static.
27173         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
27174         manifest itself on a name containing a mix of slashes and
27175         backslashes.
27176         Make this function work with names starting with a DOS-style
27177         drive letter and colon prefix.
27178         (dir_name): Append `.' if necessary.
27179         Based mostly on patches from Prashant TR and Eli Zaretskii.
27180
27181         * lib/dirname.h (dir_name_r): Remove prototype.
27182
27183 2000-12-06  Paul Eggert  <eggert@twinsun.com>
27184
27185         * m4/off_t-format.m4: Remove this file.
27186         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
27187
27188 2000-12-06  Jim Meyering  <meyering@lucent.com>
27189
27190         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
27191         replacement strtoull, we may well need the replacement strtoul, too.
27192         Check for declarations of strtoul and strtoull.
27193         Check for strtol.  Mainly as a cue to cause automake to include
27194         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
27195         Check for limits.h -- strtol.c needs it.
27196
27197 2000-12-05  Jim Meyering  <meyering@lucent.com>
27198
27199         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
27200
27201 2000-12-04  Jim Meyering  <meyering@lucent.com>
27202
27203         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
27204         Also include memory.h, stdlib.h, unistd.h if appropriate.
27205         Reported by Andreas Jaeger (conflicting declaration of malloc).
27206
27207 2000-12-02  Jim Meyering  <meyering@lucent.com>
27208
27209         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
27210         * m4/jm-macros.m4 (jm_MACROS): require it.
27211
27212 2000-12-02  Jim Meyering  <meyering@lucent.com>
27213
27214         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
27215
27216 2000-12-01  Paul Eggert  <eggert@twinsun.com>
27217
27218         * lib/memrchr.c: Include <config.h> before any system include file.
27219
27220 2000-11-30  Jim Meyering  <meyering@lucent.com>
27221
27222         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
27223
27224 2000-11-30  Jim Meyering  <meyering@lucent.com>
27225
27226         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
27227
27228 2000-11-29  Paul Eggert  <eggert@twinsun.com>
27229
27230         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
27231
27232 2000-11-26  Jim Meyering  <meyering@lucent.com>
27233
27234         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
27235
27236 2000-11-22  Paul Eggert  <eggert@twinsun.com>
27237
27238         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
27239         size of (size_t) -1; it's not portable.
27240
27241 2000-11-17  Jim Meyering  <meyering@lucent.com>
27242
27243         * lib/strstr.c: Update from GNU libc.
27244
27245 2000-11-17  Akim Demaille  <akim@epita.fr>
27246
27247         * lib/obstack.h: Formatting changes.
27248         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
27249         prevent type checking.
27250         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
27251         cast the value to (void *): assigning a `foo *' to a `void *'
27252         variable is valid.
27253         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
27254
27255 2000-11-16  Jim Meyering  <meyering@lucent.com>
27256
27257         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
27258
27259 2000-11-11  Jim Meyering  <meyering@lucent.com>
27260
27261         * lib/error.c: Add a couple #includes, merging from GNU libc version.
27262
27263 2000-11-10  Jim Meyering  <meyering@lucent.com>
27264
27265         * lib/obstack.h: Update from GNU libc.
27266         * lib/obstack.c: Likewise.
27267
27268 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
27269
27270         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
27271
27272 2000-11-06  Paul Eggert  <eggert@twinsun.com>
27273
27274         * lib/getusershell.c (setusershell): Use rewind rather than
27275         fseek/fseeko, to avoid configuration hassles with fseeko.
27276         Don't bother opening SHELLS_FILE if shellstream is NULL;
27277         it's not necessary.
27278
27279 2000-11-05  Jim Meyering  <meyering@lucent.com>
27280
27281         * lib/makepath.h (make_dir): Declare.
27282         * lib/makepath.c (make_dir): Remove `static' attribute.
27283         Tweak a comment.
27284
27285 2000-11-04  Jim Meyering  <meyering@lucent.com>
27286
27287         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
27288
27289 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
27290
27291         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
27292         last one in a bucket, advance to the next bucket.
27293
27294 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
27295
27296         * lib/fnmatch.c: Do not comment out all the code if we are using
27297         the GNU C library, because in some cases we are replacing buggy
27298         code in the GNU C library itself.
27299
27300 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
27301
27302         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
27303         (regex_compile): Catch bogus \(\1\).
27304
27305 2000-10-30  Paul Eggert  <eggert@twinsun.com>
27306
27307         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
27308         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
27309         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
27310
27311 2000-10-30  Paul Eggert  <eggert@twinsun.com>
27312
27313         * lib/error.h, getline.h, modechange.h:
27314         Remove "2000" from Copyright line, as the file hasn't been
27315         changed this year other than in the copyright notice.
27316
27317         * lib/xalloc.h: Add "2000" to Copyright line, as this file
27318         was changed this year.
27319
27320 2000-10-29  Jim Meyering  <meyering@lucent.com>
27321
27322         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
27323         renaming.
27324         * m4/ls-mntd-fs.m4: Likewise
27325
27326 2000-10-29  Jim Meyering  <meyering@lucent.com>
27327
27328         * lib/xstat.in: Fix grammar in comment.
27329
27330 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
27331
27332         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
27333         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
27334         doesn't define __restrict_arr.
27335
27336 2000-10-28  Jim Meyering  <meyering@lucent.com>
27337
27338         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
27339         (jm_PREREQ_MEMCHR): New function.
27340
27341 2000-10-28  Jim Meyering  <meyering@lucent.com>
27342
27343         * lib/memchr.c: Update from libc.
27344         Adjust for portability:
27345         [HAVE_STDLIB_H]: Include stdlib.h.
27346         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
27347         Undef __memchr, too.
27348         [!weak_alias]: Define __memchr to memchr.
27349
27350         * lib/regex.c: Update from libc.
27351         * lib/regex.h: Likewise.
27352         * lib/getopt1.c: Likewise.
27353         * lib/memcmp.c: Likewise.
27354
27355         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
27356         Avoid using fseek, when possible -- it's broken by design.
27357         Patch by Ulrich Drepper.
27358
27359 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
27360
27361         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
27362         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
27363         Giving in to popular pressure to shut up the compiler with casts.
27364
27365 2000-10-26  Jim Meyering  <meyering@lucent.com>
27366
27367         * lib/strftime.c: Update from libc.
27368
27369 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
27370
27371         * regex.c: More `unsigned char' -> `re_char' changes.
27372         Also change several `int' into `re_wchar_t'.
27373         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
27374         (PUSH_FAILURE_POINTER): Don't cast any more.
27375         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
27376         We want GCC to complain, since this piece of code makes
27377         re_match non-reentrant, which *should* be fixed.
27378         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
27379         (EXTEND_BUFFER): Use RETALLOC.
27380         (SET_LIST_BIT): Don't cast.
27381         (re_wchar_t): New type.
27382         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
27383         that those two functions will always properly return.
27384         (IMMEDIATE_QUIT_CHECK): Cast to void.
27385         (analyse_first): Use recursion rather than an explicit stack.
27386         (re_compile_fastmap): Can't fail anymore.
27387         (re_search_2): Don't check re_compile_fastmap for failure.
27388         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
27389         Now also sets the new value (passed in a new argument).
27390         (re_match_2_internal): Use it.
27391         Also, use a new var `reg' of type size_t when looping through regs
27392         rather than reuse the inappropriate `mcnt'.
27393
27394 2000-10-25  Jim Meyering  <meyering@lucent.com>
27395
27396         * lib/obstack.c: Update from libc.
27397
27398 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
27399
27400         * regex.c (regex_compile): Change the way of handling a range from
27401         a char less than 256 to a char not less than 256.
27402
27403 2000-10-24  Andrew Innes  <andrewi@gnu.org>
27404
27405         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
27406         NT-Emacs only.
27407         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
27408         so that re_search functions only quit when callers expect them to.
27409
27410 2000-10-23  Jim Meyering  <meyering@lucent.com>
27411
27412         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
27413         wrong.  That set_locale call must not have any side effects.
27414         From Paul Eggert.
27415
27416 2000-10-22  Jim Meyering  <meyering@lucent.com>
27417
27418         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
27419         [CYCLIC]: Remove now-unused definition.
27420
27421         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
27422         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
27423         Suggestion from Ulrich Drepper.
27424
27425 2000-10-21  Jim Meyering  <meyering@lucent.com>
27426
27427         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
27428         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
27429         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
27430
27431 2000-10-21  Jim Meyering  <meyering@lucent.com>
27432
27433         * lib/dirname.c (memrchr): Declare if necessary.
27434         (dir_name): Remove the restriction that there be no
27435         trailing slashes.  Now, this code skips past them, effectively
27436         ignoring them.
27437         [TEST_DIRNAME] (main): New unit tests.
27438
27439         * lib/memrchr.c: New file from GNU libc.
27440         Undef __memrchr, too.
27441         [!weak_alias]: Define __memrchr to memrchr.
27442         Guard weak_alias use with `#ifdef weak_alias'.
27443
27444 2000-10-21  Jim Meyering  <meyering@lucent.com>
27445
27446         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
27447         (dir_name): Use dir_name_r.
27448         * lib/dirname.h (dir_name_r): Declare it.
27449
27450 2000-10-17  Jim Meyering  <meyering@lucent.com>
27451
27452         * lib/quote.h (PARAMS): Define and use.
27453         Reported by Akim Demaille.
27454
27455         * lib/getopt.c: Update from libc.
27456
27457 2000-10-16  Jim Meyering  <meyering@lucent.com>
27458
27459         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
27460         setlocale.
27461         From Jan Fedak.
27462
27463 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
27464
27465         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
27466
27467 2000-09-25  Jim Meyering  <meyering@lucent.com>
27468
27469         * lib/md5.h (rol): Define (from GnuPG).
27470
27471         * lib/sha.c: Give credit (GnuPG) where due.
27472         (M): Use rol rather than open-coding it.
27473         Add a FIXME comment.
27474
27475 2000-09-21  Jim Meyering  <meyering@lucent.com>
27476
27477         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
27478         Reported by Michael Stone.
27479
27480 2000-09-20  Jim Meyering  <meyering@lucent.com>
27481
27482         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
27483         (noinst_HEADERS): Add sha.h.
27484         Based on code from Scott G. Miller and from GnuPG.
27485
27486 2000-09-18  Jim Meyering  <meyering@lucent.com>
27487
27488         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
27489         LIBS. Otherwise, everyone ends up linking with -lelf for some
27490         configurations.
27491         Reported by Mike Stone.
27492
27493 2000-09-15  Jim Meyering  <meyering@lucent.com>
27494
27495         * lib/regex.c: Update from libc.
27496
27497 2000-09-10  Jim Meyering  <meyering@lucent.com>
27498
27499         * lib/getopt.c (_getopt_internal): Update from glibc.
27500
27501 2000-09-09  Jim Meyering  <meyering@lucent.com>
27502
27503         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
27504         think it should be used as a general replacement for isascii.
27505         * lib/fnmatch.c: Likewise.
27506         * lib/mbswidth.c: Likewise
27507         * lib/regex.c: Likewise.
27508
27509         Don't use atoi.
27510         * lib/userspec.c: Include sys/param.h and limits.h.
27511         Include xstrtol.h.
27512         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
27513         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
27514         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
27515         UID, GID.  Check range.
27516
27517 2000-09-06  Jim Meyering  <meyering@lucent.com>
27518
27519         * lib/getopt.c (_getopt_internal): Update from glibc.
27520
27521 2000-08-30  Jim Meyering  <meyering@lucent.com>
27522
27523         * lib/strftime.c: Merge in changes from GNU libc.
27524
27525 2000-08-26  Jim Meyering  <meyering@lucent.com>
27526
27527         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
27528         * m4/fpending.m4: New file.
27529
27530 2000-08-26  Jim Meyering  <meyering@lucent.com>
27531
27532         * lib/closeout.c: Include "__fpending.h".
27533         (close_stdout_status): Return right away if there's nothing to flush.
27534
27535         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
27536         * lib/__fpending.c: New file.
27537         * lib/__fpending.h: New file.
27538
27539 2000-08-20  Jim Meyering  <meyering@lucent.com>
27540
27541         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
27542         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
27543         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
27544
27545 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
27546
27547         Improve fileutils installation on systems where running
27548         programs (like install) can't be unlinked.
27549         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
27550         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
27551
27552 2000-08-07  Paul Eggert  <eggert@twinsun.com>
27553
27554         Standardize on "memory exhausted" instead of "Memory exhausted"
27555         or "virtual memory exhausted".
27556         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
27557         "virtual memory exhausted".
27558         * lib/same.c (same_name): Invoke xalloc_die instead of printing
27559         our own message.
27560         * lib/userspec.c (parse_user_spec): Likewise.
27561         * lib/bumpalloc.h: comment fix
27562         * lib/same.c, userspec.c: Include xalloc.h.
27563
27564         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
27565         not char *const and pointing to a constant array.
27566         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
27567         (xrealloc): Comment fix.
27568
27569         * lib/userspec.c (parse_user_spec):
27570         Don't translate a message until just before returning,
27571         to avoid unnecessary translation.
27572
27573 2000-08-07  Jim Meyering  <meyering@lucent.com>
27574
27575         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
27576         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
27577         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
27578         getgroups.c, gethostname.c, getopt.h, group-member.c,
27579         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
27580         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
27581         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
27582         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
27583         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
27584         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
27585         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
27586         yesno.c: Back out Copyright date changes for each file with no change
27587         this year.  This eases coordination with other programs using the same
27588         source code modules.  From Paul Eggert.
27589
27590 2000-08-06  Paul Eggert  <eggert@twinsun.com>
27591
27592         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
27593         not char, for compatibility with glibc 2.1.3 strftime.c.
27594
27595 2000-08-03  Greg McGary  <greg@mcgary.org>
27596
27597         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
27598         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
27599         (EXTEND_BUFFER): Use them.
27600
27601 2000-08-01  Jim Meyering  <meyering@lucent.com>
27602
27603         * lib/dirname.c (ISSLASH): Define.
27604         (BACKSLASH_IS_PATH_SEPARATOR): Define.
27605         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
27606         both `\' and `/' may be use as path separators.
27607         Based on a patch from Prashant TR.
27608
27609 2000-07-31  Paul Eggert  <eggert@twinsun.com>
27610
27611         * lib/quotearg.c (quotearg_n_options): Don't make the initial
27612         slot vector a constant, since it might get modified.
27613
27614 2000-07-31  Jim Meyering  <meyering@lucent.com>
27615
27616         * lib/xmalloc.c: Use `virtual memory exhausted', not
27617         `Memory exhausted'.
27618         * lib/obstack.c (print_and_abort): Likewise.
27619
27620 2000-07-30  Paul Eggert  <eggert@twinsun.com>
27621
27622         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
27623         buffer, so that the caller can always quote one small
27624         component of a "memory exhausted" message in slot 0.
27625         From a suggestion by Jim Meyering.
27626
27627 2000-07-30  Jim Meyering  <meyering@lucent.com>
27628
27629         * lib/makepath.c (make_path): Quote the other instance, too.
27630
27631         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
27632         (STATIC_BUF_SIZE): Define.
27633         (quotearg_n_options): Use only statically allocated storage when
27634         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
27635         than STATIC_BUF_SIZE.
27636
27637 2000-07-29  Jim Meyering  <meyering@lucent.com>
27638
27639         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
27640         * lib/dirname.c (dir_name): Likewise.
27641
27642         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
27643         `/'.
27644
27645         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
27646         (dir_name): Assert that there are no trailing slashes.
27647
27648 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
27649
27650         * lib/mbswidth.h (mbswidth): Add a flags argument.
27651         (mbswidth): New declaration.
27652         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
27653         * lib/mbswidth.c (mbswidth): Add a flags argument.
27654         (mbsnwidth): New function.
27655
27656 2000-07-24  Jim Meyering  <meyering@lucent.com>
27657
27658         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
27659
27660 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27661
27662         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
27663
27664 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27665
27666         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
27667         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
27668         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
27669         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
27670         invoke multibyte primitives.
27671
27672 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27673
27674         * lib/quotearg.c:
27675         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
27676         so that mbstate_t is always defined.
27677
27678         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
27679         be 1 in at least one GCC installation, and this configuration
27680         error is likely to be common.  Ignoring MB_LEN_MAX hurts
27681         performance on hosts that have mbrtowc but have only unibyte
27682         locales, but I assume these hosts are rare.
27683
27684 2000-07-23  Paul Eggert  <eggert@twinsun.com>
27685
27686         * lib/mbswidth.c (_XOPEN_SOURCE):
27687         Don't define; this causes problems on Solaris 7.
27688         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
27689
27690 2000-07-23  Jim Meyering  <meyering@lucent.com>
27691
27692         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
27693         too: getgrgid, getpwuid, getuid.
27694
27695 2000-07-23  Jim Meyering  <meyering@lucent.com>
27696
27697         * lib/basename.c (base_name): Add an assertion.
27698
27699 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
27700
27701         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
27702         shadow its mbsinit function.
27703
27704 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
27705
27706         * lib/mbswidth.h: New file.
27707         * lib/mbswidth.c: New file.
27708         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
27709         (noinst_HEADERS): Add mbswidth.h.
27710
27711 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
27712
27713         * lib/config.charset: Add support for FreeBSD. Improve support for
27714         HP-UX and IRIX 6.
27715
27716 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
27717
27718         * m4/mbswidth.m4: New file.
27719         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
27720
27721 2000-07-15  Jim Meyering  <meyering@lucent.com>
27722
27723         * lib/makepath.c: Include quote.h.
27724         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
27725         corresponding argument in a `quote (...)' call.
27726         Give better diagnostics.
27727
27728         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
27729         (noinst_HEADERS): Add quote.h.
27730
27731         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
27732         from tar's src/misc.c.
27733         * lib/quote.h: New file.  Prototypes for same.
27734
27735 2000-07-14  Paul Eggert  <eggert@twinsun.com>
27736
27737         From a suggestion by Bruno Haible.
27738         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
27739         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
27740         to decide whether to define the BeOS workaround macro;
27741         this adjusts to the change to AC_MBSTATE_T.
27742
27743 2000-07-14  Jim Meyering  <meyering@lucent.com>
27744
27745         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
27746         jm_AC_TYPE_UINTMAX_T.
27747
27748 2000-07-13  Paul Eggert  <eggert@twinsun.com>
27749
27750         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
27751
27752         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
27753         quotearg_buffer_restyled): Add support for
27754         clocale_quoting_style.  Undo previous change to
27755         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
27756         and "{RIGHT QUOTATION MARK}" msgids.
27757
27758 2000-07-10  Paul Eggert  <eggert@twinsun.com>
27759
27760         From a suggestion by Bruno Haible.
27761         * m4/mbstate_t.m4 (AC_MBSTATE_T):
27762         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
27763         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
27764         and mbstate_t, to a single-part test that simply defines mbstate_t.
27765         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
27766         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
27767
27768 2000-07-10  Jim Meyering  <meyering@lucent.com>
27769
27770         * m4/strerror_r.m4: Mirror the correction made in autoconf.
27771
27772         * m4/gnu-source.m4: Output to confdefs.h directly.
27773         Suggestion from Akim Demaille.
27774
27775 2000-07-09  Paul Eggert  <eggert@twinsun.com>
27776
27777         The old behavior of quoting `like this' doesn't look good with
27778         newer, ISO-style fonts.  See:
27779         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
27780
27781         Instead, quote "like this" by default.  Let the translator
27782         tailor the locale-specific quoting behavior by providing
27783         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
27784
27785         * lib/quotearg.c (N_): New macro.
27786         (gettext_default): New function.
27787         (quotearg_buffer_restyled): Use
27788         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
27789         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
27790
27791 2000-07-09  Jim Meyering  <meyering@lucent.com>
27792
27793         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
27794         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
27795
27796         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
27797         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
27798
27799 2000-07-09  Jim Meyering  <meyering@lucent.com>
27800
27801         * lib/Most files: Update copyright dates to include 2000.
27802
27803 2000-07-08  Jim Meyering  <meyering@lucent.com>
27804
27805         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
27806         if not defined.
27807         (xgethostname): Remove now-unnecessary #ifdef.
27808         Move declaration of `err' into loop where it's used.
27809
27810 2000-07-05  Paul Eggert  <eggert@twinsun.com>
27811         and Bruno Haible  <haible@clisp.cons.org>
27812
27813         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
27814         only if the test for an object-type mbstate_t fails.  This
27815         prevents us from mistakenly reporting that mbstate_t is a
27816         system object type after we "#define mbstate_t int" to work
27817         around its lack.
27818
27819 2000-07-05  Paul Eggert  <eggert@twinsun.com>
27820         and Bruno Haible  <haible@clisp.cons.org>
27821
27822         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
27823
27824 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27825
27826         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
27827         to strerror_r.
27828         Include <ctype.h> for use of isalpha.
27829
27830 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27831
27832         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
27833         by allocating a larger buffer. Test the gethostname return value for
27834         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
27835         returns an error and ENAMETOOLONG isn't defined.
27836
27837 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
27838
27839         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
27840         dimension.
27841
27842 2000-07-04  Jim Meyering  <meyering@lucent.com>
27843
27844         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
27845         of the deprecated AC_CHECKING.
27846
27847 2000-07-04  Jim Meyering  <meyering@lucent.com>
27848
27849         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
27850         Reported by Bruno Haible.
27851
27852 2000-07-04  Jim Meyering  <meyering@lucent.com>
27853
27854         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
27855         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
27856         lacks mbrtowc.
27857
27858 2000-07-03  Paul Eggert  <eggert@twinsun.com>
27859
27860         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
27861         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
27862
27863 2000-07-03  Paul Eggert  <eggert@twinsun.com>
27864         and Bruno Haible  <haible@clisp.cons.org>
27865
27866         * lib/quotearg.c (mbrtowc):
27867         Assign to *pwc, and return 1 only if result is nonzero.
27868         (iswprint): Use ISPRINT when substituting our own mbrtowc.
27869
27870 2000-07-03  Jim Meyering  <meyering@lucent.com>
27871
27872         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
27873
27874 2000-07-03  Jim Meyering  <meyering@lucent.com>
27875
27876         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
27877         This is necessary to get a definition of e.g., UTMP_FILE on
27878         HP-UX 10.20.
27879         From Bob Proulx.
27880
27881 2000-07-02  Jim Meyering  <meyering@lucent.com>
27882
27883         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
27884
27885         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
27886         AC_LIBOBJ(function_name).
27887         * m4/chown.m4: Likewise.
27888         * m4/fnmatch.m4: Likewise.
27889         * m4/ftruncate.m4: Likewise.
27890         * m4/getgroups.m4: Likewise.
27891         * m4/getline.m4: Likewise.
27892         * m4/group-member.m4: Likewise.
27893         * m4/jm-macros.m4: Likewise.
27894         * m4/lstat.m4: Likewise.
27895         * m4/malloc.m4: Likewise.
27896         * m4/memcmp.m4: Likewise.
27897         * m4/nanosleep.m4: Likewise.
27898         * m4/putenv.m4: Likewise.
27899         * m4/realloc.m4: Likewise.
27900         * m4/regex.m4: Likewise.
27901         * m4/stat.m4: Likewise.
27902         * m4/strftime.m4: Likewise.
27903
27904 2000-07-02  Jim Meyering  <meyering@lucent.com>
27905
27906         * lib/quotearg.c (mbstate_t): Don't define here.
27907
27908 2000-07-02  Jim Meyering  <meyering@lucent.com>
27909
27910         * lib/nanosleep.c (SIGCONT): Define if not already defined.
27911
27912 2000-07-01  Jim Meyering  <meyering@lucent.com>
27913
27914         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
27915
27916 2000-07-01  Jim Meyering  <meyering@lucent.com>
27917
27918         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
27919         problem.
27920
27921 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
27922
27923         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
27924         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
27925
27926 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
27927
27928         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
27929         per change in ../m4/ls-mntd-fs.m4.
27930         (read_filesystem_list): Ignore symbolic links.
27931
27932 2000-06-29  Jim Meyering  <meyering@lucent.com>
27933
27934         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
27935         for declaration of strcmp.
27936
27937         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
27938
27939         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
27940         Avoid warning by casting result to `char *' to remove `const'.
27941
27942 2000-06-28  Jim Meyering  <meyering@lucent.com>
27943
27944         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
27945         included by quotearg.c, for which we perform this test.  From
27946         Bruno Haible.
27947
27948 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
27949
27950         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
27951         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
27952         <utmpx.h> exists, put readutmp.o into LIBOBJS.
27953
27954 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
27955
27956         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
27957
27958 2000-06-26  Paul Eggert  <eggert@twinsun.com>
27959
27960         savedir now sets errno on failure and invokes xmalloc to get memory.
27961         Fix a couple of other minor bugs while we're at it.
27962
27963         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
27964         (NAMLEN): Remove macro.
27965         (malloc, realloc): Remove decls.
27966         (stpcpy): Likewise.
27967         ("xalloc.h"): Include.
27968         (NAME_SIZE_DEFAULT): New macro.
27969         (savedir): Use xmalloc / xrealloc to allocate memory.
27970         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
27971         Skip "" directory entries.
27972         Use strlen to calculate directory entry length, since the old method
27973         is rarely used these days and isn't worth supporting.
27974         Don't use a pointer after freeing it.
27975         Check for integer overflow when calculating allocation size.
27976         Use memcpy to copy entries, instead of stpcpy.
27977         Set errno properly when returning NULL.
27978         Check for readdir error.
27979
27980 2000-06-26  Jim Meyering  <meyering@lucent.com>
27981
27982         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
27983
27984 2000-06-25  Jim Meyering  <meyering@lucent.com>
27985
27986         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
27987         Linux header bug when _XOPEN_SOURCE is defined to 500.
27988
27989 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
27990
27991         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
27992         deficiency.
27993
27994 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
27995
27996         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
27997         Include xalloc.h.
27998         Don't include <stdlib.h>.  Don't declare malloc, realloc.
27999
28000 2000-06-24  Jim Meyering  <meyering@lucent.com>
28001
28002         * m4/strerror_r.m4: Revive this file -- to try out an experimental
28003         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
28004         for which strerror does return char*, but which lacks a conveniently
28005         accessible declaration of the function.  If the compile-test says
28006         strerror_r doesn't work, then resort to a `run'-test that works on
28007         BeOS and segfaults on DEC Unix.
28008
28009 2000-06-24  Jim Meyering  <meyering@lucent.com>
28010
28011         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
28012
28013 2000-06-23  Paul Eggert  <eggert@twinsun.com>
28014
28015         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
28016         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
28017
28018 2000-06-23  Paul Eggert  <eggert@twinsun.com>
28019
28020         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
28021         (mbrtowc, mbstate_t): Define substitutes if
28022         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
28023         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
28024         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
28025
28026 2000-06-23  Jim Meyering  <meyering@lucent.com>
28027
28028         * m4/afs.m4: Add missing AC_MSG_RESULT.
28029         Reported by Bruno Haible.
28030
28031         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
28032         Suggestion from Bruno Haible.
28033
28034 2000-06-23  Jim Meyering  <meyering@lucent.com>
28035
28036         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
28037
28038 2000-06-21  Jim Meyering  <meyering@lucent.com>
28039
28040         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
28041
28042 2000-06-21  Jim Meyering  <meyering@lucent.com>
28043
28044         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
28045         (noinst_HEADERS): Add getstr.h.
28046
28047         * lib/getline.c (getstr): Move into a separate file.
28048         * lib/getstr.c (getstr): New file, extracted from getline.c, with
28049         the following changes: new parameter, delim2; both delim[12]
28050         parameters have type `int', not `char'.  The latter would lose
28051         with 8-bit delimiters.
28052         * lib/getstr.h: New file.
28053
28054 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28055
28056         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
28057         than 1024, return a memory chunk of least possible size, instead
28058         of size PATH_MAX + 2. In the loop, increment the size proportionally.
28059         Use free/xmalloc instead of xrealloc to avoid copying for very long
28060         paths.
28061
28062 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28063
28064         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
28065         the empty string.
28066
28067 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
28068
28069         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
28070         address, not strdup.  Include <stdlib.h> and don't declare free().
28071
28072 2000-06-19  Jim Meyering  <meyering@lucent.com>
28073
28074         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
28075
28076 2000-06-18  Jim Meyering  <meyering@lucent.com>
28077
28078         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
28079
28080         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
28081         `checking whether...' message to be consistent with that of the
28082         lstat test.
28083
28084 2000-06-18  Jim Meyering  <meyering@lucent.com>
28085
28086         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
28087         Besides, these days every porting target provides a mkdir function.
28088
28089         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
28090         needed. (this snippet comes from src/system.h).
28091
28092 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
28093
28094         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
28095
28096 2000-06-15  Paul Eggert  <eggert@twinsun.com>
28097
28098         * lib/human.c (adjust_value): New function.
28099         (human_readable_inexact): Apply rounding style even when
28100         printing approximate values.
28101
28102 2000-06-14  Paul Eggert  <eggert@twinsun.com>
28103
28104         * lib/human.c (human_readable_inexact): Allow an input block
28105         size that is not a multiple of the output block size, and vice versa.
28106         Reported by Piergiorgio Sartor.
28107
28108 2000-06-14  Paul Eggert  <eggert@twinsun.com>
28109
28110         * lib/getdate.y (get_date): Apply relative times after time
28111         zone indicator, not before.  Reported by Todd A. Jacobs.
28112
28113 2000-06-13  Jim Meyering  <meyering@lucent.com>
28114
28115         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
28116
28117         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
28118
28119 2000-06-12  Paul Eggert  <eggert@twinsun.com>
28120
28121         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
28122
28123 2000-06-12  Jim Meyering  <meyering@lucent.com>
28124
28125         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
28126         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
28127         optional argument.
28128         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
28129         the optional argument, `lib'.
28130
28131 2000-06-08  Jim Meyering  <meyering@lucent.com>
28132
28133         * m4/largefile.m4: Remove file (now that it's part of autoconf).
28134
28135 2000-06-04  Paul Eggert  <eggert@twinsun.com>
28136
28137         Rewrite largefile configuration so that we don't need to run
28138         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
28139         AC_CANONICAL_HOST in configure.in -- jmm]
28140
28141         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
28142         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
28143         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
28144         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
28145         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
28146         All uses changed.
28147         Instead of inspecting the output of getconf, try to compile the
28148         test program without and with the macro definition.
28149         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
28150         for getconf.  Instead, check for the needed flags by compiling
28151         test programs.
28152
28153 2000-06-04  Paul Eggert  <eggert@twinsun.com>
28154
28155         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
28156
28157 2000-06-04  Jim Meyering  <meyering@lucent.com>
28158
28159         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
28160         SunOS 4.1.4 for which gid_t is an unsigned type.
28161
28162 2000-06-03  Jim Meyering  <meyering@lucent.com>
28163
28164         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
28165         now that autoconf requires that.
28166
28167         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
28168         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
28169         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
28170
28171 2000-06-03  Jim Meyering  <meyering@lucent.com>
28172
28173         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
28174
28175 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
28176
28177         * m4/glibc21.m4: New file.
28178         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
28179
28180 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
28181
28182         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
28183         newer, don't install charset.alias.
28184         * lib/config.charset: Change the Linux/glibc rules so they become empty
28185         on glibc-2.1 or newer.
28186
28187 2000-06-02  Jim Meyering  <meyering@lucent.com>
28188
28189         * lib/mountlist.c: Back out last change.  Instead, do this...
28190         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
28191         me_dummy member using the same `ignore'-testing code.
28192         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
28193         fs_type strings.
28194         From Mark D. Roth.
28195
28196 2000-05-29  Jim Meyering  <meyering@lucent.com>
28197
28198         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
28199         mounts with the `ignore' attribute.  Based on a patch from
28200         Mark D. Roth.
28201
28202 2000-05-28  Jim Meyering  <meyering@lucent.com>
28203
28204         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
28205         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28206         * m4/stat.m4: Likewise.
28207         * m4/lstat.m4: Likewise.
28208         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
28209
28210         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
28211         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
28212
28213 2000-05-26  Jim Meyering  <meyering@lucent.com>
28214
28215         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
28216
28217 2000-05-24  Jim Meyering  <meyering@lucent.com>
28218
28219         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
28220         autoconf requires that.
28221         * m4/lib-check.m4: Likewise.
28222         * m4/jm-macros.m4: Likewise.
28223         * m4/strftime.m4: Likewise.
28224
28225         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
28226         AC_CHECK_DECLS, now that autoconf requires that.
28227
28228 2000-05-22  Jim Meyering  <meyering@lucent.com>
28229
28230         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28231         * m4/lstat.m4: Likewise.
28232
28233 2000-05-22  Jim Meyering  <meyering@lucent.com>
28234
28235         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
28236
28237 2000-05-20  Jim Meyering  <meyering@lucent.com>
28238
28239         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
28240         (jm_PREREQ): Use it.
28241
28242 2000-05-18  Jim Meyering  <meyering@lucent.com>
28243
28244         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
28245         back, too, since it may have been modified by allocate_entry.
28246         (hash_delete): Rewrite to use neither the assignment operator
28247         nor the comma operator in an if-expression.
28248
28249 2000-05-15  Paul Eggert  <eggert@twinsun.com>
28250
28251         * lib/closeout.c:
28252         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
28253         Remove; no longer needed.
28254         "quotearg.h": Add include.
28255         (file_name): Do not bother to explicitly initialize to NULL; it's less
28256         efficient on some hosts.
28257         (close_stdout_status): Remove test as to whether stdout was already
28258         closed; it breaks for the case "echo x | sort >&-".
28259         Quote file name colons.
28260         Do not assume that _("write error") lacks format strings.
28261
28262 2000-05-15  Jim Meyering  <meyering@lucent.com>
28263
28264         * lib/version-etc.c (version_etc_copyright): Update the copyright
28265         string used in all --version output.
28266
28267 2000-05-14  Jim Meyering  <meyering@lucent.com>
28268
28269         * lib/closeout.c (close_stdout_set_file_name): New function.
28270         (close_stdout_status): Use new file-scoped global.
28271         Return right away if fstat says the stdout file descriptor is invalid.
28272         * lib/closeout.h (close_stdout_set_file_name): Declare.
28273
28274 2000-05-10  Jim Meyering  <meyering@lucent.com>
28275
28276         * lib/closeout.c [default_exit_status]: New file-scoped variable.
28277         (close_stdout_set_status): New function.
28278         * lib/closeout.h (close_stdout_set_status): Declare.
28279
28280 2000-05-09  Jim Meyering  <meyering@lucent.com>
28281
28282         * m4/gettext.m4: Rename this...
28283         * m4/libintl.m4: ...to this.
28284
28285 2000-05-08  Jim Meyering  <meyering@lucent.com>
28286
28287         * lib/long-options.c: Don't include closeout.h.
28288         (parse_long_options): Don't call close_stdout for --version.
28289
28290 2000-05-06  Paul Eggert  <eggert@twinsun.com>
28291
28292         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
28293         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
28294         2.1.3 bug.  This avoids a clash when files like regex.c define
28295         _GNU_SOURCE.
28296
28297 2000-05-06  Jim Meyering  <meyering@lucent.com>
28298
28299         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
28300         (AC_REPLACE_FUNCS): Add strnlen.
28301
28302         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
28303         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
28304
28305         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
28306         AC_SEARCH_LIBS call for nanosleep.
28307         (LIB_NANOSLEEP): Set and AC_SUBST.
28308
28309 2000-05-06  Jim Meyering  <meyering@lucent.com>
28310
28311         * lib/strnlen.c: Undefine __strnlen and strnlen.
28312         [!weak_alias]: Define __strnlen to strnlen.
28313
28314         * lib/atexit.c: New file, from libiberty.
28315
28316 2000-05-06  Jim Meyering  <meyering@lucent.com>
28317
28318         * lib/closeout.c (close_stdout_status): Also check for errors on the
28319         stderr stream.
28320
28321 2000-05-05  Jim Meyering  <meyering@lucent.com>
28322
28323         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
28324         AC_SEARCH_LIBS call for clock_gettime.
28325         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
28326
28327         * m4/search-libs.m4: Update from autoconf.
28328
28329         su doesn't work on Solaris 2.6.
28330         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
28331         <shadow.h>.  Reported by Dragos Harabor.
28332
28333 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
28334
28335         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
28336         memcpy instead of xmalloc, xrealloc, path_concat.
28337         (locale_charset): Treat empty environment variables as absent.
28338         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
28339
28340 2000-05-04  Jim Meyering  <meyering@lucent.com>
28341
28342         * lib/getopt.c: Update from glibc.
28343         * lib/obstack.c: Likewise.
28344         * lib/obstack.h: Likewise.
28345         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
28346         file
28347
28348         * lib/regex.h: Likewise.
28349         * lib/strndup.c: Likewise.
28350         * lib/strnlen.c: New file, from glibc.
28351
28352 2000-05-03  Jim Meyering  <meyering@lucent.com>
28353
28354         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
28355
28356 2000-05-02  Paul Eggert  <eggert@twinsun.com>
28357
28358         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
28359         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
28360         compile-time test, rather than inspecting host and OS, to
28361         decide whether to define _LARGEFILE_SOURCE.
28362
28363 2000-05-01  Jim Meyering  <meyering@lucent.com>
28364
28365         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
28366
28367         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
28368         Based on a patch from Bruno Haible.
28369
28370 2000-05-01  Jim Meyering  <meyering@lucent.com>
28371
28372         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
28373
28374 2000-04-29  Jim Meyering  <meyering@lucent.com>
28375
28376         * lib/path-concat.c: Declare strdup only if it's not defined.
28377         * lib/canon-host.c: Likewise.
28378
28379 2000-04-28  Jim Meyering  <meyering@lucent.com>
28380
28381         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
28382         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
28383         is included first, then limits.h is included by locale.h by libintl.h.
28384         From John David Anglin.
28385
28386 2000-04-25  Jim Meyering  <meyering@lucent.com>
28387
28388         * lib/makepath.c (S_IRWXUGO): Define.
28389         (make_path): Always perform explicit chmod if MODE specifies any
28390         of the `special' permission bits.  Prompted by a bug report against
28391         install from Mate Wierdl and Joost van Baal.
28392
28393 2000-04-18  Jim Meyering  <meyering@lucent.com>
28394
28395         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
28396         (jm_PREREQ): Use it.
28397
28398 2000-04-18  Jim Meyering  <meyering@lucent.com>
28399
28400         * lib/README: New file.
28401
28402         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
28403         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
28404
28405 2000-04-17  Jim Meyering  <meyering@lucent.com>
28406
28407         Get it right :-)
28408         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
28409         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
28410         Suggestion from Akim Demaille.
28411
28412 2000-04-17  Jim Meyering  <meyering@lucent.com>
28413
28414         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
28415         the definition of it to rpl_strftime also defined-away the system's
28416         declaration.
28417
28418 2000-04-15  Jim Meyering  <meyering@lucent.com>
28419
28420         Use `C' to denote so-called `contiguous' files, the same way
28421         that tar does.
28422         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
28423         (ftypelet): Use S_ISCTG.
28424         From Michael Deutschmann.
28425
28426 2000-04-14  Jim Meyering  <meyering@lucent.com>
28427
28428         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
28429         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
28430         clobbered.
28431
28432 2000-04-14  Jim Meyering  <meyering@lucent.com>
28433
28434         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
28435
28436 2000-04-13  Jim Meyering  <meyering@lucent.com>
28437
28438         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
28439         AH_VERBATIM to insert required #ifndef into config.h.in.
28440         Suggestion from Akim Demaille.
28441
28442 2000-04-12  Jim Meyering  <meyering@lucent.com>
28443
28444         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
28445         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
28446         Christian Krackowizer.
28447
28448         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
28449         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
28450         (AC_SYS_LARGEFILE): Require.
28451         (AM_C_PROTOTYPES): Require.
28452
28453 2000-04-08  Jim Meyering  <meyering@lucent.com>
28454
28455         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
28456         names don't conflict.  Reported by Eli Zaretskii.
28457
28458 2000-04-07  Jim Meyering  <meyering@lucent.com>
28459
28460         * lib/putenv.c: Move inclusion of errno.h so it follows that of
28461         sys/types.h, to work around system header problems on AIX 3.2.5.
28462         From Bruno Haible.
28463
28464 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
28465
28466         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
28467         bug.  Deal with the different error behavior of Irix iconv.
28468
28469 2000-04-05  Paul Eggert  <eggert@twinsun.com>
28470
28471         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
28472         IRIX if the installer said otherwise.
28473
28474 2000-04-05  Jim Meyering  <meyering@lucent.com>
28475
28476         Portability tweaks required for ultrix4.3.
28477         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
28478         (jm_CHECK_DECLS): Add getutent to the list of functions.
28479         (_jm_DECL_HEADERS): Add utmpx.h.
28480         From John David Anglin.
28481
28482         * m4/strftime.m4: Back out the 2000-04-02 change.
28483         Instead of that change, simply undefine putenv in the test program.
28484
28485 2000-04-05  Jim Meyering  <meyering@lucent.com>
28486
28487         Portability tweaks required for ultrix4.3.
28488         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
28489         getutent.
28490         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
28491         * lib/canon-host.c: Declare strdup.
28492         * lib/path-concat.c: Likewise.
28493         From John David Anglin.
28494
28495 2000-04-04  Jim Meyering  <meyering@lucent.com>
28496
28497         Be more DOS 8.3-friendly.
28498         * lib/ref-add.sin: Renamed from ref-add.sed.in.
28499         * lib/ref-del.sin: Renamed from ref-del.sed.in.
28500         * lib/Makefile.am: Reflect renaming.
28501         Reported by Eli Zaretskii.
28502
28503         Use a temporary file name that won't clash with `charset.alias'
28504         in the DOS 8.3 name space.
28505         * lib/Makefile.am (charset_tmp): Define.
28506         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
28507         (uninstall-local): Likewise.
28508         Reported by Eli Zaretskii.
28509
28510 2000-04-03  Jim Meyering  <meyering@lucent.com>
28511
28512         * m4/gettext.m4: Fix typo in comment.
28513
28514         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
28515         textutils/configure.in).  Suggestion from Paul Eggert.
28516         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
28517
28518 2000-04-02  Paul Eggert  <eggert@twinsun.com>
28519
28520         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
28521         variable in the shell rather than using putenv, which isn't
28522         portable.  This avoids the configure-time inter-test dependency
28523         on the potentially-renamed putenv function.
28524
28525 2000-03-30  Paul Eggert  <eggert@twinsun.com>
28526
28527         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
28528         before checking struct stat.st_blksize, so that
28529         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
28530
28531 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28532
28533         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
28534         since strftime.c uses HAVE_STRFTIME to decide whether to use
28535         the underlying strftime.
28536
28537 2000-03-29  Paul Eggert  <eggert@twinsun.com>
28538
28539         * lib/time/strftime.c (my_strftime): Make sure we call the system
28540         strftime, not ourselves, when invoking the underlying strftime.
28541
28542 2000-03-24  Jim Meyering  <meyering@lucent.com>
28543
28544         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
28545         (charset_alias): Define.
28546         (install-exec-local): Factor out common code.
28547         (uninstall-local): Split lines longer than 80.
28548         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
28549         (SUFFIXES): Define.
28550         (.sed.in.sed): New rule.  Don't redirect directly to $@.
28551         (CLEANFILES): Add ref-add.sed and ref-del.sed.
28552
28553 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
28554
28555         * lib/config.charset: Output a line containing "Packages using this
28556         file".
28557         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
28558         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
28559         ref-del.sed): New rules.
28560
28561 2000-03-17  Jim Meyering  <meyering@lucent.com>
28562
28563         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
28564         Otherwise, include <strings.h>
28565
28566 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
28567
28568         * lib/unicodeio.c (utf8_wctomb): New function.
28569         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
28570         format instead of in UCS-4 with platform dependent endianness.
28571
28572 2000-03-10  Jim Meyering  <meyering@lucent.com>
28573
28574         * m4/lib-check.m4: Look for getspnam in -lgen, too.
28575         From Marco Franzen.
28576
28577 2000-03-07  Paul Eggert  <eggert@twinsun.com>
28578
28579         * lib/savedir.c (savedir): Work even if directory size is
28580         negative; this can happen with some screwy NFS configurations.
28581
28582 2000-03-06  Jim Meyering  <meyering@lucent.com>
28583
28584         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
28585         if it's NULL (because we ran out of memory).  From Bruno Haible.
28586
28587 2000-03-05  Jim Meyering  <meyering@lucent.com>
28588
28589         * lib/localcharset.c ("path-concat.h"): Include.
28590         (get_charset_aliases): Use path_concat instead of ANSI string
28591         concatenation.
28592
28593         * lib/unicodeio.h (PARAMS): Define.
28594         Use it to guard prototype.
28595
28596 2000-03-04  Jim Meyering  <meyering@lucent.com>
28597
28598         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
28599         for lib/localcharset.c.
28600
28601 2000-03-04  Jim Meyering  <meyering@lucent.com>
28602
28603         * lib/Makefile.am (install-exec-local): Create $(libdir) before
28604         installing into it.
28605         (uninstall-local): Uncomment this rule so `make distcheck' works
28606         once again.
28607
28608         * lib/unicodeio.c (<errno.h>): Include it.
28609         (errno): Declare if not defined.
28610
28611         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
28612
28613         * lib/config.charset: New version, incorporating remarks from a linux
28614         i18n mailing list.  From Bruno Haible.
28615
28616 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
28617
28618         * m4/codeset.m4: New file.
28619         * m4/iconv.m4: New file.
28620         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
28621
28622 2000-03-03  Jim Meyering  <meyering@lucent.com>
28623
28624         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
28625
28626 2000-03-02  Jim Meyering  <meyering@lucent.com>
28627
28628         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
28629         the messages come out on separate lines.
28630
28631         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
28632         rather than jm_CHECK_DECLARATIONS.
28633         * m4/decl.m4: Remove now-unused file.
28634
28635         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
28636         geteuid.
28637
28638 2000-03-02  Jim Meyering  <meyering@lucent.com>
28639
28640         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
28641
28642 2000-03-01  Jim Meyering  <meyering@lucent.com>
28643
28644         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
28645         * lib/unicodeio.c: Likewise.
28646
28647 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
28648
28649         * lib/config.charset: New file.
28650         * lib/localcharset.c: New file.
28651         * lib/unicodeio.h, lib/unicodeio.c: New files.
28652         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
28653         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
28654         (noinst_HEADERS): Add unicodeio.h.
28655         (all-local, install-exec-local, charset.alias): New targets.
28656
28657 2000-02-28  Paul Eggert  <eggert@twinsun.com>
28658
28659         * lib/quotearg.c (ALERT_CHAR): New macro.
28660         (quotearg_buffer_restyled): Use it.
28661
28662 2000-02-27  Jim Meyering  <meyering@lucent.com>
28663
28664         * m4/check-decl.m4: Add getenv to the list.
28665
28666 2000-02-27  Jim Meyering  <meyering@lucent.com>
28667
28668         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
28669         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
28670
28671         * lib/backupfile.c: Guard inclusion of stdlib.h with
28672         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
28673         Declare malloc if needed.
28674
28675         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
28676         `#ifndef HAVE_DECL..'
28677         now that autoconf always defines the HAVE_DECL_ symbols.
28678         * lib/human.c: Likewise.
28679         * lib/same.c: Likewise.
28680         * lib/strtoumax.c: Likewise.
28681
28682         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
28683         declaration check was not run.
28684         * lib/hash.c: Likewise.
28685         * lib/human.c: Likewise.
28686         * lib/same.c: Likewise.
28687         * lib/strtoumax.c: Likewise.
28688
28689         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
28690         `.', then first look up the entire `.'-containing string as a login
28691         name.
28692
28693 2000-02-23  Jim Meyering  <meyering@lucent.com>
28694
28695         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
28696         in place of my hack.
28697
28698 2000-02-18  Paul Eggert  <eggert@twinsun.com>
28699
28700         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
28701         (textint): New typedef.
28702         (parser_control): Member year changed from int to textint.
28703         All uses changed.
28704         (YYSTYPE): Removed; replaced by %union with int and textint members.
28705         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
28706         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
28707         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
28708         (tSNUMBER, tUNUMBER): Now of type <textintval>.
28709         (date, number, to_year): Use width of number in digits, not its value,
28710         to determine whether it's a 2-digit year, or a 2-digit time.
28711         (yylex): Store number of digits of numeric tokens.
28712         Reported by John Kendall.
28713
28714         (parser_control): Changed from struct parser_control to typedef (for
28715         consistency).  All uses changed.
28716
28717         (tID): Removed; not used.
28718         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
28719
28720 2000-02-14  Paul Eggert  <eggert@twinsun.com>
28721
28722         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
28723         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
28724
28725 2000-02-12  Jim Meyering  <meyering@lucent.com>
28726
28727         * lib/userspec.c (ISDIGIT): Define it.
28728         (isdigit): Remove definition.
28729         (is_number): Use ISDIGIT, not isdigit.
28730         <libintl.h>: Include.
28731         (_ and N_): Define.
28732         (parse_user_spec): Mark translatable strings.
28733
28734 2000-02-10  Jim Meyering  <meyering@lucent.com>
28735
28736         With these changes, nanosleep.[ch] are finally enough like the other
28737         lib/* replacement files to compile on a few more losing systems.
28738
28739         * lib/nanosleep.h: Don't include config.h.
28740         Remove prototype from declaration of nanosleep.
28741         (PARAMS): Remove now-unneeded definition.
28742         * lib/nanosleep.c: #undef nanosleep.
28743         (rpl_nanosleep): Rename from nanosleep.
28744
28745 2000-02-10  Jim Meyering  <meyering@lucent.com>
28746
28747         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
28748         gnu_nanosleep to rpl_nanosleep.
28749
28750 2000-02-09  Jim Meyering  <meyering@lucent.com>
28751
28752         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
28753         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
28754
28755 2000-02-08  Akim Demaille  <akim@epita.fr>
28756
28757         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
28758         `[' and `]' and remove uses of `changequote'.
28759         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
28760         (AC_SYS_LARGEFILE): Likewise.
28761         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
28762         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
28763         of changequote.
28764         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
28765         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
28766         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
28767         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
28768
28769 2000-02-05  Jim Meyering  <meyering@lucent.com>
28770
28771         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
28772         Remove explicit use of AC_HEADER_TIME.  It is required by
28773         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
28774         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
28775         in autoconf whereby the expansion of the latter ended up preceding
28776         the expansion of its prerequisite, AC_HEADER_TIME.
28777         Reported by Volker Borchert.
28778
28779 2000-02-03  Jim Meyering  <meyering@lucent.com>
28780
28781         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
28782
28783 2000-02-03  Jim Meyering  <meyering@lucent.com>
28784
28785         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
28786         rather than with `#if HAVE_UTMPNAME'.
28787
28788 2000-02-02  Jim Meyering  <meyering@lucent.com>
28789
28790         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
28791         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
28792         Reported by Eli Zaretskii.
28793
28794 2000-02-01  Jim Meyering  <meyering@lucent.com>
28795
28796         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
28797
28798 2000-01-31  Jim Meyering  <meyering@lucent.com>
28799
28800         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
28801         functions.  Add the time.h and sys/time.h headers along with the
28802         AC_REQUIRE'ment of AC_HEADER_TIME.
28803
28804 2000-01-31  Jim Meyering  <meyering@lucent.com>
28805
28806         * lib/nanosleep.h (nanosleep): Guard declaration with
28807         `#if ! HAVE_DECL_NANOSLEEP'.
28808         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
28809         the declaration in that vendor's sys/timers.h.
28810         Reported by Christian Krackowizer.
28811
28812         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
28813         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
28814         (ISPRINT): Likewise.
28815         Reported by Tom Tromey.
28816
28817 2000-01-30  Jim Meyering  <meyering@lucent.com>
28818
28819         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
28820
28821         * m4/prereq.m4 (utmp_includes): Define.
28822         Check for ut_user and ut_name members in both struct utmpx
28823         and struct utmp.
28824
28825 2000-01-30  Jim Meyering  <meyering@lucent.com>
28826
28827         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
28828         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
28829         header files where only utmpx.ut_user is declared.
28830
28831         * lib/readutmp.h (UT_USER): Define.
28832
28833 2000-01-29  Jim Meyering  <meyering@lucent.com>
28834
28835         * m4/lib-check.m4: New file containing library-related checks from
28836         fileutils and sh-utils (textutils had none).
28837
28838 2000-01-28  Jim Meyering  <meyering@lucent.com>
28839
28840         * m4/perl.m4: Change format of warning message to look more like that
28841         from the missing script.  Suggestion from François Pinard.
28842
28843 2000-01-25  Jim Meyering  <meyering@lucent.com>
28844
28845         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
28846         well as time.h in the compile check.
28847         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
28848         Fix typo in cross-compiling case: s/yes/no/.
28849
28850 2000-01-23  Jim Meyering  <meyering@lucent.com>
28851
28852         * m4/jm-macros.m4: Move df-related tests here from
28853         fileutils/configure.in
28854
28855         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
28856         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
28857
28858         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
28859         s/space/ac_fsusage_space/.
28860         (jm_FILE_SYSTEM_USAGE): Take two parameters.
28861
28862         * m4/ftruncate.m4: New file (derived from part of
28863         fileutils/configure.in).
28864         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
28865         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
28866
28867         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
28868         AC_SUBST these here, rather than just in sh-util/configure.in, so
28869         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
28870         all the same.
28871         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
28872         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
28873         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
28874         (AC_SUBST(POW_LIBM)): Likewise.
28875         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
28876
28877 2000-01-23  Jim Meyering  <meyering@lucent.com>
28878
28879         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
28880         obstack.c.
28881
28882 2000-01-22  Jim Meyering  <meyering@lucent.com>
28883
28884         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
28885
28886         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
28887
28888         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
28889         configure.in
28890         (AC_CHECK_HEADERS): Likewise for sh-utils.
28891         (AC_CHECK_HEADERS): Likewise for textutils.
28892         Merge the three lists of headers.
28893
28894         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
28895         from fileutils' configure.in.
28896
28897         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
28898         code. Moved tests into their own function (_jm_DECL_HEADERS) in
28899         check-decl.m4.
28900
28901         * m4/check-decl.m4: Use #if rather than #ifdef.
28902         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
28903         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
28904         (_jm_DECL_HEADERS): Define new function.
28905         (jm_CHECK_DECLARATIONS): Require it.
28906
28907 2000-01-22  Jim Meyering  <meyering@lucent.com>
28908
28909         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
28910         [! HAVE_DECL_STRTOULL]: Declare strtoull.
28911         Required for some AIX systems.  Reported by Christian Krackowizer.
28912         [TESTING] (main): New function.
28913
28914         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
28915         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
28916         letters.
28917
28918         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
28919         iswprint.
28920
28921         * lib/strverscmp.c (ISDIGIT): Define.
28922         (strverscmp): Use ISDIGIT, not isdigit.
28923
28924 2000-01-19  Jim Meyering  <meyering@lucent.com>
28925
28926         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
28927         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
28928         defines `struct timespec' in <sys/time.h>
28929
28930         * m4/c-bs-a.m4: Remove uses of changequote altogether.
28931         Thanks to Akim for explaining.
28932
28933 2000-01-17  Paul Eggert  <eggert@twinsun.com>
28934
28935         * lib/nanosleep.c (nanosleep):
28936         Don't use SA_INTERRUPT to decide whether to call sigaction, as
28937         POSIX.1 doesn't require SA_INTERRUPT and some systems
28938         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
28939         it's been part of POSIX.1 since day 1 (in 1988).
28940
28941 2000-01-17  Jim Meyering  <meyering@lucent.com>
28942
28943         * lib/interlock: Remove unused file.  Reported by François Pinard.
28944
28945 2000-01-16  Paul Eggert  <eggert@twinsun.com>
28946
28947         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
28948         alert, backslash, formfeed, and vertical tab unnecessarily in
28949         shell quoting style.
28950
28951 2000-01-16  Jim Meyering  <meyering@lucent.com>
28952
28953         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
28954         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
28955         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
28956         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
28957
28958 2000-01-16  Jim Meyering  <meyering@lucent.com>
28959
28960         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
28961         because the latter didn't work.
28962
28963 2000-01-15  Jim Meyering  <meyering@lucent.com>
28964
28965         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
28966         (AC_REPLACE_FUNCS): Add memcpy and memset.
28967         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
28968         Add strpbrk.
28969         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
28970
28971 2000-01-12  Jim Meyering  <meyering@lucent.com>
28972
28973         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
28974         (jm_PREREQ): Use it.
28975         (jm_PREREQ_READUTMP): New macro.
28976         (jm_PREREQ): Use it.
28977
28978 2000-01-11  Paul Eggert  <eggert@twinsun.com>
28979
28980         Quote multibyte characters correctly.
28981         * m4/c-bs-a.m4: New file.
28982         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
28983         (jm_PREREQ): Use it.
28984
28985 2000-01-11  Paul Eggert  <eggert@twinsun.com>
28986
28987         * m4/uintmax_t.m4: Port to autoconf 2.13.
28988
28989 2000-01-08  Jim Meyering  <meyering@ascend.com>
28990
28991         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
28992         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
28993
28994 2000-01-04  Jim Meyering  <meyering@ascend.com>
28995
28996         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
28997         jm_STRUCT_DIRENT_D_TYPE.
28998         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
28999         jm_STRUCT_DIRENT_D_INO.
29000         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
29001         jm_STRUCT_UTIMBUF.
29002         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
29003         renamings.
29004         * m4/utime.m4: Likewise.
29005
29006         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
29007         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
29008
29009 2000-01-03  Paul Eggert  <eggert@twinsun.com>
29010
29011         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
29012         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
29013
29014 2000-01-02  Jim Meyering  <meyering@ascend.com>
29015
29016         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
29017         remember if this is necessary.
29018
29019 1999-12-26  Jim Meyering  <meyering@ascend.com>
29020
29021         * m4/jm-macros.m4: Use it here.
29022         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
29023
29024 1999-12-23  Jim Meyering  <meyering@ascend.com>
29025
29026         * m4/jm-macros.m4: Check for clock_gettime (moved from
29027         fileutils/configure.in)
29028         Check for gettimeofday.
29029
29030 1999-12-20  Jim Meyering  <meyering@ascend.com>
29031
29032         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
29033         autoconf-2.14a-1999-12-20.
29034
29035 1999-12-19  Jim Meyering  <meyering@ascend.com>
29036
29037         * m4/lstat-slash.m4: New file.
29038         * m4/jm-macros.m4: Use the new macro:
29039         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
29040
29041 1999-12-07  Jim Meyering  <meyering@ascend.com>
29042
29043         * m4/perl.m4: Require that File::Compare be available, too.
29044         Too many systems seem to lack it.
29045
29046         * m4/strftime.m4: Add checks for most of the cpp macros tested in
29047         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
29048
29049 1999-11-18  Paul Eggert  <eggert@twinsun.com>
29050
29051         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
29052         problem with the QNX 4.25 shell, which doesn't propagate exit
29053         status of failed commands inside shell assignments.
29054
29055 1999-11-17  Jim Meyering  <meyering@ascend.com>
29056
29057         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
29058
29059 1999-11-07  Jim Meyering  <meyering@ascend.com>
29060
29061         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
29062
29063 1999-11-06  Jim Meyering  <meyering@ascend.com>
29064
29065         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
29066         * m4/jm-macros.m4 (jm_MACROS): Use it here.
29067
29068 1999-11-05  Jim Meyering  <meyering@ascend.com>
29069
29070         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
29071         configure.in of textutils, fileutils, and sh-utils into this one
29072         (shared between those packages) file.
29073         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
29074         AC_STRUCT_ST_BLKSIZE.
29075
29076 1999-11-03  Jim Meyering  <meyering@ascend.com>
29077
29078         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
29079         of AC_CHECK_TYPE checks includes unistd.h.
29080         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
29081         Suggestion from Akim Demaille.
29082
29083 1999-10-30  Jim Meyering  <meyering@ascend.com>
29084
29085         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
29086         m4-quoted string.
29087         * m4/ls-mntd-fs.m4: Likewise.
29088         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
29089         * m4/jm-winsz1.m4: Likewise.
29090
29091         * m4/const.m4: Remove file, since the fix made it into the experimental
29092         version of autoconf.
29093         * m4/mktime.m4: Likewise.
29094
29095         * m4/check-type.m4: Remove file, now that the latest version of
29096         AC_CHECK_TYPE takes a third arg to specify additional #includes.
29097
29098         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
29099         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
29100         AC_CHECK_TYPE.
29101
29102 1999-10-04  Jim Meyering  <meyering@ascend.com>
29103
29104         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
29105
29106 1999-09-22  Paul Eggert  <eggert@twinsun.com>
29107
29108         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
29109         2.95.1 bug with HP-UX 10.20.
29110
29111 1999-09-17  Jim Meyering  <meyering@ascend.com>
29112
29113         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
29114         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
29115         due to missing strdup (against sh-utils-2.0).
29116
29117 1999-08-29  Jim Meyering  <meyering@ascend.com>
29118
29119         * m4/jm-macros.m4: Require jm_BISON.
29120         * m4/bison.m4: New file.
29121
29122 1999-08-17  Paul Eggert  <eggert@twinsun.com>
29123
29124         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
29125         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
29126
29127 1999-08-05  Jim Meyering  <meyering@ascend.com>
29128
29129         * m4/getline.m4: Rename test file from conftestdata to conftest.data
29130         to avoid conflicts with `conftest' on 8+3 filesystems.
29131         Suggestion from Eli Zaretskii.
29132
29133 1999-08-04  Jim Meyering  <meyering@ascend.com>
29134
29135         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
29136         fileutils and sh-utils (textutils's getline test was inadequate).
29137         (AM_FUNC_GETLINE): Run this test.
29138         (AC_CHECK_FUNCS): Check for getdelim.
29139         Reported by Bob Proulx.
29140
29141 1999-08-02  Jim Meyering  <meyering@ascend.com>
29142
29143         * m4/jm-macros.m4: Add a comment.
29144
29145 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29146
29147         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
29148         <inttypes.h> defines strtoumax as a macro (and not as a
29149         function).
29150
29151 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29152
29153         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
29154         that we can shift, multiply and divide unsigned long long
29155         values; Ultrix cc can't do it.
29156
29157 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29158
29159         * m4/mktime.m4: New file, which is a preview of what should appear
29160         in the next public autoconf release.
29161
29162 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29163
29164         * m4/lfs.m4: Remove this file.
29165         * m4/largefile.m4: New file.  It contains the old contents of
29166         lfs.m4, except that all names with prefix AC_LFS have been
29167         changed to use the prefix AC_SYS_LARGEFILE instead, to be
29168         compatible with future autoconf versions.  Also, some minor m4
29169         quoting problems have been fixed.
29170
29171 1999-08-01  Paul Eggert  <eggert@twinsun.com>
29172
29173         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
29174         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
29175         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
29176         and simplify the shell code.
29177
29178 1999-08-01  Jim Meyering  <meyering@ascend.com>
29179
29180         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
29181         m4.
29182
29183 1999-07-20  Jim Meyering  <meyering@ascend.com>
29184
29185         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
29186
29187 1999-07-15  Jim Meyering  <meyering@ascend.com>
29188
29189         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
29190
29191 1999-05-22  Jim Meyering  <meyering@ascend.com>
29192
29193         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
29194
29195 1999-05-20  Jim Meyering  <meyering@ascend.com>
29196
29197         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
29198         Add a colon after each `then' in case $4 is empty.
29199
29200 1999-05-16  Jim Meyering  <meyering@ascend.com>
29201
29202         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
29203
29204 1999-05-10  Jim Meyering  <meyering@ascend.com>
29205
29206         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
29207
29208         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
29209         AC_FUNC_MKTIME.
29210
29211 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
29212
29213         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
29214
29215 1999-05-04  Paul Eggert  <eggert@twinsun.com>
29216
29217         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
29218         not CPPFLAGS, so that linking works correctly in IRIX.
29219
29220 1999-04-30  Paul Eggert  <eggert@twinsun.com>
29221
29222         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
29223
29224 1999-04-20  Paul Eggert  <eggert@twinsun.com>
29225
29226         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
29227         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
29228         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
29229         jm_AC_TYPE_UNSIGNED_LONG_LONG.
29230         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
29231
29232         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
29233
29234 1999-04-20  Jim Meyering  <meyering@ascend.com>
29235
29236         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
29237         AC_REPLACE xstroull if necessary.  From Paul Eggert.
29238         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
29239
29240 1999-04-18  Jim Meyering  <meyering@ascend.com>
29241
29242         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
29243         * m4/jm-macros.m4: Use it.
29244
29245 1999-04-06  Jim Meyering  <meyering@ascend.com>
29246
29247         * m4/strftime.m4: Remove test for %f.
29248
29249 1999-03-29  Jim Meyering  <meyering@ascend.com>
29250
29251         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
29252         superset of the AC_TYPE_* checks in the textutils, fileutils,
29253         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
29254         AC_TYPE_PID_T.
29255
29256 1999-03-28  Jim Meyering  <meyering@ascend.com>
29257
29258         * m4/jm-macros.m4: Define GNU_PACKAGE here.
29259         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
29260         replaced e.g., in the *.sh files of the sh-utils.
29261
29262 1999-03-20  Jim Meyering  <meyering@ascend.com>
29263
29264         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
29265         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
29266         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
29267
29268 1999-03-19  Jim Meyering  <meyering@ascend.com>
29269
29270         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
29271
29272 1999-03-12  Jim Meyering  <meyering@ascend.com>
29273
29274         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
29275
29276 1999-03-07  Jim Meyering  <meyering@ascend.com>
29277
29278         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
29279         declared.
29280
29281 1999-02-17  Jim Meyering  <meyering@ascend.com>
29282
29283         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
29284         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
29285
29286 1999-02-07  Jim Meyering  <meyering@ascend.com>
29287
29288         * m4/group-member.m4: New file -- extracted from sh-utils'
29289         configure.in.
29290
29291         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
29292         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
29293
29294 1999-02-06  Jim Meyering  <meyering@ascend.com>
29295
29296         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
29297         * m4/fnmatch.m4: Likewise.
29298         * m4/getgroups.m4: Likewise.
29299         * m4/lstat.m4: Likewise.
29300         * m4/malloc.m4: Likewise.
29301         * m4/putenv.m4: Likewise.
29302         * m4/realloc.m4: Likewise.
29303         * m4/regex.m4: Likewise.
29304         * m4/stat.m4: Likewise.
29305         * m4/strftime.m4: Likewise.
29306         Suggestion from Alain Magloire.
29307
29308         * m4/chown.m4: Use `.$ac_objext', not `.o'.
29309         * m4/fnmatch.m4: Likewise.
29310         * m4/getgroups.m4: Likewise.
29311         * m4/getline.m4: Likewise.
29312         * m4/lstat.m4: Likewise.
29313         * m4/malloc.m4: Likewise.
29314         * m4/memcmp.m4: Likewise.
29315         * m4/putenv.m4: Likewise.
29316         * m4/realloc.m4: Likewise.
29317         * m4/regex.m4: Likewise.
29318         * m4/stat.m4: Likewise.
29319         * m4/strftime.m4: Likewise.
29320         Suggestion from Alain Magloire.
29321
29322         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
29323         an argument.
29324
29325         * m4/regex.m4: Add a run-time Test for proper operation of
29326         re_compile_pattern.
29327
29328 1999-01-31  Jim Meyering  <meyering@ascend.com>
29329
29330         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
29331
29332 1999-01-30  Jim Meyering  <meyering@ascend.com>
29333
29334         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
29335
29336         * m4/jm-mktime.m4: Make this a wrapper around the official
29337         AM_FUNC_MKTIME rather than my private copy, now that the official one
29338         is up to date.
29339         * m4/mktime.m4: Remove file.
29340
29341         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
29342         * m4/uptime.m4: Likewise.
29343         * m4/uintmax_t.m4: Likewise.
29344
29345 1999-01-28  Jim Meyering  <meyering@ascend.com>
29346
29347         * m4/jm-macros.m4: Use jm_AFS.
29348         * m4/afs.m4: New file (from fileutils' configure.in).
29349
29350         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
29351         * m4/chown.m4: Likewise.
29352         * m4/d-ino.m4: Likewise.
29353         * m4/d-type.m4: Likewise.
29354         * m4/fnmatch.m4: Likewise.
29355         * m4/getgroups.m4: Likewise.
29356         * m4/gettext.m4: Likewise.
29357         * m4/jm-mktime.m4: Likewise.
29358         * m4/jm-winsz2.m4: Likewise.
29359         * m4/lcmessage.m4: Likewise.
29360         * m4/ls-mntd-fs.m4: Likewise.
29361         * m4/malloc.m4: Likewise.
29362         * m4/memcmp.m4: Likewise.
29363         * m4/putenv.m4: Likewise.
29364         * m4/realloc.m4: Likewise.
29365         * m4/st_mtim.m4: Likewise.
29366         * m4/strftime.m4: Likewise.
29367
29368 1999-01-16  Jim Meyering  <meyering@ascend.com>
29369
29370         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
29371         (ARGMATCH_DIE_DECL): Define.
29372
29373 1999-01-12  Jim Meyering  <meyering@ascend.com>
29374
29375         * m4/Makefile.am.in: Rewrite to avoid using fmt.
29376         Reported by Lars Hecking.
29377
29378 1999-01-10  Jim Meyering  <meyering@ascend.com>
29379
29380         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
29381         gross kludge.
29382         * m4/inttypes_h.m4: Likewise.
29383         * m4/lstat.m4: Likewise.
29384         * m4/malloc.m4: Likewise.
29385         * m4/readdir.m4: Likewise.
29386         * m4/realloc.m4: Likewise.
29387         * m4/st_dm_mode.m4: Likewise.
29388         * m4/stat.m4: Likewise.
29389         * m4/utimbuf.m4: Likewise.
29390         * m4/utimes.m4: Likewise.
29391
29392         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
29393         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
29394         comments in config.h.in are meaningful.
29395
29396         * m4/jm-macros.m4: Require autoconf-2.13 here.
29397
29398         * m4/regex.m4: By default, don't use the included regex.c on systems
29399         with glibc 2.  Suggestion from Uli Drepper.
29400
29401 1999-01-02  Jim Meyering  <meyering@ascend.com>
29402
29403         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
29404
29405 1998-12-18  Jim Meyering  <meyering@ascend.com>
29406
29407         * m4/Makefile.am.in (Makefile.am): Simplify rule.
29408         Based on a suggestion from Lars Hecking.
29409
29410 1998-11-16  Paul Eggert  <eggert@twinsun.com>
29411
29412         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
29413
29414 1998-11-16  Jim Meyering  <meyering@ascend.com>
29415
29416         * m4/lfs.m4: Double-quote the `uname...` expression.
29417
29418 1998-11-14  Jim Meyering  <meyering@ascend.com>
29419
29420         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
29421         * m4/stat.m4: Likewise.
29422
29423 1998-11-03  Jim Meyering  <meyering@ascend.com>
29424
29425         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
29426         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
29427
29428 1998-10-18  Jim Meyering  <meyering@ascend.com>
29429
29430         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
29431
29432 1998-10-17  Jim Meyering  <meyering@ascend.com>
29433
29434         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
29435         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
29436         calls for those previously hard-coded headers.  Instead, take a new
29437         parameter.
29438         (jm_CHECK_DECLARATIONS): Reflect interface change.
29439         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
29440         (jm_CHECK_DECL_LOCALTIME_R): New macro.
29441
29442         * m4/mktime.m4: Test for spring-forward gap before long-running test.
29443
29444 1998-10-14  Jim Meyering  <meyering@ascend.com>
29445
29446         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
29447         instead of "TZ=America/Vancouver".  From Paul Eggert.
29448
29449 1998-10-11  Jim Meyering  <meyering@ascend.com>
29450
29451         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
29452         This adds a test for a recently added compatibility fix for mktime.c.
29453         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
29454
29455 1998-09-27  Jim Meyering  <meyering@ascend.com>
29456
29457         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
29458
29459         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
29460         ../configure.in, including a change from Gordon Matzigkeit to allow
29461         cross-compiling for the Hurd.
29462
29463         * m4/glibc.m4: New file/macro to test for the GNU C Library
29464         versions 1 and 2.  From Gordon Matzigkeit.
29465         Indent.
29466
29467 1998-09-21  Jim Meyering  <meyering@ascend.com>
29468
29469         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
29470
29471 1998-08-18  Paul Eggert  <eggert@twinsun.com>
29472
29473         Port nanosecond-resolution times to UnixWare 2.1.2 and
29474         pedantic Solaris 2.6.
29475
29476         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
29477         AC_STRUCT_ST_MTIM.
29478         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
29479         Generate name of ns member, instead of just 1 or undef.
29480         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
29481
29482 1998-08-15  Jim Meyering  <meyering@ascend.com>
29483
29484         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
29485         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
29486         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
29487         instead of jm_TYPE_SSIZE_T.
29488
29489 1998-08-12  Jim Meyering  <meyering@ascend.com>
29490
29491         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
29492
29493 1998-08-02  Jim Meyering  <meyering@ascend.com>
29494
29495         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
29496         in acconfig.h manually.
29497
29498 1998-07-31  Paul Eggert  <eggert@twinsun.com>
29499
29500         * m4/st_mtim.m4: New file.
29501
29502 1998-07-28  Jim Meyering  <meyering@ascend.com>
29503
29504         * m4/utimes.m4: Undef stat.
29505
29506 1998-07-25  Jim Meyering  <meyering@ascend.com>
29507
29508         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
29509         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
29510
29511 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
29512
29513         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
29514         uid and gid actually remain unchanged.
29515
29516 1998-07-07  Jim Meyering  <meyering@ascend.com>
29517
29518         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
29519
29520 1998-07-04  Jim Meyering  <meyering@ascend.com>
29521
29522         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
29523         to prove that this macro can be used in packages without regex.c.
29524
29525 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
29526
29527         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
29528         is to be used.
29529
29530 1998-07-03  Jim Meyering  <meyering@ascend.com>
29531
29532         * m4/gettext.m4: Add -lintl if it's found to be necessary.
29533
29534         * m4/gettext.m4: New file -- from gettext-0.10.35.
29535         * m4/lcmessage.m4: Likewise.
29536         * m4/progtest.m4: Likewise.
29537
29538         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
29539         * m4/jm-macros.m4: Require the new macro.
29540
29541 1998-06-29  Jim Meyering  <meyering@ascend.com>
29542
29543         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
29544         for the definition of NGROUPS (used in a system header included
29545         by sys/mount.h).
29546
29547 1998-06-28  Jim Meyering  <meyering@ascend.com>
29548
29549         * m4/ls-mntd-fs.m4: New file.
29550         * m4/fstypename.m4: New file.
29551
29552         * m4/jm-macros.m4: Require the new macro.
29553         * m4/jm-glibc-io.m4: New file.
29554
29555 1998-05-19  Jim Meyering  <meyering@ascend.com>
29556
29557         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
29558         * m4/lchown.m4: New file.
29559
29560         * m4/Makefile.am.in: New file.
29561         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
29562
29563 1998-05-14  Jim Meyering  <meyering@ascend.com>
29564
29565         * m4/Makefile.am (EXTRA_DIST): Add them.
29566         * m4/jm-macros.m4: New file.
29567         * m4/utimbuf.m4: New file.
29568
29569 1998-05-12  Jim Meyering  <meyering@ascend.com>
29570
29571         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
29572
29573 1998-05-11  Jim Meyering  <meyering@ascend.com>
29574
29575         * m4/isc-posix.m4: New file.
29576
29577 1998-05-10  Jim Meyering  <meyering@ascend.com>