Rename float_.h to float.in.h.
[pspp] / ChangeLog
1 2007-09-30  Bruno Haible  <bruno@clisp.org>
2
3         * lib/alloca.in.h: Renamed from lib/alloca_.h.
4         * modules/alloca-opt (Files, Makefile.am): Use alloca.in.h instead of
5         alloca_.h.
6         * lib/argz.in.h: Renamed from lib/argz_.h.
7         * modules/argz (Files, Makefile.am): Use argz.in.h instead of argz_.h.
8         * lib/byteswap.in.h: Renamed from lib/byteswap_.h.
9         * modules/byteswap (Files, Makefile.am): Use byteswap.in.h instead of
10         byteswap_.h.
11         * lib/dirent.in.h: Renamed from lib/dirent_.h.
12         * modules/fchdir (Files, Makefile.am): Use dirent.in.h instead of
13         dirent_.h.
14         * lib/fcntl.in.h: Renamed from lib/fcntl_.h.
15         * modules/fcntl (Files, Makefile.am): Use fcntl.in.h instead of
16         fcntl_.h.
17         * lib/float.in.h: Renamed from lib/float_.h.
18         * modules/float (Files, Makefile.am): Use float.in.h instead of
19         float_.h.
20
21 2007-09-30  Bruno Haible  <bruno@clisp.org>
22
23         * tests/test-getaddrinfo.c (AF_UNSPEC): Provide a fallback definition.
24         Needed on BeOS.
25
26 2007-09-30  Bruno Haible  <bruno@clisp.org>
27
28         * modules/dirname-tests (check_PROGRAMS): Renamed from noinst_PROGRAMS.
29
30 2007-09-29  Bruno Haible  <bruno@clisp.org>
31
32         * lib/stdio_.h (getdelim, getline): Add identifiers. Doc tweak.
33
34 2007-09-29  Bruno Haible  <bruno@clisp.org>
35
36         * lib/xreadlink.c (xreadlink): Simplify to a wrapper around areadlink.
37         * modules/xreadlink (Depends-on): Add areadlink, remove readlink etc.
38         * build-aux/install-reloc: Compile also areadlink.c.
39         * modules/relocatable-prog-wrapper (Files): Add lib/areadlink.[hc].
40
41 2007-09-29  Bruno Haible  <bruno@clisp.org>
42
43         * gnulib-tool (func_emit_initmacro_done): Indentation.
44
45 2007-09-29  Bruno Haible  <bruno@clisp.org>
46
47         * README: Add CVS checkout update instructions.
48         Info from Bob Proulx <bob@proulx.com>.
49
50 2007-09-28  Eric Blake  <ebb9@byu.net>
51
52         Provide move-if-change.
53         * build-aux/move-if-change: New file, based on best practice
54         rather than any canonical upstream location.
55
56 2007-09-28  Jim Meyering  <jim@meyering.net>
57
58         Fix canonicalize loop-detection corner case.
59         Do not attempt to stat the symlink values stored via seen_triple.
60         Without this, coreutils' tests/misc/readlink-fp-loop test would fail
61         on linux-2.6.18, (but not 2.6.22).
62         * lib/canonicalize.c (seen_triple): Use triple_compare_ino_str, not
63         triple_compare.  The former compares dev,ino,filename, while the latter
64         would actually stat dirname(filename) when dev and ino were equal.
65         * lib/hash-triple.c: Install <string.h>.
66         (STREQ): Define.
67         (triple_compare_ino_str): New function.
68         * lib/hash-triple.h (triple_compare_ino_str): Declare it.
69
70 2007-09-28  Eric Blake  <ebb9@byu.net>
71
72         Enforce that AC_REPLACE_FUNCS files exist.
73         * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES
74         override check for typos.
75
76         Fix test-closein on Solaris 10.
77         * tests/test-closein.c (main): Don't assume stdin can be inherited
78         closed on all systems.
79         * tests/test-closein.sh: Likewise.
80         Reported by Piotr Tarnowski.
81
82 2007-09-28  Jim Meyering  <jim@meyering.net>
83
84         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Fix typo in comment.
85
86 2007-09-27  Jim Meyering  <jim@meyering.net>
87
88         canonicalize: Avoid a false-positive cycle failure.
89         * modules/canonicalize (Depends-on): Add file-set and hash-triple.
90         Sort.  Remove cycle-check.
91         * lib/canonicalize.c: Include file-set.h and hash-triple.h,
92         not cycle-check.h.
93         (seen_triple): New function.
94         (canonicalize_filename_mode): Use it instead of cycle-check.
95         * tests/test-canonicalize.c: Add a test for this bug.
96         * tests/test-canonicalize.sh: Set up and run the test.
97
98         New module, file-set, from coreutils.
99         * modules/file-set: Define it.
100         * lib/file-set.c, lib/file-set.h: Implement.
101
102         New module, hash-triple, from coreutils.
103         * modules/hash-triple: Define it.
104         * lib/hash-triple.c, lib/hash-triple.h: Implement.
105
106 2007-09-25  Eric Blake  <ebb9@byu.net>
107
108         Fix strerror on Interix.
109         * lib/string_.h (strerror): Declare replacement.
110         * doc/functions/strerror.texi (strerror): Document the Interix
111         shortcoming.
112         * modules/string (Makefile.am): Support new hooks.
113         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add new hooks.
114         * m4/strerror.m4 (gl_FUNC_STRERROR): Defer to
115         gl_FUNC_STRERROR_SEPARATE.
116         (gl_FUNC_STRERROR_SEPARATE): Check for Interix bug.
117         * lib/strerror.c (rpl_strerror): Provide replacement.
118         * modules/strerror (Depends-on): Add string.
119         (configure.ac): Detect use of module.
120         * tests/test-strerror.c: New file.
121         * modules/strerror-tests: New test module.
122         * modules/argp (Depends-on): Add strerror.
123         * modules/error (Depends-on): Likewise.
124         Reported by Martin Koeppe.
125
126 2007-09-24  Bruno Haible  <bruno@clisp.org>
127
128         * README: Update git instructions.
129
130 2007-09-24  Eric Blake  <ebb9@byu.net>
131
132         Revert fpending breakage from 2007-09-08.
133         * m4/fpending.m4 (gl_FUNC_FPENDING): Don't require existence of
134         __fpending.c.
135
136 2007-09-24  Jim Meyering  <jim@meyering.net>
137
138         filenamecat.c: Add a test.
139         * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test
140         showing how the function works when DIR is the empty string.
141
142 2007-09-21  Simon Josefsson  <simon@josefsson.org>
143
144         * tests/test-canonicalize.sh: Turn on executable bit.
145
146 2007-09-19  Eric Blake  <ebb9@byu.net>
147
148         * README: Update CVS instructions.
149
150 2007-09-18  Bruno Haible  <bruno@clisp.org>
151
152         * modules/areadlink: New file.
153         * lib/areadlink.h (areadlink): New declaration.
154         * lib/areadlink.c: New file, based on lib/xreadlink.c.
155
156 2007-09-17  Jim Meyering  <jim@meyering.net>
157
158         * lib/savewd.c (ESTALE) [!defined]: Define.
159         Reported to be required on Interix by Martin Koeppe.
160
161 2007-09-17  Bruno Haible  <bruno@clisp.org>
162
163         * gnulib-tool (func_version): Use $version.
164
165 2007-09-16  Bruno Haible  <bruno@clisp.org>
166
167         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE,
168         gl_PRINTF_INFINITE_LONG_DOUBLE): Increase buf's size from 100 to 10000.
169         Needed on glibc-2.6.1 with -fstack-protector -D_FORTIFY_SOURCE=2.
170         Reported by Greg Schafer <gschafer@zip.com.au>.
171
172 2007-09-15  Bruno Haible  <bruno@clisp.org>
173
174         * gnulib-tool (sed): Try a little harder to make bash understand the
175         alias.
176         Reported by Bruce Korb <bruce.korb@gmail.com>.
177
178 2007-09-13  Eric Blake  <ebb9@byu.net>
179
180         * ChangeLog: Remove conflict markers.
181
182 2007-09-13  Simon Josefsson  <simon@josefsson.org>
183
184         * lib/gc-gnulib.c (gc_hash_open): Catch NULL calloc return value.
185         Reported by Bruno Haible <bruno@clisp.org>.
186
187 2007-09-12  Bruno Haible  <bruno@clisp.org>
188
189         * m4/lock.m4: Don't provide an AC_USE_SYSTEM_EXTENSIONS definition.
190         (gl_LOCK_EARLY_BODY): Use AC_GNU_SOURCE when AC_USE_SYSTEM_EXTENSIONS
191         is not defined.
192
193 2007-09-12  Eric Blake  <ebb9@byu.net>
194
195         Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
196         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Update to CVS
197         Autoconf definition.
198         * modules/euidaccess (Depends-on): Add extensions, for
199         AC_USE_SYSTEM_EXTENSIONS with autoconf <= 2.59.
200         * modules/fnmatch (Depends-on): Likewise.
201         * modules/getaddrinfo (Depends-on): Likewise.
202         * modules/getdelim (Depends-on): Likewise.
203         * modules/getline (Depends-on): Likewise.
204         * modules/getsubopt (Depends-on): Likewise.
205         * modules/gettext (Depends-on): Likewise.
206         * modules/group-member (Depends-on): Likewise.
207         * modules/mbchar (Depends-on): Likewise.
208         * modules/memmem (Depends-on): Likewise.
209         * modules/mempcpy (Depends-on): Likewise.
210         * modules/memrchr (Depends-on): Likewise.
211         * modules/pagealign_alloc (Depends-on): Likewise.
212         * modules/readutmp (Depends-on): Likewise.
213         * modules/stpcpy (Depends-on): Likewise.
214         * modules/stpncpy (Depends-on): Likewise.
215         * modules/strchrnul (Depends-on): Likewise.
216         * modules/strndup (Depends-on): Likewise.
217         * modules/strsep (Depends-on): Likewise.
218         * modules/strverscmp (Depends-on): Likewise.
219         * modules/vasprintf (Depends-on): Likewise.
220         * modules/wcwidth (Depends-on): Likewise.
221         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): AC_GNU_SOURCE will be
222         obsolete in Autoconf 2.62; use AC_USE_SYSTEM_EXTENSIONS instead.
223         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Likewise.
224         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDR_INFO): Likewise.
225         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
226         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
227         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Likewise.
228         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
229         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Likewise.
230         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
231         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
232         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
233         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
234         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
235         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Likewise.
236         * m4/readutmp.m4 (gl_READUTMP): Likewise.
237         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
238         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
239         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
240         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
241         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
242         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
243         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
244         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Likewise.
245         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): Likewise.
246         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
247         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Likewise, but provide fallback,
248         so that lock.m4 can be used in gettext without extensions module.
249
250 2007-09-11  Bruno Haible  <bruno@clisp.org>
251
252         * m4/isc-posix.m4: Remove file.
253         Suggested by Eric Blake.
254
255 2007-09-11  Eric Blake  <ebb9@byu.net>
256
257         * ChangeLog: Restore lines accidentally truncated 2007-04-06.
258
259 2007-09-10  Bruno Haible  <bruno@clisp.org>
260
261         * posix-modules: Fix typo in error message.
262         Reported by Matt <mkraai@beckman.com>.
263
264 2007-09-09  Bruno Haible  <bruno@clisp.org>
265
266         * doc/functions/getdelim.texi: Update list of platforms lacking the
267         function.
268         * doc/functions/getline.texi: Likewise.
269
270 2007-09-09  Jim Meyering  <jim@meyering.net>
271
272         * lib/hash.c (hash_initialize): Detect calloc failure.
273         Reported by Bruno Haible.
274
275 2007-09-09  Bruno Haible  <bruno@clisp.org>
276
277         * lib/canonicalize-lgpl.c (__realpath): Set errno to ENOMEM when
278         malloc or realloc fails.
279
280 2007-09-09  Bruno Haible  <bruno@clisp.org>
281
282         * modules/getcwd (Depends-on): Add malloc-posix.
283         * modules/glob (Depends-on): Likewise.
284         * modules/putenv (Depends-on): Likewise.
285         * modules/strdup (Depends-on): Likewise.
286         * modules/getdelim (Depends-on): Add realloc-posix.
287         * modules/read-file (Depends-on): Likewise.
288
289 2007-09-09  Bruno Haible  <bruno@clisp.org>
290
291         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): New macro.
292         (gl_FUNC_MALLOC_POSIX): Require it.
293         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
294         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Likewise.
295         * modules/realloc (Files): Add m4/malloc.m4.
296         * modules/calloc (Files): Likewise.
297
298 2007-09-09  Bruno Haible  <bruno@clisp.org>
299
300         * modules/malloc-posix: New file.
301         * modules/malloc (Depends-on): Add malloc-posix.
302         * lib/malloc.c: Include errno.h.
303         (rpl_malloc): Merge the requirements of a glibc-compatible malloc
304         and a POSIX-compatible malloc into a single function. Set ENOMEM
305         when returning NULL.
306         * m4/malloc.m4: New file.
307         * doc/functions/malloc.texi: Mention the malloc-posix module.
308         * lib/stdlib_.h (malloc): New declaration.
309         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
310         GNULIB_MALLOC_POSIX and HAVE_MALLOC_POSIX.
311         * modules/stdlib (stdlib.h): Substitute also GNULIB_MALLOC_POSIX
312         and HAVE_MALLOC_POSIX.
313
314 2007-09-09  Bruno Haible  <bruno@clisp.org>
315
316         * modules/realloc-posix: New file.
317         * modules/realloc (Depends-on): Add realloc-posix.
318         * lib/realloc.c: Include errno.h.
319         (rpl_realloc): Merge the requirements of a glibc-compatible realloc
320         and a POSIX-compatible realloc into a single function. Set ENOMEM
321         when returning NULL.
322         * m4/realloc.m4: New file.
323         * doc/functions/realloc.texi: Mention the realloc-posix module.
324         * lib/stdlib_.h (realloc): New declaration.
325         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
326         GNULIB_REALLOC_POSIX and HAVE_REALLOC_POSIX.
327         * modules/stdlib (stdlib.h): Substitute also GNULIB_REALLOC_POSIX
328         and HAVE_REALLOC_POSIX.
329
330 2007-09-09  Bruno Haible  <bruno@clisp.org>
331
332         * modules/calloc-posix: New file.
333         * modules/calloc (Depends-on): Add calloc-posix.
334         * lib/calloc.c: Include errno.h.
335         (rpl_calloc): Merge the requirements of a glibc-compatible calloc
336         and a POSIX-compatible calloc into a single function. Set ENOMEM
337         when returning NULL.
338         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): New macro.
339         * doc/functions/calloc.texi: Mention the calloc-posix module.
340         * lib/stdlib_.h (calloc): New declaration.
341         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
342         GNULIB_CALLOC_POSIX and HAVE_CALLOC_POSIX.
343         * modules/stdlib (stdlib.h): Substitute also GNULIB_CALLOC_POSIX
344         and HAVE_CALLOC_POSIX.
345
346 2007-09-09  Bruno Haible  <bruno@clisp.org>
347
348         Allow for modules to show an arbitrary notice.
349         * modules/TEMPLATE-EXTENDED: Add 'Notice' field.
350         * gnulib-tool: New option --extract-notice.
351         (func_usage): Document it.
352         (sed_extract_prog): Update.
353         (func_get_notice): New function.
354         (func_modules_notice): New function.
355         (func_import, func_create_testdir): Invoke it.
356         Suggested by Jim Meyering.
357
358 2007-09-09  Bruno Haible  <bruno@clisp.org>
359
360         * gnulib-tool: New options --verbose, --quiet.
361         (func_usage): Document them.
362         (verbose): New variable.
363         (func_execute_command): New function.
364         (func_import): Don't show the module list and the file list if
365         $verbose < 0.
366         (func_create_testdir): Likewise. Use func_execute_command.
367         (func_create_megatestdir): Use func_execute_command.
368
369 2007-09-08  Bruno Haible  <bruno@clisp.org>
370
371         * gnulib-tool (func_import): Prefer rsync over wget when available,
372         for fetching the PO files.
373
374 2007-09-08  Bruno Haible  <bruno@clisp.org>
375
376         * posix-modules: New file. Portions copied from gnulib-tool.
377         * doc/gnulib.texi (POSIX Substitutes Library): New chapter.
378
379 2007-09-08  Jim Meyering  <jim@meyering.net>
380
381         Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h
382         * lib/fpending.h: Rename from __fpending.h.
383         * lib/fpending.c: Rename from __fpending.c.
384         Include "fpending.h", not "__fpending.h".
385         * lib/__fpending.h, lib/__fpending.c: Remove files.
386         * modules/fpending (Files): Reflect new file names.
387         * lib/close-stream.c: Include "fpending.h", not "__fpending.h".
388
389 2007-09-08  Bruno Haible  <bruno@clisp.org>
390
391         * m4/inttypes-h.m4: Remove stub file.
392
393 2007-09-07  Simon Josefsson  <simon@josefsson.org>
394
395         * doc/headers/stdint.texi: Discuss #include_next issue.
396
397 2007-09-06  Paul Eggert  <eggert@cs.ucla.edu>
398
399         * build-aux/bootstrap: Remove obsolete comment about wget --help.
400
401 2007-09-06  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
402
403         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Fix misspelling
404         in variable name.
405
406 2007-09-03  Jim Meyering  <jim@meyering.net>
407
408         New module: git-version-gen.
409         * modules/git-version-gen: New file.
410
411         Import changes from coreutils for bootstrap script.
412
413         * build-aux/bootstrap (WGET_COMMAND): Remove code to set this variable.
414
415         bootstrap: uses rsync to download the .po files
416         * build-aux/bootstrap (po_download_command_format): New global.
417         (download_po_files): Use rsync.
418         (update_po_files): Don't remove .po files after download,
419         so future rsync runs can take advantage of the copies.
420
421         * build-aux/bootstrap (gnulib_tool): Make sha1sum check quietly.
422
423         Solve the unnecessary-.po-file-regeneration problem once and for all.
424         * build-aux/bootstrap (download_po_files): New function, renamed from
425         get_translations.  Now, downloads, but doesn't update LINGUAS.
426         (update_po_files): New function.
427
428         bootstrap: Ignore more.
429         * build-aux/bootstrap (symlink_to_dir): Add a directory name like
430         uniwidth to e.g., lib/.gitignore.
431         (slurp): Handle the sys_stat_.h -> sys mapping, too.
432
433         * build-aux/bootstrap: New setting: vc_ignore.
434         (insert_sorted_if_absent): Create $file if absent.
435         Adapt to new, possibly empty, list: $vc_ignore.
436
437         bootstrap: generate more ignorable names
438         * build-aux/bootstrap (slurp): When generating ignorable names,
439         also map .sin to .sed, .gperf to .c, and .y to .c.
440
441 2007-09-03  Jim Meyering  <jim@meyering.net>
442
443         * build-aux/git-version-gen: New file, from coreutils.  For details, see
444         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=bfe49f506
445
446 2007-09-02  Bruno Haible  <bruno@clisp.org>
447
448         Fix mis-recognition of 'mcs' on QNX 6.
449         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Test whether the "mcs --version"
450         output contains the string "Mono".
451         * lib/csharpcomp.c (compile_csharp_using_mono): Likewise.
452         Reported by <kraai@ftbfs.org> at <https://savannah.gnu.org/bugs/?18337>.
453
454 2007-09-01  Bruno Haible  <bruno@clisp.org>
455
456         Fix collision between uniwidth/* and linebreak modules.
457         * lib/linebreak.h (locale_charset, uc_width, u8_width, u16_width,
458         u32_width): Remove declarations.
459         * lib/linebreak.c: Include uniwidth.h, uniwidth/cjk.h, streq.h.
460         (u32_mbtouc_unsafe, streq9, streq8, streq7, streq6, streq5, streq4,
461         streq3, streq2, streq1, streq0): Remove functions.
462         (STREQ): Remove macro.
463         (is_cjk_encoding): Remove function.
464         (nonspacing_table_data, nonspacing_table_ind): Remove constants.
465         (uc_width, u8_width, u16_width, u32_width): Remove functions.
466         * modules/linebreak (Depends-on): Add streq, uniwidth/width.
467         * NEWS: Document the change.
468
469 2007-09-01  Bruno Haible  <bruno@clisp.org>
470
471         * lib/streq.h: Add double-inclusion guard.
472
473 2007-09-01  Karl Berry  <karl@gnu.org>
474
475         * MODULES.html.sh: Rename mreadlink_with_size to areadlink_with_size.
476
477 2007-08-28  Jim Meyering  <jim@meyering.net>
478
479         Rename mreadlink_with_size to areadlink_with_size.
480         * NEWS: Document the change.
481         * lib/mreadlink-with-size.c (mreadlink_with_size): Rename this to...
482         * lib/areadlink-with-size.c (areadlink_with_size): ...this.
483         * lib/mreadlink.h: Rename this to...
484         * lib/areadlink.h: ...this.
485         * modules/mreadlink-with-size: Rename this to...
486         * modules/areadlink-with-size: ...this.
487         * lib/canonicalize.c: Reflect the renaming.
488         * modules/canonicalize: Likewise.
489
490 2007-08-26  Bruno Haible  <bruno@clisp.org>
491
492         * gnulib-tool (func_import): When deciding which files to remove,
493         consider also dangling symbolic links.
494         Reported by Eric Blake.
495
496 2007-08-26  Bruno Haible  <bruno@clisp.org>
497
498         * gnulib-tool (func_ln_if_changed): Use "test -h", not "test -L".
499
500 2007-08-23  Simon Josefsson  <simon@josefsson.org>
501
502         * lib/readline.c: Don't include getline.h, the prototype is now
503         found in stdio.h.
504
505 2007-08-23  Jim Meyering  <jim@meyering.net>
506
507         Getdelim touchup.
508         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
509         around the funlockfile call, since funlockfile never sets errno.
510         Don't set errno upon failed realloc.
511
512 2007-08-22  Eric Blake  <ebb9@byu.net>
513
514         Getline touchups.
515         * lib/getdelim.c (getdelim): Revert regression that required *n to
516         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
517         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
518         getdelim, rather than whether implementation is missing.
519         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
520         * lib/stdio_.h (getline): Also declare if replacement is
521         required.
522         * doc/functions/getdelim.texi: New file.
523         * doc/functions/getline.texi: Likewise.
524         * doc/gnulib.texi (Function Substitutes): Add new files.
525         Reported by Bruno Haible.
526
527 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
528
529         * users.txt: Add Guile.
530
531 2007-08-22  Eric Blake  <ebb9@byu.net>
532
533         * tests/test-getdelim.c (main): Use remove, not unlink.
534         * tests/test-getline.c (main): Likewise.
535
536         Move getline and getdelim into stdio.h, per POSIX 200x.
537         * modules/getline (Files): Remove getline.h.
538         (Depends-on): Add stdio.
539         (configure.ac): Add module indicator.
540         * modules/getdelim (Files): Remove getdelim.h.
541         (Depends-on): Add stdio.
542         (configure.ac): Add module indicator.
543         * modules/stdio (Makefile.am): Work with new indicators.
544         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
545         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
546         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
547         * lib/getdelim.h: Delete.
548         * lib/getline.h: Delete.
549         * lib/stdio_.h (getdelim, getline): Declare.
550         * modules/getdelim-tests: New module.
551         * modules/getline-tests: Likewise.
552         * tests/test-getdelim.c: New file.
553         * tests/test-getline.c: Likewise.
554         * NEWS: Document the change.
555         * lib/getline.c: Update choice of header.
556         * lib/csharpcomp.c: Likewise.
557         * lib/getpass.c: Likewise.
558         * lib/javacomp.c: Likewise.
559         * lib/javaversion.c: Likewise.
560         * lib/yesno.c: Likewise.
561         * lib/getdelim.c: Likewise.
562         (getdelim): Set errno on failure, and avoid memory leak.
563
564 2007-08-19  Bruno Haible  <bruno@clisp.org>
565
566         * modules/closein (Depends-on): Add freadahead.
567         * lib/closein.c: Include freadahead.h.
568         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
569         is zero.
570
571 2007-08-19  Bruno Haible  <bruno@clisp.org>
572
573         * modules/freadahead-tests: New file.
574         * tests/test-freadahead.sh: New file.
575         * tests/test-freadahead.c: New file.
576
577         * modules/freadahead: New file.
578         * lib/freadahead.h: New file.
579         * lib/freadahead.c: New file.
580         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
581         fbufmode, fpurge, freadable, fwritable.
582
583 2007-08-19  Eric Blake  <ebb9@byu.net>
584
585         Test yesno in combination with closein.
586         * lib/yesno.c (yesno): Document use of stdin.
587         * modules/yesno-tests (Files): New module.
588         * tests/test-yesno.c (main): New file.
589         * tests/test-yesno.sh: Likewise.
590
591 2007-08-19  Bruno Haible  <bruno@clisp.org>
592
593         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
594         * lib/fseeko.c (rpl_fseeko): Likewise.
595         * lib/fseterr.c (fseterr): Likewise.
596
597 2007-08-19  Bruno Haible  <bruno@clisp.org>
598
599         * tests/test-lseek.c (main): Disable a test for BeOS.
600         * doc/functions/lseek.texi: Document the BeOS bug.
601
602 2007-08-19  Bruno Haible  <bruno@clisp.org>
603             Eric Blake  <ebb9@byu.net>
604
605         * lib/lseek.c: Include <sys/stat.h>.
606         (rpl_lseek): Add workaround code also for Unix platforms.
607         Needed for BeOS.
608         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
609         * doc/functions/lseek.texi: Document BeOS definiency.
610
611 2007-08-18  Bruno Haible  <bruno@clisp.org>
612
613         * modules/fstrcmp-tests: New file.
614         * tests/test-fstrcmp.c: New file.
615
616 2007-08-18  Bruno Haible  <bruno@clisp.org>
617
618         * modules/fstrcmp: New file, from GNU gettext with modifications.
619         * lib/fstrcmp.h: New file, from GNU gettext.
620         * lib/fstrcmp.c: New file, from GNU gettext.
621         * MODULES.html.sh (String handling): Add fstrcmp.
622
623 2007-08-18  Bruno Haible  <bruno@clisp.org>
624
625         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
626         'bool'.
627         (diag, compareseq): Remove const from the ctxt argument.
628         (USE_HEURISTIC): Undefine at the end.
629
630 2007-08-18  Jim Meyering  <jim@meyering.net>
631
632         New file: lib/idcache.h
633         * NEWS: Mention the addition.
634         * modules/idcache (Files): Add lib/idcache.h
635         * lib/idcache.c: Include "idcache.h".
636         Don't include <sys/types.h>.
637         Add a FIXME comment.
638         Move file-scoped "static" declarations to the top.
639         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
640
641 2007-08-17  Bruno Haible  <bruno@clisp.org>
642         and Paul Eggert  <eggert@cs.ucla.edu>
643
644         * MODULES.html.sh: Add diffseq.
645         * modules/diffseq: New file.
646         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
647         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
648
649 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
650
651         Import changes from coreutils for bootstrap script.
652
653         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
654
655         * build-aux/bootstrap (slurp): Work even in environments where
656         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
657         current code does not slurp files whose names start with ".", and
658         this looks like it might be a troublesome area.
659
660         2007-07-11  Jim Meyering  <jim@meyering.net>
661
662         If there's a GPL vN copyright comment, require that N == 3.
663
664         2007-07-08  Jim Meyering  <jim@meyering.net>
665
666         Run the coreutils-specific code only if tests/Makefile.am.in exists.
667         * build-aux/bootstrap (mam_template): Move definition out of loop.
668
669         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
670
671         * build-aux/bootstrap (symlink_to_dir): Rename function from
672         symlink_to_gnulib.  Add a directory parameter.  Update all
673         callers.
674         (cp_mark_as_generated): Also check for -- and link to -- files in
675         gl/.
676
677         2007-07-08  Jim Meyering  <jim@meyering.net>
678
679         Adapt to deeper hierarchy in gnulib.
680         * build-aux/bootstrap (symlink_to_dir): If the destination
681         directory doesn't exist, create it. This is required at least for
682         "lib/uniwidth/cjk.h".
683
684         2007-05-15  Jim Meyering  <jim@meyering.net>
685
686         * build-aux/bootstrap: Now that generated Makefile.am files
687         are no longer under version control, they must be created at
688         bootstrap time.
689
690 2007-08-14  Ben Pfaff  <blp@gnu.org>
691
692         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
693
694 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
695
696         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
697         given the changes below.
698         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
699         even on hosts that have padding bits beyond the supported 64.
700
701 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
702
703         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
704         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
705         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
706         depends on it.
707         (xstrtol_error): Remove.
708         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
709         but with a different signature.
710         (ATTRIBUTE_NORETURN, __attribute__): New macros.
711         * lib/xstrtol-error.c: Include exitfail.h.
712         (xstrtol_fatal): New function, with a different signature from the
713         old xstrtol_error, so that the caller need not worry about passing
714         in an exit status, or about storage management of the option argument.
715         (xstrtol_error): Now a static function.  Redo signature to
716         implement xstrtol_fatal.  Output the correct number of hyphens in
717         front of the option so that the caller need not worry about
718         storage management.
719         (N_): New macro.
720         (_): Remove; not used now.
721         * modules/xstrtol: Depend on getopt.
722         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
723         of old STRTOL_FATAL_ERROR macro.
724         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
725         of test program.
726         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
727         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
728
729 2007-08-08  Eric Blake  <ebb9@byu.net>
730
731         * lib/xstrtol-error.c: Add missing include.
732
733         Move xstrtol messages into gnulib domain, when --pobase is used.
734         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
735         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
736         * modules/xstrtol (Files): Distribute new file.
737         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
738         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
739         * tests/test-xstrtol.c: ...into new file.
740         * tests/test-xstrtoul.c: Also test xstrtoul.
741         * tests/test-xstrtoimax.c: Also test xstrtoimax.
742         * tests/test-xstrtoumax.c: Also test xstrtoumax.
743         * tests/test-xstrtol.sh: Drive the tests.
744         * tests/test-xstrtoimax.sh: Likewise.
745         * tests/test-xstrtoumax.sh: Likewise.
746         * modules/xstrtol-tests: New module.
747         * modules/xstrtoimax-tests: Likewise.
748         * modules/xstrtoumax-tests: Likewise.
749
750 2007-08-08  Jim Meyering  <jim@meyering.net>
751
752         New function: mfile_name_concat.
753         * lib/filenamecat.c (mfile_name_concat): New function, just like
754         file_name_concat, but return NULL upon failure rather than exiting
755         with a diagnostic.
756         * lib/filenamecat.h: Declare it.
757
758 2007-08-07  Bruno Haible  <bruno@clisp.org>
759
760         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
761         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
762         warning from gcc.
763         Reported by Eric Blake.
764
765 2007-08-07  Simon Josefsson  <simon@josefsson.org>
766
767         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
768         * modules/crypto/arcfour (License): Likewise.
769         * modules/crypto/des-tests (License): Likewise.
770         * modules/crypto/gc-arctwo-tests (License): Likewise.
771         * modules/crypto/gc-des-tests (License): Likewise.
772         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
773         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
774         * modules/crypto/gc-md2-tests (License): Likewise.
775         * modules/crypto/gc-md4-tests (License): Likewise.
776         * modules/crypto/gc-md5-tests (License): Likewise.
777         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
778         * modules/crypto/gc-rijndael-tests (License): Likewise.
779         * modules/crypto/gc-sha1-tests (License): Likewise.
780         * modules/crypto/gc-tests (License): Likewise.
781         * modules/crypto/hmac-md5 (License): Likewise.
782         * modules/crypto/hmac-sha1 (License): Likewise.
783         * modules/crypto/md2-tests (License): Likewise.
784         * modules/crypto/md4-tests (License): Likewise.
785         * modules/crypto/md5 (License): Likewise.
786         * modules/crypto/rijndael (License): Likewise.
787         * modules/crypto/sha1 (License): Likewise.
788         * modules/memxor (License): Likewise.
789
790 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
791         and Bruno Haible  <bruno@clisp.org>
792
793         * NEWS: Describe interface changes to human, xstrtol.
794         * lib/human.h: Include <xstrtol.h>.
795         (human_options): Return enum strtol_error, not int.  Remove
796         bool arg; take int * instead.
797         * lib/human.c: Don't include "gettext.h".
798         (_): Remove; no longer used.
799         Don't include <xstrtol.h>, since human.h does it.
800         (human_options): Adjust to abovementioned interface changes.
801         Do not report error to stderr; that's now the caller's
802         responsibility.
803         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
804         interface change.
805         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
806         Str, Argument_type_string.  All uses changed.  Put " argument"
807         in diagnostics to make them clearer.  Change wording of suffix
808         message for clarity.
809         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
810         Argument_type_string.
811         (STRTOL_FATAL_WARN): Remove; no longer used.
812         * modules/human (Depends-on): Remove gettext-h.
813
814 2007-08-06  Simon Josefsson  <simon@josefsson.org>
815
816         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
817
818 2007-07-31  Bruno Haible  <bruno@clisp.org>
819
820         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
821         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
822         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
823
824 2007-07-31  Bruno Haible  <bruno@clisp.org>
825
826         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
827         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
828
829 2007-07-30  Bruno Haible  <bruno@clisp.org>
830
831         * modules/base64 (License): Use the synonymous term "LGPLv2+".
832         * modules/c-ctype (License): Likewise.
833         * modules/c-strcase (License): Likewise.
834         * modules/check-version (License): Likewise.
835         * modules/iconv (License): Likewise.
836         * modules/iconv_open (License): Likewise.
837         * modules/read-file (License): Likewise.
838         * modules/striconv (License): Likewise.
839         * modules/strverscmp (License): Likewise.
840         * modules/vasprintf (License): Likewise.
841         * modules/crypto/des (License): Likewise.
842         * modules/crypto/gc (License): Likewise.
843         * modules/crypto/gc-arcfour (License): Likewise.
844         * modules/crypto/gc-arctwo (License): Likewise.
845         * modules/crypto/gc-des (License): Likewise.
846         * modules/crypto/gc-hmac-md5 (License): Likewise.
847         * modules/crypto/gc-hmac-sha1 (License): Likewise.
848         * modules/crypto/gc-md2 (License): Likewise.
849         * modules/crypto/gc-md4 (License): Likewise.
850         * modules/crypto/gc-md5 (License): Likewise.
851         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
852         * modules/crypto/gc-random (License): Likewise.
853         * modules/crypto/gc-rijndael (License): Likewise.
854         * modules/crypto/gc-sha1 (License): Likewise.
855         * modules/crypto/md2 (License): Likewise.
856         * modules/crypto/md4 (License): Likewise.
857
858 2007-07-30  Jim Meyering  <jim@meyering.net>
859
860         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
861         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
862         it has valid stat data.  This bug would cause du not to count the
863         sizes of inaccessible directories.
864         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
865         in <http://bugzilla.redhat.com/250077>.
866
867 2007-07-25  Peter O'Gorman  <peter@pogma.com>
868             Bruno Haible  <bruno@clisp.org>
869
870         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
871         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
872         #include_next, gives a diagnostic about it, but reports no error in
873         the exit code.
874         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
875
876 2007-07-24  Ben Pfaff  <blp@gnu.org>
877
878         Improve name: "count-one-bits" is better than "popcount".
879         * MODULES.html.sh: Update name.
880         * lib/popcount.h: Renamed lib/count-one-bits.h.
881         (popcount): Renamed count_one_bits.
882         (popcountl): Renamed count_one_bits_l.
883         (popcountll): Renamed count_one_bits_ll.
884         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
885         * modules/popcount: Renamed module/count-one-bits.
886         * modules/popcount-tests: Renamed module/count-one-bits-tests.
887         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
888
889 2007-07-23  Ben Pfaff  <blp@gnu.org>
890
891         * lib/popcount.h (popcount32): Reduce size of constants, to allow
892         better code generation, and add U to large constants to avoid
893         warnings, in non-GCC case.
894         Suggested by Bruno Haible.
895
896 2007-07-23  Ben Pfaff  <blp@gnu.org>
897
898         * lib/popcount.h: Use verify_true instead of if...abort.
899         * modules/popcount: Depend on verify module.
900         Suggested by Jim Meyering.
901
902 2007-07-23  Bruno Haible  <bruno@clisp.org>
903
904         * gnulib-tool (func_import): Create a .cvsignore file also when the
905         directory is not yet in CVS but the toplevel directory is. When
906         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
907         Reported by Karl Berry.
908
909 2007-07-22  Ben Pfaff  <blp@gnu.org>
910
911         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
912         case.
913         Suggested by Eric Blake.
914
915 2007-07-22  Ben Pfaff  <blp@gnu.org>
916
917         New module: popcount.
918         * MODULES.html.sh: Add popcount.
919         * modules/popcount: New file.
920         * modules/popcount-tests: New file.
921         * tests/test-popcount.c: New file.
922         * lib/popcount.h: New file.
923         * m4/popcount.m4: New file.
924
925 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
926
927         * build-aux/announce-gen: Update to GPLv3.
928
929         * build-aux/config.guess: Update from config.
930
931 2007-07-21  Bruno Haible  <bruno@clisp.org>
932
933         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
934         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
935
936 2007-07-20  Jim Meyering  <jim@meyering.net>
937
938         * check-module: Diagnose a self-dependency.
939
940 2007-07-19  Bruno Haible  <bruno@clisp.org>
941
942         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
943         empty.
944         Reported by Eric Blake.
945
946 2007-07-18  Bruno Haible  <bruno@clisp.org>
947
948         * gnulib-tool: New options --po-base, --po-domain.
949         (func_usage): Document them.
950         (pobase, po_domain): New variables.
951         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
952         DEFAULT_TEXT_DOMAIN.
953         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
954         (func_import): Consider pobase and po_domain. Create a po/ directory.
955         (func_create_testdir): Set pobase and po_domain to empty.
956         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
957         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
958
959 2007-07-18  Bruno Haible  <bruno@clisp.org>
960
961         * gnulib-tool (func_get_automake_snippet): Synthesize also an
962         EXTRA_DIST augmentation for files in build-aux/.
963
964 2007-07-16  Bruno Haible  <bruno@clisp.org>
965
966         * modules/lseek (License): Use the synonymous term "LGPLv2+".
967         * modules/getdelim (License): Likewise.
968
969 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
970
971         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
972         * modules/d-type (License): Likewise.
973         * modules/extensions (License): Likewise.
974         * modules/fnmatch (License): Likewise.
975         * modules/fseeko (License): Likewise.
976         * modules/getaddrinfo (License): Likewise.
977         * modules/getline (License): Likewise.
978         * modules/getlogin_r (License): Likewise.
979         * modules/getpass (License): Likewise.
980         * modules/gettimeofday (License): Likewise.
981         * modules/glob (License): Likewise.
982         * modules/inet_ntop (License): Likewise.
983         * modules/malloc (License): Likewise.
984         * modules/malloca (License): Likewise.
985         * modules/memmem (License): Likewise.
986         * modules/mempcpy (License): Likewise.
987         * modules/memset (License): Likewise.
988         * modules/minmax (License): Likewise.
989         * modules/mktime (License): Likewise.
990         * modules/netinet_in (License): Likewise.
991         * modules/pathmax (License): Likewise.
992         * modules/poll (License): Likewise.
993         * modules/regex (License): Likewise.
994         * modules/snprintf (License): Likewise.
995         * modules/stdbool (License): Likewise.
996         * modules/stdint (License): Likewise.
997         * modules/stdio (License): Likewise.
998         * modules/strcase (License): Likewise.
999         * modules/strcasestr (License): Likewise.
1000         * modules/strdup (License): Likewise.
1001         * modules/string (License): Likewise.
1002         * modules/strndup (License): Likewise.
1003         * modules/strnlen (License): Likewise.
1004         * modules/strpbrk (License): Likewise.
1005         * modules/strptime (License): Likewise.
1006         * modules/strsep (License): Likewise.
1007         * modules/sys_select (License): Likewise.
1008         * modules/sys_socket (License): Likewise.
1009         * modules/sys_stat (License): Likewise.
1010         * modules/sys_time (License): Likewise.
1011         * modules/time (License): Likewise.
1012         * modules/time_r (License): Likewise.
1013         * modules/timegm (License): Likewise.
1014         * modules/unistd (License): Likewise.
1015         * modules/vsnprintf (License): Likewise.
1016         * modules/wctype (License): Likewise.
1017
1018 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1019
1020         * modules/argz (License): LGPLv2+.
1021
1022 2007-07-15  Karl Berry  <karl@gnu.org>
1023
1024         * doc/gnulib.texi: revise node structure per new fdl.texi.
1025
1026 2007-07-14  Bruno Haible  <bruno@clisp.org>
1027
1028         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
1029         the output file.
1030         * lib/uniname/uninames.h: Regenerated.
1031
1032 2007-07-14  Karl Berry  <karl@gnu.org>
1033
1034         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
1035         omitting sectioning and index commands.
1036
1037 2007-07-13  Bruno Haible  <bruno@clisp.org>
1038
1039         New gnulib-tool option --more-symlinks.
1040         * gnulib-tool (func_usage): Document --more-symlinks.
1041         (do_copyrights): New variable.
1042         Recognize option --more-symlinks.
1043         (func_import): Don't add a copyright notice transform to
1044         sed_transform_lib_file if do_copyrights is empty.
1045
1046 2007-07-13  Bruno Haible  <bruno@clisp.org>
1047
1048         * lib/vasnprintf.c (decimal_point_char): Define also if
1049         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
1050         && !NEED_PRINTF_DIRECTIVE_A.
1051         Reported by Clemens Koller <clemens.koller@anagramm.de> via
1052         Gary V. Vaughan <gary@gnu.org>.
1053
1054 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
1055
1056         * lib/inttypes_.h: Undo previous change, since it was fixed
1057         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
1058
1059 2007-07-13  Bruno Haible  <bruno@clisp.org>
1060
1061         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
1062         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
1063
1064 2007-07-13  Jim Meyering  <jim@meyering.net>
1065
1066         df: Don't fail for Tru64's "file-on-file mount".
1067         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
1068         so we fall through and use statfs instead.  Details here:
1069         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
1070         Reported by Albert Chin.
1071
1072 2007-07-13  Bruno Haible  <bruno@clisp.org>
1073
1074         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
1075         * modules/configmake (License): Likewise.
1076         * modules/gettext (License): Likewise.
1077         * modules/gettext-h (License): Likewise.
1078         * modules/include_next (License): Likewise.
1079         * modules/link-warning (License): Likewise.
1080         * modules/localcharset (License): Likewise.
1081         * modules/localename (License): Likewise.
1082         * modules/lock (License): Likewise.
1083         * modules/relocatable-lib-lgpl (License): Likewise.
1084         * modules/size_max (License): Likewise.
1085         * modules/vasnprintf (License): Likewise.
1086         * modules/wchar (License): Likewise.
1087         * modules/xsize (License): Likewise.
1088
1089 2007-07-13  Bruno Haible  <bruno@clisp.org>
1090
1091         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
1092         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
1093
1094 2007-07-12  Bruno Haible  <bruno@clisp.org>
1095
1096         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
1097         in the modules files.
1098
1099 2007-07-11  Karl Berry  <karl@gnu.org>
1100
1101         * MODULES.html.sh (func_module): use
1102          sed -e '\|^'"${includefile}"'$|d'
1103          instead of /.../d, to avoid errors on $includefile's containing /.
1104
1105 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
1106
1107         * gnulib-tool (func_import): Avoid duplication of --avoid
1108         statements
1109         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
1110         names to `_' in variable names.
1111
1112 2007-07-10  Eric Blake  <ebb9@byu.net>
1113
1114         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
1115         * NEWS: Document this change.
1116
1117 2007-07-08  Bruno Haible  <bruno@clisp.org>
1118
1119         Update to Unicode 5.0.
1120         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
1121         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
1122         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
1123         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
1124         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
1125         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
1126         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
1127         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
1128         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
1129         U+10A3F, U+1D242..U+1D244.
1130         (nonspacing_table_ind): Update.
1131         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
1132         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
1133
1134 2007-07-08  Bruno Haible  <bruno@clisp.org>
1135
1136         Update to Unicode 5.0.
1137         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
1138         code transform. Extend the name index field of unicode_name_to_code and
1139         unicode_code_to_name from 16 to 24 bits.
1140         * lib/uniname/uniname.c (unicode_character_name,
1141         unicode_name_character): Add the range 0x12xxx to the code transform.
1142         * lib/uniname/uninames.h: Regenerated.
1143         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
1144
1145 2007-07-07  Bruno Haible  <bruno@clisp.org>
1146
1147         * modules/wcwidth-tests: New file.
1148         * tests/test-wcwidth.c: New file.
1149
1150         Work around MacOS X wcwidth() bug.
1151         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
1152         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
1153         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
1154         original wcwidth in non-UTF-8 locales.
1155         * modules/wcwidth (Depends-on): Add localcharset, streq,
1156         uniwidth/width.
1157         * doc/functions/wcwidth.texi: Update.
1158
1159 2007-07-07  Bruno Haible  <bruno@clisp.org>
1160
1161         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
1162         (wcwidth): New declaration.
1163         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
1164         macros.
1165         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
1166         here. Prepare for creating <wchar.h> unconditionally.
1167         * modules/wchar (Depends-on): Add link-warning.
1168         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
1169         REPLACE_WCWIDTH, and GL_LINK_WARNING.
1170         * lib/wcwidth.h: Remove file.
1171         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
1172         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
1173         * modules/wcwidth (Files): Remove lib/wcwidth.h.
1174         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
1175         (Include): Replace wcwidth.h with <wchar.h>.
1176         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
1177         * lib/mbchar.h: Don't include wcwidth.h.
1178         * lib/mbswidth.c: Likewise.
1179         * NEWS: Mention the change.
1180
1181 2007-07-07  Bruno Haible  <bruno@clisp.org>
1182
1183         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
1184         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
1185         definition with an external declaration.
1186         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
1187         defined as a function. Remove AC_C_INLINE requirement.
1188         * modules/wcwidth (Files): Add lib/wcwidth.c.
1189         (Makefile.am): Remove redundant statement.
1190
1191 2007-07-07  Bruno Haible  <bruno@clisp.org>
1192
1193         * MODULES.html.sh (Unicode string functions): Add the new modules.
1194
1195         * tests/uniwidth/test-u32-strwidth.c: New file.
1196         * modules/uniwidth/u32-strwidth-tests: New file.
1197
1198         * lib/uniwidth/u32-strwidth.c: New file.
1199         * modules/uniwidth/u32-strwidth: New file.
1200
1201         * tests/uniwidth/test-u16-strwidth.c: New file.
1202         * modules/uniwidth/u16-strwidth-tests: New file.
1203
1204         * lib/uniwidth/u16-strwidth.c: New file.
1205         * modules/uniwidth/u16-strwidth: New file.
1206
1207         * tests/uniwidth/test-u8-strwidth.c: New file.
1208         * modules/uniwidth/u8-strwidth-tests: New file.
1209
1210         * lib/uniwidth/u8-strwidth.c: New file.
1211         * modules/uniwidth/u8-strwidth: New file.
1212
1213         * tests/uniwidth/test-u32-width.c: New file.
1214         * modules/uniwidth/u32-width-tests: New file.
1215
1216         * lib/uniwidth/u32-width.c: New file.
1217         * modules/uniwidth/u32-width: New file.
1218
1219         * tests/uniwidth/test-u16-width.c: New file.
1220         * modules/uniwidth/u16-width-tests: New file.
1221
1222         * lib/uniwidth/u16-width.c: New file.
1223         * modules/uniwidth/u16-width: New file.
1224
1225         * tests/uniwidth/test-u8-width.c: New file.
1226         * modules/uniwidth/u8-width-tests: New file.
1227
1228         * lib/uniwidth/u8-width.c: New file.
1229         * modules/uniwidth/u8-width: New file.
1230
1231         * tests/uniwidth/test-uc_width.c: New file.
1232         * modules/uniwidth/width-tests: New file.
1233
1234         * lib/uniwidth/width.c: New file, from GNU libiconv.
1235         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
1236         * modules/uniwidth/width: New file.
1237
1238         * lib/uniwidth.h: New file, from GNU libiconv.
1239         * modules/uniwidth/base: New file.
1240
1241 2007-07-07  Bruno Haible  <bruno@clisp.org>
1242
1243         * lib/uniname.h: New file, from GNU gettext.
1244         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
1245         * lib/uniname/uninames.h: New file, from GNU gettext.
1246         * lib/uniname/uniname.c: New file, from GNU gettext.
1247         * tests/uniname/test-uninames.sh: New file.
1248         * tests/uniname/test-uninames.c: New file, from GNU gettext.
1249         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
1250         * modules/uniname/base: New file.
1251         * modules/uniname/uniname: New file.
1252         * modules/uniname/uniname-tests: New file.
1253         * MODULES.html.sh (Unicode string functions): Add the new modules.
1254
1255 2007-07-06  Bruno Haible  <bruno@clisp.org>
1256
1257         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
1258
1259 2007-07-06  Bruno Haible  <bruno@clisp.org>
1260
1261         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
1262         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
1263         includes <cygwin/sys_time.h> which includes <sys/select.h> which
1264         include <sys/time.h>.
1265         Reported by Eric Blake.
1266
1267 2007-07-06  Eric Blake  <ebb9@byu.net>
1268
1269         Fix testing canonicalize on cygwin.
1270         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1271         Revert patch from 2007-06-19.
1272         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
1273         canonicalize module is also in use.
1274         * tests/test-canonicalize.c: New file.
1275         * tests/test-canonicalize.sh: Likewise.
1276         * modules/canonicalize-tests: Likewise.
1277
1278 2007-07-06  Jim Meyering  <jim@meyering.net>
1279
1280         * lib/getugroups.c (getugroups): Detect getgrent failure.
1281         Adjust comment to reflect reality: this function may return -1.
1282
1283 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
1284
1285         * build-aux/bootstrap (TP_URL,get_translations): Update to use
1286         the new TP address.
1287         (usage): Fix typo
1288         (gnulib_mk): New variable.
1289
1290 2007-07-05  Jim Meyering  <jim@meyering.net>
1291
1292         Don't let endgrent clobber errno, no matter how improbable.
1293         * lib/getugroups.c (getugroups): Save and restore errno around
1294         endgrent call.
1295
1296         Close the group DB even when failing with 2^31 or more members.
1297         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
1298
1299 2007-07-04  Jim Meyering  <jim@meyering.net>
1300
1301         * lib/getugroups.h: New file.
1302         * lib/getugroups.c: Include "getugroups.h".
1303         Remove uses of "register" keyword.
1304         Move local variable, "cp", down into scope where used.
1305         Give "username" parameter the "const" attribute.
1306         * modules/getugroups (Files): Add lib/getugroups.h
1307
1308 2007-07-04  Karl Berry  <karl@gnu.org>
1309
1310         * MODULES.html.sh (func_all_modules): Complete rename of
1311         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
1312
1313 2007-07-02  Bruno Haible  <bruno@clisp.org>
1314
1315         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
1316         mode, when inttypes.h comes from gnulib.
1317         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1318
1319 2007-07-02  Simon Josefsson  <simon@josefsson.org>
1320
1321         * NEWS: Mention lgpl module name change.
1322
1323         * modules/lgpl-2.1: Renamed from lgpl.
1324
1325         * NEWS: Mention gpl module name change.
1326
1327         * modules/gpl-3.0: New file, based on gpl-2.0.
1328
1329         * modules/gpl-2.0: Renamed from gpl.
1330
1331         * modules/gpl: Fix filename, doc/gpl.texi is now found at
1332         doc/gpl-2.0.texi.
1333
1334 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
1335
1336         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
1337         #define __STDC_LIMIT_MACROS temporarily while including
1338         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
1339         Problem reported by Joel E. Denny in
1340         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
1341
1342 2007-07-01  Bruno Haible  <bruno@clisp.org>
1343
1344         * lib/unistdio.h: New file.
1345         * lib/unistdio/u-asnprintf.h: New file.
1346         * lib/unistdio/u-asprintf.h: New file.
1347         * lib/unistdio/u-printf-args.c: New file.
1348         * lib/unistdio/u-printf-args.h: New file.
1349         * lib/unistdio/u-printf-parse.h: New file.
1350         * lib/unistdio/u-snprintf.h: New file.
1351         * lib/unistdio/u-sprintf.h: New file.
1352         * lib/unistdio/u-vasprintf.h: New file.
1353         * lib/unistdio/u-vsnprintf.h: New file.
1354         * lib/unistdio/u-vsprintf.h: New file.
1355         * lib/unistdio/ulc-asnprintf.c: New file.
1356         * lib/unistdio/ulc-asprintf.c: New file.
1357         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
1358         * lib/unistdio/ulc-printf-parse.c: New file.
1359         * lib/unistdio/ulc-snprintf.c: New file.
1360         * lib/unistdio/ulc-sprintf.c: New file.
1361         * lib/unistdio/ulc-vasnprintf.c: New file.
1362         * lib/unistdio/ulc-vasprintf.c: New file.
1363         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
1364         * lib/unistdio/ulc-vsnprintf.c: New file.
1365         * lib/unistdio/ulc-vsprintf.c: New file.
1366         * lib/unistdio/u8-asnprintf.c: New file.
1367         * lib/unistdio/u8-asprintf.c: New file.
1368         * lib/unistdio/u8-printf-parse.c: New file.
1369         * lib/unistdio/u8-snprintf.c: New file.
1370         * lib/unistdio/u8-sprintf.c: New file.
1371         * lib/unistdio/u8-vasnprintf.c: New file.
1372         * lib/unistdio/u8-vasprintf.c: New file.
1373         * lib/unistdio/u8-vsnprintf.c: New file.
1374         * lib/unistdio/u8-vsprintf.c: New file.
1375         * lib/unistdio/u8-u8-asnprintf.c: New file.
1376         * lib/unistdio/u8-u8-asprintf.c: New file.
1377         * lib/unistdio/u8-u8-snprintf.c: New file.
1378         * lib/unistdio/u8-u8-sprintf.c: New file.
1379         * lib/unistdio/u8-u8-vasnprintf.c: New file.
1380         * lib/unistdio/u8-u8-vasprintf.c: New file.
1381         * lib/unistdio/u8-u8-vsnprintf.c: New file.
1382         * lib/unistdio/u8-u8-vsprintf.c: New file.
1383         * lib/unistdio/u16-asnprintf.c: New file.
1384         * lib/unistdio/u16-asprintf.c: New file.
1385         * lib/unistdio/u16-printf-parse.c: New file.
1386         * lib/unistdio/u16-snprintf.c: New file.
1387         * lib/unistdio/u16-sprintf.c: New file.
1388         * lib/unistdio/u16-vasnprintf.c: New file.
1389         * lib/unistdio/u16-vasprintf.c: New file.
1390         * lib/unistdio/u16-vsnprintf.c: New file.
1391         * lib/unistdio/u16-vsprintf.c: New file.
1392         * lib/unistdio/u16-u16-asnprintf.c: New file.
1393         * lib/unistdio/u16-u16-asprintf.c: New file.
1394         * lib/unistdio/u16-u16-snprintf.c: New file.
1395         * lib/unistdio/u16-u16-sprintf.c: New file.
1396         * lib/unistdio/u16-u16-vasnprintf.c: New file.
1397         * lib/unistdio/u16-u16-vasprintf.c: New file.
1398         * lib/unistdio/u16-u16-vsnprintf.c: New file.
1399         * lib/unistdio/u16-u16-vsprintf.c: New file.
1400         * lib/unistdio/u32-asnprintf.c: New file.
1401         * lib/unistdio/u32-asprintf.c: New file.
1402         * lib/unistdio/u32-printf-parse.c: New file.
1403         * lib/unistdio/u32-snprintf.c: New file.
1404         * lib/unistdio/u32-sprintf.c: New file.
1405         * lib/unistdio/u32-vasnprintf.c: New file.
1406         * lib/unistdio/u32-vasprintf.c: New file.
1407         * lib/unistdio/u32-vsnprintf.c: New file.
1408         * lib/unistdio/u32-vsprintf.c: New file.
1409         * lib/unistdio/u32-u32-asnprintf.c: New file.
1410         * lib/unistdio/u32-u32-asprintf.c: New file.
1411         * lib/unistdio/u32-u32-snprintf.c: New file.
1412         * lib/unistdio/u32-u32-sprintf.c: New file.
1413         * lib/unistdio/u32-u32-vasnprintf.c: New file.
1414         * lib/unistdio/u32-u32-vasprintf.c: New file.
1415         * lib/unistdio/u32-u32-vsnprintf.c: New file.
1416         * lib/unistdio/u32-u32-vsprintf.c: New file.
1417         * tests/unistdio/test-ulc-asnprintf1.c: New file.
1418         * tests/unistdio/test-ulc-asnprintf1.h: New file.
1419         * tests/unistdio/test-ulc-printf1.h: New file.
1420         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
1421         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
1422         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
1423         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
1424         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
1425         * tests/unistdio/test-ulc-vasprintf1.c: New file.
1426         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
1427         * tests/unistdio/test-ulc-vsprintf1.c: New file.
1428         * tests/unistdio/test-u8-asnprintf1.c: New file.
1429         * tests/unistdio/test-u8-asnprintf1.h: New file.
1430         * tests/unistdio/test-u8-printf1.h: New file.
1431         * tests/unistdio/test-u8-vasnprintf1.c: New file.
1432         * tests/unistdio/test-u8-vasnprintf2.c: New file.
1433         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
1434         * tests/unistdio/test-u8-vasnprintf3.c: New file.
1435         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
1436         * tests/unistdio/test-u8-vasprintf1.c: New file.
1437         * tests/unistdio/test-u8-vsnprintf1.c: New file.
1438         * tests/unistdio/test-u8-vsprintf1.c: New file.
1439         * tests/unistdio/test-u16-asnprintf1.c: New file.
1440         * tests/unistdio/test-u16-asnprintf1.h: New file.
1441         * tests/unistdio/test-u16-printf1.h: New file.
1442         * tests/unistdio/test-u16-vasnprintf1.c: New file.
1443         * tests/unistdio/test-u16-vasnprintf2.c: New file.
1444         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
1445         * tests/unistdio/test-u16-vasnprintf3.c: New file.
1446         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
1447         * tests/unistdio/test-u16-vasprintf1.c: New file.
1448         * tests/unistdio/test-u16-vsnprintf1.c: New file.
1449         * tests/unistdio/test-u16-vsprintf1.c: New file.
1450         * tests/unistdio/test-u32-asnprintf1.c: New file.
1451         * tests/unistdio/test-u32-asnprintf1.h: New file.
1452         * tests/unistdio/test-u32-printf1.h: New file.
1453         * tests/unistdio/test-u32-vasnprintf1.c: New file.
1454         * tests/unistdio/test-u32-vasnprintf2.c: New file.
1455         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
1456         * tests/unistdio/test-u32-vasnprintf3.c: New file.
1457         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
1458         * tests/unistdio/test-u32-vasprintf1.c: New file.
1459         * tests/unistdio/test-u32-vsnprintf1.c: New file.
1460         * tests/unistdio/test-u32-vsprintf1.c: New file.
1461         * modules/unistdio/base: New file.
1462         * modules/unistdio/u-printf-args: New file.
1463         * modules/unistdio/ulc-asnprintf: New file.
1464         * modules/unistdio/ulc-asprintf: New file.
1465         * modules/unistdio/ulc-fprintf: New file.
1466         * modules/unistdio/ulc-printf-parse: New file.
1467         * modules/unistdio/ulc-snprintf: New file.
1468         * modules/unistdio/ulc-sprintf: New file.
1469         * modules/unistdio/ulc-vasnprintf: New file.
1470         * modules/unistdio/ulc-vasprintf: New file.
1471         * modules/unistdio/ulc-vfprintf: New file.
1472         * modules/unistdio/ulc-vsnprintf: New file.
1473         * modules/unistdio/ulc-vsprintf: New file.
1474         * modules/unistdio/u8-asnprintf: New file.
1475         * modules/unistdio/u8-asprintf: New file.
1476         * modules/unistdio/u8-printf-parse: New file.
1477         * modules/unistdio/u8-snprintf: New file.
1478         * modules/unistdio/u8-sprintf: New file.
1479         * modules/unistdio/u8-vasnprintf: New file.
1480         * modules/unistdio/u8-vasprintf: New file.
1481         * modules/unistdio/u8-vsnprintf: New file.
1482         * modules/unistdio/u8-vsprintf: New file.
1483         * modules/unistdio/u8-u8-asnprintf: New file.
1484         * modules/unistdio/u8-u8-asprintf: New file.
1485         * modules/unistdio/u8-u8-snprintf: New file.
1486         * modules/unistdio/u8-u8-sprintf: New file.
1487         * modules/unistdio/u8-u8-vasnprintf: New file.
1488         * modules/unistdio/u8-u8-vasprintf: New file.
1489         * modules/unistdio/u8-u8-vsnprintf: New file.
1490         * modules/unistdio/u8-u8-vsprintf: New file.
1491         * modules/unistdio/u16-asnprintf: New file.
1492         * modules/unistdio/u16-asprintf: New file.
1493         * modules/unistdio/u16-printf-parse: New file.
1494         * modules/unistdio/u16-snprintf: New file.
1495         * modules/unistdio/u16-sprintf: New file.
1496         * modules/unistdio/u16-vasnprintf: New file.
1497         * modules/unistdio/u16-vasprintf: New file.
1498         * modules/unistdio/u16-vsnprintf: New file.
1499         * modules/unistdio/u16-vsprintf: New file.
1500         * modules/unistdio/u16-u16-asnprintf: New file.
1501         * modules/unistdio/u16-u16-asprintf: New file.
1502         * modules/unistdio/u16-u16-snprintf: New file.
1503         * modules/unistdio/u16-u16-sprintf: New file.
1504         * modules/unistdio/u16-u16-vasnprintf: New file.
1505         * modules/unistdio/u16-u16-vasprintf: New file.
1506         * modules/unistdio/u16-u16-vsnprintf: New file.
1507         * modules/unistdio/u16-u16-vsprintf: New file.
1508         * modules/unistdio/u32-asnprintf: New file.
1509         * modules/unistdio/u32-asprintf: New file.
1510         * modules/unistdio/u32-printf-parse: New file.
1511         * modules/unistdio/u32-snprintf: New file.
1512         * modules/unistdio/u32-sprintf: New file.
1513         * modules/unistdio/u32-vasnprintf: New file.
1514         * modules/unistdio/u32-vasprintf: New file.
1515         * modules/unistdio/u32-vsnprintf: New file.
1516         * modules/unistdio/u32-vsprintf: New file.
1517         * modules/unistdio/u32-u32-asnprintf: New file.
1518         * modules/unistdio/u32-u32-asprintf: New file.
1519         * modules/unistdio/u32-u32-snprintf: New file.
1520         * modules/unistdio/u32-u32-sprintf: New file.
1521         * modules/unistdio/u32-u32-vasnprintf: New file.
1522         * modules/unistdio/u32-u32-vasprintf: New file.
1523         * modules/unistdio/u32-u32-vsnprintf: New file.
1524         * modules/unistdio/u32-u32-vsprintf: New file.
1525         * modules/unistdio/ulc-asnprintf-tests: New file.
1526         * modules/unistdio/ulc-vasnprintf-tests: New file.
1527         * modules/unistdio/ulc-vasprintf-tests: New file.
1528         * modules/unistdio/ulc-vsnprintf-tests: New file.
1529         * modules/unistdio/ulc-vsprintf-tests: New file.
1530         * modules/unistdio/u8-asnprintf-tests: New file.
1531         * modules/unistdio/u8-vasnprintf-tests: New file.
1532         * modules/unistdio/u8-vasprintf-tests: New file.
1533         * modules/unistdio/u8-vsnprintf-tests: New file.
1534         * modules/unistdio/u8-vsprintf-tests: New file.
1535         * modules/unistdio/u16-asnprintf-tests: New file.
1536         * modules/unistdio/u16-vasnprintf-tests: New file.
1537         * modules/unistdio/u16-vasprintf-tests: New file.
1538         * modules/unistdio/u16-vsnprintf-tests: New file.
1539         * modules/unistdio/u16-vsprintf-tests: New file.
1540         * modules/unistdio/u32-asnprintf-tests: New file.
1541         * modules/unistdio/u32-vasnprintf-tests: New file.
1542         * modules/unistdio/u32-vasprintf-tests: New file.
1543         * modules/unistdio/u32-vsnprintf-tests: New file.
1544         * modules/unistdio/u32-vsprintf-tests: New file.
1545         * MODULES.html.sh (Unicode string functions): Add the new modules.
1546
1547 2007-07-01  Bruno Haible  <bruno@clisp.org>
1548
1549         * lib/sprintf.c (sprintf): Limit the available length estimation,
1550         to avoid address wraparound.
1551         * lib/vsprintf.c (vsprintf): Likewise.
1552         * modules/sprintf-posix (Dependencies): Add stdint.
1553         * modules/vsprintf-posix (Dependencies): Likewise.
1554
1555 2007-07-01  Bruno Haible  <bruno@clisp.org>
1556
1557         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
1558         Windows PATH as well. Conservative double-quoting. Comments.
1559
1560 2007-07-01  Bruno Haible  <bruno@clisp.org>
1561             Eric Blake  <ebb9@byu.net>
1562             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1563
1564         * gnulib-tool (self_abspathname): Fix algorithm to cope with
1565         empty components in $PATH, denoting '.'.
1566
1567 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1568
1569         * gnulib-tool: Fix indentation.
1570         (func_create_megatestdir): Likewise.
1571         Report by Bruno Haible.
1572
1573 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1574
1575         Sync from Automake.
1576         * build-aux/gnupload: Fix shell portability issues with for loops.
1577         Report by Karl Berry.
1578
1579 2007-06-29  Simon Josefsson  <simon@josefsson.org>
1580
1581         * build-aux/maint.mk (POURL): Use translationproject.org.
1582
1583 2007-06-27  Simon Josefsson  <simon@josefsson.org>
1584             Bruno Haible  <bruno@clisp.org>
1585
1586         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
1587         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
1588         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
1589         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
1590         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
1591
1592 2007-06-27  Bruno Haible  <bruno@clisp.org>
1593
1594         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
1595         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
1596
1597 2007-06-26  Karl Berry  <karl@gnu.org>
1598
1599         * MODULES.html.sh: remove xreadlink-with-size.
1600
1601 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1602
1603         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
1604         method that I hope also handles the double-include problem noted
1605         by Bruno Haible in
1606         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
1607
1608 2007-06-23  Bruno Haible  <bruno@clisp.org>
1609
1610         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1611         Don't let the 'mostlyclean' target fail if the last subdirectory could
1612         not be removed.
1613         Reported by Karl Berry.
1614
1615 2007-06-23  Bruno Haible  <bruno@clisp.org>
1616
1617         * gnulib-tool (echo): Add a speedier workaround for ksh.
1618         * tests/test-echo.sh: Likewise.
1619
1620 2007-06-23  Bruno Haible  <bruno@clisp.org>
1621
1622         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
1623         * tests/test-echo.sh: Likewise.
1624
1625 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1626
1627         * gnulib-tool (IFS): Initialize early, so we don't set it to
1628         empty later.
1629         (self_abspathname): Rewrite algorithm to set it, reindent.
1630         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
1631         (func_create_megatestdir): Merge some sed scripts.
1632
1633 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1634
1635         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
1636         exposed by Sun Studio 11 cc on Solaris 8.
1637
1638 2007-06-22  Bruno Haible  <bruno@clisp.org>
1639
1640         * gnulib-tool (echo): Ensure the echo primitive does not interpret
1641         backslashes.
1642         * tests/test-echo.sh: New file.
1643
1644 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1645
1646         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
1647         simplify `sed_replace_build_aux' scripts, they are portable but
1648         echoing them with `echo' is not.
1649         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
1650
1651 2007-06-21  Karl Berry  <karl@gnu.org>
1652
1653         * config/srclist.txt: guess we can't handle the licenses via
1654         srclist at the moment.
1655
1656 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
1657
1658         * MODULES.html.sh: Add include_next.
1659         * modules/include_next: New file.
1660
1661 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
1662
1663         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
1664         INCLUDE_NEXT.
1665         (gl_CHECK_NEXT_HEADERS): New macro.
1666         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
1667         the obsolescent gl_ABSOLUTE_HEADER.
1668         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
1669         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
1670         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
1671         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
1672         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
1673         * m4/math_h.m4 (gl_MATH_H): Likewise.
1674         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
1675         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
1676         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
1677         * m4/stdint.m4 (gl_STDINT_H): Likewise.
1678         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
1679         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
1680         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
1681         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
1682         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
1683         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
1684         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
1685         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
1686         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
1687         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
1688         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
1689         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1690         * m4/inttypes.m4 (gl_INTTYPES_H): Define
1691         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
1692         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
1693         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
1694         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
1695         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
1696         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
1697         * lib/float_.h: Likewise.
1698         * lib/inttypes_.h: Likewise.
1699         * lib/math_.h: Likewise.
1700         * lib/search_.h: Likewise.
1701         * lib/signal_.h: Likewise.
1702         * lib/stdint_.h: Likewise.
1703         * lib/stdio_.h: Likewise.
1704         * lib/stdlib_.h: Likewise.
1705         * lib/string_.h: Likewise.
1706         * lib/sys_stat_.h: Likewise.
1707         * lib/sys_time_.h: Likewise.
1708         * lib/time_.h: Likewise.
1709         * lib/unistd_.h: Likewise.
1710         * lib/wchar_.h: Likewise.
1711         * lib/wctype_.h: Likewise.
1712         * lib/dirent_.h: Likewise.
1713         * lib/iconv_.h: Likewise.
1714         * lib/locale_.h: Likewise.
1715         * lib/netinet_in_.h: Likewise.
1716         * lib/sys_select_.h: Likewise.
1717         * lib/sys_socket_.h: Likewise.
1718         * lib/sysexits_.h: Likewise.
1719         * modules/fcntl (Depends-on): Depend on include_next, not
1720         absolute_header.
1721         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
1722         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
1723         * modules/fchdir: Likewise.
1724         * modules/float: Likewise.
1725         * modules/iconv_open: Likewise.
1726         * modules/inttypes: Likewise.
1727         * modules/locale: Likewise.
1728         * modules/math: Likewise.
1729         * modules/netinet_in: Likewise.
1730         * modules/search: Likewise.
1731         * modules/signal: Likewise.
1732         * modules/stdint: Likewise.
1733         * modules/stdio: Likewise.
1734         * modules/stdlib: Likewise.
1735         * modules/string: Likewise.
1736         * modules/sys_select: Likewise.
1737         * modules/sys_socket: Likewise.
1738         * modules/sys_stat: Likewise.
1739         * modules/sys_time: Likewise.
1740         * modules/sysexits: Likewise.
1741         * modules/time: Likewise.
1742         * modules/unistd: Likewise.
1743         * modules/wchar: Likewise.
1744         * modules/wctype: Likewise.
1745         * modules/sys_stat: Change maintainer to "all".
1746         * modules/unistd: Likewise.
1747
1748 2007-06-20  Karl Berry  <karl@gnu.org>
1749
1750         * config/srclist.txt: track www changes in license files.
1751
1752 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
1753
1754         * build-aux/bootstrap: Remove stray dot.
1755         Make sure build_aux settings are honored when linking
1756         gnulib_extra_files.
1757
1758 2007-06-19  Eric Blake  <ebb9@byu.net>
1759
1760         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1761         Allow compilation on cygwin.
1762
1763 2007-06-19  Jim Meyering  <jim@meyering.net>
1764
1765         xreadlink-with-size: Remove module.  No longer used.
1766         Ex-callers now use xreadlink or mreadlink-with-size.
1767         * modules/xreadlink-with-size: Remove module.
1768         * lib/xreadlink-with-size.c: Remove file.
1769         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
1770         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
1771         just before the function definition *is* accurate.
1772
1773         Eliminate one way canonicalize_filename_mode could exit.
1774         * lib/canonicalize.c (canonicalize_filename_mode):
1775         Use mreadlink_with_size, not xreadlink_with_size.
1776
1777 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
1778
1779         Detect porting problems to FreeBSD/arm, which has time_t wider than
1780         long int.  Original problem reported for GNU diff by Xin Li in
1781         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
1782         * modules/getdate (Depends-on): Add intprops, verify.
1783         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
1784         is an integer type no wider than long int.
1785
1786 2007-06-18  Jim Meyering  <jim@meyering.net>
1787
1788         New module: mreadlink-with-size.
1789         * MODULES.html.sh: Add mreadlink-with-size.
1790         * modules/mreadlink-with-size: New module
1791         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
1792         not xreadlink-with-size.
1793         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
1794
1795 2007-06-16  Bruno Haible  <bruno@clisp.org>
1796
1797         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
1798         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
1799         Reported by Gary V. Vaughan <gary@gnu.org>.
1800
1801 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
1802
1803         Revamp lchown so that it lives in unistd.h where it belongs.
1804         * lib/lchown.h: Remove.
1805         * lib/dirchownmod.c: Don't include lib/lchown.h.
1806         * lib/fchownat.c: Likewise.
1807         * lib/openat.c: Likewise.
1808         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
1809         does not follow symlinks.
1810         (EOPNOTSUPP): Define if not defined.
1811         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
1812         is defined to 0.
1813         (lchown): New decl.
1814         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
1815         Do not check for lchown decl.
1816         Set REPLACE_LCHOWN.
1817         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
1818         REPLACE_LCHOWN.
1819         * modules/chown: Make it clear it follows symlinks.
1820         * modules/lchown: Make it clear it doesn't follow symlinks.
1821         (Files): Remove lib/lchown.h
1822         (Depends-on): Add unistd.
1823         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
1824         (Include): Include <unistd.h>, not "lchown.h".
1825         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
1826         REPLACE_LCHOWN.
1827
1828 2007-06-15  Jim Meyering  <jim@meyering.net>
1829
1830         Change license (GPL to LGPL) of fsusage and dependents.
1831         * modules/fsusage (License): Change to LGPL.
1832         * modules/full-read (License): Likewise.
1833         * modules/full-write (License): Likewise.
1834         * modules/safe-read (License): Likewise.
1835         * modules/safe-write (License): Likewise.
1836
1837 2007-06-14  Ben Pfaff  <blp@gnu.org>
1838
1839         Missing part of allocsa -> malloca transition.
1840         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
1841         gl_MALLOCA.
1842
1843 2007-06-12  Bruno Haible  <bruno@clisp.org>
1844
1845         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
1846         to ia64, x86_64, i386.
1847         Reported by Eric Blake.
1848
1849 2007-06-12  Bruno Haible  <bruno@clisp.org>
1850
1851         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
1852         cross-compiling to x86_64.
1853
1854 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
1855
1856         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
1857         glitch reported by Ralf Wildenhues in
1858         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
1859
1860         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
1861         Vin Shelton.
1862
1863 2007-06-11  Bruno Haible  <bruno@clisp.org>
1864
1865         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
1866         replacement string.
1867         Reported by Eric Blake.
1868
1869 2007-06-10  Bruno Haible  <bruno@clisp.org>
1870
1871         Prepare vasnprintf code for use with Unicode strings.
1872         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
1873         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
1874         TYPE_U32_STRING.
1875         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
1876         a_u32_string variants.
1877         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1878         * lib/printf-args.c: Don't include config.h and the specification
1879         header if PRINTF_FETCHARGS is already defined.
1880         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1881         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
1882         TYPE_U16_STRING, TYPE_U32_STRING.
1883         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
1884         u16_directive, u16_directives, u32_directive, u32_directives): New
1885         types.
1886         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
1887         New declarations.
1888         * lib/printf-parse.c: Don't include config.h and the specification
1889         header if PRINTF_PARSE is already defined. Eliminate the set of
1890         parameters for WIDE_CHAR_VERSION; the user of this file must provide
1891         them now. Include c-ctype.h.
1892         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
1893         directive and CHAR_T_ONLY_ASCII.
1894         * lib/vasnprintf.c: Don't include config.h and the specification header
1895         if VASNPRINTF is already defined.
1896         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
1897         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
1898         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
1899         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
1900         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
1901         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
1902         code accordingly.
1903         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
1904         pad_ourselves also in this case, with the 'c' and 's' directives, and
1905         with a different notion of "width".
1906         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
1907
1908 2007-06-10  Bruno Haible  <bruno@clisp.org>
1909
1910         * modules/unistr/u32-mbsnlen: New file.
1911         * lib/unistr/u32-mbsnlen.c: New file.
1912
1913         * modules/unistr/u16-mbsnlen: New file.
1914         * lib/unistr/u16-mbsnlen.c: New file.
1915
1916         * modules/unistr/u8-mbsnlen: New file.
1917         * lib/unistr/u8-mbsnlen.c: New file.
1918
1919         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
1920         declarations.
1921
1922 2007-06-10  Bruno Haible  <bruno@clisp.org>
1923
1924         * lib/string_.h (mbsnlen): New declaration.
1925         * lib/mbsnlen.c: New file.
1926         * m4/mbsnlen.m4: New file.
1927         * modules/mbsnlen: New file.
1928         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
1929         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
1930         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
1931
1932 2007-06-10  Bruno Haible  <bruno@clisp.org>
1933
1934         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
1935
1936 2007-06-10  Bruno Haible  <bruno@clisp.org>
1937
1938         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
1939         * lib/mbuiter.h: Likewise.
1940
1941 2007-06-10  Bruno Haible  <bruno@clisp.org>
1942
1943         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
1944         declaration.
1945
1946 2007-06-10  Karl Berry  <karl@gnu.org>
1947
1948         * config/srclist.txt: remove gettext entries, Bruno prefers
1949         to update individually.
1950
1951 2007-06-10  Bruno Haible  <bruno@clisp.org>
1952
1953         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
1954         'maxlen'. Ensure only length + width bytes are allocated, not
1955         length + 1 + width.
1956
1957 2007-06-09  Bruno Haible  <bruno@clisp.org>
1958
1959         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
1960         (CHAR_T): Remove macro.
1961         (VASNPRINTF): Update.
1962
1963 2007-06-09  Bruno Haible  <bruno@clisp.org>
1964
1965         * MODULES.html.sh (Unicode string functions): Add the new modules.
1966
1967         * modules/uniconv/u32-conv-to-enc: New file.
1968         * lib/uniconv/u32-conv-to-enc.c: New file.
1969         * modules/uniconv/u32-conv-to-enc-tests: New file.
1970         * tests/uniconv/test-u32-conv-to-enc.c: New file.
1971
1972         * modules/uniconv/u16-conv-to-enc: New file.
1973         * lib/uniconv/u16-conv-to-enc.c: New file.
1974         * lib/uniconv/u-conv-to-enc.h: New file.
1975         * modules/uniconv/u16-conv-to-enc-tests: New file.
1976         * tests/uniconv/test-u16-conv-to-enc.c: New file.
1977
1978         * modules/uniconv/u8-conv-to-enc: New file.
1979         * lib/uniconv/u8-conv-to-enc.c: New file.
1980         * modules/uniconv/u8-conv-to-enc-tests: New file.
1981         * tests/uniconv/test-u8-conv-to-enc.c: New file.
1982
1983         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
1984         u32_conv_to_encoding): New declarations.
1985
1986 2007-06-09  Bruno Haible  <bruno@clisp.org>
1987
1988         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
1989
1990 2007-06-09  Bruno Haible  <bruno@clisp.org>
1991
1992         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
1993         * modules/malloca: Renamed from modules/allocsa, updated.
1994         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
1995         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
1996         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
1997         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
1998         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
1999         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
2000         * modules/xmalloca: Renamed from modules/xallocsa, updated.
2001         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
2002         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
2003         * modules/c-strcasestr (Depends-on): Update.
2004         * lib/c-strcasestr.c: Update.
2005         * modules/c-strstr (Depends-on): Update.
2006         * lib/c-strstr.c: Update.
2007         * modules/canonicalize-lgpl (Depends-on): Update.
2008         * lib/canonicalize-lgpl.c: Update.
2009         * modules/clean-temp (Depends-on): Update.
2010         * lib/clean-temp.c: Update.
2011         * modules/csharpcomp (Depends-on): Update.
2012         * lib/csharpcomp.c: Update.
2013         * modules/csharpexec (Depends-on): Update.
2014         * lib/csharpexec.c: Update.
2015         * modules/javacomp (Depends-on): Update.
2016         * lib/javacomp.c: Update.
2017         * modules/javaexec (Depends-on): Update.
2018         * lib/javaexec.c: Update.
2019         * modules/mbscasestr (Depends-on): Update.
2020         * lib/mbscasestr.c: Update.
2021         * modules/mbsstr (Depends-on): Update.
2022         * lib/mbsstr.c: Update.
2023         * modules/setenv (Depends-on): Update.
2024         * lib/setenv.c: Update.
2025         * modules/strcasestr (Depends-on): Update.
2026         * lib/strcasestr.c: Update.
2027         * modules/striconveha (Depends-on): Update.
2028         * lib/striconveha.c: Update.
2029         * modules/relocatable-prog-wrapper (Files): Update.
2030         * lib/relocwrapper.c: Update.
2031         * build-aux/install-reloc: Update.
2032         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
2033
2034 2007-06-08  Bruno Haible  <bruno@clisp.org>
2035
2036         Port to uClibc.
2037         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
2038         * lib/fpurge.c (fpurge): Likewise.
2039         * lib/freading.c (freading): Likewise.
2040         * lib/fseeko.c (rpl_fseeko): Likewise.
2041         * lib/fseterr.c (fseterr): Likewise.
2042         * lib/fwriting.c (fwriting): Likewise.
2043         * tests/test-fflush.c (main): Avoid a failure on uClibc.
2044
2045 2007-06-08  Bruno Haible  <bruno@clisp.org>
2046
2047         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
2048         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
2049         * modules/gettext (Files): Add m4/intlmacosx.m4.
2050
2051 2007-06-07  Bruno Haible  <bruno@clisp.org>
2052
2053         * modules/localename-tests: New file.
2054         * tests/test-localename.c: New file.
2055
2056         New module 'localename'.
2057         * lib/localename.h: New file.
2058         * lib/localename.c: New file, from GNU gettext.
2059         * m4/localename.m4: New file.
2060         * modules/localename: New file.
2061
2062 2007-06-07  Bruno Haible  <bruno@clisp.org>
2063
2064         Work around the lack of <wchar.h> on some builds of uClibc.
2065         * doc/headers/wchar.texi: Update.
2066         * lib/wchar_.h: Include <wchar.h> only if it exists.
2067         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
2068         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
2069         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
2070         doesn't exist.
2071         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
2072         * modules/mbfile (Depends-on): Add wchar.
2073         * modules/mbiter (Depends-on): Likewise.
2074         * modules/mbuiter (Depends-on): Likewise.
2075         Reported by Simon Josefsson.
2076
2077 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
2078
2079         Work around problem reported by Steven M. Schweda in
2080         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
2081         Tru64 5.1B with the Compaq compiler environment installed declares
2082         an 'isblank' function but does not define it in the C library.
2083         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
2084         * lib/regex_internal.h (isblank): Likewise.
2085         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
2086         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2087
2088 2007-06-05  Bruno Haible  <bruno@clisp.org>
2089
2090         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
2091         ia64.
2092         * modules/printf-safe: New file.
2093         * modules/fprintf-posix (Depends-on): Add printf-safe.
2094         * modules/printf-posix (Depends-on): Likewise.
2095         * modules/snprintf-posix (Depends-on): Likewise.
2096         * modules/sprintf-posix (Depends-on): Likewise.
2097         * modules/vasnprintf-posix (Depends-on): Likewise.
2098         * modules/vasprintf-posix (Depends-on): Likewise.
2099         * modules/vfprintf-posix (Depends-on): Likewise.
2100         * modules/vprintf-posix (Depends-on): Likewise.
2101         * modules/vsnprintf-posix (Depends-on): Likewise.
2102         * modules/vsprintf-posix (Depends-on): Likewise.
2103         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
2104         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
2105         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
2106         "no" on i386, x86_64, ia64.
2107         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
2108         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2109         on i386, x86_64, ia64.
2110         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
2111         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2112         on i386, x86_64, ia64.
2113         * tests/test-vasnprintf-posix.c: Include float.h.
2114         (LDBL80_WORDS): New macro.
2115         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2116         on i386, x86_64, ia64.
2117         * tests/test-vasprintf-posix.c: Include float.h.
2118         (LDBL80_WORDS): New macro.
2119         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2120         on i386, x86_64, ia64.
2121         * tests/test-snprintf-posix.c: Include float.h.
2122         * tests/test-sprintf-posix.c: Likewise.
2123         * tests/test-vsnprintf-posix.c: Likewise.
2124         * tests/test-vsprintf-posix.c: Likewise.
2125
2126 2007-06-05  Bruno Haible  <bruno@clisp.org>
2127
2128         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
2129         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
2130         non-IEEE numbers on i386, x86_64, ia64.
2131         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
2132         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
2133         * tests/test-isnanl.h: Include float.h.
2134         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
2135
2136 2007-06-05  Bruno Haible  <bruno@clisp.org>
2137
2138         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
2139         also the %a / %A. Handle the %a / %A code before this extra handling.
2140
2141 2007-06-05  Bruno Haible  <bruno@clisp.org>
2142
2143         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
2144         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
2145
2146 2007-06-05  Bruno Haible  <bruno@clisp.org>
2147
2148         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
2149         typo in variable name.
2150
2151 2007-06-05  Eric Blake  <ebb9@byu.net>
2152
2153         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
2154         Reported by Simon Josefsson.
2155
2156 2007-06-04  Bruno Haible  <bruno@clisp.org>
2157
2158         Avoid test failures on some PowerPC platforms.
2159         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
2160         Define differently for PowerPC.
2161         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
2162         Reported by Gary V. Vaughan <gary@gnu.org>.
2163
2164 2007-06-02  Bruno Haible  <bruno@clisp.org>
2165
2166         Fix test-stdint failure on FreeBSD/ia64.
2167         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
2168         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
2169         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
2170         * doc/headers/stdint.texi: Update.
2171
2172 2007-06-01  Bruno Haible  <bruno@clisp.org>
2173
2174         * tests/test-binary-io.c (main): Pass a third argument to open().
2175         Reported by Gary V. Vaughan <gary@gnu.org>.
2176
2177 2007-06-01  Bruno Haible  <bruno@clisp.org>
2178
2179         * doc/functions/frexpl.texi: Update for mingw.
2180
2181 2007-06-01  Bruno Haible  <bruno@clisp.org>
2182
2183         * tests/test-lseek.c (main): Disable test of errno for invalid third
2184         argument.
2185         * doc/functions/lseek.texi: Update.
2186         Reported by Gary V. Vaughan <gary@gnu.org>.
2187
2188 2007-05-28  Bruno Haible  <bruno@clisp.org>
2189
2190         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
2191
2192 2007-05-31  Eric Blake  <ebb9@byu.net>
2193
2194         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
2195         cross compiling.
2196
2197 2007-05-30  Eric Blake  <ebb9@byu.net>
2198         and Bruno Haible  <bruno@clisp.org>
2199
2200         Work around mingw test failures exposed by m4-1.4.9b.
2201         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
2202         * tests/test-unistd.c: Disable uid_t and git_t tests for the
2203         moment.
2204
2205 2007-05-30  Bruno Haible  <bruno@clisp.org>
2206
2207         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
2208         assuming that they are closed. Needed on HP-UX 11.
2209
2210 2007-05-29  Bruno Haible  <bruno@clisp.org>
2211
2212         Fix a problem with #include_next.
2213         * lib/dirent_.h: Split the double-inclusion guard.
2214         * lib/fcntl_.h: Likewise.
2215         * lib/float_.h: Likewise.
2216         * lib/iconv_.h: Likewise.
2217         * lib/inttypes_.h: Likewise.
2218         * lib/locale_.h: Likewise.
2219         * lib/math_.h: Likewise.
2220         * lib/netinet_in_.h: Likewise.
2221         * lib/search_.h: Likewise.
2222         * lib/signal_.h: Likewise.
2223         * lib/stdint_.h: Likewise.
2224         * lib/stdio_.h: Likewise.
2225         * lib/stdlib_.h: Likewise.
2226         * lib/string_.h: Likewise.
2227         * lib/sys_select_.h: Likewise.
2228         * lib/sys_socket_.h: Likewise.
2229         * lib/sys_stat_.h: Likewise.
2230         * lib/sys_time_.h: Likewise.
2231         * lib/sysexits_.h: Likewise.
2232         * lib/time_.h: Likewise.
2233         * lib/unistd_.h: Likewise.
2234         * lib/wchar_.h: Likewise.
2235         * lib/wctype_.h: Likewise.
2236
2237 2007-05-29  Bruno Haible  <bruno@clisp.org>
2238
2239         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
2240         for the moment.
2241
2242 2007-05-29  Bruno Haible  <bruno@clisp.org>
2243
2244         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
2245         invocation.
2246         Reported by Eric Blake.
2247
2248 2007-05-29  Bruno Haible  <bruno@clisp.org>
2249
2250         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
2251         compiling case.
2252
2253 2007-05-29  Eric Blake  <ebb9@byu.net>
2254             Bruno Haible  <bruno@clisp.org>
2255
2256         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
2257         cross compiles.
2258
2259 2007-05-28  Eric Blake  <ebb9@byu.net>
2260
2261         * modules/closein-tests (test_closein_LDADD): Support test on
2262         cygwin with libtool.
2263
2264 2007-05-28  Bruno Haible  <bruno@clisp.org>
2265
2266         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
2267         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
2268         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
2269         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
2270         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
2271         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
2272         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
2273         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
2274         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
2275
2276 2007-05-28  Eric Blake  <ebb9@byu.net>
2277
2278         Unconditionally include <config.h> in unit tests.
2279         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
2280         * tests/test-allocsa.c, tests/test-arcfour.c,
2281         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
2282         tests/test-array_list.c, tests/test-array_oset.c,
2283         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
2284         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
2285         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
2286         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
2287         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
2288         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
2289         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
2290         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
2291         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
2292         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
2293         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
2294         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
2295         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
2296         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
2297         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
2298         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
2299         test-md5.c, test-memmem.c, test-printf-posix.c,
2300         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
2301         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
2302         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
2303         test-strcasestr.c, test-striconv.c, test-striconveh.c,
2304         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
2305         test-vasnprintf-posix2.c, test-vasnprintf.c,
2306         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
2307         test-vfprintf-posix.c, test-vprintf-posix.c,
2308         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
2309         test-xvasprintf.c: Likewise.
2310
2311 2007-05-28  Bruno Haible  <bruno@clisp.org>
2312
2313         * gnulib-tool (func_import): Remember the --with-tests command-line
2314         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
2315         Reported by Eric Blake.
2316
2317 2007-05-28  Bruno Haible  <bruno@clisp.org>
2318
2319         * modules/ftell-tests: New file.
2320         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
2321         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
2322
2323         * lib/ftell.c: New file.
2324         * modules/ftell: New file.
2325         * m4/ftell.m4: New file.
2326         * doc/functions/ftell.texi: Update.
2327         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
2328         REPLACE_FTELL.
2329         * lib/stdio_.h (rpl_ftell): New declaration.
2330         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
2331         REPLACE_FTELL.
2332
2333 2007-05-28  Eric Blake  <ebb9@byu.net>
2334
2335         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
2336
2337 2007-05-28  Bruno Haible  <bruno@clisp.org>
2338
2339         * modules/fseek-tests: New file.
2340         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
2341         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
2342
2343         * lib/fseek.c: New file.
2344         * modules/fseek: New file.
2345         * m4/fseek.m4: New file.
2346         * doc/functions/fseek.texi: Update.
2347         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
2348         REPLACE_FSEEK.
2349         * lib/stdio_.h (rpl_fseek): New declaration.
2350         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
2351         REPLACE_FSEEK.
2352
2353 2007-05-28  Bruno Haible  <bruno@clisp.org>
2354
2355         * lib/stdio_.h (fflush): More comments.
2356
2357 2007-05-28  Bruno Haible  <bruno@clisp.org>
2358
2359         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
2360         runtime test.
2361
2362 2007-05-28  Eric Blake  <ebb9@byu.net>
2363
2364         Improve lseek module.
2365         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
2366         * lib/unistd_.h (lseek): Scale back link warning message.
2367         * tests/test-lseek.c: Beef up test.
2368         * tests/test-lseek.sh: Exercise more facets of lseek.
2369         Reported by Bruno Haible.
2370
2371 2007-05-28  Bruno Haible  <bruno@clisp.org>
2372
2373         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
2374         to define.
2375
2376 2007-05-27  Bruno Haible  <bruno@clisp.org>
2377
2378         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
2379
2380 2007-05-27  Bruno Haible  <bruno@clisp.org>
2381
2382         * modules/openmp: New file.
2383         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
2384         Noah Misch.
2385
2386 2007-05-26  Bruno Haible  <bruno@clisp.org>
2387
2388         * modules/chdir-long (Depends-on): Add fchdir.
2389         * modules/chdir-safer (Depends-on): Likewise.
2390         * modules/fts (Depends-on): Likewise.
2391         * modules/fts-lgpl (Depends-on): Likewise.
2392         * modules/openat (Depends-on): Likewise.
2393         * modules/savewd (Depends-on): Likewise.
2394
2395 2007-05-24  Eric Blake  <ebb9@byu.net>
2396
2397         Fix lseek on mingw.
2398         * modules/lseek: New module.
2399         * m4/lseek.m4: New file.
2400         * lib/lseek.c: New file.
2401         * modules/lseek-tests: New file.
2402         * tests/test-lseek.c: New file.
2403         * tests/test-lseek.sh: New file.
2404         * MODULES.html.sh: Document lseek module.
2405         * modules/fflush (Depends-on): Add lseek, fseeko.
2406         * modules/fseeko (Depends-on): Likewise.
2407         * modules/ftello (Depends-on): Likewise.
2408         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
2409         broken.
2410         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
2411         broken.
2412         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
2413         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
2414         * lib/ftello.c (rpl_ftello): Likewise.
2415         * tests/test-fseeko.c (main): Test this.
2416         * tests/test-fseeko.sh: Likewise.
2417         * tests/test-ftello.c (main): Likewise.
2418         * tests/test-ftello.sh: Likewise.
2419         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
2420         implies replacing fseek.
2421         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
2422         HAVE_FTELLO.
2423         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
2424         * modules/unistd (Makefile.am): Likewise.
2425         * lib/unistd_.h (lseek): Declare a replacement.
2426         * doc/functions/lseek.texi (lseek): Document this fix.
2427         * doc/functions/fseek.texi (fseek): Likewise.
2428         * doc/functions/ftell.texi (ftell): Likewise.
2429
2430 2007-05-24  Bruno Haible  <bruno@clisp.org>
2431
2432         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
2433         in the printed representation of a NaN.
2434         * tests/test-vasprintf-posix.c (test_function): Likewise.
2435         * tests/test-snprintf-posix.h (test_function): Likewise.
2436         * tests/test-sprintf-posix.h (test_function): Likewise.
2437         Reported by Eric Blake.
2438
2439 2007-05-23  Eric Blake  <ebb9@byu.net>
2440
2441         Fix fseeko/ftello on cygwin 1.5.24.
2442         * doc/functions/fseeko.texi (fseeko): Document the fix.
2443         * doc/functions/ftello.texi (ftello): Document the fix.
2444         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
2445         * doc/functions/stdout.text (stdout): New file.
2446         * doc/functions/stderr.text (stderr): New file.
2447         * doc/gnulib.texi (Function Substitutes): Use new files.
2448         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
2449         prior to 1.7.0.
2450         * tests/test-ftello.c (main): Likewise for ftello.
2451         * tests/test-fseeko.sh: New file.
2452         * tests/test-ftello.sh: New file.
2453         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
2454         with seekable stdin.
2455         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
2456         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
2457         (gl_REPLACE_FSEEKO): New macro.
2458         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
2459         * modules/fseeko (Files): Distribute fseeko.c.
2460         * modules/ftello (Files): Distribute ftello.c.
2461         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
2462         mode.
2463         * lib/ftello.c (rpl_ftello): New file.
2464         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
2465         fseeko, ftello.
2466         (gl_STDIN_LARGE_OFFSET): New macro.
2467         * modules/stdio (Makefile.am): Perform the replacement.
2468         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
2469
2470 2007-05-23  Bruno Haible  <bruno@clisp.org>
2471
2472         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
2473         GNULIB_POSIXCHECK is defined.
2474
2475 2007-05-21  Bruno Haible  <bruno@clisp.org>
2476
2477         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
2478         Check also the output for NaN arguments. When cross-compiling, guess
2479         no on IRIX.
2480         * lib/vasnprintf.c: Update comments.
2481         * tests/test-vasnprintf-posix.c (strisnan): New function.
2482         (test_function): Use it.
2483         * tests/test-vasprintf-posix.c (strisnan): New function.
2484         (test_function): Use it.
2485         * tests/test-snprintf-posix.h (strisnan): New function.
2486         (test_function): Use it.
2487         * tests/test-sprintf-posix.h (strisnan): New function.
2488         (test_function): Use it.
2489         Reported by Eric Blake.
2490
2491 2007-05-20  Bruno Haible  <bruno@clisp.org>
2492
2493         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
2494         numbers that fails on BeOS.
2495         * doc/functions/frexpl.texi: Update.
2496
2497 2007-05-20  Jim Meyering  <jim@meyering.net>
2498
2499         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
2500         forced upon us by glibc-2.6.
2501
2502 2007-05-20  Bruno Haible  <bruno@clisp.org>
2503
2504         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
2505         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
2506         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
2507         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
2508         NEED_PRINTF_INFINITE.
2509         (is_infinitel): New function.
2510         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
2511         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
2512         gl_PREREQ_VASNPRINTF_INFINITE.
2513         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
2514         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2515         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
2516         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
2517         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
2518         gl_PREREQ_VASNPRINTF_INFINITE.
2519         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2520         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2521         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2522         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2523         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2524         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2525         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2526         * doc/functions/fprintf.texi: Update.
2527         * doc/functions/printf.texi: Update.
2528         * doc/functions/snprintf.texi: Update.
2529         * doc/functions/sprintf.texi: Update.
2530         * doc/functions/vfprintf.texi: Update.
2531         * doc/functions/vprintf.texi: Update.
2532         * doc/functions/vsnprintf.texi: Update.
2533         * doc/functions/vsprintf.texi: Update.
2534
2535 2007-05-20  Bruno Haible  <bruno@clisp.org>
2536
2537         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
2538         was not found in libc.
2539         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
2540
2541 2007-05-20  Bruno Haible  <bruno@clisp.org>
2542
2543         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2544         printed as "-nan" instead of "nan".
2545         * tests/test-vasprintf-posix.c (test_function): Likewise.
2546         * tests/test-snprintf-posix.h (test_function): Likewise.
2547         * tests/test-sprintf-posix.h (test_function): Likewise.
2548         Needed for HP-UX 11.
2549
2550 2007-05-20  Jim Meyering  <jim@meyering.net>
2551
2552         Fix buggy test for the fchownat-deref bug.
2553         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
2554         symlink required for the run-test.  Without it, this test would
2555         always declare that fchownat doesn't work, and client code would
2556         unnecessarily use the replacement function with fixed libc.
2557         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
2558         Reported by Greg Schafer.
2559
2560 2007-05-19  Bruno Haible  <bruno@clisp.org>
2561
2562         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
2563         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
2564         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
2565         Needed for IRIX 6.5 and Solaris 2.5.1.
2566
2567 2007-05-19  Bruno Haible  <bruno@clisp.org>
2568
2569         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
2570         (test_function): Skip tests involving -0.0 on platforms where
2571         -0.0 = 0.0.
2572         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
2573         (test_function): Skip tests involving -0.0 on platforms where
2574         -0.0 = 0.0.
2575         * tests/test-snprintf-posix.h (have_minus_zero): New function.
2576         (test_function): Skip tests involving -0.0 on platforms where
2577         -0.0 = 0.0.
2578         * tests/test-sprintf-posix.h (have_minus_zero): New function.
2579         (test_function): Skip tests involving -0.0 on platforms where
2580         -0.0 = 0.0.
2581         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
2582         tests.
2583         * tests/test-printf-posix.h (test_function): Likewise.
2584         * tests/test-printf-posix.output: Remove all -0.0 related results.
2585         Needed for IRIX 6.5.
2586
2587 2007-05-19  Bruno Haible  <bruno@clisp.org>
2588
2589         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2590         printed as "nan0x7fffffff" instead of "nan".
2591         * tests/test-vasprintf-posix.c (test_function): Likewise.
2592         * tests/test-snprintf-posix.h (test_function): Likewise.
2593         * tests/test-sprintf-posix.h (test_function): Likewise.
2594         * tests/test-fprintf-posix.h (NaN): Remove macro.
2595         (test_function): Remove all NaN related tests.
2596         * tests/test-printf-posix.h (NaN): Remove macro.
2597         (test_function): Remove all NaN related tests.
2598         * tests/test-printf-posix.output: Remove all NaN related results.
2599         Needed for IRIX 6.5.
2600
2601 2007-05-19  Bruno Haible  <bruno@clisp.org>
2602
2603         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
2604         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
2605
2606 2007-05-19  Bruno Haible  <bruno@clisp.org>
2607
2608         * lib/float_.h: New file.
2609         * m4/float_h.m4: New file.
2610         * modules/float: New file.
2611         * modules/isnanl (Dependencies): Add float.
2612         * modules/isnanl-nolibm (Dependencies): Likewise.
2613         * modules/mathl (Dependencies): Likewise.
2614         * modules/printf-frexpl (Dependencies): Likewise.
2615         * modules/signbit (Dependencies): Likewise.
2616         * modules/vasnprintf (Dependencies): Likewise.
2617         * doc/headers/float.texi: Update.
2618
2619 2007-05-19  Jim Meyering  <jim@meyering.net>
2620
2621         * lib/utimens.c (gl_futimens): Rename from futimens,
2622         now that glibc-2.6 declares futimens.
2623         * lib/utimens.h: Likewise.
2624
2625 2007-05-19  Bruno Haible  <bruno@clisp.org>
2626
2627         Avoid test failures on mingw.
2628         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
2629         * tests/test-printf-posix.sh: Likewise.
2630         * tests/test-vfprintf-posix.sh: Likewise.
2631         * tests/test-vprintf-posix.sh: Likewise.
2632
2633 2007-05-19  Bruno Haible  <bruno@clisp.org>
2634
2635         Fix *printf result for NaN, Inf, -0.0 on mingw.
2636         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
2637         * lib/vasnprintf.c: Include math.h and isnan.h.
2638         (is_infinite_or_zero): New function.
2639         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
2640         values in the %f, %F, %e, %E, %g, %G directives.
2641         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
2642         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2643         gl_PRINTF_INFINITE and test its result. Invoke
2644         gl_PREREQ_VASNPRINTF_INFINITE.
2645         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2646         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2647         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2648         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2649         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2650         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2651         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2652         * doc/functions/fprintf.texi: Update.
2653         * doc/functions/printf.texi: Update.
2654         * doc/functions/snprintf.texi: Update.
2655         * doc/functions/sprintf.texi: Update.
2656         * doc/functions/vfprintf.texi: Update.
2657         * doc/functions/vprintf.texi: Update.
2658         * doc/functions/vsnprintf.texi: Update.
2659         * doc/functions/vsprintf.texi: Update.
2660
2661 2007-05-19  Bruno Haible  <bruno@clisp.org>
2662
2663         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
2664         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
2665         Instead of multiplying with 10^k, set extra_zeroes to k.
2666         (scale10_round_long_double): Remove function.
2667
2668 2007-05-18  Bruno Haible  <bruno@clisp.org>
2669
2670         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
2671         introduced on 2007-05-06.
2672
2673 2007-05-18  Bruno Haible  <bruno@clisp.org>
2674
2675         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
2676         %g directives.
2677         * tests/test-vasprintf-posix.c (test_function): Likewise.
2678         * tests/test-snprintf-posix.h (test_function): Likewise.
2679         * tests/test-sprintf-posix.h (test_function): Likewise.
2680
2681 2007-05-18  Bruno Haible  <bruno@clisp.org>
2682
2683         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
2684         (strmatch): New function.
2685         (test_function): Test the %f directive on numbers of various exponents.
2686         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
2687         (strmatch): New function.
2688         (test_function): Test the %f directive on numbers of various exponents.
2689         * tests/test-snprintf-posix.h (strmatch): New function.
2690         (test_function): Test the %f directive on numbers of various exponents.
2691         * tests/test-sprintf-posix.h (strmatch): New function.
2692         (test_function): Test the %f directive on numbers of various exponents.
2693         * tests/test-snprintf-posix.c (SIZEOF): New macro.
2694         * tests/test-sprintf-posix.c (SIZEOF): New macro.
2695         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
2696         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
2697
2698 2007-05-18  Bruno Haible  <bruno@clisp.org>
2699
2700         Add support for 'long double' number output.
2701         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
2702         * lib/vasnprintf.c: Include math.h and float+.h.
2703         (mp_limb_t): New type.
2704         (GMP_LIMB_BITS): New macro.
2705         (mp_twolimb_t): New type.
2706         (GMP_TWOLIMB_BITS): New macro.
2707         (mpn_t): New type.
2708         (multiply, divide, convert_to_decimal, decode_long_double,
2709         scale10_round_long_double, scale10_round_decimal_long_double,
2710         floorlog10l): New functions.
2711         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
2712         for the %f, %F, %e, %E, %g, %G directives.
2713         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
2714         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2715         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
2716         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
2717         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2718         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2719         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2720         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2721         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2722         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2723         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2724         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
2725         * modules/snprintf-posix (Depends-on): Likewise.
2726         * modules/sprintf-posix (Depends-on): Likewise.
2727         * modules/vasnprintf-posix (Depends-on): Likewise.
2728         * modules/vasprintf-posix (Depends-on): Likewise.
2729         * modules/vfprintf-posix (Depends-on): Likewise.
2730         * modules/vsnprintf-posix (Depends-on): Likewise.
2731         * modules/vsprintf-posix (Depends-on): Likewise.
2732         * modules/vasnprintf (Files): Add lib/float+.h.
2733         * doc/functions/fprintf.texi: Update.
2734         * doc/functions/printf.texi: Update.
2735         * doc/functions/snprintf.texi: Update.
2736         * doc/functions/sprintf.texi: Update.
2737         * doc/functions/vfprintf.texi: Update.
2738         * doc/functions/vprintf.texi: Update.
2739         * doc/functions/vsnprintf.texi: Update.
2740         * doc/functions/vsprintf.texi: Update.
2741
2742 2007-05-18  Bruno Haible  <bruno@clisp.org>
2743
2744         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
2745
2746 2007-05-18  Bruno Haible  <bruno@clisp.org>
2747
2748         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
2749         for printing 64-bit integers. Needed for mingw.
2750
2751 2007-05-18  Bruno Haible  <bruno@clisp.org>
2752
2753         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2754         gl_FUNC_FREXPL_WORKS.
2755         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
2756
2757 2007-05-18  Bruno Haible  <bruno@clisp.org>
2758
2759         * modules/frexpl-nolibm-tests: New file.
2760
2761         * modules/frexpl-nolibm: New file.
2762         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
2763
2764 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
2765
2766         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
2767         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2768         GCC 4.2, which otherwise issues a lot of warnings.
2769         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
2770         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
2771         Likewise.
2772         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
2773         * modules/iconv_open (iconv.h): Likewise.
2774         * modules/locale (locale.h): Likewise.
2775         * modules/netinet_in (netinet/in.h): Likewise.
2776         * modules/sys_select (sys_select.h): Likewise.
2777         * modules/sys_socket (sys/socket.h): Likewise.
2778         * modules/sys_stat (sys/stat.h): Likewise.
2779         * modules/sysexits (sysexits.h): Likewise.
2780         * modules/unistd (unistd.h): Likewise.
2781
2782 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2783
2784         * modules/closein-tests (Makefile.am): Distribute
2785         `test-closein.sh'.
2786
2787 2007-05-17  Bruno Haible  <bruno@clisp.org>
2788
2789         * tests/test-printf-posix.output: Renamed from
2790         tests/test-fprintf-posix.out.
2791         * modules/fprintf-posix-tests: Update.
2792         * modules/printf-posix-tests: Update.
2793         * modules/vfprintf-posix-tests: Update.
2794         * modules/vprintf-posix-tests: Update.
2795         * tests/test-fprintf-posix.sh: Update.
2796         * tests/test-printf-posix.sh: Update.
2797         * tests/test-vfprintf-posix.sh: Update.
2798         * tests/test-vprintf-posix.sh: Update.
2799         Reported by Ralf Wildenhues.
2800
2801 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
2802
2803         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
2804         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2805         GCC 4.2, which otherwise issues a lot of warnings.
2806         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
2807         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
2808         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
2809         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
2810         it should no longer be needed.
2811         * lib/string_.h: Likewise.
2812         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
2813         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
2814         * modules/inttypes (inttypes.h): Likewise.
2815         * modules/math (math.h): Likewise.
2816         * modules/search (search.h): Likewise.
2817         * modules/signal (signal.h): Likewise.
2818         * modules/stdint (stdint.h): Likewise.
2819         * modules/stdio (stdio.h): Likewise.
2820         * modules/stdlib (stdlib.h): Likewise.
2821         * modules/string (string.h): Likewise.
2822         * modules/sys_time (sys/time.h): Likewise.
2823         * modules/time (time.h): Likewise.
2824         * modules/wchar (wchar.h): Likewise.
2825         * modules/wctype (wtype.h): Likewise.
2826
2827 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
2828
2829         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
2830
2831 2007-05-13  Bruno Haible  <bruno@clisp.org>
2832
2833         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
2834         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
2835         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
2836         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2837         (gl_PREREQ_STRTOK_R): Don't require it here.
2838
2839 2007-05-13  Bruno Haible  <bruno@clisp.org>
2840
2841         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
2842         when used in C++ mode.
2843
2844 2007-05-12  Bruno Haible  <bruno@clisp.org>
2845
2846         * lib/linebuffer.h: Tweak doc.
2847         * lib/linebuffer.c: Likewise.
2848
2849 2007-05-12  James Youngman  <jay@gnu.org>
2850
2851         * lib/linebuffer.c (readlinebuffer_delim): New function,
2852         like readlinebuffer, but use a caller-specified delimiter.
2853         (readlinebuffer): Just call readlinebuffer_delim with '\n'
2854         as the delimiter.
2855         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
2856
2857 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2858
2859         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
2860         * modules/openat (Files): Remove openat-die.c.
2861         (Depends-on): Add openat-die.
2862         * modules/openat-die: New module.
2863
2864 2007-05-06  Bruno Haible  <bruno@clisp.org>
2865
2866         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
2867         Update with info about Cygwin.
2868         * doc/functions/fprintf.texi: Update.
2869         * doc/functions/printf.texi: Update.
2870         * doc/functions/snprintf.texi: Update.
2871         * doc/functions/sprintf.texi: Update.
2872         * doc/functions/vfprintf.texi: Update.
2873         * doc/functions/vprintf.texi: Update.
2874         * doc/functions/vsnprintf.texi: Update.
2875         * doc/functions/vsprintf.texi: Update.
2876         Reported by Eric Blake.
2877
2878 2007-05-06  Bruno Haible  <bruno@clisp.org>
2879
2880         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
2881         padding ourselves for the floating-point directives.
2882         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
2883         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
2884         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2885         gl_PRINTF_FLAG_ZERO and test its result. Invoke
2886         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
2887         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2888         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2889         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2890         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2891         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2892         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2893         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2894         * tests/test-snprintf-posix.h (test_function): Also check the width
2895         and some flags in the %f directive.
2896         * tests/test-sprintf-posix.h (test_function): Likewise.
2897         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2898         * tests/test-vasprintf-posix.c (test_function): Likewise.
2899         * doc/functions/fprintf.texi: Update.
2900         * doc/functions/printf.texi: Update.
2901         * doc/functions/snprintf.texi: Update.
2902         * doc/functions/sprintf.texi: Update.
2903         * doc/functions/vfprintf.texi: Update.
2904         * doc/functions/vprintf.texi: Update.
2905         * doc/functions/vsnprintf.texi: Update.
2906         * doc/functions/vsprintf.texi: Update.
2907
2908 2007-05-06  Bruno Haible  <bruno@clisp.org>
2909
2910         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
2911         pass the ' flag character to sprintf or snprintf.
2912         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
2913         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
2914         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2915         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
2916         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
2917         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2918         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2919         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2920         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2921         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2922         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2923         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2924         * tests/test-snprintf-posix.h (test_function): Also check the grouping
2925         flag.
2926         * tests/test-sprintf-posix.h (test_function): Likewise.
2927         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2928         * tests/test-vasprintf-posix.c (test_function): Likewise.
2929         * doc/functions/fprintf.texi: Update.
2930         * doc/functions/printf.texi: Update.
2931         * doc/functions/snprintf.texi: Update.
2932         * doc/functions/sprintf.texi: Update.
2933         * doc/functions/vfprintf.texi: Update.
2934         * doc/functions/vprintf.texi: Update.
2935         * doc/functions/vsnprintf.texi: Update.
2936         * doc/functions/vsprintf.texi: Update.
2937
2938 2007-05-01  Bruno Haible  <bruno@clisp.org>
2939
2940         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
2941
2942 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
2943
2944         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
2945         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
2946
2947 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
2948
2949         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
2950         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
2951         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
2952
2953 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2954
2955         * lib/argp-help.c (struct hol_entry): New member `ord'.
2956         (HOL_ENTRY_PTRCMP): Use ord for comparison
2957         (hol_sort): Initialize ord.
2958
2959 2007-05-01  Bruno Haible  <bruno@clisp.org>
2960
2961         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
2962         Reported by Eric Blake.
2963         * doc/gnulib.texi (Function Substitutes): Update.
2964
2965 2007-05-01  Bruno Haible  <bruno@clisp.org>
2966
2967         * doc/functions.texi: Remove file, now redundant through
2968         doc/functions/*.texi.
2969
2970 2007-05-01  Bruno Haible  <bruno@clisp.org>
2971
2972         * modules/argp (Depends-on): Add sleep.
2973
2974 2007-05-01  Bruno Haible  <bruno@clisp.org>
2975
2976         * modules/sleep-tests: New file.
2977         * tests/test-sleep.c: New file.
2978
2979         * modules/sleep: New file.
2980         * lib/sleep.c: New file.
2981         * m4/sleep.m4: New file.
2982         * lib/unistd_.h (sleep): New declaration.
2983         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
2984         HAVE_SLEEP.
2985         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
2986         * doc/functions/sleep.texi: Document the sleep module.
2987
2988 2007-05-01  Bruno Haible  <bruno@clisp.org>
2989
2990         * lib/sigprocmask.h: Remove file.
2991         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
2992         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
2993         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
2994         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
2995         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
2996         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
2997         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
2998         HAVE_SIGSET_T as a shell variable.
2999         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
3000         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
3001         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
3002         (Depends-on): Add signal. Remove verify.
3003         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
3004         (Include): Mention <signal.h> instead of sigprocmask.h.
3005         * NEWS: Mention the change.
3006         * lib/fatal-signal.c: Don't include sigprocmask.h.
3007
3008 2007-05-01  Bruno Haible  <bruno@clisp.org>
3009
3010         * modules/signal: New file.
3011         * lib/signal_.h: New file.
3012         * m4/signal_h.m4: New file.
3013
3014 2007-05-01  Bruno Haible  <bruno@clisp.org>
3015
3016         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
3017         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
3018         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
3019         HAVE_WCTYPE_CTMP_BUG into wctype.h.
3020
3021 2007-05-01  Bruno Haible  <bruno@clisp.org>
3022
3023         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
3024         configure time.
3025         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
3026         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
3027         * modules/sys_stat (Makefile.am): Substitute their values into
3028         sys/stat.h.
3029
3030 2007-05-01  Bruno Haible  <bruno@clisp.org>
3031
3032         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
3033         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
3034         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
3035
3036 2007-05-01  Bruno Haible  <bruno@clisp.org>
3037
3038         * doc/header/assert.texi: Undo last change: don't mention the gnulib
3039         'assert' module here.
3040
3041 2007-05-01  Bruno Haible  <bruno@clisp.org>
3042
3043         * doc/functions/*.texi: New files.
3044         * doc/functions/google-ranking.txt: New file.
3045         * doc/gnulib.texi (Function Substitutes): New chapter.
3046         (ctime, inet_ntoa): Remove sections.
3047         * doc/ctime.texi: Remove file.
3048         * doc/inet_ntoa.texi: Remove file.
3049         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
3050         dependencies.
3051         (%.info): New rule, specifying a --reference-limit.
3052
3053 2007-05-01  Bruno Haible  <bruno@clisp.org>
3054
3055         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
3056
3057 2007-05-01  Bruno Haible  <bruno@clisp.org>
3058
3059         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
3060         the portability of 'mkdir' to mingw systems.
3061
3062 2007-05-01  Bruno Haible  <bruno@clisp.org>
3063
3064         * doc/headers/google-ranking.txt: New file.
3065
3066 2007-04-30  Eric Blake  <ebb9@byu.net>
3067
3068         Prefer fseeko to fseek.
3069         * modules/getpass (Depends-on): Add fseeko.
3070         * lib/getpass.c (getpass): Use fseeko, not fseek.
3071
3072 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
3073
3074         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
3075         assumes the sorting is stable, while most qsort implementations
3076         are not.  Use argument addresses to ensure they never compare as
3077         equal.
3078
3079         * tests/test-argp-2.sh (usage-indent test): Fix output
3080         (func_compare): Restore diff options
3081         * tests/test-argp.c: Restore #include "progname.h"
3082
3083 2007-04-29  Bruno Haible  <bruno@clisp.org>
3084
3085         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
3086         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3087         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
3088         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
3089         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
3090         (configure.ac): Define CHECK_SNPRINTF_POSIX.
3091         (TESTS, check_PROGRAMS): Add test-snprintf.
3092         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
3093         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
3094         (TESTS, check_PROGRAMS): Add test-vsnprintf.
3095         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
3096         assertions that fail on HP-UX, OSF/1, or IRIX.
3097         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
3098
3099 2007-04-29  Bruno Haible  <bruno@clisp.org>
3100
3101         * MODULES.html.sh (posix_functions): Remove 'contents'.
3102
3103 2007-04-29  Karl Berry  <karl@gnu.org>
3104
3105         * config/srclist.txt (gendocs_template_min): new entry.
3106
3107 2007-04-29  Bruno Haible  <bruno@clisp.org>
3108
3109         Work around fpurge bug on BSD systems.
3110         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
3111         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
3112         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
3113         fpurge to rpl_fpurge if the system already has this function.
3114         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
3115         the case where the system already has this function. Correct invariants
3116         on BSD systems.
3117         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
3118         BSD systems.
3119
3120 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
3121
3122         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
3123         proposed by Sven Verdoolaege.
3124
3125         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
3126         options.
3127         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
3128         (usage and help tests): Update
3129
3130 2007-04-29  Bruno Haible  <bruno@clisp.org>
3131
3132         * tests/test-fflush.c (main): Use a file of size 17, not 10.
3133         Print more information in case of failure. Disable a test on BeOS.
3134
3135 2007-04-29  Bruno Haible  <bruno@clisp.org>
3136
3137         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
3138         This helps debugging on systems on which no gdb is available.
3139
3140 2007-04-29  Bruno Haible  <bruno@clisp.org>
3141
3142         * lib/freading.h: Improve comments.
3143         * lib/fwriting.h: Likewise.
3144         * tests/test-freading.c (main): Don't check freading immediately after
3145         repositioning. Needed for glibc.
3146
3147 2007-04-29  Bruno Haible  <bruno@clisp.org>
3148
3149         * lib/freading.c (freading): Trivial simplification.
3150
3151 2007-04-28  Bruno Haible  <bruno@clisp.org>
3152
3153         * tests/test-fwriting.c (main): Also test the interaction between
3154         fflush and fwriting.
3155         * modules/fwriting-tests (Depends-on): Add fflush.
3156
3157         * tests/test-freading.c (main): Also test the interaction between
3158         fflush and freading.
3159         * modules/freading-tests (Depends-on): Add fflush.
3160
3161 2007-04-28  Bruno Haible  <bruno@clisp.org>
3162
3163         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
3164         fseeko and ftello.
3165         Suggested by Eric Blake.
3166
3167 2007-04-28  Jim Meyering  <jim@meyering.net>
3168
3169         Avoid false-negative in gl_STDINT_H's C99 conformance test.
3170         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
3171         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
3172
3173 2007-04-27  Eric Blake  <ebb9@byu.net>
3174
3175         * doc/headers/assert.texi (assert.h): Document assert module use.
3176
3177 2007-04-27  Bruno Haible  <bruno@clisp.org>
3178
3179         * doc/headers/*.texi: New files.
3180         * doc/gnulib.texi (Header File Substitutes): New chapter.
3181         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
3182         dependencies.
3183         (standards.info ,standards.html, standards.dvi): Update dependencies.
3184         (mostlyclean, clean): New targets.
3185
3186 2007-04-27  Bruno Haible  <bruno@clisp.org>
3187
3188         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
3189         * modules/sysexits (Files, Makefile.am): Update.
3190
3191         * lib/sys_socket_.h: Renamed from lib/socket_.h.
3192         * modules/sys_socket (Files, Makefile.am): Update.
3193
3194         * lib/sys_stat_.h: Renamed from lib/stat_.h.
3195         * modules/sys_stat (Files, Makefile.am): Update.
3196
3197 2007-04-27  Eric Blake  <ebb9@byu.net>
3198
3199         * lib/freading.h: Improve comments.
3200         * lib/fwriting.h: Likewise.
3201         * lib/fflush.c: Likewise.
3202
3203         Fix closein for mingw.
3204         * modules/closein-tests: Add tests for closein.
3205         * tests/test-closein.c: New file.
3206         * tests/test-closein.sh: Likewise.
3207         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
3208         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
3209
3210 2007-04-27  Bruno Haible  <bruno@clisp.org>
3211
3212         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
3213         version is < 6.
3214         * lib/math_.h [__DECC]: Likewise.
3215         * lib/stdio_.h [__DECC]: Likewise.
3216         * lib/stdlib_.h [__DECC]: Likewise.
3217         * lib/string_.h [__DECC]: Likewise.
3218         * lib/time_.h [__DECC]: Likewise.
3219         * lib/wchar_.h [__DECC]: Likewise.
3220         * lib/wctype_.h [__DECC]: Likewise.
3221
3222 2007-04-27  Bruno Haible  <bruno@clisp.org>
3223
3224         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
3225
3226 2007-04-27  Bruno Haible  <bruno@clisp.org>
3227
3228         * lib/fflush.c: Add comments.
3229         * modules/fpurge-tests (Depends-on): Add fflush.
3230         * modules/freadable-tests (Depends-on): Likewise.
3231         * modules/fwritable-tests (Depends-on): Likewise.
3232
3233 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
3234
3235         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
3236         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
3237         Report by Bruno Haible <bruno@clisp.org>.
3238
3239 2007-04-26  Eric Blake  <ebb9@byu.net>
3240
3241         Fix fflush on mingw.
3242         * modules/fflush (Depends-on): Add freading.
3243         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
3244         but unread data.
3245
3246 2007-04-26  Eric Blake  <ebb9@byu.net>
3247         and Bruno Haible  <bruno@clisp.org>
3248
3249         Implement freading and fwriting.
3250         * lib/freading.c: New file.
3251         * lib/freading.h: Likewise.
3252         * m4/freading.m4: Likewise.
3253         * modules/freading: Likewise.
3254         * modules/freading-tests: Likewise.
3255         * tests/test-freading.c: Likewise.
3256         * lib/fwriting.c: New file.
3257         * lib/fwriting.h: Likewise.
3258         * m4/fwriting.m4: Likewise.
3259         * modules/fwriting: Likewise.
3260         * modules/fwriting-tests: Likewise.
3261         * tests/test-fwriting.c: Likewise.
3262         * MODULES.html.sh (File stream based Input/Output): Mention them.
3263
3264 2007-04-26  Bruno Haible  <bruno@clisp.org>
3265
3266         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
3267         'long' when we assume it.
3268         Suggested by Eric Blake.
3269
3270 2007-04-26  Bruno Haible  <bruno@clisp.org>
3271
3272         Ensure fseeko, ftello are declared on glibc systems.
3273         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
3274         * modules/fseeko (configure.ac-early): Likewise.
3275         * modules/ftello (configure.ac-early): Likewise.
3276         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
3277         AC_FUNC_FSEEKO for this.
3278         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
3279         (gl_CHECK_FSEEKO): Remove macro.
3280
3281 2007-04-26  Bruno Haible  <bruno@clisp.org>
3282
3283         * tests/test-fflush.c (main): Also check the ftell result after
3284         fflush and fseek/fseeko.
3285         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
3286         file descriptor position cache in the stream.
3287         * lib/fseeko.c (rpl_fseeko): Likewise.
3288
3289 2007-04-26  Bruno Haible  <bruno@clisp.org>
3290
3291         * modules/fflush-tests (Depends-on): Add fseeko.
3292
3293 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
3294             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3295
3296         * lib/argz_.h: ensure error_t definition is obtained in same
3297         mechanism system argz.h would have.
3298         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
3299         argz facilities are known bad.  Err on the side of caution if
3300         cross-compiling.
3301
3302 2007-04-25  Eric Blake  <ebb9@byu.net>
3303
3304         * lib/fpurge.c (includes): Use stdlib.h for free.
3305         * tests/test-fflush.c (main): Also test fflush-fseeko.
3306
3307 2007-04-25  Bruno Haible  <bruno@clisp.org>
3308
3309         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
3310         * lib/fseeko.c: New file.
3311         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
3312         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
3313         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
3314         gl_FUNC_FSEEKO.
3315         (gl_FUNC_FSEEKO): Invoke it.
3316         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
3317         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
3318         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
3319
3320 2007-04-25  Bruno Haible  <bruno@clisp.org>
3321
3322         * modules/fflush (Depends-on): Add ftello.
3323
3324 2007-04-25  Bruno Haible  <bruno@clisp.org>
3325
3326         * modules/ftello-tests: New file.
3327         * tests/test-ftello.c: New file.
3328
3329         * modules/ftello: New file.
3330         * m4/ftello.m4: New file.
3331         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
3332         HAVE_FTELLO.
3333         * lib/stdio_.h (ftello): New declaration.
3334         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
3335         HAVE_FTELLO.
3336
3337 2007-04-25  Bruno Haible  <bruno@clisp.org>
3338
3339         * modules/fseeko-tests: New file.
3340         * tests/test-fseeko.c: New file.
3341
3342         * modules/fseeko: New file.
3343         * m4/fseeko.m4: New file.
3344         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
3345         HAVE_FSEEKO.
3346         * lib/stdio_.h (fseeko): New declaration.
3347         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
3348         HAVE_FSEEKO.
3349
3350 2007-04-25  Bruno Haible  <bruno@clisp.org>
3351
3352         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
3353
3354 2007-04-25  Bruno Haible  <bruno@clisp.org>
3355
3356         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
3357         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
3358         * tests/test-unistd.c: Likewise.
3359         * tests/test-fcntl.c: Likewise.
3360
3361 2007-04-23  Eric Blake  <ebb9@byu.net>
3362
3363         * lib/fflush.c: Fix missing include.
3364         Reported by Bruno Haible.
3365
3366 2007-04-23  Bruno Haible  <bruno@clisp.org>
3367
3368         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
3369         Reported by Eric Blake.
3370
3371 2007-04-23  Bruno Haible  <bruno@clisp.org>
3372
3373         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
3374
3375 2007-04-23  Bruno Haible  <bruno@clisp.org>
3376
3377         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
3378
3379 2007-04-23  Bruno Haible  <bruno@clisp.org>
3380
3381         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
3382         Needed on HP-UX 11.
3383
3384 2007-04-16  Eric Blake  <ebb9@byu.net>
3385
3386         Make fflush rely on fpurge.
3387         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
3388         open coding all variants.
3389         * modules/fflush (Depends-on): Add fpurge and unistd.
3390         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
3391         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
3392
3393         Fix --with-tests compilation on cygwin.
3394         * modules/argmatch-tests (Makefile.am): List gnulib library first
3395         in LDADD.
3396         * modules/argp-tests (Makefile.am): Likewise.
3397         * modules/array-list-tests (Makefile.am): Likewise.
3398         * modules/array-oset-tests (Makefile.am): Likewise.
3399         * modules/avltree-list-tests (Makefile.am): Likewise.
3400         * modules/avltree-oset-tests (Makefile.am): Likewise.
3401         * modules/avltreehash-list-tests (Makefile.am): Likewise.
3402         * modules/carray-list-tests (Makefile.am): Likewise.
3403         * modules/dirname-tests (Makefile.am): Likewise.
3404         * modules/frexp-tests (Makefile.am): Likewise.
3405         * modules/isnanl-tests (Makefile.am): Likewise.
3406         * modules/linked-list-tests (Makefile.am): Likewise.
3407         * modules/linkedhash-list-tests (Makefile.am): Likewise.
3408         * modules/lock-tests (Makefile.am): Likewise.
3409         * modules/rbtree-list-tests (Makefile.am): Likewise.
3410         * modules/rbtree-oset-tests (Makefile.am): Likewise.
3411         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
3412         * modules/tls-tests (Makefile.am): Likewise.
3413         * modules/tsearch-tests (Makefile.am): Likewise.
3414         * modules/xvasprintf-tests (Makefile.am): Likewise.
3415
3416         Fix fpurge for cygwin.
3417         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
3418         value.
3419         * modules/fpurge-tests (Depends-on): Clean up trash.
3420
3421 2007-04-16  Simon Josefsson  <simon@josefsson.org>
3422
3423         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
3424
3425         * m4/autobuild.m4: Re-indent.
3426
3427 2007-04-13  Bruno Haible  <bruno@clisp.org>
3428
3429         * modules/fpurge-tests: New file.
3430         * tests/test-fpurge.c: New file.
3431
3432         * modules/fpurge: New file.
3433         * lib/fpurge.h: New file.
3434         * lib/fpurge.c: New file.
3435         * m4/fpurge.m4: New file.
3436
3437 2007-04-13  Bruno Haible  <bruno@clisp.org>
3438
3439         * modules/fbufmode-tests: New file.
3440         * tests/test-fbufmode.c: New file.
3441
3442         * modules/fbufmode: New file.
3443         * lib/fbufmode.h: New file.
3444         * lib/fbufmode.c: New file.
3445         * m4/fbufmode.m4: New file.
3446
3447 2007-04-13  Bruno Haible  <bruno@clisp.org>
3448
3449         * modules/fwritable-tests: New file.
3450         * tests/test-fwritable.c: New file.
3451
3452         * modules/fwritable: New file.
3453         * lib/fwritable.h: New file.
3454         * lib/fwritable.c: New file.
3455         * m4/fwritable.m4: New file.
3456
3457 2007-04-13  Bruno Haible  <bruno@clisp.org>
3458
3459         * modules/freadable-tests: New file.
3460         * tests/test-freadable.c: New file.
3461
3462         * modules/freadable: New file.
3463         * lib/freadable.h: New file.
3464         * lib/freadable.c: New file.
3465         * m4/freadable.m4: New file.
3466
3467 2007-04-13  Bruno Haible  <bruno@clisp.org>
3468
3469         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
3470         MOSTLYCLEANFILES.
3471
3472 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
3473
3474         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
3475         gzip bootstrap.conf to avoid dragging in i18n machinery.
3476         (gnulib_tool_option): Use it.
3477
3478 2007-04-13  Bruno Haible  <bruno@clisp.org>
3479
3480         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
3481         %F directives.
3482         * tests/test-vasprintf-posix.c (test_function): Likewise.
3483         * tests/test-snprintf-posix.h (test_function): Likewise.
3484         * tests/test-sprintf-posix.h (test_function): Likewise.
3485         * tests/test-fprintf-posix.h (test_function): Likewise.
3486         * tests/test-printf-posix.h (test_function): Likewise.
3487         * tests/test-fprintf-posix.out: Likewise.
3488
3489 2007-04-13  Bruno Haible  <bruno@clisp.org>
3490
3491         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
3492         * modules/tls-tests (configure.ac): Likewise.
3493         Reported by Arto C. Nirkko <anirkko@insel.ch>.
3494
3495 2007-04-13  Bruno Haible  <bruno@clisp.org>
3496
3497         * lib/tls.c (glthread_tls_get): Fix return type.
3498         Patch by Arto C. Nirkko <anirkko@insel.ch>.
3499
3500 2007-04-12  Eric Blake  <ebb9@byu.net>
3501
3502         * modules/gettime (Depends-on): Remove gettime.
3503         Reported by Dmitry V. Levin.
3504
3505 2007-04-12  Bruno Haible  <bruno@clisp.org>
3506
3507         * modules/fflush (Include): Mention <stdio.h>.
3508         * modules/strtoimax (Include): Mention <inttypes.h>.
3509         * modules/strtoumax (Include): Likewise.
3510
3511 2007-04-12  Eric Blake  <ebb9@byu.net>
3512
3513         * .cvsignore: New file.
3514         * .gitignore: Likewise.
3515
3516 2007-04-12  Bruno Haible  <bruno@clisp.org>
3517
3518         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
3519         not before, since $(LDADD) often contains libgnu.a.
3520         * modules/striconv-tests (test_striconv_LDADD): Likewise.
3521         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
3522         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
3523         Needed on Cygwin.
3524
3525 2007-04-12  Eric Blake  <ebb9@byu.net>
3526
3527         Work around glibc's failure to flush stdin on fclose.
3528         * lib/closein.c (close_stdin): Flush stdin before closing.
3529
3530         Work around glibc's failure to reset seekable stdin on exit.
3531         * modules/closein: New module.
3532         * lib/closein.c: New file.
3533         * lib/closein.h: Likewise.
3534         * m4/closein.m4: Likewise.
3535         * MODULES.html.sh (File stream based Input/Output): Document it.
3536
3537 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3538
3539         * gnulib-tool: Rename generated 'autobuild' script to
3540         'do-autobuild' in --create-megatestdir output.
3541
3542         * doc/gnulib.texi (Build robot for gnulib): Fix.
3543
3544 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3545
3546         * modules/sysexits (Depends-on): Add absolute-header.
3547
3548 2007-04-12  Eric Blake  <ebb9@byu.net>
3549
3550         No need to preserve errno on success.
3551         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
3552         Reported by Bruno Haible.
3553
3554 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3555
3556         * MODULES.html.sh (Support for maintaining and releasing
3557         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
3558
3559 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3560
3561         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
3562
3563 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3564
3565         * modules/autobuild: New module.
3566
3567         * m4/autobuild.m4: New file.
3568
3569 2007-04-11  Bruno Haible  <bruno@clisp.org>
3570
3571         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
3572         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
3573         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
3574         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
3575         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
3576         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3577         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3578         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3579         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3580         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3581         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
3582         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3583         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3584         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
3585         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3586         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3587         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
3588         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3589         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3590         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
3591         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3592         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3593         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
3594         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3595         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3596         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
3597         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3598         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3599         Reported by Eric Blake.
3600
3601 2007-04-11  Bruno Haible  <bruno@clisp.org>
3602
3603         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
3604
3605 2007-04-10  Bruno Haible  <bruno@clisp.org>
3606
3607         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
3608         for NaN and Infinity. Needed on FreeBSD 6.1.
3609         * tests/test-vasnprintf-posix.c (test_function): Undo last change
3610         regarding results for "%010a" of Infinity and NaN.
3611         * tests/test-vasprintf-posix.c (test_function): Likewise.
3612         * tests/test-snprintf-posix.h (test_function): Likewise.
3613         * tests/test-sprintf-posix.h (test_function): Likewise.
3614         * tests/test-fprintf-posix.h (test_function): Likewise.
3615         * tests/test-printf-posix.h (test_function): Likewise.
3616         * tests/test-fprintf-posix.out: Likewise.
3617
3618 2007-04-10  Bruno Haible  <bruno@clisp.org>
3619
3620         * modules/locale-tests: New file.
3621         * tests/test-locale.c: New file.
3622
3623         * modules/locale: New file.
3624         * lib/locale_.h: New file.
3625         * m4/locale_h.m4: New file.
3626
3627 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
3628             Bruno Haible  <bruno@clisp.org>
3629
3630         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
3631         be determined, test for availability of the copysignf, copysign,
3632         copysignl functions.
3633         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
3634         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
3635         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
3636
3637 2007-04-09  Eric Blake  <ebb9@byu.net>
3638
3639         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
3640         * modules/stdio (Makefile.am): Support fflush.
3641         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
3642         * modules/fflush: New file.
3643         * lib/fflush.c: Likewise.
3644         * m4/fflush.m4: Likewise.
3645         * modules/fflush-tests: New test.
3646         * tests/test-fflush.c: Likewise.
3647         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
3648
3649 2007-04-06  Bruno Haible  <bruno@clisp.org>
3650
3651         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
3652         (VASNPRINTF): Use signbit for faster determination whether to print a
3653         minus sign.
3654         * modules/vasnprintf (Files): Remove lib/float+.h.
3655         * modules/fprintf-posix (Depends-on): Add signbit.
3656         * modules/snprintf-posix (Depends-on): Likewise.
3657         * modules/sprintf-posix (Depends-on): Likewise.
3658         * modules/vasnprintf-posix (Depends-on): Likewise.
3659         * modules/vasprintf-posix (Depends-on): Likewise.
3660         * modules/vfprintf-posix (Depends-on): Likewise.
3661         * modules/vsnprintf-posix (Depends-on): Likewise.
3662         * modules/vsprintf-posix (Depends-on): Likewise.
3663
3664 2007-04-06  Bruno Haible  <bruno@clisp.org>
3665
3666         * tests/test-frexp.c (main): Test also the sign bit of zero results.
3667         * tests/test-frexpl.c (main): Likewise.
3668         * tests/test-ldexpl.c (main): Likewise.
3669         * modules/frexp-tests (Depends-on): Add signbit.
3670         * modules/frexpl-tests (Depdends-on): Likewise.
3671         * modules/ldexpl-tests (Depdends-on): Likewise.
3672
3673 2007-04-06  Bruno Haible  <bruno@clisp.org>
3674
3675         * modules/signbit-tests: New file.
3676         * tests/test-signbit.c: New file.
3677
3678         * modules/signbit: New file.
3679         * lib/signbitf.c: New file.
3680         * lib/signbitd.c: New file.
3681         * lib/signbitl.c: New file.
3682         * m4/signbit.m4: New file.
3683         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
3684         (signbit): New macro.
3685         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
3686         REPLACE_SIGNBIT.
3687         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
3688         REPLACE_FREXPL into math.h.
3689
3690 2007-04-06  Bruno Haible  <bruno@clisp.org>
3691
3692         * modules/isnanf-nolibm-tests: New file.
3693         * tests/test-isnanf.c: New file.
3694
3695         * modules/isnanf-nolibm: New file.
3696         * lib/isnanf.h: New file.
3697         * lib/isnanf.c: New file.
3698         * lib/isnan.c: Consider the USE_FLOAT macro.
3699         * m4/isnanf.m4: New file.
3700
3701 2007-04-06  Bruno Haible  <bruno@clisp.org>
3702
3703         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
3704         (Link): New section.
3705
3706         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
3707
3708 2007-04-06  Bruno Haible  <bruno@clisp.org>
3709
3710         Assume the 'long double' type.
3711         * m4/longdouble.m4: Remove file.
3712         * config/srclist.txt: Don't mention longdouble.m4.
3713         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
3714         * lib/float+.h: Likewise.
3715         * lib/frexp.c: Likewise.
3716         * lib/printf-args.h: Likewise.
3717         * lib/printf-args.c: Likewise.
3718         * lib/printf-frexp.c: Likewise.
3719         * lib/printf-parse.c: Likewise.
3720         * lib/vasnprintf.c: Likewise.
3721         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
3722         * m4/intl.m4: Likewise.
3723         * m4/isnanl.m4: Likewise.
3724         * m4/printf.m4: Likewise.
3725         * m4/printf-frexpl.m4: Likewise.
3726         * m4/vasnprintf.m4: Likewise.
3727         * modules/allocsa (Files): Remove m4/longdouble.m4.
3728         * modules/gettext (Files): Likewise.
3729         * modules/relocatable-prog-wrapper (Files): Likewise.
3730         * modules/vasnprintf (Files): Likewise.
3731         * modules/isnanl (Files): Likewise.
3732         (Include): Simplify.
3733         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
3734         (Include): Simplify.
3735         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
3736         (Include): Simplify.
3737         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
3738         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3739         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
3740         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3741         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3742         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3743         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
3744         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3745         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3746         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3747         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
3748         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3749         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
3750         * tests/test-isnanl.c: Likewise.
3751         * tests/test-snprintf-posix.h: Likewise.
3752         * tests/test-sprintf-posix.h: Likewise.
3753         * tests/test-vasnprintf-posix.c: Likewise.
3754         * tests/test-vasnprintf-posix2.c: Likewise.
3755         * tests/test-vasprintf-posix.c: Likewise.
3756
3757 2007-04-06  Bruno Haible  <bruno@clisp.org>
3758
3759         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
3760         * lib/math_.h [__DECC]: Include the overridden include file through
3761         #include_next, outside the double-inclusion guard.
3762         * lib/stdio_.h [__DECC]: Likewise.
3763         * lib/stdlib_.h [__DECC]: Likewise.
3764         * lib/string_.h [__DECC]: Likewise.
3765         * lib/time_.h [__DECC]: Likewise.
3766         * lib/wchar_.h [__DECC]: Likewise.
3767         * lib/wctype_.h [__DECC]: Likewise.
3768         * lib/inttypes_.h [__DECC]: Likewise.
3769         Reported by Albert Chin <china@thewrittenword.com> in
3770         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
3771
3772 2007-04-04  Eric Blake  <ebb9@byu.net>
3773
3774         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
3775         1.5.x.
3776
3777 2007-04-04  Bruno Haible  <bruno@clisp.org>
3778
3779         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
3780         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
3781
3782 2007-04-04  Bruno Haible  <bruno@clisp.org>
3783
3784         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
3785         results for "%010a" of Infinity and NaN.
3786         * tests/test-vasprintf-posix.c (test_function): Likewise.
3787         * tests/test-snprintf-posix.h (test_function): Likewise.
3788         * tests/test-sprintf-posix.h (test_function): Likewise.
3789         * tests/test-fprintf-posix.h (test_function): Remove these tests.
3790         * tests/test-printf-posix.h (test_function): Likewise.
3791         * tests/test-fprintf-posix.out: Update.
3792         Needed for FreeBSD 6.1.
3793
3794 2007-04-04  Bruno Haible  <bruno@clisp.org>
3795
3796         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
3797         directly used by the gnulib modules nor by gnulib-tool.
3798
3799 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
3800
3801         * DEPENDENCIES: Give overall description of version dependency
3802         desirability.  Use more-typical names for apps.
3803         Add shell, coreutils, diffutils, grep, tar, gzip.
3804
3805 2007-04-04  Simon Josefsson  <simon@josefsson.org>
3806
3807         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
3808
3809 2007-04-04  Karl Berry  <karl@gnu.org>
3810
3811         * MODULES.html.sh (func_module): missing '.
3812
3813 2007-04-03  Bruno Haible  <bruno@clisp.org>
3814
3815         * modules/argmatch-tests (Makefile.am): New variable
3816         test_argmatch_LDADD.
3817         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
3818         * modules/array-list-tests (Makefile.am): New variable
3819         test_array_list_LDADD.
3820         * modules/array-oset-tests (Makefile.am): New variable
3821         test_array_oset_LDADD.
3822         * modules/avltree-list-tests (Makefile.am): New variable
3823         test_avltree_list_LDADD.
3824         * modules/avltree-oset-tests (Makefile.am): New variable
3825         test_avltree_oset_LDADD.
3826         * modules/avltreehash-list-tests (Makefile.am): New variable
3827         test_avltreehash_list_LDADD.
3828         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
3829         test_canonicalize_lgpl_LDADD.
3830         * modules/carray-list-tests (Makefile.am): New variable
3831         test_carray_list_LDADD.
3832         * modules/dirname-tests (Makefile.am): New variable
3833         test_dirname_LDADD.
3834         * modules/linked-list-tests (Makefile.am): New variable
3835         test_linked_list_LDADD.
3836         * modules/linkedhash-list-tests (Makefile.am): New variable
3837         test_linkedhash_list_LDADD.
3838         * modules/rbtree-list-tests (Makefile.am): New variable
3839         test_rbtree_list_LDADD.
3840         * modules/rbtree-oset-tests (Makefile.am): New variable
3841         test_rbtree_oset_LDADD.
3842         * modules/rbtreehash-list-tests (Makefile.am): New variable
3843         test_rbtreehash_list_LDADD.
3844         * modules/xvasprintf-tests (Makefile.am): New variable
3845         test_xvasprintf_LDADD.
3846         Reported by Eric Blake.
3847
3848 2007-04-03  Eric Blake  <ebb9@byu.net>
3849
3850         * DEPENDENCIES: Weaken m4 requirements.
3851
3852 2007-04-03  Bruno Haible  <bruno@clisp.org>
3853
3854         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
3855         * modules/isnanl-tests (configure.ac): Likewise.
3856
3857 2007-04-03  Ben Pfaff  <blp@gnu.org>
3858
3859         * modules/iconv_open: Add $(srcdir)/ to source directory
3860         references in Makefile fragments that call gperf, to fix VPATH
3861         builds.
3862
3863 2007-04-03  Bruno Haible  <bruno@clisp.org>
3864
3865         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
3866         * lib/ldexpl.c: Undo last change.
3867
3868 2007-04-03  Bruno Haible  <bruno@clisp.org>
3869
3870         * modules/printf-frexpl (Depends-on): Undo last change.
3871         (Files): Add m4/ldexpl.m4.
3872
3873 2007-04-03  Bruno Haible  <bruno@clisp.org>
3874
3875         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
3876         * modules/isnanl (Link): New section.
3877
3878         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
3879         * modules/frexp (Link): New section.
3880
3881         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
3882         * modules/frexpl (Link): New section.
3883
3884         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
3885         * modules/ldexpl (Link): New section.
3886
3887 2007-04-03  Bruno Haible  <bruno@clisp.org>
3888
3889         * modules/TEMPLATE-EXTENDED: New file.
3890         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
3891
3892 2007-04-03  Bruno Haible  <bruno@clisp.org>
3893
3894         * DEPENDENCIES: New file.
3895         Suggested by Simon Josefsson.
3896
3897 2007-04-03  Bruno Haible  <bruno@clisp.org>
3898
3899         * doc/gnulib.texi: Escape @.
3900
3901 2007-04-03  James Youngman  <jay@gnu.org>
3902         and Paul Eggert  <eggert@cs.ucla.edu>
3903
3904         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
3905         birthtime on all systems that have birthtime, not just those which
3906         use st_birthtimensec rather than st_birthtim.  Putting zero in
3907         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
3908         that the birth time is not available for files on an NFS mount.
3909
3910 2007-04-03  Simon Josefsson  <simon@josefsson.org>
3911
3912         * modules/memxor: Move back from crypto/, suggested by Bruno.
3913         * modules/crypto/hmac-sha1: Fix memxor dependency.
3914
3915         * modules/crypto/gc: Moved from ../.
3916
3917 2007-04-02  Eric Blake  <ebb9@byu.net>
3918
3919         * lib/ldexpl.c (includes): Avoid libm.
3920
3921         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
3922
3923 2007-04-02  Bruno Haible  <bruno@clisp.org>
3924
3925         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
3926         on IRIX.
3927
3928 2007-04-02  Bruno Haible  <bruno@clisp.org>
3929
3930         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
3931         x86 or x86_64 platforms running MacOS X.
3932         Reported by Ryan Schmidt <@ryandesign.com>.
3933
3934 2007-04-02  Bruno Haible  <bruno@clisp.org>
3935
3936         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
3937         i386.
3938
3939 2007-04-01  Simon Josefsson  <simon@josefsson.org>
3940
3941         * modules/crypto/arcfour: Moved from ../.
3942         * modules/crypto/arcfour-tests: Moved from ../.
3943         * modules/crypto/arctwo: Moved from ../.
3944         * modules/crypto/arctwo-tests: Moved from ../.
3945         * modules/crypto/des: Moved from ../.
3946         * modules/crypto/des-tests: Moved from ../.
3947         * modules/crypto/gc-arcfour: Moved from ../.
3948         * modules/crypto/gc-arcfour-tests: Moved from ../.
3949         * modules/crypto/gc-arctwo: Moved from ../.
3950         * modules/crypto/gc-arctwo-tests: Moved from ../.
3951         * modules/crypto/gc-des: Moved from ../.
3952         * modules/crypto/gc-des-tests: Moved from ../.
3953         * modules/crypto/gc-hmac-md5: Moved from ../.
3954         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
3955         * modules/crypto/gc-hmac-sha1: Moved from ../.
3956         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
3957         * modules/crypto/gc-md2: Moved from ../.
3958         * modules/crypto/gc-md2-tests: Moved from ../.
3959         * modules/crypto/gc-md4: Moved from ../.
3960         * modules/crypto/gc-md4-tests: Moved from ../.
3961         * modules/crypto/gc-md5: Moved from ../.
3962         * modules/crypto/gc-md5-tests: Moved from ../.
3963         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
3964         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
3965         * modules/crypto/gc-random: Moved from ../.
3966         * modules/crypto/gc-rijndael: Moved from ../.
3967         * modules/crypto/gc-rijndael-tests: Moved from ../.
3968         * modules/crypto/gc-sha1: Moved from ../.
3969         * modules/crypto/gc-sha1-tests: Moved from ../.
3970         * modules/crypto/gc-tests: Moved from ../.
3971         * modules/crypto/hmac-md5: Moved from ../.
3972         * modules/crypto/hmac-md5-tests: Moved from ../.
3973         * modules/crypto/hmac-sha1: Moved from ../.
3974         * modules/crypto/hmac-sha1-tests: Moved from ../.
3975         * modules/crypto/md2: Moved from ../.
3976         * modules/crypto/md2-tests: Moved from ../.
3977         * modules/crypto/md4: Moved from ../.
3978         * modules/crypto/md4-tests: Moved from ../.
3979         * modules/crypto/md5: Moved from ../.
3980         * modules/crypto/md5-tests: Moved from ../.
3981         * modules/crypto/memxor: Moved from ../.
3982         * modules/crypto/rijndael: Moved from ../.
3983         * modules/crypto/rijndael-tests: Moved from ../.
3984         * modules/crypto/sha1: Moved from ../.
3985
3986 2007-03-30  James Youngman  <jay@gnu.org>
3987
3988         * tests/test-stat-time.c (prepare_test): use chmod() rather than
3989         rename() to change the ctime of a file (because ctime is unaffected
3990         by rename on jfs2 on AIX 5.1).
3991         (main): Start by doing cleanup, in case a previous run failed leaving
3992         test files behind.
3993
3994 2007-03-31  Bruno Haible  <bruno@clisp.org>
3995
3996         Support old proprietary implementations of iconv.
3997         * modules/iconv_open: New file.
3998         * lib/iconv_.h: New file.
3999         * m4/iconv_h.m4: New file.
4000         * lib/iconv_open.c: New file.
4001         * lib/iconv_open-aix.gperf: New file.
4002         * lib/iconv_open-hpux.gperf: New file.
4003         * lib/iconv_open-irix.gperf: New file.
4004         * lib/iconv_open-osf.gperf: New file.
4005         * m4/iconv_open.m4: New file.
4006         * modules/linebreak (Depends-on): Add iconv_open.
4007         * modules/striconv (Depends-on): Likewise.
4008         * modules/striconveh (Depends-on): Likewise.
4009         * modules/unicodeio (Depends-on): Likewise.
4010         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
4011         (iconv_t)(-1).
4012         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
4013         conversion if cd is (iconv_t)(-1).
4014         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
4015         is not possible.
4016
4017 2007-03-31  Bruno Haible  <bruno@clisp.org>
4018
4019         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
4020         work on Solaris either. Protect also second use of "autodetect_jp".
4021
4022 2007-03-31  Bruno Haible  <bruno@clisp.org>
4023
4024         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
4025         the function is not present.
4026
4027 2007-03-31  Bruno Haible  <bruno@clisp.org>
4028
4029         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
4030         the function is not present.
4031
4032 2007-03-31  Bruno Haible  <bruno@clisp.org>
4033
4034         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
4035         a bug in HP-UX iconv_open().
4036
4037 2007-03-31  Bruno Haible  <bruno@clisp.org>
4038
4039         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
4040         (Mathematics <math.h>): New section, add fpieee.
4041         (Input/output <stdio.h>): Add fseterr.
4042         (Mathematics <math.h>): New section, add printf-frexp.
4043         (Container data structures): Add sublist.
4044         (Core language properties): Add fpucw, inline.
4045         (Functions for greatest-width integer types <inttypes.h>): Add
4046         imaxabs, imaxdiv, inttypes.
4047         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
4048         isnanl-nolibm, ldexp.
4049         (Mathematics <math.h>): New section, add printf-frexpl.
4050         (Support for systems lacking POSIX:2001): Add fprintf-posix,
4051         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
4052         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
4053         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
4054         (Unicode string functions): Add unistr/u*-mbtoucr.
4055         (Java): Add javacomp-script, javaexec-script.
4056         (C#): Add csharpcomp-script, csharpexec-script.
4057         (Support for building libraries and executables): Add havelib,
4058         relocatable-*.
4059         (Support for maintaining and releasing projects): Renamed from
4060         'Support for maintaining and release projects'. Add announce-gen.
4061
4062 2007-03-31  Bruno Haible  <bruno@clisp.org>
4063
4064         * README: Talk primarily about git.
4065         (git and CVS): Renamed from CVS.
4066         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
4067         gnulib is available through git.
4068         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
4069
4070 2007-03-30  Bruno Haible  <bruno@clisp.org>
4071
4072         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
4073         * lib/poll_.h: Likewise.
4074         * lib/stat_.h: Likewise.
4075         * lib/sys_time_.h: Likewise.
4076         * lib/sysexit_.h: Likewise.
4077         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
4078         * lib/stdbool_.h: Likewise.
4079         * lib/byteswap_.h: Add double-inclusion guard.
4080
4081 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
4082
4083         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
4084
4085 2007-03-30  Karl Berry  <karl@gnu.org>
4086
4087         * config/srclist-update: double space after USA in the license
4088         substitution, since that's how it's usually (?) written.
4089
4090 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
4091
4092         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
4093         reported by Bruno Haible.
4094
4095 2007-03-29  Bruno Haible  <bruno@clisp.org>
4096
4097         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
4098         a bug in AIX iconv().
4099
4100 2007-03-29  Bruno Haible  <bruno@clisp.org>
4101
4102         * modules/ldexpl-tests: New file.
4103         * tests/test-ldexpl.c: New file.
4104
4105 2007-03-29  Bruno Haible  <bruno@clisp.org>
4106
4107         * lib/ldexpl.c: Include fpucw.h.
4108         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
4109         multiplication.
4110         * modules/ldexpl (Depends-on): Add fpucw.
4111
4112 2007-03-29  Bruno Haible  <bruno@clisp.org>
4113
4114         * modules/ldexpl: New file.
4115         * m4/ldexpl.m4: New file.
4116         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
4117         set.
4118         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
4119         REPLACE_LDEXPL.
4120         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
4121         REPLACE_LDEXPL.
4122         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
4123         gl_FUNC_LDEXPL_WORKS.
4124         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
4125         * modules/mathl (Files): Remove lib/ldexpl.c.
4126         (Depends-on): Add ldexpl.
4127
4128 2007-03-29  Bruno Haible  <bruno@clisp.org>
4129
4130         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
4131
4132 2007-03-29  Bruno Haible  <bruno@clisp.org>
4133
4134         * tests/test-striconveh.c (main): Don't assume that a direct conversion
4135         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
4136         and possibly also HP-UX.
4137         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
4138         work on AIX, IRIX, HP-UX, OSF/1.
4139         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
4140         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
4141         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
4142         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
4143         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
4144         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
4145
4146 2007-03-29  Bruno Haible  <bruno@clisp.org>
4147
4148         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
4149
4150 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4151
4152         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
4153         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
4154
4155 2007-03-29  Eric Blake  <ebb9@byu.net>
4156
4157         * lib/acl-internal.h: Remove redundant include.
4158         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
4159         Cygwin when a file is locked.
4160
4161 2007-03-29  Bruno Haible  <bruno@clisp.org>
4162
4163         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
4164         file.
4165         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
4166
4167 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4168
4169         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
4170         try to remove a parent directory if the child couldn't be removed
4171         (except for the first rmdir, which could fail because the child
4172         doesn't exist).  Problem reported by Jeff Blaine in
4173         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
4174
4175 2007-03-28  Bruno Haible  <bruno@clisp.org>
4176
4177         * lib/striconveh.c (utf8conv_carefully): New function.
4178         (mem_cd_iconveh_internal): Invoke it.
4179
4180 2007-03-28  Bruno Haible  <bruno@clisp.org>
4181
4182         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
4183         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
4184         input.
4185         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
4186         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
4187         unistr/u8-uctomb.
4188
4189 2007-03-28  Bruno Haible  <bruno@clisp.org>
4190
4191         * modules/unistr/u8-mbtoucr: New file.
4192         * lib/unistr/u8-mbtoucr.c: New file.
4193         * modules/unistr/u16-mbtoucr: New file.
4194         * lib/unistr/u16-mbtoucr.c: New file.
4195         * modules/unistr/u16-mbtoucr: New file.
4196         * lib/unistr/u16-mbtoucr.c: New file.
4197         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
4198
4199 2007-03-27  Simon Josefsson  <simon@josefsson.org>
4200             Bruno Haible  <bruno@clisp.org>
4201
4202         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
4203         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
4204         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
4205
4206         * m4/stdio_h.m4: Add stubs for vasprintf too.
4207
4208         * modules/stdio: Support vasprintf in sed command.
4209
4210         * modules/vasprintf: Depend on stdio for prototypes.  Remove
4211         vasprintf.h.  Add stdio module indicator.
4212
4213         * lib/stdio_.h: Declare asprintf and vasprintf, based on
4214         vasprintf.h.
4215
4216         * lib/vasprintf.h: File removed.
4217
4218         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
4219         * lib/vasprintf.c: Ditto.
4220         * lib/xvasprintf.c: Ditto.
4221         * tests/test-vasprintf-posix.c: Ditto.
4222         * tests/test-vasprintf.c: Ditto.
4223
4224 2007-03-27  Bruno Haible  <bruno@clisp.org>
4225
4226         Make vasnprintf multithread-safe.
4227         * lib/vasnprintf.c (decimal_point_char): New function.
4228         (VASNPRINTF): Use it.
4229         Suggested by Simon Josefsson.
4230
4231 2007-03-27  Eric Blake  <ebb9@byu.net>
4232
4233         Support sub-second birthtime on cygwin.
4234         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
4235         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
4236         (get_stat_birthtime): Also work with st_birthtim.
4237
4238 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
4239
4240         * lib/stat-time.h (USE_BIRTHTIME): Remove.
4241         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
4242         (get_stat_birthtime_ns): Do not try to use "spare" fields.
4243         (get_stat_birthtime_ns): Simplify compile-time tests.
4244         (get_stat_birthtime): Change the API to look like
4245         get_stat_mtime etc., except return a negative tv_nsec on error.
4246         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
4247         Don't check for "spare" fields.
4248         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
4249         or for struct stat.st_birthtime, as these tests aren't used.
4250         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
4251
4252 2007-03-27  Bruno Haible  <bruno@clisp.org>
4253
4254         * lib/stat-time.h: Include <sys/stat.h>.
4255
4256 2007-03-27  James Youngman  <jay@gnu.org>
4257
4258         * lib/stat-time.h (get_stat_birthtime): New function for
4259           retrieving st_birthtime as provided by UFS2 (hence *BSD).
4260         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
4261           and its variants.
4262         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
4263         * modules/stat-time-test: New file.
4264         * tests/test-stat-time.c: New test, devised by Bruno Haible.
4265
4266 2007-03-26  Bruno Haible  <bruno@clisp.org>
4267
4268         Better support of signalling NaNs.
4269         * lib/atanl.c: Include isnanl.h.
4270         (atanl): Perform test for NaN at the beginning of the function and
4271         through a call to isnanl.
4272         * lib/cosl.c: Include isnanl.h.
4273         (cosl): Perform test for NaN at the beginning of the function and
4274         through a call to isnanl.
4275         * lib/ldexpl.c: Include isnanl.h.
4276         (ldexpl): Perform test for NaN through a call to isnanl.
4277         * lib/logl.c: Include isnanl.h.
4278         (logl): Perform test for NaN at the beginning of the function and
4279         through a call to isnanl.
4280         * lib/sinl.c: Include isnanl.h.
4281         (sinl): Perform test for NaN at the beginning of the function and
4282         through a call to isnanl.
4283         * lib/sqrtl.c: Include isnanl.h.
4284         (sqrtl): Perform test for NaN at the beginning of the function and
4285         through a call to isnanl.
4286         * lib/tanl.c: Include isnanl.h.
4287         (tanl): Perform test for NaN at the beginning of the function and
4288         through a call to isnanl.
4289         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
4290         * modules/mathl (Depends-on): Add isnanl.
4291
4292 2007-03-26  Eric Blake  <ebb9@byu.net>
4293
4294         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
4295         regression in logic sense of previous patch.
4296
4297 2007-03-26  Bruno Haible  <bruno@clisp.org>
4298
4299         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
4300         unportable shell command "if ! ...".
4301         Reported by Ralf Wildenhues.
4302
4303 2007-03-25  Bruno Haible  <bruno@clisp.org>
4304
4305         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
4306         <sysexits.h> file, and only add EX_CONFIG.
4307         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
4308         absolute file name and whether it is sufficient. Substitute also
4309         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
4310         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
4311         ABSOLUTE_SYSEXITS_H into sysexits.h.
4312
4313 2007-03-25  Bruno Haible  <bruno@clisp.org>
4314
4315         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
4316         hints is NULL.
4317
4318 2007-03-25  Bruno Haible  <bruno@clisp.org>
4319
4320         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
4321         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
4322
4323 2007-03-25  Bruno Haible  <bruno@clisp.org>
4324
4325         * lib/vasnprintf.c: Include langinfo.h.
4326         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
4327         multithread-safe.
4328         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
4329         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
4330         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
4331         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4332         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4333         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4334         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
4335         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
4336         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4337         Reported by Simon Josefsson.
4338
4339 2007-03-25  Bruno Haible  <bruno@clisp.org>
4340
4341         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
4342         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
4343         * modules/vasnprintf (Depends-on): Add stdint.
4344
4345 2007-03-25  Bruno Haible  <bruno@clisp.org>
4346
4347         * modules/fpieee: New file.
4348         * m4/fpieee.m4: New file.
4349         * modules/isnan-nolibm (Depends-on): Add fpieee.
4350         * modules/isnanl-nolibm (Depends-on): Add fpieee.
4351         * modules/isnanl (Depends-on): Add fpieee.
4352
4353 2007-03-25  Bruno Haible  <bruno@clisp.org>
4354
4355         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
4356
4357 2007-03-25  Bruno Haible  <bruno@clisp.org>
4358
4359         Avoid test failures on IRIX 6.5.
4360         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
4361         (main): Use it.
4362         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
4363         macros.
4364         (main): Use them.
4365
4366 2007-03-25  Bruno Haible  <bruno@clisp.org>
4367
4368         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
4369         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
4370         exists but doesn't work.
4371         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
4372         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
4373         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
4374         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
4375
4376 2007-03-25  Bruno Haible  <bruno@clisp.org>
4377
4378         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
4379         returns inf. Needed on IRIX 6.5.
4380
4381 2007-03-25  Bruno Haible  <bruno@clisp.org>
4382
4383         * tests/test-frexpl.c: Include isnanl-nolibm.h.
4384         (main): Use isnanl instead of x != x idiom.
4385         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
4386
4387         * tests/test-frexp.c: Include isnan.h.
4388         (main): Use isnan instead of x != x idiom.
4389         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
4390
4391 2007-03-25  Bruno Haible  <bruno@clisp.org>
4392
4393         * tests/test-frexp.c (NaN): New function/macro.
4394         (main): Use it instead of 0.0 / 0.0.
4395         * tests/test-isnan.c (NaN): New function/macro.
4396         (main): Use it instead of 0.0 / 0.0.
4397         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
4398         (test_function): Use it instead of 0.0 / 0.0.
4399         * tests/test-vasprintf-posix.c (NaN): New function/macro.
4400         (test_function): Use it instead of 0.0 / 0.0.
4401         * tests/test-snprintf-posix.h (NaN): New function/macro.
4402         (test_function): Use it instead of 0.0 / 0.0.
4403         * tests/test-sprintf-posix.h (NaN): New function/macro.
4404         (test_function): Use it instead of 0.0 / 0.0.
4405         * tests/test-fprintf-posix.h (NaN): New function/macro.
4406         (test_function): Use it instead of 0.0 / 0.0.
4407         * tests/test-printf-posix.h (NaN): New function/macro.
4408         (test_function): Use it instead of 0.0 / 0.0.
4409
4410         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
4411
4412 2007-03-25  Bruno Haible  <bruno@clisp.org>
4413
4414         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
4415
4416 2007-03-25  Bruno Haible  <bruno@clisp.org>
4417
4418         * lib/regexec.c (merge_state_with_log): Make static.
4419
4420 2007-03-25  Bruno Haible  <bruno@clisp.org>
4421
4422         * lib/trigl.c (kernel_rem_pio2): Make static.
4423
4424 2007-03-25  Bruno Haible  <bruno@clisp.org>
4425
4426         * lib/sincosl.c (sincosl_table): Make static.
4427
4428 2007-03-25  Bruno Haible  <bruno@clisp.org>
4429
4430         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
4431         if the compiler does not support C99.
4432
4433 2007-03-25  Bruno Haible  <bruno@clisp.org>
4434
4435         * modules/time (Makefile.am): Ensure all rule action lines start with a
4436         tab.
4437
4438 2007-03-24  Bruno Haible  <bruno@clisp.org>
4439
4440         * modules/tsearch-tests: New file.
4441         * tests/test-tsearch.sh: New file.
4442         * tests/test-tsearch.c: New file, mostly copied from glibc.
4443
4444         * modules/search-tests: New file.
4445         * tests/test-search.c: New file.
4446
4447         * modules/search: New file.
4448         * lib/search_.h: New file, incorporating lib/tsearch.h.
4449         * m4/search_h.m4: New file.
4450         * lib/tsearch.h: Remove file.
4451         * lib/tsearch.c: Include search.h instead of tsearch.h.
4452         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
4453         HAVE_TSEARCH.
4454         * modules/tsearch (Files): Remove lib/tsearch.h.
4455         (Depends-on): Add search.
4456         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
4457         (Include): Change tsearch.h into search.h.
4458
4459 2007-03-24  Bruno Haible  <bruno@clisp.org>
4460
4461         * modules/fpucw: New file.
4462         * lib/fpucw.h: New file.
4463         * lib/frexp.c: Include fpucw.h.
4464         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4465         (FUNC): Use them.
4466         * lib/printf-frexp.c: Include fpucw.h.
4467         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4468         (FUNC): Use them.
4469         * lib/vasnprintf.c: Include fpucw.h.
4470         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
4471         'long double' calculations.
4472         * tests/test-frexpl.c: Include fpucw.h.
4473         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4474         * tests/test-printf-frexpl.c: Include fpucw.h.
4475         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4476         * modules/frexpl (Depends-on): Add fpucw.
4477         * modules/printf-frexpl (Depends-on): Likewise.
4478         * modules/fprintf-posix (Depends-on): Likewise.
4479         * modules/snprintf-posix (Depends-on): Likewise.
4480         * modules/sprintf-posix (Depends-on): Likewise.
4481         * modules/vasnprintf-posix (Depends-on): Likewise.
4482         * modules/vasprintf-posix (Depends-on): Likewise.
4483         * modules/vfprintf-posix (Depends-on): Likewise.
4484         * modules/vsnprintf-posix (Depends-on): Likewise.
4485         * modules/vsprintf-posix (Depends-on): Likewise.
4486         * modules/frexpl-tests (Depends-on): Likewise.
4487         * modules/printf-frexpl-tests (Depends-on): Likewise.
4488
4489 2007-03-24  Bruno Haible  <bruno@clisp.org>
4490
4491         * lib/float+.h: New file.
4492         * lib/isnan.c: Include float+.h.
4493         (SIZE): New macro.
4494         (FUNC): Compare only SIZE bytes of the value.
4495         * lib/vasnprintf.c: Include float+.h.
4496         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
4497         SIZEOF_LDBL or SIZEOF_DBL bytes.
4498         * modules/isnan-nolibm (Files): Add lib/float+.h.
4499         * modules/isnanl-nolibm (Files): Add lib/float+.h.
4500         * modules/isnanl (Files): Add lib/float+.h.
4501         * modules/vasnprintf (Files): Add lib/float+.h.
4502
4503 2007-03-24  Bruno Haible  <bruno@clisp.org>
4504
4505         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
4506         include isnanl-nolibm.h.
4507
4508 2007-03-24  Bruno Haible  <bruno@clisp.org>
4509
4510         * tests/test-read-file.c (main): Don't produce spurious output for
4511         expected situations. Make the test fail if it encountered unexpected
4512         results.
4513
4514 2007-03-24  Bruno Haible  <bruno@clisp.org>
4515
4516         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
4517         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
4518
4519 2007-03-24  Bruno Haible  <bruno@clisp.org>
4520
4521         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
4522
4523 2007-03-24  Bruno Haible  <bruno@clisp.org>
4524
4525         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
4526         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
4527
4528         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
4529         * modules/utf8-ucs4: Turn into a symbolic link to module
4530         unistr/u8-mbtouc.
4531
4532         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
4533         utf8-ucs4-unsafe.
4534         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
4535         unistr/u8-mbtouc-unsafe.
4536
4537         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
4538         * modules/utf16-ucs4: Turn into a symbolic link to module
4539         unistr/u16-mbtouc.
4540
4541         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
4542         utf16-ucs4-unsafe.
4543         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
4544         unistr/u16-mbtouc-unsafe.
4545
4546         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
4547         * modules/ucs4-utf8: Turn into a symbolic link to module
4548         unistr/u8-ubtomb.
4549
4550         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
4551         * modules/ucs4-utf16: Turn into a symbolic link to module
4552         unistr/u16-ubtomb.
4553
4554 2007-03-24  Bruno Haible  <bruno@clisp.org>
4555
4556         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
4557         Enable the function only if HAVE_INLINE.
4558         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
4559         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4560         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
4561         Enable the function only if HAVE_INLINE.
4562         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
4563         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4564         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
4565         Enable the function only if HAVE_INLINE.
4566         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
4567         Enable the function only if HAVE_INLINE.
4568         * modules/utf8-ucs4: Update.
4569         * modules/utf8-ucs4-unsafe: Update.
4570         * modules/utf16-ucs4: Update.
4571         * modules/utf16-ucs4-unsafe: Update.
4572         * modules/ucs4-utf8: Update.
4573         * modules/ucs4-utf16: Update.
4574
4575 2007-03-24  Bruno Haible  <bruno@clisp.org>
4576
4577         * lib/utf8-ucs4.h: Remove file.
4578         * lib/utf8-ucs4-unsafe.h: Remove file.
4579         * lib/utf16-ucs4.h: Remove file.
4580         * lib/utf16-ucs4-unsafe.h: Remove file.
4581         * lib/ucs4-utf8.h: Remove file.
4582         * lib/ucs4-utf16.h: Remove file.
4583         * lib/unistr.h: Include their previous contents.
4584         * m4/utf-ucs4.m4: Remove file.
4585         * m4/ucs4-utf.m4: Remove file.
4586         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
4587         (Depends-on): Add unistr/base.
4588         (configure.ac): Remove gl_UTF_UCS4.
4589         (Makefile.am): Update.
4590         (Include): Change to unistr.h.
4591         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
4592         (Depends-on): Add unistr/base.
4593         (configure.ac): Remove gl_UTF_UCS4.
4594         (Makefile.am): Update.
4595         (Include): Change to unistr.h.
4596         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
4597         (Depends-on): Add unistr/base.
4598         (configure.ac): Remove gl_UTF_UCS4.
4599         (Makefile.am): Update.
4600         (Include): Change to unistr.h.
4601         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
4602         (Depends-on): Add unistr/base.
4603         (configure.ac): Remove gl_UTF_UCS4.
4604         (Makefile.am): Update.
4605         (Include): Change to unistr.h.
4606         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
4607         (Depends-on): Add unistr/base.
4608         (configure.ac): Remove gl_UCS4_UTF.
4609         (Makefile.am): Update.
4610         (Include): Change to unistr.h.
4611         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
4612         (Depends-on): Add unistr/base.
4613         (configure.ac): Remove gl_UCS4_UTF.
4614         (Makefile.am): Update.
4615         (Include): Change to unistr.h.
4616         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
4617         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
4618         utf8-ucs4-unsafe.h.
4619         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
4620         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
4621         utf16-ucs4-unsafe.h.
4622         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
4623         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
4624         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
4625         * lib/unistr/u8-strchr.c: Likewise.
4626         * lib/unistr/u8-strrchr.c: Likewise.
4627         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
4628         * lib/unistr/u16-strchr.c: Likewise.
4629         * lib/unistr/u16-strrchr.c: Likewise.
4630         * lib/striconveh.c: Update.
4631         * lib/linebreak.c: Update.
4632
4633 2007-03-24  Bruno Haible  <bruno@clisp.org>
4634
4635         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
4636         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
4637
4638 2007-03-22  Bruno Haible  <bruno@clisp.org>
4639
4640         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
4641
4642 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
4643
4644         * MODULES.html.sh (File system functions): New module write-any-file.
4645         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
4646         * m4/write-any-file.m4: New files.
4647
4648 2007-03-23  Eric Blake  <ebb9@byu.net>
4649
4650         * gnulib-tool: Rearrange space-tab sequences, since some editors
4651         like to eat them.
4652
4653 2007-03-23  Eric Blake  <ebb9@byu.net>
4654
4655         * lib/version-etc.c (version_etc_va): Update license wording to
4656         be more concise.  Recommended by Richard Stallman.
4657
4658 2007-03-22  Bruno Haible  <bruno@clisp.org>
4659
4660         * lib/poll.c (MSG_PEEK): New fallback definition.
4661
4662 2007-03-22  Bruno Haible  <bruno@clisp.org>
4663
4664         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
4665         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
4666         (main): Update.
4667         Fixes a compilation error on BeOS.
4668
4669 2007-03-22  Bruno Haible  <bruno@clisp.org>
4670
4671         * modules/frexpl-tests: New file.
4672         * tests/test-frexpl.c: New file.
4673
4674         * modules/frexpl: New file.
4675         * m4/frexpl.m4: New file.
4676         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
4677         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
4678         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
4679         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
4680         (Depends-on): Add frexpl. Remove isnanl-nolibm.
4681         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
4682
4683 2007-03-22  Bruno Haible  <bruno@clisp.org>
4684
4685         * lib/frexpl.c: Share code with lib/frexp.c.
4686         * modules/mathl (Files): Add lib/frexp.c.
4687         (Depends-on): Add isnanl-nolibm.
4688
4689 2007-03-22  Bruno Haible  <bruno@clisp.org>
4690
4691         * modules/printf-frexp (Files): Add m4/frexp.m4.
4692         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
4693         only if the found frexp function actually works.
4694
4695 2007-03-22  Bruno Haible  <bruno@clisp.org>
4696
4697         * lib/frexp.c: Remove older implementation that uses divisions.
4698
4699 2007-03-21  Bruno Haible  <bruno@clisp.org>
4700
4701         * modules/frexp-tests: New file.
4702         * tests/test-frexp.c: New file.
4703
4704         * modules/frexp: New file.
4705         * lib/frexp.c: New file.
4706         * m4/frexp.m4: New file.
4707         * lib/math_.h (frexp): New declaration.
4708         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
4709         REPLACE_FREXP.
4710         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
4711
4712 2007-03-21  Bruno Haible  <bruno@clisp.org>
4713
4714         * modules/isnanl-tests: New file.
4715         * tests/test-isnanl.c: New file.
4716
4717         * modules/isnanl: New file.
4718         * lib/isnanl.h: New file.
4719         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
4720         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
4721         gl_FUNC_ISNANL_WORKS.
4722         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
4723         New macros.
4724
4725 2007-03-21  Bruno Haible  <bruno@clisp.org>
4726
4727         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
4728         lib/isnanl.h.
4729         (Include): Update.
4730         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
4731         * lib/vasnprintf.c: Update.
4732         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
4733         tests/test-isnanl.h, remove tests/test-isnanl.c.
4734         (Makefile.am): Update.
4735         * tests/test-isnanl-nolibm.c: New file.
4736         * tests/test-isnanl.h: New file.
4737         * tests/test-isnanl.c: Remove file.
4738
4739 2007-03-21  Jim Meyering  <jim@meyering.net>
4740
4741         When trying to open ".", treat ESTALE like EACCES.
4742         * lib/savewd.c (savewd_save): Resort to forking not just upon
4743         failure with EACCES, but also when errno is ESTALE.
4744
4745 2007-03-20  Bruno Haible  <bruno@clisp.org>
4746
4747         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
4748         Needed on AIX 5.1. Reported by Matthew Woehlke.
4749
4750 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4751
4752         Suggestions by Bruno Haible:
4753         * lib/acl-internal.h: Include "gettext.h" rather than rolling
4754         our own.
4755         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
4756         * modules/acl (Depends-on): Add gettext.
4757
4758 2007-03-19  Bruno Haible  <bruno@clisp.org>
4759
4760         * modules/iconvme: Remove file.
4761         * lib/iconvme.h: Remove file.
4762         * lib/iconvme.c: Remove file.
4763         * m4/iconvme.m4: Remove file.
4764
4765 2007-03-19  Bruno Haible  <bruno@clisp.org>
4766
4767         * doc/relocatable-maint.texi: Break long shell script line.
4768         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4769
4770 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4771
4772         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
4773         handle file_has_acl.
4774         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
4775         * lib/acl.c: Move header inclusions and related macro defns into
4776         lib/acl-internal.h.
4777         (S_ISLNK): Remove defn, since that's now done for us.
4778         (file_has_acl): Move to lib/file-has-acl.c.
4779         Call acl_trivial if available.  This is the crucial part of the fix.
4780         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
4781         shared within the library.  Rewrite a bit, partly to make it compatible
4782         with the GNU coding style.
4783         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
4784         Remove unnecessary double-quotes.
4785         Don't test for acl_to_text; the build will catch that.
4786         Replace acl_entries if it doesn't exist and it is needed.
4787         Check for -lsec and acl_trivial (as used on Solaris 10).
4788         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
4789         lib/file-has-acl.c.
4790         (Depends-on): Add sys_stat, for S_ISLNK.
4791
4792 2007-03-19  Ben Pfaff  <blp@gnu.org>
4793
4794         * doc/gnulib.texi: Fix typos.
4795         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4796
4797 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4798
4799         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
4800         If size is zero here, buf must be zero.
4801
4802 2007-03-19  Simon Josefsson  <simon@josefsson.org>
4803
4804         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
4805         <bruno@clisp.org>.
4806
4807 2007-03-18  Bruno Haible  <bruno@clisp.org>
4808
4809         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
4810         Suggested by Eric Blake.
4811
4812 2007-03-18  Ben Pfaff  <blp@gnu.org>
4813
4814         * doc/relocatable.texi: Recommend using as prefix a directory
4815         that does not exist and will never be created.  Based on
4816         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
4817         and others.
4818
4819 2007-03-17  Bruno Haible  <bruno@clisp.org>
4820
4821         * lib/fchownat.c: Include lchown.h.
4822
4823 2007-03-17  Bruno Haible  <bruno@clisp.org>
4824
4825         Fix endless loop when the given allocated size was > INT_MAX.
4826         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
4827         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
4828         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
4829         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
4830         * lib/sprintf.c (sprintf): Likewise.
4831
4832 2007-03-17  Bruno Haible  <bruno@clisp.org>
4833
4834         * tests/test-argp-2.sh (func_compare): Output a context diff.
4835
4836 2007-03-17  Bruno Haible  <bruno@clisp.org>
4837
4838         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
4839         locale's decimal-point character.
4840
4841 2007-03-17  Bruno Haible  <bruno@clisp.org>
4842
4843         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
4844         before comparing it. Needed because on some platforms (e.g. x86) a
4845         'long double' occupies less bytes than sizeof (long double).
4846
4847 2007-03-17  Bruno Haible  <bruno@clisp.org>
4848
4849         * tests/test-crc.c (main): Make printf statements 64-bit clean.
4850         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
4851         * tests/test-getaddrinfo.c (simple): Likewise.
4852         * tests/test-read-file.c (main): Likewise.
4853
4854 2007-03-17  Bruno Haible  <bruno@clisp.org>
4855
4856         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
4857
4858 2007-03-17  Bruno Haible  <bruno@clisp.org>
4859
4860         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
4861         unused variable.
4862
4863 2007-03-17  Bruno Haible  <bruno@clisp.org>
4864
4865         * tests/test-c-strcasecmp.c: Include c-strcase.h.
4866         * tests/test-c-strncasecmp.c: Likewise.
4867
4868 2007-03-17  Bruno Haible  <bruno@clisp.org>
4869
4870         * modules/stdlib (Depends-on): Add unistd.
4871         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
4872         Needed for MacOS X 10.3.
4873
4874 2007-03-17  Bruno Haible  <bruno@clisp.org>
4875
4876         * lib/unistr/u-strdup.h: Include <stdlib.h>.
4877
4878 2007-03-17  Bruno Haible  <bruno@clisp.org>
4879
4880         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
4881
4882 2007-03-17  Bruno Haible  <bruno@clisp.org>
4883
4884         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
4885         to reflect files copied from gnulib (with or without modifications).
4886         Suggested by Jim Meyering.
4887
4888 2007-03-17  Eric Blake  <ebb9@byu.net>
4889
4890         * NEWS: Document stdlib change from 2007-02-18.
4891
4892 2007-03-17  Jim Meyering  <jim@meyering.net>
4893
4894         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
4895         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
4896         someone uses a name containing shell meta-characters.
4897         Reported by Alfred M. Szmidt.
4898
4899         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
4900
4901 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4902
4903         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
4904         and copy gettext configuration files only if configure.ac contains
4905         a use of AM_GNU_GETTEXT_VERSION.
4906
4907 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4908
4909         * build-aux/bootstrap (gnulib_name): New variable.
4910         (gnulib_tool_options): Use it.
4911
4912 2007-03-13  Simon Josefsson  <simon@josefsson.org>
4913
4914         * tests/test-des.c: Use new namespace.
4915
4916 2007-03-15  Bruno Haible  <bruno@clisp.org>
4917
4918         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
4919         Reported by James Youngman <jay@gnu.org>.
4920
4921 2007-03-15  Bruno Haible  <bruno@clisp.org>
4922
4923         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
4924         declared prototype. Needed with cc on OSF/1 5.1.
4925
4926 2007-03-15  Bruno Haible  <bruno@clisp.org>
4927
4928         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
4929         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
4930         (struct gl_list_implementation): Add dispose_fn argument to the
4931         'create_empty', 'create' methods.
4932         (struct gl_list_impl_base): Add field 'dispose_fn'.
4933         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
4934         argument.
4935         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
4936         dispose_fn argument.
4937         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
4938         dispose_fn on the dropped values.
4939         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
4940         dispose_fn argument.
4941         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
4942         dropped values.
4943         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
4944         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4945         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
4946         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4947         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
4948         argument.
4949         (gl_tree_list_free): Call dispose_fn on the dropped values.
4950         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
4951         the dropped values.
4952         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4953         Add dispose_fn argument.
4954         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
4955         Call dispose_fn on the dropped values.
4956         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
4957         Add dispose_fn argument.
4958         (gl_sublist_create): Initialize the 'dispose_fn' field.
4959         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
4960         * tests/test-array_list.c (main): Update.
4961         * tests/test-carray_list.c (main): Update.
4962         * tests/test-avltree_list.c (main): Update.
4963         * tests/test-rbtree_list.c (main): Update.
4964         * tests/test-avltreehash_list.c (main): Update.
4965         * tests/test-rbtreehash_list.c (main): Update.
4966         * tests/test-linked_list.c (main): Update.
4967         * tests/test-linkedhash_list.c (main): Update.
4968         * tests/test-array_oset.c (main): Update.
4969
4970 2007-03-15  Bruno Haible  <bruno@clisp.org>
4971
4972         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
4973         (gl_oset_create_empty): Add dispose_fn argument.
4974         (struct gl_oset_implementation): Add dispose_fn argument to
4975         'create_empty' method.
4976         (struct gl_oset_impl_base): Add dispose_fn field.
4977         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
4978         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
4979         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
4980         values.
4981         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
4982         (gl_tree_oset_free): Call dispose_fn on the dropped values.
4983         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4984         dropped value.
4985         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4986         dropped value.
4987         * tests/test-array_oset.c (main): Update.
4988         * tests/test-avltree_oset.c (main): Update.
4989         * tests/test-rbtree_oset.c (main): Update.
4990         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
4991
4992 2007-03-13  Bruno Haible  <bruno@clisp.org>
4993
4994         * tests/test-stdbool.c (i): Update after last patch.
4995
4996 2007-03-12  Bruno Haible  <bruno@clisp.org>
4997
4998         * lib/quotearg.c: Include <wctype.h> early, before the definition of
4999         the iswprint macro. Needed on Solaris 2.5.1.
5000
5001 2007-03-12  Bruno Haible  <bruno@clisp.org>
5002
5003         * tests/test-printf-frexp.c (main): Declare x as volatile.
5004
5005 2007-03-12  Simon Josefsson  <simon@josefsson.org>
5006
5007         * doc/gnulib.texi (Build robot for gnulib): New section.
5008
5009 2007-03-12  Jim Meyering  <jim@meyering.net>
5010
5011         * build-aux/bootstrap: New file.
5012         * build-aux/bootstrap.conf: New file, from coreutils.
5013
5014 2007-03-11  Bruno Haible  <bruno@clisp.org>
5015
5016         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
5017
5018 2007-03-12  Simon Josefsson  <simon@josefsson.org>
5019
5020         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
5021         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
5022         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
5023
5024 2007-03-11  Bruno Haible  <bruno@clisp.org>
5025
5026         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
5027         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
5028
5029 2007-03-11  Bruno Haible  <bruno@clisp.org>
5030
5031         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
5032         formula. Needed for SunPRO C 5.0.
5033
5034 2007-03-11  Bruno Haible  <bruno@clisp.org>
5035
5036         * modules/long-options (Depends-on): Add getopt.
5037
5038 2007-03-11  Bruno Haible  <bruno@clisp.org>
5039
5040         * modules/modechange (Depends-on): Add stdbool.
5041
5042 2007-03-11  Bruno Haible  <bruno@clisp.org>
5043
5044         * modules/i-ring (Depends-on): Add stdbool.
5045
5046 2007-03-11  Bruno Haible  <bruno@clisp.org>
5047
5048         * modules/gc-des (Depends-on): Add stdbool.
5049
5050 2007-03-11  Bruno Haible  <bruno@clisp.org>
5051
5052         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
5053
5054 2007-03-11  Bruno Haible  <bruno@clisp.org>
5055
5056         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
5057
5058 2007-03-11  Bruno Haible  <bruno@clisp.org>
5059
5060         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
5061
5062 2007-03-11  Bruno Haible  <bruno@clisp.org>
5063
5064         * lib/vasnprintf.c (sprintf): Undefine.
5065
5066 2007-03-11  Bruno Haible  <bruno@clisp.org>
5067
5068         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
5069         initializers in SunPRO C and Compaq C compilers.
5070
5071 2007-03-11  Bruno Haible  <bruno@clisp.org>
5072
5073         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
5074         decrementing code ANSI C compliant.
5075
5076 2007-03-11  Bruno Haible  <bruno@clisp.org>
5077
5078         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
5079         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
5080
5081 2007-03-11  Bruno Haible  <bruno@clisp.org>
5082
5083         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
5084         <stdbool.h> substitute doesn't pass.
5085
5086 2007-03-11  Bruno Haible  <bruno@clisp.org>
5087
5088         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
5089
5090 2007-03-11  Bruno Haible  <bruno@clisp.org>
5091
5092         * gnulib-tool (func_create_megatestdir): Create also an autobuild
5093         script, for submission to autobuild.josefsson.org.
5094
5095 2007-03-10  Bruno Haible  <bruno@clisp.org>
5096
5097         * modules/canonicalize-lgpl-tests: New file.
5098         * tests/test-canonicalize-lgpl.sh: New file.
5099         * tests/test-canonicalize-lgpl.c: New file.
5100
5101         * modules/c-strcase-tests: New file.
5102         * tests/test-c-strcase.sh: New file.
5103         * tests/test-c-strcasecmp.c: New file.
5104         * tests/test-c-strncasecmp.c: New file.
5105
5106         * modules/atexit-tests: New file.
5107         * tests/test-atexit.sh: New file.
5108         * tests/test-atexit.c: New file.
5109
5110 2007-03-10  Bruno Haible  <bruno@clisp.org>
5111
5112         * tests/test-binary-io.sh: Use temporary filenames that are not so
5113         likely to clash with those of other tests (in a parallel make).
5114         * tests/test-binary-io.c: Likewise.
5115
5116 2007-03-10  Bruno Haible  <bruno@clisp.org>
5117
5118         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
5119         fallback; use #error instead.
5120         Suggested by Simon Josefsson.
5121
5122 2007-03-10  Bruno Haible  <bruno@clisp.org>
5123
5124         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
5125         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
5126         first and the last.
5127
5128 2007-03-10  Bruno Haible  <bruno@clisp.org>
5129
5130         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
5131
5132 2007-03-10  Bruno Haible  <bruno@clisp.org>
5133
5134         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
5135         "make distcheck".
5136         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
5137         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
5138         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
5139
5140 2007-03-10  Bruno Haible  <bruno@clisp.org>
5141
5142         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
5143         variable.
5144         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
5145         variable.
5146
5147 2007-03-09  Eric Blake  <ebb9@byu.net>
5148         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
5149
5150         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
5151         types are not being provided by gnulib.
5152         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
5153         types are supported.
5154
5155 2007-03-10  Bruno Haible  <bruno@clisp.org>
5156
5157         * lib/stdio_.h (__attribute__): New macro.
5158         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
5159         vsprintf): Specify __attribute__ __format__ for GCC.
5160         Suggested by Eric Blake.
5161
5162 2007-03-09  Bruno Haible  <bruno@clisp.org>
5163
5164         * modules/printf-posix-tests: New file.
5165         * tests/test-printf-posix.sh: New file.
5166         * tests/test-printf-posix.c: New file.
5167
5168         * modules/printf-posix: New file.
5169         * lib/printf.c: New file.
5170         * m4/printf-posix-rpl.m4: New file.
5171         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
5172         REPLACE_PRINTF.
5173         * lib/stdio_.h (printf): New declaration.
5174         (format, __format__, ____printf____, ____scanf____, ____strftime____,
5175         ____strfmon____): New macros.
5176         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
5177         REPLACE_PRINTF.
5178
5179 2007-03-09  Bruno Haible  <bruno@clisp.org>
5180
5181         * tests/test-vasnprintf-posix2.sh: New file.
5182         * tests/test-vasnprintf-posix2.c: New file.
5183         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
5184         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
5185         (Makefile.am): Activate test-vasnprintf-posix2.sh.
5186
5187         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
5188         a locale dependent decimal point, rather than always '.'.
5189
5190 2007-03-09  Eric Blake  <ebb9@byu.net>
5191
5192         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
5193         spite of platforms like Tandem/NSK that define it to -1.
5194
5195 2007-03-08  Bruno Haible  <bruno@clisp.org>
5196
5197         * modules/vprintf-posix-tests: New file.
5198         * tests/test-vprintf-posix.sh: New file.
5199         * tests/test-vprintf-posix.c: New file.
5200         * tests/test-printf-posix.h: New file.
5201
5202         * modules/vprintf-posix: New file.
5203         * lib/vprintf.c: New file.
5204         * m4/vprintf-posix.m4: New file.
5205         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
5206         REPLACE_VPRINTF.
5207         * lib/stdio_.h (vprintf): New declaration.
5208         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
5209         REPLACE_VPRINTF.
5210
5211 2007-03-08  Bruno Haible  <bruno@clisp.org>
5212
5213         * modules/fprintf-posix-tests: New file.
5214         * tests/test-fprintf-posix.sh: New file.
5215         * tests/test-fprintf-posix.c: New file.
5216
5217         * modules/fprintf-posix: New file.
5218         * lib/fprintf.c: New file.
5219         * m4/fprintf-posix.m4: New file.
5220         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
5221         REPLACE_FPRINTF.
5222         * lib/stdio_.h (fprintf): New declaration.
5223         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
5224         REPLACE_FPRINTF.
5225
5226 2007-03-08  Bruno Haible  <bruno@clisp.org>
5227
5228         * modules/vfprintf-posix-tests: New file.
5229         * tests/test-vfprintf-posix.sh: New file.
5230         * tests/test-vfprintf-posix.c: New file.
5231         * tests/test-fprintf-posix.h: New file.
5232         * tests/test-fprintf-posix.out: New file.
5233
5234         * modules/vfprintf-posix: New file.
5235         * lib/vfprintf.c: New file.
5236         * m4/vfprintf-posix.m4: New file.
5237         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
5238         REPLACE_VFPRINTF.
5239         * lib/stdio_.h (vfprintf): New declaration.
5240         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
5241         REPLACE_VFPRINTF.
5242
5243 2007-03-08  Bruno Haible  <bruno@clisp.org>
5244
5245         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
5246
5247 2007-03-08  Bruno Haible  <bruno@clisp.org>
5248
5249         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
5250         instead of 'expr' invocations.
5251         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
5252         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
5253         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
5254         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
5255         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
5256         Suggested by Paul Eggert.
5257
5258 2007-03-08  Bruno Haible  <bruno@clisp.org>
5259
5260         * modules/fseterr-tests: New file.
5261         * tests/test-fseterr.c: New file.
5262
5263         * modules/fseterr: New file.
5264         * lib/fseterr.h: New file.
5265         * lib/fseterr.c: New file.
5266
5267 2007-03-08  Bruno Haible  <bruno@clisp.org>
5268
5269         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
5270         * lib/getopt_.h: Likewise.
5271         * lib/mbswidth.h: Likewise.
5272         * lib/setenv.h: Likewise.
5273         * lib/vasnprintf.h: Likewise.
5274         * lib/vasprintf.h: Likewise.
5275         * lib/verror.h: Likewise.
5276         * lib/xsetenv.h: Likewise.
5277         * lib/xvasprintf.h: Likewise.
5278
5279 2007-03-08  Jim Meyering  <jim@meyering.net>
5280
5281         * users.txt: Add parted.
5282
5283         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
5284
5285 2007-03-07  Bruno Haible  <bruno@clisp.org>
5286
5287         * m4/printf.m4: Make the shell script snippets copy&pastable.
5288
5289 2007-03-02  Bruno Haible  <bruno@clisp.org>
5290
5291         * lib/netinet_in_.h: New file.
5292         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
5293         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
5294         * modules/netinet_in (Files): Add lib/netinet_in_.h.
5295         (Depends-on): Add absolute-header.
5296         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
5297         into netinet/in.h.
5298
5299 2007-03-03  Bruno Haible  <bruno@clisp.org>
5300
5301         * lib/sys_select_.h: New file.
5302         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
5303         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
5304         * modules/sys_select (Files): Add lib/sys_select_.h.
5305         (Depends-on): Add absolute-header.
5306         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
5307         into sys/select.h.
5308
5309 2007-03-02  Bruno Haible  <bruno@clisp.org>
5310
5311         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
5312         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
5313         values.
5314         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
5315         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
5316         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
5317         * modules/sys_socket (Depends-on): Add absolute-header.
5318         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
5319         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
5320         (Include): Remove requirement of inclusion of <sys/types.h>.
5321
5322 2007-03-02  Bruno Haible  <bruno@clisp.org>
5323
5324         * lib/byteswap_.h (bswap_32): Fix formula.
5325
5326 2007-03-06  Bruno Haible  <bruno@clisp.org>
5327
5328         * modules/sprintf-posix-tests: New file.
5329         * tests/test-sprintf-posix.c: New file.
5330
5331         * modules/sprintf-posix: New file.
5332         * lib/sprintf.c: New file.
5333         * m4/sprintf-posix.m4: New file.
5334         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
5335         REPLACE_SPRINTF.
5336         * lib/stdio_.h (sprintf): New declaration.
5337         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
5338         REPLACE_SPRINTF.
5339
5340 2007-03-06  Bruno Haible  <bruno@clisp.org>
5341
5342         * modules/vsprintf-posix-tests: New file.
5343         * tests/test-vsprintf-posix.c: New file.
5344         * tests/test-sprintf-posix.h: New file.
5345
5346         * modules/vsprintf-posix: New file.
5347         * lib/vsprintf.c: New file.
5348         * m4/vsprintf-posix.m4: New file.
5349         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
5350         REPLACE_VSPRINTF.
5351         * lib/stdio_.h (vsprintf): New declaration.
5352         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
5353         REPLACE_VSPRINTF.
5354
5355 2007-03-06  Bruno Haible  <bruno@clisp.org>
5356
5357         * modules/vsnprintf (Depend-on): Remove minmax.
5358
5359 2007-03-06  Bruno Haible  <bruno@clisp.org>
5360
5361         * modules/snprintf-posix-tests: New file.
5362         * tests/test-snprintf-posix.c: New file.
5363
5364         * modules/snprintf-posix: New file.
5365         * m4/snprintf-posix.m4: New file.
5366         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
5367         gl_FUNC_SNPRINTF.
5368         (gl_FUNC_SNPRINTF): Invoke it.
5369         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
5370         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
5371         is set.
5372         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
5373
5374 2007-03-06  Bruno Haible  <bruno@clisp.org>
5375
5376         * modules/vsnprintf-posix-tests: New file.
5377         * tests/test-vsnprintf-posix.c: New file.
5378         * tests/test-snprintf-posix.h: New file.
5379
5380         * modules/vsnprintf-posix: New file.
5381         * m4/vsnprintf-posix.m4: New file.
5382         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
5383         gl_FUNC_VSNPRINTF.
5384         (gl_FUNC_VSNPRINTF): Invoke it.
5385         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
5386         * lib/stdio_.h (vsnprintf): Define as a replacement if
5387         REPLACE_VSNPRINTF is set.
5388         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
5389
5390 2007-03-06  Bruno Haible  <bruno@clisp.org>
5391
5392         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
5393         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
5394
5395 2007-03-06  Bruno Haible  <bruno@clisp.org>
5396
5397         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
5398         (asinl): Declare also if HAVE_DECL_ASINL is set.
5399         (atanl): Declare also if HAVE_DECL_ATANL is set.
5400         (ceill): Declare also if HAVE_DECL_CEILL is set.
5401         (cosl): Declare also if HAVE_DECL_COSL is set.
5402         (expl): Declare also if HAVE_DECL_EXPL is set.
5403         (floorl): Declare also if HAVE_DECL_FLOORL is set.
5404         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
5405         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
5406         (logl): Declare also if HAVE_DECL_LOGL is set.
5407         (sinl): Declare also if HAVE_DECL_SINL is set.
5408         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
5409         (tanl): Declare also if HAVE_DECL_TANL is set.
5410         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
5411         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
5412         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
5413         declaration of frexpl, ldexpl.
5414         * modules/printf-frexpl (Depends-on): Add math.
5415         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
5416
5417 2007-03-05  Bruno Haible  <bruno@clisp.org>
5418
5419         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
5420         frexpl and ldexpl are declared.
5421         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
5422
5423 2007-03-05  Bruno Haible  <bruno@clisp.org>
5424
5425         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
5426         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
5427
5428 2007-03-05  Bruno Haible  <bruno@clisp.org>
5429
5430         * lib/stdio_.h: Include <stddef.h>.
5431
5432 2007-03-05  Bruno Haible  <bruno@clisp.org>
5433
5434         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
5435
5436 2007-03-05  Bruno Haible  <bruno@clisp.org>
5437
5438         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
5439         NetBSD 4, from Ralf Wildenhues.
5440
5441 2007-03-04  Bruno Haible  <bruno@clisp.org>
5442
5443         * lib/vasprintf.h: Update #if logic for the case when the functions
5444         exist but are overridden.
5445
5446 2007-03-04  Bruno Haible  <bruno@clisp.org>
5447
5448         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
5449         implementations: glibc-2.4 and MacOS X 10.3.
5450         * tests/test-vasnprintf-posix.c (test_function): Test also the case
5451         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
5452         * tests/test-vasprintf-posix.c (test_function): Likewise.
5453
5454 2007-03-04  Bruno Haible  <bruno@clisp.org>
5455
5456         * modules/vasprintf-posix-tests: New file.
5457         * tests/test-vasprintf-posix.c: New file.
5458
5459         * modules/vasprintf-posix: New file.
5460         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
5461         defined.
5462         * m4/vasprintf-posix.m4: New file.
5463         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
5464         gl_FUNC_VASPRINTF.
5465         (gl_FUNC_VASPRINTF): Invoke it.
5466         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
5467         here.
5468         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
5469
5470 2007-03-04  Bruno Haible  <bruno@clisp.org>
5471
5472         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
5473         REPLACE_GETTIMEOFDAY.
5474         * modules/sys_time (Makefile.am): Likewise.
5475         * m4/sys_time_h.m4: Likewise.
5476         * m4/gettimeofday.m4: Likewise.
5477
5478 2007-03-04  Bruno Haible  <bruno@clisp.org>
5479
5480         * modules/vasnprintf-posix-tests: New file.
5481         * tests/test-vasnprintf-posix.c: New file.
5482
5483         * modules/vasnprintf-posix: New file.
5484         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
5485         printf-frexpl.h.
5486         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
5487         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
5488         REPLACE_VASNPRINTF is defined.
5489         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
5490         gl_FUNC_VASNPRINTF.
5491         (gl_FUNC_VASNPRINTF): Invoke it.
5492         * m4/vasnprintf-posix.m4: New file.
5493         * m4/printf.m4: New file.
5494
5495 2007-03-04  Bruno Haible  <bruno@clisp.org>
5496
5497         Compile progreloc.c only if --enable-relocatable is specified.
5498         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
5499         if --enable-relocatable was specified.
5500         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
5501         lib_SOURCES.
5502
5503 2007-03-04  Jim Meyering  <jim@meyering.net>
5504
5505         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
5506         Use it consistently, rather than enumerating errno constants.
5507
5508 2007-03-04  Bruno Haible  <bruno@clisp.org>
5509
5510         * modules/xvasprintf-tests: New file.
5511         * tests/test-xvasprintf.c: New file.
5512
5513         * modules/vasprintf-tests: New file.
5514         * tests/test-vasprintf.c: New file.
5515
5516         * modules/vasnprintf-tests: New file.
5517         * tests/test-vasnprintf.c: New file.
5518
5519         * modules/vsnprintf-tests: New file.
5520         * tests/test-vsnprintf.c: New file.
5521
5522         * modules/snprintf-tests: New file.
5523         * tests/test-snprintf.c: New file.
5524
5525 2007-03-04  Bruno Haible  <bruno@clisp.org>
5526
5527         Compile relocatable.c only if --enable-relocatable is specified.
5528         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
5529         gl_RELOCATABLE_LIBRARY.
5530         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
5531         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
5532         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
5533         gl_RELOCATABLE_LIBRARY.
5534         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
5535         (Makefile.am): Remove lib_SOURCES.
5536         * modules/relocatable-lib-lgpl (configure.ac): Invoke
5537         gl_RELOCATABLE_LIBRARY.
5538         (Makefile.am): Remove lib_SOURCES.
5539         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
5540         always.
5541         * modules/relocatable-prog-wrapper (configure.ac): Invoke
5542         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
5543
5544 2007-03-04  Bruno Haible  <bruno@clisp.org>
5545
5546         * modules/argmatch-tests: New file.
5547         * tests/test-argmatch.c: New file.
5548
5549         * tests/test-allocsa.c (main): Halve the number of loop runs.
5550
5551         * modules/alloca-opt-tests: New file.
5552         * tests/test-alloca-opt.c: New file.
5553
5554 2007-03-04  Jim Meyering  <jim@meyering.net>
5555
5556         Work around difference between Linux ACLs and Solaris 10 ZFS.
5557         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
5558         for EINVAL.
5559
5560 2007-03-03  Bruno Haible  <bruno@clisp.org>
5561
5562         * modules/relocatable-prog (Depends-on): Add back progreloc's
5563         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
5564
5565 2007-03-03  Bruno Haible  <bruno@clisp.org>
5566
5567         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
5568         * modules/relocatable-lib: New file.
5569
5570 2007-03-03  Bruno Haible  <bruno@clisp.org>
5571
5572         * modules/relocatable-prog: Renamed from modules/relocatable.
5573         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
5574
5575 2007-03-03  Bruno Haible  <bruno@clisp.org>
5576
5577         * modules/relocatable-script (Files): Add doc/relocatable.texi,
5578         m4/relocatable-lib.m4.
5579         (Depends-on): Remove 'relocatable'.
5580         (configure.ac): Add gl_RELOCATABLE_NOP.
5581
5582 2007-03-03  Bruno Haible  <bruno@clisp.org>
5583
5584         * modules/relocatable-prog-wrapper: New file.
5585         * modules/relocatable (Depends-on): Add it. Remove all other
5586         dependencies except progname.
5587         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
5588
5589         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
5590         (gl_FUNC_STRERROR): Nop.
5591         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
5592
5593         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
5594         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
5595
5596         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
5597         (gl_FUNC_READLINK): Update.
5598
5599         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
5600
5601 2007-03-03  Bruno Haible  <bruno@clisp.org>
5602
5603         * lib/xreadlink.c: Include <unistd.h> unconditionally.
5604         * modules/xreadlink (Depends-on): Add unistd.
5605         * modules/xreadlink-with-size (Depends-on): Likewise.
5606
5607 2007-03-03  Bruno Haible  <bruno@clisp.org>
5608
5609         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
5610         extracted from gt_FUNC_SETENV.
5611         (gt_FUNC_SETENV): Remove macro.
5612         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
5613         remove gt_FUNC_SETENV.
5614
5615 2007-03-03  Bruno Haible  <bruno@clisp.org>
5616
5617         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
5618         ENABLE_RELOCATABLE here.
5619         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
5620
5621 2007-03-03  Bruno Haible  <bruno@clisp.org>
5622
5623         * modules/rbtreehash-list-tests (Depends-on): Add progname.
5624         * tests/test-rbtreehash_list.c: Include progname.h.
5625         (main): Call set_program_name.
5626
5627         * modules/rbtree-oset-tests (Depends-on): Add progname.
5628         * tests/test-rbtree_oset.c: Include progname.h.
5629         (main): Call set_program_name.
5630
5631         * modules/rbtree-list-tests (Depends-on): Add progname.
5632         * tests/test-rbtree_list.c: Include progname.h.
5633         (main): Call set_program_name.
5634
5635         * modules/linked-list-tests (Depends-on): Add progname.
5636         * tests/test-linked_list.c: Include progname.h.
5637         (main): Call set_program_name.
5638
5639 2007-03-03  Bruno Haible  <bruno@clisp.org>
5640
5641         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
5642         All uses of __restrict changed to _Restrict_.
5643         * lib/glob_.h (__restrict): Remove macro.
5644
5645 2007-03-02  Bruno Haible  <bruno@clisp.org>
5646
5647         * modules/gettext (configure.ac): Require gettext infrastructure
5648         from version 0.16.1.
5649
5650 2007-03-02  Bruno Haible  <bruno@clisp.org>
5651
5652         * modules/linkedhash-list-tests (Depends-on): Add progname.
5653         * tests/test-linkedhash_list.c: Include progname.h.
5654         (main): Call set_program_name.
5655
5656         * modules/carray-list-tests (Depends-on): Add progname.
5657         * tests/test-carray_list.c: Include progname.h.
5658         (main): Call set_program_name.
5659
5660         * modules/avltreehash-list-tests (Depends-on): Add progname.
5661         * tests/test-avltreehash_list.c: Include progname.h.
5662         (main): Call set_program_name.
5663
5664         * modules/avltree-oset-tests (Depends-on): Add progname.
5665         * tests/test-avltree_oset.c: Include progname.h.
5666         (main): Call set_program_name.
5667
5668         * modules/avltree-list-tests (Depends-on): Add progname.
5669         * tests/test-avltree_list.c: Include progname.h.
5670         (main): Call set_program_name.
5671
5672         * modules/array-oset-tests (Depends-on): Add progname.
5673         * tests/test-array_oset.c: Include progname.h.
5674         (main): Call set_program_name.
5675
5676         * modules/array-list-tests (Depends-on): Add progname.
5677         * tests/test-array_list.c: Include progname.h.
5678         (main): Call set_program_name.
5679
5680         * modules/argp-tests (Depends-on): Add progname.
5681         * tests/test-argp.c: Include argp.h first. Include progname.h.
5682         (main): Call set_program_name.
5683
5684 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
5685
5686         * doc/gnulib-tool.texi (Initial import): Reword description of
5687         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
5688         limited effect even if defined after the first system include.
5689
5690 2007-03-01  Bruno Haible  <bruno@clisp.org>
5691
5692         * build-aux/config.libpath: Update to libtool-1.5.22.
5693         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
5694
5695 2007-03-01  Bruno Haible  <bruno@clisp.org>
5696
5697         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
5698         foo_CFLAGS.
5699         Reported by Ralf Wildenhues.
5700
5701 2007-03-01  Bruno Haible  <bruno@clisp.org>
5702
5703         * build-aux/install-reloc: Remove object files left over by some
5704         compilers.
5705         Reported by Ralf Wildenhues.
5706
5707 2007-03-01  Bruno Haible  <bruno@clisp.org>
5708
5709         * build-aux/install-reloc: Break long lines.
5710
5711 2007-03-01  Bruno Haible  <bruno@clisp.org>
5712
5713         * doc/relocatable.texi: Document that it may not work on OpenBSD.
5714         Reported by Ralf Wildenhues.
5715
5716 2007-03-01  Bruno Haible  <bruno@clisp.org>
5717
5718         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
5719         include ordering constraints.
5720
5721 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5722
5723         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
5724         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
5725         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
5726         as another example.
5727         * lib/time_.h: Fix misspelling.
5728         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5729         Require gl_HEADER_TIME_H_DEFAULTS.
5730         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
5731         * m4/time_r.m4 (gl_TIME_R): Likewise.
5732         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
5733
5734 2007-03-01  Bruno Haible  <bruno@clisp.org>
5735
5736         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
5737         * m4/utimens.m4 (gl_UTIMENS): Likewise.
5738
5739 2007-03-01  Jim Meyering  <jim@meyering.net>
5740
5741         * modules/xreadlink (Maintainer): Add my name.
5742         * modules/xreadlink-with-size (Depends-on): Alphabetize.
5743
5744 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
5745             Bruno Haible  <bruno@clisp.org>
5746
5747         * build-aux/install-reloc: Compile also c-ctype.c.
5748         * build-aux/relocatable.sh.in: New file.
5749         * doc/relocatable.texi: New file.
5750         * doc/relocatable-maint.texi: New file.
5751         * doc/gnulib.texi: Include relocatable-maint.texi.
5752         * lib/progreloc.c: Include unistd.h unconditionally.
5753         * lib/relocwrapper.c: Include unistd.h unconditionally.
5754         Include c-ctype.h.
5755         (add_dotbin): Use c_tolower.
5756         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
5757         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
5758         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
5759         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
5760         to m4/relocatable-lib.m4.
5761         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
5762         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
5763         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
5764         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
5765         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
5766         * modules/relocatable: New file.
5767         * modules/relocatable-lib: New file.
5768         * modules/relocatable-script: New file.
5769
5770 2007-02-28  Bruno Haible  <bruno@clisp.org>
5771
5772         Import --enable-relocatable infrastructure.
5773         * build-aux/config.libpath: New file, from GNU gettext.
5774         * build-aux/install-reloc: New file, from GNU gettext.
5775         * build-aux/reloc-ldflags: New file, from GNU gettext.
5776         * lib/relocatable.h: New file, from GNU gettext.
5777         * lib/relocatable.c: New file, from GNU gettext.
5778         * lib/relocwrapper.c: New file, from GNU gettext.
5779         * m4/relocatable.m4: New file, from GNU gettext.
5780
5781 2007-02-28  Bruno Haible  <bruno@clisp.org>
5782
5783         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
5784
5785         * modules/xreadlink: New file, from GNU gettext with modifications.
5786         * lib/xreadlink.c: New file, from GNU gettext.
5787         * lib/xreadlink.h: Add comments.
5788         (xreadlink): New declaration.
5789
5790         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
5791         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
5792         lib/xreadlink-with-size.c.
5793         (configure.ac): Remove gl_XREADLINK invocation.
5794         (Makefile.am): Augment lib_SOURCES.
5795         * m4/xreadlink.m4: Remove file.
5796         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
5797         (xreadlink_with_size): Renamed from xreadink.
5798         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
5799         * modules/canonicalize (Depends-on): Replace xreadlink with
5800         xreadlink-with-size.
5801         * lib/canonicalize.c (canonicalize_filename_mode): Update.
5802
5803 2007-02-25  Jim Meyering  <jim@meyering.net>
5804
5805         * build-aux/announce-gen: When complaining about excess arguments,
5806         list them.
5807
5808 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
5809
5810         * README: Document signed integer overflow situation more
5811         accurately.
5812
5813 2007-02-25  Bruno Haible  <bruno@clisp.org>
5814
5815         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
5816         'a' or 'A' conversion.
5817
5818 2007-02-25  Bruno Haible  <bruno@clisp.org>
5819
5820         * modules/filename: Renamed from modules/pathname.
5821         (Files): Replace lib/pathname.h with lib/filename.h. Replace
5822         lib/concatpath.c with lib/concat-filename.c.
5823         (Makefile.am): Update.
5824         (Include): Replace pathname.h with filename.h.
5825         * lib/filename.h: Renamed from lib/pathname.h.
5826         (concatenated_filename): Renamed from concatenated_pathname.
5827         * lib/concat-filename.c: Renamed from lib/concatpath.c.
5828         (concatenated_filename): Renamed from concatenated_pathname.
5829         * lib/findprog.c: Include filename.h instead of pathname.h.
5830         (find_in_path): Update.
5831         * lib/javacomp.c: Include filename.h instead of pathname.h.
5832         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
5833         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
5834         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
5835         is_oldgcj_14_13_usable, is_javac_usable): Update.
5836         * lib/javaexec.c: Include filename.h instead of pathname.h.
5837         (execute_java_class): Update.
5838         * modules/findprog: Update.
5839         * modules/javacomp: Update.
5840         * modules/javaexec: Update.
5841         * MODULES.html.sh (File system functions): Add 'filename', remove
5842         'pathname'.
5843
5844 2007-02-25  Bruno Haible  <bruno@clisp.org>
5845
5846         * modules/printf-frexpl-tests: New file.
5847         * tests/test-printf-frexpl.c: New file.
5848
5849         * modules/printf-frexpl: New file.
5850         * lib/printf-frexpl.h: New file.
5851         * lib/printf-frexpl.c: New file.
5852         * m4/printf-frexpl.m4: New file.
5853
5854 2007-02-25  Bruno Haible  <bruno@clisp.org>
5855
5856         * modules/printf-frexp-tests: New file.
5857         * tests/test-printf-frexp.c: New file.
5858
5859         * modules/printf-frexp: New file.
5860         * lib/printf-frexp.h: New file.
5861         * lib/printf-frexp.c: New file.
5862         * m4/printf-frexp.m4: New file.
5863
5864 2007-02-25  Bruno Haible  <bruno@clisp.org>
5865
5866         Assume automake >= 1.10 for the tests.
5867         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
5868         * modules/arctwo-tests: Likewise.
5869         * modules/argp-tests: Likewise.
5870         * modules/avltree-list-tests: Likewise.
5871         * modules/avltree-oset-tests: Likewise.
5872         * modules/avltreehash-list-tests: Likewise.
5873         * modules/carray-list-tests: Likewise.
5874         * modules/crc-tests: Likewise.
5875         * modules/des-tests: Likewise.
5876         * modules/gc-arcfour-tests: Likewise.
5877         * modules/gc-arctwo-tests: Likewise.
5878         * modules/gc-des-tests: Likewise.
5879         * modules/gc-hmac-md5-tests: Likewise.
5880         * modules/gc-hmac-sha1-tests: Likewise.
5881         * modules/gc-md2-tests: Likewise.
5882         * modules/gc-md4-tests: Likewise.
5883         * modules/gc-md5-tests: Likewise.
5884         * modules/gc-pbkdf2-sha1-tests: Likewise.
5885         * modules/gc-rijndael-tests: Likewise.
5886         * modules/gc-sha1-tests: Likewise.
5887         * modules/gc-tests: Likewise.
5888         * modules/getaddrinfo-tests: Likewise.
5889         * modules/hmac-md5-tests: Likewise.
5890         * modules/hmac-sha1-tests: Likewise.
5891         * modules/linked-list-tests: Likewise.
5892         * modules/linkedhash-list-tests: Likewise.
5893         * modules/lock-tests: Likewise.
5894         * modules/md2-tests: Likewise.
5895         * modules/md4-tests: Likewise.
5896         * modules/md5-tests: Likewise.
5897         * modules/rbtree-list-tests: Likewise.
5898         * modules/rbtree-oset-tests: Likewise.
5899         * modules/rbtreehash-list-tests: Likewise.
5900         * modules/read-file-tests: Likewise.
5901         * modules/rijndael-tests: Likewise.
5902         * modules/stdint-tests: Likewise.
5903         * modules/tls-tests: Likewise.
5904
5905 2007-02-24  Bruno Haible  <bruno@clisp.org>
5906
5907         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
5908         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
5909         function; instead check whether isnan with a double argument links.
5910         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
5911         function; instead check whether isnan with a 'long double' argument
5912         links.
5913         Reported by Eric Blake <ebb9@byu.net>.
5914
5915 2007-02-24  Bruno Haible  <bruno@clisp.org>
5916
5917         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
5918         defined.
5919         * lib/isnanl.c: Remove all code. Just include isnan.c.
5920         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
5921
5922 2007-02-25  Jim Meyering  <jim@meyering.net>
5923
5924         Avoid conflicting types for 'unsetenv' on FreeBSD.
5925         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
5926         conflicting with FreeBSD's (5.0 and 6.1) function declaration
5927         in stdlib.h.
5928
5929 2007-02-24  Bruno Haible  <bruno@clisp.org>
5930
5931         * modules/isnanl-nolibm-tests: New file.
5932         * tests/test-isnanl.c: New file.
5933
5934         * modules/isnanl-nolibm: New file.
5935         * lib/isnanl.h: New file.
5936         * lib/isnanl.c: New file.
5937         * m4/isnanl.m4: New file.
5938
5939 2007-02-24  Bruno Haible  <bruno@clisp.org>
5940
5941         * modules/isnan-nolibm-tests: New file.
5942         * tests/test-isnan.c: New file.
5943
5944         * modules/isnan-nolibm: New file.
5945         * lib/isnan.h: New file.
5946         * lib/isnan.c: New file.
5947         * m4/isnan.m4: New file.
5948
5949 2007-02-24  Bruno Haible  <bruno@clisp.org>
5950
5951         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
5952         assume that an exponent fits in 20 bits.
5953
5954 2007-02-24  Jim Meyering  <jim@meyering.net>
5955
5956         * m4/regex.m4: Update the description of the configure-time option,
5957         --without-included-regex, to state accurately what the defaults are,
5958         and perhaps to give people an idea why using this option is risky.
5959
5960 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
5961
5962         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
5963         loops on small arguments.  This attempts to avoid the problem
5964         Bruno Haible reported for AIX 4.3.2 in
5965         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
5966
5967 2007-02-23  Bruno Haible  <bruno@clisp.org>
5968
5969         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
5970         Needed for help2man.
5971
5972 2007-02-23  Karl Berry  <karl@gnu.org>
5973
5974         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
5975         exists, foo.h should be cvs-ignored, not committed.
5976
5977 2007-02-23  Eric Blake  <ebb9@byu.net>
5978
5979         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
5980         * lib/stat-time.h (includes): Likewise.
5981         * lib/utimecmp.c (includes): Likewise.
5982         * lib/utimens.h (includes): Likewise.
5983         * lib/getdate.y (includes): Also include "timespec.h" for use
5984         internal to the module.
5985         * modules/utimens (Depends-on): Revert yesterday's patch.
5986         * modules/nanosleep (Depends-on): Add missing dependency.
5987
5988 2007-02-22  Bruno Haible  <bruno@clisp.org>
5989
5990         * lib/glob.c: Don't include getlogin_r.h.
5991
5992 2007-02-22  Jim Meyering  <jim@meyering.net>
5993
5994         * modules/utimens (Depends-on): Add timespec, required for
5995         utimens.h's inclusion of timespec.h.
5996
5997 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
5998
5999         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
6000         long unreadable paths in GNU/Linux.  Problem reported by Andreas
6001         Schwab in
6002         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
6003         I'll try to think of a better way to fix the Solaris problem.
6004
6005         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
6006         like glibc; on Solaris 10, it fails with errno == EINVAL.
6007         POSIX says the behavior is unspecified if the first argument is NULL,
6008         so play it safe and never pass NULL to the system getcwd.
6009
6010 2007-02-21  Jim Meyering  <jim@meyering.net>
6011
6012         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
6013         of gettimeofday.  It would conflict with the one now always
6014         provided via sys_time_.h.  Reported by Matthew Woehlke, as
6015         an IRIX 6.5 build failure.
6016
6017 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
6018
6019         Minor fixups to port to Solaris 10 with Sun C 5.8.
6020         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
6021         * modules/getcwd (Depends-on): Add dirfd.
6022         * lib/putenv.c (putenv): #undef it.
6023         (rpl_putenv): New decl.
6024         (malloc, free): Include <stdlib.h> rather than prototyping separately.
6025
6026 2007-02-20  Bruno Haible  <bruno@clisp.org>
6027
6028         * modules/stdio-tests: New file.
6029         * tests/test-stdio.c: New file.
6030
6031         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
6032         (Depends-on): Add stdio.
6033         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
6034         (Include): Use <stdio.h> instead of vsnprintf.h.
6035         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6036         HAVE_DECL_VSNPRINTF.
6037         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
6038
6039         * modules/snprintf (Files): Remove lib/snprintf.h.
6040         (Depends-on): Add stdio.
6041         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
6042         (Include): Use <stdio.h> instead of snprintf.h.
6043         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6044         HAVE_DECL_SNPRINTF.
6045         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
6046         * lib/getaddrinfo.c: Likewise.
6047
6048         * modules/stdio: New file.
6049         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
6050         * lib/snprintf.h: Remove file.
6051         * lib/vsnprintf.h: Remove file.
6052         * lib/.cppi-disable: Remove snprintf.h.
6053         * m4/stdio_h.m4: New file.
6054         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
6055
6056 2007-02-20  Jim Meyering  <jim@meyering.net>
6057
6058         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
6059         used by e.g., mingw.  From Bruno Haible.
6060
6061 2007-02-19  Bruno Haible  <bruno@clisp.org>
6062
6063         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
6064         warnings.
6065         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6066
6067 2007-02-19  Bruno Haible  <bruno@clisp.org>
6068
6069         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
6070         from mingw users.
6071
6072 2007-02-19  Bruno Haible  <bruno@clisp.org>
6073
6074         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
6075         warnings.
6076         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
6077
6078 2007-02-19  Jim Meyering  <jim@meyering.net>
6079
6080         Don't use FD after a successful "fdopendir (fd)".
6081         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
6082         Reset it by calling dirfd on the just-obtained DIR*.
6083
6084         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
6085         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
6086
6087 2007-02-18  Bruno Haible  <bruno@clisp.org>
6088
6089         * lib/readlink.c: Include <unistd.h>.
6090         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
6091         HAVE_READLINK.
6092         * modules/readlink (Depends-on): Add unistd.
6093         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6094         (Include): Add <unistd.h>.
6095
6096         * lib/getlogin_r.h: Remove file.
6097         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
6098         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
6099         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
6100         HAVE_DECL_GETLOGIN_R.
6101         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
6102         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6103         (Include): Use <unistd.h> instead of getlogin_r.h.
6104
6105         * lib/getcwd.h: Remove file.
6106         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
6107         * lib/xgetcwd.c: Likewise.
6108         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
6109         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
6110         * modules/getcwd (Files): Remove lib/getcwd.h.
6111         (Depends-on): Add unistd.
6112         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6113         (Include): Use <unistd.h> instad of getcwd.h.
6114
6115         * lib/ftruncate.c: Include <unistd.h> first.
6116         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
6117         Set HAVE_FTRUNCATE.
6118         * modules/ftruncate (Depends-on): Add unistd.
6119         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6120
6121         * lib/fchdir.c: Include <unistd.h> first.
6122         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
6123         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
6124         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
6125         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6126         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
6127
6128         * lib/dup2.c: Include <unistd.h> first.
6129         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
6130         HAVE_DUP2.
6131         * modules/dup2 (Depends-on): Add unistd.
6132         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6133
6134         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
6135         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
6136         REPLACE_CHOWN. Don't define chown as a macro here.
6137         * modules/chown (Depends-on): Add unistd.
6138         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6139
6140         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
6141         Add definition for GL_LINK_WARNING.
6142         (chown, dup2): New declarations.
6143         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
6144         link warning.
6145         (ftruncate): New declaration.
6146         (getcwd): New declaration, taken from old getcwd.h.
6147         (getlogin_r): New declaration, taken from old getlogin_r.h.
6148         (readlink): New declaration.
6149         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
6150         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
6151         (gl_PREREQ_UNISTD): Remove macro.
6152         (gl_UNISTD_MODULE_INDICATOR): New macro.
6153         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
6154         many new variables. Don't set UNISTD_H.
6155         * modules/unistd (Description): Change.
6156         (Depends-on): Add link-warning.
6157         (configure.ac): Update.
6158         (Makefile.am): Create unistd.h always. Substitute many new variables
6159         into it.
6160
6161 2007-02-18  Bruno Haible  <bruno@clisp.org>
6162
6163         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
6164         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
6165         HAVE_GETSUBOPT.
6166         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
6167         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
6168         * lib/getsubopt.h: Remove file.
6169         * modules/getsubopt (Files): Remove lib/getsubopt.h.
6170         (Depends-on): Add stdlib.
6171         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6172         (Includes): Use <stdlib.h> instead of getsubopt.h.
6173         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
6174         Set HAVE_GETSUBOPT.
6175         * lib/getsubopt.c: Don't include getsubopt.h.
6176
6177 2007-02-18  Bruno Haible  <bruno@clisp.org>
6178
6179         * modules/fchdir (Depends-on): Add dup2.
6180
6181 2007-02-18  Bruno Haible  <bruno@clisp.org>
6182
6183         * lib/stdlib_.h: Handle glibc's special invocation convention
6184         specially.
6185
6186 2007-02-18  Bruno Haible  <bruno@clisp.org>
6187
6188         * modules/stdlib-tests: New file.
6189         * tests/test-stdlib.c: New file.
6190
6191         * modules/mkstemp (Files): Remove lib/mkstemp.h.
6192         (Depends-on): Add stdlib.
6193         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6194         (Includes): Use <stdlib.h> instead of mkstemp.h.
6195         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6196         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
6197         * lib/mkstemp.c: Don't include mkstemp.h.
6198         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
6199         * lib/stdlib--.h: Don't include mkstemp.h.
6200
6201         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
6202         (Depends-on): Add stdlib.
6203         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6204         (Includes): Use <stdlib.h> instead of mkdtemp.h.
6205         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6206         HAVE_MKDTEMP.
6207         * lib/mkdtemp.c: Don't include mkdtemp.h.
6208         * lib/clean-temp.c: Don't include mkdtemp.h.
6209
6210         * modules/exit (Files): Remove lib/exit.h.
6211         (Depends-on): Add stdlib.
6212         (Makefile.am): Remove lib_SOURCES.
6213         (Include): Use <stdlib.h> instead of exit.h.
6214         * lib/argmatch.c: Don't include exit.h.
6215         * lib/execute.c: Likewise.
6216         * lib/pagealign_alloc.c: Likewise.
6217         * lib/pipe.c: Likewise.
6218         * lib/wait-process.c: Likewise.
6219         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
6220         * lib/exitfail.c: Likewise.
6221         * lib/savewd.c: Likewise.
6222         * lib/xsetenv.c: Likewise.
6223
6224         * modules/stdlib: New file.
6225         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
6226         and extra comments about mkstemp().
6227         * lib/exit.h: Remove file.
6228         * lib/mkdtemp.h: Remove file.
6229         * lib/mkstemp.h: Remove file.
6230         * m4/stdlib_h.m4: New file.
6231         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
6232
6233 2007-02-18  Bruno Haible  <bruno@clisp.org>
6234
6235         * modules/math-tests: New file.
6236         * tests/test-math.c: New file.
6237
6238         * modules/math: New file.
6239         * modules/mathl (Files): Remove lib/mathl.h.
6240         (Depends-on): Add math.
6241         (Makefile.am): Don't mention mathl.h.
6242         (Include): Use <math.h> instead of mathl.h.
6243         * lib/math_.h: New file.
6244         * lib/mathl.h: Remove file.
6245         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
6246         mathl.h.
6247         * lib/asinl.c: Likewise.
6248         * lib/atanl.c: Likewise.
6249         * lib/ceill.c: Likewise.
6250         * lib/cosl.c: Likewise.
6251         * lib/expl.c: Likewise.
6252         * lib/floorl.c: Likewise.
6253         * lib/frexpl.c: Likewise.
6254         * lib/ldexpl.c: Likewise.
6255         * lib/logl.c: Likewise.
6256         * lib/sincosl.c: Likewise.
6257         * lib/sinl.c: Likewise.
6258         * lib/sqrtl.c: Likewise.
6259         * lib/tanl.c: Likewise.
6260         * lib/trigl.c: Likewise.
6261         * m4/math_h.m4: New file.
6262         * MODULES.html.sh (Mathematics): Add math.
6263
6264 2007-02-17  Bruno Haible  <bruno@clisp.org>
6265
6266         * modules/wctype-tests: New file.
6267         * tests/test-wctype.c: New file.
6268
6269         * modules/wchar-tests: New file.
6270         * tests/test-wchar.c: New file.
6271
6272         * modules/unistd-tests: New file.
6273         * tests/test-unistd.c: New file.
6274
6275         * modules/time-tests: New file.
6276         * tests/test-time.c: New file.
6277
6278         * modules/sysexits-tests: New file.
6279         * tests/test-sysexits.c: New file.
6280
6281         * modules/sys_time-tests: New file.
6282         * tests/test-sys_time.c: New file.
6283
6284         * modules/sys_stat-tests: New file.
6285         * tests/test-sys_stat.c: New file.
6286
6287         * modules/sys_socket-tests: New file.
6288         * tests/test-sys_socket.c: New file.
6289
6290         * modules/sys_select-tests: New file.
6291         * tests/test-sys_select.c: New file.
6292
6293         * modules/string-tests: New file.
6294         * tests/test-string.c: New file.
6295
6296         * modules/stdbool-tests: New file.
6297         * tests/test-stdbool.c: New file.
6298
6299         * modules/netinet_in-tests: New file.
6300         * tests/test-netinet_in.c: New file.
6301
6302         * modules/inttypes-tests: New file.
6303         * tests/test-inttypes.c: New file.
6304
6305         * modules/fcntl-tests: New file.
6306         * tests/test-fcntl.c: New file.
6307
6308         * modules/byteswap-tests: New file.
6309         * tests/test-byteswap.c: New file.
6310
6311         * modules/arpa_inet-tests: New file.
6312         * tests/test-arpa_inet.c: New file.
6313
6314 2007-02-17  Bruno Haible  <bruno@clisp.org>
6315
6316         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
6317         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
6318         if the corresponding module is not enabled. Emit link warnings if
6319         the function is used nevertheless.
6320         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
6321         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
6322         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
6323         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
6324         * modules/inttypes (Depends-on): Add link-warning.
6325         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6326         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
6327         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
6328         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
6329         * modules/imaxdiv (configure.ac): Likewise.
6330         * modules/strtoimax (configure.ac): Likewise.
6331         * modules/strtoumax (configure.ac): Likewise.
6332
6333 2007-02-17  Bruno Haible  <bruno@clisp.org>
6334
6335         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
6336         gl_STRING_MODULE_INDICATOR_DEFAULTS.
6337         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
6338         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
6339
6340 2007-02-17  Bruno Haible  <bruno@clisp.org>
6341
6342         * modules/link-warning: New file.
6343         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
6344         * lib/string_.h (GL_LINK_WARNING): Remove definition.
6345         * modules/string (Depends-on): Add link-warning.
6346         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6347         string.h.
6348         * MODULES.html.sh (Support for building libraries and executables): Add
6349         link-warning.
6350
6351 2007-02-17  Bruno Haible  <bruno@clisp.org>
6352
6353         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
6354         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
6355         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
6356         long lines.
6357
6358 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
6359             Bruno Haible  <bruno@clisp.org>
6360
6361         * modules/tmpfile: New file.
6362         * lib/tmpfile.c: New file.
6363         * m4/tmpfile.m4: New file.
6364         * MODULES.html.sh (func_all_modules): New section "Input/output".
6365
6366 2007-02-15  Bruno Haible  <bruno@clisp.org>
6367
6368         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
6369         (supports_delete_on_close): New function.
6370         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
6371
6372 2007-02-14  Bruno Haible  <bruno@clisp.org>
6373
6374         * modules/mbspcasecmp-tests: New file.
6375         * tests/test-mbspcasecmp.sh: New file.
6376         * tests/test-mbspcasecmp.c: New file.
6377
6378         New module mbspcasecmp.
6379         * modules/mbspcasecmp: New file.
6380         * lib/mbspcasecmp.c: New file.
6381         * lib/string_.h (strncasecmp): Change warning message.
6382         (mbspcasecmp): New declaration.
6383         * m4/mbspcasecmp.m4: New file.
6384         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6385         GNULIB_MBSPCASECMP.
6386         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
6387         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
6388
6389 2007-02-14  Bruno Haible  <bruno@clisp.org>
6390
6391         * modules/mbsncasecmp-tests: New file.
6392         * tests/test-mbsncasecmp.sh: New file.
6393         * tests/test-mbsncasecmp.c: New file.
6394
6395         New module mbsncasecmp.
6396         * modules/mbsncasecmp: New file.
6397         * lib/mbsncasecmp.c: New file.
6398         * lib/string_.h (mbsncasecmp): New declaration.
6399         * m4/mbsncasecmp.m4: New file.
6400         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6401         GNULIB_MBSNCASECMP.
6402         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
6403         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
6404
6405 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
6406
6407         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
6408         Verify that it doesn't overlap with our flags.
6409         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
6410         do not have the desired effect in multibyte locales; instead, use
6411         mbscasecmp.
6412         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
6413         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
6414         we don't require GNU fnmatch ourselves (if our users require it, they
6415         should do so explicitly).
6416
6417         Fix regex code so it doesn't rely on strcasecmp.
6418         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
6419         Otherwise, include gnulib's langinfo.h.
6420         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
6421         undesirable behavior in non-C locales.  Instead, rely on localecharset.
6422         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
6423         * modules/regex (FILES): Remove m4/codeset.m4.
6424         (Depends-on): Add localcharset.  Remove strcase.
6425
6426 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6427
6428         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
6429         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
6430
6431 2007-02-13  Bruno Haible  <bruno@clisp.org>
6432
6433         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
6434         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6435
6436 2007-02-12  Bruno Haible  <bruno@clisp.org>
6437
6438         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6439         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
6440         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
6441         time warning rather than a link error.
6442
6443 2007-02-12  Bruno Haible  <bruno@clisp.org>
6444
6445         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
6446         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
6447         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6448
6449 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6450
6451         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
6452         args, not 2.
6453
6454 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6455
6456         New module 'time', so that apps can include <time.h> as per
6457         POSIX and GNU instead of separate include files like time_r.h
6458         and timegm.h.  This implementation tries out a simpler approach
6459         for replacing decls in standard include files (as compared to
6460         the string module), somewhat as an experiment.
6461
6462         * config/srclist.txt: Comment out mktime.c for now.
6463         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
6464         since it doesn't apply any more.  Use generic wording instead.
6465         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
6466         'time'.
6467         * lib/time_.h, m4/time_h.m4, modules/time: New files.
6468         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
6469         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
6470         Don't include <sys/types.h>; no longer needed since we assume C89.
6471         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
6472         * lib/strftime.c: Likewise.
6473         * lib/time_r.c: Likewise.
6474         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
6475         * lib/nanosleep.c: Include <time.h> first, to check interface.
6476         * lib/strptime.c: Likewise.
6477         * lib/time_r.c: Likewise.
6478         * lib/timegm.c: Likewise.
6479         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
6480         needed.
6481         * lib/timegm.c: Don't include timegm.h; no longer needed.
6482         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
6483         time.h now handles any problems in that area.
6484         (struct timespec, nanosleep): Remove; time.h now arranges for these.
6485         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
6486         that time.h defines struct timespec.
6487         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
6488         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
6489         handles that.
6490         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
6491         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
6492         needed.  Set REPLACE_LOCALTIME.
6493         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
6494         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
6495         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
6496         nanosleep; time_h.m4 now does that.  Don't require
6497         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
6498         module handles this now.
6499         * modules/getdate (Depends-on): Remove timespec.  Add time.
6500         * modules/nanosleep (Depends-on): Likewise.
6501         * modules/stat-time (Depends-on): Likewise.
6502         * modules/nanosleep (Include): Include time.h, not timespec.h.
6503         * modules/strptime (Files): Remove lib/strptime.h.
6504         (Depends-on): Add extensions, time.
6505         (Include): Include time.h, not strptime.h.
6506         * modules/time_r (Files): Remove lib/time_r.h.
6507         (Depends-on): Add time.
6508         (Include): Include time.h, not time_r.h.
6509         * modules/timegm: Likewise.
6510         * modules/timespec (Description): Now does timespec-related decls
6511         of our own, instead of struct timespec itself.
6512         (Depends-on): Add time; remove extensions.
6513         (Maintainer): Add self.
6514         * modules/utimecmp (Depends-on): Add time; remove timespec.
6515         * modules/utimens (Depends-on): Likewise.
6516         * modules/xnanosleep (Depends-on): Likewise.
6517
6518 2007-02-11  Bruno Haible  <bruno@clisp.org>
6519
6520         * lib/c-strstr.c: Include allocsa.h.
6521         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6522         * lib/c-strcasestr.c: Include allocsa.h.
6523         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6524         * lib/strcasestr.c: Include allocsa.h.
6525         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6526         * lib/mbsstr.c: Include allocsa.h.
6527         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6528         allocsa/freesa instead of malloc/free.
6529         * lib/mbscasestr.c: Include allocsa.h.
6530         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6531         allocsa/freesa instead of malloc/free.
6532         * modules/c-strstr (Depends-on): Add allocsa.
6533         * modules/c-strcasestr (Depends-on): Likewise.
6534         * modules/strcasestr (Depends-on): Likewise.
6535         * modules/mbsstr (Depends-on): Likewise.
6536         * modules/mbscasestr (Depends-on): Likewise.
6537
6538 2007-02-11  Bruno Haible  <bruno@clisp.org>
6539
6540         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
6541
6542         * modules/mbsspn-tests: New file.
6543         * tests/test-mbsspn.sh: New file.
6544         * tests/test-mbsspn.c: New file.
6545
6546 2007-02-11  Bruno Haible  <bruno@clisp.org>
6547
6548         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
6549
6550         * modules/mbspbrk-tests: New file.
6551         * tests/test-mbspbrk.sh: New file.
6552         * tests/test-mbspbrk.c: New file.
6553
6554 2007-02-11  Bruno Haible  <bruno@clisp.org>
6555
6556         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
6557         unneeded cast.
6558
6559         * modules/mbscspn-tests: New file.
6560         * tests/test-mbscspn.sh: New file.
6561         * tests/test-mbscspn.c: New file.
6562
6563 2007-02-11  Bruno Haible  <bruno@clisp.org>
6564
6565         * modules/mbscasecmp-tests: New file.
6566         * tests/test-mbscasecmp.sh: New file.
6567         * tests/test-mbscasecmp.c: New file.
6568
6569 2007-02-11  Bruno Haible  <bruno@clisp.org>
6570
6571         Ensure O(n) worst-case complexity of mbscasestr.
6572         * lib/mbscasestr.c: Include stdbool.h.
6573         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6574         functions.
6575         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
6576         the bookkeeping indicates that it's worth it.
6577         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
6578
6579         * modules/mbscasestr-tests: New file.
6580         * tests/test-mbscasestr1.c: New file.
6581         * tests/test-mbscasestr2.sh: New file.
6582         * tests/test-mbscasestr2.c: New file.
6583         * tests/test-mbscasestr3.sh: New file.
6584         * tests/test-mbscasestr3.c: New file.
6585         * tests/test-mbscasestr4.sh: New file.
6586         * tests/test-mbscasestr4.c: New file.
6587         * m4/locale-tr.m4: New file.
6588
6589 2007-02-11  Bruno Haible  <bruno@clisp.org>
6590
6591         Ensure O(n) worst-case complexity of mbsstr.
6592         * lib/mbsstr.c: Include stdbool.h.
6593         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6594         functions.
6595         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
6596         bookkeeping indicates that it's worth it.
6597         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
6598
6599         * modules/mbsstr-tests: New file.
6600         * tests/test-mbsstr1.c: New file.
6601         * tests/test-mbsstr2.sh: New file.
6602         * tests/test-mbsstr2.c: New file.
6603         * tests/test-mbsstr3.sh: New file.
6604         * tests/test-mbsstr3.c: New file.
6605         * m4/locale-fr.m4: New file.
6606
6607 2007-02-11  Bruno Haible  <bruno@clisp.org>
6608
6609         * lib/mbsrchr.c (mbsrchr): Fix bug.
6610
6611         * modules/mbsrchr-tests: New file.
6612         * tests/test-mbsrchr.sh: New file.
6613         * tests/test-mbsrchr.c: New file.
6614
6615 2007-02-11  Bruno Haible  <bruno@clisp.org>
6616
6617         * lib/mbschr.c (mbschr): Fix bug.
6618
6619         * modules/mbschr-tests: New file.
6620         * tests/test-mbschr.sh: New file.
6621         * tests/test-mbschr.c: New file.
6622         * m4/locale-zh.m4: New file.
6623
6624 2007-02-11  Bruno Haible  <bruno@clisp.org>
6625
6626         Support for copying multibyte string iterators.
6627         * lib/mbiter.h: Include <string.h>.
6628         (mbiter_multi_copy): New function.
6629         (mbi_copy): New macro.
6630         * lib/mbuiter.h: Include <string.h>.
6631         (mbuiter_multi_copy): New function.
6632         (mbui_copy): New macro.
6633
6634 2007-02-11  Bruno Haible  <bruno@clisp.org>
6635
6636         New module mbslen.
6637         * modules/mbslen: New file.
6638         * lib/mbslen.c: New file.
6639         * lib/string_.h (mbslen): New declaration.
6640         * m4/mbslen.m4: New file.
6641         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6642         GNULIB_MBSLEN.
6643         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
6644         * MODULES.html.sh (Internationalization functions): Add mbslen.
6645
6646 2007-02-11  Bruno Haible  <bruno@clisp.org>
6647
6648         Ensure O(n) worst-case complexity of strcasestr substitute.
6649         * lib/strcasestr.c: Include stdbool.h.
6650         (knuth_morris_pratt): New function.
6651         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6652         bookkeeping indicates that it's worth it.
6653         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
6654
6655         * modules/strcasestr-tests: New file.
6656         * tests/test-strcasestr.c: New file.
6657
6658 2007-02-11  Bruno Haible  <bruno@clisp.org>
6659
6660         Ensure O(n) worst-case complexity of c_strcasestr.
6661         * lib/c-strcasestr.c: Include stdbool.h, string.h.
6662         (knuth_morris_pratt): New function.
6663         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
6664         the bookkeeping indicates that it's worth it.
6665         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
6666
6667         * modules/c-strcasestr-tests: New file.
6668         * tests/test-c-strcasestr.c: New file.
6669
6670 2007-02-11  Bruno Haible  <bruno@clisp.org>
6671
6672         Ensure O(n) worst-case complexity of c_strstr.
6673         * lib/c-strstr.c: Include stdbool.h, string.h.
6674         (knuth_morris_pratt): New function.
6675         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6676         bookkeeping indicates that it's worth it.
6677         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
6678
6679         * lib/c-strstr.c: Complete rewrite for maintainability.
6680
6681         * modules/c-strstr-tests: New file.
6682         * tests/test-c-strstr.c: New file.
6683
6684 2007-02-11  Bruno Haible  <bruno@clisp.org>
6685
6686         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
6687         5.2.1 and earlier, whereby \055 was treated just like the range
6688         delimiter '-'.
6689         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
6690
6691 2007-02-08  Bruno Haible  <bruno@clisp.org>
6692
6693         * modules/regex (Depends-on): Add stdbool.
6694         Reported by Dalibor Topic <robilad@kaffe.org>.
6695
6696 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6697
6698         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
6699         Prefer returning from main to exiting from it.
6700         Remove unnecessary parens after sizeof.
6701
6702 2007-02-05  Bruno Haible  <bruno@clisp.org>
6703
6704         New module mbssep.
6705         * modules/mbssep: New file.
6706         * lib/mbssep.c: New file.
6707         * lib/string_.h (strsep): Add a conditional link warning.
6708         (mbssep): New declaration.
6709         * m4/mbssep.m4: New file.
6710         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6711         GNULIB_MBSSEP.
6712         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
6713         * MODULES.html.sh (Internationalization functions): Add mbssep.
6714
6715 2007-02-05  Bruno Haible  <bruno@clisp.org>
6716
6717         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
6718         Optimize search in case of 1 delimiter.
6719
6720 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6721
6722         * lib/acl.h: Include sys/types.h before sys/acl.h.
6723
6724 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6725
6726         Merge upstream fix for glibc bugzilla #3957:
6727
6728         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
6729
6730         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
6731         bit for RE_HAT_LISTS_NOT_NEWLINE.
6732         (build_charclass_op): Remove bogus comment.
6733
6734 2007-02-05  Simon Josefsson  <simon@josefsson.org>
6735
6736         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
6737
6738 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6739
6740         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
6741         * lib/memmem.c [!defined _LIBC]: Include config.h.
6742
6743 2007-02-04  Bruno Haible  <bruno@clisp.org>
6744
6745         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
6746         warning message.
6747
6748 2007-02-04  Bruno Haible  <bruno@clisp.org>
6749
6750         New module mbstok_r.
6751         * modules/mbstok_r: New file.
6752         * lib/mbstok_r.c: New file.
6753         * lib/string_.h (strtok_r): Change argument names to match the
6754         comments. Add a conditional link warning.
6755         (mbstok_r): New declaration.
6756         * m4/mbstok_r.m4: New file.
6757         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6758         GNULIB_MBSTOK_R.
6759         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
6760         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
6761
6762 2007-02-04  Bruno Haible  <bruno@clisp.org>
6763
6764         New module mbsspn.
6765         * modules/mbsspn: New file.
6766         * lib/mbsspn.c: New file.
6767         * lib/string_.h (strspn): Add a conditional link warning.
6768         (mbsspn): New declaration.
6769         * m4/mbsspn.m4: New file.
6770         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6771         GNULIB_MBSSPN.
6772         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
6773         * MODULES.html.sh (Internationalization functions): Add mbsspn.
6774
6775 2007-02-04  Bruno Haible  <bruno@clisp.org>
6776
6777         New module mbspbrk.
6778         * modules/mbspbrk: New file.
6779         * lib/mbspbrk.c: New file.
6780         * lib/string_.h (strpbrk): Add a conditional link warning.
6781         (mbspbrk): New declaration.
6782         * m4/mbspbrk.m4: New file.
6783         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6784         GNULIB_MBSPBRK.
6785         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
6786         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
6787
6788 2007-02-04  Bruno Haible  <bruno@clisp.org>
6789
6790         New module mbscspn.
6791         * modules/mbscspn: New file.
6792         * lib/mbscspn.c: New file.
6793         * lib/string_.h (strcspn): Add a conditional link warning.
6794         (mbscspn): New declaration.
6795         * m4/mbscspn.m4: New file.
6796         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6797         GNULIB_MBSCSPN.
6798         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
6799         * MODULES.html.sh (Internationalization functions): Add mbscspn.
6800
6801 2007-02-04  Bruno Haible  <bruno@clisp.org>
6802
6803         New module mbscasestr, reduced goal of strcasestr.
6804         * modules/mbscasestr: New file.
6805         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
6806         (mbscasestr): Renamed from strcasestr.
6807         * lib/strcasestr.c: Don't include mbuiter.h.
6808         (strcasestr): Remove support for multibyte locales.
6809         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
6810         Change the conditional link warning.
6811         (mbscasestr): New declaration.
6812         * m4/mbscasestr.m4: New file.
6813         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
6814         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
6815         REPLACE_STRCASESTR.
6816         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
6817         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6818         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6819         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
6820         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
6821         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6822         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
6823         (Depends-on): Remove mbuiter.
6824         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
6825
6826 2007-02-04  Bruno Haible  <bruno@clisp.org>
6827
6828         Simplify handling of strncasecmp.
6829         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
6830         the conditional link warning.
6831         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6832         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
6833         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
6834         * modules/strcase (configure.ac): Don't invoke
6835         gl_STRING_MODULE_INDICATOR.
6836         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
6837
6838 2007-02-04  Bruno Haible  <bruno@clisp.org>
6839
6840         New module mbscasecmp, reduced goal of strcasecmp.
6841         * modules/mbscasecmp: New file.
6842         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
6843         (mbscasecmp): Renamed from strcasecmp.
6844         * lib/strcasecmp.c: Don't include mbuiter.h.
6845         (strcasecmp): Remove support for multibyte locales.
6846         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
6847         Change the conditional link warning.
6848         (mbscasecmp): New declaration.
6849         * m4/mbscasecmp.m4: New file.
6850         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
6851         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
6852         REPLACE_STRCASECMP.
6853         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
6854         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6855         GNULIB_MBSCASECMP.
6856         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
6857         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
6858         * modules/strcase (Files): Remove m4/mbrtowc.m4.
6859         (Depends-on): Remove mbuiter.
6860         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
6861
6862 2007-02-04  Bruno Haible  <bruno@clisp.org>
6863
6864         New module mbsstr. Remove module strstr.
6865         * modules/mbsstr: New file.
6866         * modules/strstr: Remove file.
6867         * lib/mbsstr.c: Renamed from lib/strstr.c.
6868         (mbsstr): Renamed from strstr.
6869         * lib/string_.h (strstr): Remove declaration. Change the conditional
6870         link warning.
6871         (mbsstr): New declaration.
6872         * m4/mbsstr.m4: New file.
6873         * m4/strstr.m4: Remove file.
6874         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
6875         REPLACE_STRSTR.
6876         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
6877         Don't initialize GNULIB_STRSTR.
6878         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
6879         substitute GNULIB_STRSTR and REPLACE_STRSTR.
6880         * MODULES.html.sh (Internationalization functions): Add mbsstr.
6881         (Support for systems lacking ANSI C 89): Remove strstr.
6882
6883 2007-02-04  Bruno Haible  <bruno@clisp.org>
6884
6885         New module mbsrchr.
6886         * modules/mbsrchr: New file.
6887         * lib/mbsrchr.c: New file.
6888         * lib/string_.h (strrchr): Add a conditional link warning.
6889         (mbsrchr): New declaration.
6890         * m4/mbsrchr.m4: New file.
6891         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6892         GNULIB_MBSRCHR.
6893         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
6894         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
6895
6896 2007-02-04  Bruno Haible  <bruno@clisp.org>
6897
6898         New module mbschr.
6899         * modules/mbschr: New file.
6900         * lib/mbschr.c: New file.
6901         * lib/string_.h (strchr): Add a conditional link warning.
6902         (mbschr): New declaration.
6903         * m4/mbschr.m4: New file.
6904         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6905         GNULIB_MBSCHR.
6906         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
6907         * MODULES.html.sh (Internationalization functions): Add mbschr.
6908
6909 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6910
6911         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
6912
6913         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
6914
6915 2007-02-04  Bruno Haible  <bruno@clisp.org>
6916
6917         New module description section 'configure.ac-early'.
6918         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
6919         (func_get_autoconf_early_snippet): New function.
6920         (func_import, func_create_testdir): Use it. Remove special cases for
6921         modules 'extensions' and 'lock'.
6922         * modules/extensions (configure.ac-early): Require
6923         gl_USE_SYSTEM_EXTENSIONS.
6924         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
6925
6926 2007-02-04  Bruno Haible  <bruno@clisp.org>
6927
6928         Make use of gcj-4.3's -fsource and -ftarget option.
6929         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
6930         and if so try the options -fsource and -ftarget.
6931         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
6932         source_version, ftarget_option, target_version arguments.
6933         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
6934         (is_envjavac_oldgcj_14_14_usable): Renamed from
6935         is_envjavac_gcj_14_14_usable.
6936         (is_envjavac_oldgcj_14_13_usable): Renamed from
6937         is_envjavac_gcj_14_13_usable.
6938         (is_gcj_present): Update.
6939         (is_gcj_43, is_gcj43_usable): New functions.
6940         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
6941         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
6942         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
6943         try the options -fsource and -ftarget.
6944
6945 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
6946
6947         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
6948         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
6949         larger value.
6950
6951 2007-02-03  Jim Meyering  <jim@meyering.net>
6952
6953         Give tools a better chance to allocate space for very large buffers.
6954         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
6955
6956         Make pwd and readlink work also when run with an unreadable parent dir
6957         on systems with openat support.
6958         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
6959         provided getcwd function, even when we have openat support.
6960         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
6961
6962 2007-02-02  Bruno Haible  <bruno@clisp.org>
6963
6964         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6965         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
6966         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
6967         portability problems if one of these functions is only used on specific
6968         platforms.
6969         Reported by Paul Eggert.
6970
6971 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
6972
6973         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
6974         is causing more trouble than it's curing.
6975         * lib/regex_internal.h (__mempcpy): Remove.
6976         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
6977         (and make the code a tad smaller to boot).
6978         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
6979
6980 2007-02-02  Jim Meyering  <jim@meyering.net>
6981
6982         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
6983         section, not in the Makefile.am: one.
6984
6985 2007-02-02  Eric Blake  <ebb9@byu.net>
6986
6987         * lib/strchrnul.c: Always include config.h first.
6988
6989         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
6990         gnulib strstr is not necessary here.
6991
6992 2007-02-02  Simon Josefsson  <simon@josefsson.org>
6993
6994         * m4/socklen.m4: Fix typo.
6995
6996 2007-02-02  Eric Blake  <ebb9@byu.net>
6997
6998         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
6999         * modules/netinet_in (Makefile.am): Likewise.
7000
7001 2007-02-01  Bruno Haible  <bruno@clisp.org>
7002
7003         * lib/string_.h (GL_LINK_WARNING): New macro.
7004         (strcasecmp, strstr, strcasestr): If provided by the system,
7005         conditionally define as a macro that leads to a warning instead of to
7006         an error.
7007         (strncasecmp): Conditionally define as a macro that leads to a warning.
7008
7009 2007-02-01  Karl Berry  <karl@gnu.org>
7010
7011         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
7012
7013 2007-02-01  Bruno Haible  <bruno@clisp.org>
7014
7015         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
7016         renamings.
7017
7018 2007-02-01  Eric Blake  <ebb9@byu.net>
7019
7020         * modules/regex (Depends-on): Revert dependence on mempcpy.
7021         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
7022         module's definition of mempcpy.
7023         Reported by Paul Eggert.
7024
7025 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
7026
7027         * lib/string_.h: If the gnulib module XYZ is not present, undefine
7028         the symbol XYZ before redefining it.  This fixes a problem with
7029         programs that don't use XYZ, when compiled on systems that define
7030         XYZ to something else.
7031
7032 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
7033
7034         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
7035         occurs when "mkdir -m foo" creates a setgid directory that is (1)
7036         writeable to group or other and (2) is intended to have a special
7037         mode bit that is set or cleared.  In such a case, the directory
7038         should be neither group- nor other-writeable until the special
7039         mode bits are right.
7040
7041 2007-01-31  Eric Blake  <ebb9@byu.net>
7042
7043         * modules/mountlist (Depends-on): Add strstr.
7044
7045         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
7046         bug.
7047         * modules/string (Makefile.am): Remove redundant replacement.
7048         * modules/regex (Depends-on): Add mempcpy.
7049
7050 2007-01-31  Bruno Haible  <bruno@clisp.org>
7051
7052         New module description field 'Link'.
7053         * gnulib-tool (func_usage): Document --extract-link-directive.
7054         (sed_extract_prog): Recognize 'Link' directive.
7055         (func_get_link_directive): New function.
7056         (func_import): Show summary of link directives.
7057         Handle --extract-link-directive option.
7058         * modules/acl (Link): New section.
7059         * modules/clock-time (Link): New section.
7060         * modules/euidaccess (Link): New section.
7061         * modules/gettext (Link): New section.
7062         * modules/iconv (Link): New section.
7063         * modules/lock (Link): New section.
7064         * modules/nanosleep (Link): New section.
7065         * modules/readline (Link): New section.
7066
7067 2007-01-27  Bruno Haible  <bruno@clisp.org>
7068
7069         Enforce the use of gnulib modules for unportable <string.h> functions.
7070         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
7071         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
7072         (gl_HEADER_STRING_H_BODY): Require it.
7073         * lib/string_.h: If the gnulib module XYZ is not present, redefine
7074         the symbol XYZ to one that gives a link error.
7075         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
7076         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
7077         * modules/mempcpy (configure.ac): Likewise.
7078         * modules/memrchr (configure.ac): Likewise.
7079         * modules/stpcpy (configure.ac): Likewise.
7080         * modules/stpncpy (configure.ac): Likewise.
7081         * modules/strcase (configure.ac): Likewise.
7082         * modules/strcasestr (configure.ac): Likewise.
7083         * modules/strchrnul (configure.ac): Likewise.
7084         * modules/strdup (configure.ac): Likewise.
7085         * modules/strndup (configure.ac): Likewise.
7086         * modules/strnlen (configure.ac): Likewise.
7087         * modules/strpbrk (configure.ac): Likewise.
7088         * modules/strsep (configure.ac): Likewise.
7089         * modules/strstr (configure.ac): Likewise.
7090         * modules/strtok_r (configure.ac): Likewise.
7091
7092 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
7093
7094         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
7095
7096 2007-01-30  Jim Meyering  <jim@meyering.net>
7097
7098         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
7099
7100 2007-01-29  Bruno Haible  <bruno@clisp.org>
7101
7102         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
7103         * lib/execute.c: Likewise.
7104         * lib/pipe.c: Likewise.
7105         * lib/printf-args.h: Likewise.
7106         * lib/printf-args.c: Likewise.
7107         * lib/printf-parse.c: Likewise.
7108         * lib/vasnprintf.c: Likewise.
7109
7110 2007-01-29  Eric Blake  <ebb9@byu.net>
7111
7112         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
7113         declaration.
7114
7115 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
7116
7117         * lib/strptime.h (strptime): Use 'restrict' for args where
7118         POSIX requires this.
7119         * lib/strptime.c (strptime): Likewise.
7120         Change license notice from LGPL to GPL, since gnulib-tool will
7121         change this as needed.
7122         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
7123         defined.
7124         Include "strptime.h" first, to check interface.
7125         Do not #undef _LIBC and _NL_CURRENT.
7126         Do not include <stdlib.h>; no longer needed.
7127         Include "time_r.h" and declare ptime_locale_status
7128         only if _LIBC is not defined.
7129         (__P): Remove unused macro.
7130         (match_string): Bring back glibc version, but use it only if _LIBC
7131         is defined.
7132         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
7133         Remove unnecessary assertion and abort() call.
7134         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
7135         * m4/strptime.m4: Fix serial number comment.
7136         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
7137         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
7138         (Depends-on): Add time_r.
7139
7140 2007-01-29  Bruno Haible  <bruno@clisp.org>
7141
7142         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
7143         strptime.
7144         * modules/strptime (Depends-on): Add stdbool.
7145         * lib/strptime.h: Include <time.h> always. Add comments.
7146
7147 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
7148
7149         * modules/strptime: New file.
7150         * lib/strptime.h: New file.
7151         * lib/strptime.c: New file.
7152         * m4/strptime.m4: New file.
7153
7154 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
7155
7156         * MODULES.html.sh: New module mpsort.
7157         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
7158
7159         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
7160         a circularity problem with HP-UX ia64 reported by Bob Proulx in
7161         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
7162         All uses changed.
7163         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
7164         All uses changed.
7165         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
7166         to _Restrict_.
7167         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
7168         the parameter matches the prototype.
7169
7170 2007-01-28  Jim Meyering  <jim@meyering.net>
7171
7172         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
7173         sys/time.h here, reverting that part of the previous patch:
7174         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
7175
7176 2007-01-28  Bruno Haible  <bruno@clisp.org>
7177
7178         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
7179         value of $(SYS_TIME_H).
7180         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
7181         remove it conditionally, too. [added by Jim Meyering]
7182         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
7183         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7184         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
7185         GETTIMEOFDAY_REPLACEMENT to 1.
7186
7187 2007-01-28  Bruno Haible  <bruno@clisp.org>
7188
7189         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
7190         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
7191         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
7192         Set UNISTD_H instead of UNISTD_H2.
7193         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
7194
7195 2007-01-28  Bruno Haible  <bruno@clisp.org>
7196
7197         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
7198         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
7199
7200 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7201
7202         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
7203         (func_create_testdir): Ensure C locale for `grep' and `tr'
7204         character ranges.
7205         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
7206         ACLOCAL_AMFLAGS parsing state machine.
7207
7208 2007-01-27  Bruno Haible  <bruno@clisp.org>
7209
7210         * modules/unistr/base: Update.
7211
7212 2007-01-27  Bruno Haible  <bruno@clisp.org>
7213
7214         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
7215         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
7216         * modules/unistr/u32-mbtouc-unsafe: Renamed from
7217         modules/unistr/u32-mbtouc.
7218         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
7219         * lib/unistr.h: Update.
7220         * lib/linebreak.c: Update.
7221         * modules/unistr/u32-mbtouc: Renamed from
7222         modules/unistr/u32-mbtouc-safe.
7223         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
7224         * lib/unistr.h: Update.
7225         * lib/unistr/u32-to-u8.c: Update.
7226         * lib/unistr/u32-to-u16.c: Update.
7227
7228 2007-01-27  Bruno Haible  <bruno@clisp.org>
7229
7230         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
7231         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
7232         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
7233         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
7234         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
7235         * modules/unistr/u16-mbtouc-unsafe: Renamed from
7236         modules/unistr/u16-mbtouc.
7237         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
7238         * lib/unistr.h: Update.
7239         * lib/linebreak.c: Update.
7240         * modules/linebreak: Update.
7241         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
7242         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
7243         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
7244         * modules/unistr/u16-mbtouc: Renamed from
7245         modules/unistr/u16-mbtouc-safe.
7246         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
7247         * lib/unistr.h: Update.
7248         * lib/unistr/u16-to-u8.c: Update.
7249         * modules/unistr/u16-to-u8: Update.
7250         * lib/unistr/u16-to-u32.c: Update.
7251         * modules/unistr/u16-to-u32: Update.
7252
7253 2007-01-27  Bruno Haible  <bruno@clisp.org>
7254
7255         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
7256         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
7257         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
7258         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
7259         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
7260         * modules/unistr/u8-mbtouc-unsafe: Renamed from
7261         modules/unistr/u8-mbtouc.
7262         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
7263         * lib/unistr.h: Update.
7264         * lib/striconveh.c: Update.
7265         * modules/striconveh: Update.
7266         * lib/linebreak.c: Update.
7267         * modules/linebreak: Update.
7268         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
7269         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
7270         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
7271         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
7272         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
7273         * lib/unistr.h: Update.
7274         * lib/striconveh.c: Update.
7275         * modules/striconveh: Update.
7276         * lib/unistr/u8-to-u16.c: Update.
7277         * modules/unistr/u8-to-u16: Update.
7278         * lib/unistr/u8-to-u32.c: Update.
7279         * modules/unistr/u8-to-u32: Update.
7280
7281 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7282
7283         Sync from Libtool.
7284         * lib/argz.c: Do not include strings.h nor memory.h, include
7285         string.h unconditionally.  Patch by Simon Josefsson.
7286
7287 2007-01-27  Bruno Haible  <bruno@clisp.org>
7288
7289         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
7290         from gl_HEADER_STRING_H_BODY.
7291         (gl_HEADER_STRING_H_BODY): Require it.
7292         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
7293         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
7294         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
7295         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
7296         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
7297         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
7298         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
7299         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
7300         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
7301         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
7302         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
7303         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
7304         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
7305         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
7306         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7307
7308 2007-01-27  Bruno Haible  <bruno@clisp.org>
7309
7310         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
7311         check_PROGRAMS into noinst_PROGRAMS.
7312         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
7313         check_PROGRAMS in this case.
7314         (func_import): Set for_test to false.
7315         (func_create_testdir): Set for_test to true.
7316
7317 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7318             Bruno Haible  <bruno@clisp.org>
7319
7320         * modules/strcasestr (Files): Remove lib/strcasestr.h.
7321         (Depends-on): Add string.
7322         (Includes): Use <string.h> instead of strcasestr.h.
7323         * modules/string (Makefile.am): Also substitute the value of
7324         REPLACE_STRCASESTR.
7325         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
7326         assume strcasestr is declared in <string.h> not <strings.h>. Also
7327         set REPLACE_STRCASESTR.
7328         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
7329         REPLACE_STRCASESTR.
7330         * lib/strcasestr.h: Remove file.
7331         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
7332         * lib/string_.h (strcasestr): New declaration.
7333
7334 2007-01-27  Bruno Haible  <bruno@clisp.org>
7335
7336         * lib/string_.h: Use 'extern'.
7337
7338 2007-01-27  Jim Meyering  <jim@meyering.net>
7339
7340         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
7341         of set-but-not-used local, "q".
7342
7343         * lib/mempcpy.c: Include <config.h> before <string.h>.
7344         This fixes a compilation error on HP-UX, due to the system's
7345         "restrict"-using mempcpy prototype.
7346
7347 2007-01-26  Bruno Haible  <bruno@clisp.org>
7348
7349         Small optimization.
7350         * lib/javacomp.c: Include c-strstr.h.
7351          (is_envjavac_gcj): Use c_strstr instead of strstr.
7352         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
7353
7354 2007-01-26  Bruno Haible  <bruno@clisp.org>
7355
7356         * MODULES.html.sh (Unicode string functions): Add the new modules.
7357
7358         * modules/uniconv/u32-strconv-to-locale: New file.
7359         * lib/uniconv/u32-strconv-to-locale.c: New file.
7360
7361         * modules/uniconv/u16-strconv-to-locale: New file.
7362         * lib/uniconv/u16-strconv-to-locale.c: New file.
7363
7364         * modules/uniconv/u8-strconv-to-locale: New file.
7365         * lib/uniconv/u8-strconv-to-locale.c: New file.
7366
7367         * modules/uniconv/u32-strconv-from-locale: New file.
7368         * lib/uniconv/u32-strconv-from-locale.c: New file.
7369
7370         * modules/uniconv/u16-strconv-from-locale: New file.
7371         * lib/uniconv/u16-strconv-from-locale.c: New file.
7372
7373         * modules/uniconv/u8-strconv-from-locale: New file.
7374         * lib/uniconv/u8-strconv-from-locale.c: New file.
7375
7376         * modules/uniconv/u32-strconv-to-enc: New file.
7377         * lib/uniconv/u32-strconv-to-enc.c: New file.
7378         * modules/uniconv/u32-strconv-to-enc-tests: New file.
7379         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
7380
7381         * modules/uniconv/u16-strconv-to-enc: New file.
7382         * lib/uniconv/u16-strconv-to-enc.c: New file.
7383         * lib/uniconv/u-strconv-to-enc.h: New file.
7384         * modules/uniconv/u16-strconv-to-enc-tests: New file.
7385         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
7386
7387         * modules/uniconv/u8-strconv-to-enc: New file.
7388         * lib/uniconv/u8-strconv-to-enc.c: New file.
7389         * modules/uniconv/u8-strconv-to-enc-tests: New file.
7390         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
7391
7392         * modules/uniconv/u32-strconv-from-enc: New file.
7393         * lib/uniconv/u32-strconv-from-enc.c: New file.
7394         * modules/uniconv/u32-strconv-from-enc-tests: New file.
7395         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
7396
7397         * modules/uniconv/u16-strconv-from-enc: New file.
7398         * lib/uniconv/u16-strconv-from-enc.c: New file.
7399         * modules/uniconv/u16-strconv-from-enc-tests: New file.
7400         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
7401
7402         * modules/uniconv/u8-strconv-from-enc: New file.
7403         * lib/uniconv/u8-strconv-from-enc.c: New file.
7404         * lib/uniconv/u-strconv-from-enc.h: New file.
7405         * modules/uniconv/u8-strconv-from-enc-tests: New file.
7406         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
7407
7408         * modules/uniconv/u32-conv-from-enc: New file.
7409         * lib/uniconv/u32-conv-from-enc.c: New file.
7410         * modules/uniconv/u32-conv-from-enc-tests: New file.
7411         * tests/uniconv/test-u32-conv-from-enc.c: New file.
7412
7413         * modules/uniconv/u16-conv-from-enc: New file.
7414         * lib/uniconv/u16-conv-from-enc.c: New file.
7415         * lib/uniconv/u-conv-from-enc.h: New file.
7416         * modules/uniconv/u16-conv-from-enc-tests: New file.
7417         * tests/uniconv/test-u16-conv-from-enc.c: New file.
7418
7419         * modules/uniconv/u8-conv-from-enc: New file.
7420         * lib/uniconv/u8-conv-from-enc.c: New file.
7421         * modules/uniconv/u8-conv-from-enc-tests: New file.
7422         * tests/uniconv/test-u8-conv-from-enc.c: New file.
7423
7424         * modules/uniconv/base: New file.
7425         * lib/uniconv.h: New file.
7426
7427 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7428
7429         * doc/gnulib-tool.texi (Initial import): Update to match current
7430         behavior with strdup module.
7431         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
7432         * lib/memmem.h: Remove; all uses removed.  This is now done
7433         by <string.h>.
7434         * lib/mempcpy.h: Likewise.
7435         * lib/memrchr.h: Likewise.
7436         * lib/stpcpy.h: Likewise.
7437         * lib/stpncpy.h: Likewise.
7438         * lib/strcase.h: Likewise.
7439         * lib/strchrnul.h: Likewise.
7440         * lib/strdup.h: Likewise.
7441         * lib/strndup.h: Likewise.
7442         * lib/strnlen.h: Likewise.
7443         * lib/strpbrk.h: Likewise.
7444         * lib/strsep.h: Likewise.
7445         * lib/strstr.h: Likewise.
7446         * lib/strtok_r.h: Likewise.
7447         * lib/string_.h: New file.
7448         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
7449         Rely on <string.h> instead.
7450         * lib/canon-host.c: Likewise.
7451         * lib/chdir-long.c: Likewise.
7452         * lib/concatpath.c: Likewise.
7453         * lib/exclude.c: Likewise.
7454         * lib/fchdir.c: Likewise.
7455         * lib/getaddrinfo.c: Likewise.
7456         * lib/getcwd.c: Likewise.
7457         * lib/getsubopt.c: Likewise.
7458         * lib/glob.c: Likewise.
7459         * lib/hard-locale.c: Likewise.
7460         * lib/iconvme.c: Likewise.
7461         * lib/javacomp.c: Likewise.
7462         * lib/mempcpy.c: Likewise.
7463         * lib/memrchr.c: Likewise.
7464         * lib/regex_internal.h: Likewise.
7465         * lib/stpncpy.c: Likewise.
7466         * lib/strcasecmp.c: Likewise.
7467         * lib/strchrnul.c: Likewise.
7468         * lib/strdup.c: Likewise.
7469         * lib/striconv.c: Likewise.
7470         * lib/striconveh.c: Likewise.
7471         * lib/striconveha.c: Likewise.
7472         * lib/strncasecmp.c: Likewise.
7473         * lib/strndup.c: Likewise.
7474         * lib/strnlen.c: Likewise.
7475         * lib/strsep.c: Likewise.
7476         * lib/strstr.c: Likewise.
7477         * lib/strtok_r.c: Likewise.
7478         * lib/userspec.c: Likewise.
7479         * lib/w32spawn.h: Likewise.
7480         * lib/xstrndup.c: Likewise.
7481         * lib/mountlist.c (strstr): Remove decl.
7482         * m4/string_h.m4: New file.
7483         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
7484         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
7485         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
7486         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
7487         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
7488         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
7489         Set REPLACE_STRCASECMP if necessary.
7490         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
7491         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
7492         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
7493         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
7494         HAVE_DECL_STRDUP if necessary.
7495         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
7496         since gl_FUNC_STRNDUP does that now.
7497         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
7498         Check for decl here...
7499         (gl_PREREQ_STRNLEN): ... not here.
7500         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
7501         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
7502         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
7503         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
7504         necessary.
7505         * modules/string: New file.
7506         * modules/memmem (Files): Remove special-purpose include file.
7507         (Depends-on): Add string.
7508         (Include): Include <string.h>, not the removed file.
7509         * modules/mempcpy: Likewise.
7510         * modules/memrchr: Likewise.
7511         * modules/stpcpy: Likewise.
7512         * modules/stpncpy: Likewise.
7513         * modules/strcase: Likewise.
7514         * modules/strchrnul: Likewise.
7515         * modules/strdup: Likewise.
7516         * modules/strndup: Likewise.
7517         * modules/strnlen: Likewise.
7518         * modules/strpbrk: Likewise.
7519         * modules/strsep: Likewise.
7520         * modules/strstr: Likewise.
7521         * modules/strtok_r: Likewise.
7522         * tests/test-dirname.c: Don't include "strdup.h", since
7523         <string.h> now suffices.
7524         * tests/test-memmem.c: Don't include "memmem.h", since
7525         <string.h> now suffices.
7526
7527 2007-01-25  Bruno Haible  <bruno@clisp.org>
7528
7529         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
7530         *resultp is 0.
7531
7532         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
7533         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
7534         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
7535         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
7536
7537         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
7538         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
7539         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
7540         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
7541         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
7542         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
7543
7544 2007-01-24  Bruno Haible  <bruno@clisp.org>
7545
7546         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
7547         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
7548         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
7549         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
7550         gl_FUNC_FTS_CORE.
7551         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
7552         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
7553         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
7554         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
7555         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
7556         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
7557         gl_FUNC_FCHOWNAT.
7558         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
7559         gl_FUNC_STRFTIME.
7560         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
7561         Reported by Ralf Wildenhues.
7562
7563 2007-01-24  Bruno Haible  <bruno@clisp.org>
7564
7565         Drop AC_REQUIRE calls that are redundant with the module dependencies.
7566         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
7567         gl_GETADDRINFO.
7568         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
7569         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
7570         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
7571
7572 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
7573
7574         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
7575         Don't use 'exit'; just return from 'main'.
7576         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
7577
7578         * lib/fnmatch_.h: Readjust white space and comments to match
7579         glibc, to avoid spurious diffs.
7580
7581 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7582
7583         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
7584         2004-12-01 change by Jakub Jelinek, since this code won't compile
7585         if !LIBC.  Problem reported by Bob Proulx.
7586
7587 2007-01-23  Bruno Haible  <bruno@clisp.org>
7588
7589         * lib/striconveh.c: Include c-strcaseeq.h.
7590         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
7591         * modules/striconveh (Depends-on): Add c-strcaseeq.
7592
7593 2007-01-23  Bruno Haible  <bruno@clisp.org>
7594
7595         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
7596
7597         * modules/c-strcaseeq: New file.
7598         * lib/c-strcaseeq.h: New file.
7599
7600         * modules/streq: New file.
7601         * lib/streq.h: New file.
7602
7603 2007-01-23  Bruno Haible  <bruno@clisp.org>
7604
7605         * modules/striconveha-tests: New file.
7606         * tests/test-striconveha.c: New file.
7607
7608         * lib/striconveha.h: Include <stdbool.h>.
7609         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
7610         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
7611         (mem_iconveha_notranslit): Renamed from mem_iconveha.
7612         (mem_iconveha): New function.
7613         (str_iconveha_notranslit): Renamed from str_iconveha.
7614         (str_iconveha): New function.
7615         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
7616         c-strcase.
7617
7618 2007-01-23  Bruno Haible  <bruno@clisp.org>
7619
7620         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
7621         encodings without forgiving before trying any encoding with handler.
7622         (str_iconveha): Try all encodings without forgiving before trying any
7623         encoding with handler.
7624
7625 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7626
7627         Import the following changes from libc.
7628
7629         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7630
7631         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
7632
7633         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
7634
7635         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
7636         normal_bracket label.
7637
7638         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
7639
7640         [BZ #361]
7641         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
7642         to normal_bracket after fetching the next character.
7643
7644 2007-01-22  Bruno Haible  <bruno@clisp.org>
7645
7646         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
7647         argument.
7648         * lib/striconveh.c (iconv_carefully_1): New function.
7649         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
7650         argument.
7651         (str_cd_iconveh): Update.
7652         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
7653         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
7654         * tests/test-striconveh.c (MAGIC): New macro.
7655         (new_offsets): New function.
7656         (main): Test call with and without offsets.
7657
7658 2007-01-22  Bruno Haible  <bruno@clisp.org>
7659
7660         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
7661         * modules/sys_select (Makefile.am): Likewise.
7662         * modules/sys_socket (Makefile.am): Likewise.
7663         * modules/sys_time (Makefile.am): Likewise.
7664
7665 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7666
7667         * modules/gettimeofday (License): Change from GPL to LGPL, since
7668         gettimeofday is a library function.
7669
7670 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7671
7672         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
7673
7674 2007-01-21  Bruno Haible  <bruno@clisp.org>
7675
7676         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
7677
7678 2007-01-21  Bruno Haible  <bruno@clisp.org>
7679
7680         * modules/striconveha: New file.
7681         * lib/striconveha.h: New file.
7682         * lib/striconveha.c: New file.
7683         * MODULES.html.sh (Internationalization functions): Add striconveha.
7684         * lib/striconv.c (str_iconv): Optimize the case of an empty input
7685         string.
7686         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
7687
7688 2007-01-21  Bruno Haible  <bruno@clisp.org>
7689
7690         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
7691         * lib/striconveh.c (str_iconveh): Likewise.
7692
7693 2007-01-21  Bruno Haible  <bruno@clisp.org>
7694
7695         * lib/striconveh.h (mem_iconveh): New declaration.
7696         * lib/striconveh.c (mem_iconveh): New function.
7697         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
7698
7699 2007-01-21  Bruno Haible  <bruno@clisp.org>
7700
7701         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
7702
7703         * lib/striconveh.h (mem_cd_iconveh): Change specification.
7704         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
7705         original result buffer.
7706         (str_cd_iconveh): Update.
7707         * tests/test-striconveh.c (main): Update.
7708
7709         * lib/striconv.h (mem_cd_iconv): Change specification.
7710         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
7711         result buffer.
7712         (str_cd_iconv): Update.
7713         * tests/test-striconv.c (main): Update.
7714
7715 2007-01-21  Bruno Haible  <bruno@clisp.org>
7716
7717         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
7718
7719 2007-01-20  Jim Meyering  <jim@meyering.net>
7720
7721         * lib/userspec.c (parse_with_separator): If a user or group string
7722         starts with "+", skip the corresponding name-to-ID look-up, since
7723         such a look-up must fail: user and group names may not include "+".
7724
7725 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
7726
7727         * lib/poll.c: Include sys/time.h and time.h unconditionally,
7728         since we now assume the sys_time module.
7729         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
7730         check for sys/time.h; no longer needed.
7731         * modules/poll (Depends-on): Depend on sys_time.
7732
7733 2007-01-18  Bruno Haible  <bruno@clisp.org>
7734
7735         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
7736         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7737
7738         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
7739         gettimeofday.
7740
7741         * tests/test-gettimeofday.c: Include <time.h>.
7742         (dummy): Remove variable.
7743
7744         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
7745         gl_HEADER_SYS_TIME_H.
7746         (gl_HEADER_SYS_TIME_H): New macro.
7747
7748         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
7749         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7750         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
7751         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
7752         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7753         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
7754         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
7755         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7756         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
7757         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
7758         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7759
7760         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
7761         last change; it caused a compilation error when cross-compiling to
7762         Cygwin.
7763
7764 2007-01-18  Jim Meyering  <jim@meyering.net>
7765
7766         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
7767         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
7768         than the race-prone "test -d sys || mkdir sys".
7769         (configure.ac): Use AC_PROG_MKDIR_P.
7770         * modules/sys_select: Likewise.
7771         * modules/sys_socket: Likewise.
7772         * modules/sys_time: Likewise.
7773
7774 2007-01-18  Eric Blake  <ebb9@byu.net>
7775
7776         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
7777         replace gettimeofday.
7778         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
7779         name, to avoid infinite recursion.
7780
7781 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
7782
7783         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
7784         module sys_time.
7785         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
7786         assume timespec.h defines struct timeval.
7787         * lib/settime.c: Likewise.
7788         * lib/utimens.c: Likewise.
7789         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
7790         since we now assume the gettimeofday module.
7791         * lib/tempname.c (__gen_tempname): Likewise.
7792         * lib/gettimeofday.h: Remove.
7793         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
7794         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
7795         Include <time.h>, for 'time()'.
7796         (localtime_buffer_addr): Also use this workaround if
7797         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
7798         to simplify the uses.  All uses changed.
7799         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
7800         that #undef is inside {}, and 'const' follows type name consistently.
7801         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
7802         (gettimeofday): Do not use the maximum possible value for
7803         tv->tv_usec, since that might break usages other than ls.c.
7804         Instead, we'll leave ls.c alone.  This undoes today's patch
7805         by Bruno.  Add a compile-time warning for 1s-clock resolution;
7806         we've never observed the problem but might as well keep the
7807         canary.
7808         * lib/nanosleep.c: Include timespec.h first, for interface check.
7809         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
7810         now assume the sys_time module.
7811         * lib/tempname.c: Likewise.
7812         * lib/timespec.h: Likewise.
7813         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
7814         needed.
7815         * lib/strftime.c: Likewise.
7816         * lib/timespec.h: Likewise.
7817         * lib/posixtm.c: Include posixtm.h first, for interface check.
7818         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
7819         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
7820         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
7821         * lib/sys_time_.h: New file.
7822         * lib/timespec.h (struct timespec): Use long int, not long.
7823         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7824         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
7825         Remove obsolescent call to AC_HEADER_TIME.
7826         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
7827         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7828         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7829         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
7830         Likewise.
7831         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
7832         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
7833         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
7834         into the sys_time module.  Check for gettimeofday just once.
7835         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
7836         for gettimeofday signature to just check the signature.  Merely
7837         compile it, since linking doesn't test signature.  Improve test for
7838         whether gettimeofday.o is actually needed.
7839         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
7840         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
7841         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
7842         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7843         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
7844         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
7845         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
7846         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
7847         than worrying about sys/time.h.
7848         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7849         Don't bother worrying about TIME_WITH_SYS_TIME.
7850         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
7851         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
7852         * m4/sys_time_h.m4: New file.
7853         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
7854         Don't include sys/time.h.  Return from main rather than exiting.
7855         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
7856         all uses changed.
7857         * modules/gethrxtime (Depends-on): Add sys_time.
7858         * modules/gettime (Depends-on): Likewise.
7859         * modules/gettimeofday (Depends-on): Likewise.
7860         * modules/nanosleep (Depends-on): Likewise.
7861         * modules/settime (Depends-on): Likewise.
7862         * modules/tempname (Depends-on): Likewise.
7863         * modules/utimens (Depends-on): Likewise.
7864         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
7865         (Include:) Change back to <sys/time.h>.
7866         (Maintainer:) Add self.
7867         * modules/sys_time: New file.
7868         * modules/tempname (Depends-on): Add gettimeofday.
7869         * tests/test-gettimeofday.c: Include <sys/time.h>
7870         rather than gettimeofday.h.
7871
7872 2007-01-17  Bruno Haible  <bruno@clisp.org>
7873
7874         * gnulib-tool (func_get_license): Revert last patch. Instead, let
7875         the license default to GPL.
7876         (func_create_testdir): Don't complain if a module is LGPL and its
7877         tests module depends on GPLed modules.
7878
7879 2007-01-17  Bruno Haible  <bruno@clisp.org>
7880
7881         * lib/gettimeofday.c (gettimeofday): Add code for the case
7882         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
7883         maximum possible value for tv->tv_usec, rather than the minimum one.
7884
7885 2005-10-08  Martin Lambers  <marlam@marlam.de>
7886 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7887 2007-01-16  Bruno Haible  <bruno@clisp.org>
7888
7889         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
7890         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
7891         gl_FUNC_GETTIMEOFDAY.
7892         (Include): Add gettimeofday.h.
7893         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
7894         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
7895         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
7896         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
7897         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
7898         * lib/gettimeofday.h: New file.
7899         * lib/gettimeofday.c: Include <sys/timeb.h>.
7900         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
7901         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7902         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
7903         fall back on time().
7904
7905         * tests/test-gettimeofday.c: New file.
7906         * modules/gettimeofday-tests: New file.
7907
7908 2007-01-16  Eric Blake  <ebb9@byu.net>
7909
7910         * modules/fnmatch (Depends-on): Depend on wchar.
7911         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
7912         * m4/fnmatch.m4: Likewise.
7913         * modules/mbchar (Makefile.am): Assume <wchar.h>.
7914         * m4/mbchar.m4: Likewise.
7915         * modules/mbswidth (Depends-on): Depend on wchar.
7916         * lib/mbswidth.c: Assume <wchar.h>.
7917         * m4/mbswidth.m4: Likewise.
7918         * modules/quotearg (Depends-on): Depend on wchar.
7919         * lib/quotearg.c: Assume <wchar.h>.
7920         * m4/quotearg.m4: Likewise.
7921         * modules/regex (Depends-on): Depend on wchar.
7922         * lib/regex_internal.h: Assume <wchar.h>.
7923         * m4/regex.m4: Likewise.
7924         * modules/stdint (Depends-on): Depend on wchar.
7925         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
7926         * m4/stdint.m4: Likewise.
7927         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
7928         * modules/strftime (Depends-on): Depend on wchar.
7929         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
7930         * modules/strtol (Depends-on): Depend on wchar.
7931         * lib/strtol.c: Assume <wchar.h>.
7932         * modules/wcwidth (Depends-on): Depend on wchar.
7933         * lib/wcwidth.h: Assume <wchar.h>.
7934         * m4/wcwidth.m4: Likewise.
7935
7936 2007-01-16  Bruno Haible  <bruno@clisp.org>
7937
7938         * modules/csharpexec-script: New, created from...
7939         * modules/csharpexec: ... this.
7940
7941 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
7942
7943         * modules/javaexec-script: New, created from...
7944         * modules/javaexec: ... this.
7945
7946 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7947
7948         * modules/poll (Dependencies): Add sys_select.
7949
7950 2007-01-15  Jim Meyering  <jim@meyering.net>
7951
7952         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
7953         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
7954         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
7955         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
7956
7957 2007-01-15  Bruno Haible  <bruno@clisp.org>
7958
7959         * modules/striconveh: New file.
7960         * lib/striconveh.h: New file.
7961         * lib/striconveh.c: New file.
7962         * MODULES.html.sh (Internationalization functions): Add striconveh.
7963
7964         * modules/striconveh-tests: New file.
7965         * tests/test-striconveh.c: New file.
7966
7967 2007-01-15  Bruno Haible  <bruno@clisp.org>
7968
7969         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
7970         not from GNU libiconv or GNU libc.
7971
7972 2007-01-15  Bruno Haible  <bruno@clisp.org>
7973
7974         * doc/gnulib-intro.texi (Copyright): Explain the different license
7975         terms for module descriptions, autoconf macros, tests, documentation.
7976
7977 2007-01-14  Bruno Haible  <bruno@clisp.org>
7978
7979         * modules/striconv-tests: New file.
7980         * tests/test-striconv.c: New file.
7981
7982 2007-01-14  Bruno Haible  <bruno@clisp.org>
7983
7984         * modules/iconv-tests: New file.
7985         * tests/test-iconv.c: New file.
7986
7987 2007-01-14  Bruno Haible  <bruno@clisp.org>
7988
7989         * gnulib-tool (func_get_license): For test modules, use the license of
7990         the main module.
7991
7992 2007-01-14  Bruno Haible  <bruno@clisp.org>
7993
7994         * modules/iconv (Include): Clarify that <iconv.h> can only be included
7995         if iconv is found to exist.
7996
7997 2007-01-14  Bruno Haible  <bruno@clisp.org>
7998
7999         * modules/c-ctype-tests: New file.
8000         * tests/test-c-ctype.c: New file.
8001
8002 2007-01-14  Bruno Haible  <bruno@clisp.org>
8003
8004         * modules/binary-io-tests: New file.
8005         * tests/test-binary-io.sh: New file.
8006         * tests/test-binary-io.c: New file.
8007
8008 2007-01-14  Bruno Haible  <bruno@clisp.org>
8009
8010         * modules/array-oset-tests: New file.
8011         * tests/test-array_oset.c: New file.
8012
8013 2007-01-14  Bruno Haible  <bruno@clisp.org>
8014
8015         * modules/array-list-tests: New file.
8016         * tests/test-array_list.c: New file.
8017
8018 2007-01-14  Bruno Haible  <bruno@clisp.org>
8019
8020         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
8021         and make.
8022         Reported by Simon Josefsson in
8023         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
8024
8025 2007-01-14  Bruno Haible  <bruno@clisp.org>
8026
8027         * modules/allocsa-tests: New file.
8028         * tests/test-allocsa.c: New file.
8029
8030 2007-01-14  Bruno Haible  <bruno@clisp.org>
8031
8032         * modules/fchdir (Depends-on): Add absolute-header.
8033         * modules/unistd (Depends-on): Likewise.
8034
8035 2006-12-30  Bruno Haible  <bruno@clisp.org>
8036
8037         * modules/fchdir: New file.
8038         * modules/unistd (Files): Add lib/unistd_.h.
8039         (Makefile.am): Generate unistd.h from unistd_.h.
8040         * lib/fchdir.c: New file.
8041         * lib/dirent_.h: New file.
8042         * lib/unistd_.h: New file.
8043         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
8044         * m4/fchdir.m4: New file.
8045         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
8046         (gl_HEADER_UNISTD): Invoke it.
8047         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
8048         function.
8049         * lib/backupfile.c (opendir, closedir): Undefine.
8050         * lib/chown.c (open, close): Undefine.
8051         * lib/clean-temp.c (open, close): Undefine.
8052         * lib/copy-file.c (open, close): Undefine.
8053         * lib/execute.c (open, close): Undefine.
8054         * lib/fsusage.c (open, close): Undefine.
8055         * lib/gc-gnulib.c (open, close): Undefine.
8056         * lib/getcwd.c (opendir, closedir): Undefine.
8057         * lib/glob.c (opendir, closedir): Undefine.
8058         * lib/javacomp.c (open, close): Undefine.
8059         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
8060         * lib/openat-proc.c (open, close): Undefine.
8061         * lib/pagealign_alloc.c (open, close): Undefine.
8062         * lib/pipe.c (open, close): Undefine.
8063         * lib/progreloc.c (open, close): Undefine.
8064         * lib/savedir.c (opendir, closedir): Undefine.
8065         * lib/utime.c (open, close): Undefine.
8066         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
8067
8068 2007-01-10  Bruno Haible  <bruno@clisp.org>
8069
8070         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
8071
8072 2007-01-12  Eric Blake  <ebb9@byu.net>
8073
8074         Provide a robust <wchar.h>.  Further simplifications are now
8075         possible in other modules, but not included here.
8076         * modules/wchar: New module.
8077         * m4/wchar.m4: New file.
8078         * lib/wchar_.h: Likewise.
8079         * modules/mbchar (Depends-on): Depend on wchar, as the first use
8080         of the new module.
8081         * MODULES.html.sh (Extended multibyte and wide character utilities):
8082         New section.
8083
8084 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
8085
8086         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
8087         to a reasonable default for memory allocation.
8088         (xreadlink): Don't allocate a huge buffer, to work around a buggy
8089         file system that reports garbage st_size values for symlinks.
8090         Problem reported by Liyang Hu.
8091
8092 2007-01-11  Simon Josefsson  <simon@josefsson.org>
8093
8094         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
8095         Emacs .#* auto-save files).
8096
8097 2007-01-11  Bruno Haible  <bruno@clisp.org>
8098
8099         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
8100         directory.
8101
8102 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8103
8104         Use @...@ consistently in lib/wctype_.h.
8105         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
8106         on it being set to 1 or 0.
8107         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
8108         go back to AC_SUBSTing it.
8109         * modules/wctype (Makefile.am): Undo previous change.
8110
8111 2007-01-10  Eric Blake  <ebb9@byu.net>
8112
8113         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
8114         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
8115         * modules/wctype (Makefile.am): Likewise.
8116         Reported by Chris McGuire.
8117
8118 2007-01-10  Jim Meyering  <jim@meyering.net>
8119
8120         fts.c: a small readability/maintainability improvement
8121         * lib/fts.c (fts_read): Make this code slightly more readable and
8122         maintainable by hoisting the "sp->fts_cur = p" assignments to
8123         immediately follow the statements that set P.  Derived from
8124         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
8125
8126 2007-01-10  Eric Blake  <ebb9@byu.net>
8127
8128         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
8129         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
8130         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8131         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
8132         Reported by Chris McGuire.
8133
8134 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8135
8136         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
8137         in sed script.
8138
8139 2007-01-09  Bruno Haible  <bruno@clisp.org>
8140
8141         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
8142         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
8143         variables.
8144         (func_module): Use them.
8145
8146 2007-01-09  Bruno Haible  <bruno@clisp.org>
8147
8148         * modules/unistr/base: New file.
8149         * lib/unistr.h: New file.
8150
8151         * modules/unistr/u8-to-u16: New file.
8152         * lib/unistr/u8-to-u16.c: New file.
8153
8154         * modules/unistr/u8-to-u32: New file.
8155         * lib/unistr/u8-to-u32.c: New file.
8156
8157         * modules/unistr/u16-to-u8: New file.
8158         * lib/unistr/u16-to-u8.c: New file.
8159
8160         * modules/unistr/u16-to-u32: New file.
8161         * lib/unistr/u16-to-u32.c: New file.
8162
8163         * modules/unistr/u32-to-u8: New file.
8164         * lib/unistr/u32-to-u8.c: New file.
8165
8166         * modules/unistr/u32-to-u16: New file.
8167         * lib/unistr/u32-to-u16.c: New file.
8168
8169         * modules/unistr/u8-check: New file.
8170         * modules/unistr/u16-check: New file.
8171         * modules/unistr/u32-check: New file.
8172         * lib/unistr/u8-check.c: New file.
8173         * lib/unistr/u16-check.c: New file.
8174         * lib/unistr/u32-check.c: New file.
8175
8176         * modules/unistr/u8-chr: New file.
8177         * modules/unistr/u16-chr: New file.
8178         * modules/unistr/u32-chr: New file.
8179         * lib/unistr/u8-chr.c: New file.
8180         * lib/unistr/u16-chr.c: New file.
8181         * lib/unistr/u32-chr.c: New file.
8182
8183         * modules/unistr/u8-cmp: New file.
8184         * modules/unistr/u16-cmp: New file.
8185         * modules/unistr/u32-cmp: New file.
8186         * lib/unistr/u8-cmp.c: New file.
8187         * lib/unistr/u16-cmp.c: New file.
8188         * lib/unistr/u32-cmp.c: New file.
8189
8190         * modules/unistr/u8-cpy: New file.
8191         * modules/unistr/u16-cpy: New file.
8192         * modules/unistr/u32-cpy: New file.
8193         * lib/unistr/u8-cpy.c: New file.
8194         * lib/unistr/u16-cpy.c: New file.
8195         * lib/unistr/u32-cpy.c: New file.
8196         * lib/unistr/u-cpy.h: New file.
8197
8198         * modules/unistr/u8-cpy-alloc: New file.
8199         * modules/unistr/u16-cpy-alloc: New file.
8200         * modules/unistr/u32-cpy-alloc: New file.
8201         * lib/unistr/u8-cpy-alloc.c: New file.
8202         * lib/unistr/u16-cpy-alloc.c: New file.
8203         * lib/unistr/u32-cpy-alloc.c: New file.
8204         * lib/unistr/u-cpy-alloc.h: New file.
8205
8206         * modules/unistr/u8-endswith: New file.
8207         * modules/unistr/u16-endswith: New file.
8208         * modules/unistr/u32-endswith: New file.
8209         * lib/unistr/u8-endswith.c: New file.
8210         * lib/unistr/u16-endswith.c: New file.
8211         * lib/unistr/u32-endswith.c: New file.
8212         * lib/unistr/u-endswith.h: New file.
8213
8214         * modules/unistr/u8-mblen: New file.
8215         * modules/unistr/u16-mblen: New file.
8216         * modules/unistr/u32-mblen: New file.
8217         * lib/unistr/u8-mblen.c: New file.
8218         * lib/unistr/u16-mblen.c: New file.
8219         * lib/unistr/u32-mblen.c: New file.
8220
8221         * modules/unistr/u8-mbtouc: New file.
8222         * modules/unistr/u16-mbtouc: New file.
8223         * modules/unistr/u32-mbtouc: New file.
8224         * lib/unistr/u8-mbtouc.c: New file.
8225         * lib/unistr/u16-mbtouc.c: New file.
8226         * lib/unistr/u32-mbtouc.c: New file.
8227
8228         * modules/unistr/u8-mbtouc-safe: New file.
8229         * modules/unistr/u16-mbtouc-safe: New file.
8230         * modules/unistr/u32-mbtouc-safe: New file.
8231         * lib/unistr/u8-mbtouc-safe.c: New file.
8232         * lib/unistr/u16-mbtouc-safe.c: New file.
8233         * lib/unistr/u32-mbtouc-safe.c: New file.
8234
8235         * modules/unistr/u8-move: New file.
8236         * modules/unistr/u16-move: New file.
8237         * modules/unistr/u32-move: New file.
8238         * lib/unistr/u8-move.c: New file.
8239         * lib/unistr/u16-move.c: New file.
8240         * lib/unistr/u32-move.c: New file.
8241         * lib/unistr/u-move.h: New file.
8242
8243         * modules/unistr/u8-next: New file.
8244         * modules/unistr/u16-next: New file.
8245         * modules/unistr/u32-next: New file.
8246         * lib/unistr/u8-next.c: New file.
8247         * lib/unistr/u16-next.c: New file.
8248         * lib/unistr/u32-next.c: New file.
8249
8250         * modules/unistr/u8-prev: New file.
8251         * modules/unistr/u16-prev: New file.
8252         * modules/unistr/u32-prev: New file.
8253         * lib/unistr/u8-prev.c: New file.
8254         * lib/unistr/u16-prev.c: New file.
8255         * lib/unistr/u32-prev.c: New file.
8256
8257         * modules/unistr/u8-set: New file.
8258         * modules/unistr/u16-set: New file.
8259         * modules/unistr/u32-set: New file.
8260         * lib/unistr/u8-set.c: New file.
8261         * lib/unistr/u16-set.c: New file.
8262         * lib/unistr/u32-set.c: New file.
8263         * lib/unistr/u-set.h: New file.
8264
8265         * modules/unistr/u8-startswith: New file.
8266         * modules/unistr/u16-startswith: New file.
8267         * modules/unistr/u32-startswith: New file.
8268         * lib/unistr/u8-startswith.c: New file.
8269         * lib/unistr/u16-startswith.c: New file.
8270         * lib/unistr/u32-startswith.c: New file.
8271         * lib/unistr/u-startswith.h: New file.
8272
8273         * modules/unistr/u8-stpcpy: New file.
8274         * modules/unistr/u16-stpcpy: New file.
8275         * modules/unistr/u32-stpcpy: New file.
8276         * lib/unistr/u8-stpcpy.c: New file.
8277         * lib/unistr/u16-stpcpy.c: New file.
8278         * lib/unistr/u32-stpcpy.c: New file.
8279         * lib/unistr/u-stpcpy.h: New file.
8280
8281         * modules/unistr/u8-stpncpy: New file.
8282         * modules/unistr/u16-stpncpy: New file.
8283         * modules/unistr/u32-stpncpy: New file.
8284         * lib/unistr/u8-stpncpy.c: New file.
8285         * lib/unistr/u16-stpncpy.c: New file.
8286         * lib/unistr/u32-stpncpy.c: New file.
8287         * lib/unistr/u-stpncpy.h: New file.
8288
8289         * modules/unistr/u8-strcat: New file.
8290         * modules/unistr/u16-strcat: New file.
8291         * modules/unistr/u32-strcat: New file.
8292         * lib/unistr/u8-strcat.c: New file.
8293         * lib/unistr/u16-strcat.c: New file.
8294         * lib/unistr/u32-strcat.c: New file.
8295         * lib/unistr/u-strcat.h: New file.
8296
8297         * modules/unistr/u8-strchr: New file.
8298         * modules/unistr/u16-strchr: New file.
8299         * modules/unistr/u32-strchr: New file.
8300         * lib/unistr/u8-strchr.c: New file.
8301         * lib/unistr/u16-strchr.c: New file.
8302         * lib/unistr/u32-strchr.c: New file.
8303
8304         * modules/unistr/u8-strcmp: New file.
8305         * modules/unistr/u16-strcmp: New file.
8306         * modules/unistr/u32-strcmp: New file.
8307         * lib/unistr/u8-strcmp.c: New file.
8308         * lib/unistr/u16-strcmp.c: New file.
8309         * lib/unistr/u32-strcmp.c: New file.
8310
8311         * modules/unistr/u8-strcpy: New file.
8312         * modules/unistr/u16-strcpy: New file.
8313         * modules/unistr/u32-strcpy: New file.
8314         * lib/unistr/u8-strcpy.c: New file.
8315         * lib/unistr/u16-strcpy.c: New file.
8316         * lib/unistr/u32-strcpy.c: New file.
8317         * lib/unistr/u-strcpy.h: New file.
8318
8319         * modules/unistr/u8-strcspn: New file.
8320         * modules/unistr/u16-strcspn: New file.
8321         * modules/unistr/u32-strcspn: New file.
8322         * lib/unistr/u8-strcspn.c: New file.
8323         * lib/unistr/u16-strcspn.c: New file.
8324         * lib/unistr/u32-strcspn.c: New file.
8325         * lib/unistr/u-strcspn.h: New file.
8326
8327         * modules/unistr/u8-strdup: New file.
8328         * modules/unistr/u16-strdup: New file.
8329         * modules/unistr/u32-strdup: New file.
8330         * lib/unistr/u8-strdup.c: New file.
8331         * lib/unistr/u16-strdup.c: New file.
8332         * lib/unistr/u32-strdup.c: New file.
8333         * lib/unistr/u-strdup.h: New file.
8334
8335         * modules/unistr/u8-strlen: New file.
8336         * modules/unistr/u16-strlen: New file.
8337         * modules/unistr/u32-strlen: New file.
8338         * lib/unistr/u8-strlen.c: New file.
8339         * lib/unistr/u16-strlen.c: New file.
8340         * lib/unistr/u32-strlen.c: New file.
8341         * lib/unistr/u-strlen.h: New file.
8342
8343         * modules/unistr/u8-strmblen: New file.
8344         * modules/unistr/u16-strmblen: New file.
8345         * modules/unistr/u32-strmblen: New file.
8346         * lib/unistr/u8-strmblen.c: New file.
8347         * lib/unistr/u16-strmblen.c: New file.
8348         * lib/unistr/u32-strmblen.c: New file.
8349
8350         * modules/unistr/u8-strmbtouc: New file.
8351         * modules/unistr/u16-strmbtouc: New file.
8352         * modules/unistr/u32-strmbtouc: New file.
8353         * lib/unistr/u8-strmbtouc.c: New file.
8354         * lib/unistr/u16-strmbtouc.c: New file.
8355         * lib/unistr/u32-strmbtouc.c: New file.
8356
8357         * modules/unistr/u8-strncat: New file.
8358         * modules/unistr/u16-strncat: New file.
8359         * modules/unistr/u32-strncat: New file.
8360         * lib/unistr/u8-strncat.c: New file.
8361         * lib/unistr/u16-strncat.c: New file.
8362         * lib/unistr/u32-strncat.c: New file.
8363         * lib/unistr/u-strncat.h: New file.
8364
8365         * modules/unistr/u8-strncmp: New file.
8366         * modules/unistr/u16-strncmp: New file.
8367         * modules/unistr/u32-strncmp: New file.
8368         * lib/unistr/u8-strncmp.c: New file.
8369         * lib/unistr/u16-strncmp.c: New file.
8370         * lib/unistr/u32-strncmp.c: New file.
8371
8372         * modules/unistr/u8-strncpy: New file.
8373         * modules/unistr/u16-strncpy: New file.
8374         * modules/unistr/u32-strncpy: New file.
8375         * lib/unistr/u8-strncpy.c: New file.
8376         * lib/unistr/u16-strncpy.c: New file.
8377         * lib/unistr/u32-strncpy.c: New file.
8378         * lib/unistr/u-strncpy.h: New file.
8379
8380         * modules/unistr/u8-strnlen: New file.
8381         * modules/unistr/u16-strnlen: New file.
8382         * modules/unistr/u32-strnlen: New file.
8383         * lib/unistr/u8-strnlen.c: New file.
8384         * lib/unistr/u16-strnlen.c: New file.
8385         * lib/unistr/u32-strnlen.c: New file.
8386         * lib/unistr/u-strnlen.h: New file.
8387
8388         * modules/unistr/u8-strpbrk: New file.
8389         * modules/unistr/u16-strpbrk: New file.
8390         * modules/unistr/u32-strpbrk: New file.
8391         * lib/unistr/u8-strpbrk.c: New file.
8392         * lib/unistr/u16-strpbrk.c: New file.
8393         * lib/unistr/u32-strpbrk.c: New file.
8394         * lib/unistr/u-strpbrk.h: New file.
8395
8396         * modules/unistr/u8-strrchr: New file.
8397         * modules/unistr/u16-strrchr: New file.
8398         * modules/unistr/u32-strrchr: New file.
8399         * lib/unistr/u8-strrchr.c: New file.
8400         * lib/unistr/u16-strrchr.c: New file.
8401         * lib/unistr/u32-strrchr.c: New file.
8402
8403         * modules/unistr/u8-strspn: New file.
8404         * modules/unistr/u16-strspn: New file.
8405         * modules/unistr/u32-strspn: New file.
8406         * lib/unistr/u8-strspn.c: New file.
8407         * lib/unistr/u16-strspn.c: New file.
8408         * lib/unistr/u32-strspn.c: New file.
8409         * lib/unistr/u-strspn.h: New file.
8410
8411         * modules/unistr/u8-strstr: New file.
8412         * modules/unistr/u16-strstr: New file.
8413         * modules/unistr/u32-strstr: New file.
8414         * lib/unistr/u8-strstr.c: New file.
8415         * lib/unistr/u16-strstr.c: New file.
8416         * lib/unistr/u32-strstr.c: New file.
8417         * lib/unistr/u-strstr.h: New file.
8418
8419         * modules/unistr/u8-strtok: New file.
8420         * modules/unistr/u16-strtok: New file.
8421         * modules/unistr/u32-strtok: New file.
8422         * lib/unistr/u8-strtok.c: New file.
8423         * lib/unistr/u16-strtok.c: New file.
8424         * lib/unistr/u32-strtok.c: New file.
8425         * lib/unistr/u-strtok.h: New file.
8426
8427         * modules/unistr/u8-uctomb: New file.
8428         * modules/unistr/u16-uctomb: New file.
8429         * modules/unistr/u32-uctomb: New file.
8430         * lib/unistr/u8-uctomb.c: New file.
8431         * lib/unistr/u16-uctomb.c: New file.
8432         * lib/unistr/u32-uctomb.c: New file.
8433
8434         * MODULES.html.sh (Unicode string functions): Add the new modules.
8435
8436 2007-01-08  Bruno Haible  <bruno@clisp.org>
8437
8438         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
8439         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
8440         subdirectories.
8441
8442 2007-01-08  Karl Berry  <karl@gnu.org>
8443
8444         * doc/error.texi: mention that main() fns must set program_name
8445         when progname is used.
8446
8447 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
8448
8449         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
8450         WCTYPE_H is empty, for the benefit of builds from non-distclean
8451         directories.  Problem reported by Eric Blake in
8452         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
8453
8454 2007-01-08  Bruno Haible  <bruno@clisp.org>
8455
8456         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
8457         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
8458         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
8459         PROVIDE_CANONICALIZE_FILENAME_MODE.
8460         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
8461
8462 2007-01-08  Bruno Haible  <bruno@clisp.org>
8463
8464         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
8465         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
8466         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
8467         * lib/fts.c: Likewise.
8468         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
8469
8470 2006-12-25  Bruno Haible  <bruno@clisp.org>
8471
8472         * modules/utf8-ucs4-safe: New file.
8473         * lib/utf8-ucs4-safe.h: New file.
8474         * lib/unistr/utf8-ucs4-safe.c: New file.
8475
8476         * modules/utf16-ucs4-safe: New file.
8477         * lib/utf16-ucs4-safe.h: New file.
8478         * lib/unistr/utf16-ucs4-safe.c: New file.
8479
8480         * MODULES.html.sh (Unicode string functions): Add the new modules.
8481
8482 2007-01-08  Bruno Haible  <bruno@clisp.org>
8483
8484         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
8485         (Depends-on): Add unitypes.
8486         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8487         (u8_mbtouc_aux): Move out to separate file.
8488         (u8_mbtouc): Use ucs4_t, uint8_t types.
8489         * lib/unistr/utf8-ucs4.c: New file.
8490
8491         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
8492         (Depends-on): Add unitypes.
8493         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8494         (u16_mbtouc_aux): Move out to separate file.
8495         (u16_mbtouc): Use ucs4_t, uint16_t types.
8496         * lib/unistr/utf16-ucs4.c: New file.
8497
8498         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
8499         (Depends-on): Add unitypes.
8500         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
8501         (u8_uctomb_aux): Move out to separate file.
8502         (u8_uctomb): Use ucs4_t, uint8_t types.
8503         * lib/unistr/ucs4-utf8.c: New file.
8504
8505         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
8506         (Depends-on): Add unitypes.
8507         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
8508         (u16_uctomb_aux): Move out to separate file.
8509         (u16_uctomb): Use ucs4_t, uint16_t types.
8510         * lib/unistr/ucs4-utf16.c: New file.
8511
8512 2006-12-25  Bruno Haible  <bruno@clisp.org>
8513
8514         * modules/unitypes: New file.
8515         * lib/unitypes.h: New file.
8516         * MODULES.html.sh (func_all_modules): New section "Unicode string
8517         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
8518         this section. Add unitypes.
8519
8520 2007-01-08  Bruno Haible  <bruno@clisp.org>
8521
8522         Avoid variable names that conflict with those from libtool.
8523         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
8524         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
8525         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
8526         library_names_spec to acl_library_names_spec, hardcode_* to
8527         acl_hardcode_*.
8528         Reported by Ralf Wildenhues.
8529
8530 2007-01-08  Bruno Haible  <bruno@clisp.org>
8531
8532         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
8533         definition.
8534         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
8535         definition.
8536         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
8537         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
8538         definition.
8539         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
8540         definition.
8541         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
8542         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
8543         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
8544         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
8545         definition.
8546         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
8547         definition.
8548         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
8549         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
8550         GC_USE_<algorithm>.
8551         * lib/gc-libgcrypt.c: Likewise.
8552         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
8553         * modules/gc-arctwo (configure.ac): Likewise.
8554         * modules/gc-des (configure.ac): Likewise.
8555         * modules/gc-hmac-md5 (configure.ac): Likewise.
8556         * modules/gc-hmac-sha1 (configure.ac): Likewise.
8557         * modules/gc-md2 (configure.ac): Likewise.
8558         * modules/gc-md4 (configure.ac): Likewise.
8559         * modules/gc-md5 (configure.ac): Likewise.
8560         * modules/gc-random (configure.ac): Likewise.
8561         * modules/gc-rijndael (configure.ac): Likewise.
8562         * modules/gc-sha1 (configure.ac): Likewise.
8563
8564 2007-01-08  Bruno Haible  <bruno@clisp.org>
8565
8566         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
8567         macro definition.
8568         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
8569         definition.
8570         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
8571         definition.
8572         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
8573         * modules/fcntl-safer (configure.ac): Likewise.
8574         * modules/fopen-safer (configure.ac): Likewise.
8575         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
8576         GNULIB_FWRITEERROR macro definition.
8577
8578 2007-01-08  Bruno Haible  <bruno@clisp.org>
8579
8580         * m4/gnulib-common.m4: New file.
8581         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
8582         (func_get_filelist): Add m4/gnulib-common.m4.
8583
8584 2007-01-08  Bruno Haible  <bruno@clisp.org>
8585
8586         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
8587         command.
8588
8589 2007-01-08  Jim Meyering  <jim@meyering.net>
8590
8591         Use a more robust test for a "can't happen" condition.
8592         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
8593         narrowed the st_size value.  Presuming the "can't happen" condition
8594         is true, that narrowing could conceivably convert an invalid st_size
8595         value into a valid one.  Instead, use a change based on Matthew
8596         Woehlke's original patch.
8597
8598         Slight readability improvement: use an assert-like macro
8599         in place of literal "abort ()" uses.
8600         * lib/fts.c (fts_assert): Define.
8601         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
8602         Use this macro instead of a bare 'abort'.
8603
8604 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
8605
8606         Don't worry about using IRIX 5.3's wctype.h broken definitions;
8607         simply work around them.
8608         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
8609         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
8610         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
8611         declaring.
8612         Don't bother to define as macros, since the standard doesn't require it.
8613         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
8614         longer worry about IRIX 5.3.
8615         (HAVE_WCTYPE_CTMP_BUG): Remove.
8616
8617 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8618
8619         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
8620         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
8621         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
8622         Problems reported by Georg Schwarz for IRIX 5.3.
8623
8624         * gnulib-tool (autoconf_minversion): Take the maximum version number
8625         found, not the minimum.  Problem reported by James Youngman.
8626
8627 2007-01-03  Karl Berry  <karl@gnu.org>
8628
8629         * doc/error.texi: new file, explaining interaction with progname.
8630         * doc/gnulib.texi: include it.  Update copyright.
8631
8632 2007-01-03  Simon Josefsson  <simon@josefsson.org>
8633
8634         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
8635         AC_CANONICAL_HOST, to improve autobuild outputs.
8636
8637 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
8638             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
8639
8640         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
8641         sockets, server sockets, and other file descriptors.  Count errors
8642         to compute the return value.  Reorder the code a bit to be easier
8643         to follow.  Don't set event bits that were not requested (except
8644         POLLERR and POLLHUP).
8645
8646 2007-01-01  Bruno Haible  <bruno@clisp.org>
8647
8648         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
8649
8650 2007-01-03  Jim Meyering  <jim@meyering.net>
8651
8652         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
8653
8654 2007-01-02  Bruno Haible  <bruno@clisp.org>
8655
8656         * modules/settime (Include): Require timespec.h.
8657         * modules/nanosleep (Include): Likewise.
8658
8659 2007-01-01  Bruno Haible  <bruno@clisp.org>
8660
8661         * gnulib-tool (func_emit_copyright_notice): Bump year.
8662         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
8663
8664 2007-01-01  Bruno Haible  <bruno@clisp.org>
8665
8666         Improve support for OpenBSD.
8667         * build-aux/config.rpath (libname_spec): Export.
8668         (library_names_spec): New variable. Export.
8669         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
8670         library_names_spec from the config.rpath output. Locate shared library
8671         through the name pattern in library_names_spec.
8672
8673 2007-01-01  Eric Blake  <ebb9@byu.net>
8674
8675         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
8676
8677 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
8678
8679         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
8680         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
8681         assume the C locale, and avoid an "eval" that could cause trouble.
8682         Problem with SORT reported by Bob Proulx.
8683
8684         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
8685         Define.  Trivial patch from Henning Nielsen Lund, originally
8686         sent to bug-grep@gnu.org today.
8687
8688 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
8689
8690         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
8691         struct stat.  Problem reported by Henning Nielsen Lund.
8692         * lib/acl.c: Include acl.h first, to check interface.  Don't
8693         bother to include sys/types.h and sys/stat.h again.
8694
8695 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
8696
8697         Import the following change from libc; problem reported by
8698         Sven Verdoolaege.
8699
8700         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
8701
8702         [BZ #1373]
8703         * lib/argp.h: Remove __NTH for __argp_usage inline function.
8704
8705 2006-12-28  Jim Meyering  <jim@meyering.net>
8706
8707         * build-aux/announce-gen: Do not assume that the package
8708         builds any of tar.gz, tar.bz2, and .xdelta files.
8709         Suggestion from Simon Josefsson.
8710
8711 2006-12-28  Simon Josefsson  <simon@josefsson.org>
8712
8713         * modules/announce-gen: New file.
8714
8715 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
8716
8717         * lib/mbchar.h: Just include <wctype.h>; the wctype module
8718         handles its gotchas now.
8719         * lib/mbswidth.c: Likewise.
8720         * lib/wcwidth.h: Likewise.
8721         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
8722         and iswcntrl; the wctype module does this stuff now.
8723         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
8724         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8725         * modules/mbchar (Depends-on): Add wctype.
8726         * modules/mbswidth (Depends-on): Likewise.
8727         * modules/wcwidth (Depends-on): Likewise.
8728
8729 2006-12-27  Eric Blake  <ebb9@byu.net>
8730
8731         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
8732         module uses more than what <wctype.h> is required to provide.
8733
8734 2006-12-26  Eric Blake  <ebb9@byu.net>
8735
8736         * gnulib-tool (sed_extract_prog): Avoid space-tab.
8737
8738 2006-12-26  Eric Blake  <ebb9@byu.net>
8739
8740         * modules/absolute-header: New module.
8741         * modules/fcntl (Depends-on): Depend on it.
8742         * modules/inttypes (Depends-on): Likewise.
8743         * modules/stdint (Depends-on): Likewise.
8744         * modules/sys_stat (Depends-on): Likewise.
8745         * modules/wctype (Depends-on): Likewise.
8746         * MODULES.html.sh (Support for building libraries and
8747         executables): Document it.
8748
8749 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
8750
8751         * gnulib-tool (SED): Remove, undoing previous change.
8752         The problem was that it broke coreutils on Solaris, because
8753         "sed --posix" leaked into a makefile.
8754         (sed): New alias, if 'alias' and GNU sed.
8755
8756 2006-12-24  Jim Meyering  <jim@meyering.net>
8757
8758         Work around an fchownat bug in glibc-2.4:
8759         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
8760         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
8761         in spite of the -P option.
8762         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
8763         New macros.
8764         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
8765         * modules/openat (Files): Add lib/fchownat.c.
8766         * lib/openat.c (fchownat): Don't define here.  Move to...
8767         * lib/fchownat.c: ...this new file.
8768
8769 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
8770
8771         Fix bug reported by Bruno Haible in
8772         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
8773         where quotearg.c didn't compile on Mac OS X 10.2 because it
8774         lacks <wchar.h> and wint_t.
8775         * lib/wctype_.h (__wctype_wint_t): New type.
8776         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
8777         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
8778         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
8779         Arg is now of type __wctype_wint_t, not wint_t.
8780         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
8781         substitute HAVE_WINT_T.
8782         * modules/wctype (Files): Add m4/wint_t.m4.
8783         (wctype.h): Substitute HAVE_WINT_T.
8784
8785 2006-12-23  Bruno Haible  <bruno@clisp.org>
8786
8787         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
8788
8789 2006-12-23  Bruno Haible  <bruno@clisp.org>
8790
8791         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
8792         S_ISLNK.
8793         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
8794         mingw.
8795
8796 2006-12-22  Bruno Haible  <bruno@clisp.org>
8797
8798         * lib/copy-file.c: Include acl.h.
8799         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
8800         Close the file descriptors only after being done with copy_acl.
8801         * modules/copy-file (Depends-on): Add acl.
8802
8803 2006-12-22  Bruno Haible  <bruno@clisp.org>
8804
8805         * gnulib-tool (SED): New variable.
8806         Use $SED instead of sed everywhere.
8807
8808 2006-12-22  Bruno Haible  <bruno@clisp.org>
8809
8810         * modules/no-c++: New file.
8811         * m4/no-c++.m4: New file.
8812         * MODULES.html.sh (Support for building libraries and executables):
8813         Add no-c++.
8814
8815 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
8816
8817         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8818         Include <limits.h>, and use its INT_MAX to rewrite the
8819         j loop so that it does not overflow 'int'.  Problem reported by
8820         Ralf Wildenhues in
8821         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
8822         Play it safe by shifting left by 1 rather than multiplying by 2,
8823         as GCC is less likely to optimize this away when the value
8824         is signed (when it assumes overflow leads to undefined behavior).
8825         Also, don't assume time_t uses two's complement.
8826
8827 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
8828
8829         * MODULES.html.sh: New module wctype.
8830         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
8831         * lib/fnmatch.c: Don't bother to include <wchar.h> before
8832         <wctype.h>, since the new wctype module should fix this.
8833         * lib/quotearg.c: Include <wctype.h> unconditionally, since
8834         the wctype module should arrange for it.
8835         * lib/regex_internal.h: Likewise.
8836         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
8837         since the wctype module should handle this now.
8838         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
8839         * modules/fnmatch (Depends-on): Add wctype.
8840         * modules/quotearg (Depends-on): Likewise.
8841         * modules/regex (Depends-on): Likewise.
8842
8843 2006-12-19  Bruno Haible  <bruno@clisp.org>
8844
8845         * lib/strdup.h [C++]: Wrap definitions in extern "C".
8846         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
8847
8848 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8849
8850         * modules/savewd (Depends-on): Fix dependency on fcntl.
8851
8852 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8853
8854         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
8855         conforms to C99, rather than relying on the user's environment
8856         setting of STDINT_H.
8857
8858 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8859         and Eric Blake  <ebb9@byu.net>
8860
8861         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
8862         This is more consistent with the other defines here.
8863         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
8864         Port to z/OS.  Problem reported by Paul Gilmartin.
8865         Change local vars to use gl_ prefix rather than ac_.
8866         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
8867         with other defines.
8868         * modules/double-slash-root: New module.
8869         * modules/dirname (Files): Remove m4/double-slash-root.m4.
8870         (Depends-on): Add double-slash-root.
8871         * MODULES.html.sh (File system functions): Mention new module.
8872
8873 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
8874
8875         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
8876         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
8877         This is for the benefit of gzip, which doesn't do i18n.
8878
8879 2006-12-12  Jim Meyering  <jim@meyering.net>
8880
8881         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
8882         Reported by Andreas Schwab <schwab@suse.de>.
8883
8884 2006-12-12  Bruno Haible  <bruno@clisp.org>
8885
8886         Merge these changes.
8887         2006-09-05  Bruno Haible  <bruno@clisp.org>
8888         * lib/iconvme.c (iconv_string): No need to save and restore errno when
8889         iconv_alloc succeeded.
8890         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
8891         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
8892         test for " && dest " at the end - dest is always != NULL there. Call
8893         iconv with 4xNULL arguments initially, to reset the state. Call iconv
8894         with 2xNULL arguments, also to flush the state storage. Handle the
8895         IRIX iconv behaviour. Realloc the final result, to throw away unused
8896         memory.
8897
8898 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
8899
8900         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
8901         and fchmodat unconditionally, since glibc 2.4 has them.
8902         Problem reported by Arkadiusz Miskiewicz.
8903
8904 2006-12-10  Bruno Haible  <bruno@clisp.org>
8905
8906         * gnulib-tool (func_import): Show the include files only for those
8907         modules that are copied and specified.
8908         Reported by Karl Berry.
8909
8910 2006-12-08  Jim Meyering  <jim@meyering.net>
8911
8912         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
8913         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
8914
8915         * build-aux/announce-gen: Add two new options, both optional:
8916         --bootstrap-tools=TOOL_LIST
8917               a comma-separated list of tools, e.g.,
8918               autoconf,automake,bison,gnulib
8919         --gnulib-snapshot-date=DATE
8920               if gnulib is in the bootstrap tool list,
8921               then report this as the snapshot date.
8922               If not specified, use the current date/time.
8923               If you specify a date here, be sure it's UTC.
8924
8925 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8926
8927         * tests/test-argp-2.sh: Fix test to match actual output.
8928         (func_compare): Fix sed script to be portable.
8929
8930 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
8931
8932         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
8933         workaround for this case.  It is not autoconfigured now; offhand
8934         it's hard to see how to autoconfigure it.
8935
8936 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
8937
8938         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
8939         a directory that is about to be chowned.  Such a directory's
8940         initial file permissions should permit the owner only and this
8941         should not be changed until after the chown, since the group and
8942         other bits would be incorrect if they granted permission before
8943         the chown.
8944
8945         Fix porting problem for iswctype reported by Georg Schwarz in:
8946         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
8947         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
8948         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
8949         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
8950         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
8951
8952 2006-12-03  Jim Meyering  <jim@meyering.net>
8953
8954         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
8955         p->fts_statp may not yet be defined.
8956         (fts_read): Instead, set it in the caller, once p->fts_statp is
8957         sure to be defined, and corresponds to a top-level directory.
8958         This bug made du -x fail.  Here's the coreutils test case:
8959         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
8960         Reported by Mike Frysinger.
8961
8962 2006-12-01  Jim Meyering  <jim@meyering.net>
8963
8964         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
8965         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
8966         Reported by Simon Josefsson.
8967
8968 2006-11-30  Jim Meyering  <jim@meyering.net>
8969
8970         * m4/warning.m4: Use the all-permissive copyright notice
8971         recommended by RMS (rather than LGPL).
8972         * m4/vararrays.m4: Likewise.
8973         * m4/flexmember.m4: Likewise.
8974
8975 2006-11-29  Bruno Haible  <bruno@clisp.org>
8976
8977         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8978         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
8979         using +=.
8980         Reported by Simon Josefsson <simon@josefsson.org>.
8981
8982 2006-11-28  James Youngman <jay@gnu.org>
8983
8984         * README: Advise users that they might find the bug-gnulib@gnu.org
8985         and autotools-announce@gnu.org mailing lists useful.
8986
8987 2006-11-28  Bruno Haible  <bruno@clisp.org>
8988
8989         * m4/ptrdiff_max.m4: Remove file.
8990
8991 2006-11-21  Bruno Haible  <bruno@clisp.org>
8992
8993         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
8994         _AC_COMPUTE_INT.
8995         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8996         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
8997         _AC_COMPUTE_INT.
8998         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8999         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
9000         _AC_COMPUTE_INT.
9001         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9002
9003 2006-11-28  Jim Meyering  <jim@meyering.net>
9004
9005         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
9006         warning from "gcc -Wshadow" about shadowing the builtin.
9007
9008 2006-11-27  Bruno Haible  <bruno@clisp.org>
9009
9010         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
9011         _AC_COMPUTE_INT.
9012         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9013
9014 2006-11-27  Bruno Haible  <bruno@clisp.org>
9015             Paul Eggert  <eggert@cs.ucla.edu>
9016
9017         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
9018
9019 2006-11-26  Bruno Haible  <bruno@clisp.org>
9020
9021         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
9022         noinst_LTLIBRARIES.
9023
9024 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
9025             Bruno Haible  <bruno@clisp.org>
9026
9027         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
9028         if compiling with "gcc -ansi".
9029
9030 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
9031
9032         Fix some incompatibilities with gcc -ansi -pedantic.
9033         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
9034         if compiling pedantically with GCC, unless it's C99 or later.
9035         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
9036         it mishandles gcc -ansi -pedantic as well.
9037         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
9038         if gcc -pedantic.
9039         * lib/regexec.c (check_node_accept_bytes): Don't use auto
9040         initializers for struct if -pedantic, unless it's C99 or later.
9041
9042 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
9043
9044         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
9045         Don't close an fd more than once. Identical atimes indicate
9046         success, not failure.
9047
9048 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
9049
9050         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
9051
9052 2006-11-23  Jim Meyering  <jim@meyering.net>
9053
9054         * build-aux/announce-gen: New file.  From coreutils.
9055
9056 2006-11-22  Jim Meyering  <jim@meyering.net>
9057
9058         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
9059         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
9060         (fts_read): Use a temporary to narrow the overused st_size member
9061         before using it in a switch statement.  Reported by Matthew Woehlke.
9062
9063         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
9064         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
9065
9066 2006-11-20  Bruno Haible  <bruno@clisp.org>
9067
9068         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
9069         changequote instead of pairs of brackets.
9070         Reported by Andreas Schwab <schwab@suse.de>.
9071
9072 2006-11-21  Jim Meyering  <jim@meyering.net>
9073
9074         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
9075         so as to remain compatible with older compilers.
9076         Patch from Michael Deutschmann.
9077
9078 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9079
9080         * MODULES.html.sh (File system functions): Add openat.
9081
9082         * lib/openat.h (rpl_fstatat): New macro, if
9083         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
9084         (fstatat): Define to rpl_fstatat under the same conditions,
9085         unless COMPILING_FSTATAT.
9086         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
9087         seems to have the bug.
9088         * lib/fstatat.c: New file.
9089         * modules/openat (Files): Add it.
9090
9091 2006-11-20  Bruno Haible  <bruno@clisp.org>
9092
9093         * Makefile: New file.
9094
9095 2006-11-20  Jim Meyering  <jim@meyering.net>
9096
9097         The beginnings of syntax-related checks for gnulib.
9098         * lib/Makefile: New file.
9099         * lib/t-idcache: New script.  Ensure that the two halves of
9100         idcache.c stay in sync.
9101
9102         * lib/idcache.c: Adjust comments in user- and group- portions to
9103         be more accurate, and to be consistent with one another.
9104
9105 2006-11-20  Jim Meyering  <jim@meyering.net>
9106
9107         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
9108         continue using the flexible array member (thus, this module performs
9109         half as many malloc calls), with the addition that...
9110         (getgroup, getuser): Consistently record a non-match via an empty
9111         "name" string, and map an empty string match to a NULL return value.
9112         * modules/idcache (Depends-on): Re-add flexmember.
9113
9114         * lib/idcache.c (getuser): Remove all uses of the register keyword.
9115         (getuidbyname, getgroup, getgidbyname): Likewise.
9116
9117         Use cleaner syntax: NULL rather than 0.
9118         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
9119
9120 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9121
9122         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
9123         It mishandled the case where the group was missing.
9124         Problem reported by Greg Schafer.
9125         * modules/idcache: Likewise.
9126
9127 2006-11-18  Jim Meyering  <jim@meyering.net>
9128
9129         * check-module (%exempt_header): Add exception for some
9130         conditionally-included headers.
9131
9132         * modules/i-ring (Depends-on): Add verify.
9133         (License): Change to LGPL.
9134
9135 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
9136
9137         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
9138         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
9139         and inttostr.h.  Use snprintf rather than uinttostr, so that
9140         LGPLed code doesn't depend on GPLed.
9141
9142 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
9143
9144         * modules/inline (License): Change from GPL to LGPL.
9145
9146 2006-11-17  Jim Meyering  <jim@meyering.net>
9147
9148         * modules/d-type (License): Switch to LGPL.
9149
9150 2006-11-15  Bruno Haible  <bruno@clisp.org>
9151
9152         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
9153
9154 2006-11-15  Eric Blake  <ebb9@byu.net>
9155
9156         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
9157         the module dependency.
9158
9159 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9160             Bruno Haible  <bruno@clisp.org>
9161
9162         * gnulib-tool (func_create_testdir): Add license consistency check.
9163
9164 2006-11-15  Eric Blake  <ebb9@byu.net>
9165
9166         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
9167         random "(cached)" in configure output.
9168
9169 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9170
9171         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
9172         test for conforming inttypes.h is both announced and cached.
9173
9174         * MODULES.html.sh (seen_modules, seen_files): New variables.
9175         (func_module): Rewrite to use a few less gnulib-tool and sed
9176         invocations.  Avoid a couple of quadratic algorithms for ...
9177         (missed_modules, missed_files): ... these, with ...
9178         (func_append, func_tmpdir): ... these new functions, from
9179         gnulib-tool.  Analogously, install traps for cleanup.
9180
9181         * tests/test-gc.c (main): Remove unused variables.
9182         * tests/test-read-file.c: Include stdlib.h, for 'free'.
9183
9184 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
9185
9186         * modules/inttostr (License): Change to LGPL.
9187
9188 2006-11-14  Eric Blake  <ebb9@byu.net>
9189
9190         * modules/tempname (License): Change to LGPL.
9191
9192 2006-11-14  Eric Blake  <ebb9@byu.net>
9193
9194         * doc/functions.texi (Function Portability): *printf functions on
9195         Cygwin now understand all POSIX size specifiers.
9196
9197 2006-11-14  Bruno Haible  <bruno@clisp.org>
9198
9199         * modules/c-ctype (License): Change to LGPL.
9200
9201 2006-11-12  Bruno Haible  <bruno@clisp.org>
9202
9203         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
9204         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
9205         for GNOME libraries, for which the include files are installed in
9206         subdirectories of $prefix/include.
9207
9208 2006-11-12  Bruno Haible  <bruno@clisp.org>
9209
9210         * m4/lib-link.m4: Require at least autoconf-2.54.
9211         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
9212         name to underscores for the --with option.
9213
9214 2006-11-13  Bruno Haible  <bruno@clisp.org>
9215
9216         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
9217         the tests directory.
9218         Reported by Ralf Wildenhues.
9219
9220 2006-11-13  Bruno Haible  <bruno@clisp.org>
9221
9222         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
9223         (func_emit_initmacro_end): Undo the override here.
9224         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
9225         Works around the famous automake error in coreutils.
9226
9227 2006-11-13  Eric Blake  <ebb9@byu.net>
9228
9229         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
9230         element, not its node.
9231
9232 2006-11-12  Bruno Haible  <bruno@clisp.org>
9233
9234         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
9235         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
9236
9237 2006-11-12  Bruno Haible  <bruno@clisp.org>
9238
9239         * gnulib-tool: New option --local-symlink.
9240         (func_usage): Document it.
9241         (lsymbolic): New variable.
9242         (func_import, func_create_testdir): If --symlink was not specified,
9243         test whether --local-symlink was specified and the file comes from
9244         the local_gnulib_dir.
9245
9246 2006-11-12  Bruno Haible  <bruno@clisp.org>
9247
9248         * gnulib-tool (func_ln): New function.
9249         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
9250
9251 2006-11-12  Bruno Haible  <bruno@clisp.org>
9252
9253         Finish support for source files in subdirectories.
9254         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
9255         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
9256         AUTOMAKE_OPTIONS.
9257         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
9258
9259 2006-11-12  Bruno Haible  <bruno@clisp.org>
9260
9261         * gnulib-tool (func_get_automake_snippet): Synthesize also an
9262         EXTRA_lib_SOURCES augmentation.
9263         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
9264
9265 2006-11-12  Jim Meyering  <jim@meyering.net>
9266
9267         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
9268         file descriptors.  This also averts a failure on systems with
9269         native openat support when a traversed directory lacks "x" access.
9270         * lib/fts_.h: Include "i-ring.h"
9271         (struct FTS) [fts_fd_ring]: New member.
9272         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
9273         (FCHDIR): Add parentheses.
9274         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
9275         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
9276         When descending, rather than simply closing the previous
9277         fts_cwd_fd value, push that file descriptor onto the ring.
9278         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
9279         (fts_open): Initialize the new fd_ring member.
9280         (fts_close): Clear the ring.
9281         (fts_safe_changedir): When possible, use our new fd_ring to skip
9282         the diropen and fstat and dev/ino comparison that would normally
9283         accompany a virtual `chdir ("..")'.
9284
9285         * modules/fts (Depends-on): Add i-ring.
9286         * modules/i-ring: New module.
9287         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
9288         * m4/i-ring.m4: New file.
9289
9290 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9291
9292         * gnulib-tool (func_create_testdir): Fix replacement of
9293         `build-aux' in configure.ac.  Run autotools in gltests
9294         subdirectory.
9295         (func_create_testdir, func_create_megatestdir, test): There is
9296         no need for '--force' in most autotool invocations in a new
9297         tree.  Actually fail the whole test if any of the tools, or the
9298         configure or make stages fail.
9299
9300         Sync from Automake.
9301         * build-aux/gnupload: Revert last change.  Add pointer to upload
9302         instructions of the GNU Maintenance Instructions.
9303         Suggestion by Karl Berry.
9304
9305 2006-11-10  Jim Meyering  <jim@meyering.net>
9306
9307         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
9308
9309 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9310
9311         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
9312         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
9313         (bind_textdomain_codeset) [! ENABLE_NLS]:
9314         Evaluate all the arguments.  That way, callers get compatible behavior
9315         if the arguments have side effects.  Also, it avoids some GCC
9316         diagnostics in some cases; Joel E. Denny reported problems when Bison
9317         was configured with --enable-gcc-warnigs.
9318
9319 2006-11-10  Jim Meyering  <jim@meyering.net>
9320
9321         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
9322         relevant options in CFLAGS (like -O, -fno-inline) are taken into
9323         account.
9324
9325 2006-11-10  Jim Meyering  <jim@meyering.net>
9326
9327         * modules/inline: New file/module.
9328         * modules/xalloc (Files): Remove m4/inline.m4.
9329         (Depends-on): Add inline, instead.
9330         * modules/oset: Likewise.
9331         * modules/list: Likewise.
9332
9333 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9334
9335         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
9336         Problem reported by Matthew Woehlke.
9337
9338 2006-11-09  Bruno Haible  <bruno@clisp.org>
9339
9340         * lib/tempname.c (gen_tempname): Remove variant that invokes
9341         __gen_tempname.
9342         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
9343         __gen_tempname.
9344
9345 2006-11-08  Bruno Haible  <bruno@clisp.org>
9346
9347         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
9348         to 'yes' instead of 'cross-compiling'.
9349
9350 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
9351
9352         * lib/quotearg.h (quotearg_free): New decl.
9353         * lib/quotearg.c (quotearg_free): New function.
9354         (slot0, nslots, slotvec0, slotvec):
9355         Now file-scope so that quotearg_free can get at them.
9356
9357 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9358
9359         Sync from Automake.
9360         * build-aux/gnupload: Add missing 'gnu' to example URL.
9361         Report by Karl Berry.
9362
9363 2006-11-08  Bruno Haible  <bruno@clisp.org>
9364
9365         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
9366         Suggested by Paul Eggert.
9367
9368 2006-11-08  Jim Meyering  <jim@meyering.net>
9369
9370         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
9371         It's already included if !_LIBC.
9372         (fts_safe_changedir): Add a comment.
9373
9374 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9375
9376         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
9377         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
9378         Matthew Woehlke.
9379
9380         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
9381         definitions up, to avoid colliding with change below.
9382         (static_inline) [HAVE_INLINE]: New macro.
9383         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
9384         Provide extern decls when !HAVE_INLINE.  Do not define unless
9385         static_inline is defined, either by us or by xmalloc.c.  Use
9386         static_inline rather than static inline.
9387         (XCALLOC): Optimize sizeof(T) = 1 case.
9388         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
9389
9390 2006-11-07  Bruno Haible  <bruno@clisp.org>
9391
9392         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
9393         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
9394         AC_C_INLINE.
9395         * modules/xalloc (Files): Add m4/inline.m4.
9396
9397 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9398
9399         * README: Fix typo.
9400         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
9401         (Miscellanous Notes): ...from this.
9402
9403 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9404
9405         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
9406         Mention that offsetof should be used instead of sizeof.
9407         From Bruno Haible.
9408
9409 2006-11-07  Bruno Haible  <bruno@clisp.org>
9410
9411         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
9412
9413 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9414
9415         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9416         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
9417         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9418         (gl_tree_add_before, gl_tree_add_after):
9419         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
9420         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
9421         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
9422         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
9423         (gl_linked_add_after, gl_linked_add_at): Likewise.
9424         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
9425         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9426         (gl_tree_add_before, gl_tree_add_after): Likewise.
9427         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
9428         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
9429         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
9430
9431 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9432
9433         * lib/gl_oset.h: Use C comment style, not C++ comment style.
9434
9435 2006-11-06  Bruno Haible  <bruno@clisp.org>
9436
9437         * m4/inline.m4: New file.
9438         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
9439         * modules/list (Files): Add m4/inline.m4.
9440         * modules/oset (Files): Likewise.
9441
9442 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9443
9444         * lib/idcache.c: Include <stddef.h>, for offsetof.
9445         (struct userid.name): Change from char * to a flexible array member.
9446         All uses changed.
9447         * modules/idcache (Depends-on): Add flexmember.
9448
9449         * MODULES.html.sh (Core language properties): New module flexmember.
9450         * modules/flexmember, m4/flexmember.m4: New files.
9451
9452         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
9453         inline functions that are identical with the old xnmalloc_inline,
9454         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
9455         that we can avoid some unnecessary integer multiplications and
9456         divisions in the common case where the element size is known at
9457         compile time.
9458         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
9459         needed.
9460         (xnboundedmalloc): Remove.
9461         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
9462         arguments, for consistency with rest of this header.
9463         (xcharalloc): Rewrite using XNMALLOC.
9464         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
9465         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
9466         versions have been moved to lib/xalloc.h and renamed to be the
9467         non-*_inline versions.
9468         (xmalloc, xrealloc): Implement without reference to the xnmalloc
9469         and xnrealloc functions, since those functions are now inline and
9470         now call us.
9471         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
9472         renaming described above.
9473         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
9474         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
9475         captures the dependency in AC_C_INLINE.
9476
9477         New module canonicalize-lgpl, proposed by Charles Wilson in
9478         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
9479         with a few small changes afterwards.
9480         * MODULES.html.sh (File system functions): New module
9481         canonicalize-lgpl.
9482         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
9483         and canonicalize_file_name.
9484         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
9485         * modules/canonicalize-lgpl: New files.
9486
9487 2006-11-05  Bruno Haible  <bruno@clisp.org>
9488
9489         * gnulib-tool (func_import, func_create_testdir): Create directories
9490         also for files in subdirectories of lib/.
9491
9492 2006-11-05  Bruno Haible  <bruno@clisp.org>
9493
9494         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
9495         ANSI C compliant.
9496
9497 2006-11-03  Bruno Haible  <bruno@clisp.org>
9498
9499         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9500         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
9501         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
9502         (xnboundedmalloc): New inline function.
9503         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
9504         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
9505         xmalloc.
9506         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
9507         xmalloc.
9508         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
9509         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
9510         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
9511         xmalloc.
9512         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9513         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
9514         xmalloc.
9515         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
9516         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9517         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
9518         xmalloc.
9519         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9520         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
9521         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9522         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
9523         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
9524         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
9525         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
9526
9527 2006-11-03  Bruno Haible  <bruno@clisp.org>
9528
9529         * lib/c-ctype.h [C++]: Define functions without name mangling.
9530         * lib/fwriteerror.h [C++]: Likewise.
9531         * lib/gcd.h [C++]: Likewise.
9532         * lib/linebreak.h [C++]: Likewise.
9533
9534 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
9535
9536         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
9537         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
9538         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
9539         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9540         Check for functions and headers just once.
9541         Check for declaration of canonicalize_file_name.
9542         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
9543
9544 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9545
9546         * gnulib-tool (func_import): Fix typo in actioncmd.
9547
9548 2006-11-02  Bruno Haible  <bruno@clisp.org>
9549
9550         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
9551         newline sequence in the Makefile.am snippet as a space, like "make"
9552         does.
9553         Reported by Roger Persson <perrog@gmail.com>.
9554
9555 2006-11-01  Bruno Haible  <bruno@clisp.org>
9556
9557         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
9558         already declared in <string.h>.
9559         * lib/strcase.h (strncasecmp): Don't declare it if yes.
9560
9561 2006-11-01  Bruno Haible  <bruno@clisp.org>
9562
9563         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
9564         * lib/strcase.h: Include <string.h>.
9565         (strcasecmp): Define to rpl_strcasecmp here.
9566
9567 2006-11-01  Bruno Haible  <bruno@clisp.org>
9568
9569         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
9570
9571 2006-11-01  Eric Blake  <ebb9@byu.net>
9572
9573         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
9574
9575         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
9576
9577 2006-10-29  Bruno Haible  <bruno@clisp.org>
9578
9579         Make it compile in C++ mode.
9580         * lib/full-write.c (full_rw): Add a cast.
9581
9582 2006-11-01  Bruno Haible  <bruno@clisp.org>
9583
9584         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
9585         be POSIX compliant.
9586         Reported by Roger Persson <perrog@gmail.com>.
9587
9588 2006-11-01  Eric Blake  <ebb9@byu.net>
9589
9590         * lib/getopt_.h: Fix comments.
9591
9592 2006-10-31  Eric Blake  <ebb9@byu.net>
9593
9594         * modules/tmpdir (Depends-on): Add sys_stat.
9595         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
9596         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
9597         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
9598         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
9599         tempname.
9600
9601 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
9602
9603         Avoid some C++ diagnostics reported by Bruno Haible.
9604         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
9605         xmalloc.
9606         (quotearg_alloc): Use xcharalloc rather than xmalloc.
9607         (struct slotvec): Move to top level.
9608         (quotearg_n_options): Rewrite to avoid xmalloc.
9609         * lib/xalloc.h (xcharalloc): New function.
9610         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
9611         [defined __cplusplus]: Add function template that provides result
9612         type propagation.  This part of the change is from Bruno Haible.
9613
9614 2006-10-29  Bruno Haible  <bruno@clisp.org>
9615
9616         Make it compile in C++ mode.
9617         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
9618         * lib/strnlen1.c (strnlen1): Cast memchr result.
9619         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
9620         * lib/clean-temp.c (string_equals, string_hash): Add casts.
9621         (create_temp_dir): Rename local variable 'template'.
9622         (compile_csharp_using_sscli): Add cast.
9623         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
9624         * lib/findprog.c (find_in_path): Likewise.
9625         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
9626         * lib/wait-process.c (register_slave_subprocess): Likewise.
9627
9628 2006-10-22  Bruno Haible  <bruno@clisp.org>
9629
9630         * modules/tsearch: New file.
9631         * lib/tsearch.h: New file.
9632         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
9633         * m4/tsearch.m4: New file.
9634         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
9635
9636 2006-10-29  Eric Blake  <ebb9@byu.net>
9637
9638         * lib/arcfour.c: Assume config.h.
9639         * lib/arctwo.c: Likewise.
9640         * lib/base64.c: Likewise.
9641         * lib/check-version.c: Likewise.
9642         * lib/crc.c: Likewise.
9643         * lib/des.c: Likewise.
9644         * lib/gc-gnulib.c: Likewise.
9645         * lib/gc-libgcrypt.c: Likewise.
9646         * lib/gc-pbkdf2-sha1.c: Likewise.
9647         * lib/getaddrinfo.c: Likewise.
9648         * lib/getdelim.c: Likewise.
9649         * lib/getline.c: Likewise.
9650         * lib/hmac-md5.c: Likewise.
9651         * lib/hmac-sha1.c: Likewise.
9652         * lib/iconvme.c: Likewise.
9653         * lib/md2.c: Likewise.
9654         * lib/md4.c: Likewise.
9655         * lib/memxor.c: Likewise.
9656         * lib/read-file.c: Likewise.
9657         * lib/readline.c: Likewise.
9658         * lib/rijndael-alg-fst.c: Likewise.
9659         * lib/rijndael-api-fst.c: Likewise.
9660         * lib/xgetdomainname.c: Likewise.
9661
9662 2006-10-28  Eric Blake  <ebb9@byu.net>
9663
9664         * lib/xstrndup.c: Assume config.h.
9665
9666 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9667
9668         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
9669         stat-macros.h is now for our own macros, whereas stat_h is for
9670         macros in the <sys/stat.h> name space.
9671         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
9672         (STAT_MACROS_H): Remove.
9673         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
9674         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
9675         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
9676         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
9677         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
9678         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
9679         Move these macros to ...
9680         * lib/stat_.h: here.  Don't include stat-macros.h.
9681         * lib/canonicalize.c: Don't include stat-macros.h.
9682         * lib/chown.c: Likewise.
9683         * lib/euidaccess.c: Likewise.
9684         * lib/file-type.c: Likewise.
9685         * lib/filemode.c: Likewise.
9686         * lib/glob.c: Likewise.
9687         * lib/isapipe.c: Likewise.
9688         * lib/lchown.c: Likewise.
9689         * lib/lstat.c: Likewise.
9690         * lib/mkdir-p.c: Likewise.
9691         * lib/rmdir.c: Likewise.
9692         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
9693         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
9694         unless mkdir isn't declared, to speed up 'configure'.
9695         Always create sys/stat.h, since it's unlikely any real sys/stat.h
9696         would define all the S_* symbols.
9697         * modules/canonicalize (Depends-on):
9698         Depend on sys_stat, not stat-macros.
9699         * modules/chown: Likewise.
9700         * modules/euidaccess: Likewise.
9701         * modules/filemode: Likewise.
9702         * modules/file-type: Likewise.
9703         * modules/glob: Likewise.
9704         * modules/isapipe: Likewise.
9705         * modules/lchown: Likewise.
9706         * modules/lstat: Likewise.
9707         * modules/mkancesdirs: Likewise.
9708         * modules/rmdir: Likewise.
9709         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
9710         * modules/modechange: Likewise.
9711         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
9712         (configure.ac): Remove gl_STAT_MACROS.
9713         * modules/sys_stat (Depends-on): Remove stat-macros.
9714
9715 2006-10-27  Bruno Haible  <bruno@clisp.org>
9716
9717         * m4/signed.m4: Remove file.
9718         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
9719         invocation.
9720         * modules/vasnprintf (Files): Remove m4/signed.m4.
9721
9722 2006-10-27  Bruno Haible  <bruno@clisp.org>
9723
9724         Update to GNU gettext 0.16.
9725         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
9726         m4/inttypes-h.m4, m4/signed.m4.
9727         * m4/gettext.m4: Update to GNU gettext 0.16.
9728         * m4/intl.m4: New file, from GNU gettext.
9729         * m4/intldir.m4: New file, from GNU gettext.
9730         * config/srclist.txt: Update
9731
9732 2006-10-27  Eric Blake  <ebb9@byu.net>
9733
9734         * MODULES.html.sh: Document tempname.
9735         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
9736         dependencies.
9737         (Files): Move lib/tempname.c...
9738         * modules/tempname: ...to this new module.
9739         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
9740         (gl_PREREQ_TEMPNAME): Move...
9741         * m4/tempname.m4: ...to this new file.
9742         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
9743         * modules/sys_stat (Depends-on): Add stat-macros.
9744         * lib/stat_.h (includes): Pick up stat macros.
9745         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
9746         if stat macros are broken.
9747         * lib/tempname.c (includes): No need to include "stat-macros.h".
9748         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
9749         (direxists, __path_search) [!_LIBC]: Don't compile these in
9750         gnulib; the tmpdir module covers that.
9751         * lib/tempname.h: New file.
9752
9753 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
9754
9755         * COPYING: Explain how gnulib-tool converts licence headers.
9756         Almost all wording by Eric Blake.
9757
9758 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
9759
9760         * lib/mbchar.h (is_basic_table): Make read-only.
9761         * lib/mbchar.c (is_basic_table): Likewise.
9762         Reported by John Darrington.
9763
9764 2006-10-25  Bruno Haible  <bruno@clisp.org>
9765
9766         * lib/progname.h (set_program_name): Undefine before defining.
9767
9768 2006-10-25  Bruno Haible  <bruno@clisp.org>
9769
9770         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
9771         false for non-gcc C++ compilers.
9772         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
9773
9774 2006-10-24  Bruno Haible  <bruno@clisp.org>
9775
9776         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
9777         iconv implementations like Irix iconv.
9778
9779 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9780
9781         * modules/vararrays: New file.
9782         * m4/vararrays.m4: New file, taken from diffutils.
9783         * MODULES.html.sh: New module vararrays.
9784
9785 2006-10-24  Karl Berry  <karl@gnu.org>
9786
9787         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
9788         Don't call GNU Unix.
9789
9790 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9791
9792         * users.txt: Add Libtool.
9793
9794         Sync from Libtool:
9795
9796         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9797
9798         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
9799         to gnulib's policy of including config.h unconditionally.
9800
9801 2006-10-24  Bruno Haible  <bruno@clisp.org>
9802
9803         * modules/wcwidth (Files): Add m4/wint_t.m4.
9804         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
9805         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
9806
9807 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9808
9809         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
9810         to pacify GCC with some -W flags enabled.  Problem reported by
9811         Bruno Haible.
9812
9813 2006-10-24  Jim Meyering  <jim@meyering.net>
9814
9815         * MODULES.html.sh: Remove uinttostr.  It's not a module.
9816         Reported by Karl Berry.
9817
9818 2006-10-23  Bruno Haible  <bruno@clisp.org>
9819
9820         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
9821
9822 2006-10-24  Bruno Haible  <bruno@clisp.org>
9823
9824         * lib/gl_list.h: Use C comment style, not C++ comment style.
9825
9826 2006-10-23  Eric Blake  <ebb9@byu.net>
9827
9828         * lib/getaddrinfo.c (includes): Add missing include.
9829
9830 2006-10-23  Bruno Haible  <bruno@clisp.org>
9831             Paul Eggert  <eggert@cs.ucla.edu>
9832
9833         Ability to rename obstack_free.
9834         * lib/obstack.h (__obstack_free): New macro. Declare instead of
9835         obstack_free.
9836         (obstack_free): Invoke the __obstack_free macro.
9837         * lib/obstack.c (obstack_free): Use __obstack_free macro.
9838
9839 2006-10-23  Bruno Haible  <bruno@clisp.org>
9840             Paul Eggert  <eggert@cs.ucla.edu>
9841
9842         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
9843         __argc, __argv from the declaration. (They are defined as macros on
9844         mingw.)
9845
9846 2006-10-22  Bruno Haible  <bruno@clisp.org>
9847
9848         * doc/gnulib-intro.texi: New file.
9849         * doc/gnulib.texi: Include it.
9850
9851 2006-10-21  Bruno Haible  <bruno@clisp.org>
9852
9853         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
9854         "Introduction", "Miscellanous Notes", "Particular Modules".
9855
9856 2006-10-21  Bruno Haible  <bruno@clisp.org>
9857
9858         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9859         Change mostlyclean-local rule to avoid sh syntax error from bash
9860         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
9861
9862 2006-10-23  Jim Meyering  <jim@meyering.net>
9863
9864         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
9865         in place of snprintf.
9866
9867         * modules/inttostr (Files): Add lib/uinttostr.c.
9868         * lib/uinttostr.c (inttostr): New file/function.
9869         * lib/inttostr.h (uinttostr): Declare.
9870         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
9871         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9872         Add uinttostr.
9873         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
9874
9875 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9876
9877         * lib/canonicalize.c (ELOOP): Define if not already defined.
9878         Problem reported by Bruno Haible in
9879         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
9880
9881 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9882
9883         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
9884         Problem reported by Perry Smith and Ville Laurikari.
9885
9886         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
9887         uses.
9888
9889 2006-10-19  Bruno Haible  <bruno@clisp.org>
9890
9891         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
9892         for mingw.
9893
9894 2006-10-19  Bruno Haible  <bruno@clisp.org>
9895
9896         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
9897         Needed for mingw.
9898
9899 2006-10-19  Bruno Haible  <bruno@clisp.org>
9900
9901         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
9902
9903 2006-10-19  Bruno Haible  <bruno@clisp.org>
9904
9905         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
9906         it.
9907
9908 2006-10-19  Bruno Haible  <bruno@clisp.org>
9909
9910         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
9911         invocation.
9912
9913 2006-10-19  Bruno Haible  <bruno@clisp.org>
9914
9915         * gnulib-tool (func_create_testdir): Don't include ftruncate and
9916         mountlist by default.
9917
9918 2006-10-16  Bruno Haible  <bruno@clisp.org>
9919
9920         * lib/c-strstr.c: Include c-strstr.h.
9921
9922 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9923
9924         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
9925         in a slash.
9926
9927 2006-10-18  Bruno Haible  <bruno@clisp.org>
9928
9929         * lib/lock.h [C++]: Wrap definitions in extern "C".
9930
9931 2006-10-18  Bruno Haible  <bruno@clisp.org>
9932
9933         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
9934         gl_LIBOBJS list.
9935
9936 2006-10-18  Bruno Haible  <bruno@clisp.org>
9937
9938         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
9939
9940 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
9941
9942         * lib/xstrtol.h: Include gettext.h.
9943         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
9944         Problem reported by Eric Blake.
9945         * modules/xstrtol (Depends-on): Add gettext-h.
9946
9947 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
9948
9949         * lib/strftime.c (advance): New macro.
9950         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
9951         incomplete type, so you can't add 0 to it.  Problem and patch
9952         reported by Eelco Dolstra for dietlibc.
9953
9954 2006-10-18  Jim Meyering  <jim@meyering.net>
9955
9956         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
9957         type for a local, and rename it: s/up/user_proc/.
9958
9959 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9960
9961         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
9962         READ_UTMP_USER_PROCESS.
9963         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
9964
9965 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9966
9967         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
9968         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
9969
9970 2006-10-17  Eric Blake  <ebb9@byu.net>
9971
9972         * lib/sigprocmask.c (sigprocmask): Fix typo.
9973
9974         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
9975
9976         * modules/clean-temp (Makefile.am): Don't add to make output...
9977         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
9978         config.h.
9979
9980 2006-10-17  Bruno Haible  <bruno@clisp.org>
9981
9982         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
9983         differently if DEFAULT_TEXT_DOMAIN is set.
9984
9985 2006-10-16  Bruno Haible  <bruno@clisp.org>
9986
9987         * lib/clean-temp.c: Include fwriteerror.h.
9988
9989 2006-10-16  Bruno Haible  <bruno@clisp.org>
9990
9991         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
9992
9993 2006-10-16  Bruno Haible  <bruno@clisp.org>
9994
9995         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
9996         * lib/sigprocmask.h: Include <sys/types.h>.
9997         (sigset_t): Use the system's definition if present.
9998
9999 2006-10-17  Eric Blake  <ebb9@byu.net>
10000
10001         * lib/xvasprintf.c (includes): Assume config.h.
10002         * lib/xasprintf.c (includes): Likewise.
10003
10004 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
10005
10006         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
10007         at least as wide as intmax_t.
10008
10009 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
10010
10011         (Imported from Automake.)
10012         * build-aux/gnupload: Update to version 1.1 of directive file.
10013
10014 2006-10-16  Eric Blake  <ebb9@byu.net>
10015
10016         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
10017         match Automake 1.10a.
10018
10019 2006-10-14  Bruno Haible  <bruno@clisp.org>
10020
10021         * modules/sigprocmask: New file.
10022         * lib/sigprocmask.h: New file.
10023         * lib/sigprocmask.c: New file.
10024         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
10025         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
10026         request sigprocmask.o.
10027         (gl_PREREQ_SIGPROCMASK): New macro.
10028         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
10029         (Depends-on): Add sigprocmask.
10030         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
10031         gt_SIGNALBLOCKING. Test for 'raise' only once.
10032         * lib/fatal-signal.c: Include sigprocmask.h.
10033         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
10034         unblock_fatal_signals): Define always.
10035         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10036         sigprocmask.
10037
10038 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10039
10040         Sync from Automake.
10041         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
10042         which incorrectly sets the mode of an existing destination
10043         directory.  In some cases the unpatched install-sh could do the
10044         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
10045         system.  We hope this is rare in practice, but it's clearly worth
10046         fixing.  Problem reported by Alex Unleashed in
10047         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
10048         Also, don't bother to check for -m bugs unless we're using -m;
10049         suggested by Stepan Kasal.
10050
10051 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10052
10053         Sync from Automake.
10054         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
10055         `-c' flag, so they appear at the same position as in %FASTDEP%
10056         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
10057         which ignores unknown options only after the first non-option.
10058         Bug report against M4 by Nelson H. F. Beebe.
10059
10060 2006-10-13  Jim Meyering  <jim@meyering.net>
10061
10062         Fix a bug in yesterday's change.
10063         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
10064         p->fts_statp->st_dev would be used uninitialized.
10065         Ensures that we always call fts_stat on the very first entry.
10066         Miklos Szeredi reported that find -xdev stopped working.
10067
10068 2006-10-12  Bruno Haible  <bruno@clisp.org>
10069
10070         * gnulib-tool (func_get_automake_snippet): Append an automatically
10071         computed EXTRA_DIST augmentation.
10072         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
10073         * modules/alloca-opt (Makefile.am): Likewise.
10074         * modules/allocsa (Makefile.am): Likewise.
10075         * modules/arcfour (Makefile.am): Likewise.
10076         * modules/arctwo (Makefile.am): Likewise.
10077         * modules/argmatch (Makefile.am): Likewise.
10078         * modules/argz (Makefile.am): Likewise.
10079         * modules/atexit (Makefile.am): Likewise.
10080         * modules/backupfile (Makefile.am): Likewise.
10081         * modules/byteswap (Makefile.am): Likewise.
10082         * modules/c-strtod (Makefile.am): Likewise.
10083         * modules/c-strtold (Makefile.am): Likewise.
10084         * modules/calloc (Makefile.am): Likewise.
10085         * modules/canon-host (Makefile.am): Likewise.
10086         * modules/canonicalize (Makefile.am): Likewise.
10087         * modules/chdir-long (Makefile.am): Likewise.
10088         * modules/chdir-safer (Makefile.am): Likewise.
10089         * modules/check-version (Makefile.am): Likewise.
10090         * modules/chown (Makefile.am): Likewise.
10091         * modules/cloexec (Makefile.am): Likewise.
10092         * modules/close-stream (Makefile.am): Likewise.
10093         * modules/closeout (Makefile.am): Likewise.
10094         * modules/crc (Makefile.am): Likewise.
10095         * modules/csharpexec (Makefile.am): Likewise.
10096         * modules/cycle-check (Makefile.am): Likewise.
10097         * modules/des (Makefile.am): Likewise.
10098         * modules/dev-ino (Makefile.am): Likewise.
10099         * modules/dirfd (Makefile.am): Likewise.
10100         * modules/dirname (Makefile.am): Likewise.
10101         * modules/dup2 (Makefile.am): Likewise.
10102         * modules/eealloc (Makefile.am): Likewise.
10103         * modules/error (Makefile.am): Likewise.
10104         * modules/euidaccess (Makefile.am): Likewise.
10105         * modules/exclude (Makefile.am): Likewise.
10106         * modules/exitfail (Makefile.am): Likewise.
10107         * modules/fcntl-safer (Makefile.am): Likewise.
10108         * modules/fcntl (Makefile.am): Likewise.
10109         * modules/file-type (Makefile.am): Likewise.
10110         * modules/fileblocks (Makefile.am): Likewise.
10111         * modules/filemode (Makefile.am): Likewise.
10112         * modules/filenamecat (Makefile.am): Likewise.
10113         * modules/fnmatch (Makefile.am): Likewise.
10114         * modules/fopen-safer (Makefile.am): Likewise.
10115         * modules/fpending (Makefile.am): Likewise.
10116         * modules/fprintftime (Makefile.am): Likewise.
10117         * modules/free (Makefile.am): Likewise.
10118         * modules/fsusage (Makefile.am): Likewise.
10119         * modules/ftruncate (Makefile.am): Likewise.
10120         * modules/fts (Makefile.am): Likewise.
10121         * modules/gc-arcfour (Makefile.am): Likewise.
10122         * modules/gc-des (Makefile.am): Likewise.
10123         * modules/gc-hmac-md5 (Makefile.am): Likewise.
10124         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
10125         * modules/gc-md4 (Makefile.am): Likewise.
10126         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10127         * modules/gc-sha1 (Makefile.am): Likewise.
10128         * modules/gc (Makefile.am): Likewise.
10129         * modules/getaddrinfo (Makefile.am): Likewise.
10130         * modules/getcwd (Makefile.am): Likewise.
10131         * modules/getdelim (Makefile.am): Likewise.
10132         * modules/getdomainname (Makefile.am): Likewise.
10133         * modules/getgroups (Makefile.am): Likewise.
10134         * modules/gethostname (Makefile.am): Likewise.
10135         * modules/gethrxtime (Makefile.am): Likewise.
10136         * modules/getline (Makefile.am): Likewise.
10137         * modules/getloadavg (Makefile.am): Likewise.
10138         * modules/getlogin_r (Makefile.am): Likewise.
10139         * modules/getndelim2 (Makefile.am): Likewise.
10140         * modules/getopt (Makefile.am): Likewise.
10141         * modules/getpagesize (Makefile.am): Likewise.
10142         * modules/getpass-gnu (Makefile.am): Likewise.
10143         * modules/getpass (Makefile.am): Likewise.
10144         * modules/getsubopt (Makefile.am): Likewise.
10145         * modules/gettime (Makefile.am): Likewise.
10146         * modules/gettimeofday (Makefile.am): Likewise.
10147         * modules/getugroups (Makefile.am): Likewise.
10148         * modules/getusershell (Makefile.am): Likewise.
10149         * modules/glob (Makefile.am): Likewise.
10150         * modules/group-member (Makefile.am): Likewise.
10151         * modules/hard-locale (Makefile.am): Likewise.
10152         * modules/hash (Makefile.am): Likewise.
10153         * modules/hmac-md5 (Makefile.am): Likewise.
10154         * modules/hmac-sha1 (Makefile.am): Likewise.
10155         * modules/human (Makefile.am): Likewise.
10156         * modules/idcache (Makefile.am): Likewise.
10157         * modules/imaxabs (Makefile.am): Likewise.
10158         * modules/imaxdiv (Makefile.am): Likewise.
10159         * modules/inet_ntop (Makefile.am): Likewise.
10160         * modules/inet_pton (Makefile.am): Likewise.
10161         * modules/intprops (Makefile.am): Likewise.
10162         * modules/inttostr (Makefile.am): Likewise.
10163         * modules/inttypes (Makefile.am): Likewise.
10164         * modules/isapipe (Makefile.am): Likewise.
10165         * modules/javaversion (Makefile.am): Likewise.
10166         * modules/lchmod (Makefile.am): Likewise.
10167         * modules/lchown (Makefile.am): Likewise.
10168         * modules/localcharset (Makefile.am): Likewise.
10169         * modules/long-options (Makefile.am): Likewise.
10170         * modules/lstat (Makefile.am): Likewise.
10171         * modules/malloc (Makefile.am): Likewise.
10172         * modules/mathl (Makefile.am): Likewise.
10173         * modules/mbchar (Makefile.am): Likewise.
10174         * modules/md2 (Makefile.am): Likewise.
10175         * modules/md4 (Makefile.am): Likewise.
10176         * modules/md5 (Makefile.am): Likewise.
10177         * modules/memcasecmp (Makefile.am): Likewise.
10178         * modules/memchr (Makefile.am): Likewise.
10179         * modules/memcmp (Makefile.am): Likewise.
10180         * modules/memcoll (Makefile.am): Likewise.
10181         * modules/memcpy (Makefile.am): Likewise.
10182         * modules/memmem (Makefile.am): Likewise.
10183         * modules/memmove (Makefile.am): Likewise.
10184         * modules/mempcpy (Makefile.am): Likewise.
10185         * modules/memrchr (Makefile.am): Likewise.
10186         * modules/memset (Makefile.am): Likewise.
10187         * modules/memxor (Makefile.am): Likewise.
10188         * modules/mkancesdirs (Makefile.am): Likewise.
10189         * modules/mkdir-p (Makefile.am): Likewise.
10190         * modules/mkdir (Makefile.am): Likewise.
10191         * modules/mkdtemp (Makefile.am): Likewise.
10192         * modules/mkstemp (Makefile.am): Likewise.
10193         * modules/mktime (Makefile.am): Likewise.
10194         * modules/modechange (Makefile.am): Likewise.
10195         * modules/mountlist (Makefile.am): Likewise.
10196         * modules/nanosleep (Makefile.am): Likewise.
10197         * modules/obstack (Makefile.am): Likewise.
10198         * modules/openat (Makefile.am): Likewise.
10199         * modules/pagealign_alloc (Makefile.am): Likewise.
10200         * modules/pathmax (Makefile.am): Likewise.
10201         * modules/physmem (Makefile.am): Likewise.
10202         * modules/poll (Makefile.am): Likewise.
10203         * modules/posixtm (Makefile.am): Likewise.
10204         * modules/posixver (Makefile.am): Likewise.
10205         * modules/putenv (Makefile.am): Likewise.
10206         * modules/quote (Makefile.am): Likewise.
10207         * modules/quotearg (Makefile.am): Likewise.
10208         * modules/raise (Makefile.am): Likewise.
10209         * modules/read-file (Makefile.am): Likewise.
10210         * modules/readline (Makefile.am): Likewise.
10211         * modules/readlink (Makefile.am): Likewise.
10212         * modules/readtokens (Makefile.am): Likewise.
10213         * modules/readutmp (Makefile.am): Likewise.
10214         * modules/realloc (Makefile.am): Likewise.
10215         * modules/regex (Makefile.am): Likewise.
10216         * modules/rename-dest-slash (Makefile.am): Likewise.
10217         * modules/rename (Makefile.am): Likewise.
10218         * modules/rijndael (Makefile.am): Likewise.
10219         * modules/rmdir (Makefile.am): Likewise.
10220         * modules/rpmatch (Makefile.am): Likewise.
10221         * modules/safe-read (Makefile.am): Likewise.
10222         * modules/safe-write (Makefile.am): Likewise.
10223         * modules/same-inode (Makefile.am): Likewise.
10224         * modules/same (Makefile.am): Likewise.
10225         * modules/save-cwd (Makefile.am): Likewise.
10226         * modules/savedir (Makefile.am): Likewise.
10227         * modules/setenv (Makefile.am): Likewise.
10228         * modules/settime (Makefile.am): Likewise.
10229         * modules/sha1 (Makefile.am): Likewise.
10230         * modules/sig2str (Makefile.am): Likewise.
10231         * modules/snprintf (Makefile.am): Likewise.
10232         * modules/stat-macros (Makefile.am): Likewise.
10233         * modules/stat-time (Makefile.am): Likewise.
10234         * modules/stdbool (Makefile.am): Likewise.
10235         * modules/stdint (Makefile.am): Likewise.
10236         * modules/stdlib-safer (Makefile.am): Likewise.
10237         * modules/stpcpy (Makefile.am): Likewise.
10238         * modules/stpncpy (Makefile.am): Likewise.
10239         * modules/strcase (Makefile.am): Likewise.
10240         * modules/strcasestr (Makefile.am): Likewise.
10241         * modules/strchrnul (Makefile.am): Likewise.
10242         * modules/strcspn (Makefile.am): Likewise.
10243         * modules/strdup (Makefile.am): Likewise.
10244         * modules/strerror (Makefile.am): Likewise.
10245         * modules/strftime (Makefile.am): Likewise.
10246         * modules/strndup (Makefile.am): Likewise.
10247         * modules/strnlen (Makefile.am): Likewise.
10248         * modules/strpbrk (Makefile.am): Likewise.
10249         * modules/strsep (Makefile.am): Likewise.
10250         * modules/strstr (Makefile.am): Likewise.
10251         * modules/strtod (Makefile.am): Likewise.
10252         * modules/strtoimax (Makefile.am): Likewise.
10253         * modules/strtok_r (Makefile.am): Likewise.
10254         * modules/strtol (Makefile.am): Likewise.
10255         * modules/strtoll (Makefile.am): Likewise.
10256         * modules/strtoul (Makefile.am): Likewise.
10257         * modules/strtoull (Makefile.am): Likewise.
10258         * modules/strtoumax (Makefile.am): Likewise.
10259         * modules/strverscmp (Makefile.am): Likewise.
10260         * modules/sys_socket (Makefile.am): Likewise.
10261         * modules/sys_stat (Makefile.am): Likewise.
10262         * modules/sysexits (Makefile.am): Likewise.
10263         * modules/time_r (Makefile.am): Likewise.
10264         * modules/timegm (Makefile.am): Likewise.
10265         * modules/timespec (Makefile.am): Likewise.
10266         * modules/tmpfile-safer (Makefile.am): Likewise.
10267         * modules/trim (Makefile.am): Likewise.
10268         * modules/unistd-safer (Makefile.am): Likewise.
10269         * modules/unlinkdir (Makefile.am): Likewise.
10270         * modules/unlocked-io (Makefile.am): Likewise.
10271         * modules/userspec (Makefile.am): Likewise.
10272         * modules/utime (Makefile.am): Likewise.
10273         * modules/utimecmp (Makefile.am): Likewise.
10274         * modules/utimens (Makefile.am): Likewise.
10275         * modules/vasnprintf (Makefile.am): Likewise.
10276         * modules/vasprintf (Makefile.am): Likewise.
10277         * modules/vsnprintf (Makefile.am): Likewise.
10278         * modules/xalloc (Makefile.am): Likewise.
10279         * modules/xgetcwd (Makefile.am): Likewise.
10280         * modules/xnanosleep (Makefile.am): Likewise.
10281         * modules/xreadlink (Makefile.am): Likewise.
10282         * modules/xstrtod (Makefile.am): Likewise.
10283         * modules/xstrtol (Makefile.am): Likewise.
10284         * modules/xstrtold (Makefile.am): Likewise.
10285         * modules/yesno (Makefile.am): Likewise.
10286         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
10287
10288 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10289
10290         * modules/error (Makefile.am): Distribute files through
10291         EXTRA_DIST, not lib_SOURCES.
10292
10293 2006-10-12  Eric Blake  <ebb9@byu.net>
10294
10295         * modules/error (Makefile.am): Distribute files in /lib.
10296         * modules/obstack (Makefile.am): Likewise.
10297
10298 2006-10-12  Bruno Haible  <bruno@clisp.org>
10299
10300         * modules/acl (Makefile.am): Distribute all files in lib/ through
10301         EXTRA_DIST.
10302         * modules/arcfour (Makefile.am): Likewise.
10303         * modules/arctwo (Makefile.am): Likewise.
10304         * modules/argmatch (Makefile.am): Likewise.
10305         * modules/argz (Makefile.am): Likewise.
10306         * modules/atexit (Makefile.am): Likewise.
10307         * modules/backupfile (Makefile.am): Likewise.
10308         * modules/c-strtod (Makefile.am): Likewise.
10309         * modules/c-strtold (Makefile.am): Likewise.
10310         * modules/calloc (Makefile.am): Likewise.
10311         * modules/canon-host (Makefile.am): Likewise.
10312         * modules/canonicalize (Makefile.am): Likewise.
10313         * modules/chdir-long (Makefile.am): Likewise.
10314         * modules/chdir-safer (Makefile.am): Likewise.
10315         * modules/check-version (Makefile.am): Likewise.
10316         * modules/chown (Makefile.am): Likewise.
10317         * modules/cloexec (Makefile.am): Likewise.
10318         * modules/close-stream (Makefile.am): Likewise.
10319         * modules/closeout (Makefile.am): Likewise.
10320         * modules/crc (Makefile.am): Likewise.
10321         * modules/cycle-check (Makefile.am): Likewise.
10322         * modules/des (Makefile.am): Likewise.
10323         * modules/dirfd (Makefile.am): Likewise.
10324         * modules/dirname (Makefile.am): Likewise.
10325         * modules/dup2 (Makefile.am): Likewise.
10326         * modules/euidaccess (Makefile.am): Likewise.
10327         * modules/exclude (Makefile.am): Likewise.
10328         * modules/exitfail (Makefile.am): Likewise.
10329         * modules/fcntl-safer (Makefile.am): Likewise.
10330         * modules/file-type (Makefile.am): Likewise.
10331         * modules/fileblocks (Makefile.am): Likewise.
10332         * modules/filemode (Makefile.am): Likewise.
10333         * modules/filenamecat (Makefile.am): Likewise.
10334         * modules/fnmatch (Makefile.am): Likewise.
10335         * modules/fopen-safer (Makefile.am): Likewise.
10336         * modules/fpending (Makefile.am): Likewise.
10337         * modules/fprintftime (Makefile.am): Likewise.
10338         * modules/free (Makefile.am): Likewise.
10339         * modules/fsusage (Makefile.am): Likewise.
10340         * modules/ftruncate (Makefile.am): Likewise.
10341         * modules/fts (Makefile.am): Likewise.
10342         * modules/gc (Makefile.am): Likewise.
10343         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10344         * modules/getaddrinfo (Makefile.am): Likewise.
10345         * modules/getcwd (Makefile.am): Likewise.
10346         * modules/getdelim (Makefile.am): Likewise.
10347         * modules/getdomainname (Makefile.am): Likewise.
10348         * modules/getgroups (Makefile.am): Likewise.
10349         * modules/gethostname (Makefile.am): Likewise.
10350         * modules/gethrxtime (Makefile.am): Likewise.
10351         * modules/getline (Makefile.am): Likewise.
10352         * modules/getloadavg (Makefile.am): Likewise.
10353         * modules/getlogin_r (Makefile.am): Likewise.
10354         * modules/getopt (Makefile.am): Likewise.
10355         * modules/getpass (Makefile.am): Likewise.
10356         * modules/getpass-gnu (Makefile.am): Likewise.
10357         * modules/getsubopt (Makefile.am): Likewise.
10358         * modules/gettime (Makefile.am): Likewise.
10359         * modules/gettimeofday (Makefile.am): Likewise.
10360         * modules/getugroups (Makefile.am): Likewise.
10361         * modules/getusershell (Makefile.am): Likewise.
10362         * modules/glob (Makefile.am): Likewise.
10363         * modules/group-member (Makefile.am): Likewise.
10364         * modules/hard-locale (Makefile.am): Likewise.
10365         * modules/hash (Makefile.am): Likewise.
10366         * modules/hmac-md5 (Makefile.am): Likewise.
10367         * modules/hmac-sha1 (Makefile.am): Likewise.
10368         * modules/human (Makefile.am): Likewise.
10369         * modules/idcache (Makefile.am): Likewise.
10370         * modules/imaxabs (Makefile.am): Likewise.
10371         * modules/imaxdiv (Makefile.am): Likewise.
10372         * modules/inet_ntop (Makefile.am): Likewise.
10373         * modules/inet_pton (Makefile.am): Likewise.
10374         * modules/inttostr (Makefile.am): Likewise.
10375         * modules/isapipe (Makefile.am): Likewise.
10376         * modules/lchown (Makefile.am): Likewise.
10377         * modules/long-options (Makefile.am): Likewise.
10378         * modules/lstat (Makefile.am): Likewise.
10379         * modules/malloc (Makefile.am): Likewise.
10380         * modules/mathl (Makefile.am): Likewise.
10381         * modules/mbchar (Makefile.am): Likewise.
10382         * modules/md2 (Makefile.am): Likewise.
10383         * modules/md4 (Makefile.am): Likewise.
10384         * modules/md5 (Makefile.am): Likewise.
10385         * modules/memcasecmp (Makefile.am): Likewise.
10386         * modules/memchr (Makefile.am): Likewise.
10387         * modules/memcmp (Makefile.am): Likewise.
10388         * modules/memcoll (Makefile.am): Likewise.
10389         * modules/memcpy (Makefile.am): Likewise.
10390         * modules/memmem (Makefile.am): Likewise.
10391         * modules/memmove (Makefile.am): Likewise.
10392         * modules/mempcpy (Makefile.am): Likewise.
10393         * modules/memrchr (Makefile.am): Likewise.
10394         * modules/memset (Makefile.am): Likewise.
10395         * modules/memxor (Makefile.am): Likewise.
10396         * modules/mkancesdirs (Makefile.am): Likewise.
10397         * modules/mkdir (Makefile.am): Likewise.
10398         * modules/mkdir-p (Makefile.am): Likewise.
10399         * modules/mkdtemp (Makefile.am): Likewise.
10400         * modules/mkstemp (Makefile.am): Likewise.
10401         * modules/mktime (Makefile.am): Likewise.
10402         * modules/modechange (Makefile.am): Likewise.
10403         * modules/mountlist (Makefile.am): Likewise.
10404         * modules/nanosleep (Makefile.am): Likewise.
10405         * modules/openat (Makefile.am): Likewise.
10406         * modules/pagealign_alloc (Makefile.am): Likewise.
10407         * modules/physmem (Makefile.am): Likewise.
10408         * modules/poll (Makefile.am): Likewise.
10409         * modules/posixtm (Makefile.am): Likewise.
10410         * modules/posixver (Makefile.am): Likewise.
10411         * modules/putenv (Makefile.am): Likewise.
10412         * modules/quote (Makefile.am): Likewise.
10413         * modules/quotearg (Makefile.am): Likewise.
10414         * modules/raise (Makefile.am): Likewise.
10415         * modules/read-file (Makefile.am): Likewise.
10416         * modules/readline (Makefile.am): Likewise.
10417         * modules/readlink (Makefile.am): Likewise.
10418         * modules/readtokens (Makefile.am): Likewise.
10419         * modules/readutmp (Makefile.am): Likewise.
10420         * modules/realloc (Makefile.am): Likewise.
10421         * modules/regex (Makefile.am): Likewise.
10422         * modules/rename (Makefile.am): Likewise.
10423         * modules/rename-dest-slash (Makefile.am): Likewise.
10424         * modules/rijndael (Makefile.am): Likewise.
10425         * modules/rmdir (Makefile.am): Likewise.
10426         * modules/rpmatch (Makefile.am): Likewise.
10427         * modules/safe-read (Makefile.am): Likewise.
10428         * modules/safe-write (Makefile.am): Likewise.
10429         * modules/same (Makefile.am): Likewise.
10430         * modules/save-cwd (Makefile.am): Likewise.
10431         * modules/savedir (Makefile.am): Likewise.
10432         * modules/setenv (Makefile.am): Likewise.
10433         * modules/settime (Makefile.am): Likewise.
10434         * modules/sha1 (Makefile.am): Likewise.
10435         * modules/sig2str (Makefile.am): Likewise.
10436         * modules/snprintf (Makefile.am): Likewise.
10437         * modules/stdlib-safer (Makefile.am): Likewise.
10438         * modules/stpcpy (Makefile.am): Likewise.
10439         * modules/stpncpy (Makefile.am): Likewise.
10440         * modules/strcase (Makefile.am): Likewise.
10441         * modules/strcasestr (Makefile.am): Likewise.
10442         * modules/strchrnul (Makefile.am): Likewise.
10443         * modules/strcspn (Makefile.am): Likewise.
10444         * modules/strdup (Makefile.am): Likewise.
10445         * modules/strerror (Makefile.am): Likewise.
10446         * modules/strftime (Makefile.am): Likewise.
10447         * modules/strndup (Makefile.am): Likewise.
10448         * modules/strnlen (Makefile.am): Likewise.
10449         * modules/strpbrk (Makefile.am): Likewise.
10450         * modules/strsep (Makefile.am): Likewise.
10451         * modules/strstr (Makefile.am): Likewise.
10452         * modules/strtod (Makefile.am): Likewise.
10453         * modules/strtoimax (Makefile.am): Likewise.
10454         * modules/strtok_r (Makefile.am): Likewise.
10455         * modules/strtol (Makefile.am): Likewise.
10456         * modules/strtoll (Makefile.am): Likewise.
10457         * modules/strtoul (Makefile.am): Likewise.
10458         * modules/strtoull (Makefile.am): Likewise.
10459         * modules/strtoumax (Makefile.am): Likewise.
10460         * modules/strverscmp (Makefile.am): Likewise.
10461         * modules/time_r (Makefile.am): Likewise.
10462         * modules/timegm (Makefile.am): Likewise.
10463         * modules/tmpfile-safer (Makefile.am): Likewise.
10464         * modules/unistd-safer (Makefile.am): Likewise.
10465         * modules/unlinkdir (Makefile.am): Likewise.
10466         * modules/userspec (Makefile.am): Likewise.
10467         * modules/utime (Makefile.am): Likewise.
10468         * modules/utimecmp (Makefile.am): Likewise.
10469         * modules/utimens (Makefile.am): Likewise.
10470         * modules/vasnprintf (Makefile.am): Likewise.
10471         * modules/vasprintf (Makefile.am): Likewise.
10472         * modules/vsnprintf (Makefile.am): Likewise.
10473         * modules/xalloc (Makefile.am): Likewise.
10474         * modules/xgetcwd (Makefile.am): Likewise.
10475         * modules/xnanosleep (Makefile.am): Likewise.
10476         * modules/xreadlink (Makefile.am): Likewise.
10477         * modules/xstrtod (Makefile.am): Likewise.
10478         * modules/xstrtol (Makefile.am): Likewise.
10479         * modules/xstrtold (Makefile.am): Likewise.
10480         * modules/yesno (Makefile.am): Likewise.
10481
10482 2006-10-12  Jim Meyering  <jim@meyering.net>
10483
10484         * m4/getloadavg.m4: Revert the change below.
10485
10486         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
10487         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
10488         fail with a symlink, which is what coreutils' ./bootstrap now
10489         creates by default.
10490
10491 2006-10-12  Bruno Haible  <bruno@clisp.org>
10492
10493         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
10494         mingw.
10495         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
10496         MSVC and mingw explicitly.
10497
10498 2006-10-11  Simon Josefsson  <jas@extundo.com>
10499             Bruno Haible  <bruno@clisp.org>
10500
10501         Add support for multiple gnulib-tool invocations in the scope of a
10502         single configure.ac file.
10503         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
10504         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
10505         with the same contents as the _LIBADD variable.
10506         (func_emit_initmacro_start, func_emit_initmacro_end,
10507         func_emit_initmacro_done): New functions.
10508         (func_import, func_create_testdir): Invoke them. Allow the identifiers
10509         gl_LIBOBJS and gl_LTLIBOBJS.
10510
10511 2006-10-11  Bruno Haible  <bruno@clisp.org>
10512
10513         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
10514         (func_create_testdir): Don't create po/Makefile.am, don't invoke
10515         autoreconf. Instead, invoke autopoint explicitly but move back the
10516         *.m4 files from gnulib.
10517
10518 2006-10-11  Bruno Haible  <bruno@clisp.org>
10519
10520         * gnulib-tool (func_usage): Make module names after --create-testdir
10521         optional.
10522         (func_create_testdir): If no module was specified, use nearly all
10523         modules.
10524
10525 2006-10-12  Jim Meyering  <jim@meyering.net>
10526
10527         Big performance improvement for fts-based tools that use FTS_NOSTAT.
10528         Avoid spurious inode-mismatch problems on non-POSIX file systems.
10529         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
10530         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
10531         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
10532         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
10533         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
10534         (fts_set_stat_required): New function.
10535         (fts_open): Defer the calls to fts_stat, if possible or requested.
10536         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
10537         into fts_stat itself.
10538         (fts_read): Perform any required (deferred) fts_stat call.
10539         (fts_build): Likewise, for the directory we're about to open and read.
10540         In the readdir loop, carefully decide whether each entry will require
10541         an eventual call to fts_stat, using dirent.d_type info if available.
10542         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
10543         a command line argument into this function.  Update all callers.
10544         Map a return value of FTS_DOT to FTS_D for a command line argument.
10545         * modules/fts (Depends-on): Add d-type.  Alphabetize.
10546         Thanks to Miklos Szeredi for his tenacity and for the initial
10547         bug report about "find" failing on a FUSE-based file system.
10548
10549         * lib/fts.c (fts_open): Use consistent indentation.
10550
10551 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10552
10553         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
10554         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
10555         reported by Jim Meyering.  All uses of cache variables renamed
10556         to match Autoconf's.
10557         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
10558         the other one.
10559
10560         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
10561         Fix misspelling in diagnostic.
10562
10563 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10564
10565         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
10566         defined.  Problem reported by Matthew Woehlke.
10567
10568         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
10569         Add support for Tandem NonStop R series.
10570         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
10571         Use new macro.
10572
10573         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
10574         (has_trailing_slash): Omit size arg; all callers changed.
10575         Omit 'inline', since it doesn't help performance and we'd
10576         need to configure it.
10577         Don't count //, ///, etc. as having a trailing slash.
10578         As a side effect, this removes a C99ism reported by Matthew Woehlke.
10579         (rpl_rename_dest_slash): On failure, use rename's errno rather
10580         than (in some cases) an incorrect or junk errno.
10581         Simplify code by removing need to compute length; this does
10582         cause it to make two passes instead of one over the file name,
10583         but it's worth it.
10584
10585         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
10586         change, since Autoconf's version may no longer be appropriate now
10587         that we are using CVS Autoconf's version.  Add support for Tandem.
10588
10589 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10590             Bruno Haible  <bruno@clisp.org>
10591
10592         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
10593         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
10594         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
10595         gl_AC_TYPE_LONG_LONG.
10596
10597         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
10598         instead of HAVE_LONG_LONG.
10599         * lib/printf-args.c (printf_fetchargs): Likewise.
10600         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
10601         * lib/vasnprintf.c (VASNPRINTF): Likewise.
10602         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
10603         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
10604         gl_AC_TYPE_LONG_LONG.
10605
10606 2006-10-11  Bruno Haible  <bruno@clisp.org>
10607
10608         * m4/longlong.m4: Add comments.
10609         * m4/ulonglong.m4: Likewise.
10610
10611 2006-10-10  Bruno Haible  <bruno@clisp.org>
10612
10613         Make it possible to #define stpcpy, strdup to aliases.
10614         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
10615         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
10616
10617 2006-10-10  Bruno Haible  <bruno@clisp.org>
10618
10619         Make it possible to #define gcd to an alias.
10620         * lib/gcd.c: Include config.h.
10621
10622 2006-10-10  Bruno Haible  <bruno@clisp.org>
10623
10624         Make it possible to #define c_isascii to an alias.
10625         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
10626         defined. Undefine the macros before defining them, to avoid gcc
10627         warnings.
10628         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
10629         define NO_C_CTYPE_MACROS early.
10630
10631 2006-10-10  Bruno Haible  <bruno@clisp.org>
10632
10633         Make it possible to #define set_program_name to an alias.
10634         * lib/progname.c: Don't undefine set_program_name; instead, undefine
10635         ENABLE_RELOCATABLE early.
10636
10637 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10638
10639         Port to Tandem NSK OSS, which has 64-bit signed int but at most
10640         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
10641         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
10642         More generally, don't assume that 64-bit signed int is available
10643         if unsigned int is, and vice versa.
10644         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
10645         unsigned symbols, not on their signed counterparts.
10646         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
10647         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
10648         (UINT64_C, UINTMAX_C):
10649         Likewise.
10650         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
10651         unsigned counterparts.
10652         (Have_long_long, Unsigned): New macros.
10653         (Int): Renamed from INT.
10654         (strtoimax): Use the new macros.
10655         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
10656         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
10657         * modules/inttypes (inttypes.h): Substitute
10658         HAVE_UNSIGNED_LONG_LONG_INT.
10659         * modules/stdint (stdint.h): Likewise.
10660         (Files): Add m4/ulonglong.m4.
10661
10662 2006-10-10  Bruno Haible  <bruno@clisp.org>
10663
10664         Fix a gcc -Wshadow warning.
10665         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
10666         to 'bucket'.
10667         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
10668         gl_linked_indexof_from_to): Likewise.
10669         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
10670         Likewise.
10671         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
10672         Likewise.
10673         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
10674         Reported by Eric Blake.
10675
10676 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
10677
10678         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
10679         for NetBSD.  Problem reported by Bruno Haible.
10680
10681 2006-10-09  Jim Meyering  <jim@meyering.net>
10682
10683         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
10684         Patch from Bruno Haible.
10685
10686 2006-10-09  Jim Meyering  <jim@meyering.net>
10687
10688         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
10689         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
10690         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
10691
10692 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
10693
10694         Don't include <config.h> twice; this doesn't work in some cases,
10695         e.g., when config.h has "#define intmax_t long long int" and
10696         we include <config.h>, <inttypes.h>, <config.h> in that order.
10697         Problem reported by Matthew Woehlke in:
10698         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
10699         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
10700         * lib/fts-cycle.c: Don't include config.h.
10701         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
10702         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
10703         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
10704         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
10705         inttypes.h.
10706         * lib/xstrtoumax.c: Likewise.
10707         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
10708         __strtol and the like, so that this module is more like its siblings.
10709         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
10710         Remove; no longer needed now that we assume gnulib inttypes.h.
10711
10712 2006-10-08  Bruno Haible  <bruno@clisp.org>
10713
10714         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
10715         option.
10716
10717 2006-10-07  Jim Meyering  <jim@meyering.net>
10718
10719         * modules/inttypes (inttypes.h): Revert what seems to have been
10720         an inadvertent part of today's change: use "|", not "/" in the
10721         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
10722
10723 2006-10-07  Bruno Haible  <bruno@clisp.org>
10724
10725         * modules/sublist: New file.
10726
10727 2006-10-07  Bruno Haible  <bruno@clisp.org>
10728
10729         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
10730         * modules/argz (argz.h): Likewise.
10731         * modules/arpa_inet (arpa/inet.h): Likewise.
10732         * modules/byteswap (byteswap.h): Likewise.
10733         * modules/configmake (configmake.h): Likewise.
10734         * modules/fcntl (fcntl.h): Likewise.
10735         * modules/fnmatch (fnmatch.h): Likewise.
10736         * modules/getopt (getopt.h): Likewise.
10737         * modules/glob (glob.h): Likewise.
10738         * modules/inttypes (inttypes.h): Likewise.
10739         * modules/netinet_in (netinet/in.h): Likewise.
10740         * modules/poll (poll.h): Likewise.
10741         * modules/stdbool (stdbool.h): Likewise.
10742         * modules/stdint (stdint.h): Likewise.
10743         * modules/sys_select (sys/select.h): Likewise.
10744         * modules/sys_socket (sys/socket.h): Likewise.
10745         * modules/sys_stat (sys/stat.h): Likewise.
10746         * modules/sysexits (sysexits.h): Likewise.
10747         * modules/unistd (unistd.h): Likewise.
10748         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10749         Add a "DO NOT EDIT" comment to the generated file.
10750         (func_import): Likewise for gnulib-comp.m4.
10751
10752 2006-10-07  Bruno Haible  <bruno@clisp.org>
10753
10754         * lib/gl_sublist.h: New file.
10755         * lib/gl_sublist.c: New file.
10756
10757 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10758
10759         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
10760         name (relative to the original working directory) and the file
10761         name component (relative to the temporary working directory).  All
10762         callers changed.
10763         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
10764         * lib/mkdir-p.c (make_dir_parents): Likewise.
10765         * lib/mkdir-p.h (make_dir_parents): Likewise.
10766
10767 2006-10-06  Eric Blake  <ebb9@byu.net>
10768
10769         Define several macros for use by the clean-temp module.
10770         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
10771         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
10772         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
10773
10774         * lib/clean-temp.h (close_stream_temp): New declaration.
10775         * lib/clean-temp.c (includes): Pull in headers according to what
10776         other modules are in use.
10777         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
10778
10779 2006-10-06  Bruno Haible  <bruno@clisp.org>
10780
10781         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
10782         instead of fopen, fwriteerror.
10783
10784 2006-10-06  Bruno Haible  <bruno@clisp.org>
10785
10786         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
10787         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
10788         int.
10789         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
10790         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
10791         Return an error indicator.
10792         Suggested by Eric Blake.
10793
10794 2006-10-06  Bruno Haible  <bruno@clisp.org>
10795
10796         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
10797         Reported by Eric Blake.
10798
10799 2006-10-06  Bruno Haible  <bruno@clisp.org>
10800
10801         * modules/closeout (Description): Mention stderr too.
10802
10803 2006-10-06  Bruno Haible  <bruno@clisp.org>
10804         and Paul Eggert  <eggert@cs.ucla.edu>
10805
10806         * lib/closeout.c (close_stdout): Also close stderr.
10807         * lib/closeout.h: Update comment.
10808
10809 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10810
10811         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
10812         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
10813         * lib/dirchownmod.c: Include lchown.h.
10814         * lib/lchown.c: Don't include files that lchown.h now includes.
10815         Don't declare chown, since lchown.h now does that.
10816         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
10817         (lchown): Define to rpl_chown if lchown is declared but
10818         does not exist.  Declare using a prototype if lchown is not
10819         declared.  Add a copyright notice.
10820         * lib/mkstemp.h: Include <unistd.h>.
10821         * lib/openat.c: Include lchown.h.
10822
10823         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
10824         we now test for that separately.
10825         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
10826         rather than O_NOFOLLOW, when testing whether it's possible to
10827         avoid a race condition reliably.
10828         * lib/savewd.c (savewd_chdir): Likewise.
10829
10830         Remove macros that are no longer needed now that stdint.h is
10831         reliable.
10832         * lib/fsusage.c (UINTMAX_MAX): Remove.
10833         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
10834         * lib/utimecmp.c (SIZE_MAX): Remove.
10835
10836         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
10837
10838         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
10839         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
10840         O_NOATIME works.
10841
10842 2006-10-05  Bruno Haible  <bruno@clisp.org>
10843
10844         * lib/gl_list.h (gl_sortedlist_search_from_to,
10845         gl_sortedlist_indexof_from_to): New declarations.
10846         (gl_list_implementation): New fields sortedlist_search_from_to,
10847         sortedlist_indexof_from_to.
10848         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
10849         inline functions.
10850         * lib/gl_list.c (gl_sortedlist_search_from_to,
10851         gl_sortedlist_indexof_from_to): New functions.
10852         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
10853         function.
10854         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
10855         (gl_array_sortedlist_search_from_to): New function.
10856         (gl_array_list_implementation): Update.
10857         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
10858         function.
10859         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
10860         (gl_carray_sortedlist_search_from_to): New function.
10861         (gl_carray_list_implementation): Update.
10862         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
10863         gl_linked_sortedlist_indexof_from_to): New functions.
10864         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10865         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10866         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
10867         gl_tree_sortedlist_indexof_from_to): New functions.
10868         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10869         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10870         Update.
10871         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10872         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
10873         Update.
10874
10875 2006-10-05  Bruno Haible  <bruno@clisp.org>
10876
10877         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
10878         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
10879         (struct gl_list_implementation): Add fields search_from_to,
10880         indexof_from_to. Remove fields search, indexof.
10881         (gl_list_search): Use the search_from_to method.
10882         (gl_list_search_from, gl_list_search_from_to): New functions.
10883         (gl_list_indexof): Use the indexof_from_to method.
10884         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10885         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
10886         (gl_list_search_from, gl_list_search_from_to): New functions.
10887         (gl_list_indexof): Use the indexof_from_to method.
10888         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10889         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
10890         gl_array_indexof. Add start_index, end_index arguments.
10891         (gl_array_search_from_to): Renamed from gl_array_search. Add
10892         start_index, end_index arguments.
10893         (gl_array_remove, gl_array_list_implementation): Update.
10894         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
10895         gl_carray_indexof. Add start_index, end_index arguments.
10896         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
10897         start_index, end_index arguments.
10898         (gl_carray_remove, gl_carray_list_implementation): Update.
10899         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
10900         gl_linked_search. Add start_index, end_index arguments.
10901         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
10902         start_index, end_index arguments.
10903         (gl_linked_remove): Update.
10904         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10905         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10906         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
10907         field to 'size_t'.
10908         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
10909         gl_tree_search. Add start_index, end_index arguments.
10910         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10911         start_index, end_index arguments.
10912         (gl_tree_remove): Update.
10913         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10914         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10915         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
10916         function.
10917         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
10918         gl_tree_search. Add start_index, end_index arguments.
10919         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10920         start_index, end_index arguments.
10921         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10922         Update.
10923         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
10924
10925 2006-10-05  Bruno Haible  <bruno@clisp.org>
10926
10927         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
10928
10929         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
10930         fwriteerror_temp): New declarations.
10931         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
10932         (descriptors): New variable.
10933         (cleanup): First, close the descriptors.
10934         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
10935         fclose_temp, fwriteerror_temp): New functions.
10936
10937 2006-10-04  Jim Meyering  <jim@meyering.net>
10938
10939         * lib/fts.c (fts_open): Tiny comment change.
10940
10941 2006-10-04  Bruno Haible  <bruno@clisp.org>
10942
10943         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
10944         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
10945         gl_LOCK_BODY.
10946         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
10947         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
10948         gl_LOCK_EARLY_BODY.
10949         (gl_LOCK): Require gl_LOCK_BODY.
10950
10951 2006-10-04  Bruno Haible  <bruno@clisp.org>
10952
10953         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
10954         (gl_oset_search_atleast): New declaration.
10955         (struct gl_oset_implementation): Add field 'search_atleast'.
10956         (gl_oset_search_atleast): New inline function.
10957         * lib/gl_oset.c (gl_oset_search_atleast): New function.
10958         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
10959         (gl_array_oset_implementation): Update.
10960         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
10961         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
10962         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
10963
10964 2006-10-04  Bruno Haible  <bruno@clisp.org>
10965
10966         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
10967
10968 2006-10-03  Bruno Haible  <bruno@clisp.org>
10969
10970         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
10971         from gl_avltreehash_list_implementation.
10972
10973 2006-10-03  Bruno Haible  <bruno@clisp.org>
10974
10975         * lib/gl_oset.c (gl_oset_add): Fix return type.
10976
10977 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
10978
10979         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
10980
10981 2006-10-02  Eric Blake  <ebb9@byu.net>
10982
10983         * modules/strnlen (Depends-on): Add extensions.
10984
10985 2006-10-02  Eric Blake  <ebb9@byu.net>
10986
10987         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
10988         definition in 2.60+.
10989
10990 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
10991
10992         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
10993         checks.
10994
10995 2006-10-02  Bruno Haible  <bruno@clisp.org>
10996
10997         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
10998         to the AUTOMAKE_OPTIONS.
10999         Reported by Jim Meyering.
11000
11001 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11002
11003         Work around bug in Solaris 10 /proc file system:
11004         /proc/self/fd/NNN/.. isn't the parent directory of
11005         the directory whose file descriptor is NNN.  This needs to
11006         be worked around at run time, not compile time, since a
11007         program might be built on Solaris 8, where things work, and
11008         run on Solaris 10.
11009         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
11010         to use the following interface instead:
11011         (OPENAT_BUFFER_SIZE): New macro.
11012         (openat_proc_name): New function.
11013         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
11014         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
11015         Likewise.
11016         * lib/openat-proc.c: New file.
11017         * modules/openat (Files): Add lib/openat-proc.c.
11018         (Depends-on): Add same-inode, stdbool.
11019         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
11020
11021 2006-09-29  Bruno Haible  <bruno@clisp.org>
11022
11023         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
11024         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
11025         argument. Set stdout_closed before testing for ferror, not after.
11026         (fwriteerror, fwriteerror_no_ebadf): New functions.
11027
11028 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11029
11030         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
11031
11032 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
11033
11034         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
11035         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
11036
11037 2006-09-28  Jim Meyering  <jim@meyering.net>
11038
11039         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
11040         Include <unistd.h>.
11041
11042 2006-09-28  Bruno Haible  <bruno@clisp.org>
11043
11044         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
11045         * modules/linkedhash-list (Depends-on): Likewise.
11046         * modules/rbtreehash-list (Depends-on): Likewise.
11047
11048 2006-09-28  Bruno Haible  <bruno@clisp.org>
11049
11050         * lib/strndup.h: Simplify the redefinition of strndup.
11051         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
11052         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
11053
11054 2006-09-28  Bruno Haible  <bruno@clisp.org>
11055
11056         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
11057         * lib/gl_linkedhash_list.c: Likewise.
11058         * lib/gl_rbtreehash_list.c: Likewise.
11059
11060 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11061
11062         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
11063         getaddrinfo.
11064
11065         * lib/__fpending.h: Don't include <stdio_ext.h> unless
11066         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
11067         it causes <stdio_ext.h> to cause a compile-time error.
11068         Problem reported by Nelson H. F. Beebe.
11069         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
11070         of HAVE_DECL___PENDING.
11071
11072         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
11073         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
11074         declaration.
11075
11076 2006-09-27  Jim Meyering  <jim@meyering.net>
11077
11078         This file could end up with a definition for a function
11079         named __strndup, rather than rpl_strndup on a system with
11080         incomplete weak_alias support.
11081         * lib/strndup.c (strndup): Rename from __strndup.
11082         Remove #defines that used to map __strndup to strndup.
11083         Don't use K&R prototypes.
11084         Remove LIBC-related code, since this file is not sync'd with glibc.
11085         * lib/strndup.h: Revamp, accordingly.
11086         * m4/strndup.m4: Modernize.
11087
11088 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11089
11090         * modules/savewd (Depends-on): Add 'raise'.
11091         * lib/savewd.c: Include <signal.h>, for 'raise'.
11092
11093 2006-09-26  Jim Meyering  <jim@meyering.net>
11094
11095         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
11096         when we detect Darwin 8.7.0's acl_get_file bug.
11097         Rearrange to perform the new (below) run-test while $LIBS
11098         contains any acl-related library.  Set USE_ACL at the end.
11099         (gl_ACL_GET_FILE): New function.
11100
11101 2006-09-26  Eric Blake  <ebb9@byu.net>
11102
11103         * lib/verror.c: Include <config.h> unconditionally.
11104
11105 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
11106
11107         * modules/clock-time (Maintainer): Add self.
11108         * modules/getlogin_r (Depends-on): Add extensions.
11109
11110 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11111
11112         * modules/clock-time: New module.
11113         * modules/nanosleep (Depends-on): Add clock-time.
11114         * modules/gethrxtime (Depends-on): Likewise.
11115         * modules/gettime (Depends-on): Likewise.
11116         * modules/settime (Depends-on): Likewise.
11117
11118         * modules/fts-lgpl: Depend on openat.
11119         * modules/mkancesdirs: Depend on savewd.
11120         * modules/mkdir-p: Likewise.
11121
11122 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11123
11124         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
11125
11126         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
11127         `gl_have_arbitrary_file_name_length_limit' to
11128         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
11129         actually works between configure runs.
11130
11131 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11132             Bruno Haible  <bruno@clisp.org>
11133
11134         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
11135
11136 2006-09-25  Jim Meyering  <jim@meyering.net>
11137
11138         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
11139         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
11140
11141 2006-09-25  Eric Blake  <ebb9@byu.net>
11142
11143         * gnulib-tool (func_import, func_create_testdir): Fix typos in
11144         exec's in 2006-09-18 patch when shuffling fds.
11145
11146 2006-09-25  Bruno Haible  <bruno@clisp.org>
11147
11148         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
11149         Reported by Jim Meyering.
11150
11151 2006-09-24  Jim Meyering  <jim@meyering.net>
11152
11153         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
11154         compare a pointer against a literal "0".  That caused failures with
11155         at least HP-UX's hpcc.
11156
11157 2006-09-22  Simon Josefsson  <jas@extundo.com>
11158
11159         * modules/gc-sha1:
11160         * modules/gc-md4:
11161         * modules/gc-hmac-sha1:
11162         * modules/gc-hmac-md5:
11163         * modules/gc-des:
11164         * modules/gc-arcfour: Distribute more files.
11165
11166 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11167
11168         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
11169         (gl_linked_iterator_from_to): Initialize struct completely.
11170         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
11171         (gl_tree_iterator_from_to): Likewise
11172         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
11173         * lib/gl_array_list.c [lint] (gl_array_iterator)
11174         (gl_array_iterator_from_to): Likewise.
11175         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
11176         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
11177         (gl_carray_iterator_from_to): Likewise.
11178
11179         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
11180         * lib/md4.c (md4_process_block): Remove unused variable.
11181         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
11182         parentheses for clarity.
11183
11184 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11185
11186         * modules/bison-i18n (Depends-on): Add gettext.
11187
11188 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11189
11190         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
11191         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
11192         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
11193         also add missing comma that caused broken test.
11194         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
11195         stdlib.h, for `abort'.
11196         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
11197         variables.
11198         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
11199         include unistd.h if present, for `rmdir'.
11200         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
11201         variables.
11202         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
11203         in the process include standard headers for prototypes.
11204         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
11205         gets declared on GNU/Linux.
11206         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
11207         unistd.h, for `rmdir'.
11208         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
11209
11210         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
11211         always true.
11212         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
11213
11214         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
11215
11216 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11217
11218         * gnulib-tool (func_version): Create output all at once.  This
11219         may help avoid triggering unnecessary SIGPIPEs, and at any
11220         rate it doesn't hurt.
11221
11222 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11223             Bruno Haible  <bruno@clisp.org>
11224
11225         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
11226         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
11227         * m4/signed.m4 (bh_C_SIGNED): Likewise.
11228
11229         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
11230         (gl_FUNC_VASPRINTF): Invoke it.
11231
11232 2006-09-22  Bruno Haible  <bruno@clisp.org>
11233
11234         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
11235         getloadavg.c as first argument.
11236
11237 2006-09-22  Bruno Haible  <bruno@clisp.org>
11238
11239         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
11240         at the beginning of the gl_INIT macro.
11241         * modules/getloadavg (configure.ac): Pass $gl_source_base to
11242         gl_GETLOADAVG.
11243
11244 2006-09-22  Bruno Haible  <bruno@clisp.org>
11245
11246         * gnulib-tool (func_create_megatestdir): Don't include the config-h
11247         module.
11248         Suggested by Ralf Wildenhues.
11249
11250 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
11251
11252         Import this patch from libc:
11253
11254         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
11255
11256         * lib/regex_internal.c (re_string_reconstruct): Handle
11257         offset < pstr->valid_raw_len && pstr->offsets_needed case.
11258         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
11259         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
11260         re_string_context_at.
11261
11262         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
11263         now requires it.
11264         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
11265         gl_REGEX now does it for us.
11266         (gl_REGEX): Add test taken from
11267         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
11268
11269         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
11270         Check that large offsets work.  Modernize Autoconf usages.
11271         Prefer "yes" to mean a good thing rather than a bad.
11272         Don't put "#define mkstemp" in config.h, as this might interfere
11273         with standard system headers that "#define mkstemp mkstemp64".
11274
11275         * modules/mkstemp (Depends-on): Add extensions, so that
11276         mkstemp is visible on some platforms.
11277         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
11278         (Include): Change to "mkstemp.h" from <stdlib.h>.
11279         (Files): Add mkstemp.h.
11280
11281         * lib/mkstemp.h: New file, since some standard headers
11282         #define mkstemp.
11283         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
11284         Include "mkstemp.h".
11285         Make the _LIBC code resemble glibc original more,
11286         e.g., use K&R style.
11287         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
11288         (mkstemp): Remove, since mkstemp.h does this for us.
11289         * lib/stdlib--.h: Include mkstemp.h.
11290
11291         Import this patch from libc:
11292
11293         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11294
11295         * lib/tempname.c (__gen_tempname): Change attempts_min
11296         into a macro.  Use preprocessor to decide how to initialize
11297         attempts [Coverity CID 67].
11298
11299 2006-09-20  Bruno Haible  <bruno@clisp.org>
11300
11301         * lib/mkdtemp.c: Import from libc.
11302         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11303                 * sysdeps/posix/tempname.c (__gen_tempname): Change
11304                 attempts_min into a macro.  Use preprocessor to decide how to
11305                 initialize attempts [Coverity CID 67].
11306         2001-11-27  Paul Eggert  <eggert@twinsun.com>
11307                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
11308                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
11309
11310 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11311
11312         * gnulib-tool (func_exit): New function, to allow to pass the
11313         exit status portably through the trap.  Use everywhere.
11314         (--help, --version): Signal a write error.
11315         (trap): catch SIGPIPE, for write errors.
11316         Exit at the end of the trap, with the correct exit status.
11317
11318 2006-09-19  Karl Berry  <karl@gnu.org>
11319
11320         * doc/gnulib.texi: note about the license texinfo files.
11321
11322 2006-09-19  Eric Blake  <ebb9@byu.net>
11323
11324         * gnulib-tool: Avoid space-tab.
11325
11326 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11327
11328         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
11329         that prevented coreutils 6.1 from building.  Problem reported
11330         by Petter Reinholdtsen.
11331
11332 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11333
11334         * gnulib-tool (avoidlist): Fix typo that broke options like
11335         --avoid=lock that are used by coreutils bootstrap.
11336
11337 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
11338
11339         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
11340         more systematically.
11341
11342 2006-09-18  Jim Meyering  <jim@meyering.net>
11343
11344         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
11345
11346 2006-09-18  Bruno Haible  <bruno@clisp.org>
11347
11348         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
11349
11350 2006-09-18  Bruno Haible  <bruno@clisp.org>
11351
11352         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
11353         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
11354         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
11355         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
11356         * m4/gettext.m4: Require autoconf >= 2.52.
11357         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
11358         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
11359         of gl_cv_header_inttypes_h.
11360
11361 2006-09-18  Bruno Haible  <bruno@clisp.org>
11362
11363         * lib/javaversion.c: Include configmake.h.
11364
11365 2006-09-18  Bruno Haible  <bruno@clisp.org>
11366
11367         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
11368         avoid that the while loops be executed in a subshell.
11369
11370 2006-09-18  Bruno Haible  <bruno@clisp.org>
11371
11372         * MODULES.html.sh (func_module): Break long lines.
11373         Suggested by Bruce Korb <bkorb@gnu.org>.
11374
11375 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11376
11377         Speed up by a factor of 1.12.
11378         * gnulib-tool (nl): New variable.
11379         (func_import): Rewrite include directive extraction to only read each
11380         directive once.
11381
11382 2006-09-17  Bruno Haible  <bruno@clisp.org>
11383
11384         * modules/javaversion (Makefile.am): Remove DEFS setting.
11385         (Depends-on): Add configmake, for PKGDATADIR definition.
11386
11387 2006-09-17  Bruno Haible  <bruno@clisp.org>
11388
11389         * gnulib-tool (func_create_testdir): Rewrite all files at once.
11390
11391 2006-09-17  Bruno Haible  <bruno@clisp.org>
11392
11393         * gnulib-tool (func_append): New function, stolen from libtool.m4.
11394         (func_modules_transitive_closure, func_modules_add_dummy,
11395         func_modules_to_filelist, func_import, func_create_testdir,
11396         func_create_megatestdir, ...): Use it wherever possible.
11397         Suggested by Ralf Wildenhues.
11398
11399 2006-09-16  Karl Berry  <karl@gnu.org>
11400
11401         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
11402         to avoid sectioning errors.
11403         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
11404         [ifinfo]: blank line after @center-ed titles.
11405         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
11406         Spell FSF address consistently with others.
11407         (These changes approved by rms.)
11408
11409 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11410
11411         Speed up by a factor of 1.61.
11412         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
11413         already checked module names again.
11414
11415 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11416
11417         Speed up by a factor of 1.13.
11418         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
11419         for new_files, and the input to func_add_or_update.
11420
11421 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11422
11423         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
11424         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
11425
11426 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11427
11428         * modules/mkancesdirs (Depends-on): Add fcntl.
11429         * modules/savewd: New file.
11430         * MODULES.html.sh (File system functions): Add savewd.
11431
11432         * modules/configmake (Makefile.am): Add support for the
11433         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
11434
11435 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11436
11437         * m4/savewd.m4: New file.
11438
11439 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11440
11441         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
11442         (dirchownmod): New arg FD.  All callers changed.
11443         Use FD rather than opening the directory ourself, as opening is
11444         now the caller's responsibility.
11445         * lib/dirchownmod.h: Likewise.
11446         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
11447         hosts that require <sys/types.h> before <sys/stat.h>.  Include
11448         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
11449         (test_dir): Remove.
11450         (mkancesdirs): Return length of prefix of FILE that has already
11451         been made, or -2 if there is a child doing the work.  Redo
11452         algorithm so that it is O(N) rather than O(N**2).  Optimize away
11453         ".", and treat ".." specially since it might stray back into
11454         already-created areas.  Use a subprocess if necessary.  New arg
11455         WD; all users changed.  MAKE_DIR function should now return 1
11456         if it creates a directory that is not readable.  Return -2 if
11457         a child process is spun off.
11458         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
11459         Adjust signature to match code.
11460         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
11461         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
11462         all users changed.
11463         * lib/savewd.c, lib/savewd.h: New files.
11464
11465 2006-09-15  Jim Meyering  <jim@meyering.net>
11466
11467         * modules/rename-dest-slash: New module.
11468         * MODULES.html.sh (posix_compat): Add it here.
11469
11470         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
11471
11472 2006-09-15  Jim Meyering  <jim@meyering.net>
11473
11474         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
11475         file.
11476
11477         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
11478
11479 2006-09-15  Jim Meyering  <jim@meyering.net>
11480
11481         * lib/rename-dest-slash.c (has_trailing_slash): Use
11482         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
11483         (rpl_rename_dest_slash): Perform the cheaper trailing slash
11484         test before testing whether SRC is a directory.
11485         Suggestions from Bruno Haible.
11486
11487         Avoid a warning about an unused variable.
11488         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
11489         into the #ifdef block where it's used.
11490
11491         * lib/rename-dest-slash.c: New file.
11492
11493 2006-09-14  Bruno Haible  <bruno@clisp.org>
11494
11495         * lib/allocsa.c: Include <config.h> unconditionally.
11496         * lib/asnprintf.c: Likewise.
11497         * lib/asprintf.c: Likewise.
11498         * lib/c-strcasecmp.c: Likewise.
11499         * lib/c-strcasestr.c: Likewise.
11500         * lib/c-strncasecmp.c: Likewise.
11501         * lib/c-strstr.c: Likewise.
11502         * lib/classpath.c: Likewise.
11503         * lib/clean-temp.c: Likewise.
11504         * lib/concatpath.c: Likewise.
11505         * lib/copy-file.c: Likewise.
11506         * lib/csharpcomp.c: Likewise.
11507         * lib/csharpexec.c: Likewise.
11508         * lib/execute.c: Likewise.
11509         * lib/fatal-signal.c: Likewise.
11510         * lib/findprog.c: Likewise.
11511         * lib/fwriteerror.c: Likewise.
11512         * lib/gl_array_list.c: Likewise.
11513         * lib/gl_array_oset.c: Likewise.
11514         * lib/gl_avltree_list.c: Likewise.
11515         * lib/gl_avltree_oset.c: Likewise.
11516         * lib/gl_avltreehash_list.c: Likewise.
11517         * lib/gl_carray_list.c: Likewise.
11518         * lib/gl_linked_list.c: Likewise.
11519         * lib/gl_linkedhash_list.c: Likewise.
11520         * lib/gl_list.c: Likewise.
11521         * lib/gl_oset.c: Likewise.
11522         * lib/gl_rbtree_list.c: Likewise.
11523         * lib/gl_rbtree_oset.c: Likewise.
11524         * lib/gl_rbtreehash_list.c: Likewise.
11525         * lib/imaxabs.c: Likewise.
11526         * lib/imaxdiv.c: Likewise.
11527         * lib/javacomp.c: Likewise.
11528         * lib/javaexec.c: Likewise.
11529         * lib/javaversion.c: Likewise.
11530         * lib/linebreak.c: Likewise.
11531         * lib/localcharset.c: Likewise.
11532         * lib/lock.c: Likewise.
11533         * lib/mbchar.c: Likewise.
11534         * lib/mbswidth.c: Likewise.
11535         * lib/mkdtemp.c: Likewise.
11536         * lib/pipe.c: Likewise.
11537         * lib/printf-args.c: Likewise.
11538         * lib/printf-parse.c: Likewise.
11539         * lib/progname.c: Likewise.
11540         * lib/progreloc.c: Likewise.
11541         * lib/readlink.c: Likewise.
11542         * lib/sh-quote.c: Likewise.
11543         * lib/stpcpy.c: Likewise.
11544         * lib/stpncpy.c: Likewise.
11545         * lib/strcasecmp.c: Likewise.
11546         * lib/strcasestr.c: Likewise.
11547         * lib/strcspn.c: Likewise.
11548         * lib/striconv.c: Likewise.
11549         * lib/strncasecmp.c: Likewise.
11550         * lib/strnlen1.c: Likewise.
11551         * lib/strstr.c: Likewise.
11552         * lib/strtok_r.c: Likewise.
11553         * lib/tls.c: Likewise.
11554         * lib/tmpdir.c: Likewise.
11555         * lib/unicodeio.c: Likewise.
11556         * lib/unsetenv.c: Likewise.
11557         * lib/vasnprintf.c: Likewise.
11558         * lib/vasprintf.c: Likewise.
11559         * lib/wait-process.c: Likewise.
11560         * lib/xallocsa.c: Likewise.
11561         * lib/xsetenv.c: Likewise.
11562         * lib/xstriconv.c: Likewise.
11563
11564 2006-09-13  Simon Josefsson  <jas@extundo.com>
11565
11566         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
11567         that internally, suggested by Ralf Wildenhues
11568         <Ralf.Wildenhues@gmx.de>.
11569
11570 2006-09-13  Simon Josefsson  <jas@extundo.com>
11571
11572         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
11573         @LIBOBJS@.
11574         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11575
11576 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
11577
11578         * lib/_fpending.c: Include <config.h> unconditionally, since we no
11579         longer worry about uses that don't define HAVE_CONFIG_H.
11580         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
11581         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
11582         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
11583         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
11584         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
11585         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
11586         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
11587         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
11588         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
11589         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
11590         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
11591         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
11592         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
11593         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
11594         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
11595         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
11596         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
11597         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
11598         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
11599         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
11600         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
11601         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
11602         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
11603         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
11604         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
11605         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
11606         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
11607         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
11608         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
11609         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
11610         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
11611         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
11612         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
11613         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
11614         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
11615         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
11616         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
11617         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
11618         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
11619         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
11620         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
11621         Likewise.
11622
11623 2006-09-13  Eric Blake  <ebb9@byu.net>
11624
11625         * lib/getopt.c: Fix typo in last commit.
11626
11627 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11628
11629         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
11630         dgettext.
11631
11632 2006-09-12  Jim Meyering  <jim@meyering.net>
11633
11634         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
11635         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
11636         Reported by Nelson H. F. Beebe.
11637
11638 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11639
11640         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
11641         program_invocation_name and program_invocation_short_name are
11642         initialized.
11643         * lib/argp-namefrob.h: Move declarations of program_invocation_name
11644         and program_invocation_short_name to argp.h, so they are visible
11645         to user programs.
11646         * lib/argp.h: Likewise
11647
11648 2006-09-10  Bruno Haible  <bruno@clisp.org>
11649
11650         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11651         m4/inttypes_h.m4, m4/uintmax_t.m4.
11652
11653 2006-09-10  Bruno Haible  <bruno@clisp.org>
11654
11655         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
11656         gl_AC_TYPE_UINTMAX_T.
11657
11658 2006-09-10  Bruno Haible  <bruno@clisp.org>
11659
11660         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
11661
11662 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11663
11664         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
11665         convention.  Text proposed by Bruno Haible.
11666         (struct argp_option): Document the use of N_() wrappers.
11667
11668         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
11669         '\v', and translate the two parts separately, instead of feeding
11670         the whole string to gettext.  This allows to exclude
11671         '\v' from the strings visible to the translator by writing doc
11672         strings as N_("..") "\v" N_("..").
11673
11674 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
11675
11676         * config/srclist.txt: Undo latest change; the bug was fixed.
11677
11678 2006-09-09  Bruno Haible  <bruno@clisp.org>
11679
11680         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
11681         assignments if building a library without libtool.
11682         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
11683         in func_emit_lib_Makefile_am.
11684         (func_import): When building a static library libfoo.a, arrange to
11685         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
11686         (func_create_testdir): Likewise.
11687         * modules/gc (configure.ac, Makefile.am): If building statically,
11688         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
11689         * modules/iconvme (configure.ac, Makefile.am): Likewise.
11690         * modules/striconv (configure.ac, Makefile.am): Likewise.
11691         Based on a suggestion by Ralf Wildenhues.
11692
11693 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11694
11695         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
11696         Check for unistd.h too, since Autoconf doesn't assume POSIX.
11697         Also:
11698
11699         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11700         Add year_2050_test to catch glibc bug 2821
11701         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11702
11703         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11704         Prefer #ifdef to #if.
11705
11706         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
11707         Return from 'main' instead of calling 'exit'.
11708
11709 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11710
11711         * lib/mktime.c (guess_time_tm): Fix bug where mktime
11712         returned the maximum time_t value rather than (time_t) -1.
11713         Problem originally reported by William Bardwell
11714         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11715
11716         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11717         Moved to here ...
11718         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11719         ... from here.
11720
11721 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11722
11723         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
11724         2821 is fixed.
11725
11726 2006-09-08  Jim Meyering  <jim@meyering.net>
11727
11728         Don't make generated files read-only.  That would bother too many
11729         people.  However, do retain the ability to work when targets are
11730         read-only: remove the destination and temporary files before writing
11731         them (when generated via sed or echo), or by using the -f option for
11732         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
11733         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11734         * modules/byteswap, modules/configmake, modules/fcntl:
11735         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11736         * modules/localcharset, modules/netinet_in, modules/poll:
11737         * modules/stdbool, modules/stdint, modules/sys_select:
11738         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11739
11740 2006-09-08  Jim Meyering  <jim@meyering.net>
11741
11742         Avoid new build failure on FreeBSD 6.0.
11743         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
11744         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
11745         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
11746
11747 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11748
11749         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
11750
11751 2006-09-07  Jim Meyering  <jim@meyering.net>
11752
11753         Fix global typo in last change: use chmod u-w, not chmod u-x.
11754         Spotted by Paul Eggert and Bruce Korb.
11755         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11756         * modules/byteswap, modules/configmake, modules/fcntl:
11757         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11758         * modules/localcharset, modules/netinet_in, modules/poll:
11759         * modules/stdbool, modules/stdint, modules/sys_select:
11760         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11761
11762 2006-09-06  Jim Meyering  <jim@meyering.net>
11763
11764         Make generated files be read-only.
11765         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
11766         Ensure that each generated file is now read-only.
11767         * modules/argz: Likewise.
11768         * modules/arpa_inet: Likewise.
11769         * modules/byteswap: Likewise.
11770         * modules/configmake: Likewise.
11771         * modules/fcntl: Likewise.
11772         * modules/fnmatch: Likewise.
11773         * modules/getopt: Likewise.
11774         * modules/glob: Likewise.
11775         * modules/inttypes: Likewise.
11776         * modules/netinet_in: Likewise.
11777         * modules/poll: Likewise.
11778         * modules/stdbool: Likewise.
11779         * modules/stdint: Likewise.
11780         * modules/sys_select: Likewise.
11781         * modules/sys_socket: Likewise.
11782         * modules/sys_stat: Likewise.
11783         * modules/sysexits: Likewise.
11784         * modules/localcharset: Same as above, but continue using temporary
11785         file named "t-$@" (why different?) rather than the "$@-t" used
11786         everywhere else.
11787
11788         * modules/sysexits (Makefile.am): Replace literal occurrences
11789         of "sysexit.h" more readable, and more consistent, "$@".
11790
11791 2006-09-06  Bruno Haible  <bruno@clisp.org>
11792
11793         * modules/striconv: New file.
11794         * modules/xstriconv: New file.
11795         * MODULES.html.sh (Internationalization functions): Add striconv,
11796         xstriconv.
11797
11798 2006-09-06  Bruno Haible  <bruno@clisp.org>
11799
11800         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
11801         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
11802         not using libtool correctly.
11803
11804 2006-09-06  Bruno Haible  <bruno@clisp.org>
11805
11806         * lib/striconv.h: New file.
11807         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
11808         iconvstring.c.
11809         * lib/xstriconv.h: New file.
11810         * lib/xstriconv.c: New file.
11811
11812 2006-09-06  Bruno Haible  <bruno@clisp.org>
11813
11814         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
11815         lib_..._LDFLAGS.
11816
11817 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11818
11819         * lib/argz_.h: Sync from Libtool.
11820
11821         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
11822                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11823
11824         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
11825
11826 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11827
11828         * modules/trim: New file.
11829
11830 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11831
11832         * lib/trim.h: New file.
11833         * lib/trim.c: New file.
11834
11835 2006-09-05  Bruno Haible  <bruno@clisp.org>
11836
11837         * MODULES.html.sh (String handling): Add trim.
11838
11839 2006-09-04  Karl Berry  <karl@gnu.org>
11840
11841         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
11842         until next release.
11843
11844 2006-09-03  Bruno Haible  <bruno@clisp.org>
11845
11846         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
11847         correctly.
11848
11849 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11850
11851         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
11852         not gl_GETLOADAVG.  Omit unneeded semicolons.
11853         Problems reported by Ralf Wildenhues in
11854         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11855         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
11856         at the end, which is the usual gnulib style.
11857
11858         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
11859         of doing all the work ourselves.
11860         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
11861         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
11862
11863 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11864
11865         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
11866         Problem reported by Ralf Wildenhues in
11867         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11868
11869         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
11870         HAVE_STRUCT_STATFS_F_FSTYPENAME.
11871
11872 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11873
11874         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
11875         yesterday's patch by changing test -n to test -z.
11876
11877 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11878
11879         * modules/getloadavg (Files): Add m4/getloadavg.m4.
11880         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
11881         the former is now obsolescent.
11882
11883         * modules/chdir-long (Depends-on): Add fcntl.
11884
11885 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11886
11887         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
11888         obsolescent, and programs should use gnulib instead.
11889         * m4/getloadavg.m4: New file, with contents taken from Autoconf
11890         but with prefixes changed.
11891
11892 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11893
11894         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
11895         or stdbool.h, because they might not exist while configuring.
11896
11897         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
11898         Don't include unistd.h or limits.h; not needed, since chdir-long.h
11899         does that for us.
11900         (O_DIRECTORY): Remove.
11901
11902 2006-08-31  Eric Blake  <ebb9@byu.net>
11903
11904         * gnulib-tool: Don't let emacs change spaces to TAB.
11905
11906 2006-08-31  Bruno Haible  <bruno@clisp.org>
11907
11908         * gnulib-tool: When calling func_import more than once, do it in a
11909         subshell.
11910         Reported by Eric Blake <ebb9@byu.net>.
11911
11912 2006-08-31  Bruno Haible  <bruno@clisp.org>
11913
11914         * gnulib-tool (nl): Remove variable.
11915         (sed_transform_lib_file): Use more robust test for config-h module.
11916         (func_import): Fix typo in 2006-08-25 patch.
11917
11918 2006-08-31  Bruno Haible  <bruno@clisp.org>
11919
11920         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
11921         specified, augment Makefile.am variables instead of assigning them.
11922
11923 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11924
11925         Work around a bug in both the Linux and SunOS 64-bit kernels:
11926         nanosleep mishandles sleeps for longer than 2**31 seconds.
11927         Problem reported by Frank v Waveren in
11928         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11929         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
11930         Check for nanosleep bug.
11931         (LIB_NANOSLEEP): Append clock_gettime library if needed.
11932
11933 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11934
11935         Work around a bug in both the Linux and SunOS 64-bit kernels:
11936         nanosleep mishandles sleeps for longer than 2**31 seconds.
11937         Problem reported by Frank v Waveren in
11938         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11939         * lib/nanosleep.c (BILLION): New constant.
11940         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
11941         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
11942         implementation.
11943
11944 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11945
11946         * modules/nanosleep (Depends-on): Add gettime.
11947
11948 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11949         and Simon Josefsson  <jas@extundo.com>
11950         and Oskar Liljeblad  <oskar@osk.mine.nu>
11951
11952         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
11953         * gnulib-tool (func_import): New license type 'unmodifiable license
11954         text'.
11955         * modules/fdl: Use it.  Longer description.
11956         * module/gpl, module/lgpl: New files.
11957
11958 2006-08-30  Jim Meyering  <jim@meyering.net>
11959
11960         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
11961         shadowing the parameter.
11962
11963 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11964
11965         Sync from Libtool:
11966
11967         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11968
11969         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
11970         sharing with gnulib.  Report by Eric Blake.
11971
11972 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11973
11974         * modules/isapipe: New file.
11975         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
11976
11977 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11978
11979         * modules/configmake (Makefile.am): Add a comment, and omit
11980         the CONFIGMAKE_ prefix from generated macro names.  Suggested
11981         by Bruno Haible.
11982
11983 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11984
11985         * m4/isapipe.m4: New file.
11986
11987 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11988
11989         * lib/isapipe.c, lib/isapipe.h: New files.
11990
11991 2006-08-29  Jim Meyering  <jim@meyering.net>
11992
11993         * modules/configmake (Makefile.am): Make configmake.h depend on
11994         Makefile.  Otherwise, a stale configmake.h could hang around.
11995
11996 2006-08-29  Eric Blake  <ebb9@byu.net>
11997
11998         * lib/error.c (error_at_line, print_errno_message): Match libc, after
11999         resolution of upstream bug 3044.
12000
12001 2006-08-29  Bruno Haible  <bruno@clisp.org>
12002
12003         * modules/localcharset (Depends-on): Add configmake.
12004         (Makefile.am): Remove setting of LIBDIR through DEFS.
12005
12006 2006-08-29  Bruno Haible  <bruno@clisp.org>
12007
12008         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
12009         defined.
12010
12011 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12012
12013         * modules/fcntl: New file.
12014         * modules/chdir-safer (Depends-on): Add fcntl.
12015         * modules/fts: Likewise.
12016         * modules/mkdir-p: Likewise.
12017
12018         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
12019         This undoes the most recent change, since we're now addressing the
12020         problem in a different way.
12021
12022         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
12023         into output, since the output might be called Makefile.am even
12024         if $makefile_name is something different.
12025         (func_import): Use $makefile_am rather than
12026         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
12027         empty.
12028
12029         * modules/inttypes (Files): Add m4/inttypes-h.m4.
12030
12031 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12032
12033         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
12034         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
12035         recent change to stdint.m4, since we're now addressing the problem in a
12036         different way.
12037
12038 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12039
12040         * m4/fcntl_h.m4: New file.
12041
12042 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12043
12044         * lib/fcntl_.h: New file.
12045         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
12046         the fcntl module.
12047         * lib/dirchownmod.c: Likewise.
12048         * lib/fts.c: Likewise.
12049
12050         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
12051         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
12052         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
12053         just before including <inttypes.h>, to avoid circular inclusion.
12054
12055 2006-08-28  Jim Meyering  <jim@meyering.net>
12056
12057         * doc/visibility.texi: Actually read and correct the grammar of the
12058         sentence affected by yesterday's change.
12059
12060 2006-08-28  Eric Blake  <ebb9@byu.net>
12061
12062         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
12063         needs wrapper.
12064
12065 2006-08-28  Eric Blake  <ebb9@byu.net>
12066
12067         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
12068
12069 2006-08-28  Eric Blake  <ebb9@byu.net>
12070
12071         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
12072
12073 2006-08-28  Bruno Haible  <bruno@clisp.org>
12074
12075         * modules/c-strstr: New file, from GNU gettext.
12076         * MODULES.html.sh (String handling): Add c-strstr.
12077
12078 2006-08-28  Bruno Haible  <bruno@clisp.org>
12079
12080         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
12081         macros.
12082         Reported by Eric Blake.
12083
12084 2006-08-28  Bruno Haible  <bruno@clisp.org>
12085
12086         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
12087         (VASNPRINTF): Return a string of length > INT_MAX without failing.
12088         * lib/vasprintf.c: Include errno.h, limits.h.
12089         (EOVERFLOW): New fallback definition.
12090         (vasprintf): Test here whether the string length is > INT_MAX.
12091         * lib/vsnprintf.c: Include errno.h, limits.h.
12092         (EOVERFLOW): New fallback definition.
12093         (vsnprintf): Fix bug when generated string was too long for the buffer.
12094         Test here whether the string length is > INT_MAX.
12095
12096 2006-08-28  Bruno Haible  <bruno@clisp.org>
12097
12098         * lib/inttypes_.h (SCNX*): Remove definitions.
12099         Reported by Eric Blake.
12100
12101 2006-08-28  Bruno Haible  <bruno@clisp.org>
12102
12103         * lib/c-strstr.h: New file, from GNU gettext.
12104         * lib/c-strstr.c: New file, from GNU gettext.
12105
12106 2006-08-28  Bruno Haible  <bruno@clisp.org>
12107
12108         * gnulib-tool: Reorder some statements.
12109
12110 2006-08-28  Bruno Haible  <bruno@clisp.org>
12111
12112         * gnulib-tool: New option --makefile-name.
12113         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
12114         $makefile_name.
12115         (func_import): Write $makefile_name to the cache file, and read it from
12116         there unless explicitly specified. Use $makefile_name as file name
12117         instead of Makefile.am. Adjust the recommendations accordingly.
12118
12119 2006-08-28  Bruno Haible  <bruno@clisp.org>
12120
12121         * gnulib-tool (func_verify_module): Check against misapplying patch.
12122
12123 2006-08-28  Bruno Haible  <bruno@clisp.org>
12124
12125         * gnulib-tool (func_relativize, func_relconcat): New functions.
12126         Give an error if --local-dir is given with --update.
12127         Remove trailing slashes from $local_gnulib_dir.
12128         (func_import): Store the relativized $local_gnulib_dir in
12129         gnulib-cache.m4, and read it from there if not specified explicitly.
12130
12131 2006-08-28  Bruno Haible  <bruno@clisp.org>
12132
12133         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
12134         is the current directory. Respect also $local_gnulib_dir.
12135
12136 2006-08-28  Bruno Haible  <bruno@clisp.org>
12137             Simon Josefsson  <jas@extundo.com>
12138
12139         BeOS portability.
12140         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
12141
12142 2006-08-27  Jim Meyering  <jim@meyering.net>
12143
12144         * doc/visibility.texi: Remove duplicate word: "pointer".
12145
12146 2006-08-26  Bruno Haible  <bruno@clisp.org>
12147
12148         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
12149         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
12150         (Makefile.am): Create inttypes.h from inttypes_.h.
12151         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
12152
12153         * modules/imaxabs: New file.
12154
12155         * modules/imaxdiv: New file.
12156
12157 2006-08-26  Bruno Haible  <bruno@clisp.org>
12158
12159         * m4/inttypes.m4: New file.
12160         * m4/_inttypes_h.m4: Remove file.
12161         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
12162         PRI_MACROS_BROKEN.
12163         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
12164
12165         * m4/imaxabs.m4: New file.
12166
12167         * m4/imaxdiv.m4: New file.
12168
12169 2006-08-26  Bruno Haible  <bruno@clisp.org>
12170
12171         * lib/inttypes_.h: New file.
12172         * lib/inttypes.h: Remove file.
12173         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
12174
12175         * lib/imaxabs.c: New file.
12176
12177         * lib/imaxdiv.c: New file.
12178
12179 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12180
12181         New config-h module, so that "make" output needn't be cluttered
12182         by -DHAVE_CONFIG_H.
12183         * MODULES.html.sh (Support for building libraries and executables):
12184         Add config-h.
12185         * modules/config-h: New file.
12186         * gnulib-tool (nl, sed_transform_lib_file): New vars.
12187         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
12188         the config-h module is used.
12189
12190         New configmake module, so that "make" output needn't be cluttered
12191         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
12192         * MODULES.html.sh (Support for building libraries and executables):
12193         Add configmake.
12194         * modules/configmake: New file.
12195
12196 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12197
12198         * m4/config-h.m4: New file.
12199
12200 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12201
12202         * config/srclist.txt: Add elisp-comp.
12203
12204 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12205
12206         * MODULES.html.sh (Support for building libraries and executables):
12207         Add elisp-comp.
12208         * build-aux/elisp-comp: New file.
12209         * modules/elisp-comp: New file.
12210
12211 2006-08-24  Bruno Haible  <bruno@clisp.org>
12212
12213         * gnulib-tool (func_create_testdir): Use non-default values of
12214         sourcebase and m4base.
12215
12216 2006-08-24  Bruno Haible  <bruno@clisp.org>
12217
12218         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
12219         HTML structure.
12220
12221 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12222
12223         * modules/openat (Depends-on): Add lchown.
12224
12225 2006-08-23  Bruno Haible  <bruno@clisp.org>
12226
12227         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
12228         of gl_LOCK_EARLY instead of gl_LOCK.
12229
12230 2006-08-23  Bruno Haible  <bruno@clisp.org>
12231
12232         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
12233         on OSF/1 to no.
12234         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
12235
12236 2006-08-23  Bruno Haible  <bruno@clisp.org>
12237
12238         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
12239         as unusable.
12240
12241         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
12242         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
12243         (gl_LOCK): New macro.
12244
12245 2006-08-22  Simon Josefsson  <jas@extundo.com>
12246
12247         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
12248         to md5 module.
12249
12250 2006-08-22  Simon Josefsson  <jas@extundo.com>
12251
12252         * MODULES.html.sh: Add "Support for maintaining and release
12253         projects".
12254
12255         * build-aux/gnupload: New file, from coreutils.
12256
12257 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12258
12259         Avoid the need for AC_LIBSOURCES in m4 macros.
12260         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
12261         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
12262         * modules/check-version (EXTRA_DIST): Add check-version.h.
12263         * modules/crc (EXTRA_DIST): Add crc.h.
12264         * modules/des (EXTRA_DIST): Add des.h.
12265         * modules/gc (EXTRA_DIST): Add gc.h.
12266         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
12267         * modules/getline (EXTRA_DIST): Add getline.h.
12268         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
12269         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
12270         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
12271         * modules/md2 (EXTRA_DIST): Add md2.h.
12272         * modules/md4 (EXTRA_DIST): Add md4.h.
12273         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
12274         * modules/read-file (EXTRA_DIST): Add read-file.h.
12275         * modules/readline (EXTRA_DIST): Add readline.h.
12276         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
12277         rijndael-api-fst.h.
12278
12279 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12280
12281         * m4/rijndael.m4 (gl_ARCFOUR):
12282         * m4/arctwo.m4 (gl_ARCTWO):
12283         * m4/check-version.m4 (gl_CHECK_VERSION):
12284         * m4/crc.m4 (gl_CRC):
12285         * m4/des.m4 (gl_DES):
12286         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
12287         * m4/gc.m4 (gl_GC):
12288         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
12289         * m4/getline.m4 (gl_FUNC_GETLINE):
12290         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
12291         * m4/hmac-md5.m4 (gl_HMAC_MD5):
12292         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
12293         * m4/md2.m4 (gl_MD2):
12294         * m4/md4.m4 (gl_MD4):
12295         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
12296         * m4/read-file.m4 (gl_FUNC_READ_FILE):
12297         * m4/readline.m4 (gl_FUNC_READLINE):
12298         * m4/rijndael.m4 (gl_RIJNDAEL):
12299         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12300         to get the necessary .h files and whatnot.
12301
12302 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12303
12304         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
12305         gnulib rather than the other way around.
12306         * config/srclistvars.sh (COREUTILS): Remove.
12307
12308 2006-08-22  Jim Meyering  <jim@meyering.net>
12309
12310         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
12311
12312         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
12313
12314 2006-08-22  Eric Blake  <ebb9@byu.net>
12315
12316         * modules/regexprops-generic: New file.
12317         * MODULES.html.sh (Support for building documentation): List it.
12318
12319 2006-08-22  Eric Blake  <ebb9@byu.net>
12320
12321         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
12322         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
12323         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
12324         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
12325
12326 2006-08-22  Bruno Haible  <bruno@clisp.org>
12327
12328         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
12329         and lib_LTLIBRARIES like the other lib_* variables.
12330
12331 2006-08-22  Bruno Haible  <bruno@clisp.org>
12332
12333         * build-aux/x-to-1.in: New file, from GNU gettext.
12334
12335 2006-08-22  Bruno Haible  <bruno@clisp.org>
12336
12337         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
12338         <utmpx.h> exists.
12339
12340 2006-08-22  Bruno Haible  <bruno@clisp.org>
12341
12342         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
12343         <utmpx.h> exists.
12344
12345 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12346
12347         BeOS portability.
12348         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
12349         exist.
12350         Problem reported by Bruno Haible.
12351
12352 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12353
12354         Avoid the need for AC_LIBSOURCES in m4 macros.
12355         * modules/acl (EXTRA_DIST): Add acl.h.
12356         * modules/argmatch (Files): Add m4/argmatch.m4.
12357         (configure.ac): Add gl_ARGMATCH.
12358         (EXTRA_DIST): Renamed from lib_SOURCES, for
12359         consistency with the other modules.  Remove argmatch.c.
12360         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
12361         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
12362         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
12363         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
12364         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
12365         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
12366         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
12367         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
12368         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
12369         * modules/closeout (EXTRA_DIST): Add closeout.h.
12370         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
12371         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
12372         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
12373         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
12374         dirname.h; remove basename.c and stripslash.c.
12375         * modules/exclude (EXTRA_DIST): Add exclude.h.
12376         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
12377         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
12378         * modules/file-type (EXTRA_DIST): Add file-type.h.
12379         * modules/filemode (EXTRA_DIST): Add filemode.h.
12380         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
12381         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12382         * modules/fpending (EXTRA_DIST): Add __fpending.h.
12383         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
12384         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
12385         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
12386         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
12387         * modules/getdate (EXTRA_DIST): Add getdate.c.
12388         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
12389         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
12390         * modules/getpass (EXTRA_DIST): Add getpass.h.
12391         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
12392         * modules/group-member (EXTRA_DIST): Add group-member.h.
12393         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
12394         * modules/hash (EXTRA_DIST): Add hash.h.
12395         * modules/human (EXTRA_DIST): Add human.h.
12396         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
12397         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
12398         * modules/lchown (EXTRA_DIST): Add lchown.h.
12399         * modules/long-options (EXTRA_DIST): Add long-options.h.
12400         * modules/lstat (EXTRA_DIST): Add lstat.h.
12401         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
12402         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
12403         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
12404         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
12405         * modules/memxor (EXTRA_DIST): Add memxor.h.
12406         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
12407         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
12408         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
12409         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
12410         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
12411         * modules/physmem (EXTRA_DIST): Add physmem.h.
12412         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
12413         * modules/posixver (EXTRA_DIST): Add posixver.h.
12414         * modules/quote (EXTRA_DIST): Add quote.h.
12415         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
12416         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
12417         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
12418         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
12419         regex_internal.h regexec.c.
12420         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
12421         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
12422         * modules/same (EXTRA_DIST): Add same.h.
12423         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
12424         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
12425         * modules/savedir (EXTRA_DIST): Add savedir.h.
12426         * modules/sha1 (EXTRA_DIST): Add sha1.h.
12427         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
12428         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
12429         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
12430         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
12431         * modules/strdup (EXTRA_DIST): Add strdup.h.
12432         * modules/strftime (EXTRA_DIST): Add strftime.h.
12433         * modules/strndup (EXTRA_DIST): Add strndup.h.
12434         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
12435         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
12436         * modules/time_r (EXTRA_DIST): Add time_r.h.
12437         * modules/timespec (EXTRA_DIST): Add timespec.h.
12438         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12439         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
12440         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
12441         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
12442         * modules/userspec (EXTRA_DIST): Add userspec.h.
12443         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
12444         * modules/utimens (EXTRA_DIST): Add utimens.h.
12445         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
12446         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
12447         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
12448         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
12449         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
12450         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
12451         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
12452         * modules/yesno (EXTRA_DIST): Add yesno.h.
12453
12454 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12455
12456         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
12457
12458         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
12459         * m4/dev-ino.m4, same-inode.m4: Remove.
12460
12461         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
12462         * m4/acl.m4 (AC_FUNC_ACL):
12463         * m4/backupfile.m4 (gl_BACKUPFILE):
12464         * m4/c-strtod.m4 (gl_C99_STRTOLD):
12465         * m4/canon-host.m4 (gl_CANON_HOST):
12466         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
12467         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
12468         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
12469         * m4/cloexec.m4 (gl_CLOEXEC):
12470         * m4/close-stream.m4 (gl_CLOSE_STREAM):
12471         * m4/closeout.m4 (gl_CLOSEOUT):
12472         * m4/dirfd.m4 (gl_FUNC_DIRFD):
12473         * m4/dirname.m4 (gl_DIRNAME):
12474         * m4/exclude.m4 (gl_EXCLUDE):
12475         * m4/exitfail.m4 (gl_EXITFAIL):
12476         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
12477         * m4/file-type.m4 (gl_FILE_TYPE):
12478         * m4/filemode.m4 (gl_FILEMODE):
12479         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
12480         * m4/fpending.m4 (gl_FUNC_FPENDING):
12481         * m4/fprintftime.m4 (gl_FPRINTFTIME):
12482         * m4/fts.m4 (gl_FUNC_FTS):
12483         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
12484         * m4/getdate.m4 (gl_GETDATE):
12485         * m4/gethrxtime.m4 (gl_GETHRXTIME):
12486         * m4/getpagesize.m4 (gl_GETPAGESIZE):
12487         * m4/getpass.m4 (gl_FUNC_GETPASS):
12488         * m4/gettime.m4 (gl_GETTIME):
12489         * m4/getugroups.m4 (gl_GETUGROUPS):
12490         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
12491         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
12492         * m4/hard-locale.m4 (gl_HARD_LOCALE):
12493         * m4/hash.m4 (gl_HASH):
12494         * m4/idcache.m4 (gl_IDCACHE):
12495         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
12496         * m4/lchown.m4 (gl_FUNC_LCHOWN):
12497         * m4/long-options.m4 (gl_LONG_OPTIONS):
12498         * m4/lstat.m4 (gl_FUNC_LSTAT):
12499         * m4/md5.m4 (gl_MD5):
12500         * m4/memcasecmp.m4 (gl_MEMCASECMP):
12501         * m4/memcoll.m4 (gl_MEMCOLL):
12502         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
12503         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
12504         * m4/memxor.m4 (gl_MEMXOR):
12505         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
12506         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
12507         * m4/modechange.m4 (gl_MODECHANGE):
12508         * m4/mountlist.m4 (gl_MOUNTLIST):
12509         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
12510         * m4/openat.m4 (gl_FUNC_OPENAT):
12511         * m4/pathmax.m4 (gl_PATHMAX):
12512         * m4/physmem.m4 (gl_PHYSMEM):
12513         * m4/posixtm.m4 (gl_POSIXTM):
12514         * m4/posixver.m4 (gl_POSIXVER):
12515         * m4/quote.m4 (gl_QUOTE):
12516         * m4/quotearg.m4 (gl_QUOTEARG):
12517         * m4/readtokens.m4 (gl_READTOKENS):
12518         * m4/readutmp.m4 (gl_READUTMP):
12519         * m4/regex.m4 (gl_REGEX):
12520         * m4/safe-read.m4 (gl_SAFE_READ):
12521         * m4/safe-write.m4 (gl_SAFE_WRITE):
12522         * m4/same.m4 (gl_SAME):
12523         * m4/save-cwd.m4 (gl_SAVE_CWD):
12524         * m4/savedir.m4 (gl_SAVEDIR):
12525         * m4/settime.m4 (gl_SETTIME):
12526         * m4/sha1.m4 (gl_SHA1):
12527         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
12528         * m4/stat-macros.m4 (gl_STAT_MACROS):
12529         * m4/stat-time.m4 (gl_STAT_TIME):
12530         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
12531         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
12532         * m4/strdup.m4 (gl_FUNC_STRDUP):
12533         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
12534         * m4/strndup.m4 (gl_FUNC_STRNDUP):
12535         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
12536         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
12537         * m4/time_r.m4 (gl_TIME_R):
12538         * m4/timespec.m4 (gl_TIMESPEC):
12539         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
12540         * m4/unlinkdir.m4 (gl_UNLINKDIR):
12541         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
12542         * m4/userspec.m4 (gl_USERSPEC):
12543         * m4/utimecmp.m4 (gl_UTIMECMP):
12544         * m4/utimens.m4 (gl_UTIMENS):
12545         * m4/xalloc.m4 (gl_XALLOC):
12546         * m4/xgetcwd.m4 (gl_XGETCWD):
12547         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
12548         * m4/xreadlink.m4 (gl_XREADLINK):
12549         * m4/xstrtod.m4 (gl_XSTRTOD):
12550         * m4/yesno.m4 (gl_YESNO):
12551         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12552         to get the necessary .h files and whatnot.
12553
12554 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
12555             Bruno Haible  <bruno@clisp.org>
12556
12557         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
12558         /bin/sh understanding of '!' conditional negation.
12559
12560 2006-08-21  Jim Meyering  <jim@meyering.net>
12561
12562         * modules/openat (Depends-on): Really alphabetize.
12563
12564         * modules/acl (Depends-on): Add error and quote.
12565
12566         * check-module (find_included_lib_files): Add at-func.c to the
12567         ok-to-include-more-than-once white list.
12568
12569         * modules/openat (Depends-on): Add lstat.  Alphabetize.
12570
12571 2006-08-21  Bruno Haible  <bruno@clisp.org>
12572
12573         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12574         Emit a pkgdata_DATA variable only if some snippets add contents to it.
12575         Reported by Martin Lambers <marlam@marlam.de>.
12576
12577 2006-08-21  Bruno Haible  <bruno@clisp.org>
12578
12579         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
12580         specify an installation location, don't emit a noinst_LIBRARIES or
12581         noinst_LTLIBRARIES assignment.
12582
12583 2006-08-21  Bruno Haible  <bruno@clisp.org>
12584
12585         BeOS portability.
12586         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
12587         BeOS has mbrtowc() but no <wctype.h>.
12588
12589 2006-08-21  Bruno Haible  <bruno@clisp.org>
12590
12591         BeOS portability.
12592         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
12593         exist.
12594
12595 2006-08-21  Bruno Haible  <bruno@clisp.org>
12596
12597         BeOS portability.
12598         * lib/mbchar.h: Include <wctype.h> only if it exists.
12599
12600 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12601
12602         Remove files that are no longer needed by their respective modules.
12603         * m4/obstack.m4: Remove.
12604         * m4/strerror_r.m4: Remove.
12605         * m4/uint32_t.m4: Remove.
12606         * m4/uintptr_t.m4: Remove.
12607         * m4/ullong_max.m4: Remove.
12608         * m4/xstrtoimax.m4: Remove.
12609         * m4/xstrtoumax.m4: Remove.
12610
12611         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
12612         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
12613         dependencies now capture this.
12614
12615         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
12616         Do not use AC_LIBSOURCES, since gnulib modules now do this.
12617         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
12618         * m4/human.m4 (gl_HUMAN): Likewise.
12619         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
12620         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
12621
12622         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
12623
12624         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
12625         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
12626         stdint.
12627         * m4/human.m4 (gl_HUMAN): Likewise.
12628         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
12629         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
12630         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12631         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12632         * m4/xstrtol (gl_XSTRTOL): Likewise.
12633
12634         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
12635         AC_TYPE_LONG_LONG_INT.
12636         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12637         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
12638         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
12639         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12640
12641         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
12642         on stdbool.
12643
12644         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
12645         (gl_PREREQ_XSTRTOUL): Remove.
12646
12647         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
12648
12649         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
12650         mode.
12651
12652 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12653
12654         Add and change modules to make it easier for coreutils to use
12655         gnulib-tool.
12656         * modules/backupfile (Files): Remove m4/d-ino.m4.
12657         (Depends-on): Add d-ino.
12658         * modules/cycle-check (Depends-on): Add stdint.
12659         (lib_SOURCES): Add cycle-check.h.
12660         * modules/d-ino: New module.
12661         * modules/d-type: New module.
12662         * modules/error (Files): Remove m4/strerror_r.m4.
12663         * modules/filemode (Files): Add m4/st_dm_mode.m4.
12664         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
12665         m4/inttypes_h.m4, m4/uintmax_t.m4.
12666         (Depends-on): Add stdint.
12667         (lib_SOURCES): Add fsusage.h.
12668         * modules/getcwd (Files): Remove d-ino.m4.
12669         (Depends-on): Add d-ino.
12670         * modules/getndelim2 (Depends-on): Add stdint.
12671         * modules/glob (Files): Remove m4/d-type.m4.
12672         (Depends-on): Add d-type.
12673         * modules/host-os: New module.
12674         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
12675         m4/inttypes_h.m4, m4/uintmax_t.m4.
12676         * Depends-on: Add stdint.
12677         (lib_SOURCES): Add human.h.
12678         * modules/inttostr (Files): Remove m4/intmax_t.m4,
12679         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
12680         m4/uintmax_t.m4, m4/ulonglong.m4.
12681         (Depends-on): Add stdint.
12682         (EXTRA_DIST): Add inttostr.h.
12683         * modules/lchmod: New module.
12684         * modules/link-follow: New module.
12685         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
12686         (Depends-on): Add lchmod.
12687         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
12688         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
12689         (Depends-on): Add stdint.
12690         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
12691         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
12692         (Depends-on): Add stdint.
12693         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
12694         * modules/perl: New module.
12695         * modules/regex (Depends-on): Add stdint.
12696         * modules/rmdir-errno: New module.
12697         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12698         m4/intmax_t.m4.
12699         (Depends-on): Add stdint.
12700         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12701         m4/uintmax_t.m4.
12702         (Depends-on): Add stdint.
12703         * modules/unlink-busy: New module.
12704         * modules/utimecmp (Depends-on): Add stdint.
12705         * modules/uptime: New module.
12706         * modules/winsz-ioctl: New module.
12707         * modules/winsz-termios: New module.
12708         * modules/xnanosleep (Depends-on): Add nanosleep.
12709         * modules/ullong_max: Remove.
12710         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
12711         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
12712         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
12713         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
12714         (Depends-on): Add inttypes.
12715         (lib_SOURCES): Add xstrtol.h.
12716         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
12717         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
12718         * MODULES.html.sh: Move 'assert' into the assert section.
12719         Move 'dummy' into the linking section.
12720         Remove ullong_max.
12721         Add section for compatibility checks for POSIX:2001 functions,
12722         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
12723         winsz-ioctl, and winsz-termios into it.
12724         Add lchmod.
12725         Add top-level Misc section and put host-os, perl, and uptime
12726         into it.
12727
12728 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12729
12730         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
12731         now assume the stdint module.  Do not include inttypes.h.
12732         * lib/fsusage.h: Likewise.
12733         * lib/getndelim2.c: Likewise.
12734         * lib/human.h: Likewise.
12735         * lib/inttostr.h: Likewise.
12736         * lib/obstack.c: Likewise.
12737         * lib/regex_internal.h: Likewise.
12738         * lib/tempname.c: Likewise.
12739         * lib/utimecmp.c: Likewise.
12740         * lib/xstrtol.h: Likewise.
12741
12742         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
12743
12744         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
12745         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
12746         * lib/xtime.h: Likewise.
12747
12748 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12749
12750         * modules/openat (Files): Add lib/fchmodat.c.
12751         Fixes problem reported by Jay Youngman.
12752
12753 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12754
12755         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
12756         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
12757
12758 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
12759             Bruno Haible  <bruno@clisp.org>
12760
12761         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
12762         and is a script that invokes bison. Tighten the code. Add comments.
12763
12764 2006-08-18  Jim Meyering  <jim@meyering.net>
12765
12766         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
12767         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
12768         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
12769         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
12770
12771 2006-08-18  Bruno Haible  <bruno@clisp.org>
12772
12773         * modules/bison-i18n: New file.
12774         * MODULES.html.sh (Internationalization functions): Add it.
12775
12776 2006-08-18  Bruno Haible  <bruno@clisp.org>
12777
12778         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
12779         sys/statvfs.h. When getmntinfo was found, check its declaration and
12780         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
12781
12782 2006-08-18  Bruno Haible  <bruno@clisp.org>
12783
12784         * m4/bison-i18n.m4: New file, from bison.
12785
12786 2006-08-18  Bruno Haible  <bruno@clisp.org>
12787
12788         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
12789         (ME_DUMMY): Treat "kernfs" as a dummy.
12790         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
12791
12792 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12793
12794         Update from coreutils.
12795
12796         2006-08-15  Jim Meyering  <jim@meyering.net>
12797
12798         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
12799
12800         2006-01-17  Jim Meyering  <jim@meyering.net>
12801
12802         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
12803
12804         2006-01-11  Jim Meyering  <jim@meyering.net>
12805
12806         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
12807         Check for the lchmod function.
12808
12809 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12810
12811         Update from coreutils.
12812
12813         * lib/__fpending.h: Add copyright notice.
12814         * lib/fprintftime.h: Likewise.
12815         * lib/savedir.c: Use (C) in copyright notice.
12816         * lib/savedir.h: Likewise.
12817
12818         2006-08-15  Jim Meyering  <jim@meyering.net>
12819
12820         * lib/at-func.c: New file, with the logic of all emulated at-functions.
12821         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
12822         in support of the EXPECTED_ERRNO macro.
12823         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
12824         definitions.  Instead, define the appropriate symbols and include
12825         "at-func.c".
12826         * lib/mkdirat.c (mkdirat): Likewise.
12827         * lib/fchmodat.c (fchmodat): Likewise.
12828         (ENOSYS): Remove definition.
12829         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
12830         it.  Don't include "unistd--.h" -- it wasn't ever used.
12831
12832         2006-01-17  Jim Meyering  <jim@meyering.net>
12833
12834         Rewrite fts.c not to change the current working directory,
12835         by using openat, fstatat, fdopendir, etc..
12836
12837         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
12838         (HAVE_OPENAT_SUPPORT): Define.
12839         [_LIBC] (fchdir): Don't undef or define; no longer used.
12840         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
12841         Now, this `function' always succeeds, and consumes its file descriptor
12842         parameter -- so callers must not close such FDs.  Update callers.
12843         (diropen_fd, opendirat, cwd_advance_fd): New functions.
12844         (diropen): Add parameter, SP.  Adjust all callers.
12845         Implement using diropen_fd, rather than open.
12846         (fts_open): Initialize new member, fts_cwd_fd.
12847         Remove fts_rft-setting code.
12848         (fts_close): Close fts_cwd_fd, if necessary.
12849         (__opendir2): Define in terms of opendir or opendirat,
12850         depending on whether the FST_NOCHDIR flag is set.
12851         (fts_build): Since fts_safe_changedir consumes its FD, and since
12852         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
12853         and close the dup'd file descriptor upon failure.
12854         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
12855         (fts_safe_changedir): Tweak semantics to reflect that this function
12856         now calls cwd_advance_fd and hence consumes its FD argument.
12857         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
12858         [struct FTS] (fts_rft): Remove now-unused member.
12859         [struct FTS] (fts_cycle.state): Improve comment.
12860
12861         * lib/openat.c (openat_needs_fchdir): New function.
12862         * lib/openat.h (openat_needs_fchdir): Declare it.
12863
12864 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12865
12866         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
12867         Problem and fix reported by Pádraig Brady in
12868         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
12869
12870 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12871
12872         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
12873
12874 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12875
12876         * lib/memcoll.c (memcoll): Optimize for the common case where the
12877         arguments are bytewise equal.
12878
12879 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12880
12881         * doc/regexprops-generic.texi: Add a copyright notice.
12882
12883 2006-08-15  Bruno Haible  <bruno@clisp.org>
12884
12885         * modules/tmpdir (License): Change to LGPL.
12886
12887 2006-08-15  Bruno Haible  <bruno@clisp.org>
12888
12889         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
12890         module.
12891
12892 2006-08-14  Simon Josefsson  <jas@extundo.com>
12893
12894         * config/srclist.txt: Add gnupload.
12895
12896 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12897
12898         Change copyright notice from LGPL 2 to GPL 2, since that's the
12899         standard form used in the gnulib repository.
12900         * tests/test-lock.c: Likewise.
12901         * tests/test-stdint.c: Likewise.
12902         * tests/test-tls.c: Likewise.
12903
12904         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
12905         prelude-manager.  User shorter URLs for GNU projects, without '?'.
12906         Add copyright notice.
12907
12908         * check-module: Add copyright notice.  Output a copyright
12909         notice if "--version" is specified.
12910         * modules/COPYING: New file.
12911         * tests/test-getaddrinfo.c: Add copyright notice.
12912         * tests/test-verify.c: Likewise.
12913
12914 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12915
12916         Change copyright notice from LGPL 2 to GPL 2, since that's the
12917         standard form used in the gnulib repository.
12918         * lib/lock.c: LGPL -> GPL.
12919         * lib/lock.h: Likewise.
12920         * lib/strnlen1.c: Likewise.
12921         * lib/strnlen1.h: Likewise.
12922         * lib/tls.c: Likewise.
12923         * lib/tls.h: Likewise.
12924         * lib/tmpdir.c: Likewise.
12925
12926         * lib/TODO: Remove; this belongs only in coreutils.
12927
12928 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12929
12930         Add copyright notices to long-enough files that lack them, since
12931         otherwise the files aren't clearly free.  Use the same notice that
12932         getdate.texi already uses.
12933         * doc/alloca-opt.texi: Add copyright notice.
12934         * doc/alloca.texi: Likewise.
12935         * doc/ctime.texi: Likewise.
12936         * doc/functions.texi: Likewise.
12937         * doc/gcd.texi: Likewise.
12938         * doc/gnulib-tool.texi: Likewise.
12939         * doc/inet_ntoa.texi: Likewise.
12940         * doc/visibility.texi: Likewise.
12941
12942         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
12943         * doc/quote.texi: Add copyright notice.
12944
12945         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
12946         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
12947         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
12948         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
12949         is now obsolete, and give a pointer to the Sun list.
12950         Add copyright notice.
12951
12952 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12953
12954         * config/srclistvars.sh: Add copyright notice.
12955
12956 2006-08-14  Eric Blake  <ebb9@byu.net>
12957
12958         Import the following change from libc:
12959
12960         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
12961
12962         Upstream bug 2997.
12963         * lib/misc/error.c: Add space between program name and message if file
12964         name is missing.
12965
12966 2006-08-12  Karl Berry  <karl@gnu.org>
12967
12968         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
12969         remove, these originate in gnulib now.
12970
12971 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12972
12973         * doc/Makefile (standards.info standards.html standards.dvi):
12974         Also depend on make-stds.texi.
12975
12976 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12977
12978         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
12979         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
12980
12981         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
12982         in wchar_t.  Problem reported by Eric Blake.
12983
12984         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
12985         LEN is smaller than SIZE.  Suggested by Bruno Haible.
12986         Also, help the compiler to keep LEN in a register.
12987
12988 2006-08-11  Eric Blake  <ebb9@byu.net>
12989
12990         * users.txt: Sort.  Add tar.
12991
12992 2006-08-11  Bruno Haible  <bruno@clisp.org>
12993
12994         * users.txt: New file.
12995
12996 2006-08-11  Bruno Haible  <bruno@clisp.org>
12997
12998         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
12999         before <wchar.h>. Needed for OSF/1 and BSD/OS.
13000
13001 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
13002
13003         * modules/snprintf (Depends-on): Remove minmax.
13004         (Maintainer): Add self and Bruno.
13005
13006 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
13007
13008         * lib/.cppi-disable: Add snprintf.h, socket_.h.
13009         * lib/snprintf.c: Include <errno.h> and <limits.h>.
13010         (EOVERFLOW): Define if the system does not.
13011         Do not include "minmax.h"; it wasn't used.
13012         (snprintf): Don't assume size_t promotes to an unsigned type.
13013         Fix bug when generated string was too long for the buffer: the
13014         buffer's contents are supposed to be the initial prefix of the
13015         output.  Don't assume vasnprintf returns EOVERFLOW if the size
13016         exceeds INT_MAX; do the check ourselves.
13017
13018         Import the following changes from libc:
13019
13020         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
13021
13022         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
13023         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
13024         set wc to the byte which couldn't be converted.
13025         (re_string_reconstruct): Don't clear valid_raw_len before calling
13026         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
13027         tip_context using re_string_context_at.
13028
13029         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
13030
13031         * lib/posix/regex.h: g++ still cannot handled [restrict].
13032
13033         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
13034
13035         * lib/posix/regex.h: Remove special handling for VMS.
13036
13037 2006-08-10  Jim Meyering  <jim@meyering.net>
13038
13039         * modules/same-inode: New module.
13040         * modules/dev-ino: New module.
13041         * modules/cycle-check: Depend on these modules, rather than simply
13042         including their .h files.
13043         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
13044         required via m4/cycle-check.m4.
13045         * modules/same: Depend on new same-inode module, rather than
13046         including same-inode.h.
13047         * modules/chdir-safer: New file.
13048
13049         * modules/chown (Depends-on): Add stat-macros.
13050
13051 2006-08-10  Jim Meyering  <jim@meyering.net>
13052
13053         * m4/cycle-check.m4: New file.
13054         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
13055         * m4/dev-ino.m4, m4/same-inode.m4: New files.
13056
13057 2006-08-10  Eric Blake  <ebb9@byu.net>
13058
13059         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
13060         in from original proposal.
13061
13062 2006-08-10  Eric Blake  <ebb9@byu.net>
13063         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13064
13065         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
13066         namespace.
13067
13068 2006-08-10  Bruno Haible  <bruno@clisp.org>
13069
13070         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
13071         as well.
13072
13073 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13074
13075         Sync from coreutils.
13076
13077         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
13078
13079         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
13080         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
13081
13082 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13083
13084         * modules/restrict: Remove; no longer needed now that we assume
13085         Autoconf 2.59 or later.
13086         * MODULES.html.sh: Remove 'restrict'.
13087         * modules/argp (Depends-on): Remove 'restrict'.
13088         * modules/base64 (Depends-on): Likewise.
13089         * modules/gc (Depends-on): Likewise.
13090         * modules/getaddrinfo (Depends-on): Likewise.
13091         * modules/glob (Depends-on): Likewise.
13092         * modules/inet_ntop (Depends-on): Likewise.
13093         * modules/inet_pton (Depends-on): Likewise.
13094         * modules/memxor (Depends-on): Likewise.
13095         * modules/regex (Depends-on): Likewise.
13096         * modules/strtok_r (Depends-on): Likewise.
13097         * modules/time_r (Depends-on): Likewise.
13098
13099 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13100
13101         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
13102         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
13103         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13104         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
13105         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
13106         * m4/memxor.m4 (gl_MEMXOR): Likewise.
13107         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
13108         gl_C_RESTRICT replaced by AC_C_RESTRICT.
13109
13110         Merge from coreutils.
13111         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
13112         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
13113         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
13114         * m4/time_r.m4 (gl_TIME_R): Likewise.
13115
13116 2006-08-09  Karl Berry  <karl@gnu.org>
13117
13118         * config/srclist.txt: no more gettext-tools, per Bruno.
13119
13120 2006-08-08  Eric Blake  <ebb9@byu.net>
13121
13122         * modules/verror: New module.
13123         * MODULES.html.sh: Document it.
13124
13125 2006-08-08  Eric Blake  <ebb9@byu.net>
13126
13127         * lib/verror.h, lib/verror.c: New files.
13128
13129 2006-08-08  Eric Blake  <ebb9@byu.net>
13130
13131         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
13132         verror_at_line output complies with GNU Coding Standards even when
13133         file is NULL.
13134
13135 2006-08-07  Bruno Haible  <bruno@clisp.org>
13136
13137         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
13138         versions of AIX.
13139         Reported by Ralf Wildenhues.
13140
13141 2006-08-07  Bruno Haible  <bruno@clisp.org>
13142
13143         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
13144         in an AC_DEFUN. Needed so that the autoconf snippets can use
13145         AC_REQUIRE.
13146
13147 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13148
13149         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13150         Initialize pkgdata_DATA.
13151         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
13152         overriding it.
13153
13154 2006-08-06  Eric Blake  <ebb9@byu.net>
13155
13156         * lib/error.h: Fold in some upstream changes from glibc.
13157         * lib/error.c: Likewise.
13158
13159 2006-08-04  Bruno Haible  <bruno@clisp.org>
13160
13161         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13162         Make the mostlyclean-local rule depend on mostlyclean-generic.
13163         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
13164
13165 2006-07-31  Bruno Haible  <bruno@clisp.org>
13166
13167         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
13168         <stdlib.h>, <string.h>.
13169
13170 2006-07-30  Bruno Haible  <bruno@clisp.org>
13171
13172         * modules/readlink (License): Change to LGPL.
13173
13174 2006-07-30  Bruno Haible  <bruno@clisp.org>
13175
13176         * modules/javaversion (Makefile.am): Distribute javaversion.java and
13177         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
13178         set PKGDATADIR to point to it.
13179
13180 2006-07-30  Bruno Haible  <bruno@clisp.org>
13181
13182         * modules/csharpexec (configure.ac): Comment out macro invocation.
13183         * modules/javaexec (configure.ac): Likewise.
13184         * modules/javacomp-script (configure.ac): Likewise.
13185
13186         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
13187
13188 2006-07-30  Bruno Haible  <bruno@clisp.org>
13189
13190         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
13191         linked-list.
13192
13193 2006-07-30  Bruno Haible  <bruno@clisp.org>
13194
13195         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
13196
13197 2006-07-30  Bruno Haible  <bruno@clisp.org>
13198
13199         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13200         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
13201         get removed.
13202
13203 2006-07-29  Bruno Haible  <bruno@clisp.org>
13204
13205         Make it possible for gnulib-tool to work with locally modified or
13206         augmented gnulib repositories.
13207         * gnulib-tool (func_usage): Document --local-dir option.
13208         (local_gnulib_dir): New variable.
13209         Handle --local-dir option.
13210         (func_lookup_file): New function.
13211         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
13212         (func_get_description, func_get_filelist, func_get_description,
13213         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
13214         func_get_automake_snippet, func_get_include_directive,
13215         func_get_license, func_get_maintainer): Use func_lookup_file.
13216         (func_import, func_create_testdir): Use func_lookup_file.
13217
13218 2006-07-29  Bruno Haible  <bruno@clisp.org>
13219
13220         * modules/setenv (Depends-on): Add unistd.
13221
13222 2006-07-29  Bruno Haible  <bruno@clisp.org>
13223
13224         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
13225
13226 2006-07-29  Bruno Haible  <bruno@clisp.org>
13227
13228         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
13229
13230 2006-07-29  Bruno Haible  <bruno@clisp.org>
13231
13232         * gnulib-tool (import, update): If there is no Makefile.am, look at
13233         aclocal.m4, instead of bailing out.
13234
13235 2006-07-29  Bruno Haible  <bruno@clisp.org>
13236
13237         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
13238         Categorize the options by when they are useful.
13239
13240 2006-07-29  Bruno Haible  <bruno@clisp.org>
13241
13242         * gnulib-tool (func_usage): Document option --no-libtool.
13243         Handle option --no-libtool.
13244         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
13245         for changed semantics of $libtool variable.
13246         (func_import): Likewise. If libtool is not used, show this through
13247         an option --no-libtool.
13248         (func_create_testdir): Update.
13249
13250 2006-07-29  Bruno Haible  <bruno@clisp.org>
13251
13252         * gnulib-tool (func_import): Extend error message about missing
13253         --doc-base.
13254
13255 2006-07-29  Bruno Haible  <bruno@clisp.org>
13256
13257         * gnulib-tool (func_import): Don't create the $docbase directory if
13258         there is no file to store there.
13259
13260 2006-07-29  Bruno Haible  <bruno@clisp.org>
13261
13262         * gnulib-tool (autoconf_minversion): If a --dir option is given and
13263         relevant, look for configure.ac there, not in the current directory.
13264         Also use a simple search for AC_PREREQ, not "autoconf --trace".
13265
13266 2006-07-29  Bruno Haible  <bruno@clisp.org>
13267
13268         * gnulib-tool (SORT): New variable.
13269         (func_usage): Undocument --assume-autoconf option.
13270         Remove --assume-autoconf option handling.
13271         (autoconf_minversion): Determine from the contents of configure.ac.
13272         (func_import): Remove autoconf_minversion handling.
13273         Suggested by Eric Blake.
13274
13275 2006-07-29  Bruno Haible  <bruno@clisp.org>
13276
13277         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
13278
13279 2006-07-29  Bruno Haible  <bruno@clisp.org>
13280
13281         * config/srclist.txt (*setenv.[ch]): Remove rules.
13282
13283 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13284
13285         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
13286
13287 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13288
13289         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
13290         arpa/inet.h.
13291
13292 2006-07-28  Simon Josefsson  <jas@extundo.com>
13293
13294         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
13295         * modules/inet_pton (Depends-on): Likewise.
13296
13297 2006-07-28  Simon Josefsson  <jas@extundo.com>
13298
13299         * m4/netinet_in_h.m4: New file.
13300
13301 2006-07-28  Simon Josefsson  <jas@extundo.com>
13302
13303         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
13304         #include's.
13305
13306 2006-07-28  Simon Josefsson  <jas@extundo.com>
13307
13308         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
13309         #include's.
13310
13311 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
13312
13313         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
13314         setgid on directories only if they set these bits.
13315         * lib/modechange.h: Remove obsolete comment about masks.
13316
13317 2006-07-28  Eric Blake  <ebb9@byu.net>
13318
13319         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
13320         macro expansion.
13321
13322 2006-07-28  Bruno Haible  <bruno@clisp.org>
13323
13324         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
13325
13326 2006-07-28  Bruno Haible  <bruno@clisp.org>
13327
13328         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
13329
13330 2006-07-28  Bruno Haible  <bruno@clisp.org>
13331
13332         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
13333         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
13334         Define fallbacks.
13335         Avoids link error on FreeBSD 4.x.
13336         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13337
13338         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
13339         encoding.
13340         * lib/mbswidth.c (iswcntrl): Likewise.
13341
13342 2006-07-27  Bruno Haible  <bruno@clisp.org>
13343
13344         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
13345         test.
13346
13347 2006-07-27  Bruno Haible  <bruno@clisp.org>
13348
13349         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
13350         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
13351         defined.
13352
13353 2006-07-26  Eric Blake  <ebb9@byu.net>
13354
13355         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
13356
13357 2006-07-26  Eric Blake  <ebb9@byu.net>
13358
13359         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
13360         like mingw that lack mkstemp.
13361         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
13362         avoid compilation warning on mingw.
13363
13364 2006-07-26  Bruno Haible  <bruno@clisp.org>
13365
13366         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
13367         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
13368         INT_FAST*_MIN, INTPTR_MIN.
13369
13370 2006-07-25  Bruno Haible  <bruno@clisp.org>
13371
13372         * modules/version-etc (Depends-on): Add stdarg.
13373
13374 2006-07-25  Bruno Haible  <bruno@clisp.org>
13375
13376         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
13377         complex commands.
13378
13379 2006-07-25  Bruno Haible  <bruno@clisp.org>
13380
13381         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
13382         defined in <stdarg.h> or config.h.
13383
13384 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13385
13386         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
13387         (gl_STDIO_SAFER): Remove.
13388
13389 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13390
13391         * MODULES.html.sh (File stream based Input/Output):
13392         Add fopen-safer, tmpfile-safer; remove stdio-safer.
13393         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
13394         * modules/fopen-safer, modules/tmpfile-safer: New files.
13395         * modules/stdio-safer: Remove.
13396
13397 2006-07-24  Bruno Haible  <bruno@clisp.org>
13398
13399         * modules/tmpdir: New file.
13400         * MODULES.html.sh (File system functions): Add it.
13401
13402 2006-07-24  Bruno Haible  <bruno@clisp.org>
13403
13404         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
13405         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
13406
13407 2006-07-24  Bruno Haible  <bruno@clisp.org>
13408
13409         * modules/clean-temp: New file.
13410
13411 2006-07-24  Bruno Haible  <bruno@clisp.org>
13412
13413         * m4/tmpdir.m4: New file, from GNU gettext.
13414
13415 2006-07-24  Bruno Haible  <bruno@clisp.org>
13416
13417         * lib/tmpdir.h: New file, from GNU gettext.
13418         * lib/tmpdir.c: New file, from GNU gettext.
13419
13420 2006-07-24  Bruno Haible  <bruno@clisp.org>
13421
13422         * lib/clean-temp.h: New file, from GNU gettext.
13423         * lib/clean-temp.c: New file, from GNU gettext.
13424
13425 2006-07-23  Eric Blake  <ebb9@byu.net>
13426
13427         * modules/stdio-safer (Files): Add tmpfile-safer.c.
13428         (Depends-on): Add binary-io.
13429
13430 2006-07-23  Eric Blake  <ebb9@byu.net>
13431
13432         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
13433
13434 2006-07-23  Eric Blake  <ebb9@byu.net>
13435
13436         * lib/tmpfile-safer.c: New file.
13437         * lib/stdio-safer.h (fopen_safer): Add prototype.
13438         * lib/stdio--.h (tmpfile): Make safer.
13439
13440 2006-07-23  Bruno Haible  <bruno@clisp.org>
13441
13442         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
13443         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
13444         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
13445         gl_linked_remove_at): Use it.
13446
13447 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13448         and Simon Josefsson <jas@extundo.com>
13449
13450         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
13451
13452         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
13453
13454 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13455
13456         * modules/close-stream: New file.
13457         * modules/closeout (Description): Make it clear that it exits
13458         with a diagnostic on error.
13459         (Depends-on): Add close-stream.  Remove fpending, stdbool.
13460         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
13461
13462 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13463
13464         * m4/close-stream.m4: New file.
13465
13466 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13467
13468         * lib/close-stream.c, lib/close-stream.h: New files.
13469
13470 2006-07-22  Bruno Haible  <bruno@clisp.org>
13471
13472         Merge from GNU gettext 0.15.
13473
13474         2006-05-01  Bruno Haible  <bruno@clisp.org>
13475
13476                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
13477
13478         2006-07-22  Bruno Haible  <bruno@clisp.org>
13479
13480                 * modules/javaversion: New file.
13481                 * MODULES.html.sh (Java): Add javaversion.
13482
13483         2006-03-12  Bruno Haible  <bruno@clisp.org>
13484
13485                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
13486
13487         2005-12-04  Bruno Haible  <bruno@clisp.org>
13488
13489                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
13490                 (untested).
13491
13492         2006-06-21  Bruno Haible  <bruno@clisp.org>
13493
13494                 Avoid warnings from recent versions of mcs.
13495                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
13496                 -o, -L, -r any more. Use options documented since mcs-1.0
13497                 instead. Similarly for -g.
13498
13499         2005-12-04  Bruno Haible  <bruno@clisp.org>
13500
13501                 * build-aux/csharpcomp.sh.in: Suffix for resources is
13502                 .resources, not .resource.
13503
13504         2005-07-09  Bruno Haible  <bruno@clisp.org>
13505
13506                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
13507                 add a .dll suffix.
13508                 Reported by Mark Junker <mjscod@gmx.de>.
13509
13510         2006-07-22  Bruno Haible  <bruno@clisp.org>
13511
13512                 * modules/gettext: Upgrade to gettext-0.15.
13513                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
13514                 m4/visibility.m4.
13515                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
13516
13517 2006-07-22  Bruno Haible  <bruno@clisp.org>
13518
13519         Merge from GNU gettext 0.15.
13520
13521         2006-03-25  Bruno Haible  <bruno@clisp.org>
13522
13523                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
13524
13525         2006-07-21  Bruno Haible  <bruno@clisp.org>
13526
13527                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
13528                 "1.1".
13529
13530         2006-05-09  Bruno Haible  <bruno@clisp.org>
13531
13532                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
13533                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
13534                 for the conftestver execution.
13535
13536         2006-05-01  Bruno Haible  <bruno@clisp.org>
13537
13538                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
13539                 optional target-version argument. Verify that the compiler
13540                 groks source of the specified source-version, or add -source
13541                 option as necessary. Verify that the compiler produces
13542                 bytecode in the specified target-version, or add -target and
13543                 -source options as necessary. Make the result of the test
13544                 available as variable CONF_JAVAC. Also log error output in
13545                 config.log.
13546
13547         2006-03-11  Bruno Haible  <bruno@clisp.org>
13548
13549                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
13550
13551         2006-05-09  Bruno Haible  <bruno@clisp.org>
13552
13553                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
13554                 CLASSPATH_SEPARATOR to a semicolon.
13555
13556         2006-03-12  Bruno Haible  <bruno@clisp.org>
13557
13558                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
13559                 available as variable CONF_JAVA, for subsequent autoconf
13560                 tests. Also log error output in config.log.
13561
13562         2006-07-19  Bruno Haible  <bruno@clisp.org>
13563
13564                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
13565                 that getline works on glibc2 systems. Needed to avoid trouble
13566                 in relocatable.c.
13567                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
13568
13569         2005-12-04  Bruno Haible  <bruno@clisp.org>
13570
13571                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
13572                 launcher (untested).
13573
13574         2005-12-04  Bruno Haible  <bruno@clisp.org>
13575
13576                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
13577
13578         2006-07-22  Bruno Haible  <bruno@clisp.org>
13579
13580                 * gettext.m4: Update from GNU gettext-0.15.
13581                 * nls.m4: Likewise.
13582                 * po.m4: Likewise.
13583                 * inttypes-pri.m4: Likewise.
13584                 * inttypes-h.m4: Renamed from inttypes.m4.
13585                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
13586
13587 2006-07-22  Bruno Haible  <bruno@clisp.org>
13588
13589         Merge from GNU gettext 0.15.
13590
13591         2005-07-05  Bruno Haible  <bruno@clisp.org>
13592
13593                 * printf-args.c (printf_fetchargs): Work around broken
13594                 definition of wint_t on mingw.
13595
13596         2005-02-12  Bruno Haible  <bruno@clisp.org>
13597
13598                 * xallocsa.h: Add extern "C" for C++.
13599
13600         2006-05-17  Bruno Haible  <bruno@clisp.org>
13601
13602                 Cygwin portability.
13603                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
13604
13605         2006-04-30  Bruno Haible  <bruno@clisp.org>
13606
13607                 * progreloc.c: Include <mach-o/dyld.h> if available.
13608                 (find_executable): Use _NSGetExecutablePath when possible.
13609
13610         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
13611
13612                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
13613                 function.
13614
13615         2005-12-29  Bruno Haible  <bruno@clisp.org>
13616
13617                 * progreloc.c (set_program_name_and_installdir): Fix
13618                 compilation error.
13619
13620         2005-12-04  Bruno Haible  <bruno@clisp.org>
13621
13622                 Cygwin portability.
13623                 * progreloc.c: Include <windows.h> also on Cygwin.
13624                 (find_executable): Add support for Cygwin.
13625                 (set_program_name_and_installdir): Handle also platforms with
13626                 nonempty EXEEXT.
13627
13628         2006-07-11  Bruno Haible  <bruno@clisp.org>
13629
13630                 * javacomp.c: Fix a comment.
13631                 Reported by Jim Meyering.
13632
13633         2006-04-30  Bruno Haible  <bruno@clisp.org>
13634
13635                 * javacomp.h (compile_java_class): Add source_version,
13636                 target_version arguments.
13637                 * javacomp.c: Rewritten to choose only a compiler that
13638                 respects the specified source_version and target_version.
13639
13640         2006-06-27  Bruno Haible  <bruno@clisp.org>
13641
13642                 Assume correct S_ISDIR macro.
13643                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
13644
13645         2006-07-22  Bruno Haible  <bruno@clisp.org>
13646
13647                 * javaversion.h: New file, from GNU gettext.
13648                 * javaversion.c: New file, from GNU gettext.
13649                 * javaversion.java: New file, from GNU gettext.
13650                 * javaversion.class: New file, from GNU gettext.
13651
13652         2006-05-17  Bruno Haible  <bruno@clisp.org>
13653
13654                 Cygwin portability.
13655                 * javaexec.c (execute_java_class): Test for jview program
13656                 also on Cygwin.
13657
13658         2006-04-09  Bruno Haible  <bruno@clisp.org>
13659
13660                 * fatal-signal.c: Don't include string.h.
13661                 (at_fatal_signal): Use a copying loop instead of memcpy.
13662
13663         2005-12-04  Bruno Haible  <bruno@clisp.org>
13664
13665                 * csharpexec.c: Add support for 'clix' launcher (untested).
13666                 (execute_csharp_using_sscli): New function.
13667                 (execute_csharp_program): Call it.
13668
13669         2006-06-21  Bruno Haible  <bruno@clisp.org>
13670
13671                 Avoid warnings from recent versions of mcs.
13672                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
13673                 -o, -L, -r any more. Use options documented since mcs-1.0
13674                 instead. Similarly for -g.
13675
13676         2005-07-09  Bruno Haible  <bruno@clisp.org>
13677
13678                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
13679                 add a .dll suffix.
13680                 Reported by Mark Junker <mjscod@gmx.de>.
13681
13682         2006-06-17  Bruno Haible  <bruno@clisp.org>
13683
13684                 * config.charset: Update for NetBSD 3.0.
13685
13686         2006-05-17  Bruno Haible  <bruno@clisp.org>
13687
13688                 Cygwin portability.
13689                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
13690
13691         2006-05-16  Bruno Haible  <bruno@clisp.org>
13692
13693                 * localcharset.c [CYGWIN]: Include <windows.h>.
13694                 (get_charset_aliases): For Cygwin, return the same CPxxx
13695                 aliases list as under WIN32.
13696                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
13697                 the environment variables. Fall back to GetACP().
13698
13699         2006-04-05  Bruno Haible  <bruno@clisp.org>
13700
13701                 * config.charset: Update Juan Manuel Guerrero's address.
13702
13703         2005-02-12  Bruno Haible  <bruno@clisp.org>
13704
13705                 * allocsa.h: Add extern "C" for C++.
13706
13707         2005-02-10  Bruno Haible  <bruno@clisp.org>
13708
13709                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
13710                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
13711
13712         2006-07-22  Bruno Haible  <bruno@clisp.org>
13713
13714                 * gettext.h: Update to GNU gettext-0.15.
13715
13716 2006-07-22  Bruno Haible  <bruno@clisp.org>
13717
13718         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
13719         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
13720         lib-prefix.m4, longdouble.m4, ssize_t.m4.
13721
13722 2006-07-21  Eric Blake  <ebb9@byu.net>
13723
13724         * modules/stdlib-safer: New file.
13725         * MODULES.html.sh (File stream based Input/Output): Add
13726         stdlib-safer.
13727
13728 2006-07-21  Eric Blake  <ebb9@byu.net>
13729
13730         * lib/stdlib-safer.h: New file from coreutils, required by
13731         stdlib--.h.
13732
13733 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
13734
13735         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
13736
13737 2006-07-20  Bruno Haible  <bruno@clisp.org>
13738
13739         * gnulib-tool: Recognize new option --assume-autoconf.
13740         (autoconf_minversion): New variable.
13741         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
13742
13743 2006-07-20  Bruno Haible  <bruno@clisp.org>
13744
13745         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
13746
13747 2006-07-19  Derek R. Price  <derek@ximbiot.com>
13748
13749         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
13750         Reindent and repaginate.
13751
13752 2006-07-19  Derek Price  <derek@ximbiot.com>
13753
13754         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
13755         Correct grammar.
13756
13757 2006-07-17  Bruno Haible  <bruno@clisp.org>
13758
13759         * modules/list: New file.
13760         * modules/array-list: New file.
13761         * modules/carray-list, modules/carray-list-tests: New files.
13762         * modules/linked-list, modules/linked-list-tests: New files.
13763         * modules/avltree-list, modules/avltree-list-tests: New files.
13764         * modules/rbtree-list, modules/rbtree-list-tests: New files.
13765         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
13766         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
13767         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
13768         * modules/oset: New file.
13769         * modules/array-oset: New file.
13770         * modules/avltree-oset, modules/avltree-oset-tests: New files.
13771         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
13772         * tests/test-carray_list.c: New file.
13773         * tests/test-linked_list.c: New file.
13774         * tests/test-avltree_list.c: New file.
13775         * tests/test-rbtree_list.c: New file.
13776         * tests/test-linkedhash_list.c: New file.
13777         * tests/test-avltreehash_list.c: New file.
13778         * tests/test-rbtreehash_list.c: New file.
13779         * tests/test-avltree_oset.c: New file.
13780         * tests/test-rbtree_oset.c: New file.
13781         * MODULES.html.sh (Container data structures): New section.
13782
13783 2006-07-17  Bruno Haible  <bruno@clisp.org>
13784
13785         * m4/gl_list.m4: New file.
13786
13787 2006-07-17  Bruno Haible  <bruno@clisp.org>
13788
13789         * lib/gl_list.h: New file.
13790         * lib/gl_list.c: New file.
13791         * lib/gl_array_list.h: New file.
13792         * lib/gl_array_list.c: New file.
13793         * lib/gl_carray_list.h: New file.
13794         * lib/gl_carray_list.c: New file.
13795         * lib/gl_linked_list.h: New file.
13796         * lib/gl_linked_list.c: New file.
13797         * lib/gl_anylinked_list1.h: New file.
13798         * lib/gl_anylinked_list2.h: New file.
13799         * lib/gl_avltree_list.h: New file.
13800         * lib/gl_avltree_list.c: New file.
13801         * lib/gl_anyavltree_list1.h: New file.
13802         * lib/gl_anyavltree_list2.h: New file.
13803         * lib/gl_rbtree_list.h: New file.
13804         * lib/gl_rbtree_list.c: New file.
13805         * lib/gl_anyrbtree_list1.h: New file.
13806         * lib/gl_anyrbtree_list2.h: New file.
13807         * lib/gl_anytree_list1.h: New file.
13808         * lib/gl_anytree_list2.h: New file.
13809         * lib/gl_linkedhash_list.h: New file.
13810         * lib/gl_linkedhash_list.c: New file.
13811         * lib/gl_anyhash_list1.h: New file.
13812         * lib/gl_anyhash_list2.h: New file.
13813         * lib/gl_avltreehash_list.h: New file.
13814         * lib/gl_avltreehash_list.c: New file.
13815         * lib/gl_rbtreehash_list.h: New file.
13816         * lib/gl_rbtreehash_list.c: New file.
13817         * lib/gl_anytreehash_list1.h: New file.
13818         * lib/gl_anytreehash_list2.h: New file.
13819
13820         * lib/gl_oset.h: New file.
13821         * lib/gl_oset.c: New file.
13822         * lib/gl_array_oset.h: New file.
13823         * lib/gl_array_oset.c: New file.
13824         * lib/gl_avltree_oset.h: New file.
13825         * lib/gl_avltree_oset.c: New file.
13826         * lib/gl_rbtree_oset.h: New file.
13827         * lib/gl_rbtree_oset.c: New file.
13828         * lib/gl_anytree_oset.h: New file.
13829
13830 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13831
13832         * m4/mkancesdirs.m4: New file.
13833         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
13834         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
13835         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
13836         it.
13837
13838 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13839
13840         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
13841         * lib/mkancesdirs.h: New files.
13842         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
13843         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
13844         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
13845         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
13846         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
13847         callers changed.  Revamp internals significantly, by not
13848         attempting to create directories that are temporarily more
13849         permissive than the final results.  Do not attempt to use
13850         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
13851         This removes some race conditions, fixes some bugs, and simplifies
13852         things.  Use new dirchownmod function to do owner and mode changes.
13853         * lib/mkdir-p.h: Likewise.
13854         * lib/modechange.c (octal_to_mode): New function.
13855         (struct mode_change): New member mentioned.
13856         (make_node_op_equals): New arg mentioned.  All callers changed.
13857         (mode_compile): Keep track of which mode bits the user has explicitly
13858         mentioned.
13859         (mode_adjust): New arg DIR, so that we implement the X op correctly.
13860         New arg PMODE_BITS, to keep track of which mode bits the user
13861         mentioned; it treats S_ISUID and S_ISGID speciall.
13862         All callers changed.
13863         * lib/modechange.h: Likewise.
13864
13865 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13866
13867         * MODULES.html.sh: Add mkancestors.
13868         * modules/mkancesdirs: New module.
13869         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
13870         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
13871         The chdir-safer and afs files are now orphans; I'll remove them
13872         unless someone speaks up.
13873         Add lib/dirchownmod.c, lib/dirchownmod.h.
13874         (Depends-on): Remove alloca, chown, save-cwd, dirname.
13875         Add lchown, mkancesdirs.
13876         (Maintainer): Add self.
13877
13878 2006-07-15  Karl Berry  <karl@gnu.org>
13879
13880         * gnulib-tool: help message wording/arrangement.
13881
13882 2006-07-14  Simon Josefsson  <jas@extundo.com>
13883
13884         * doc/gnulib.texi (Libtool and Windows): New section.
13885
13886 2006-07-12  Simon Josefsson  <jas@extundo.com>
13887
13888         * modules/gendocs (License): Fix license, approved by Karl.
13889
13890 2006-07-12  Eric Blake  <ebb9@byu.net>
13891
13892         * MODULES.html.sh: Add gendocs.
13893
13894 2006-07-11  Eric Blake  <ebb9@byu.net>
13895
13896         * modules/fdl: New module, to install doc/fdl.texi.
13897         * MODULES.html.sh: Add new section for documentation modules.
13898         * gnulib-tool: Avoid space-tab.
13899         (--doc-base): New option, to manage files from doc.
13900
13901 2006-07-11  Eric Blake  <ebb9@byu.net>
13902
13903         * m4/absolute-header.m4: Fix comments to match recent change.
13904
13905 2006-07-11  Eric Blake  <ebb9@byu.net>
13906
13907         * gnulib-tool: List --doc-base before --tests-base.
13908
13909 2006-07-11  Derek R. Price  <derek@ximbiot.com>
13910
13911         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
13912
13913 2006-07-11  Bruno Haible  <bruno@clisp.org>
13914
13915         * README: Mention where to put documentation.
13916
13917 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13918
13919         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
13920
13921 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13922
13923         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
13924         to stdint.m4.
13925
13926 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13927
13928         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
13929         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
13930         "no/such/file/stdint.h" when there is no such file, so that
13931         the resulting C code can be parsed by dodgy compilers.
13932         Problems reported by Bob Proulx.
13933
13934 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13935
13936         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
13937         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13938         macros into the GNU _D_EXACT_NAMLEN.
13939         * lib/savedir.c:  Likewise.
13940         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
13941
13942 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13943         and Paul Eggert  <eggert@cs.ucla.edu>
13944
13945         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
13946         * m4/savedir.m4:
13947         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13948         macros into the GNU _D_EXACT_NAMLEN.
13949
13950 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13951
13952         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
13953         around the absolute name, to work around a problem with the HP-UX
13954         11.23 native C compiler, reported by Bob Proulx.
13955
13956 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13957
13958         * doc/maintain.texi, make-stds.texi: Sync from
13959         <http://savannah.gnu.org/projects/gnustandards>.
13960
13961 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13962
13963         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
13964
13965 2006-07-09  Jim Meyering  <jim@meyering.net>
13966
13967         * m4/glob.m4: Remove a doubled word in a comment.
13968
13969 2006-07-09  Jim Meyering  <jim@meyering.net>
13970
13971         * lib/argp-pv.c: Remove a doubled word in a comment.
13972         * lib/check-version.c (check_version): Likewise.
13973         * lib/javacomp.c (compile_java_class): Likewise.
13974
13975 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13976
13977         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
13978         for the benefit of people using Autoconf 2.60.  If you want to
13979         support older Autoconf versions you can copy m4/onceonly_2_57.m4
13980         (or m4/onceonly.m4, if pre-2.57) manually.
13981
13982 2006-07-08  Jim Meyering  <jim@meyering.net>
13983
13984         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
13985         comment.
13986         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
13987         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
13988         comment.
13989
13990 2006-07-08  Jim Meyering  <jim@meyering.net>
13991
13992         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
13993
13994 2006-07-07  Simon Josefsson  <jas@extundo.com>
13995
13996         * tests/test-crc.c: Change expected crc value, the test vector
13997         were probably computed using the old broken crc.c?
13998
13999 2006-07-06  Simon Josefsson  <jas@extundo.com>
14000
14001         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
14002         now the canonical place for the M4 file).
14003
14004         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
14005         from the sys_socket dependency now.
14006
14007         * modules/inet_pton (Files): Ditto.
14008
14009         * modules/inet_ntop (Files): Ditto.
14010
14011 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14012
14013         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
14014         not gl_PREREQ_GETUSERSHELL.
14015
14016 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14017
14018         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
14019         with only one argument, for Autoconf 2.60.
14020         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
14021         expand to nothing, so add a shell command to avoid syntax error.
14022         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14023
14024 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14025
14026         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
14027
14028 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14029
14030         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
14031         no longer needed.  Check for isblank decl.
14032         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
14033         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
14034         of existence.
14035
14036 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14037
14038         * lib/getloadavg.c: Use __VMS, not VMS.
14039         * lib/getopt.c: Likewise.
14040         * lib/getpagesize.h: Likewise.
14041         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
14042         and probably does not work.
14043
14044 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14045
14046         * lib/.cppi-disable: Add wcwidth.
14047         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
14048         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
14049         (ISGRAPH): Remove.  All uses changed to isgraph.
14050         (FOLD) [!defined _LIBC]: Remove special case.
14051         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
14052         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
14053         HAVE_ISBLANK.
14054         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
14055         case.
14056
14057 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14058
14059         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
14060         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
14061         brackets.  Other minor changes to suppress some compiler
14062         warnings.
14063
14064 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14065         and Paul Eggert  <eggert@cs.ucla.edu>
14066
14067         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
14068         of invoking obsolescent AC_HEADER_DIRENT macro.
14069         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
14070         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
14071         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
14072         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
14073         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
14074         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
14075         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
14076         * m4/readdir.m4: Remove; no longer needed.
14077
14078 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14079         and Paul Eggert  <eggert@cs.ucla.edu>
14080
14081         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
14082         Don't worry about this obsolete case any more.
14083         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
14084         directories.
14085         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
14086         worry about this obsolete case any more.
14087         * lib/fts.c: Likewise.
14088         * lib/getcwd.c: Likewise.
14089         * lib/glob.h: Likewise.
14090         * lib/savedir.c: Likewise.
14091
14092 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14093
14094         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
14095         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
14096         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
14097         needed.
14098         All uses removed.
14099         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14100         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14101         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
14102         needed.
14103         * m4/getdate.m4 (gl_GETDATE): Likewise.
14104         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14105         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14106         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14107         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14108         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14109         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14110         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
14111         needed.
14112
14113 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14114
14115         * lib/memcasecmp.c: Include <limits.h>.
14116         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
14117         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
14118         Don't assume isdigit succeeds only on '0' through '9'.
14119
14120 2006-07-05  Eric Blake  <ebb9@byu.net>
14121
14122         * modules/getaddrinfo (Depends-on): Add snprintf.
14123
14124 2006-07-05  Eric Blake  <ebb9@byu.net>
14125
14126         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
14127         to avoid 'header present but could not be compiled' on cygwin.
14128
14129 2006-07-05  Eric Blake  <ebb9@byu.net>
14130
14131         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
14132         missing from netdb.h.
14133         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
14134
14135 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14136
14137         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
14138         no longer needed.
14139         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
14140         * m4/getdate.m4 (gl_GETDATE): Likewise.
14141         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14142         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14143         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14144         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14145         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14146
14147 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14148
14149         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
14150         All uses of is_space replaced by isspace.
14151         * lib/exit.h: Don't talk about STDC_HEADERS.
14152         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
14153         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
14154         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
14155         replaced by isprint etc.
14156         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
14157         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14158         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
14159         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
14160         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
14161         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14162
14163 2006-07-05  Bruno Haible  <bruno@clisp.org>
14164
14165         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
14166         the function exists, before testing against AIX.
14167         Reported by Martin Lambers <marlam@marlam.de>.
14168
14169 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14170
14171         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
14172         From Mark D. Baushke.
14173
14174 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14175
14176         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
14177         to the absolute name, not just one, to bypass Sun C 5.8's
14178         "warning: #include of /usr/include/... may be non-portable".
14179
14180 2006-07-04  Eric Blake  <ebb9@byu.net>
14181
14182         * modules/dirname-tests: New test module.
14183         * tests/test-dirname.c: New file, replacing dirname.c
14184         TEST_DIRNAME section that was recently deleted.
14185
14186 2006-07-04  Bruno Haible  <bruno@clisp.org>
14187
14188         Assume ANSI C header files and <ctype.h> functions.
14189         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
14190         (mbsnwidth): Use isprint, iscntrl instead.
14191
14192 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14193
14194         Merge from coreutils.
14195         * MODULES.html.sh: Add xstrtold.
14196         * modules/xstrtold: New file.
14197         * modules/cycle-check (Files): Add lib/same-inode.h.
14198         * modules/dirname (Files): Add m4/double-slash-root.m4.
14199         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
14200         * modules/mkdir-p (Files): Add lib/same-inode.h.
14201         * modules/same (Files): Add lib/same-inode.h.
14202
14203 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14204
14205         * m4/absolute-header.m4: Renamed from full-header-path.m4.
14206         This is to keep the terminology clean; POSIX talks about
14207         "absolute pathnames", not "full pathnames", but the GNU
14208         Coding Standards say to use "path" for something else;
14209         so use "absolute" to keep both sides happy.
14210         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
14211         Set gl_absolute_header, not gl_full_header_path.
14212         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
14213         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
14214         All uses changed.
14215
14216         Merge from coreutils.
14217
14218         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14219
14220         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
14221         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
14222         want to require the building of c-strtod.o.
14223         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
14224         needs -lm directly.
14225         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
14226
14227         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14228
14229         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
14230         --as-needed option if available.  Problem reported by Albert Chin in
14231         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
14232         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
14233         cc merely issues a bunch of annoying warnings for --as-needed
14234         (this problem was reported by Bob Proulx).  Also, try linking with
14235         -lm to detect a bug in binutils 2.16 (this problem was reported
14236         by Ralf Wildenhues).
14237
14238         2006-06-18  Jim Meyering  <jim@meyering.net>
14239
14240         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
14241         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
14242         macro.
14243         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
14244         also check for glibc-2.4's abort-inducing bug.
14245
14246         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
14247         Low-probability clean-up should be to use rmdir to get rid of
14248         the just-created directory, not unlink.
14249
14250         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
14251         configure fail, and request a bug report to inform us about it.
14252         Add a comment that, barring reports to the contrary, in 2007 we'll
14253         assume ftruncate is universally available.
14254
14255         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14256
14257         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
14258
14259         2006-03-12  Jim Meyering  <jim@meyering.net>
14260
14261         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
14262         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
14263         * m4/same.m4 (gl_SAME): Likewise.
14264         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
14265
14266         2006-03-11  Eric Blake  <ebb9@byu.net>
14267
14268         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
14269         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
14270         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
14271         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
14272
14273 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14274
14275         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
14276         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
14277         reported by Mark D. Baushke, one in
14278         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
14279
14280         Merge from coreutils.
14281
14282         * lib/.cppi-disable: Add stdint_.h.
14283         * lib/.cvsignore: Add stdint.h.
14284
14285         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14286
14287         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
14288         both double and long double versions.
14289         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
14290         * lib/xstrtold.c: New file.
14291         * lib/xstrtod.h (xstrtold): New decl.
14292
14293         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14294
14295         * lib/filemode.c (setst): Remove.
14296         (strmode): Rewrite to avoid setst.  This makes the code shorter,
14297         (arguably) clearer, and the generated code is a bit smaller on my
14298         Debian GNU/Linux stable x86 host.
14299
14300         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14301
14302         * lib/filemode.c: Include "filemode.h" first, to test the interface.
14303         Assume that filemode.h includes sys/types.h and sys/stat.h.
14304         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
14305         (ftypelet): Reorder to put common cases first, for efficiency.
14306         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
14307         to do 'M'.
14308         (strmode): Renamed from mode_string, and now stores 12 bytes instead
14309         of 10, for compatibility with FreeBSD.  All callers changed.
14310         (filemodestring): Now stores 12 bytes instead of 10, and sets file
14311         types that can't be deduced solely from st_mode.  First arg is now a
14312         const pointer.
14313         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
14314         (strmode): Renamed from mode_string.
14315         (filemodestring): New decl.
14316         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
14317         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
14318         needed.
14319         (S_ISPORT, S_ISWHT): New macros, if not already defined.
14320
14321         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14322
14323         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
14324         fsusage.h now does that.  Include fsusage.h first, to test interface.
14325         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
14326         at most one method (the old code could have generated decls that
14327         didn't conform to C89, not that this was ever exercised).
14328         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
14329
14330         2006-03-19  Jim Meyering  <jim@meyering.net>
14331
14332         Work even in a chroot where d_ino values for entries in "/"
14333         don't match the stat.st_ino values for the same names.
14334         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
14335         number, iterate through all entries again, using lstat instead.
14336         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
14337         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
14338
14339         * lib/getcwd.c (__getcwd): Clarify a comment.
14340         Use memcpy in place of a call to strcpy.
14341
14342         2006-03-12  Jim Meyering  <jim@meyering.net>
14343
14344         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
14345         matches that of the current directory (which we're about to chdir ".."
14346         out of), then save the dev-ino of the parent, instead.
14347
14348         * lib/same-inode.h (SAME_INODE): New file/macro.
14349         * lib/chdir-safer.c (SAME_INODE): Remove definition.
14350         Include "same-inode.h", instead.
14351         * lib/same.c: Likewise.
14352         * lib/cycle-check.h: Include "same-inode.h".
14353         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
14354         * lib/cycle-check.c (SAME_INODE): Remove definition.
14355         * lib/root-dev-ino.h: Include "same-inode.h".
14356
14357         2006-03-11  Eric Blake  <ebb9@byu.net>
14358
14359         * lib/same.c (same_name): s/base_name/last_component/
14360         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
14361         * lib/filenamecat.c (file_name_concat): Likewise.
14362
14363         2006-03-11  Eric Blake  <ebb9@byu.net>,
14364                     Paul Eggert  <eggert@cs.ucla.edu>
14365
14366         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
14367         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
14368         drive prefix.
14369         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
14370         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
14371         (last_component): New method.
14372         * lib/dirname.c (dir_len): Determine when drive letters need a
14373         subsequent slash.  Preserve // when it is special.
14374         (dir_name): Don't append dot when drive letter is absolute.
14375         [TEST_DIRNAME]: Move into a full-blown gnulib test.
14376         * lib/basename.c (base_name): New semantics - malloc the result.
14377         Preserve // when it is special.  Preserve relative files that look
14378         like drive letters.
14379         (base_len): Preserve // when it is special.
14380         (last_component): New method, similar to old base_name semantics.
14381         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
14382         base_name.  Strip redundant slashes from ///.
14383
14384 2006-07-03  Jim Meyering  <jim@meyering.net>
14385
14386         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
14387         macro is used before the first cycle_check call.
14388
14389 2006-07-03  Eric Blake  <ebb9@byu.net>
14390
14391         * modules/dirname (Depends-on): Add xstrndup.
14392
14393 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14394
14395         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
14396         test cases, so that config.log is a bit easier to follow.
14397
14398 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14399
14400         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
14401         both are 64 bits, since this seems to be the tradition, and this
14402         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
14403         we ever run into a host that prefers long long to long in this
14404         case, we'll need another configure-time test.  Problem reported by
14405         Jim Meyering.
14406
14407 2006-07-02  Eric Blake  <ebb9@byu.net>
14408
14409         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
14410
14411 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14412
14413         * modules/inttypes (Depends-on): No longer depends on stdint.
14414         * modules/stdint (Description): Say more about assumptions.
14415         Say that the fast types might differ.  Say macros are used.
14416         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
14417         (Makefile.am): Revise list of substituted symbols to match
14418         new stdint.m4.
14419         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
14420         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
14421         * tests/test-stdint.c (verify_same_types)
14422         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
14423         the code conforms to C99/C89.
14424         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
14425         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
14426
14427 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14428
14429         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
14430         but fix a bug, by requiring at least 64 bits.
14431         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
14432         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
14433         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
14434         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
14435
14436         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
14437         changes.  Make 2.59 a prerequisite.  Check and substitute for
14438         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
14439         inttypes.h.  Do not use special include files; just use the
14440         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
14441         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
14442         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
14443         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
14444         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
14445         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
14446         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
14447         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
14448         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
14449         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
14450         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
14451         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
14452         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
14453         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
14454         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
14455         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
14456         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
14457         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
14458         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
14459         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
14460         WINT_MAX.  Check for C99 conformance more strictly, by detecting
14461         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
14462         not check for things that C99 does not require, e.g., int8_t.  If
14463         a test isn't needed unless <stdint.h> isn't working, and is
14464         unlikely to be needed for any other reason, then don't do it
14465         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
14466         size_t, since we assume C89 freestanding at least.  Do not check
14467         for sig_atomic_t, wchar_t, or wint_t, since the code now does
14468         the right thing even if the types are not defined.  Instead use:
14469         (gl_STDINT_TYPE_PROPERTIES): New macro.
14470         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
14471         testing whether <sys/types.h> clashes, as Autoconf does this for
14472         us now.  All uses removed.
14473         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
14474         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
14475         (gl_CHECK_TYPE_SAME):
14476         Remove; no longer needed.
14477         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
14478         exists, since we'll return 0 anyway in that case.
14479         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
14480
14481 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14482
14483         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
14484         possible collision with system files.
14485         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
14486         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
14487         WCHAR_MIN and WCHAR_MAX in this case.
14488         (<stddef.h>): Do not include; no longer needed.
14489         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
14490         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
14491         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
14492         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
14493         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
14494         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
14495         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
14496         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
14497         !defined(__c99))]: Include in this case too, since it's harmless
14498         now.
14499         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
14500         dangerous to do so.
14501         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
14502         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
14503         (_STDINT_MIN, _STDINT_MAX): New macros.
14504         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
14505         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
14506         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
14507         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
14508         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
14509         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
14510         macros, not typedefs; this simplifies things quite a bit.
14511         Use long int for all types narrower than int64_t.
14512         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
14513         Define in terms of long long int or int64_t or long int,
14514         not int64_t or int32_t.  This saves some compile-time testing.
14515         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
14516         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
14517         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
14518         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
14519         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
14520         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
14521         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
14522         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
14523         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
14524         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
14525         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14526         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14527         undef any previous version and define our own version, for
14528         simplicity and consistency with the new macros for types.
14529         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14530         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14531         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
14532         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
14533         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
14534         @WINT_T_SUFFIX@ to keep things simple here.
14535         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
14536         Simplify by assuming typical 8/16/32/64 host, since we're
14537         already doing that elsewhere anyway.
14538         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
14539         and assume long long int is 64 bits if available.  This
14540         speeds up 'configure'.
14541
14542 2006-07-01  Eric Blake  <ebb9@byu.net>
14543
14544         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
14545         Reported by Andreas Buening.
14546
14547 2006-07-01  Eric Blake  <ebb9@byu.net>
14548
14549         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
14550
14551 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14552
14553         * lib/getaddrinfo.c: fixed typo
14554
14555 2006-06-29  Jim Meyering  <jim@meyering.net>
14556
14557         * modules/strftime (Maintainer): Add my name, since with the
14558         FPRINTFTIME changes strftime.c has forked from glibc.
14559
14560 2006-06-29  Eric Blake  <ebb9@byu.net>
14561
14562         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
14563
14564 2006-06-29  Eric Blake  <ebb9@byu.net>
14565
14566         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
14567
14568 2006-06-29  Eric Blake  <ebb9@byu.net>
14569
14570         * lib/stat_.h: New file.
14571
14572 2006-06-29  Eric Blake  <ebb9@byu.net>
14573
14574         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
14575         unused static function.
14576
14577 2006-06-29  Eric Blake  <ebb9@byu.net>
14578
14579         * doc/functions.texi (Function Portability): Document missing lstat
14580         on mingw.
14581
14582 2006-06-29  Eric Blake  <ebb9@byu.net>
14583
14584         * MODULES.html.sh: Add sys_stat.
14585         * modules/sys_stat: New module.
14586         * modules/mkstemp (Depends-on): Add sys_stat.
14587
14588 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14589
14590         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
14591
14592 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14593
14594         * m4/c-bs-a.m4: Removed.
14595
14596 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14597
14598         * lib/strftime.c: Assume strftime() exists.
14599
14600 2006-06-29  Derek Price  <derek@ximbiot.com>
14601
14602         * modules/c-bs-a: Removed - \a is C89.
14603         * MODULES.html.sh: Remove c-bs-a.
14604
14605 2006-06-29  Bruno Haible  <bruno@clisp.org>
14606
14607         * modules/wcwidth (License): Change to LGPL.
14608
14609 2006-06-28  Simon Josefsson  <jas@extundo.com>
14610
14611         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
14612         on _WIN32.
14613
14614         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
14615         getnameinfo.
14616
14617 2006-06-28  Simon Josefsson  <jas@extundo.com>
14618
14619         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
14620
14621 2006-06-28  Simon Josefsson  <jas@extundo.com>
14622
14623         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
14624         functions there.  It will succeed on Windows XP, but on Windows
14625         2000 and (presumably) earlier, it will fail, and use the internal
14626         re-implementation.
14627         (use_win32_p): New function.
14628         (getaddrinfo): Use strtoul on servname, to support numeric ports.
14629         Support AI_NUMERICSERV to disable getservbyname.
14630         (getnameinfo): New function, only supports
14631         NI_NUMERICHOST|NI_NUMERICSERV for now.
14632
14633         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
14634         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
14635         getnameinfo.
14636
14637 2006-06-28  Eric Blake  <ebb9@byu.net>
14638
14639         * modules/wcwidth: New file.
14640         * modules/mbchar (Depends-on): Add wcwidth.
14641         * modules/mbswidth (Depends-on): Add wcwidth.
14642         * MODULES.html.sh: Add wcwidth.
14643
14644 2006-06-28  Eric Blake  <ebb9@byu.net>
14645
14646         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
14647         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
14648
14649 2006-06-28  Eric Blake  <ebb9@byu.net>
14650
14651         * lib/xvasprintf.h: Fix comments.
14652
14653 2006-06-28  Eric Blake  <ebb9@byu.net>
14654
14655         * lib/mbchar.h (wcwidth): Include wcwidth.h.
14656         * lib/mbswidth.c (wcwidth): Move from here...
14657         * lib/wcwidth.h: ...to this new file.
14658
14659 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14660
14661         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
14662
14663         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
14664         it's obsolete.
14665         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
14666
14667 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14668
14669         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
14670         Autoconf 2.60 says this stuff was obsolete.
14671
14672 2006-06-28  Bruno Haible  <bruno@clisp.org>
14673
14674         * modules/wcwidth (Files): Add m4/wchar_t.m4.
14675
14676 2006-06-28  Bruno Haible  <bruno@clisp.org>
14677
14678         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
14679         gt_TYPE_WCHAR_T.
14680
14681 2006-06-28  Bruno Haible  <bruno@clisp.org>
14682
14683         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
14684         declaration for wcwidth.
14685         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
14686
14687 2006-06-28  Bruno Haible  <bruno@clisp.org>
14688
14689         * lib/mkdtemp.c [MINGW]: Include <io.h>.
14690         (mkdir): Define using _mkdir.
14691
14692 2006-06-28  Bruno Haible  <bruno@clisp.org>
14693
14694         * lib/getaddrinfo.h: Fix POSIX URL.
14695         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
14696         _WIN32.
14697         (use_win32_p): Make static.
14698         (getaddrinfo): Reject service name if it is empty or does not consist
14699         solely of decimal digits, or if its value is > 65535.
14700         (getnameinfo): Remove useless casts.
14701
14702 2006-06-27  Simon Josefsson  <jas@extundo.com>
14703
14704         * modules/sys_select: New file, suggested by Bruno Haible, Paul
14705         Eggert and Martin Lambers.
14706
14707 2006-06-27  Simon Josefsson  <jas@extundo.com>
14708
14709         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
14710         Eggert and Martin Lambers.
14711
14712 2006-06-27  Bruno Haible  <bruno@clisp.org>
14713
14714         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
14715         result to 0, not to empty.
14716         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
14717
14718 2006-06-27  Bruno Haible  <bruno@clisp.org>
14719
14720         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
14721
14722 2006-06-26  Simon Josefsson  <jas@extundo.com>
14723
14724         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
14725         present.
14726
14727 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
14728
14729         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
14730         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
14731         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
14732
14733 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
14734
14735         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
14736
14737 2006-06-26  Bruno Haible  <bruno@clisp.org>
14738
14739         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
14740
14741 2006-06-26  Bruno Haible  <bruno@clisp.org>
14742
14743         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
14744
14745 2006-06-26  Bruno Haible  <bruno@clisp.org>
14746
14747         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
14748         SGI C compiler in pre-C99 mode.
14749         Suggested by Mark D. Baushke and Larry Jones.
14750
14751 2006-06-26  Bruno Haible  <bruno@clisp.org>
14752
14753         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
14754         WCHAR_MAX.
14755         Reported by Mark D. Baushke and Larry Jones.
14756
14757 2006-06-26  Bruno Haible  <bruno@clisp.org>
14758
14759         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
14760         in pre-C99 mode.
14761         Suggested by Mark D. Baushke and Larry Jones.
14762
14763 2006-06-23  Simon Josefsson  <jas@extundo.com>
14764             Bruno Haible  <bruno@clisp.org>
14765
14766         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
14767         Emit mostlyclean-local rule.
14768         (func_emit_tests_Makefile_am): Likewise.
14769         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
14770
14771 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
14772
14773         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
14774
14775 2006-06-23  Bruno Haible  <bruno@clisp.org>
14776
14777         * tests/test-stdint.c: Update to match ISO C 99 Technical
14778         Corrigendum 1.
14779
14780 2006-06-23  Bruno Haible  <bruno@clisp.org>
14781
14782         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
14783
14784 2006-06-23  Bruno Haible  <bruno@clisp.org>
14785
14786         * lib/stdint_.h: Treat IRIX like OpenBSD.
14787
14788 2006-06-23  Bruno Haible  <bruno@clisp.org>
14789
14790         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
14791         ISO C 99 Technical Corrigendum 1.
14792
14793 2006-06-22  Simon Josefsson  <jas@extundo.com>
14794
14795         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
14796         MinGW.
14797
14798 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14799
14800         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
14801         needed.  Some compiler complained about some of them.  Problem reported
14802         by Larry Jones in
14803         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
14804
14805 2006-06-21  Simon Josefsson  <jas@extundo.com>
14806
14807         * tests/test-getaddrinfo.c: New file.
14808
14809         * modules/getaddrinfo-tests: New file.
14810
14811         * MODULES.html.sh: Add inet_pton.
14812
14813         * modules/inet_pton: New file.
14814
14815 2006-06-21  Simon Josefsson  <jas@extundo.com>
14816
14817         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
14818         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
14819         of using the (limited) gnulib implementation on Windows XP.
14820
14821         * m4/inet_pton.m4: New file.
14822
14823 2006-06-21  Simon Josefsson  <jas@extundo.com>
14824
14825         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
14826         variable.
14827
14828         * lib/socket_.h: Don't define WINVER.
14829
14830         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
14831         slightly modified to work in gnulib.
14832
14833 2006-06-21  Simon Josefsson  <jas@extundo.com>
14834
14835         * doc/gnulib.texi (Windows sockets): Add.
14836
14837 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
14838
14839         * lib/read-file.c (fread_file): Start with buffer allocation of
14840         0 bytes rather than 1 byte; this simplifies the code.
14841         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
14842         code to free buffer and save/restore errno.
14843         (internal_read_file): Remove unused local.
14844
14845 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
14846
14847         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
14848         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
14849         Problem reported by Denis Excoffier in
14850         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
14851
14852 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14853
14854         * modules/sys_socket, modules/socklen: Include sys/types since
14855         FreeBSD 4.x's sys/socket.h needs it.
14856
14857 2006-06-19  Simon Josefsson  <jas@extundo.com>
14858
14859         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
14860
14861 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14862
14863         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
14864
14865 2006-06-19  Bruno Haible  <bruno@clisp.org>
14866
14867         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
14868         and FULL_PATH_INTTYPES_H in angle brackets.
14869         Reported by Mark D. Baushke <mdb@gnu.org>.
14870
14871 2006-06-17  Eric Blake  <ebb9@byu.net>
14872
14873         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
14874         errno.
14875
14876 2006-06-17  Bruno Haible  <bruno@clisp.org>
14877
14878         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
14879         <sys/inttypes.h>.
14880
14881 2006-06-17  Bruno Haible  <bruno@clisp.org>
14882
14883         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
14884         whether errno is declared. Assume <errno.h> declares errno.
14885
14886 2006-06-17  Bruno Haible  <bruno@clisp.org>
14887
14888         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
14889
14890 2006-06-17  Bruno Haible  <bruno@clisp.org>
14891
14892         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
14893         problem on Solaris 2.5.1.
14894
14895 2006-06-16  Eric Blake  <ebb9@byu.net>
14896
14897         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
14898         * lib/unicodeio.c [!defined errno]: Likewise.
14899         * lib/strtol.c [!defined errno]: Likewise.
14900         * lib/strtod.c [!defined errno]: Likewise.
14901
14902 2006-06-15  Eric Blake  <ebb9@byu.net>
14903
14904         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
14905
14906 2006-06-15  Eric Blake  <ebb9@byu.net>
14907
14908         * config/srclist.txt (ssize_t.m4): Lose sync.
14909
14910 2006-06-15  Bruno Haible  <bruno@clisp.org>
14911
14912         * modules/stdint (Files): Include m4/full-header-path.m4,
14913         m4/size_max.m4, m4/wchar_t.m4.
14914         (Makefile.am): Many more substitutions.
14915         * modules/stdint-tests: New file.
14916         * tests/test-stdint.c: New file.
14917
14918 2006-06-15  Bruno Haible  <bruno@clisp.org>
14919
14920         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
14921         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
14922         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
14923         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
14924         gl_CHECK_TYPE_SAME): New macros.
14925
14926 2006-06-15  Bruno Haible  <bruno@clisp.org>
14927
14928         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
14929
14930 2006-06-15  Bruno Haible  <bruno@clisp.org>
14931
14932         * lib/stdint_.h: Rewritten to be fully auto-configured.
14933         Fixes bug on HP-UX/IA64.
14934
14935 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
14936
14937         * lib/getdate.y (__attribute__): Don't define if already defined.
14938         Problem reported by Larry Jones.
14939         * lib/utimens.c (__attribute__): Likewise.
14940
14941 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
14942
14943         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
14944         reported by Andreas Schwab.
14945
14946 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14947             Bruno Haible  <bruno@clisp.org>
14948
14949         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
14950         check for the declaration of strnlen and a run test that exposes the
14951         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
14952         rpl_strndup.
14953
14954 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14955             Bruno Haible  <bruno@clisp.org>
14956
14957         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
14958
14959 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14960
14961         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
14962         compile test, for Tru64 4.0D.
14963
14964 2006-05-28  Karl Berry  <karl@gnu.org>
14965
14966         * config/srclist.txt (printf-args.c): lose sync.
14967
14968 2006-05-26  Martin Lambers  <marlam@marlam.de>
14969
14970         * lib/getpass.c: Updates the test for the native W32 API, and adds
14971         missing includes, thus fixing compilation warnings.
14972
14973 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14974
14975         * lib/exclude.c (exclude_fnmatch): New function.
14976         (excluded_file_name): Call exclude_fnmatch.
14977         * lib/exclude.h (excluded_file_name): New prototype
14978
14979 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
14980
14981         * lib/tempname.c (small_open, large_open): New macros.
14982         (__open, __open64) [!_LIBC]: Remove.
14983         (__gen_tempname): Use small_open and large_open instead of __open
14984         and __open64.  This fixes a portability bug on HP-UX 11.11i
14985         reported by Simon Wing-Tang in
14986         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
14987
14988 2006-05-24  Bruno Haible  <bruno@clisp.org>
14989
14990         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
14991         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
14992         Reported by Thorsten Maerz <torte@netztorte.de> via
14993         Aaron Stone <aaron@serendipity.cx>.
14994
14995 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14996
14997         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
14998         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
14999         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
15000         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
15001         not really conditional on the cache.
15002         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
15003
15004 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15005
15006         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
15007         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
15008         (my_usleep): Don't mishandle maximum value.
15009
15010 2006-05-19  Jim Meyering  <jim@meyering.net>
15011
15012         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
15013
15014 2006-05-17  Bruno Haible  <bruno@clisp.org>
15015
15016         Cygwin portability.
15017         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
15018
15019 2006-05-17  Bruno Haible  <bruno@clisp.org>
15020
15021         * lib/stdint_.h: Fix recognition of Cygwin.
15022
15023 2006-05-15  Bruno Haible  <bruno@clisp.org>
15024
15025         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
15026         on libtool patch by Ralf Wildenhues.
15027
15028 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15029
15030         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
15031         test for C99 conformance; (bool) 0.5 is an integer constant
15032         expression, but (bool) -0.5 is not.  Problem reported by Fedor
15033         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
15034
15035 2006-05-11  Simon Josefsson  <jas@extundo.com>
15036
15037         * m4/xvasprintf.m4: Fix obvious typo.
15038
15039 2006-05-11  Jim Meyering  <jim@meyering.net>
15040
15041         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
15042         James Lemley.
15043
15044 2006-05-10  Simon Josefsson  <jas@extundo.com>
15045
15046         * lib/md4.c: Typo fix, update copyright years.
15047         (K1, K2): Don't use L because it turn computations into 64-bit on
15048         64-bit platforms.
15049
15050 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
15051
15052         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
15053         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
15054         unwanted sign propagation, e.g., on hosts with 64-bit int.
15055         There still are some problems with reeelly weird theoretical hosts
15056         (e.g., 33-bit int) but it's not worth worrying about now.
15057         * lib/sha1.c (rol): Likewise.
15058         (K1, K2, K3, K4): Remove unnecessary L suffix.
15059
15060 2006-05-10  Bruno Haible  <bruno@clisp.org>
15061
15062         * lib/des.c: Cast to avoid warnings.
15063
15064 2006-05-09  Bruno Haible  <bruno@clisp.org>
15065
15066         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
15067         (Depends-on): Depend also on xsize, stdarg.
15068         (configure.ac): Add gl_XVASPRINTF.
15069
15070 2006-05-09  Bruno Haible  <bruno@clisp.org>
15071
15072         * m4/xvasprintf.m4: New file.
15073
15074 2006-05-09  Bruno Haible  <bruno@clisp.org>
15075
15076         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
15077         (EOVERFLOW): Define fallback value.
15078         (xstrcat): New function.
15079         (xvasprintf): Recognize the special case of a string concatenation.
15080
15081 2006-05-08  Eric Blake  <ebb9@byu.net>
15082
15083         * gnulib-tool (func_version): Base copyright year on CVS date.
15084         (func_emit_copyright_notice): New function.
15085         (func_emit_lib_Makefile_am): Use it.
15086         (func_emit_tests_Makefile_am): Likewise.
15087         (func_import): Likewise.
15088
15089 2006-05-08  Bruno Haible  <bruno@clisp.org>
15090
15091         * modules/stdarg: New file.
15092         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
15093
15094 2006-05-08  Bruno Haible  <bruno@clisp.org>
15095
15096         * m4/stdarg.m4: New file, from GNU gettext.
15097
15098 2006-05-08  Bruno Haible  <bruno@clisp.org>
15099
15100         * config/srclist.txt (build-aux/config.rpath): different from latest
15101         release.
15102
15103 2006-05-08  Bruno Haible  <bruno@clisp.org>
15104
15105         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
15106
15107 2006-05-05  Jim Meyering  <jim@meyering.net>
15108
15109         * m4/warning.m4: New file, derived from bison's file by the same name.
15110
15111 2006-05-03  Bruno Haible  <bruno@clisp.org>
15112
15113         * lib/stdint_.h: Shorter URL.
15114         * lib/inttypes.h: Likewise.
15115
15116 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15117
15118         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
15119
15120 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15121
15122         * lib/verify.h: Document the internals better.  Most of this change
15123         was written by Bruno Haible.
15124
15125 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15126
15127         * doc/verify.texi: New file, partly based on a proposal by
15128         Bruno Haible.
15129
15130 2006-05-02  Bruno Haible  <bruno@clisp.org>
15131
15132         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
15133         test from here...
15134         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
15135
15136 2006-04-29  Bruno Haible  <bruno@clisp.org>
15137
15138         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
15139         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
15140
15141 2006-04-29  Bruno Haible  <bruno@clisp.org>
15142
15143         * gnulib-tool: Make --update option actually work.
15144
15145 2006-04-29  Bruno Haible  <bruno@clisp.org>
15146
15147         * doc/gcd.texi: New file.
15148         * doc/gnulib.texi: Include it.
15149
15150 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
15151
15152         * lib/getdate.y (get_date): When adding relative date, start with the
15153         initial time, not with the result of the first mktime call.
15154
15155 2006-04-25  Bruno Haible  <bruno@clisp.org>
15156
15157         * gnulib-tool (func_import): Output the include directives in three
15158         blocks, sorted separately.
15159         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15160
15161 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15162
15163         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
15164         to define main with arguments, for C++.  Reported by Eric Blake.
15165         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
15166         Prefer 'int main ()' to 'int main (void)', for C++.
15167         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
15168         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
15169         for 'main', for C99 and C++.
15170
15171 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15172
15173         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
15174         Don't assume that exit status -1 is valid.
15175         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15176         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
15177         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
15178         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
15179         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
15180         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
15181         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
15182         functions can be used without declaring them, or that you can
15183         exit with status -1.
15184         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
15185
15186 2006-04-24  Karl Berry  <karl@gnu.org>
15187
15188         * config/srclist.txt (longdouble.m4): sync lost.
15189
15190 2006-04-24  Eric Blake  <ebb9@byu.net>
15191
15192         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
15193
15194 2006-04-24  Bruno Haible  <bruno@clisp.org>
15195
15196         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
15197         poll() implementation in AIX.
15198         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15199
15200 2006-04-24  Bruno Haible  <bruno@clisp.org>
15201
15202         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
15203         assigned exactly once.
15204
15205 2006-04-23  Claudio Fontana  <claudio@gnu.org>
15206             Bruno Haible  <bruno@clisp.org>
15207
15208         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
15209         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
15210         for AM_CPPFLAGS.
15211
15212 2006-04-23  Bruno Haible  <bruno@clisp.org>
15213
15214         * modules/copy-file: Depend on unistd.
15215         * modules/execute: Likewise.
15216         * modules/fatal-signal: Likewise.
15217         * modules/findprog: Likewise.
15218         * modules/mkdtemp : Likewise.
15219         * modules/pipe: Likewise.
15220         * modules/wait-process: Likewise.
15221
15222 2006-04-23  Bruno Haible  <bruno@clisp.org>
15223
15224         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
15225         condition was already detected.
15226         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15227
15228 2006-04-23  Bruno Haible  <bruno@clisp.org>
15229
15230         * lib/copy-file.c: Include <unistd.h> unconditionally.
15231         * lib/execute.c: Likewise.
15232         * lib/fatal-signal.c: Likewise.
15233         * lib/findprog.c: Likewise.
15234         * lib/mkdtemp.c: Likewise.
15235         * lib/pipe.h: Likewise.
15236         * lib/pipe.c: Likewise.
15237         * lib/wait-process.h: Likewise.
15238
15239 2006-04-23  Bruno Haible  <bruno@clisp.org>
15240
15241         * gnulib-tool (func_usage): Fix --import description. Document
15242         --update.
15243         (func_import): Create temporary file in a temporary directory, if
15244         --dry-run is specified. Silence errors from 'grep' when there are no
15245         m4 files in $m4dir.
15246         (func_create_testdir): Silence errors from 'grep' when there are no
15247         m4 files in $m4dir.
15248         Reported by Karl Berry <karl@freefriends.org>.
15249
15250 2006-04-20  Bruno Haible  <bruno@clisp.org>
15251
15252         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
15253         one argument, so that the code will be portable to Autoconf 2.60.
15254         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
15255         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
15256         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
15257
15258 2006-04-19  Derek Price  <derek@ximbiot.com>
15259             Eric Blake  <ebb9@byu.net>
15260
15261         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
15262         rather than "/full/path.h".  Update comment to match.  Shorten &
15263         generalize m4_translit call via AS_TR_CPP.
15264
15265 2006-04-19  Derek Price  <derek@ximbiot.com>
15266             Eric Blake  <ebb9@byu.net>
15267
15268         * lib/inttypes.h: Correct grammar in comment.
15269
15270 2006-04-18  Derek Price  <derek@ximbiot.com>
15271             Paul Eggert  <eggert@cs.ucla.edu>
15272
15273         * modules/inttypes: New file.
15274         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
15275
15276 2006-04-18  Derek Price  <derek@ximbiot.com>
15277             Paul Eggert  <eggert@cs.ucla.edu>
15278
15279         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
15280         New files.
15281
15282 2006-04-18  Derek Price  <derek@ximbiot.com>
15283             Paul Eggert  <eggert@cs.ucla.edu>
15284
15285         * lib/inttypes.h: New file.
15286         * lib/strtoimax.c: Assume <inttypes.h>.
15287
15288 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
15289
15290         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
15291         isn't mounted.  Problem reported by Kir Kolyshkin.
15292
15293 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15294
15295         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
15296         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
15297         Derek R. Price.
15298         * lib/regex.h (RE_DUP_MAX): Update comment to match current
15299         implementation.
15300
15301 2006-04-12  Eric Blake  <ebb9@byu.net>
15302
15303         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
15304         is now done automatically by the corresponding Autoconf macro.
15305
15306 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
15307
15308         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
15309         time_r.h.
15310
15311 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15312
15313         Merge regex changes from libc, removing some of our
15314         POSIX-conformance changes that were rejected and redoing them in a
15315         less-intrusive way.
15316
15317         * lib/regcomp.c (re_compile_internal, init_dfa):
15318         Length arg is now size_t, not Idx.  All uses changed.
15319         (peek_token): Forward decl now says internal_function.
15320         (__re_error_msgid, __re_error_msgid_idx):
15321         Now static rather than extern with attribute_hidden.
15322         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
15323         For some reason libc prefers K&R style defns for external functions.
15324         (regerror) [!defined _LIBC]: Likewise.
15325         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
15326         (seek_collating_symbol_entry, lookup_collation_sequence_value):
15327         (build_range_exp, build_collating_symbol):
15328         Use K&R-style defn.
15329         (re_compile_fastmap): Use '\0' to memset, not 0.
15330         (utf8_sb_map): Make the calculations more obvious.
15331         (init_dfa, parse_bracket_exp, build_charclass_op):
15332         Call calloc and cast result, as glibc does.
15333         (init_word_char, fetch_token, peek_token, peek_token_bracket):
15334         (build_range_exp, build_collating_symbol):
15335         Now internal functions.
15336
15337         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
15338
15339         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
15340         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
15341         Don't depend on VMS; depend on __VMS instead, for POSIX
15342         namespace cleanness.
15343         (regoff_t): Define to ssize_t, not long int.
15344
15345         Remove the REG_ macros named below.  Instead, make the old names
15346         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
15347         __USE_GNU_REGEX.
15348         (REG_BACKSLASH_ESCAPE_IN_LISTS):
15349         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
15350         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
15351         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
15352         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
15353         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
15354         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
15355         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
15356         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
15357         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
15358         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
15359         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
15360         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
15361         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
15362         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
15363         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
15364         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
15365         (REG_NREGS):
15366         Remove.  All uses replaced by the old RE_* names.
15367         (RE_BACKSLASH_ESCAPE_IN_LISTS):
15368         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
15369         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
15370         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
15371         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
15372         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
15373         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
15374         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
15375         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
15376         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
15377         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
15378         Don't bother having these macros be independent of each others'
15379         values, since they no longer exist in the POSIX name space.
15380
15381         Rename the following member names back to their old names,
15382         unless !__USE_GNU_REGEX.  All uses changed back.
15383         (buffer): Renamed from re_buffer.
15384         (allocated): Renamed from re_allocated.
15385         (used): Renamed from re_used.
15386         (syntax): Renamed from re_syntax.
15387         (fastmap): Renamed from re_fastmap.
15388         (translate): Renamed from re_translate.
15389         (can_be_null): Renamed from re_can_be_null.
15390         (regs_allocated): Renamed from re_regs_allocated.
15391         (fastmap_accurate): Renamed from re_fastmap_accurate.
15392         (no_sub): Renamed from re_no_sub.
15393         (not_bol): Renamed from re_not_bol.
15394         (not_eol): Renamed from re_not_eol.
15395         (newline_anchor): Renamed from re_newline_anchor.
15396         (num_regs): Renamed from rm_num_regs.
15397         (start): Renamed from rm_start.
15398         (end): Renamed from rm_end.
15399
15400         (free_state): Move up a bit.
15401
15402         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
15403         #define to be empty.
15404         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
15405         when that is what is intended.
15406         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
15407         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
15408         (MAX): New macro.
15409         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
15410         All uses changed back to re_malloc, etc.  It's now the caller's
15411         responsibility to check for overflow; all callers changed.
15412         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
15413         (re_x2nrealloc): Remove.
15414         (free_state): Remove decl.
15415
15416         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
15417         (re_set_registers, re_exec):
15418         Use K&R-style defn.
15419
15420         2006-01-31  Roland McGrath  <roland@redhat.com>
15421
15422         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
15423         Reported by Mike Frysinger <vapier@gentoo.org>.
15424
15425         2006-01-15  Andreas Jaeger  <aj@suse.de>
15426
15427         [BZ #1950]
15428         * lib/regex_internal.c (re_string_reconstruct): Adjust for
15429         build_wcs_upper_buffer change.
15430         (build_wcs_upper_buffer): Change return type.
15431
15432         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
15433
15434         * lib/regex_internal.h: Include <stdint.h> if available.
15435
15436         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
15437
15438         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
15439
15440         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
15441
15442         * lib/regcomp.c: Adjust for changed secondary hash function.
15443
15444         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
15445
15446         * lib/regex.h: Pretty printing.
15447         Clean up namespace a bit.
15448
15449         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
15450
15451         * lib/regexec.c (update_cur_sifted_state, check_arrival,
15452         check_arrival_add_next_nodes): Avoid using uninitialized variable.
15453
15454         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
15455                     Ulrich Drepper  <drepper@redhat.com>
15456
15457         [BZ #1302]
15458         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
15459         changed.
15460         (bitset_word_t): Renamed from bitset_word.  All uses changed.
15461
15462         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
15463
15464         [BZ #281]
15465         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
15466         * lib/regcomp.c: Remove unnecessary uses of
15467         unsigned RE_TRANSLATE_TYPE.
15468         * lib/regex_internal.h: Likewise.
15469         * lib/regex_internal.c: Likewise.
15470         * lib/regexec.c: Likewise.
15471         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
15472
15473         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
15474
15475         * lib/regexec.c (find_recover_state): Remove unnecessary
15476         initialization.
15477         (transit_state_bkref): Make DFA a const pointer.
15478         (get_subexp): Likewise.
15479         (check_arrival): Likewise.
15480         (update_cur_sifted_state): Likewise.
15481         (re_search_internal): Likewise.
15482         (prune_impossible_nodes): Likewise.
15483         (acquire_init_state_context): Likewise.
15484         (proceed_next_node): Likewise.
15485         (set_regs): Likewise.
15486         (free_fail_stack_return): Likewise.
15487         (check_arrival_expand_ecl): Mark DFA parameter as const.
15488         (check_arrival_expand_ecl_sub): Likewise.
15489         (check_subexp_limits): Likewise.
15490         (sub_epsilon_src_nodes):  Likewise.
15491         (add_epsilon_src_nodes):  Likewise.
15492         (merge_state_array): Likewise.
15493         (update_regs): Likewise.
15494         (build_trtable): Likewise.
15495         (sift_states_backward): Mark MCTX parameter as const.
15496         (build_sifted_states): Likewise.
15497         (update_cur_sifted_state): Likewise.
15498         (sift_states_mkref): Likewise.
15499         (check_arrival_expand_ecl): Mark eclosure as const.
15500         (check_dst_limits_calc_pos_1): Likewise.
15501         * lib/regex_internal.h (re_match_context_t): Make dfa a const
15502         pointer.
15503
15504         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
15505
15506         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
15507         (transit_state_sb): Likewise.
15508         (transit_state_mb): Likewise.
15509         (sift_states_iter_mb): Likewise.
15510         (check_arrival_add_next_nodes): Likewise.
15511         (check_node_accept_bytes): Change first parameter to pointer-to-const.
15512         [_LIBC] (re_search_2_stub): Use mempcpy.
15513
15514         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
15515         mbrtowc for very simple UTF-8 case.
15516
15517         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
15518         a pointer-to-const.
15519         (re_acquire_state_context): Likewise.
15520         * lib/regex_internal.h: Adjust prototypes.
15521
15522         * lib/regex.c: Prevent using C++ compilers.
15523
15524         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
15525         (re_acquire_state_context): Likewise.
15526
15527 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15528
15529         * modules/regex (Depends-on): Add ssize_t.
15530
15531 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15532
15533         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
15534         translation table.
15535
15536 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15537
15538         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
15539
15540 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
15541             Bruno Haible  <bruno@clisp.org>
15542
15543         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
15544         <sys/types.h> and <inttypes.h>.
15545
15546 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15547
15548         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
15549         `__error_t_defined', so argp.h will not typedef the former.
15550
15551 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
15552
15553         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
15554         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
15555         glibc names.  Even if glibc is changed to conform to POSIX, the
15556         traditional names will be available anyway, since regex depends on
15557         the extensions module.  Also, fix a longstanding typo in the
15558         implementation of Spencer ERE test #75 from grep 2.3.  Problems
15559         reported by Emanuele Giaquinta.  Also, change sense of cached
15560         variable, so that the message makes sense.
15561
15562 2006-03-24  Simon Josefsson  <jas@extundo.com>
15563
15564         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
15565         including some doc fixes.
15566         (base64_encode_alloc): Fix +1 bug on allocation failures.
15567
15568 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15569
15570         * lib/base64.c (base64_encode): Do not read past end of array with
15571         unsanitized input on systems with CHAR_BIT > 8.
15572
15573 2006-03-24  Eric Blake  <ebb9@byu.net>
15574
15575         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
15576
15577 2006-03-22  Karl Berry  <karl@gnu.org>
15578
15579         * config/srclist.txt (*setenv.[ch]): get from coreutils.
15580         * config/srclistvars.sh (COREUTILS): new var.
15581
15582 2006-03-17  Jim Meyering  <jim@meyering.net>
15583
15584         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
15585         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
15586
15587 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15588
15589         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
15590         no longer needs it.  Instead, check that regoff_t is as least
15591         as wide as ptrdiff_t.
15592
15593         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
15594         so that our regex.h stays compatible with the installed regex.
15595         This is helpful for installers who configure --without-included-regex.
15596         Problem reported by Emanuele Giaquinta.
15597
15598 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15599
15600         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
15601         Typedef to long int, not to off_, as POSIX will likely change
15602         in that direction.
15603
15604 2006-03-15  Eric Blake  <ebb9@byu.net>
15605
15606         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
15607
15608 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15609
15610         * lib/argp-help.c (validate_uparams): Fix typo
15611         * lib/argp-parse.c (argp_default_options): Consistently begin help
15612         messages with a lowercase letter.
15613
15614 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
15615
15616         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
15617         overrun buffers and shouldn't be used (much as gets shouldn't be
15618         used).
15619         * lib/time_r.c (asctime_r, ctime_r): Likewise.
15620
15621 2006-03-08  Simon Josefsson  <jas@extundo.com>
15622
15623         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
15624         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15625
15626 2006-03-08  Simon Josefsson  <jas@extundo.com>
15627
15628         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
15629         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15630
15631 2006-03-08  Simon Josefsson  <jas@extundo.com>
15632
15633         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
15634         signal that configure disabled the device.
15635
15636 2006-03-08  Simon Josefsson  <jas@extundo.com>
15637
15638         * build-aux/maint.mk: Fix refresh-po, to handle no translated
15639         languages.
15640
15641 2006-03-07  Simon Josefsson  <jas@extundo.com>
15642
15643         * modules/getopt (Depends-on): Add unistd.
15644
15645         * modules/unistd: New file.
15646
15647 2006-03-07  Simon Josefsson  <jas@extundo.com>
15648
15649         * modules/gc-random: New file.
15650
15651 2006-03-07  Simon Josefsson  <jas@extundo.com>
15652
15653         * m4/unistd_h.m4: New file.
15654
15655 2006-03-07  Simon Josefsson  <jas@extundo.com>
15656
15657         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
15658         test to be side-effect free by storing the result in the cache
15659         variable gl_cv_lib_readline, and moving the assignment of
15660         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
15661         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15662
15663 2006-03-07  Simon Josefsson  <jas@extundo.com>
15664
15665         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
15666         error on missing devices (the functions will return an error).
15667
15668         * m4/gc.m4: Move random stuff to gc-random.m4
15669
15670 2006-03-07  Simon Josefsson  <jas@extundo.com>
15671
15672         * lib/unistd_.h: New file.
15673
15674 2006-03-07  Simon Josefsson  <jas@extundo.com>
15675
15676         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
15677
15678 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15679
15680         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
15681         Problem reported by Juan Manuel Guerrero.
15682
15683 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15684
15685         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
15686         the unistd module.
15687         * lib/getlogin_r.c: Likewise.
15688         * lib/getlogin_r.h: Likewise.
15689         * lib/glob.c: Likewise.
15690         * lib/pagealign_alloc.c: Likewise.
15691         * lib/unistd_.h: Remove; no longer needed.
15692
15693 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15694
15695         * MODULES.html.sh (Support for systems lacking POSIX:2001):
15696         Add unistd.
15697         * modules/c-stack (Depends-on): Add unistd.
15698         * modules/getlogin_r: Likewise.
15699         * modules/glob: Likewise.
15700         * modules/pagealign_alloc: Likewise.
15701         * modules/unistd (Files): Remove lib/unistd_.h.
15702         (EXTRA_DIST): Remove.
15703         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
15704         need unistd_.h.
15705         (MOSTLYCLEANFILES): Remove unistd.h-t.
15706
15707 2006-03-03  Simon Josefsson  <jas@extundo.com>
15708
15709         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
15710
15711 2006-03-03  Simon Josefsson  <jas@extundo.com>
15712
15713         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
15714         libidn and bison.
15715
15716 2006-03-03  Simon Josefsson  <jas@extundo.com>
15717
15718         * build-aux/maint.mk: Add indent target.
15719
15720 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
15721
15722         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
15723         our replacement poll.h in any case, to avoid a differing
15724         declaration from a system header.  Seen on AIX.
15725
15726 2006-03-01  Simon Josefsson  <jas@extundo.com>
15727
15728         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
15729         <kasal@ucw.cz>.
15730
15731 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15732
15733         * modules/gettime (Depends-on): Add extensions module.
15734         * modules/nanosleep (Depends-on): Likewise.
15735         * modules/settime (Depends-on): Likewise.
15736
15737 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15738
15739         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
15740         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
15741         pedantically.
15742         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15743         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
15744
15745         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
15746         not "==".  Reported by Ralf Wildenhues.
15747
15748 2006-03-01  Karl Berry  <karl@gnu.org>
15749
15750         * doc/Copyright/request-*: new files, synced from gnuorg.
15751
15752 2006-03-01  Karl Berry  <karl@gnu.org>
15753
15754         * config/srclist.txt (Copyright/*): new entries.
15755
15756 2006-02-28  Simon Josefsson  <jas@extundo.com>
15757
15758         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
15759
15760 2006-02-27  Simon Josefsson  <jas@extundo.com>
15761
15762         * lib/base64.h: Indent #define's.  From Jim Meyering
15763         <jim@meyering.net>.
15764
15765 2006-02-27  Jim Meyering  <jim@meyering.net>
15766
15767         Revert the change of 2006-02-24, so these files can continue
15768         to be sync'd from gettext.
15769         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
15770         of `config.h'.
15771
15772 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15773
15774         * modules/intprops: New file.
15775         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
15776         Add intprops.
15777         * modules/getloadavg (Files): Remove lib/intprops.h.
15778         (Depends-on): Add intprops.
15779         * modules/human: Likewise.
15780         * modules/inttostr: Likewise.
15781         * modules/openat: Likewise.
15782         * modules/sig2str: Likewise.
15783         * modules/userspec: Likewise.
15784         * modules/utimecmp: Likewise.
15785         * modules/xnanosleep: Likewise.
15786         * modules/xstrtol: Likewise.
15787
15788 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
15789
15790         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
15791         * modules/lock-tests (TESTS): Use $(EXEEXT).
15792         * modules/tls-tests: Likewise.
15793         * modules/argp-tests: Likewise.
15794         (check_PROGRAMS): New var, replacing...
15795         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
15796
15797 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15798
15799         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
15800         `config.h'.
15801
15802 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
15803
15804         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
15805
15806 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15807
15808         Sync from coreutils.
15809         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
15810         gl_CHDIR_SAFER.
15811
15812 2006-02-22  Jim Meyering  <jim@meyering.net>
15813
15814         Sync from coreutils.
15815         * m4/chdir-safer.m4: New file.
15816
15817 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
15818
15819         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
15820         AT_FDCWD exceeds INT_MAX.
15821         * lib/openat.h (AT_FDCWD): Likewise.
15822
15823 2006-02-17  Eric Blake  <address@hidden>
15824
15825         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
15826
15827 2006-02-16  Simon Josefsson  <jas@extundo.com>
15828
15829         * modules/getaddrinfo (Depends-on): Add sys_socket.
15830
15831 2006-02-15  Simon Josefsson  <jas@extundo.com>
15832
15833         * build-aux/maint.mk: Add dsyntax-check rule.
15834
15835 2006-02-15  Eric Blake  <ebb9@byu.net>
15836
15837         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
15838         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
15839         'present but cannot compile' warnings on cygwin.
15840         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
15841         use ws2tcpip.h if sys/socket.h works.
15842         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
15843         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
15844
15845 2006-02-14  Simon Josefsson  <jas@extundo.com>
15846
15847         * modules/maintainer-makefile (Files): Rename.
15848
15849         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
15850         and (the local) Makefile.cfg to maint-cfg.mk.
15851
15852         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
15853         to the latter.
15854
15855         * modules/maintainer-makefile: New module.
15856
15857         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
15858         severaly stripped to make it possible to build it up from scratch
15859         with reliable tests.
15860
15861         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
15862         fixes to permit overriding the default actions when configure and
15863         makefile are not available.
15864
15865 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
15866
15867         Sync from coreutils.
15868         * modules/lstat (Depends-on): Don't depend on xalloc.
15869         (License): Change from GPL to LGPL, since this is now simply a
15870         replacement for a libc function.
15871
15872 2006-02-14  Jim Meyering  <jim@meyering.net>
15873
15874         Sync from coreutils.
15875
15876         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
15877         failure on deficient systems, and simplify gnulib lgpl dependencies.
15878         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
15879         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
15880
15881         * lib/xalloc-die.c: Remove unused definition of N_.
15882
15883 2006-02-14  Jim Meyering  <jim@meyering.net>
15884
15885         Sync from coreutils.
15886         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
15887         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
15888         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
15889         double-quote uses of that variable, to accommodate the rare case in
15890         which getmntent is available in none of the libraries checked.  This
15891         happens at least on FreeBSD 5.0.
15892
15893 2006-02-13  Simon Josefsson  <jas@extundo.com>
15894
15895         * gnulib-tool (Usage): Fix --import, from
15896         karl@freefriends.org (Karl Berry).
15897
15898 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15899
15900         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
15901
15902 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
15903
15904         * lib/argp-namefrob.h: Restore changes accidentally lost during the
15905         "autoupdate" on 2005-12-12.
15906
15907 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15908
15909         * modules/closeout (Depends-on): Remove atexit.
15910
15911 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15912
15913         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
15914         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
15915
15916 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
15917
15918         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
15919         __EXTENSIONS__ if this causes compilation to fail.  Problem
15920         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
15921         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
15922
15923 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
15924
15925         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
15926         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
15927         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
15928         All uses changed.
15929
15930 2006-01-26  Simon Josefsson  <jas@extundo.com>
15931
15932         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
15933         prototype is visible on mingw32.
15934
15935         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
15936         for mingw32.
15937
15938         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
15939         mingw32).
15940
15941 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
15942
15943         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
15944         attempt to open for write; this always fails, at least on POSIX
15945         hosts.  This reinstates the 2006-01-09 change, which was
15946         inadvertently removed.
15947
15948 2006-01-26  Bruno Haible  <bruno@clisp.org>
15949
15950         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
15951         Reported by Paul Eggert.
15952
15953 2006-01-26  Bruno Haible  <bruno@clisp.org>
15954             Paul Eggert  <eggert@cs.ucla.edu>
15955
15956         * lib/stdbool_.h (_Bool)
15957         [(! (defined __cplusplus || defined __BEOS__)
15958           && !defined __GNUC__
15959           && !(defined __HP_cc || defined __xlc__
15960                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
15961                || defined __sgi))]:
15962         #define to signed char in these cases too; this simplifies
15963         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
15964         etc., separately) and makes it more conservative.
15965
15966 2006-01-25  Simon Josefsson  <jas@extundo.com>
15967
15968         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
15969         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
15970         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
15971
15972 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15973
15974         * lib/argp-namefrob.h: Bugfix. Remove stray #
15975
15976 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
15977
15978         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
15979         so that we test the test.
15980         Check for yet another HP-UX cc bug involving *bool |= bool.
15981
15982 2006-01-25  Karl Berry  <karl@gnu.org>
15983
15984         * config/srclist.txt (vasnprintf.c): sync lost.
15985
15986 2006-01-25  Jim Meyering  <jim@meyering.net>
15987
15988         Sync from the stable (b5) branch of coreutils:
15989
15990         * lib/fts.c (fts_children): Don't let close() clobber errno from
15991         failed fchdir().
15992
15993         * lib/fts.c (fts_stat): When following a symlink-to-directory,
15994         don't necessarily interpret stat-fails+lstat-succeeds as indicating
15995         a dangling symlink.  That can also happen at least for ELOOP.
15996         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
15997         FYI, this bug predates the inclusion of fts.c in coreutils.
15998
15999         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
16000         in their own block, so pre-c99 compilers don't object.
16001
16002         Avoid the double-free (first in fts_read, second in fts_close) that
16003         would occur when an `active' directory is made inaccessible (e.g.,
16004         via chmod a-x) during a traversal.
16005         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
16006         before returning.  Reproduce this failure by
16007         mkdir -p a/b; cd a; chmod a-x . b
16008         Reported by Stavros Passas.
16009
16010 2006-01-25  Jim Meyering  <jim@meyering.net>
16011
16012         * lib/fileblocks.c: Remove more useless parentheses.
16013         * lib/readutmp.h: Likewise.
16014
16015 2006-01-25  Bruno Haible  <bruno@clisp.org>
16016
16017         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
16018         warnings.
16019         Reported by Paul Eggert.
16020
16021 2006-01-25  Bruno Haible  <bruno@clisp.org>
16022
16023         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
16024         rid of a trap command. For Solaris sh.
16025         Reported by Mark D. Baushke <mdb@gnu.org>.
16026
16027 2006-01-24  Simon Josefsson  <jas@extundo.com>
16028
16029         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
16030         Bruno.
16031
16032 2006-01-24  Karl Berry  <karl@gnu.org>
16033
16034         * config/srclist.txt (argp-namefrob.h): sync lost.
16035
16036 2006-01-24  Jim Meyering  <jim@meyering.net>
16037
16038         * modules/openat (Files): Add lib/intprops.h.
16039         From Mark D. Baushke.
16040
16041 2006-01-24  Jim Meyering  <jim@meyering.net>
16042
16043         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
16044         Reported by Mark D. Baushke.
16045
16046 2006-01-24  Jim Meyering  <jim@meyering.net>
16047
16048         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
16049
16050 2006-01-24  Bruno Haible  <bruno@clisp.org>
16051
16052         * modules/strnlen (Maintainer): Change from glibc to all.
16053
16054 2006-01-24  Bruno Haible  <bruno@clisp.org>
16055
16056         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
16057         Patch by Paul Eggert.
16058
16059 2006-01-24  Bruno Haible  <bruno@clisp.org>
16060
16061         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
16062         already has it.
16063         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
16064         2005-11-26.
16065
16066         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
16067         'signed char' to avoid problems with the built-in _Bool type.
16068         Reported by Paul Eggert on 2005-11-26.
16069
16070 2006-01-24  Bruno Haible  <bruno@clisp.org>
16071
16072         * gnulib-tool (func_import): Avoid constructing complicated sed
16073         expressions inside backquote.
16074         Report and solution by Mark D. Baushke <mdb@gnu.org>.
16075
16076 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
16077
16078         These changes imported from libc.
16079         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
16080         test and two separate function calls.
16081         * lib/strndup.c (__strndup): Add libc_hidden_def.
16082
16083 2006-01-23  Simon Josefsson  <jas@extundo.com>
16084
16085         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
16086         Remove the test_*_SOURCES variable: automake infers it by default.
16087         * modules/tls-tests: Likewise.
16088
16089 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16090
16091         Work around porting bugs reported by Dieter in
16092         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
16093         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
16094         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
16095         Include "getopt.h" first, to check interface.
16096         (getenv): Declare only if defined HAVE_DECL_GETENV &&
16097         !HAVE_DECL_GETENV.
16098         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
16099         (__strndup): Revert to K&R-style function dfns, the glibc style.
16100         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
16101         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
16102         Include strnlen.h first, to get prototype properly.
16103         (strnlen): Renamed from __strnlen.
16104         Remove weak alias.
16105
16106 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16107
16108         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
16109
16110 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16111
16112         * config/srclist.txt: Adjust to reflect glibc reorganization.
16113         This affects only comments.
16114
16115 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16116
16117          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
16118          Reported by Bruce Korb <bkorb@gnu.org>.
16119
16120 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
16121
16122         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
16123         to pacify gcc -Wswitch-default.
16124
16125 2006-01-22  Bruno Haible  <bruno@clisp.org>
16126
16127         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
16128         temporary buffer for sprintf, take into account the precision also
16129         for 'd', 'i', 'u', 'o', 'x', 'X'.
16130
16131 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16132
16133         * modules/argp-tests: New module
16134         * tests/test-argp.c: New file
16135         * tests/test-argp-2.sh: New file
16136
16137 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16138
16139         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
16140         (__argp_base_name): Removed
16141         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
16142         typo.
16143         (__argp_base_name): Provide macro definition or extern declaration
16144         depending on the configuration
16145
16146 2006-01-20  Simon Josefsson  <jas@extundo.com>
16147
16148         * modules/inet_ntop (Depends-on): Depend on sys_socket.
16149
16150 2006-01-20  Simon Josefsson  <jas@extundo.com>
16151
16152         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
16153
16154 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16155
16156         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
16157         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
16158         Suggested by Bruno Haible.
16159
16160 2006-01-20  Karl Berry  <karl@gnu.org>
16161
16162         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
16163         until changes propagate, I guess.
16164
16165 2006-01-19  Simon Josefsson  <jas@extundo.com>
16166
16167         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
16168
16169 2006-01-19  Simon Josefsson  <jas@extundo.com>
16170
16171         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
16172
16173 2006-01-19  Simon Josefsson  <jas@extundo.com>
16174
16175         * gnulib-tool: Set check_PROGRAMS.
16176
16177         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16178         modules/des-tests, modules/gc-arcfour-tests,
16179         modules/gc-arctwo-tests, modules/gc-des-tests,
16180         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16181         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16182         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16183         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16184         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16185         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
16186         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
16187         test_*_SOURCES.
16188
16189 2006-01-18  Simon Josefsson  <jas@extundo.com>
16190
16191         * modules/socklen (Depends-on): Depend on sys_socket.
16192
16193 2006-01-18  Simon Josefsson  <jas@extundo.com>
16194
16195         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16196         modules/des-tests, modules/gc-arcfour-tests,
16197         modules/gc-arctwo-tests, modules/gc-des-tests,
16198         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16199         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16200         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16201         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16202         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16203         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
16204         $(EXEEXT) to automake TESTS variable, for mingw32.
16205
16206 2006-01-17  Simon Josefsson  <jas@extundo.com>
16207
16208         * modules/socklen (Include): Need sys/socket.h.
16209
16210 2006-01-17  Bruno Haible  <bruno@clisp.org>
16211
16212         * modules/ssize_t (Include): Add <sys/types.h>.
16213
16214 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
16215
16216         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
16217         it's not portable and it doesn't work with cross-compiles.
16218         Problem reported by Bruno Haible.  Fix missing-$ typo in
16219         'test "gl_cv_ignore_unused_libraries" ...' that prevented
16220         -zignore from being used with Sun's C compiler.
16221
16222 2006-01-12  Simon Josefsson  <jas@extundo.com>
16223
16224         * lib/base64.c: Fix warning, reported by Bruno Haible
16225         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
16226
16227 2006-01-12  Bruno Haible  <bruno@clisp.org>
16228
16229         * modules/ldd: New file.
16230         * build-aux/ldd.sh.in: New file.
16231         * MODULES.html.sh (Support for building libraries and executables): Add
16232         ldd.
16233
16234 2006-01-12  Bruno Haible  <bruno@clisp.org>
16235
16236         * m4/ldd.m4: New file.
16237
16238 2006-01-12  Bruno Haible  <bruno@clisp.org>
16239
16240         * gnulib-tool (func_import, func_create_testdir): Don't go into an
16241         endless loop while replacing $auxdir with build-aux.
16242
16243 2006-01-11  Simon Josefsson  <jas@extundo.com>
16244
16245         * lib/stdint_.h (SIZE_MAX): Add missing (.
16246
16247 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
16248
16249         Sync from coreutils.
16250         * lib/md5.c: Fix commentary typos.
16251         (alignof, UNALIGNED_P): No need for a GCC-specific version.
16252         * lib/md5.h (__attribute__): Remove; unused.
16253         * lib/sha1.c: Fix commentary to match md5 better.
16254         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
16255         so that we don't need to worry about alignment.  All uses changed.
16256         This merges the 2005-10-28 md5 change into sha1.
16257
16258 2006-01-11  Jim Meyering  <jim@meyering.net>
16259
16260         Sync from coreutils.
16261         * lib/md5.c (OP): Fix spacing.
16262
16263 2006-01-11  Bruno Haible  <bruno@clisp.org>
16264
16265         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16266         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
16267         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
16268
16269 2006-01-11  Bruno Haible  <bruno@clisp.org>
16270
16271         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16272         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
16273         the "early" section as well.
16274
16275 2006-01-11  Bruno Haible  <bruno@clisp.org>
16276
16277         Avoid "ar: no archive members specified" error on MacOS X.
16278         * gnulib-tool (func_modules_add_dummy): New function.
16279         (func_import, func_create_testdir): Invoke it.
16280
16281 2006-01-11  Bruno Haible  <bruno@clisp.org>
16282
16283         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
16284         with $auxdir in AC_CONFIG_FILES statements.
16285
16286 2006-01-11  Bruno Haible  <bruno@clisp.org>
16287
16288         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
16289         Initialize also noinst_HEADERS to empty.
16290
16291 2006-01-11  Bruno Haible  <bruno@clisp.org>
16292
16293         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
16294         variables.
16295         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
16296         autoreconf.
16297
16298 2006-01-11  Bruno Haible  <bruno@clisp.org>
16299
16300         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
16301         overridable by the user.
16302         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16303
16304 2006-01-10  Simon Josefsson  <jas@extundo.com>
16305
16306         * modules/sys_socket: New file.
16307
16308 2006-01-10  Simon Josefsson  <jas@extundo.com>
16309
16310         * m4/sys_socket_h.m4: New file.
16311
16312 2006-01-10  Simon Josefsson  <jas@extundo.com>
16313
16314         * lib/socket_.h: New file.
16315
16316 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16317
16318         * modules/readutmp (Maintainer): Add myself.
16319
16320 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16321
16322         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
16323         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
16324         People who are still concerned with buggy memcmp implementations
16325         can invoke gl_FUNC_MEMCMP themselves.
16326
16327 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16328
16329         * lib/regex_internal.h (BITSET_WORD_BITS):
16330         Work around a bug in 64-bit PGC (before version 6.1-2), where the
16331         preprocessor mishandles large unsigned values as if they were signed.
16332         Problem reported by Claudio Fontana in
16333         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
16334
16335 2006-01-10  Jim Meyering  <jim@meyering.net>
16336
16337         Avoid the double-free (first in fts_read, second in fts_close) that
16338         would occur when an `active' directory is made inaccessible (e.g.,
16339         via chmod a-x) during a traversal.
16340         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
16341         before returning.  Reproduce this failure by
16342         mkdir -p a/b; cd a; chmod a-x . b
16343         Reported by Stavros Passas.
16344
16345         Sync from coreutils.
16346         * lib/sha1.c: Tweak grammar in a comment.
16347
16348 2006-01-10  Jim Meyering  <jim@meyering.net>
16349
16350         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
16351         Patch by Joerg Sonnenberger.
16352
16353 2006-01-10  Bruno Haible  <bruno@clisp.org>
16354
16355         * modules/readutmp: Depend on module free.
16356         * modules/strtok_r: Depend on module restrict.
16357
16358 2006-01-10  Bruno Haible  <bruno@clisp.org>
16359
16360         * modules/gettext (configure.ac): Add an invocation of
16361         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
16362
16363 2006-01-10  Bruno Haible  <bruno@clisp.org>
16364
16365         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
16366         Reported by Werner Lemberg <wl@gnu.org>.
16367
16368 2006-01-10  Bruno Haible  <bruno@clisp.org>
16369
16370         * lib/localcharset.c: Update from GNU gettext.
16371
16372 2006-01-10  Bruno Haible  <bruno@clisp.org>
16373
16374         * lib/argp.h (__const): Remove macro. Use const instead.
16375         * lib/argp-fmtstream.h (__const): Likewise.
16376         * lib/glob_.h (__const): Remove macro.
16377         * lib/glob-libc.h: Use const instead of __const.
16378
16379 2006-01-10  Bruno Haible  <bruno@clisp.org>
16380
16381         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
16382         variable.
16383         Needed to avoid an automake error regarding the 'gettext' module.
16384
16385 2006-01-09  Simon Josefsson  <jas@extundo.com>
16386
16387         * modules/inet_ntop (Depends-on): Add restrict.
16388
16389 2006-01-09  Simon Josefsson  <jas@extundo.com>
16390
16391         * modules/gc-rijndael-tests (License): Put under LGPL.
16392
16393         * modules/gc-des-tests (License): Likewise.
16394
16395         * modules/gc-arcfour-tests (License): Likewise.
16396
16397         * modules/gc-arctwo-tests (License): Likewise.
16398
16399         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
16400
16401         * modules/gc-hmac-sha1-tests (Files): Likewise.
16402
16403         * modules/gc-hmac-md5-tests (License): Likewise.
16404
16405         * modules/gc-sha1-tests (License): Likewise.
16406
16407         * modules/gc-md5-tests (License): Likewise.
16408
16409         * modules/gc-md4-tests (License): Likewise.
16410
16411         * modules/gc-md2-tests (License): Likewise.
16412
16413         * modules/gc-tests (License): Likewise.
16414
16415         * modules/des-tests (License): Likewise.
16416
16417         * modules/md4-tests (License): Likewise.
16418
16419         * modules/md2-tests (License): Likewise.
16420
16421 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16422
16423         Sync from coreutils:
16424
16425         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
16426         * modules/lib-ignore: New file.
16427         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
16428         chdir-safer.m4, lchmod.m4.
16429         * modules/openat: Add mkdirat.c, openat-priv.h.
16430
16431 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16432
16433         Sync from coreutils.
16434         * m4/lib-ignore.m4: New file.
16435         * m4/lchmod.m4: New file.
16436
16437 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16438
16439         Sync from coreutils.
16440         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
16441         for write access: POSIX says that must fail.
16442         * lib/fts.c (diropen): Likewise.
16443         * lib/save-cwd.c (save_cwd): Likewise.
16444         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
16445         well, for minor improvements on hosts that lack O_DIRECTORY.
16446         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
16447         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
16448         Fall back on chown if open failed with EACCES.
16449
16450         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
16451         Report an error at compile-time if only a 1-second nominal clock
16452         resolution is found.
16453
16454         * lib/lchmod.h: New file.
16455         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
16456         (make_dir_parents): Use lchown rather than chown, and
16457         lchmod rather than chmod.
16458
16459         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
16460         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
16461         "proc" reported by n0dalus.
16462
16463         * lib/mountlist.c: Include <limits.h>.
16464         (dev_from_mount_options)
16465         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
16466         New function.  It no longer assumes "dev=" has the System V meaning
16467         on Linux (since it doesn't).  It also parses "dev=" more carefully.
16468         (read_file_system_list)
16469         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
16470         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
16471         dev= in that case.
16472
16473         * lib/posixtm.h (PDS_PRE_2000): New macro.
16474         * lib/posixtm.c (year): Arg is now syntax_bits rather than
16475         allow_century.  All usages changed.  Reject dates outside the range
16476         1969-1999 if PDS_PRE_2000 is used.
16477
16478 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16479
16480         Sync from coreutils.
16481         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
16482         (Time of day items): Mention the possibility of leap seconds.
16483         Problem reported by Dr. David Alan Gilbert.
16484
16485 2006-01-09  Jim Meyering  <jim@meyering.net>
16486
16487         Sync from coreutils.
16488
16489         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
16490
16491         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
16492
16493         * lib/modechange.c (mode_compile): Reject an invalid mode string
16494         that starts with an octal digit.  From Andreas Gruenbacher.
16495
16496         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
16497         and dup to open_safer and dup_safer, respectively.
16498         (openat_permissive): Fix typo in comment.
16499
16500         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
16501         "gettext.h"; either no longer needed or are guaranteed by openat.h.
16502         (_): Remove; no longer needed.
16503         (openat): Renamed from rpl_openat; no need for rpl_openat
16504         since openat.h renames openat for us.
16505         Replace most of the body with a call to openat_permissive,
16506         to avoid duplicate code.
16507         Port to (probably hypothetical) environments were mode_t is
16508         wider than int.
16509         (openat_permissive): Require mode arg, so that we can check
16510         types better.  Put it just after flags.  Change cwd failure
16511         indicator from pointer-to-bool to pointer-to-errno-value.
16512         All callers changed.
16513         Invoke openat_save_fail and/or openat_restore_fail if
16514         cwd_errno is null, so that openat can call us.
16515         (openat_permissive, fdopendir, fstatat, unlinkat):
16516         Simplify errno handling to avoid some duplicate code,
16517         as it's OK to set errno on success.
16518         * lib/openat.h: Revamp code so that function macros depend on
16519         __OPENAT_PREFIX only, not also on AT_FDCWD.
16520         (openat_ro): Remove.  Caller changed to use openat_permissive.
16521         (openat_permissive): Now a macro, if not a function.
16522         (openat_restore_fail, openat_save_fail): Now always functions,
16523         since mkdirat needs them even if __OPENAT_PREFIX is defined.
16524
16525         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
16526         and openat.c.
16527         * lib/mkdirat.c: Include openat-priv.h.
16528         Remove definitions of macros defined therein.
16529         * lib/openat.c: Likewise.
16530
16531         * lib/mkdirat.c (mkdirat): New file and function.
16532         * lib/openat.h (mkdirat): Declare.
16533
16534         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
16535
16536         * lib/openat.h (openat_permissive): Declare.
16537         (openat_ro): Define.
16538
16539         * lib/openat.c (EXPECTED_ERRNO): New macro.
16540         (openat_permissive): New function -- used in remove.c rewrite.
16541         (all functions): Set errno just before returning, only if there
16542         was an actual failure.
16543         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
16544
16545         Emulate openat-family functions using Linux's procfs, if possible.
16546         Idea and some code based on Ulrich Drepper's glibc changes.
16547
16548         * lib/openat.c: (BUILD_PROC_NAME): New macro.
16549         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
16550         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
16551         before falling back on save_cwd and restore_cwd.
16552         (fdopendir, fstatat, unlinkat): Likewise.
16553
16554         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
16555         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
16556
16557         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
16558         as second argument to va_arg.  Otherwise, some versions of gcc
16559         warn that `if this code is reached, the program will abort'.
16560
16561 2006-01-09  Jim Meyering  <jim@meyering.net>
16562
16563         Sync from coreutils.
16564         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
16565         Require openat-priv.h.
16566
16567 2006-01-09  Bruno Haible  <bruno@clisp.org>
16568
16569         * modules/strnlen (Include): Use strnlen.h.
16570
16571 2006-01-09  Bruno Haible  <bruno@clisp.org>
16572
16573         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
16574
16575 2006-01-09  Bruno Haible  <bruno@clisp.org>
16576
16577         * lib/sysexit_.h (EX_OK): New macro.
16578         Suggested by Martin Lambers <marlam@marlam.de>.
16579
16580 2006-01-09  Bruno Haible  <bruno@clisp.org>
16581
16582         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
16583         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
16584
16585 2006-01-09  Bruno Haible  <bruno@clisp.org>
16586
16587         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
16588         numbers.
16589
16590 2006-01-09  Bruno Haible  <bruno@clisp.org>
16591
16592         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
16593         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
16594         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
16595         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
16596
16597 2006-01-09  Bruno Haible  <bruno@clisp.org>
16598
16599         * build-aux/javacomp.sh.in: New file, moved from lib/.
16600         * modules/javacomp-script (Files): Update.
16601         (configure.ac): Add AC_CONFIG_FILES invocation.
16602         (EXTRA_DIST): Remove variable.
16603
16604         * build-aux/javaexec.sh.in: New file, moved from lib/.
16605         * modules/javaexec (Files): Update.
16606         (configure.ac): Add AC_CONFIG_FILES invocation.
16607         (EXTRA_DIST): Remove javaexec.sh.in.
16608
16609         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
16610         * modules/csharpcomp-script (Files): Update.
16611         (configure.ac): Add AC_CONFIG_FILES invocation.
16612         (EXTRA_DIST): Remove variable.
16613
16614         * build-aux/csharpexec.sh.in: New file, moved from lib/.
16615         * modules/csharpexec (Files): Update.
16616         (configure.ac): Add AC_CONFIG_FILES invocation.
16617         (EXTRA_DIST): Remove csharpexec.sh.in.
16618
16619 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16620
16621         Sync from coreutils.
16622
16623         Add POSIX ACL support
16624         * lib/acl.h (copy_acl, set_acl): Add declarations.
16625         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
16626         systems other than Linux.
16627         (chmod_or_fchmod): New function: use fchmod when possible,
16628         and chmod otherwise.
16629         (file_has_acl): Add a POSIX ACL implementation, with a
16630         Linux-specific subcase.
16631         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
16632         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
16633         acls are unsupported.
16634         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
16635         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
16636         are unsupported.
16637
16638 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16639
16640         Sync from coreutils.
16641         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
16642
16643 2006-01-07  Bruno Haible  <bruno@clisp.org>
16644
16645         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
16646         gl_EARLY.
16647
16648 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16649
16650         * lib/strftime.c (tzname): Don't declare if it is already #defined.
16651         Problem reported for Mingw by Mark Junker.
16652
16653 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16654
16655         * README: Gnulib normally doesn't generate a tarball.
16656
16657 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
16658
16659         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
16660         long int, not int, for nanosecond counts, so that people who are
16661         used to POSIX struct timespec won't be surprised.  Reported by Jim
16662         Meyering.
16663
16664 2005-12-28  Bruno Haible  <bruno@clisp.org>
16665
16666         * build-aux/config.rpath: Update from GNU gettext.
16667
16668 2005-12-16  Jim Meyering  <jim@meyering.net>
16669
16670         * modules/fprintftime: New module.
16671         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
16672
16673 2005-12-16  Jim Meyering  <jim@meyering.net>
16674
16675         * m4/fprintftime.m4: New file.
16676
16677 2005-12-16  Jim Meyering  <jim@meyering.net>
16678
16679         * lib/fprintftime.c, lib/fprintftime.h: New files.
16680
16681 2005-12-15  Simon Josefsson  <jas@extundo.com>
16682
16683         * modules/socklen (configure.ac): Fix M4 macro name, to align with
16684         new m4/socklen.m4.
16685
16686 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16687
16688         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
16689         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
16690
16691 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16692
16693         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
16694         * lib/argp-help.c (fill_in_uparams): Check if the constructed
16695         struct uparams is valid. Fall back to the default values if it is
16696         not.
16697
16698 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16699
16700         * modules/argp (Files): Add argp-pin.c
16701         (Depends-on): dirname
16702         (lib_SOURCES): Add argp-pin.c
16703
16704 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16705
16706         * m4/argp.m4:  Check if program_invocation_name and
16707         program_invocation_short_name are declared and define appropriate
16708         macros if they are not.
16709
16710 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16711
16712         * lib/argp-help.c (__argp_base_name): New function
16713         (__argp_short_program_name): Rewrite using __argp_base_name
16714         * lib/argp-namefrob.h: Define program_invocation_name and
16715         program_invocation_short_name if requested
16716         (__argp_base_name): Add prototype
16717         * lib/argp-parse.c (argp_def): Use gettext wrappers
16718         (argp_default_parser): Use __argp_base_name
16719         * lib/argp-pin.c: New file. Defines program_invocation_name and
16720         program_invocation_short_name on systems that lack them.
16721
16722 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16723
16724         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
16725         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16726         porting problem reported by Georg Schwarz in
16727         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16728
16729 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16730
16731         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
16732         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16733         porting problem reported by Georg Schwarz in
16734         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16735
16736 2005-12-05  Bruno Haible  <bruno@clisp.org>
16737
16738         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
16739         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
16740         Reported by Mark Junker <mjscod@gmx.de>.
16741
16742 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
16743
16744         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
16745         Use implementation from Albert Chin, with some
16746         comments/corrections by Stepan Kasal and myself.
16747
16748 2005-12-02  Bruno Haible  <bruno@clisp.org>
16749
16750         * gnulib-tool (func_import): Accept GPLed build tool modules when
16751         --lgpl is given.
16752         * modules/csharpcomp-script: New file.
16753         * modules/csharpcomp: Depend on it.
16754         * modules/javacomp-script: New file.
16755         * modules/javacomp: Depend on it.
16756         Suggested by Simon Josefsson.
16757
16758 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
16759
16760         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
16761         statement, to work around an HP-UX 10.20 compiler bug reported by
16762         Peter O'Gorman.
16763
16764 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16765
16766         * modules/savedir (Depends-on): Add openat.
16767
16768 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16769
16770         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
16771         (uintmax_t) [defined uintmax_t]: Do not declare.
16772         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
16773         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
16774         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
16775         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
16776         sake of portability to weird hosts that C allows (though we don't
16777         know of any practical examples).
16778
16779         * lib/savedir.h (fdsavedir): New decl.
16780         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
16781         contains most of the former guts of savedir.
16782         (savedir): Use savedirstream.
16783         Include "openat.h".
16784
16785 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16786
16787         * modules/obstack (Files): Add m4/ulonglong.m4.
16788         Problem reported by Davide Angelocola.
16789
16790 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
16791
16792         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
16793         coreutils no longer futzes with rounding modes.
16794
16795 2005-11-14  Jim Meyering  <jim@meyering.net>
16796
16797         * lib/mkstemp-safer.c: Include <config.h>, required for possible
16798         replacement of mkstemp.
16799
16800 2005-11-10  Simon Josefsson  <jas@extundo.com>
16801
16802         * lib/readline.c: Remove EOL.
16803
16804 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16805
16806         * modules/gethrxtime (Depends-on): Add gettime.
16807
16808 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16809
16810         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
16811         or gettimeofday; no longer needed.
16812
16813 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16814
16815         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
16816         time business.
16817         (gethrxtime) [! (HAVE_NANOUPTIME
16818         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
16819         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
16820         our own approximation.
16821
16822 2005-11-08  Eric Blake  <ebb9@byu.net>
16823
16824         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16825
16826 2005-11-08  Eric Blake  <ebb9@byu.net>
16827
16828         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16829
16830 2005-11-04  Bruno Haible  <bruno@clisp.org>
16831
16832         * gnulib-tool: Implement --update mode.
16833
16834 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16835
16836         Fix porting problem reported by Theodoros V. Kalamatianos.
16837         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
16838         Don't assume that futimes failing means we must fail.
16839
16840 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16841
16842         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
16843         variables to suggest the intended function of the PATH_MAX check.
16844
16845 2005-10-30  Kean Johnston  <jkj@sco.com>
16846
16847         Trivial changes to support SCO systems.
16848         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
16849         as PATH_MAX.
16850         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
16851         where __ptr is null when no I/O is pending.
16852
16853 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16854
16855         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
16856         leave errno alone.  Problem reported by Dmitry V. Levin.
16857
16858 2005-10-28  Simon Josefsson  <jas@extundo.com>
16859
16860         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
16861         Test more.
16862
16863         * tests/test-gc-md2.c, tests/test-md2.c: New files.
16864
16865         * modules/md2, modules/md2-tests: New files.
16866
16867 2005-10-28  Simon Josefsson  <jas@extundo.com>
16868
16869         * m4/inet_ntop.m4: More tests.
16870
16871         * m4/gc-md2.m4, md2.m4: New file.
16872
16873 2005-10-28  Simon Josefsson  <jas@extundo.com>
16874
16875         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
16876         "restrict" keywords, as per POSIX.  Protect the function
16877         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
16878         Don't use K&R prototypes.  Check the sprintf return values.
16879         Re-define EAFNOSUPPORT if not present.  Indent.
16880
16881         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
16882         suggested by Bruno Haible <bruno@clisp.org>.
16883
16884         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
16885
16886         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
16887
16888         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
16889         libgcrypt).
16890
16891         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
16892
16893         * lib/md2.h, lib/md2.c: New files.
16894
16895 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
16896
16897         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
16898         errno alone.  Problem reported by Frederic Jolliton.
16899
16900 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
16901
16902         * modules/verify (License): Change from GPL to LGPL.  This is a
16903         tiny module and there are apparently near-equivalents that are
16904         under the BSD license.
16905
16906 2005-10-24  Simon Josefsson  <jas@extundo.com>
16907
16908         * modules/sha1: Relicense to LGPL.
16909
16910 2005-10-24  Simon Josefsson  <jas@extundo.com>
16911
16912         * lib/md4.h: Shrink buffer size, now that we changed the type.
16913
16914 2005-10-23  Simon Josefsson  <jas@extundo.com>
16915
16916         * gnulib-tool (func_import): Fix --tests-base.
16917
16918 2005-10-22  Simon Josefsson  <jas@extundo.com>
16919
16920         * modules/arcfour (Depends-on): Need stdint.
16921
16922 2005-10-22  Simon Josefsson  <jas@extundo.com>
16923
16924         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
16925         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
16926
16927 2005-10-22  Simon Josefsson  <jas@extundo.com>
16928
16929         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
16930         suggested by Bruno Haible <bruno@clisp.org>.
16931
16932 2005-10-22  Simon Josefsson  <jas@extundo.com>
16933
16934         * lib/crc.h: Include stddef.h, for size_t.
16935
16936 2005-10-22  Simon Josefsson  <jas@extundo.com>
16937
16938         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
16939         arcfour_context struct (simplify test vector testing in GNU
16940         Shishi).
16941
16942 2005-10-21  Simon Josefsson  <jas@extundo.com>
16943
16944         * modules/des, modules/des-tests: New files.
16945
16946         * modules/gc-des, modules/gc-des-tests: New files.
16947
16948         * tests/test-des.c, tests/test-gc-des.c: New file.
16949
16950 2005-10-21  Simon Josefsson  <jas@extundo.com>
16951
16952         * modules/arctwo, modules/arctwo-tests: New files.
16953
16954         * tests/test-arctwo.c: New file.
16955
16956         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
16957
16958         * tests/test-gc-arctwo.c: New file.
16959
16960 2005-10-21  Simon Josefsson  <jas@extundo.com>
16961
16962         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
16963         Bruno Haible <bruno@clisp.org>.
16964
16965         * m4/gc-des.m4: New file.
16966
16967 2005-10-21  Simon Josefsson  <jas@extundo.com>
16968
16969         * m4/arctwo.m4: New file.
16970
16971         * m4/gc-arctwo.m4: New file.
16972
16973 2005-10-21  Simon Josefsson  <jas@extundo.com>
16974
16975         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
16976         block.
16977
16978 2005-10-21  Simon Josefsson  <jas@extundo.com>
16979
16980         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
16981         <bruno@clisp.org>.
16982
16983         * lib/hmac-sha1.c (hmac_sha1): Likewise.
16984
16985         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
16986         Bruno Haible <bruno@clisp.org>.
16987
16988         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
16989         <bruno@clisp.org>.
16990
16991 2005-10-21  Simon Josefsson  <jas@extundo.com>
16992
16993         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
16994
16995 2005-10-21  Simon Josefsson  <jas@extundo.com>
16996
16997         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
16998
16999 2005-10-21  Simon Josefsson  <jas@extundo.com>
17000
17001         * lib/des.h, lib/des.c: New files.
17002
17003         * lib/gc-gnulib.c: Support DES.c
17004
17005 2005-10-21  Simon Josefsson  <jas@extundo.com>
17006
17007         * lib/arctwo.h, lib/arctwo.c: New files.
17008
17009         * lib/gc-gnulib.c: Support ARCTWO.
17010
17011 2005-10-21  Simon Josefsson  <jas@extundo.com>
17012
17013         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
17014         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
17015
17016 2005-10-21  Simon Josefsson  <jas@extundo.com>
17017
17018         * gnulib-tool (func_import, func_create_testdir): Define automake
17019         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
17020         Makefile.am snippet),
17021         suggested by Bruno Haible <bruno@clisp.org>.
17022
17023         * modules/gc (Makefile.am): Use it.
17024
17025 2005-10-21  Bruno Haible  <bruno@clisp.org>
17026
17027         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
17028         patch.
17029
17030 2005-10-19  Simon Josefsson  <jas@extundo.com>
17031
17032         * tests/test-gc-rijndael.c: New file.
17033
17034         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
17035
17036 2005-10-19  Simon Josefsson  <jas@extundo.com>
17037
17038         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
17039         interface too.
17040
17041 2005-10-19  Simon Josefsson  <jas@extundo.com>
17042
17043         * tests/test-gc-arcfour.c: New file.
17044
17045         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
17046
17047 2005-10-19  Simon Josefsson  <jas@extundo.com>
17048
17049         * modules/gc-md4, modules/gc-md4-tests: New file.
17050
17051         * tests/test-gc-md4.c: New file.
17052
17053 2005-10-19  Simon Josefsson  <jas@extundo.com>
17054
17055         * m4/gc-md4.m4: New file.
17056
17057 2005-10-19  Simon Josefsson  <jas@extundo.com>
17058
17059         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
17060         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
17061         <kasal@ucw.cz>.
17062
17063 2005-10-19  Simon Josefsson  <jas@extundo.com>
17064
17065         * m4/gc-arcfour.m4: New file.
17066
17067         * m4/gc-rijndael.m4: New file.
17068
17069 2005-10-19  Simon Josefsson  <jas@extundo.com>
17070
17071         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
17072
17073 2005-10-19  Simon Josefsson  <jas@extundo.com>
17074
17075         * lib/gc-gnulib.c: Support ARCFOUR.
17076
17077 2005-10-19  Simon Josefsson  <jas@extundo.com>
17078
17079         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
17080         support.
17081
17082         * lib/gc.h: Add ECB enum type.
17083
17084         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
17085
17086 2005-10-18  Simon Josefsson  <jas@extundo.com>
17087
17088         * tests/test-md5.c: New file.
17089
17090         * modules/md5-tests: New file.
17091
17092 2005-10-18  Simon Josefsson  <jas@extundo.com>
17093
17094         * tests/test-md4.c: New file.
17095
17096         * modules/md4, modules/md4-tests: New files.
17097
17098 2005-10-18  Simon Josefsson  <jas@extundo.com>
17099
17100         * m4/md4.m4: New file.
17101
17102 2005-10-18  Simon Josefsson  <jas@extundo.com>
17103
17104         * lib/md4.h, lib/md4.c: New files, based on md5.?.
17105
17106 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
17107
17108         * gnulib-tool (func_create_testdir): Omit the second check whether
17109         BUILT_SOURCES in nonempty.
17110
17111 2005-10-17  Simon Josefsson  <jas@extundo.com>
17112
17113         * tests/test-rijndael.c: New file.
17114
17115 2005-10-17  Simon Josefsson  <jas@extundo.com>
17116
17117         * modules/sha1: Depend on stdint instead of md5.
17118
17119         * modules/md5: Depend on stdint, remove uint32_t.
17120
17121 2005-10-17  Simon Josefsson  <jas@extundo.com>
17122
17123         * modules/gc-sha1-tests: New file.
17124
17125         * tests/test-gc-sha1.c: New file.
17126
17127 2005-10-17  Simon Josefsson  <jas@extundo.com>
17128
17129         * m4/md5.m4: Remove call to uint32_t.m4.
17130
17131 2005-10-17  Simon Josefsson  <jas@extundo.com>
17132
17133         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
17134
17135         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
17136         md5.h.
17137
17138         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
17139
17140         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
17141
17142 2005-10-17  Simon Josefsson  <jas@extundo.com>
17143
17144         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
17145
17146 2005-10-17  Simon Josefsson  <jas@extundo.com>
17147
17148         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
17149
17150 2005-10-17  Simon Josefsson  <jas@extundo.com>
17151
17152         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
17153
17154         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
17155
17156 2005-10-17  Bruno Haible  <bruno@clisp.org>
17157
17158         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
17159         that it can also be used in a test.
17160
17161 2005-10-16  Bruno Haible  <bruno@clisp.org>
17162
17163         * gnulib-tool (func_emit_tests_Makefile_am): Also define
17164         TESTS_ENVIRONMENT, so that individual tests can augment it.
17165
17166         * gnulib-tool (func_create_testdir): Use an intermediate target for
17167         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
17168         macros, like $(ALLOCA_H), which cannot be passed through the command
17169         line.
17170
17171 2005-10-15  Simon Josefsson  <jas@extundo.com>
17172
17173         * modules/rijndael-tests: New file.
17174
17175         * modules/rijndael: New file.
17176
17177 2005-10-15  Simon Josefsson  <jas@extundo.com>
17178
17179         * m4/rijndael.m4: New file.
17180
17181 2005-10-15  Simon Josefsson  <jas@extundo.com>
17182
17183         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
17184
17185         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
17186
17187 2005-10-14  Simon Josefsson  <jas@extundo.com>
17188
17189         * tests/test-arcfour.c: New file.
17190
17191         * modules/arcfour, modules/arcfour-tests: New files.
17192
17193 2005-10-14  Simon Josefsson  <jas@extundo.com>
17194
17195         * m4/arcfour.m4: New file.
17196
17197 2005-10-14  Simon Josefsson  <jas@extundo.com>
17198
17199         * lib/arcfour.h, lib/arcfour.c: New files.
17200
17201 2005-10-14  Roland McGrath  <roland@redhat.com>
17202
17203         Import from libc.  [BZ #1331]
17204         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
17205         macro argument.
17206         Reported by Matej Vela <vela@debian.org>.
17207
17208 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17209
17210         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
17211         include <wchar.h>; no longer needed.
17212
17213 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17214
17215         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
17216
17217 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
17218         and  Ulrich Drepper  <drepper@redhat.com>
17219
17220         Import from libc.
17221         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
17222         instead of inline stream orientation test and two separate
17223         function calls.  Pay no attention to USE_IN_LIBIO.
17224
17225 2005-10-13  Simon Josefsson  <jas@extundo.com>
17226
17227         * modules/gc-hmac-md5-tests: New file.
17228
17229         * tests/test-gc-hmac-sha1.c: New file.
17230
17231         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
17232
17233         * modules/gc-hmac-md5-tests: New file.
17234
17235         * tests/test-gc-md5.c: New file.
17236
17237         * modules/gc-md5-tests: New file.
17238
17239 2005-10-13  Simon Josefsson  <jas@extundo.com>
17240
17241         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
17242         Move memory allocation outside of loop.
17243
17244 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
17245
17246         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
17247         intermediate directory is in a read-only file system.  Problem
17248         reported by Eric Blake.
17249
17250 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
17251
17252         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
17253
17254 2005-10-12  Simon Josefsson  <jas@extundo.com>
17255
17256         * tests/test-hmac-sha1.c: New file.
17257
17258         * modules/hmac-sha1-tests: New file.
17259
17260         * modules/hmac-sha1: New file.
17261
17262 2005-10-12  Simon Josefsson  <jas@extundo.com>
17263
17264         * modules/gc-sha1: New file.
17265
17266 2005-10-12  Simon Josefsson  <jas@extundo.com>
17267
17268         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
17269
17270         * tests/test-gc-pbkdf2-sha1.c: New file.
17271
17272 2005-10-12  Simon Josefsson  <jas@extundo.com>
17273
17274         * modules/gc-md5, modules/gc-hmac-md5: New files.
17275
17276         * modules/gc (Files): Remove md5, memxor and hmac files.
17277
17278 2005-10-12  Simon Josefsson  <jas@extundo.com>
17279
17280         * m4/gc-pbkdf2-sha1.m4: New file.
17281
17282         * m4/gc-hmac-sha1.m4: New file.
17283
17284         * m4/gc-sha1: New file.
17285
17286         * m4/hmac-sha1.m4: New file.
17287
17288 2005-10-12  Simon Josefsson  <jas@extundo.com>
17289
17290         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
17291
17292         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
17293
17294 2005-10-12  Simon Josefsson  <jas@extundo.com>
17295
17296         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
17297         suggested by Bruno Haible <bruno@clisp.org>.
17298
17299 2005-10-12  Simon Josefsson  <jas@extundo.com>
17300
17301         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
17302
17303 2005-10-12  Simon Josefsson  <jas@extundo.com>
17304
17305         * lib/gc-pbkdf2-sha1.c: New file.
17306
17307         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
17308
17309 2005-10-12  Simon Josefsson  <jas@extundo.com>
17310
17311         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
17312
17313         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
17314
17315 2005-10-12  Simon Josefsson  <jas@extundo.com>
17316
17317         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
17318         GC_USE_HMAC_MD5, respectively.
17319
17320         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
17321         (gc_md5): Fix typo.
17322
17323         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
17324
17325         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
17326
17327         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
17328
17329 2005-10-12  Bruno Haible  <bruno@clisp.org>
17330
17331         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
17332         Reported by Stepan Kasal <kasal@ucw.cz>.
17333
17334 2005-10-11  Simon Josefsson  <jas@extundo.com>
17335
17336         * tests/test-crc.c: New file.
17337
17338         * modules/crc, modules/crc-tests: New files.
17339
17340 2005-10-11  Simon Josefsson  <jas@extundo.com>
17341
17342         * m4/crc.m4: New file.
17343
17344 2005-10-11  Simon Josefsson  <jas@extundo.com>
17345
17346         * lib/gc.h: Add gc_hash and gc_hash_buffer.
17347
17348         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
17349
17350         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
17351
17352 2005-10-11  Simon Josefsson  <jas@extundo.com>
17353
17354         * lib/crc.h, lib/crc.c: New files.
17355
17356         * lib/gc.h (gc_hash_buffer): Add doc.
17357
17358 2005-10-11  Bruno Haible  <bruno@clisp.org>
17359
17360         * modules/c-strcasestr: New file.
17361         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
17362
17363 2005-10-11  Bruno Haible  <bruno@clisp.org>
17364
17365         * modules/c-strcase: New file.
17366         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
17367
17368 2005-10-11  Bruno Haible  <bruno@clisp.org>
17369
17370         * lib/strcasecmp.c: Include limits.h.
17371         (strcasecmp): Avoid integer overflow on exotic platforms.
17372         * lib/strncasecmp.c: Include limits.h.
17373         (strncasecmp): Avoid integer overflow on exotic platforms.
17374         Reported by Paul Eggert.
17375
17376 2005-10-11  Bruno Haible  <bruno@clisp.org>
17377
17378         * lib/c-strcasestr.h: New file, from GNU gettext.
17379         * lib/c-strcasestr.c: New file, from GNU gettext.
17380
17381 2005-10-11  Bruno Haible  <bruno@clisp.org>
17382
17383         * lib/c-strcase.h: New file, from GNU gettext.
17384         * lib/c-strcasecmp.c: New file, from GNU gettext.
17385         * lib/c-strncasecmp.c: New file, from GNU gettext.
17386
17387 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17388
17389         * modules/mempcpy (License): GPL -> LGPL.
17390         * modules/strchrnul (License): Likewise.
17391         * modules/sysexits (License): Likewise.
17392
17393 2005-10-08  Simon Josefsson  <jas@extundo.com>
17394
17395         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
17396
17397 2005-10-07  Simon Josefsson  <jas@extundo.com>
17398
17399         * m4/memxor.m4: Remove gl_C_RESTRICT call.
17400
17401 2005-10-06  Simon Josefsson  <jas@extundo.com>
17402
17403         * tests/test-hmac-md5.c: New file.
17404
17405         * modules/hmac-md5-tests: New file.
17406
17407         * modules/hmac-md5: New file.
17408
17409 2005-10-06  Simon Josefsson  <jas@extundo.com>
17410
17411         * m4/hmac-md5.m4: New file.
17412
17413         * m4/memxor.m4: Require gl_C_RESTRICT.
17414
17415 2005-10-06  Simon Josefsson  <jas@extundo.com>
17416
17417         * lib/memxor.c (memxor): Avoid casts and warnings.
17418
17419 2005-10-06  Simon Josefsson  <jas@extundo.com>
17420
17421         * lib/hmac-md5.c: New file.
17422
17423         * lib/hmac.h: New file.
17424
17425 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17426
17427         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
17428         promotes to int, not unsigned int, to catch the AIX 5.3
17429         compiler bug.
17430
17431 2005-10-05  Simon Josefsson  <jas@extundo.com>
17432
17433         * modules/memxor: New file.
17434
17435         * modules/iconv (Files): Move config.rpath to havelib, it is used
17436         there.
17437
17438         * modules/havelib (Files): Add config.rpath.
17439
17440 2005-10-05  Simon Josefsson  <jas@extundo.com>
17441
17442         * m4/memxor.m4: New file.
17443
17444 2005-10-05  Simon Josefsson  <jas@extundo.com>
17445
17446         * lib/memxor.c (memxor): Fix compiler error.
17447
17448         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
17449         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
17450
17451         * lib/memxor.h, lib/memxor.c: New files.
17452
17453         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
17454         we assume all systems have it, suggested by Jim Meyering
17455         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
17456         any systems lack sys/socket.h; mingw32 is known to lack it, but we
17457         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
17458         same reasons.
17459
17460 2005-10-05  Simon Josefsson  <jas@extundo.com>
17461
17462         * config/srclist.txt: Add glibc bug 1423 for md5.h.
17463
17464 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
17465
17466         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
17467         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
17468         needed, since the source code now assumes these .h files.
17469
17470 2005-10-05  Derek Price  <derek@ximbiot.com>
17471
17472         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
17473
17474 2005-10-05  Bruno Haible  <bruno@clisp.org>
17475
17476         * modules/stdint (License): Change to LGPL.
17477
17478 2005-10-04  Simon Josefsson  <jas@extundo.com>
17479
17480         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
17481         D. Baushke" <mdb@gnu.org>.
17482
17483 2005-10-04  Bruno Haible  <bruno@clisp.org>
17484
17485         * lib/verify.h (verify_true): Provide alternative definition for C++.
17486
17487 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
17488
17489         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
17490         (SSIZE_MAX): New macro, if not already defined.
17491         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
17492         than 2 GiB.
17493
17494 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17495
17496         Sync from coreutils.
17497         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
17498         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
17499         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
17500         ULLONG_MAX doesn't work with 2.7.2.1.
17501
17502 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17503
17504         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
17505         From Ben Pfaff.
17506
17507         * modules/exclude (Depends-on): Depend on verify.
17508         * modules/strtoimax (Depends-on): Likewise.
17509         * modules/utimecmp (Depends-on): Likewise.
17510
17511 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17512
17513         * lib/exclude.c: Include verify.h.
17514         (verify): Remove.  All callers changed to use verify.h's version.
17515         * lib/strtoimax.c: Likewise.
17516         * lib/utimecmp.c: Likewis.e
17517
17518         Sync from coreutils.
17519         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
17520         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
17521         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
17522         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
17523         bother returning ENOSYS if settimeofday or stime fails; just let
17524         them return whatever errno they want to return.
17525         * lib/utimens.c: Include unistd.h, for dup2.
17526         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
17527         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
17528
17529 2005-10-02  Jim Meyering  <jim@meyering.net>
17530
17531         Sync from coreutils.
17532         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
17533         from glibc-2.2.5 that fails for read-only files.
17534
17535 2005-10-02  Jim Meyering  <jim@meyering.net>
17536
17537         Sync from coreutils.
17538         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
17539         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
17540         `#if HAVE_CONFIG_H'.
17541         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
17542         Remove AT_FDCWD test.
17543         Do not consume the fd unless successful.
17544         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
17545         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
17546         block, so that we don't even try to compile it if settimeofday is
17547         available.  This works around a compilation failure on OSF1 V5.1,
17548         due to stime requiring a `long int*' while tv_sec is `int'.
17549
17550 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
17551
17552         Sync from coreutils.
17553         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
17554         against `yes', rather than just testing for nonempty.
17555
17556 2005-10-01  Simon Josefsson  <jas@extundo.com>
17557
17558         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
17559         and Darwin.
17560
17561         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
17562         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
17563         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
17564         freeaddrinfo and gai_strerror are declared by the POSIX headers.
17565         Check if struct addrinfo is declared.
17566
17567 2005-10-01  Simon Josefsson  <jas@extundo.com>
17568
17569         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
17570         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
17571         AI_* and EAI_* definitions.  Protect function declarations.
17572
17573 2005-10-01  Jim Meyering  <jim@meyering.net>
17574
17575         Sync from coreutils.
17576
17577         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
17578         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
17579         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
17580         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17581         in the inet and nsl libraries.  Required on Solaris 5.7.
17582
17583 2005-10-01  Jim Meyering  <jim@meyering.net>
17584
17585         Sync from coreutils.
17586         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17587         in the inet and nsl libraries.  Required on Solaris 5.7.
17588
17589 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
17590
17591         * lib/getdelim.c (getdelim): Remove unused variables.
17592
17593 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
17594
17595         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
17596         so that the code works even with ancient cpp.  Portability problem
17597         with GCC 2.7.2.1 reported by Thomas M.Ott.
17598
17599 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
17600
17601         * modules/regex (Depends-on): Add strcase.
17602
17603         * modules/gethostname (Licence): Change from GPL to LGPL, since
17604         gethostname.c is a trivial implementation of a standard library
17605         function.
17606         * modules/poll (License): Change from GPL to LGPL, since it's
17607         derived from LGPL code.
17608
17609 2005-09-27  Jim Meyering  <jim@meyering.net>
17610
17611         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
17612         HAVE_CONFIG_H.
17613
17614         * lib/intprops.h (signed_type_or_expr__): Define.
17615         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
17616         for unsigned types.
17617
17618 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
17619
17620         * lib/verify.h (verify_expr): Remove, replacing with:
17621         (verify_true): New macro that returns true instead of void.
17622         (verify_type__): Remove.
17623         (verify): Use verify_true rather than verify_type__.
17624
17625 2005-09-26  Bruno Haible  <bruno@clisp.org>
17626
17627         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
17628         is necessary.
17629         (lib_SOURCES): Remove mbchar.c.
17630         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
17631         (Files): Add m4/mbrtowc.m4.
17632         * modules/mbiter: Likewise.
17633         * modules/mbuiter: Likewise.
17634
17635 2005-09-26  Bruno Haible  <bruno@clisp.org>
17636
17637         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
17638         compile mbchar.c if they are not both present.
17639         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
17640         * m4/mbiter.m4 (gl_MBITER): Likewise.
17641         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
17642         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
17643         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
17644
17645 2005-09-25  Jim Meyering  <jim@meyering.net>
17646
17647         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
17648         also uses socklen_t.
17649
17650 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
17651
17652         * lib/utimens.c (ENOSYS): Define if not already defined.
17653         (futimens): Support having a null PATH if the file descriptor
17654         is nonnegative.
17655
17656         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
17657         Remove.
17658         (__attribute): Define to empty unless GCC 3.1 or later.
17659         This works around a core dump on OpenBSD 3.4, which has GCC
17660         2.95.3, which dumps core when given __attribute__(()).  It also
17661         simplifies other tests, since we really don't want to bother with
17662         worrying about which ancient version of GCC supported what.
17663         Original problem reported by Yoann Vandoorselaere, with part of
17664         the fix suggested by Derek Price.
17665
17666 2005-09-24  Jim Meyering  <jim@meyering.net>
17667
17668         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
17669         so we can once again use a positive bitfield width of 1 -- now we
17670         don't have to explain why we were using a bitfield width of 2.
17671
17672 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17673
17674         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
17675         and similarly for the other external symbols.  Problem reported
17676         by James Gallager.
17677
17678         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
17679         bug reported by Jim Meyering.
17680
17681         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
17682         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
17683         not needed, since socklen is a prerequisite module.
17684
17685 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17686
17687         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
17688         Problem reported by Eric Blake.
17689         (getaddrinfo): Initialize se so that it's not garbage.
17690         Redo internal storage allocation so that it doesn't make unportable
17691         assumptions about alignment.
17692         Fix a memory leak.
17693
17694         * lib/utimens.c (futimens): Use futimesat if available.
17695         Prefer it to futimes since it doesn't have the futimes bug.
17696
17697         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
17698         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
17699         Instead, declare a function that returns a pointer to an array,
17700         and use verify_type__ to declare the size of the array.
17701         Problem and germ of a solution reported by Bruno Haible.
17702         (verify_type__): Use 2, not 1, for bitfield size, to avoid
17703         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
17704
17705 2005-09-23  Jim Meyering  <jim@meyering.net>
17706
17707         Sync from coreutils.
17708         Correct build failure (socklen_t not defined) on at least
17709         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
17710         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
17711
17712 2005-09-23  Jim Meyering  <jim@meyering.net>
17713
17714         * modules/getaddrinfo (Depends-on): Add socklen.
17715
17716 2005-09-23  Bruno Haible  <bruno@clisp.org>
17717
17718         * tests/test-verify.c: New file.
17719
17720 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17721
17722         Sync from coreutils.
17723
17724         * modules/argmatch (Depends-on): Add verify.
17725         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
17726         unistd-safer.
17727         * modules/save-cwd (Depends-on): Likewise.
17728
17729         * modules/openat (Files): Add lib/openat-die.c.
17730         (Depends-on): Remove error, exitfail.
17731         Add dirname.
17732
17733         * modules/verify: New file.
17734         * MODULES.html.sh (Diagnostics <assert.h>): New section,
17735         with "verify" module.
17736
17737 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17738
17739         Sync from coreutils.
17740
17741         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
17742         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
17743         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
17744         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
17745         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
17746         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
17747         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
17748         Don't bother checking for string.h, stdlib.h, unistd.h.
17749         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
17750         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
17751         module's job.
17752         * m4/jm-macros.m4 (gl_MACROS): Likewise.
17753         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
17754
17755         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
17756         (gl_GETDATE): Use it.
17757
17758         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
17759
17760 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17761
17762         Sync from coreutils.
17763
17764         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
17765         stat-time.h.
17766         * lib/argmatch.h: Include verify.h
17767         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
17768         (ARGMATCH_ASSERT): Remove; unused.
17769         * lib/canonicalize.c: Assume STDC_HEADERS.
17770         * lib/exclude.c: Include "strcase.h".
17771         * lib/regex_internal.h [!defined _LIBC]: Likewise.
17772         * lib/getusershell.c: Include stdio--.h rather than stdio.h
17773         and stdio-safer.h.
17774         (getusershell): Call fopen, not fopen_safer.
17775         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
17776         Do not include unistd-safer.h.
17777         (save_cwd): Don't call fd_safer; no longer needed
17778         now that we include fcntl--.h.
17779
17780         * lib/getdate.y (relative_time): New type.
17781         (RELATIVE_TIME_0): New constant.
17782         (parser_control): Use relative_time instead of doing it ourselves.
17783         (%union): Add new relative_time rel member.
17784         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
17785         Now typeless.
17786         (relunit, relunit_snumber): Now of type rel.
17787         (zone, rel, relunit, get_date): Adjust to above changes.
17788
17789         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
17790         Do not include unistd-safer.h.
17791         (getloadavg): Don't call fd_safer; no longer needed
17792         now that we include fcntl--.h.
17793
17794         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
17795         (make_dir_parents): Treat ENOSYS like EEXIST.
17796
17797         Improve quality of diagnostics on restore_cwd failure.
17798         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
17799         (make_dir_parents): Last arg is now int * (for errno), not bool *.
17800         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
17801         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
17802         each time through the loop.  Do not diagnose restore_cwd failure;
17803         that is the caller's job (and perhaps the caller does not care).
17804
17805         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
17806         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
17807         If the file already exists but is not a directory, don't bother
17808         to try to make its parents.
17809         Close potential file descriptor leak if we can't chdir("/") (!).
17810         Don't always return true if chdir($PWD) fails; return true only
17811         if the requested action was done successfully (except for the
17812         chdir($PWD)).
17813         Don't log final directory unless we actually made it.
17814         Refactor to avoid duplicate code to fix up permissions.
17815         Don't attempt to fix up parent permissions if chdir($PWD) fails.
17816
17817         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
17818         to make it a bit faster and (I hope) clearer.
17819         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
17820         Fix bug in formats like %2N.
17821
17822         * lib/verify.h: New file.
17823
17824 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17825
17826         Sync from coreutils.
17827         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
17828
17829 2005-09-22  Jim Meyering  <jim@meyering.net>
17830
17831         Sync from coreutils.
17832
17833         * m4/lstat.m4 (gl_FUNC_LSTAT):
17834         Use AC_LIBSOURCES to require lstat.c and lstat.h.
17835         Remove obsolete comment.
17836         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
17837         * m4/xstrtod.m4: Likewise.
17838
17839         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
17840
17841 2005-09-22  Jim Meyering  <jim@meyering.net>
17842
17843         Sync from coreutils.
17844
17845         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
17846
17847         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
17848         the .tm_year member, since otherwise gcc-4.0 would now warn about
17849         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
17850
17851         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
17852         order to avoid an unsuppressible warning from gcc on 64-bit systems.
17853
17854         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
17855         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
17856         when run in a time zone for which daylight savings time is in effect
17857         for the starting date.
17858
17859         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
17860         stop us from restricting permissions of just-created absolute-named
17861         directories.
17862         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
17863         to restore initial working directory.
17864         * lib/mkdir-p.c (make_dir_parents): New parameter:
17865         different_working_dir, to tell caller if/when we change the working
17866         directory and are unable to return to the initial one.
17867         * lib/mkdir-p.h (make_dir_parents): Update prototype.
17868         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
17869         `return false'.  This fixes a bug introduced on 2004-07-30.
17870
17871         * lib/openat.c (fdopendir): Be sure to close the supplied
17872         file descriptor before returning.  This makes our replacement
17873         implementation a little closer to Solaris's, where fdopendir
17874         ties the file descriptor to the returned DIR* pointer.
17875         * lib/openat.c (unlinkat): New function.
17876         * lib/openat.h (unlinkat): Add prototype.
17877         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
17878         (openat_restore_fail): Rename from openat_restore_die.
17879         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
17880
17881         Provide an alternative to exiting immediately upon save_cwd or
17882         restore_cwd failure.  Now, an application can arrange e.g.,
17883         to perform a longjump in that case.
17884         * lib/openat.c: Include dirname.h.
17885         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
17886         (rpl_openat, fdopendir, fstatat): Call openat_save_die
17887         and openat_restore_die rather than calling error directly.
17888         Don't include "error.h" or "exitfail.h"; they're no longer needed.
17889
17890         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
17891         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
17892         define.
17893
17894         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
17895         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
17896                             int utc, int nanoseconds);
17897         Background:
17898         date should not have to allocate a megabyte of virtual memory to
17899         handle a format argument like +%1048575T.  When implemented with
17900         strftime, it must allocate such a buffer, use strftime to fill it
17901         in, print it, then free it.
17902         With fprintftime, it simply prints everything and exits.
17903         With no need for memory allocation, that's one fewer way to fail.
17904         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
17905         optional field width, not before, so we accept %9:z, not %:9z.
17906         (my_strftime): Be sure to use L_('x') for literals.
17907
17908         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
17909         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
17910         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
17911         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
17912         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
17913         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
17914         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
17915         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
17916         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
17917         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
17918         * lib/xgethostname.c, lib/xreadlink.c:
17919         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
17920
17921         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
17922         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
17923         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
17924         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
17925         and don't include <sys/file.h>).
17926
17927 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
17928
17929         Sync from coreutils.
17930
17931         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
17932         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
17933         [!LDAV_DONE]: Avoid unused variable warning.
17934
17935 2005-09-21  Bruno Haible  <bruno@clisp.org>
17936
17937         * lib/unicodeio.h (unicode_to_mb): New declaration.
17938
17939 2005-09-20  Derek Price  <derek@ximbiot.com>
17940
17941         * lib/getaddrinfo.c: Don't include <netdb.h> included from
17942         getaddrinfo.h.
17943
17944 2005-09-20  Bruno Haible  <bruno@clisp.org>
17945
17946         * gnulib-tool: Remove trailing slashes from the values specified for
17947         --source-base, --m4-base, --tests-base, --aux-dir.
17948         Suggested by Simon Josefsson <jas@extundo.com>.
17949
17950 2005-09-20  Bruno Haible  <bruno@clisp.org>
17951
17952         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
17953         func_modules_to_filelist, func_import, func_create_testdir): Make all
17954         sorting results locale-independent, so that gnulib-cache.m4 doesn't
17955         change when gnulib-tool is invoked in a different locale.
17956
17957 2005-09-19  Simon Josefsson  <jas@extundo.com>
17958
17959         * m4/socklen.m4: Fix typo.
17960
17961 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
17962
17963         Use a consistent style for including <config.h>.
17964         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
17965         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
17966         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
17967         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
17968         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
17969         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
17970         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
17971         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
17972         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
17973         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
17974         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
17975         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
17976         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
17977         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
17978         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
17979         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
17980         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
17981         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
17982         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
17983         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
17984         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
17985         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
17986         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
17987         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
17988         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
17989         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
17990         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
17991         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
17992         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
17993         lib/xstrtoumax.c, lib/yesno.c:
17994         Standardize inclusion of config.h.
17995         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
17996         lib/inttostr.h:  Removed inclusion of config.h from header files.
17997         * lib/inttostr.c:  Adjusted in-tree users.
17998         * lib/timespec.h: Remove superfluous warning to include config.h.
17999         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
18000         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
18001         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
18002         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
18003         config.h with HAVE_CONFIG_H.
18004
18005 2005-09-19  Jim Meyering  <jim@meyering.net>
18006
18007         * modules/pathmax (License): Change to LGPL.
18008
18009 2005-09-19  Derek Price  <derek@ximbiot.com>
18010
18011         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
18012
18013 2005-09-19  Bruno Haible  <bruno@clisp.org>
18014
18015         * gnulib-tool (import): Provide default for --tests-base.
18016
18017 2005-09-19  Bruno Haible  <bruno@clisp.org>
18018
18019         * doc/quote.texi: New file, extracted from gnulib.texi.
18020         * doc/ctime.texi: New file, extracted from gnulib.texi.
18021         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
18022         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
18023         * doc/gnulib.texi: Include them.
18024
18025 2005-09-18  Bruno Haible  <bruno@clisp.org>
18026
18027         Portability fix.
18028         * gnulib-tool (func_readlink): New function.
18029         (func_ln_if_changed): Use it.
18030
18031 2005-09-18  Bruno Haible  <bruno@clisp.org>
18032
18033         * gnulib-tool: Support --with-tests also with --import.
18034         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
18035         (func_import): Use variables $testsbase and $inctests. Emit a
18036         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
18037         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
18038         SUBDIRS += $testsdir.
18039         (func_create_testdir): Update.
18040
18041 2005-09-18  Bruno Haible  <bruno@clisp.org>
18042
18043         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
18044         instead of $dry_run.
18045         (func_cp_if_changed, func_mv_if_changed): Remove functions.
18046         (func_ln_if_changed): Don't handle dry-run here.
18047         (func_import): In dry-run mode, detect more precisely which actions
18048         would be performed, and don't use "...ing" verbs.
18049
18050 2005-09-18  Bruno Haible  <bruno@clisp.org>
18051
18052         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
18053         (func_import): Use join on two temporary files instead of three nested
18054         loops, in order to determine which files are new or old.
18055
18056 2005-09-18  Bruno Haible  <bruno@clisp.org>
18057
18058         * gnulib-tool (func_import): Comment out code that spits out the
18059         new files with --dry-run.
18060
18061 2005-09-18  Bruno Haible  <bruno@clisp.org>
18062
18063         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
18064
18065 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18066
18067         * lib/stat-time.h: New file.
18068         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
18069         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
18070         in a different way.
18071         (timespec_cmp): New function.
18072         * lib/utimecmp.c: Include stat-time.h.
18073         (SYSCALL_RESOLUTION): Depend on whether various struct stat
18074         members exist, not on the obsolescent ST_MTIM_NSEC.
18075         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
18076
18077 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18078
18079         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
18080
18081 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18082
18083         * MODULES.html.sh (File system functions): Add stat-time.
18084         * modules/stat-time: New file.
18085         * modules/timespec (Files): Remove m4/st_mtim.m4; this
18086         is now done in a different way, by the stat-time module.
18087         * modules/utimecmp (Depends-on): Add stat-time.
18088
18089 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
18090
18091         * m4/st_mtim.m4: Remove.  Superseded by...
18092         * m4/stat-time.m4: New file.
18093         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
18094         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
18095
18096 2005-09-15  Derek Price  <derek@ximbiot.com>
18097
18098         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
18099
18100 2005-09-15  Derek Price  <derek@ximbiot.com>
18101
18102         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
18103         * lib/regex_internal.c: Ditto, using this...
18104         (__GNUC_PREREQ): ...new macro.
18105         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
18106         using...
18107         (__GNUC_PREREQ): ...this new macro.
18108
18109         * lib/strstr.h: Include string.h. Define strstr as a macro here.
18110
18111 2005-09-15  Derek Price  <derek@ximbiot.com>
18112             Paul Eggert  <eggert@cs.ucla.edu>
18113
18114         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
18115         changes, consolidating in...
18116         * lib/regex_internal.h: ...this file.
18117
18118 2005-09-13  Jim Meyering  <jim@meyering.net>
18119
18120         * lib/canon-host.c: Filter through gnu indent and reword comments
18121         slightly.
18122         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
18123
18124 2005-09-13  Derek Price  <derek@ximbiot.com>
18125
18126         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
18127         failure.
18128         Reported by Jim Meyering  <jim@meyering.net>.
18129
18130 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18131
18132         * lib/base64.c: Typo.
18133         (base64_encode): Put b64str in initialized data section.
18134
18135 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
18136
18137         Merge glibc and coreutils changes into gnulib, plus a few
18138         extra fixes.
18139         * lib/md5.c: Use #error rather than a string.
18140         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
18141         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
18142         (__attribute__): Define to empty for non recent-GCC.
18143         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
18144         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
18145         Renamed from their non-__ counterparts, with new macros replacing
18146         them if not _LIBC.  Add __THROW attribute.
18147         (rol): Remove.
18148         (struct md5_ctx): Align buffer if using GCC.
18149         * lib/sha1.h (struct sha1_ctx): Likewise.
18150         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
18151         The old name was backwards.
18152         (NOTSWAP): Remove; not used.
18153         (rol): New macro, moved here from md5.h.
18154         (sha1_process_block): Remove a FIXME that doesn't make sense.
18155
18156 2005-09-12  Derek Price  <derek@ximbiot.com>
18157
18158         Return usable errors from canon-host.
18159         * lib/canon-host.h: New file.
18160         * lib/canon-host.c (canon_host): Wrap...
18161         (canon_host_r): ...this new function, which now relies exclusively on
18162         getaddrinfo.
18163         (ch_strerror): New function.
18164         (last_cherror): New global.
18165         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
18166         interface.
18167         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
18168         void *.
18169         (freeaddrinfo): Free ai->ai_canonname when set.
18170
18171 2005-09-12  Derek Price  <derek@ximbiot.com>
18172
18173         Make canon-host require getaddrinfo.
18174         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
18175         AC_LIBSOURCE canon-host.h.  Call...
18176         (gl_PREREQ_CANON_HOST): ...this new function, which requires
18177         gl_GETADDRINFO.
18178         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
18179
18180 2005-09-12  Derek Price  <derek@ximbiot.com>
18181
18182         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
18183         LGPL.
18184         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
18185
18186 2005-09-12  Derek Price  <derek@ximbiot.com>
18187
18188         * lib/gai_strerror.c: Include config.h when available.  Include
18189         getaddrinfo.h before other headers to test interface.
18190         Reported by Larry Jones <lawrence.jones@ugs.com>.
18191
18192 2005-09-12  Derek Price  <derek@ximbiot.com>
18193             Paul Eggert  <eggert@cs.ucla.edu>
18194
18195         * modules/glob (Files): Add glob-libc.h.
18196
18197 2005-09-12  Derek Price  <derek@ximbiot.com>
18198             Paul Eggert  <eggert@cs.ucla.edu>
18199
18200         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
18201         glob_.h, glob-libc.h.
18202         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
18203
18204 2005-09-12  Derek Price  <derek@ximbiot.com>
18205             Paul Eggert  <eggert@cs.ucla.edu>
18206
18207         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
18208         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
18209         protecting things that should be done only in gnulib contexts.
18210         * lib/glob_.h: New file, containing only the glob things needed for
18211         gnulib.
18212         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
18213         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
18214         (glob, globfree, glob_pattern_p): Now defined simply in terms of
18215         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
18216         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
18217         and to respect the namespace rules better.
18218
18219 2005-09-08  Simon Josefsson  <jas@extundo.com>
18220
18221         * modules/socklen: New file.
18222
18223 2005-09-08  Simon Josefsson  <jas@extundo.com>
18224
18225         * m4/socklen.m4: New file.
18226
18227 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18228
18229         * modules/utimens (Files): Add m4/utimbuf.m4, since
18230         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
18231         Reported by Sergey Poznyakoff.
18232
18233 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18234
18235         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
18236         definitions, since that's the preferred style in glibc.
18237         Fix a minor spacing issue, and update copyright notice to match
18238         glibc's.
18239
18240 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18241
18242         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
18243
18244 2005-09-06  Simon Josefsson  <jas@extundo.com>
18245
18246         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
18247         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
18248
18249 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18250
18251         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
18252         warning.
18253
18254 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18255
18256         * config/srclist.txt: Add glibc bug 1302.
18257
18258 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
18259
18260         Change bitset word type from unsigned int to unsigned long int,
18261         as this has better performance on typical 64-bit hosts.
18262         Port bitset code to hosts with unusual word sizes.
18263         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
18264         (build_collating_symbol):
18265         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
18266         argument is a bitset.  This is merely a style issue, but it makes
18267         it clearer that an entire array is expected.
18268         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
18269         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
18270         Port to the case where bitset_word is not the same as unsigned int.
18271         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18272         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
18273         Likewise.
18274         * lib/regexec.c (check_dst_limits_calc_pos_1,
18275         check_subexp_matching_top):
18276         (build_trtable, group_nodes_into_DFAstates):
18277         Likewise.
18278         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
18279         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
18280         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
18281         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
18282         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
18283         * lib/regcomp.c (optimize_subexps, lower_subexp):
18284         Work even if bitset_word has holes in its bitwise representation.
18285         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
18286         * lib/regexec.c (check_dst_limits_calc_pos_1,
18287         check_subexp_matching_top):
18288         Likewise.
18289         * lib/regex_internal.c (re_string_reconstruct):
18290         Don't assume UCHAR_MAX == 255.
18291         * lib/regex_internal.h (bitset_set_all): Likewise.
18292         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
18293         All uses changed.
18294         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
18295         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
18296         All uses changed.
18297         (BITSET_WORD_MAX): New macro.
18298         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
18299         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
18300         (bitset_empty, bitset_copy):
18301         Prefer sizeof (bitset) to multiplying it out ourselves.
18302         (bitset_not_merge): Remove; unused.
18303         (bitset_contain): Return bool, not unsigned int with one bit on.
18304         All callers changed.
18305         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
18306         alignment than re_node_set; do this by defining a new internal
18307         type struct dests_alloc and using it to allocate memory.
18308
18309 2005-09-05  Bruno Haible  <bruno@clisp.org>
18310
18311         * gnulib-tool (func_import): Fix comparison in handling of symbolic
18312         links.
18313
18314 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
18315
18316         * modules/size_max (Makefile.am): Add size_max.h
18317
18318 2005-09-04  Derek Price  <derek@ximbiot.com>
18319
18320         * gnulib-tool (func_import): Fix reversed $symbolic logic.
18321
18322 2005-09-03  Simon Josefsson  <jas@extundo.com>
18323
18324         * gnulib-tool: Fix typo.
18325
18326 2005-09-03  Simon Josefsson  <jas@extundo.com>
18327
18328         * config/srclist.txt: Add glibc bug 1293.
18329
18330 2005-09-03  Derek Price  <derek@ximbiot.com>
18331
18332         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
18333         From Larry Jones <lawrence.jones@ugs.com>.
18334
18335 2005-09-02  Simon Josefsson  <jas@extundo.com>
18336
18337         * modules/socklen: New file.
18338
18339 2005-09-02  Simon Josefsson  <jas@extundo.com>
18340
18341         * modules/havelib: New module.
18342
18343         * modules/gettext, modules/iconv, modules/lock, modules/readline:
18344         Use havelib.
18345
18346 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18347
18348         Check for arithmetic overflow when calculating sizes, to prevent
18349         some buffer-overflow issues.  These patches are conservative, in the
18350         sense that when I couldn't determine whether an overflow was possible,
18351         I inserted a run-time check.
18352         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
18353         macros.
18354         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
18355         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
18356         (re_xnrealloc, re_x2nrealloc): New inline functions.
18357         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
18358         parse_bracket_exp):
18359         (build_equiv_class, build_charclass): Check for arithmetic overflow
18360         in size expression calculations.
18361         * lib/regex_internal.c (re_string_realloc_buffers):
18362         (build_wcs_upper_buffer, re_node_set_add_intersect):
18363         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
18364         (re_dfa_add_node, register_state): Likewise.
18365         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
18366         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
18367         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
18368         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
18369
18370 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18371
18372         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18373         m4/ulonglong.m4.  Problem reported by Martin Lambers.
18374
18375 2005-09-02  Bruno Haible  <bruno@clisp.org>
18376
18377         Support for lib vs. lib64 distinction on biarch platforms.
18378         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
18379         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
18380         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
18381
18382 2005-09-02  Bruno Haible  <bruno@clisp.org>
18383
18384         * gnulib-tool (import): In the other first-use case, provide defaults
18385         as well.
18386
18387 2005-09-02  Bruno Haible  <bruno@clisp.org>
18388
18389         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
18390         patches not yet found in the latest gettext release.
18391
18392 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18393
18394         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
18395         to avoid a collision with bits/local_lim.h in glibc.
18396         All uses changed.  Problem reported by Dmitry V. Levin in
18397         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
18398
18399         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
18400         bugs in int versus size_t comparisons.
18401         (re_string_context_at): Fix bug where the code assumed that
18402         Idx is signed.
18403
18404         Use bool where appropriate.
18405         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
18406         All callers changed.
18407         (calc_eclosure_iter): Likewise, for ROOT arg.
18408         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
18409         (build_charclass_op): Likewise, for NON_MATCH arg.
18410         * lib/regex_internal.c (re_string_allocate, re_string_construct):
18411         (re_string_construct_common): Likewise, for ICASE arg.
18412         * lib/regexec.c (re_search_2_stub, re_search_stub):
18413         Likewise, for RET_LEN arg.
18414         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
18415         (set_regs): Likewise, for FL_BACKTRACK arg.
18416         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
18417         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
18418         (calc_eclosure_iter, parse_bracket_exp):
18419         Use bool for internal variables that are booleans.
18420         * lib/regexec.c (re_search_internal, check_matching,
18421         proceed_next_node):
18422         (set_regs, build_sifted_states, sift_states_bkref):
18423         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
18424         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18425         (find_collation_sequence_value):
18426         Likewise.
18427         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
18428         (re_node_set_compare):
18429         Return bool, not int. All callers changed.
18430         * lib/regexec.c (check_halt_node_context, check_dst_limits):
18431         (build_trtable, check_node_accept): Likewise.
18432         * lib/regex_internal.h: Include stdbool.h.
18433
18434         Fix bugs uncovered when converting to bool.
18435         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
18436         failure instead of charging ahead blindly.
18437         * lib/regex_internal.c (register_state): Likewise.
18438         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
18439         for freeing internal storage.
18440         (group_nodes_into_DFA_states): Use unsigned int, not int, for
18441         bitset pieces used as boolean, to avoid undefined behavior
18442         on hosts that do int overflow checking.
18443
18444 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18445
18446         * config/srclist.txt: Add glibc bugs 1285-1287.
18447
18448 2005-09-01  Jim Meyering  <jim@meyering.net>
18449
18450         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
18451         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
18452         Require gl_STAT_MACROS, too.
18453
18454 2005-09-01  Bruno Haible  <bruno@clisp.org>
18455
18456         * gnulib-tool (import): In the first-use case, provide defaults.
18457
18458 2005-09-01  Bruno Haible  <bruno@clisp.org>
18459
18460         * gnulib-tool (func_import): Remove the .tmp files.
18461
18462 2005-09-01  Bruno Haible  <bruno@clisp.org>
18463
18464         * gnulib-tool (func_import): Fix handling of symbolic links.
18465
18466 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18467
18468         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
18469         old glibc regex code mishandles strings longer than 2**31 bytes.
18470         This patch fixes this when the regex code is used in gnulib
18471         (i.e., outside glibc).
18472
18473         This patch should not affect the use of the regex code inside
18474         glibc.  No doubt this problem also needs to be handled for glibc
18475         as well, but the result will be an incompatible change to the
18476         glibc ABI, and the old ABI will have to be supported too.  That
18477         can be the the subject for another patch.
18478
18479         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
18480         governing whether the rest of this patch is active.  By default,
18481         the macro is disabled and the patch has no effect.
18482         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
18483         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
18484         (struct re_pattern_buffer, re_search, re_search_2, re_match):
18485         (re_match_2, re_set_registers): Use the new types.
18486         * lib/regex_internal.h (Idx, re_hashval_t): New types.
18487         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
18488         New macros.
18489         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
18490         (re_string_context_at, bin_tree_t, re_dfastate_t):
18491         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
18492         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
18493         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
18494         (re_string_char_size_at, re_string_wchar_at):
18495         (re_string_elem_size_at):
18496         Use the new types and macros to port to 64-bit hosts.
18497         Use unsigned types for internal values, so that the code
18498         mostly works even for arrays larger than SSIZE_MAX.
18499         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
18500         (search_duplicated_node, calc_eclosure_iter, fetch_number):
18501         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
18502         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
18503         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
18504         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
18505         (calc_inveclosure, parse_dup_op, build_range_exp):
18506         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
18507         (fetch_number, create_token_tree, mark_opt_subexp):
18508         Likewise.
18509         * lib/regex_internal.c (re_string_construct_common,
18510         create_ci_newstate):
18511         (create_cd_newstate, re_string_allocate, re_string_construct):
18512         (re_string_realloc_buffers, build_wcs_upper_buffer):
18513         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18514         (re_string_reconstruct, re_string_peek_byte_case):
18515         (re_string_fetch_byte_case, re_string_context_at):
18516         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18517         (re_node_set_init_copy, re_node_set_add_intersect):
18518         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18519         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18520         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18521         (re_acquire_state, re_acquire_state_context, register_state):
18522         Likewise.
18523         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
18524         search_cur_bkref_entry):
18525         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
18526         (re_search_internal, re_search_2_stub, re_search_stub)
18527         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
18528         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
18529         (update_cur_sifted_state, check_dst_limits):
18530         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18531         (check_subexp_limits, sift_states_bkref, merge_state_array):
18532         (check_subexp_matching_top, get_subexp, get_subexp_sub):
18533         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
18534         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18535         (expand_bkref_cache, check_node_accept_bytes):
18536         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
18537         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
18538         (acquire_init_state_context, check_halt_node_context):
18539         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
18540         (sift_states_backward, clean_state_log_if_needed):
18541         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
18542         (find_recover_state, transit_state_sb, transit_state_mb):
18543         (transit_state_bkref, build_trtable, match_ctx_clean):
18544         Likewise.
18545         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
18546         to work around an assumption that REG_MISSING is negative.
18547
18548         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
18549         (seek_collating_symbol_entry) [defined _LIBC]:
18550         (lookup_collation_sequence_value) [defined _LIBC]:
18551         (build_range_exp, build_collating_symbol) [defined _LIBC]:
18552         Use prototypes rather than old-style function definitions.
18553         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
18554         (transit_state_sb) [0]:
18555         (find_collation_sequence_value) [defined _LIBC]: Likewise.
18556
18557         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
18558         rm_eo.
18559
18560         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
18561         (optimize_subexps, lower_subexp):
18562         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
18563         since the signed shift might overflow.  Use 1u<<31 instead.
18564         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18565         Likewise.
18566         * lib/regexec.c (check_dst_limits_calc_pos_1,
18567         check_subexp_matching_top): Likewise.
18568
18569         * lib/regcomp.c (optimize_subexps, lower_subexp):
18570         Use CHAR_BIT rather than 8, for clarity.
18571         * lib/regexec.c (check_dst_limits_calc_pos_1):
18572         (check_subexp_matching_top): Likewise.
18573         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
18574         have to worry about portability issues when shifting it left.
18575         Remove no-longer-needed test for table_size > 0.
18576         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
18577         in a word, as the resulting behavior is undefined.
18578         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
18579         in one case, a <= should have been an <, and in another case the
18580         whole test was missing.
18581         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
18582         the standard name CHAR_BIT.
18583         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
18584         this is not true on one's complement and signed-magnitude hosts.
18585
18586         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
18587         next_last_offset.
18588         (struct re_dfa_t): Remove unused member states_alloc.
18589         * lib/regcomp.c (init_dfa): Don't initialize unused members.
18590
18591 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18592
18593         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
18594         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
18595         and large-file glibc and in 32-bit large-file Solaris.
18596
18597 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18598
18599         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
18600         lengths fit in regoff_t; this isn't true if regoff_t is the same
18601         width as size_t.
18602         * lib/regex.c (re_search_internal): 5th arg is LAST_START
18603         (= START + RANGE) instead of RANGE.  This avoids overflow
18604         problems when regoff_t is the same width as size_t.
18605         All callers changed.
18606         (re_search_2_stub): Check for overflow when adding the
18607         sizes of the two strings.
18608         (re_search_stub): Check for overflow when adding START
18609         to RANGE; if it occurs, substitute the extreme value.
18610
18611 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18612
18613         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
18614
18615 2005-08-31  Jim Meyering  <jim@meyering.net>
18616
18617         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
18618         a pointer-to-const.
18619         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
18620         (register_state): Likewise.
18621         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
18622         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18623         (group_nodes_into_DFAstates): Likewise.
18624
18625 2005-08-31  Jim Meyering  <jim@meyering.net>
18626
18627         * check-module: Add a FIXME comment.
18628
18629 2005-08-31  Eric Blake  <ebb9@byu.net>
18630
18631         * modules/unistd-safer (Files): Add unistd--.h.
18632         * modules/stdio-safer (Files): Add stdio--.h.
18633
18634 2005-08-31  Derek Price  <derek@ximbiot.com>
18635
18636         * lib/getdelim.c (getdelim): Return EOF on EOF.
18637         Reported by Larry Jones <lawrence.jones@ugs.com>.
18638
18639 2005-08-31  Bruno Haible  <bruno@clisp.org>
18640
18641         Avoid unnecessary diffs in the generated lib/Makefile.am.
18642         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
18643         the generated files.
18644         (func_import): Don't set cmd.
18645
18646 2005-08-31  Bruno Haible  <bruno@clisp.org>
18647
18648         * lib/strstr.c: Include <stddef.h>, for NULL.
18649         * lib/strcasestr.c: Likewise.
18650         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
18651
18652 2005-08-31  Bruno Haible  <bruno@clisp.org>
18653
18654         * gnulib-tool: New option --macro-prefix.
18655         (func_import): Use macro_prefix.
18656         (import): Handle option --macro-prefix.
18657
18658 2005-08-31  Bruno Haible  <bruno@clisp.org>
18659
18660         * gnulib-tool (import): Rename most ac_* variables to cached_*.
18661         Also use new variables cached_lgpl, cached_libtool.
18662
18663 2005-08-31  Bruno Haible  <bruno@clisp.org>
18664
18665         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
18666         always instantiating them.
18667
18668 2005-08-31  Bruno Haible  <bruno@clisp.org>
18669
18670         * gnulib-tool (func_import): Read the previous cached settings
18671         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
18672         earlier added by gnulib but are now dropped. Warn when a gnulib file
18673         overwrites a non-gnulib file.
18674
18675 2005-08-31  Bruno Haible  <bruno@clisp.org>
18676
18677         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
18678         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
18679         projects that don't keep autogenerated files in CVS. Put into
18680         actioncmd only the specified modules, not the transitive closure.
18681
18682 2005-08-31  Bruno Haible  <bruno@clisp.org>
18683
18684         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
18685         Create directories that shall be filled.
18686         (import): Don't look for gl_* macros in configure.ac. Recurse across
18687         all directories containing a gnulib-cache.m4 files, if meaningful.
18688
18689 2005-08-31  Bruno Haible  <bruno@clisp.org>
18690
18691         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
18692         (import): Set seen_libtool when we see gl_LIBTOOL.
18693
18694 2005-08-31  Bruno Haible  <bruno@clisp.org>
18695
18696         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
18697         declaration macro definitions from generated gnulib.m4.
18698
18699 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
18700
18701         * lib/iconvme.h: Add prototype for iconv_alloc.
18702
18703 2005-08-29  Simon Josefsson  <jas@extundo.com>
18704
18705         * lib/iconvme.c: Fix errno.
18706
18707 2005-08-29  Bruno Haible  <bruno@clisp.org>
18708
18709         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
18710         that it works when the directory contains spaces.
18711
18712 2005-08-29  Bruno Haible  <bruno@clisp.org>
18713
18714         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
18715
18716 2005-08-29  Bruno Haible  <bruno@clisp.org>
18717
18718         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
18719         Emit more advice.
18720
18721 2005-08-29  Bruno Haible  <bruno@clisp.org>
18722         and Stepan Kasal  <kasal@ucw.cz>
18723
18724         * check-module: If more parameters are given, check each of them
18725         separately; add more exceptions, as noted by Jim Meyering.
18726         (check_module): New procedure.
18727         (%exempt_header): Now contains all exceptions.
18728
18729 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
18730
18731         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
18732
18733 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18734
18735         * lib/iconvme.c: Split iconv_string into iconv_alloc.
18736
18737 2005-08-28  Bruno Haible  <bruno@clisp.org>
18738
18739         * m4/gnulib-tool.m4: New file.
18740
18741 2005-08-27  Jim Meyering  <jim@meyering.net>
18742
18743         * modules/unistd-safer (Files): Add pipe-safer.c.
18744         * modules/fcntl-safer (Files): Add creat-safer.c.
18745
18746 2005-08-27  Jim Meyering  <jim@meyering.net>
18747
18748         * m4/stdlib-safer.m4: New file.  From coreutils.
18749         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
18750         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
18751         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
18752         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
18753         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
18754
18755 2005-08-27  Jim Meyering  <jim@meyering.net>
18756
18757         * lib/fopen-safer.c: Merge minor changes from coreutils.
18758         * lib/dup-safer.c: Likewise.
18759         * lib/fd-safer.c: Likewise.
18760
18761         Merge from coreutils.
18762         * lib/stdio--.h: New file.
18763         * lib/stdlib--.h: New file.
18764         * lib/mkstemp-safer.c: New file.
18765
18766         GNU tar needs these.
18767         * lib/pipe-safer.c: New file.
18768         * lib/creat-safer.c: New file.
18769         * lib/fcntl--.h (creat): Define to creat_safer.
18770         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
18771         * lib/unistd--.h (pipe): Define to pipe_safer.
18772         * lib/unistd-safer.h: Declare pipe_safer.
18773
18774 2005-08-26  Simon Josefsson  <jas@extundo.com>
18775
18776         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
18777         Haible <bruno@clisp.org>.
18778
18779 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
18780
18781         * lib/regex_internal.h: Remove all references to
18782         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
18783         or better.
18784         (bitset_not, bitset_merge, bitset_not_merge):
18785         (bitset_mask, re_string_allocate, re_string_construct):
18786         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
18787         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
18788         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
18789         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
18790         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18791         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18792         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
18793         (re_acquire_state_context):
18794         Remove unnecessary forward decls.
18795         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
18796         Put __attribute at function definition,
18797         now that the function decl has been removed.
18798         * lib/regex_internal.c (re_string_peek_byte_case):
18799         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
18800         Likewise.
18801
18802 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
18803
18804         * m4/regex.m4: Add AC_PREREQ(2.50).
18805         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
18806
18807 2005-08-25  Simon Josefsson  <jas@extundo.com>
18808
18809         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
18810         __fsetlocking.
18811
18812 2005-08-25  Simon Josefsson  <jas@extundo.com>
18813
18814         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
18815         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
18816         GLIBC specific code.
18817
18818 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18819
18820         Make regex safe for g++.  This fixes one real bug (an "err"
18821         that should have been "*err").  g++ problem reported by
18822         Sam Steingold.
18823         * lib/regex_internal.h (re_calloc): New macro, consistent with
18824         re_malloc etc.  All callers of calloc changed to use re_calloc.
18825         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
18826         not int.  All callers changed.
18827         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
18828         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
18829         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
18830         (find_recover_state): Change "err" to "*err"; this fixes what
18831         appears to be a real bug.
18832         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
18833         versus int.
18834
18835 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18836
18837         * modules/regex (Depends-on): Add malloc, since the code
18838         assumes that !malloc(0) means failure.
18839
18840 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18841
18842         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
18843
18844         alloca modernization/simplification for regex.
18845         * lib/regex.c: Remove portability cruft for alloca.  This no longer
18846         needs to be at the start of the file, and can be moved into
18847         regex_internal.h and simplified.
18848         * lib/regex_internal.h: Include <alloca.h>.
18849         (__libc_use_alloca) [!defined _LIBC]: New macro.
18850         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
18851         now works outside glibc.
18852
18853 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18854
18855         * config/srclist.txt: Add glibc bugs 1241, 1245.
18856
18857 2005-08-25  Jim Meyering  <jim@meyering.net>
18858
18859         * lib/open-safer.c: Include <config.h>.
18860         Otherwise, we'd lose LARGEFILE support in any file using
18861         e.g. "fcntl--.h"
18862
18863 2005-08-25  Bruno Haible  <bruno@clisp.org>
18864
18865         * m4/minmax.m4: Require autoconf 2.52.
18866         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
18867         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
18868         alternatives of translit over the alphabet.
18869         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
18870
18871 2005-08-24  Simon Josefsson  <jas@extundo.com>
18872
18873         * tests/test-getpass.c: New file.
18874
18875 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18876
18877         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
18878         for GNU regex features.
18879
18880 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18881
18882         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
18883         * lib/regex.h (regerror): Likewise.
18884
18885         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
18886         requires this.  (The code never needed it.)
18887
18888         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
18889         All uses of recently-renamed identifiers changed to use the new,
18890         POSIX-compliant names.  The code will build and run just fine
18891         without these changes, but it's better to eat our own dog food
18892         and use the standard-conforming names.
18893
18894         * lib/regex.h: Fix a multitude of POSIX name space violations.
18895         These changes have an effect only for programs that define
18896         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
18897         do not change anything for programs compiled in the normal way.
18898         Also, there is no effect on the ABI.
18899
18900         (_REGEX_SOURCE): New macro.
18901         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
18902         defined and _GNU_SOURCE is not; this fixes a name space violation.
18903
18904         Rename the following macros to obey POSIX requirements.
18905         The old names are still visible as macros if _REGEX_SOURCE is defined.
18906         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
18907         RE_BACKSLASH_ESCAPE_IN_LISTS.
18908         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
18909         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
18910         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
18911         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
18912         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
18913         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
18914         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
18915         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
18916         (REG_INTERVALS): renamed from RE_INTERVALS.
18917         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
18918         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
18919         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
18920         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
18921         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
18922         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
18923         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
18924         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
18925         RE_UNMATCHED_RIGHT_PAREN_ORD.
18926         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
18927         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
18928         (REG_DEBUG): renamed from RE_DEBUG.
18929         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
18930         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
18931         unusual, since we can't clash with the POSIX REG_ICASE.
18932         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
18933         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
18934         (REG_NO_SUB): renamed from RE_NO_SUB.
18935         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
18936         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
18937         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
18938         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
18939         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
18940         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
18941         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
18942         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
18943         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
18944         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
18945         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
18946         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
18947         RE_SYNTAX_POSIX_MINIMAL_BASIC.
18948         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
18949         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
18950         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
18951         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
18952         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
18953         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
18954         (REG_FIXED): Renamed from REGS_FIXED.
18955         (REG_NREGS): Renamed from RE_NREGS.
18956
18957         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
18958         of other REG_* macros, since POSIX says the user is allowed to
18959         #undef these macros selectively.
18960
18961         (reg_errcode_t): Update comment stating what other tables need
18962         to be consistent.
18963
18964         Rename the following enum values to obey POSIX requirements.
18965         The old names are still visible as macros.
18966         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
18967         is not defined, since GNU is supposed to be a superset of POSIX as
18968         much as possible, and since we want reg_errcode_t to be a signed
18969         type for implementation consistency.
18970         (_REG_NOERROR): Renamed from REG_NOERROR.
18971         (_REG_NOMATCH): Renamed from REG_NOMATCH.
18972         (_REG_BADPAT): Renamed from REG_BADPAT.
18973         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
18974         (_REG_ECTYPE): Renamed from REG_ECTYPE.
18975         (_REG_EESCAPE): Renamed from REG_EESCAPE.
18976         (_REG_ESUBREG): Renamed from REG_ESUBREG.
18977         (_REG_EBRACK): Renamed from REG_EBRACK.
18978         (_REG_EPAREN): Renamed from REG_EPAREN.
18979         (_REG_EBRACE): Renamed from REG_EBRACE.
18980         (_REG_BADBR): Renamed from REG_BADBR.
18981         (_REG_ERANGE): Renamed from REG_ERANGE.
18982         (_REG_ESPACE): Renamed from REG_ESPACE.
18983         (_REG_BADRPT): Renamed from REG_BADRPT.
18984         (_REG_EEND): Renamed from REG_EEND.
18985         (_REG_ESIZE): Renamed from REG_ESIZE.
18986         (_REG_ERPAREN): Renamed from REG_ERPAREN.
18987         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
18988         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
18989         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
18990         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
18991
18992         (_REG_RE_NAME, _REG_RM_NAME): New macros.
18993         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
18994         changed.  But support the old name if the new one is not defined
18995         and if _REGEX_SOURCE.
18996
18997         Change the following member names in struct re_pattern_buffer.
18998         The old names are still supported if !_REGEX_SOURCE.
18999         The new names are always supported, regardless of _REGEX_SOURCE.
19000         (re_buffer): Renamed from buffer.
19001         (re_allocated): Renamed from allocated.
19002         (re_used): Renamed from used.
19003         (re_syntax): Renamed from syntax.
19004         (re_fastmap): Renamed from fastmap.
19005         (re_translate): Renamed from translate.
19006         (re_can_be_null): Renamed from can_be_null.
19007         (re_regs_allocated): Renamed from regs_allocated.
19008         (re_fastmap_accurate): Renamed from fastmap_accurate.
19009         (re_no_sub): Renamed from no_sub.
19010         (re_not_bol): Renamed from not_bol.
19011         (re_not_eol): Renamed from not_eol.
19012         (re_newline_anchor): Renamed from newline_anchor.
19013
19014         Change the following member names in struct re_registers.
19015         The old names are still supported if !_REGEX_SOURCE.
19016         The new names are always supported, regardless of _REGEX_SOURCE.
19017         (rm_num_regs): Renamed from num_regs.
19018         (rm_start): Renamed from start.
19019         (rm_end): Renamed from end.
19020
19021         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
19022         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
19023         Prepend __ to parameter names.
19024
19025         Undo yesterday's changes.
19026
19027 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
19028
19029         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
19030         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
19031         lib/regex.c.
19032
19033 2005-08-24  Jim Meyering  <jim@meyering.net>
19034
19035         Sync from coreutils.
19036         * m4/fcntl-safer.m4: New file.
19037
19038         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
19039         and object files for this module.
19040
19041 2005-08-24  Jim Meyering  <jim@meyering.net>
19042
19043         Sync from coreutils.
19044         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
19045
19046 2005-08-24  Jim Meyering  <jim@meyering.net>
19047
19048         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
19049         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
19050
19051 2005-08-24  Jim Meyering  <jim@meyering.net>
19052
19053         * modules/fcntl-safer: New module.
19054         * modules/fts (Depends-on): Add fcntl-safer.
19055         * MODULES.html.sh (File descriptor based Input/Output):
19056         Add fcntl-safer.
19057
19058 2005-08-24  Bruno Haible  <bruno@clisp.org>
19059
19060         Support for unit test modules.
19061         * modules/README: Mention tests modules.
19062         * modules/TEMPLATE-TESTS: New file.
19063         * gnulib-tool: New options --extract-tests-module, --with-tests and
19064         --tests-base (unused for the moment).
19065         (testsbase, inctests): New variables.
19066         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
19067         (func_verify_module): Exclude TEMPLATE-TESTS.
19068         (func_verify_nontests_module, func_verify_tests_module): New functions.
19069         (func_get_dependencies): Add implicit dependency for tests modules.
19070         (func_get_tests_module): New function.
19071         (func_modules_transitive_closure): When --with-tests was specified,
19072         include the unit tests as well, unless explicitly avoided.
19073         (func_emit_lib_Makefile_am): Ignore the tests modules here.
19074         (func_emit_tests_Makefile_am): New function.
19075         (func_create_testdir): When --with-tests was specified, emit a
19076         tests/ directory.
19077         * MODULES.html.sh (Future developments): Update.
19078
19079 2005-08-24  Bruno Haible  <bruno@clisp.org>
19080
19081         * modules/tls-tests: New file.
19082         * tests/test-tls.c: New file, from GNU gettext.
19083
19084 2005-08-24  Bruno Haible  <bruno@clisp.org>
19085
19086         * modules/lock-tests: New file.
19087         * tests/test-lock.c: New file, from GNU gettext.
19088
19089 2005-08-24  Bruno Haible  <bruno@clisp.org>
19090
19091         * lib/lock.h: Add multiple inclusion guard.
19092         * lib/tls.h: Add multiple inclusion guard.
19093
19094 2005-08-24  Bruno Haible  <bruno@clisp.org>
19095
19096         * gnulib-tool: Add support for the --aux-dir option to
19097         --create-testdir, --create-megatestdir, --test, --megatest.
19098         (func_create_testdir, func_create_megatestdir): Optionally emit a
19099         AC_CONFIG_AUX_DIR directive.
19100         (create-testdir, create-megatestdir, test, megatest): Provide a
19101         default value for $auxdir.
19102
19103 2005-08-24  Bruno Haible  <bruno@clisp.org>
19104
19105         * gnulib-tool (import): Use compound statement instead of subshell
19106         where possible.
19107
19108 2005-08-24  Bruno Haible  <bruno@clisp.org>
19109
19110         * gnulib-tool (import): Change --aux-dir default to "build-aux".
19111
19112 2005-08-24  Bruno Haible  <bruno@clisp.org>
19113
19114         * gnulib-tool (func_version): Update.
19115
19116 2005-08-24  Bruno Haible  <bruno@clisp.org>
19117
19118         * gnulib-tool (func_import, func_create_testdir,
19119         func_create_megatestdir): Quote all autoconf macro arguments.
19120
19121 2005-08-24  Bruno Haible  <bruno@clisp.org>
19122
19123         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
19124         option --force, because --force causes the aclocal.m4 of each
19125         subdirectory to be newer than the corresponding config.h.in.
19126
19127 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19128
19129         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
19130         All contents moved to gl_REGEX.
19131         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
19132         assume that it does.
19133
19134 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19135
19136         * lib/regex.h (REG_NOSYS)
19137         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
19138         Define, since POSIX requires it as of 2001.
19139         (_REG_ENOSYS)
19140         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
19141         New private symbol, used to keep the enum signed in all cases.
19142         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
19143         Youngman in
19144         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
19145
19146         * lib/regex_internal.c (re_string_skip_chars, register_state):
19147         (calc_state_hash):
19148         Remove forward decls; no longer needed now that we use prototypes.
19149         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
19150         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
19151         (clean_state_log_if_needed): Likewise.
19152
19153 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19154
19155         * config/srclist.txt: Add glibc bugs 1231-1233.
19156
19157 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19158
19159         Fix problems reported by Sam Steingold in
19160         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
19161         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
19162         assumed that reg_errcode_t is a signed type, which is not
19163         necessarily true if _XOPEN_SOURCE is not defined.
19164         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
19165         since some compilers warn about it otherwise.
19166
19167 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19168
19169         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
19170         (init_word_char, create_initial_state, duplicate_node_closure):
19171         (fetch_token, peek_token_bracket, build_range_exp):
19172         (build_collating_symbol): Remove forward decls; no longer needed
19173         now that we use prototypes.
19174
19175         * lib/regcomp.c:
19176         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
19177         (re_compile_fastmap_iter, regcomp, regerror, regfree):
19178         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
19179         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
19180         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
19181         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
19182         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
19183         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
19184         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
19185         (build_range_exp, build_collating_symbol, parse_bracket_exp):
19186         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
19187         (build_charclass, build_charclass_op, fetch_number, create_tree):
19188         (create_token_tree, mark_opt_subexp, duplicate_tree):
19189         Use prototypes rather than old-style definitions.
19190
19191         * lib/regex_internal.c:
19192         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
19193         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
19194         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
19195         (re_string_reconstruct, re_string_peek_byte_case):
19196         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
19197         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
19198         (re_node_set_init_copy, re_node_set_add_intersect):
19199         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
19200         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
19201         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
19202         (re_acquire_state, re_acquire_state_context, register_state):
19203         (create_ci_newstate, create_cd_newstate, free_state):
19204         Likewise.
19205         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
19206         re_search_2):
19207         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
19208         (re_search_internal, prune_impossible_nodes):
19209         (acquire_init_state_context, check_matching, static):
19210         (check_halt_node_context, check_halt_state_context, proceed_next_node):
19211         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
19212         (update_regs, sift_states_backward, build_sifted_states):
19213         (clean_state_log_if_needed, merge_state_array):
19214         (update_cur_sifted_state, add_epsilon_src_nodes):
19215         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
19216         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
19217         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
19218         (find_recover_state, check_subexp_matching_top, transit_state_mb):
19219         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
19220         (check_arrival, check_arrival_add_next_nodes):
19221         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
19222         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
19223         (check_node_accept_bytes, check_node_accept, extend_buffers):
19224         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
19225         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
19226         (sift_ctx_init):
19227         Likewise.
19228
19229         * lib/regex_internal.h:
19230         (re_string_allocate, re_string_construct, re_string_reconstruct):
19231         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
19232         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
19233         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
19234         (re_string_context_at, re_string_peek_byte_case):
19235         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
19236         is defined, since we now use prototypes always.
19237
19238         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
19239         C89 or better.  All uses removed.
19240
19241 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19242
19243         * config/srclist.txt: Add glibc bugs 1220-1227.
19244
19245 2005-08-20  Jim Meyering  <jim@meyering.net>
19246
19247         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
19248         of unused local, dfa.
19249
19250 2005-08-20  Bruno Haible  <bruno@clisp.org>
19251
19252         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
19253
19254 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19255
19256         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
19257         (re_node_set_insert_last, re_dfa_add_node):
19258         Rename local variables to avoid GCC shadowing warnings.
19259
19260 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19261
19262         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
19263         [defined lint]: Suppress bogus uninitialized-variable warnings.
19264
19265         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
19266         and let the caller return REG_ESPACE if out of space.  This
19267         removes an uninitialied-variable warning with GCC 4.0.1, and also
19268         avoids taking the address of a local variable.  All callers
19269         changed.
19270
19271 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19272
19273         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
19274         $LIBCSRC/posix/regexec.c.
19275         Add glibc bug 1217 for regcomp.c.
19276
19277 2005-08-19  Jim Meyering  <jim@meyering.net>
19278
19279         * lib/regexec.c (proceed_next_node): Redo local variables to
19280         avoid GCC shadowing warnings.
19281
19282 2005-08-18  Bruno Haible  <bruno@clisp.org>
19283
19284         * lib/strstr.c (strstr): Fix return value in multibyte case.
19285         * lib/strcasestr.c (strcasestr): Likewise.
19286
19287 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
19288
19289         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
19290
19291 2005-08-17  Jim Meyering  <jim@meyering.net>
19292
19293         Make the %s format (seconds since the epoch) work for a negative
19294         number and when used with a zero-padded field width, e.g. %015s.
19295
19296         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
19297         label so that it precedes the code to set `digits'.  Otherwise,
19298         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
19299         print `00-22'.  Now, it prints `-0022', as it should.
19300
19301 2005-08-17  Bruno Haible  <bruno@clisp.org>
19302
19303         * modules/strstr (Files): Add m4/mbrtowc.m4.
19304         (Depends-on): Add mbuiter.
19305
19306 2005-08-17  Bruno Haible  <bruno@clisp.org>
19307
19308         * modules/strcasestr: New file.
19309         * MODULES.html.sh (String handling, based on ANSI C 89): Add
19310         strcasestr.
19311
19312 2005-08-17  Bruno Haible  <bruno@clisp.org>
19313
19314         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
19315
19316 2005-08-17  Bruno Haible  <bruno@clisp.org>
19317
19318         * modules/mbuiter: New file.
19319         * MODULES.html.sh (Extended multibyte and wide character utilities):
19320         Add mbuiter.
19321
19322 2005-08-17  Bruno Haible  <bruno@clisp.org>
19323
19324         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
19325         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
19326
19327 2005-08-17  Bruno Haible  <bruno@clisp.org>
19328
19329         * m4/strcasestr.m4: New file.
19330
19331 2005-08-17  Bruno Haible  <bruno@clisp.org>
19332
19333         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
19334         * lib/strstr.c: Completely rewritten, with multibyte locale support.
19335
19336 2005-08-17  Bruno Haible  <bruno@clisp.org>
19337
19338         * lib/strcasestr.h: New file.
19339         * lib/strcasestr.c: New file.
19340
19341 2005-08-17  Bruno Haible  <bruno@clisp.org>
19342
19343         * lib/strcasecmp.c: Use mbuiter.h.
19344
19345 2005-08-17  Bruno Haible  <bruno@clisp.org>
19346
19347         * lib/mbuiter.h: New file.
19348
19349 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
19350
19351         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
19352         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
19353         and gl_GETOPT are both invoked via different paths (as happens
19354         with GNU tar CVS because it uses both argp and getopt), the former
19355         wins.
19356
19357 2005-08-16  Bruno Haible  <bruno@clisp.org>
19358
19359         * modules/tls: New file.
19360         * MODULES.html.sh (Multithreading): Add tls.
19361
19362 2005-08-16  Bruno Haible  <bruno@clisp.org>
19363
19364         * modules/strnlen1: New file.
19365         * MODULES.html.sh (String handling): Add strnlen1.
19366
19367 2005-08-16  Bruno Haible  <bruno@clisp.org>
19368
19369         * modules/strcase (Files): Add m4/mbrtowc.m4.
19370         (Depends-on): Add strnlen1, mbchar.
19371
19372 2005-08-16  Bruno Haible  <bruno@clisp.org>
19373
19374         * modules/mbiter: New file.
19375         * MODULES.html.sh (Extended multibyte and wide character utilities):
19376         Add mbiter.
19377
19378 2005-08-16  Bruno Haible  <bruno@clisp.org>
19379
19380         * modules/mbfile: New file.
19381         * MODULES.html.sh (Extended multibyte and wide character utilities):
19382         Add mbfile.
19383
19384 2005-08-16  Bruno Haible  <bruno@clisp.org>
19385
19386         * modules/mbchar: New file.
19387         * MODULES.html.sh (Extended multibyte and wide character utilities):
19388         New section.
19389
19390 2005-08-16  Bruno Haible  <bruno@clisp.org>
19391
19392         * m4/tls.m4: New file, from GNU gettext.
19393
19394 2005-08-16  Bruno Haible  <bruno@clisp.org>
19395
19396         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
19397         always.
19398         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
19399
19400 2005-08-16  Bruno Haible  <bruno@clisp.org>
19401
19402         * m4/mbiter.m4: New file.
19403
19404 2005-08-16  Bruno Haible  <bruno@clisp.org>
19405
19406         * m4/mbfile.m4: New file.
19407
19408 2005-08-16  Bruno Haible  <bruno@clisp.org>
19409
19410         * m4/mbchar.m4: New file.
19411
19412 2005-08-16  Bruno Haible  <bruno@clisp.org>
19413
19414         * lib/tls.h: New file, from GNU gettext.
19415         * lib/tls.c: New file, from GNU gettext.
19416
19417 2005-08-16  Bruno Haible  <bruno@clisp.org>
19418
19419         * lib/strnlen1.h: New file.
19420         * lib/strnlen1.c: New file.
19421
19422 2005-08-16  Bruno Haible  <bruno@clisp.org>
19423
19424         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
19425         (mbi_init): Update.
19426         (mbi_avail, mbi_advance): Let the iteration end before the terminating
19427         NUL byte, not after it.
19428
19429 2005-08-16  Bruno Haible  <bruno@clisp.org>
19430
19431         * lib/strcase.h (strcasecmp): Add note in comments.
19432         * lib/strncasecmp.c: Use code from strcasecmp.c.
19433         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
19434         (strcasecmp): Work correctly in multibyte locales.
19435
19436 2005-08-16  Bruno Haible  <bruno@clisp.org>
19437
19438         * lib/mbiter.h: New file.
19439
19440 2005-08-16  Bruno Haible  <bruno@clisp.org>
19441
19442         * lib/mbfile.h: New file.
19443
19444 2005-08-16  Bruno Haible  <bruno@clisp.org>
19445
19446         * lib/mbchar.h: New file.
19447         * lib/mbchar.c: New file.
19448
19449 2005-08-16  Bruno Haible  <bruno@clisp.org>
19450
19451         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
19452         the valid ones. Makes the comparison operations transitive:
19453         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
19454         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
19455
19456 2005-08-15  Simon Josefsson  <jas@extundo.com>
19457
19458         * modules/ssize_t (License): Change to 'unlimited'.
19459
19460         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
19461
19462 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
19463
19464         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
19465         Add comments for each pending glibc patch.
19466
19467 2005-08-15  Bruno Haible  <bruno@clisp.org>
19468
19469         * lib/regex.h (__restrict_arr): Don't define to __restrict if
19470         __cplusplus is defined.
19471
19472 2005-08-14  Jim Meyering  <jim@meyering.net>
19473
19474         Sync from coreutils.
19475
19476         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
19477         Use the hash-table-based cycle-detection code not just when
19478         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
19479         Reported by James Youngman in
19480         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
19481         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
19482         FTS_TIGHT_CYCLE_CHECK.
19483         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
19484         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
19485         once again.
19486         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
19487         * lib/fts.c (fd_safer): Remove decl.
19488         Include fcntl--.h rather than unistd-safer.h
19489         (fts_safe_changedir): Don't call fd_safer; no longer needed
19490         now that we include fcntl--.h.
19491
19492 2005-08-12  Simon Josefsson  <jas@extundo.com>
19493
19494         * modules/getndelim2: Use ssize_t module.
19495         * modules/getnline: Likewise.
19496         * modules/safe-read: Likewise.
19497         * modules/xreadlink: Likewise.
19498
19499         * modules/ssize_t: New file.
19500
19501 2005-08-12  Simon Josefsson  <jas@extundo.com>
19502
19503         * m4/readline.m4: Look for termcap, curses or ncurses if required.
19504
19505 2005-08-12  Simon Josefsson  <jas@extundo.com>
19506
19507         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19508         ssize_t.
19509
19510 2005-08-12  Simon Josefsson  <jas@extundo.com>
19511
19512         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
19513         readline, getdelim and check_version.
19514         (Support for systems lacking ISO C 99: Sizes of integer types):
19515         Add size_max.
19516
19517 2005-08-12  Bruno Haible  <bruno@clisp.org>
19518
19519         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
19520
19521 2005-08-11  Simon Josefsson  <jas@extundo.com>
19522
19523         * modules/readline: New file.
19524
19525         * modules/strnlen (Files): Add strnlen.h.
19526
19527 2005-08-11  Simon Josefsson  <jas@extundo.com>
19528
19529         * m4/readline.m4: New file.
19530
19531 2005-08-11  Simon Josefsson  <jas@extundo.com>
19532
19533         * lib/readline.h, readline.c: New file.
19534
19535 2005-08-11  Simon Josefsson  <jas@extundo.com>
19536
19537         * doc/gnulib.texi (Initial import, Finishing touches): Mention
19538         gl_AVOID.
19539
19540 2005-08-11  Bruno Haible  <bruno@clisp.org>
19541
19542         * lib/strnlen.h (strnlen): Change parameter name to match comment.
19543
19544 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
19545
19546         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
19547
19548 2005-08-10  Simon Josefsson  <jas@extundo.com>
19549
19550         * tests/test-iconvme.c: New file.
19551
19552 2005-08-10  Simon Josefsson  <jas@extundo.com>
19553
19554         * m4/strnlen.m4: New file.
19555
19556         * m4/strndup.m4: Don't check for strnlen declaration, done in
19557         strnlen.m4.
19558
19559 2005-08-10  Simon Josefsson  <jas@extundo.com>
19560
19561         * lib/strndup.c: Use strnlen.h.
19562
19563         * lib/strnlen.h: New file.
19564
19565 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
19566
19567         * README: Typos.
19568
19569 2005-08-02  Simon Josefsson  <jas@extundo.com>
19570
19571         * modules/readline: New file.
19572
19573 2005-08-02  Simon Josefsson  <jas@extundo.com>
19574
19575         * modules/getdelim: New file.
19576
19577         * modules/getline: Rewrite, don't use getndelim2.
19578
19579 2005-08-02  Simon Josefsson  <jas@extundo.com>
19580
19581         * m4/getline.m4: Separate out getdelim stuff into separate module.
19582
19583         * m4/getdelim.m4: New file.
19584
19585 2005-08-02  Simon Josefsson  <jas@extundo.com>
19586
19587         * lib/getline.h, getline.c: Rewrite.
19588
19589         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
19590
19591 2005-07-31  Bruno Haible  <bruno@clisp.org>
19592
19593         * lib/lock.h (gl_lock_initializer): New macro.
19594         (gl_lock_define_initialized): Use it.
19595         (gl_rwlock_initializer): New macro.
19596         (gl_rwlock_define_initialized): Use it.
19597         (gl_recursive_lock_initializer): New macro.
19598         (gl_recursive_lock_define_initialized): Use it.
19599
19600 2005-07-30  Karl Berry  <karl@gnu.org>
19601
19602         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
19603         Report from Ben Pfaff, regarding getopt.
19604
19605 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
19606
19607         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
19608         normal way.
19609         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
19610         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
19611         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
19612         (gl_GETOPT): Use the new macros.  Most of the implementation
19613         is moved to the new macros.  This is for programs like Emacs
19614         that don't want all the functionality of gl_GETOPT.
19615
19616 2005-07-26  Bruno Haible  <bruno@clisp.org>
19617
19618         * m4/lock.m4: Update from GNU gettext.
19619
19620 2005-07-26  Bruno Haible  <bruno@clisp.org>
19621
19622         * lib/lock.h: Update from GNU gettext.
19623         * lib/lock.c: Update from GNU gettext.
19624
19625 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
19626
19627         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
19628         obsolescent AC_TRY_RUN.  Include the default includes files, for
19629         'exit'.
19630
19631 2005-07-24  Bruno Haible  <bruno@clisp.org>
19632
19633         * modules/visibility: New file.
19634         * MODULES.html.sh (Misc): Add visibility.
19635
19636 2005-07-24  Bruno Haible  <bruno@clisp.org>
19637
19638         * m4/visibility.m4: New file.
19639
19640 2005-07-24  Bruno Haible  <bruno@clisp.org>
19641
19642         * doc/visibility.texi: New file.
19643
19644 2005-07-22  Bruno Haible  <bruno@clisp.org>
19645
19646         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
19647         $(ALLOCA_H), redundant through BUILT_SOURCES.
19648         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
19649         redundant through BUILT_SOURCES.
19650         * modules/byteswap (Makefile.am): Remove explicit dependency on
19651         $(BYTESWAP_H), redundant through BUILT_SOURCES.
19652         * modules/fnmatch (Makefile.am): Remove explicit dependency on
19653         $(FNMATCH_H), redundant through BUILT_SOURCES.
19654         * modules/getopt (Makefile.am): Remove explicit dependency on
19655         $(GETOPT_H), redundant through BUILT_SOURCES.
19656         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
19657         redundant through BUILT_SOURCES.
19658         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
19659         redundant through BUILT_SOURCES.
19660         * modules/stdbool (Makefile.am): Remove explicit dependency on
19661         $(STDBOOL_H), redundant through BUILT_SOURCES.
19662         * modules/stdint (Makefile.am): Remove explicit dependency on
19663         $(STDINT_H), redundant through BUILT_SOURCES.
19664         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
19665         Remove explicit dependency on $(SYSEXITS_H).
19666         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
19667
19668 2005-07-18  Simon Josefsson  <jas@extundo.com>
19669
19670         * lib/check-version.c (check_version): Accept identical versions too.
19671
19672 2005-07-18  Bruno Haible  <bruno@clisp.org>
19673
19674         * modules/lock: New file.
19675         * MODULES.html.sh (Multithreading): New section.
19676
19677 2005-07-18  Bruno Haible  <bruno@clisp.org>
19678
19679         * m4/lock.m4: New file, from GNU gettext.
19680
19681 2005-07-18  Bruno Haible  <bruno@clisp.org>
19682
19683         * lib/lock.h: New file, from GNU gettext.
19684         * lib/lock.c: New file, from GNU gettext.
19685
19686 2005-07-18  Bruno Haible  <bruno@clisp.org>
19687
19688         * lib/lock.h (gl_once_t): New type.
19689         (gl_once_define, gl_once): New macros.
19690         * lib/lock.c (fresh_once): New variable.
19691         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
19692         functions.
19693
19694 2005-07-16  Simon Josefsson  <jas@extundo.com>
19695
19696         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
19697         workaround, suggested by Bruno.
19698
19699 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19700
19701         * modules/xalloc (Depends-on): Add xalloc-die.
19702         * modules/xvasprintf (Depends-on): Add xalloc-die.
19703
19704 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19705
19706         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
19707         with a minor change.
19708
19709 2005-07-15  Bruno Haible  <bruno@clisp.org>
19710
19711         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
19712         When using lib/poll.c, define poll as rpl_poll.
19713
19714 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
19715
19716         * modules/argp (Depends-on): Remove unlocked-io.
19717
19718 2005-07-14  Derek Price  <derek@ximbiot.com>
19719
19720         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
19721         for glob symlink bug.
19722
19723 2005-07-14  Bruno Haible  <bruno@clisp.org>
19724
19725         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
19726         Instead, test for *_unlocked function declarations directly.
19727
19728 2005-07-11  Simon Josefsson  <jas@extundo.com>
19729
19730         * modules/size_max: New file.
19731
19732         * modules/xsize: Depend on size_max module for size_max.m4.
19733
19734 2005-07-11  Simon Josefsson  <jas@extundo.com>
19735
19736         * lib/size_max.h: New file.
19737
19738 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
19739
19740         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
19741         copyright symbol and the year.
19742         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
19743         (version_etc_va): Use parameterized copyright notice.
19744         Reword to conform to the current GNU coding standards.
19745
19746 2005-07-11  Karl Berry  <karl@gnu.org>
19747
19748         * doc/gnulib.texi (Quoting): new node.
19749         (Initial import): more info, from Patrice.
19750
19751 2005-07-11  Bruno Haible  <bruno@clisp.org>
19752
19753         * gnulib-tool (func_usage): Document option --avoid.
19754         (Command line options): Handle --avoid.
19755         (func_acceptable): New function.
19756         (func_modules_transitive_closure): Use it.
19757
19758 2005-07-11  Bruno Haible  <bruno@clisp.org>
19759
19760         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
19761         Reported by Jim Meyering.
19762
19763 2005-07-10  Bruno Haible  <bruno@clisp.org>
19764
19765         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
19766         Needed when size_t is smaller than 'unsigned int'.
19767         Reported by Paul Eggert.
19768
19769 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19770
19771         * modules/argp (Depends-on): Add unlocked-io
19772
19773 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19774
19775         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
19776         block of defines.
19777
19778 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
19779
19780         * config/srclist.txt: Comment out regcomp.c, since we have a porting
19781         fix now.
19782
19783 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
19784         and Paul Eggert  <eggert@cs.ucla.edu>
19785
19786         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
19787         in wint_t, not wchar_t.  Remove now-unnecessary cast.
19788
19789 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19790
19791         * modules/regex (Files): Add lib/regex_internal.c,
19792         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
19793         (Depends-on): Add extensions.
19794         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
19795
19796 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19797
19798         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
19799         pathconf.
19800         * m4/same.m4 (gl_SAME): Likewise.
19801         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
19802
19803         * m4/regex.m4: Adjust to new libc regex implementation.
19804         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
19805         all the .c and .h parts of (the new) regex.
19806         Quote the m4 stuff better.
19807         Check for RE_ICASE bug of old gnulib.
19808         Check for REG_STARTEND of recent libc.
19809         Rename local variables from jm_* to gl_*.
19810         Quote operand of "test -f".
19811         Say "recent enough" version of libc, not "version 2".
19812         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
19813         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
19814         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
19815         Remove check for btowc, isascii.
19816         Require AM_LANGINFO_CODESET.
19817
19818 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19819
19820         * lib/regex.c, regex.h: Sync from libc.
19821         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
19822         * lib/regexec.c:
19823         New files, synced from libc, except that regex_internal.h
19824         currently has a small porting fix.
19825
19826 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19827
19828         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
19829         regex_internal.c, regexec.c.
19830         Add regex_internal.h too, but as a comment, since the libc version
19831         is currently broken in gnulib mode.
19832
19833 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
19834
19835         Support programs like Emacs that use gnulib but not gettext.
19836         * MODULES.html.sh (Internationalization functions): Add gettext-h.
19837         * modules/gettext-h: New file.
19838         * modules/gettext (Files): Remove lib/gettext.h.
19839         (Depends-on): Add gettext-h.
19840         (Makefile.am): Remove lib_SOURCES.
19841         * modules/argmatch, modules/c-stack, modules/closeout:
19842         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
19843         * modules/execute, modules/file-type, modules/getaddrinfo:
19844         * modules/getopt, modules/human, modules/javacomp:
19845         * modules/javaexec, modules/mkdir-p, modules/obstack:
19846         * modules/openat, modules/pagealign_alloc, modules/pipe:
19847         * modules/quotearg, modules/regex, modules/rpmatch:
19848         * modules/unicodeio, modules/userspec, modules/version-etc:
19849         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
19850         * modules/xsetenv:
19851         Depend on gettext-h, not gettext.
19852
19853 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
19854
19855         * gnulib-tool (func_import): Add support for 'public domain' license.
19856         * modules/alloca, modules/atexit, modules/memmove:
19857         Now public domain, not GPL.
19858         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
19859         * modules/realloc, modules/strerror, modules/strtod:
19860         Now LGPL, not GPL.
19861
19862 2005-07-05  Bruno Haible  <bruno@clisp.org>
19863
19864         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
19865         autoconf CVS. Needed for mingw.
19866
19867 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19868
19869         Remove the dependency of the strftime module on the tzset module.
19870         * modules/strftime (Depends-on): Remove dependency on tzset.
19871
19872 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19873
19874         Remove the dependency of the strftime module on the tzset module.
19875         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
19876         gl_FUNC_TZSET_CLOBBER.
19877
19878 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19879
19880         Remove the dependency of the strftime module on the tzset module.
19881         * lib/strftime.c (my_strftime)
19882         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
19883         Copy the input structure, to work around some of the bug with
19884         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
19885         Solaris releases, you should also use the tzset module, but we won't
19886         require it as a dependency any more since we don't want LGPLed code
19887         to depend on GPLed code.
19888
19889 2005-07-02  Jim Meyering  <jim@meyering.net>
19890
19891         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
19892         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
19893         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
19894         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
19895
19896 2005-07-02  Jim Meyering  <jim@meyering.net>
19897
19898         * lib/backupfile.c (backup_args): Change a `0' to NULL.
19899
19900 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
19901
19902         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
19903         declares only 'struct timespec;' (!).
19904
19905 2005-07-01  Jim Meyering  <jim@meyering.net>
19906
19907         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
19908         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
19909         * lib/save-cwd.c, tempname.c:
19910         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
19911         and don't include <sys/file.h>).
19912
19913 2005-06-29  Jim Meyering  <jim@meyering.net>
19914
19915         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
19916         type name.  Use the variable name instead.
19917         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
19918         Likewise.
19919
19920 2005-06-28  Simon Josefsson  <jas@extundo.com>
19921
19922         * modules/check-version (Files): Add check-version.m4.
19923
19924 2005-06-28  Simon Josefsson  <jas@extundo.com>
19925
19926         * m4/check-version.m4: New file, suggested by Jim Meyering
19927         <jim@meyering.net>.
19928
19929 2005-06-28  Simon Josefsson  <jas@extundo.com>
19930
19931         * lib/check-version.h, lib/check-version.c: New files.
19932
19933 2005-06-28  Simon Josefsson  <jas@extundo.com>
19934
19935         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
19936         collision with global variable.  Better indentation.  Don't
19937         increment buffer pointer beyond buffer end.  Based on comments
19938         from Paul Eggert <eggert@cs.ucla.edu>.
19939
19940         * lib/base64.h: Indent.
19941
19942 2005-06-28  Simon Josefsson  <jas@extundo.com>
19943
19944         * doc/gnulib.texi (Library version handling): New section.
19945
19946 2005-06-28  Jim Meyering  <jim@meyering.net>
19947
19948         * check-module (find_included_lib_files): Hard-code another
19949         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
19950         but modules/fts-lgpl (correctly) does not list those files.
19951
19952         * modules/canonicalize (Files): Add lib/pathmax.h.
19953
19954 2005-06-25  Simon Josefsson  <jas@extundo.com>
19955
19956         * modules/check-version: New file.
19957
19958 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
19959
19960         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
19961         initializer of struct addrinfo, as an indication that we don't
19962         care how many members the structure has.
19963
19964 2005-06-24  Derek Price  <derek@ximbiot.com>
19965         and Bruno Haible  <bruno@clisp.org>
19966
19967         Remove stat module & update lstat.
19968         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
19969         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
19970         * m4/stat.m4: Remove this file.
19971
19972 2005-06-24  Derek Price  <derek@ximbiot.com>
19973         and Bruno Haible  <bruno@clisp.org>
19974
19975         Remove stat module & update lstat.
19976         * lib/stat.c: Remove this file...
19977         (slash_aware_lstat): ...moving this content and its support...
19978         * lib/lstat.c (rpl_lstat): ...into here.
19979         * lib/lstat.h: New file.
19980
19981 2005-06-24  Derek Price  <derek@ximbiot.com>
19982         and Bruno Haible  <bruno@clisp.org>
19983
19984         Remove stat module & update lstat.
19985         * config/srclist.txt (libc sources): Remove stat.
19986
19987 2005-06-24  Derek Price  <derek@ximbiot.com>
19988         and Bruno Haible  <bruno@clisp.org>
19989
19990         Remove stat module & update lstat.
19991         * MODULES.html.sh (stat): Remove.
19992         * MODULES.html: Regenerated.
19993         * modules/lstat (Description): Correct function name.
19994         (Files): Add "lstat.h".
19995         (Depends-on): Remove stat, add xalloc, stat-macros.
19996         * modules/stat: Remove this file.
19997         (Include): Add "lstat.h", remove <sys/stat.h>.
19998
19999 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
20000
20001         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
20002         (ranged_convert): Don't save conversion in a temporary struct.
20003         This causes a warning with GCC 4.0.0, and anyway in the typical
20004         case it's not worth the extra 100 bytes or so of code.
20005         (ranged_convert, __mktime_internal): When calling a function via a
20006         pointer P, use P () rather than (*P) (), as we now assume C89 or
20007         better.
20008
20009 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20010
20011         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
20012         "who -r" failed to give output.  Problem reported by Tim Waugh.
20013
20014         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
20015         (xcalloc): Use it to avoid needless tests.
20016         Problem reported by Jim Meyering.
20017
20018 2005-06-20  Derek Price  <derek@ximbiot.com>
20019
20020         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
20021         unnecessary for Autoconfs > 2.59c.
20022
20023 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20024
20025         * lib/argp.h (__option_is_short): Check upper limit of
20026         __key. Isprint() requires its argument to have the value
20027         of an unsigned char or EOF.
20028
20029 2005-06-16  Jim Meyering  <jim@meyering.net>
20030
20031         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
20032         when either N or S is zero.
20033
20034 2005-06-16  Derek Price  <derek@ximbiot.com>
20035
20036         * m4/bison.m4: Declare YACC & YFLAGS precious.
20037
20038 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
20039
20040         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
20041         multibyte string or pattern, fall back on unibyte matching.
20042         Problem reported by James Youngman.
20043
20044 2005-06-08  Bruno Haible  <bruno@clisp.org>
20045
20046         * modules/csharpcomp: New file.
20047         * MODULES.html.sh (C#): Add csharpcomp.
20048
20049 2005-06-08  Bruno Haible  <bruno@clisp.org>
20050
20051         * m4/csharpcomp.m4: New file, from GNU gettext.
20052
20053 2005-06-08  Bruno Haible  <bruno@clisp.org>
20054
20055         * lib/csharpcomp.h: New file, from GNU gettext.
20056         * lib/csharpcomp.c: New file, from GNU gettext.
20057         * lib/csharpcomp.sh.in: New file, from GNU gettext.
20058
20059 2005-06-08  Bruno Haible  <bruno@clisp.org>
20060
20061         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
20062         warning on mingw.
20063
20064 2005-06-07  Derek Price  <derek@ximbiot.com>
20065
20066         Sync from CVS.
20067         * lib/glob_.h: Indent nested #ifdef.
20068
20069 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20070
20071         Sync from coreutils.
20072         Use "file name" when talking about file names, instead of "filename"
20073         or "path", as per the GNU coding standards.
20074         * lib/mkdir-p.c: Renamed from makepath.c.
20075         (make_dir_parents): Renamed from make_path.  All callers changed.
20076         * lib/mkdir-p.h: Likewise.  All includers changed.
20077         * lib/filenamecat.c: Renamed from path-concat.c.
20078         (file_name_concat): Renamed from path_concat.  All callers changed.
20079         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
20080         * lib/filenamecat.h: Likewise.  All includers changed.
20081         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
20082         in comments or local variable names.
20083         * lib/basename.c: Likewise.
20084         * lib/canonicalize.c, canonicalize.h: Likewise.
20085         * lib/dirname.c, dirname.h: Likewise.
20086         * lib/euidaccess.c: Likewise.
20087         * lib/exclude.c: Likewise
20088         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
20089         * lib/fsusage.c, fsuage.h: Likewise.
20090         * lib/fts.c, fts_.h: Likewise.
20091         * lib/getcwd.c: Likewise.
20092         * lib/getloadavg.c: Likewise.
20093         * lib/mkstemp.c: Likewise.
20094         * lib/mountlist.c, mountlist.h: Likewise.
20095         * lib/openat.c, openat.h: Likewise.
20096         * lib/readlink-stub.c: Likewise.
20097         * lib/readutmp.c, readutmp.h: Likewise.
20098         * lib/rename.c: Likewise.
20099         * lib/rmdir.c: Likewise.
20100         * lib/same.c: Likewise.
20101         * lib/savedir.c: Likewise.
20102         * lib/stripslash.c: Likewise.
20103         * lib/tempname.c: Likewise.
20104         * lib/xreadlink.c: Likewise.
20105         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
20106         All uses changed.
20107         * lib/exclude.h: Likewise.
20108
20109         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
20110         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20111         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
20112         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20113         * lib/pathmax.h: Include <limits.h> unconditionally, since other
20114         files have been getting away with it for years (MORE/BSD 4.3
20115         is extinct now).
20116         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
20117         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20118
20119         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
20120         Define to 256, not 255, as per modern POSIX.
20121
20122 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20123
20124         Sync from coreutils.
20125         Use "file name" when talking about file names, instead of "filename"
20126         or "path", as per the GNU coding standards.
20127         * MODULES.html.sh: mkdir-p renamed from makepath.
20128         filenamecat renamed from path-concat.
20129         * modules/filenamecat: Renamed from modules/path-concat.
20130         (Files): filenamecat.h and filenamecat.c renamed from
20131         path-concat.h and path-concat.c.
20132         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
20133         (Include): filenamecat.h, not path-concat.h.
20134         * modules/mkdir-p: Renamed from modules/makepath.
20135         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
20136         makepath.c.
20137         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
20138         (Include): mkdir-p.h, not makepath.h.
20139
20140 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20141
20142         Sync from coreutils.
20143         * m4/mkdir-p.m4: Renamed from makepath.m4.
20144         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
20145         Rename files from makepath.c to mkdir-p.c, and from
20146         makepath.h to mkdir-p.h.
20147         * m4/filenamecat.m4: Renamed from path-concat.m4.
20148         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
20149         Rename files from path-concat.c to filenamecat.c,
20150         and from path-concat.h to filenamecat.h.
20151         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
20152         "file name" in local variables or comments.
20153         * m4/rename.m4: Likewise.
20154
20155 2005-06-01  Bruno Haible  <bruno@clisp.org>
20156
20157         * modules/csharpexec: New file.
20158         * MODULES.html.sh (C#): New section.
20159
20160 2005-06-01  Bruno Haible  <bruno@clisp.org>
20161
20162         * m4/csharp.m4: New file, from GNU gettext.
20163         * m4/csharpexec.m4: New file, from GNU gettext.
20164
20165 2005-06-01  Bruno Haible  <bruno@clisp.org>
20166
20167         * lib/csharpexec.h: New file, from GNU gettext.
20168         * lib/csharpexec.c: New file, from GNU gettext.
20169         * lib/csharpexec.sh.in: New file, from GNU gettext.
20170
20171 2005-05-31  Derek Price  <derek@ximbiot.com>
20172             Paul Eggert  <eggert@cs.ucla.edu>
20173
20174         Sync from cvs.
20175         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20176
20177 2005-05-31  Derek Price  <derek@ximbiot.com>
20178             Paul Eggert  <eggert@cs.ucla.edu>
20179
20180         Sync from cvs.
20181         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20182
20183 2005-05-29  Derek Price  <derek@ximbiot.com>
20184
20185         * config/srclist.txt (glob_.h, glob.c): Add these files.
20186
20187 2005-05-29  Derek Price  <derek@ximbiot.com>
20188
20189         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
20190         * modules/glob: New file.
20191         * modules/getlogin_r: Add link to POSIX spec in description.
20192
20193 2005-05-29  Derek Price  <derek@ximbiot.com>
20194             Paul Eggert  <eggert@cs.ucla.edu>
20195
20196         * m4/glob.m4: New file.
20197
20198 2005-05-29  Derek Price  <derek@ximbiot.com>
20199             Paul Eggert  <eggert@cs.ucla.edu>
20200
20201         * lib/glob_.h, lib/glob.c: New files.
20202
20203 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20204
20205         * modules/fts (Files): Remove m4/inttypes-pri.m4.
20206         * modules/fts-lgpl (Depends-on): Remove gettext.
20207
20208 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20209
20210         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
20211         and don't require gt_INTTYPES_PRI.
20212
20213 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20214
20215         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
20216
20217         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
20218         the configuration hassle isn't worth it.
20219         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
20220         (LONGEST_MODIFIER, PRIuMAX): Remove.
20221
20222 2005-05-27  Bruno Haible  <bruno@clisp.org>
20223
20224         * lib/getlogin_r.h: Remove second include of <stddef.h>.
20225
20226 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
20227
20228         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
20229         _POSIX_PTHREAD_SEMANTICS for Solaris.
20230
20231 2005-05-25  Derek Price  <derek@ximbiot.com>
20232
20233         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
20234
20235 2005-05-25  Derek Price  <derek@ximbiot.com>
20236             Paul Eggert  <eggert@cs.ucla.edu>
20237
20238         * modules/getlogin_r, m4/getlogin_r.m4: New files.
20239         * lib/getlogin_r.c, getlogin_r.h: New files.
20240
20241 2005-05-25  Bruno Haible  <bruno@clisp.org>
20242             Derek Price  <derek@ximbiot.com>
20243
20244         * lib/getlogin_r.h: Simplify API documentation.
20245
20246 2005-05-23  Derek Price  <derek@ximbiot.com>
20247
20248         * modules/minmax (Files): Add m4/minmax.m4.
20249         (configure.ac): Add gl_MINMAX.
20250
20251 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
20252
20253         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
20254         so that unistd-safer.h (GPL'ed code) need not be included.
20255
20256 2005-05-22  Bruno Haible  <bruno@clisp.org>
20257
20258         * m4/minmax.m4: New file.
20259         Based on a patch by Derek Price <derek@ximbiot.com>.
20260
20261 2005-05-22  Bruno Haible  <bruno@clisp.org>
20262
20263         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
20264         (INT64_MIN): Fix definition.
20265         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
20266
20267         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
20268         NEED_SIGNED_INT_TYPES.
20269
20270         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
20271         HAVE_SYSTEM_INTTYPES.
20272
20273 2005-05-22  Bruno Haible  <bruno@clisp.org>
20274
20275         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
20276         Also include <sys/param.h> if it defines MIN, MAX.
20277         Based on a patch by Derek Price <derek@ximbiot.com>.
20278
20279 2005-05-21  Jim Meyering  <jim@meyering.net>
20280
20281         * modules/fts (Files): Add m4/inttypes-pri.m4.
20282         (Depends-on): Add lstat and remove gettext.  Alphabetize.
20283
20284 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20285
20286         New fts module.
20287         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
20288         (setup_dir, free_dir): New functions.
20289         (enter_dir, leave_dir): Define trivial
20290         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
20291         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
20292         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
20293         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
20294         Move to fts-cycle.c.
20295         (fts_open): Use setup_dir.
20296         (fts_close): Use free_dir.
20297         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
20298         This adds a label and some gotos, but the alternatives were messier.
20299         Check for memory allocation failure when entering a dir.
20300         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
20301         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
20302         (FTS): New member fts_cycle, that is a union that contains the
20303         old active_dir_ht and cycle_state.  All uses changed to mention
20304         fts_cycle.ht and fts_cycle.state.
20305         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
20306         fts.c, with the following changes:
20307         (setup_dir, free_dir): New functions.
20308         (enter_dir): Now returns bool.  Return true if successful, false
20309         if memory exhausted.  All callers changed.
20310         Do not bother partly cleaning up on
20311         memory allocation failure; that is free_dir's job.
20312         However, free ad if hash_insert fails, to avoid memory leak.
20313         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
20314         fts->fts_options to see which union member to use.
20315
20316 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20317
20318         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
20319         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
20320
20321 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20322
20323         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
20324
20325 2005-05-20  Jim Meyering  <jim@meyering.net>
20326
20327         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
20328         Now a macro, to pacify GCC.
20329
20330 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20331
20332         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
20333         of -1.
20334
20335 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20336
20337         * lib/chown.c (rpl_chown): Return -1 on failure.
20338
20339 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20340
20341         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
20342         Don't check for stddef.h.
20343         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
20344         don't use its results.
20345         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
20346         since we include them unconditionally.  Don't require
20347         AM_STDBOOL_H, since stdbool is a prerequisite.
20348         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
20349         since we assume C89 or better.
20350         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
20351         as we don't use their results.
20352         Don't check for fchdir, memmove, memset, strrchr, as we use
20353         them unconditionally.
20354         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
20355         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
20356
20357 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20358
20359         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
20360         Include <stddef.h> unconditionally, since we assume C89 now.
20361         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
20362         * lib/fts.c: Include fts_.h first, to check interface.
20363         Do not include intprops.h; no longer needed.
20364         Include cycle-check.h and hash.h, since fts_.h no longer does.
20365         Remove unnecessary casts of closedir to void.
20366         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
20367         decide whether to decrement nlinks.
20368         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
20369         (FTS): Use struct hash_table * instead of Hash_table, so that
20370         we no longer need to include hash.h here.
20371
20372 2005-05-18  Jim Meyering  <jim@meyering.net>
20373
20374         * modules/dirfd (License): Change to LGPL.  Most of the code
20375         is already in the public domain.
20376
20377 2005-05-18  Jim Meyering  <jim@meyering.net>
20378
20379         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
20380         Reported by Yoann Vandoorselaere.
20381
20382 2005-05-17  Jim Meyering  <jim@meyering.net>
20383
20384         * m4/fts.m4: New file, from coreutils.
20385
20386 2005-05-17  Jim Meyering  <jim@meyering.net>
20387
20388         * lib/fts.c, lib/fts_.h: New files, from coreutils.
20389
20390 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20391
20392         Sync from coreutils.
20393         * m4/unlinkdir.m4: New file.
20394
20395 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20396
20397         Sync from coreutils.
20398         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
20399         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
20400         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
20401         White space changes only.
20402         * lib/makepath.c (make_path): Port to hosts where leading "//" is
20403         special.
20404         * lib/yesno.c: Include getline.h, not ctype.h.
20405         (yesno): Don't remove leading white space; POSIX doesn't allow it.
20406         Use getline to remove arbitrary restriction on response length.
20407
20408 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20409
20410         * config/srclist-update: Spell out "Street" in FSF postal
20411         mail address; this is the style the FSF seems to prefer.
20412
20413         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
20414         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
20415         this updates FSF postal mail address.
20416
20417         Sync from coreutils.
20418         * modules/unlinkdir: New file.
20419         * modules/yesno (Depends-on): Add getline.
20420         * MODULES.html.sh (File system functions): Add unlinkdir.
20421
20422 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20423
20424         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
20425         lib/strsep.h:
20426         Change the initial comment to refer to GPL, not LGPL.
20427         gnulib-tool will change it to LGPL as needed.
20428
20429         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
20430         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
20431         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
20432         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
20433         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
20434         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
20435         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
20436         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
20437         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
20438         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
20439         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
20440         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
20441         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
20442         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
20443         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
20444         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
20445         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
20446         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
20447         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
20448         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
20449         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
20450         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
20451         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
20452         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
20453         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
20454         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
20455         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
20456         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
20457         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
20458         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
20459         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
20460         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
20461         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
20462         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
20463         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
20464         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
20465         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
20466         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
20467         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
20468         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
20469         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
20470         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
20471         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
20472         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
20473         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
20474         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
20475         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
20476         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
20477         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
20478         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
20479         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
20480         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
20481         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
20482         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
20483         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
20484         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
20485         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
20486         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
20487         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
20488         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
20489         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
20490         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
20491         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
20492         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
20493         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
20494         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
20495         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
20496         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
20497         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
20498         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
20499         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
20500         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
20501         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
20502         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
20503         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
20504         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
20505         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
20506         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
20507         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
20508         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
20509         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
20510         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
20511         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
20512         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
20513         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
20514         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
20515         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
20516         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
20517         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
20518         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
20519         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
20520         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
20521         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
20522         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
20523         lib/yesno.c, lib/yesno.h:
20524         Update FSF postal mail address.
20525
20526 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20527
20528         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
20529         tests/test-memmem.c, tests/test-stpncpy.c:
20530         Update FSF postal mail address.
20531
20532 2005-05-13  Bruno Haible  <bruno@clisp.org>
20533
20534         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
20535         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
20536         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
20537         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
20538         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
20539         Add support for 64-bit integers in the MSVC compiler.
20540
20541 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20542
20543         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
20544
20545 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
20546
20547         * gnulib-tool (func_import): Sort and uniquify recommended includes.
20548
20549 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
20550
20551         * doc/getdate.texi (General date syntax): Don't say that date
20552         date --iso-8601=ns generates acceptable dates; it doesn't yet.
20553         Problem reported by Nic Ferrier.
20554
20555 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20556
20557         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
20558         specified in ai_socktype. Fix invalid ai_protocol
20559         check. ai_protocol is usually set to 0 or depending on
20560         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
20561         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
20562         ai_socktype / ai_protocol in the returned addrinfo structure.
20563
20564 2005-05-10  Simon Josefsson  <jas@extundo.com>
20565
20566         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
20567         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
20568
20569 2005-05-10  Karl Berry  <karl@gnu.org>
20570
20571         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
20572         (from http://www.gnu.org/licenses).
20573         * doc/COPYING.LIB: also rename to COPYING.LESSER.
20574         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
20575         fdl.texi suffices.
20576
20577 2005-05-10  Karl Berry  <karl@gnu.org>
20578
20579         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
20580         (COPYING.DOC): remove.
20581
20582         * config/srclist-update: new FSF address.
20583
20584 2005-05-10  Derek Price  <derek@ximbiot.com>
20585
20586         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
20587         possible.
20588
20589 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20590             Bruno Haible  <bruno@clisp.org>
20591
20592         * modules/inet_ntop: New file.
20593         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20594         inet_ntop.
20595
20596 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20597             Bruno Haible  <bruno@clisp.org>
20598
20599         * m4/inet_ntop.m4: New file.
20600
20601 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20602             Bruno Haible  <bruno@clisp.org>
20603
20604         * lib/inet_ntop.h: New file.
20605         * lib/inet_ntop.c: New file, from glibc with modifications.
20606
20607 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
20608
20609         * modules/time_r (License): Change to LGPL.
20610         * modules/extensions (License): Change to LGPL.  Actually,
20611         the license is more permissive than that, but currently gnulib-tool
20612         doesn't know how to handle more-permissive licenses.
20613
20614         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
20615         Problem reported by Dave Love.
20616
20617 2005-05-08  Jim Meyering  <jim@meyering.net>
20618
20619         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
20620         blank.
20621
20622 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20623
20624         * modules/argmatch (Depends-on): Add stdbool.
20625         * modules/backupfile (Depends-on): Likewise.
20626         * modules/chdir-long (Depends-on): Likewise.
20627         * modules/closeout (Depends-on): Likewise.
20628         * modules/cycle-check (Depends-on): Likewise.
20629         * modules/dirname (Depends-on): Likewise.
20630         * modules/fnmatch (Depends-on): Likewise.
20631         * modules/fsusage (Depends-on): Likewise.
20632         * modules/fwriteerror (Depends-on): Likewise.
20633         * modules/getcwd (Depends-on): Likewise.
20634         * modules/getloadavg (Depends-on): Likewise.
20635         * modules/hard-locale (Depends-on): Likewise.
20636         * modules/makepath (Depends-on): Likewise.
20637         * modules/mountlist (Depends-on): Likewise.
20638         * modules/nanosleep (Depends-on): Likewise.
20639         * modules/posixtm (Depends-on): Likewise.
20640         * modules/quotearg (Depends-on): Likewise.
20641         * modules/readtokens (Depends-on): Likewise.
20642         * modules/readtokens0 (Depends-on): Likewise.
20643         * modules/readutmp (Depends-on): Likewise.
20644         * modules/save-cwd (Depends-on): Likewise.
20645         * modules/strftime (Depends-on): Likewise.
20646         * modules/userspec (Depends-on): Likewise.
20647         * modules/utimecmp (Depends-on): Likewise.
20648         * modules/xgetcwd (Depends-on): Likewise.
20649         * modules/xnanosleep (Depends-on): Likewise.
20650         * modules/xstrtod (Depends-on): Likewise.
20651         * modules/yesno (Depends-on): Likewise.
20652
20653 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
20654
20655         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
20656         needless checks.
20657
20658 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20659
20660         Merge from coreutils.  Among other things,
20661         add bulletproofing for cases where stdin, stdout, or stderr are closed.
20662         * lib/fd-safer.c: New file.
20663         * lib/fcntl-safer.h, open-safer.c: Remove.
20664         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
20665         * lib/dup-safer.c: Include unistd-safer.h first.
20666         Don't include errno.h.
20667         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
20668         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
20669         * lib/file-type.c: Rely on file-type.h change.
20670         * lib/getloadavg.c: Include unistd-safer.h.
20671         (getloadavg): Use safer open.
20672         * lib/getusershell.c: Include "stdio-safer.h".
20673         (getusershell): Use safer fopen.
20674         * lib/long-options.c (long_options): Use NULL rather than 0.
20675         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
20676         'free'.
20677         * lib/modechange.c: Likewise.
20678         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
20679         (MODE_DONE): New constant.
20680         (struct mode_change): Remove 'next' member.
20681         (make_node_op_equals): New function; like the old one of the
20682         same name, except it allocates an array.
20683         (mode_compile, mode_create_from_ref): Use it.
20684         (mode_compile): Allocate result as an array, not a linked list.
20685         Parse octal string ourself, so that we catch mistakes like "+0".
20686         (mode_adjust): Arg is an array, not a linked list.
20687         * lib/modechange.c: Include stat-macros.h, xalloc.h.
20688         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
20689         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
20690         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
20691         Remove.  This is now stat-macros.h's job.
20692         (talloc): Remove.  All callers replaced by xalloc, so that
20693         our invokers don't have to worry about reporting memory failures.
20694         (make_node_op_equals): Remove.
20695         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20696         New constants.
20697         (struct mode_change): Moved here from modechange.h.
20698         (mode_append_entry): Remove.
20699         (mode_compile): Remove MASKED_OPS arg, since it encouraged
20700         apps to have incorrect behavior.  Use simpler algorithm for head
20701         and tail.  Don't futz with umask; that's now the job of mode_adjust.
20702         Detect more invalid usages rather than having somewhat-random behavior.
20703         Don't insert an "a=" action, as that leads to incorrect behavior.
20704         (mode_compile, mode_create_from_ref): Return NULL on error instead
20705         of an enum, since now there's only one way to have an error.  All
20706         callers changed.
20707         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
20708         at the correct time.  Simplify calculation of "+u" and its ilk.
20709         Don't mishandle "+X".
20710         (mode_free): Remove "register" and localize decls.
20711         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20712         (struct mode_change): Move to modechange.c; callers don't
20713         need to see this stuff.
20714         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
20715         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
20716         (mode_change, mode_adjust): Reflect the new signatures noted above.
20717         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
20718         that might redefine system include files.
20719         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
20720         (my_usleep): Use NULL rather than (void *) 0.
20721         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
20722         Use siginterrupt to specify that system calls should be interrupted.
20723         (rpl_nanosleep): Move initialization of suspended closer to call of
20724         my_usleep.
20725         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
20726         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
20727         (desirable_utmp_entry): New function.
20728         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
20729         using x2nrealloc, to simplify logic.
20730         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
20731         size calculation.  Do not assume utmp file is a regular file.
20732         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
20733         (READ_UTMP_CHECK_PIDS): New constant.
20734         * lib/save-cwd.c: Include unistd-safer.h.
20735         (save_cwd): Use fd_safer.
20736         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
20737         [!_LIBC] Include "stat-macros.h" instead.
20738         * lib/unistd-safer.h (fd_safer): New decl.
20739
20740 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20741
20742         * modules/getloadavg (Depends-on): Add unistd-safer.
20743         * modules/getusershell (Depends-on): Add stdio-safer.
20744         * modules/lstat (Depends-on): Remove xalloc.
20745         * modules/mkstemp (Depends-on): Add stat-macros.
20746         * modules/modechange (Depends-on): Remove xstrtol.
20747         Add stat-macros, xalloc.
20748         * modules/save-cwd (Depends-on): Add unistd-safer.
20749         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
20750         * modules/unistd-safer (Files): Add lib/fd-safer.c
20751         (Makefile.am): Remove lib_SOURCES.
20752
20753         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
20754         Remove fcntl-safer; unistd-safer supersedes it.
20755
20756 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20757
20758         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
20759         AC_HEADER_STAT.
20760         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
20761         (gl_PREREQ_CHOWN): Remove.
20762         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
20763         it.  Don't require AC_HEADER_STAT.
20764         (gl_PREREQ_LSTAT): Remove.
20765         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
20766         Don't require AC_HEADER_STAT.
20767         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
20768         (gl_PREREQ_RMDIR): Remove.
20769         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
20770         mention stat-macros.h or AC_HEADER_STAT, since we'll make
20771         the stat-macros module a prerequisite.
20772         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
20773         * m4/filemode.m4 (gl_FILEMODE): Likewise.
20774         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
20775         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
20776         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
20777         variable names.
20778         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
20779         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
20780         variable prefixes.
20781         * m4/fcntl-safer.m4: Remove.
20782         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
20783         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
20784         Invoke gl_PREREQ_FD_SAFER.
20785         (gl_PREREQ_FD_SAFER): New macro.
20786         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
20787         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
20788         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
20789         Remove duplicate call to AC_LIBOBJ(readutmp).
20790         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
20791
20792         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
20793         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
20794
20795 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20796
20797         * MODULES.html.sh (Misc): Add byteswap.
20798
20799 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20800
20801         * modules/getcwd (Depends-on): Add extensions.
20802         * modules/openat (Depends-on): Likewise.
20803
20804 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20805
20806         * modules/byteswap: New file.
20807
20808 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20809
20810         * m4/byteswap.m4: New file.
20811
20812 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20813
20814         * lib/byteswap_.h: New file.
20815
20816 2005-04-25  Karl Berry  <karl@gnu.org>
20817
20818         * m4/gettext.m4: Update from GNU gettext 0.14.4.
20819
20820 2005-04-25  Albert Chin  <china@thewrittenword.com>
20821
20822         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
20823         Toolkit C bug.
20824
20825 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
20826
20827         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
20828         (func_ln_if_changed) Remove forcibly for no error message
20829         in case file does not exist.
20830
20831 2005-04-19  Simon Josefsson  <jas@extundo.com>
20832
20833         * gnulib-tool (Options): Make --symlink mean --symbolic.
20834
20835 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
20836
20837         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
20838
20839 2005-04-16  Simon Josefsson  <jas@extundo.com>
20840
20841         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
20842
20843 2005-04-15  Simon Josefsson  <jas@extundo.com>
20844
20845         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
20846
20847 2005-04-15  Simon Josefsson  <jas@extundo.com>
20848
20849         * gnulib-tool: Rename --symlink to --symbolic.
20850
20851 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
20852
20853         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
20854         symbolic links to files instead of copying/moving.  Add --aux-dir,
20855         specifying directory relative --dir where auxiliary build tools
20856         are placed.
20857
20858 2005-04-14  Bruno Haible  <bruno@clisp.org>
20859
20860         * modules/allocsa (License): Change to LGPL.
20861         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
20862
20863 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
20864
20865         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
20866         that "UTC +1 second" continues to work.  Problem reported
20867         by Dmitry V. Levin.
20868         (relunit_snumber): New rule.
20869         (relunit): Use it.
20870
20871 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
20872
20873         * lib/getdate.y (universal_time_zone_table): New constant.
20874         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
20875         universal_time_zone_table.
20876         (lookup_zone): Prefer universal_time_zone_table to
20877         local_time_zone_table, so that "GMT" time stamps are allowed in
20878         London during the summer.  Problem reported by Ian Abbott.
20879
20880 2005-04-12  Jim Meyering  <jim@meyering.net>
20881
20882         * lib/human.c (humblock): Set *options even when returning due to
20883         xstrtoumax conversion failure.  Thanks to a used-uninitialized
20884         warning from gcc-4.
20885
20886 2005-04-09  Jim Meyering  <jim@meyering.net>
20887
20888         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
20889         -Wuninitialized: initialize tm0.tm_year.
20890
20891 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
20892
20893         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
20894         count, since there's no maximum.  All uses changed.
20895         Add member dsts_seen.
20896         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
20897         not being INT_MAX.
20898         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
20899         Use pc_rels_seen to decide whther a date is absolute.
20900
20901         * lib/getdate.y (number): Don't overwrite year.
20902         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
20903         check.
20904
20905 2005-04-02  Simon Josefsson  <jas@extundo.com>
20906
20907         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
20908         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
20909
20910 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
20911
20912         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
20913         where no absolute path name can be longer than PATH_MAX.
20914
20915 2005-03-27  Jim Meyering  <jim@meyering.net>
20916
20917         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
20918
20919 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
20920
20921         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
20922         "one's complement" -> "ones' complement" in comment, as per Knuth.
20923         "value of type" -> "type or expression" in comment.
20924         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
20925
20926 2005-03-26  Jim Meyering  <jim@meyering.net>
20927
20928         Comment nits.
20929         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
20930         Correct typos: s/or/of/.
20931
20932 2005-03-26  Jim Meyering  <jim@meyering.net>
20933
20934         * modules/check-include-files: Move to ../ and rename to...
20935         * check-module: ...this.
20936
20937 2005-03-25  Jim Meyering  <jim@meyering.net>
20938
20939         * modules/xvasprintf (Files): Add xalloc.h.
20940
20941 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
20942
20943         * modules/gettext (Files): config/config.rpath ->
20944         build-aux/config.rpath
20945         * modules/iconv (Files): Likewise.
20946         Problem reported by Oskar Liljeblad.
20947
20948 2005-03-23  Jim Meyering  <jim@meyering.net>
20949
20950         * modules/check-include-files: New script to check for
20951         missing dependencies, multiple includes, etc.
20952
20953         * modules/c-strtold (Depends-on): Add xalloc.
20954         * modules/c-strtod (Depends-on): Add xalloc.
20955         * modules/hash (Depends-on): Add xalloc.
20956         (Files): Remove lib/xalloc.h.
20957
20958         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
20959         * modules/userspec (Files): Add lib/inttostr.h.
20960
20961 2005-03-23  Jim Meyering  <jim@meyering.net>
20962
20963         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
20964
20965 2005-03-22  Jim Meyering  <jim@meyering.net>
20966
20967         * modules/stat-macros: New module.
20968         * modules/canonicalize, modules/euidaccess, modules/file-type,
20969         * modules/filemode, modules/lchown, modules/makepath,
20970         * modules/rmdir, modules/stat: Depend on new stat-macros module
20971         rather than listing lib/stat-macros.h manually.
20972         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
20973
20974 2005-03-22  Jim Meyering  <jim@meyering.net>
20975
20976         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
20977
20978 2005-03-22  Bruno Haible  <bruno@clisp.org>
20979
20980         * config/srclist.txt: Replace target directory 'config' with
20981         'build-aux'.
20982         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
20983         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
20984         ../build-aux/.
20985
20986 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
20987
20988         * modules/chdir-long (Depends-on): Add mempcpy.
20989
20990         * modules/acl, modules/backupfile, modules/c-strtod,
20991         modules/c-strtold, modules/canon-host, modules/canonicalize,
20992         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
20993         modules/exclude, modules/exitfail, modules/file-type,
20994         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
20995         modules/getdate, modules/getline, modules/getpagesize,
20996         modules/getpass, modules/getugroups, modules/group-member,
20997         modules/hard-locale, modules/hash, modules/human, modules/idcache,
20998         modules/inttostr, modules/long-options, modules/makepath,
20999         modules/md5, modules/memcasecmp, modules/memcoll,
21000         modules/modechange, modules/mountlist, modules/path-concat,
21001         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
21002         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
21003         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
21004         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
21005         modules/strftime, modules/strndup, modules/strverscmp,
21006         modules/timespec, modules/unlocked-io, modules/userspec,
21007         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
21008         modules/yesno:
21009         Remove lib_SOURCES line from Makefile.am section, as this is now
21010         done automatically by the corresponding Autoconf macro.
21011
21012 2005-03-21  Jim Meyering  <jim@meyering.net>
21013
21014         Changes imported from coreutils.
21015
21016         * lib/cycle-check.c: Don't include xalloc.h.
21017
21018         * lib/path-concat.c: Don't include assert.h.
21019         (path_concat): Remove assertion that would have triggered
21020         for ABASE starting with more than one slash.
21021         Reported by Andreas Schwab.
21022
21023         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
21024         properly when ABASE is an absolute file name.
21025         Correct the description of this function.
21026         Include <assert.h>.
21027         Add an assertion and a test driver.
21028         This fixes a bug introduced on 2004-07-02.
21029         Andreas Schwab reported the resulting failure of cp --parents:
21030         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
21031
21032 2005-03-21  Jim Meyering  <jim@meyering.net>
21033
21034         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
21035         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
21036
21037 2005-03-21  Jim Meyering  <jim@meyering.net>
21038         and  Paul Eggert  <eggert@cs.ucla.edu>
21039
21040         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
21041         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
21042         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
21043         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
21044         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
21045         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
21046         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
21047         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
21048         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
21049         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
21050         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
21051         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
21052         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
21053         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
21054         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
21055         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
21056         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
21057         for these modules.
21058
21059 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
21060
21061         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
21062         (which shouldn't happen), generate nothing instead of returning 0
21063         immediately, so that nstrftime (NULL, ...) doesn't return 0.
21064
21065 2005-03-16  Bruno Haible  <bruno@clisp.org>
21066
21067         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
21068         HAVE_LONGLONG_64BIT.
21069
21070 2005-03-16  Bruno Haible  <bruno@clisp.org>
21071
21072         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
21073         HAVE_LONGLONG_64BIT.
21074
21075 2005-03-16  Bruno Haible  <bruno@clisp.org>
21076
21077         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
21078         HAVE_LONGLONG_64BIT.
21079
21080 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21081
21082         * lib/strftime.c (my_strftime): Prepend space to format so that we can
21083         reliably distinguish strftime failure from empty output on POSIX
21084         hosts.
21085
21086 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21087
21088         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
21089         (iconv_string): Don't guess a size-zero buffer, as that might cause
21090         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
21091         result would be 'too large', where 'too large' is (heuristically)
21092         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
21093         overflow concerns.  This will prevent some unwanted malloc failures
21094         when the inputs are very large.
21095
21096 2005-03-15  Karl Berry  <karl@gnu.org>
21097
21098         * config/srclist.txt (config.rpath): from gettext.
21099         * config/config.rpath: update.
21100
21101 2005-03-15  Bruno Haible  <bruno@clisp.org>
21102
21103         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
21104         to 'negate'.
21105
21106         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
21107         variable.
21108
21109         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
21110         results.
21111
21112 2005-03-14  Simon Josefsson  <jas@extundo.com>
21113
21114         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
21115         <fx@gnu.org>.
21116
21117 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
21118
21119         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
21120         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
21121         intprops.h.
21122         * lib/strtol.c: Likewise.
21123
21124 2005-03-14  Jim Meyering  <jim@meyering.net>
21125
21126         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
21127         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
21128         to be nonzero so that we (and caller) can detect the difference
21129         between a valid zero-length expansion and an error return, even
21130         when the underlying strftime fails before writing anything into
21131         that location.
21132
21133 2005-03-14  Bruno Haible  <bruno@clisp.org>
21134
21135         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
21136         Update from GNU gettext 0.14.3.
21137
21138 2005-03-10  Jim Meyering  <jim@meyering.net>
21139
21140         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
21141
21142 2005-03-10  Jim Meyering  <jim@meyering.net>
21143
21144         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
21145         so that this module works on systems without fchdir.
21146
21147 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
21148
21149         Factor int-properties macros into a single file, except for
21150         glibc-related files.
21151         * lib/intprops.h: New file.
21152         * lib/getloadavg.c: Include it instead of limits.h.
21153         (INT_STRLEN_BOUND): Remove.
21154         * lib/human.c: Include intprops.h.
21155         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
21156         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
21157         302/1000.
21158         * lib/inttostr.h: Include intprops.h instead of limits.h.
21159         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
21160         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
21161         for consistency with intprops.h.
21162         (time_t_is_integer, twos_complement_arithmetic): Use them.
21163         * lib/sig2str.h: Include <signal.h>, intprops.h.
21164         (INT_STRLEN_BOUND): Remove.
21165         * lib/strftime.c (TYPE_SIGNED): Remove.
21166         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
21167         * lib/strtol.c: Adjust comments to match intprops.h.
21168         * lib/userspec.c: Include intprops.h.
21169         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
21170         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
21171         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
21172         instead of rolling our own expressions.
21173         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
21174
21175         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
21176         instead of int.
21177         (my_strftime): Do not mishandle years close to INT_MAX, by doing
21178         the right thing even if adding 1900 would overflow.  Similarly
21179         for tm_mon + 1 and tm_yday + 1.
21180         Make %Y always equivalent to %C%y, and similarly for %G and %g.
21181         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
21182         (DO_SIGNED_NUMBER): New macro.
21183         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
21184
21185 2005-03-07  Bruno Haible  <bruno@clisp.org>
21186
21187         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
21188
21189 2005-03-07  Bruno Haible  <bruno@clisp.org>
21190
21191         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
21192
21193 2005-03-04  Derek R. Price  <derek@ximbiot.com>
21194
21195         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
21196         (func_import): Only replace files via --import when they have actually
21197         changed.
21198
21199 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21200
21201         * m4/mmap-anon.m4: New file.
21202         * m4/pagealign_alloc.m4: New file.
21203
21204 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21205             Bruno Haible  <bruno@clisp.org>
21206
21207         * modules/pagealign_alloc: New file.
21208         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
21209
21210 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21211             Bruno Haible  <bruno@clisp.org>
21212
21213         * lib/pagealign_alloc.h: New file.
21214         * lib/pagealign_alloc.c: New file.
21215
21216 2005-03-03  Bruno Haible  <bruno@clisp.org>
21217
21218         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
21219         Use an all-permissive copyright notice, recommended by RMS.
21220
21221 2005-03-02  Bruno Haible  <bruno@clisp.org>
21222
21223         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
21224         of AIX, the replacement has to be done only after <string.h> is
21225         included, therefore not in config.h. stpncpy.h does the replacement,
21226         and stpncpy.c uses it.
21227
21228 2005-03-02  Bruno Haible  <bruno@clisp.org>
21229
21230         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
21231         stpncpy.c uses it.
21232
21233 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21234
21235         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
21236         The workaround isn't strictly needed for POSIX conformance, and
21237         it's too much of a pain to configure and maintain.  We'll ask
21238         people to fix their kernels instead.
21239         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
21240         (NANOSLEEP_BUG_WORKAROUND): Remove.
21241         (xnanosleep): Remove the workaround.
21242
21243 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21244
21245         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
21246         Reported by Derek Price.
21247         (Include): Add "timespec.h".
21248
21249         * modules/xnanosleep (Depends-on): Remove gethrxtime.
21250
21251 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21252
21253         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
21254         to detect nanosleep bug.
21255
21256 2005-03-01  Bruno Haible  <bruno@clisp.org>
21257
21258         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
21259
21260 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
21261
21262         * modules/gethrxtime: New file.
21263         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
21264         (Depends-on): Add gethrxtime.
21265         (configure.ac): Add gl_XNANOSLEEP.
21266         (Makefile.am): Remove lib_SOURCES line.
21267
21268 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21269
21270         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
21271         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
21272
21273 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21274
21275         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
21276         * lib/timespec.h (gettime): Return void, since it always
21277         succeeds now.  All uses changed.
21278         * lib/gettime.c (gettime) Likewise.
21279         [HAVE_NANOTIME]: Prefer nanotime.
21280         Assume gettimeofday succeeds, as POSIX requires.
21281         Assime time () succeeds, since other code already does.
21282         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
21283         (timespec_subtract): Remove.
21284         (NANOSLEEP_BUG_WORKAROUND): New constant.
21285         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
21286         things considerably.  Use it only on GNU/Linux hosts, since the
21287         workaround shouldn't be needed elsewhere.
21288
21289 2005-02-24  Bruno Haible  <bruno@clisp.org>
21290
21291         * modules/gettext (Files): Add m4/glibc2.m4.
21292
21293 2005-02-24  Bruno Haible  <bruno@clisp.org>
21294
21295         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
21296         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
21297         * m4/progtest.m4:
21298         Update from GNU gettext 0.14.2.
21299         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
21300
21301 2005-02-24  Bruno Haible  <bruno@clisp.org>
21302
21303         * lib/localcharset.c: Update from GNU gettext 0.14.2.
21304         * lib/config.charset: Update from GNU gettext 0.14.2.
21305
21306 2005-02-24  Bruno Haible  <bruno@clisp.org>
21307
21308         * lib/gettext.h: Update from GNU gettext 0.14.2.
21309
21310 2005-02-23  Simon Josefsson  <jas@extundo.com>
21311
21312         * m4/iconvme.m4: New file.
21313
21314 2005-02-23  Jim Meyering  <jim@meyering.net>
21315
21316         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
21317         change.
21318         Thanks to Bruno Haible for catching it.
21319
21320 2005-02-22  Simon Josefsson  <jas@extundo.com>
21321
21322         * modules/iconvme: New file.
21323
21324         * MODULES.html.sh: Add iconvme.
21325
21326 2005-02-22  Simon Josefsson  <jas@extundo.com>
21327
21328         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
21329
21330 2005-02-22  Simon Josefsson  <jas@extundo.com>
21331
21332         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
21333
21334 2005-02-22  Jim Meyering  <jim@meyering.net>
21335
21336         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
21337         s/ifndef/ifdef/.
21338
21339 2005-02-20  Neil Conway  <neilc@samurai.com>
21340
21341         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
21342         returned by OSX/Darwin if the specified buffer is not large
21343         enough for the hostname.
21344
21345 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21346
21347         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
21348         pass it to _help, otherwise the latter coredumps trying to
21349         dereference state.root_argp.
21350
21351 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21352
21353         * modules/chdir-long (Depends-on): Add memrchr.
21354         * modules/memrchr (Files): Add lib/memrchr.h.
21355         (Include): "memrchr.h".
21356
21357 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21358
21359         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
21360
21361 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21362
21363         * lib/memrchr.h: New file.
21364         * lib/chdir-long.c: Include it.
21365         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
21366         Don't bother including stddef.h.
21367
21368 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
21369
21370         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
21371         inclusion.
21372         Include <sys/types.h>, for dev_t.
21373         (ME_DUMMY, ME_REMOTE): Move from here....
21374         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
21375         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
21376         Dmitry V. Levin.
21377         Include mountlist.h first, to test the interface.
21378
21379 2005-01-29  Bruno Haible  <bruno@clisp.org>
21380
21381         * lib/progname.c (program_name): Initialize.
21382         Needed when linking statically on MacOS X.
21383
21384 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21385
21386         Sync from coreutils.
21387         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
21388         (Depends-on): Add c-strtod.
21389         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
21390
21391 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21392
21393         Sync from coreutils.
21394         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
21395
21396         Remove files that are specific to coreutils.
21397         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
21398
21399 2005-01-28  Bruno Haible  <bruno@clisp.org>
21400
21401         * modules/javacomp: New file.
21402         * MODULES.html.sh (Java): Add javacomp.
21403
21404 2005-01-28  Bruno Haible  <bruno@clisp.org>
21405
21406         * m4/javacomp.m4: New file, from GNU gettext.
21407
21408 2005-01-28  Bruno Haible  <bruno@clisp.org>
21409
21410         * lib/javacomp.sh.in: New file, from GNU gettext.
21411         * lib/javacomp.h: New file, from GNU gettext.
21412         * lib/javacomp.c: New file, from GNU gettext.
21413
21414 2005-01-26  Simon Josefsson  <jas@extundo.com>
21415
21416         * lib/gai_strerror.c: Use GPL in header.
21417
21418 2005-01-26  Bruno Haible  <bruno@clisp.org>
21419
21420         * modules/javaexec: New file.
21421         * MODULES.html.sh (Java): Add javaexec.
21422
21423 2005-01-26  Bruno Haible  <bruno@clisp.org>
21424
21425         * m4/javaexec.m4: New file, from GNU gettext.
21426
21427 2005-01-26  Bruno Haible  <bruno@clisp.org>
21428
21429         * lib/javaexec.sh.in: New file, from GNU gettext.
21430         * lib/javaexec.h: New file, from GNU gettext.
21431         * lib/javaexec.c: New file, from GNU gettext.
21432
21433 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21434
21435         * modules/lchown (Depends-on): Remove lchown.h
21436
21437 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21438
21439         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
21440         must be defined if the header file was not found, in order
21441         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
21442
21443 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21444
21445         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
21446         initializers for struct pentry_state.
21447         (__argp_error): Check return value of __asprintf
21448         (__argp_failure): Translate error message
21449
21450         * lib/argp-parse.c: Removed braces around the expansion of N_()
21451
21452 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
21453
21454         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
21455         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
21456         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
21457         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
21458         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
21459         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
21460         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
21461         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
21462         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
21463         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
21464         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
21465         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
21466         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
21467         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
21468         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
21469         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
21470         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
21471         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
21472         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
21473         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
21474         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
21475         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
21476         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
21477         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
21478         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
21479         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
21480         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
21481         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
21482         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
21483         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
21484         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
21485         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
21486         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
21487         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
21488         xstrtol.m4, xstrtoumax.m4, yesno.m4:
21489         Use an all-permissive copyright notice, recommended by RMS.
21490
21491 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
21492
21493         * modules/chdir-long (Depends-on): Remove mempcpy.
21494
21495 2005-01-21  Jim Meyering  <jim@meyering.net>
21496
21497         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
21498         same value as for Solaris 9.
21499
21500         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
21501         component length.  This included changing the parameter to be
21502         of type `char *' rather than `char const *'.
21503         * lib/chdir-long.h (chdir_long): Update prototype.
21504
21505         * lib/openat.c (fdopendir, fstatat): New functions.
21506         * lib/openat.h: Include headers required for use of DIR and struct
21507         stat.
21508         [AT_SYMLINK_NOFOLLOW]: Define.
21509         (fdopendir, fstatat): Add prototypes.
21510
21511 2005-01-21  Bruno Haible  <bruno@clisp.org>
21512
21513         * modules/classpath: New file.
21514         * MODULES.html.sh (Java): Add classpath.
21515
21516 2005-01-21  Bruno Haible  <bruno@clisp.org>
21517
21518         * lib/classpath.h: New file, from GNU gettext.
21519         * lib/classpath.c: New file, from GNU gettext.
21520
21521 2005-01-20  Simon Josefsson  <jas@extundo.com>
21522
21523         * modules/version-etc-fsf: New file.
21524
21525 2005-01-20  Simon Josefsson  <jas@extundo.com>
21526
21527         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
21528         * lib/version-etc.c: Remove version_etc_copyright.
21529         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
21530         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
21531
21532 2005-01-20  Simon Josefsson  <jas@extundo.com>
21533
21534         * lib/base64.h (isbase64): Add.
21535
21536         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
21537         using a unsigned prototype, don't inline.
21538         (base64_decode): Use it.
21539
21540 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21541
21542         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
21543         it.
21544
21545 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21546
21547         * lib/save-cwd.c (save_cwd): Remove code to support the case
21548         where fchdir is missing or flaky.
21549
21550 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21551
21552         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
21553
21554 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
21555
21556         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
21557         AC_LIBSOURCES now does this.
21558         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
21559         with new ullong_max module.
21560
21561 2005-01-19  Bruno Haible  <bruno@clisp.org>
21562
21563         * modules/sh-quote: New file.
21564         * MODULES.html.sh (Executing programs): Add sh-quote.
21565
21566 2005-01-19  Bruno Haible  <bruno@clisp.org>
21567
21568         * lib/sh-quote.h: New file, from GNU gettext.
21569         * lib/sh-quote.c: New file, from GNU gettext.
21570
21571 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21572
21573         Merge from coreutils.
21574         * m4/ullong_max.m4: New file.
21575         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
21576         (gl_MACROS): Assume localeconv exists.
21577
21578 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21579
21580         Merge changes from coreutils, as described below in several
21581         changelogs dated today.
21582
21583         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
21584         (O_DIRECTORY): Remove; not needed here, since "." must be
21585         a directory.  All uses removed.
21586         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
21587         universal on Suns, and we also need to test for IRIX.
21588         Revamp code to use 'if' rather than '#if'.
21589         Avoid unnecessary comparison of cwd->desc to 0.
21590
21591         * lib/utimens.c (futimens): Robustify the previous patch, by checking
21592         for known valid error numbers rather than observed invalid ones.
21593
21594 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21595
21596         * modules/ullong_max: New file.
21597
21598         * modules/chdir-long, modules/openat: New files.
21599         * modules/save-cwd (Depends-on): Depend on chdir-long.
21600         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
21601
21602 2005-01-18  Jim Meyering  <jim@meyering.net>
21603
21604         Merge from coreutils.
21605         * m4/chdir-long.m4, m4/openat.m4: New files.
21606         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
21607         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
21608         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
21609         is sane and DOES follow symlinks.  Besides, testing 20 different
21610         systems found no broken chown implementations.
21611         Prompted by a change in rsync's copy of this macro.
21612         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
21613
21614         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
21615
21616         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
21617         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
21618         NULL-means-set-to-current-time semantics.
21619         Remove temporary file immediately, rather than waiting
21620         for configure's at-exit trap code to do it.
21621
21622 2005-01-18  Jim Meyering  <jim@meyering.net>
21623
21624         * lib/version-etc.c (version_etc_copyright): Update copyright date.
21625
21626         * lib/utimens.c (futimens): Account for the fact that futimes
21627         can also fail with errno == ENOSYS or errno == ENOENT.
21628         Patch from Dmitry V. Levin.
21629
21630         Change the name of the robust chdir function from chdir to chdir_long.
21631         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
21632         (restore_cwd): Use chdir_long, not chdir.
21633         * lib/chdir-long.c: Renamed from chdir.c.
21634         * lib/chdir-long.h: Renamed from chdir.h.
21635         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
21636         Hurd.
21637
21638 2005-01-18  Bruno Haible  <bruno@clisp.org>
21639
21640         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
21641         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
21642         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
21643         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
21644         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
21645         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
21646         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
21647         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
21648         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
21649         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
21650         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
21651         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
21652         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
21653         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
21654         Use an all-permissive copyright notice, recommended by RMS.
21655
21656 2005-01-18  Bob Proulx  <bob@proulx.com>
21657
21658         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
21659         simplify offsetof() macro construct to avoid compile failure with
21660         native HP-UX 11.0 ANSI C compiler.
21661
21662 2005-01-17  Bruno Haible  <bruno@clisp.org>
21663
21664         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
21665         redundant because stpncpy.m4 takes care of it.
21666
21667 2005-01-17  Bruno Haible  <bruno@clisp.org>
21668
21669         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
21670
21671 2005-01-17  Bruno Haible  <bruno@clisp.org>
21672
21673         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
21674         used.
21675
21676 2005-01-17  Bruno Haible  <bruno@clisp.org>
21677
21678         * lib/fwriteerror.h (fwriteerror): Change specification to include
21679         fclose.
21680         * lib/fwriteerror.c: Include <stdbool.h>.
21681         (fwriteerror): At the end, close the file stream. Record whether
21682         stdout was already closed.
21683
21684 2005-01-17  Bruno Haible  <bruno@clisp.org>
21685
21686         * lib/execute.c (environ): Declare if needed.
21687         * lib/pipe.c (environ): Likewise.
21688         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
21689
21690 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21691
21692         * modules/argp: Depend on vsnprintf
21693
21694 2005-01-10  Jim Meyering  <jim@meyering.net>
21695
21696         * modules/closeout (Depends-on): Add atexit.
21697
21698 2005-01-06  Bruno Haible  <bruno@clisp.org>
21699
21700         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
21701
21702 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
21703
21704         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
21705         definitions to be after all include files, to avoid collisions.
21706         Problem reported by Bob Proulx.
21707
21708 2005-01-04  Jim Meyering  <jim@meyering.net>
21709
21710         Changes imported from coreutils.
21711         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
21712         as the mkstemp template, use a temporary directory and an
21713         8.3-friendly template to avoid trouble on systems like DJGPP.
21714         Reported by Juan M. Guerrero via Stepan Kasal.
21715         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
21716         close. Remove the temporary directory right away, rather than waiting
21717         for configure's at-exit trap code to do it.
21718         Suggestion from Stepan Kasal.
21719
21720 2005-01-01  Simon Josefsson  <jas@extundo.com>
21721
21722         * gnulib-tool: Print #include directives when --import'ing.
21723
21724 2004-12-28  Simon Josefsson  <jas@extundo.com>
21725
21726         * tests/test-base64.c: Include required header files.  Remove
21727         unused variables.
21728
21729 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21730
21731         * modules/error (Depends-on): Remove gettext.
21732
21733 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21734
21735         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
21736         not needed.  This removes a dependency on the gettext module.
21737         [defined _LIBC]: Do not include <libintl.h>; not needed.
21738
21739 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21740
21741         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
21742         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
21743
21744 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21745
21746         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
21747         HAVE_DECL_STRTOLD.
21748
21749 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21750
21751         * modules/getdate (Depends-on): Remove alloca-opt.
21752
21753 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21754
21755         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
21756
21757 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21758
21759         * lib/argp-parse.c: Include <stddef.h>.
21760         (alignof, alignto): New macros.
21761         (parser_init): Don't assume that void * is aligned sufficiently
21762         for struct option.
21763
21764         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
21765         need to extend the stack.
21766         (YYINITDEPTH): New macro, so that the initial stack isn't overly
21767         large.
21768
21769 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21770
21771         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
21772
21773 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21774
21775         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
21776         (2004-10-24) change.  Apparently this was a false alarm.
21777
21778         * modules/getdate: Depend on alloca-opt, not alloca.
21779
21780 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21781
21782         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
21783         Remove now-obsolete comment about AIX.
21784         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
21785         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
21786         (YYMAXDEPTH): New macro.
21787
21788 2004-12-18  Simon Josefsson  <jas@extundo.com>
21789
21790         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
21791
21792 2004-12-18  Bruno Haible  <bruno@clisp.org>
21793
21794         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
21795
21796 2004-12-18  Bruno Haible  <bruno@clisp.org>
21797
21798         * lib/fatal-signal.c (fatal_signals): Make non-const.
21799         (init_fatal_signals): New function.
21800         (uninstall_handlers, install_handlers): Ignore signals that were set to
21801         SIG_IGN.
21802         (at_fatal_signal): Call init_fatal_signals.
21803         (init_fatal_signal_set): Likewise. Ignore signals that were set to
21804         SIG_IGN.
21805         Reported by Paul Eggert.
21806
21807 2004-12-18  Bruno Haible  <bruno@clisp.org>
21808
21809         * doc/alloca.texi: New file.
21810         * doc/alloca-opt.texi: New file.
21811
21812 2004-12-17  Jim Meyering  <jim@meyering.net>
21813
21814         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
21815         Otherwise, install-sh could exit with improper exit status when
21816         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
21817
21818 2004-12-16  Simon Josefsson  <jas@extundo.com>
21819
21820         * tests/test-base64.c: Add license.
21821
21822 2004-12-15  Stepan Kasal  <address@hidden>
21823
21824         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
21825
21826 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
21827
21828         * modules/getcwd (Files): Add m4/d-ino.m4.
21829         Suggested by Mark D. Baushke.
21830
21831 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21832
21833         * lib/getdate.y (textint): New member "negative".
21834         (time_zone_hhmm): New function.
21835         Expect 14 shift-reduce conflicts, not 13.
21836         (o_colon_minutes): New rule.
21837         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
21838         (yylex): Set the "negative" member of signed numbers.
21839
21840 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21841
21842         * doc/getdate.texi (Time of day items, Time zone items):
21843         Describe new formats +00:00, UTC+00:00.
21844
21845 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
21846
21847         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
21848         spurious "-l"s.  Problem reported by Stepan Kasal.
21849
21850 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
21851
21852         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
21853         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
21854
21855 2004-12-04  Simon Josefsson  <jas@extundo.com>
21856
21857         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
21858         Vandoorselaere <yoann@prelude-ids.org>.
21859
21860 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21861
21862         Changes imported from coreutils.
21863         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
21864         exist.
21865         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
21866
21867 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21868
21869         Changes imported from coreutils.
21870         * lib/hard-locale.c: Assume <locale.h> exists.
21871         Include "strdup.h".
21872         (GLIBC_VERSION): New macro.
21873         (hard_locale): Assume setlocale exists.
21874         Rewrite to avoid #ifdef.
21875         Use strdup rather than malloc + strcpy.
21876         * lib/human.c: Assume <locale.h> exists.
21877         (human_readable): Assume localeconv exists.
21878
21879 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21880
21881         * modules/hard-locale (Depends-on): Add strdup.
21882
21883 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
21884
21885         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
21886         convert T2, not T.  (Imported from libc.)
21887
21888 2004-11-30  Simon Josefsson  <jas@extundo.com>
21889
21890         * modules/restrict (License): Change to LGPL.
21891
21892 2004-11-30  Simon Josefsson  <jas@extundo.com>
21893
21894         * m4/restrict.m4: Add copyright and copying conditions.
21895
21896 2004-11-30  Simon Josefsson  <jas@extundo.com>
21897
21898         * m4/base64.m4: New file.
21899
21900 2004-11-30  Simon Josefsson  <jas@extundo.com>
21901
21902         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
21903         base64.
21904
21905         * tests/test-base64.c: New file.
21906
21907         * modules/base64: New file.
21908
21909 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21910
21911         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
21912         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
21913
21914         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
21915
21916 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21917
21918         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
21919         (__getcwd.c): Don't restore errno; glibc doesn't.
21920         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
21921         first, falling back to our code only if its results look suspicious.
21922         Ensure that the resulting buffer is only as large as necessary.
21923
21924         * lib/readutmp.c: Include readutmp.h first.
21925         Include <errno.h>, since readutmp.h no longer does that.
21926         * lib/readutmp.h: Don't include <errno.h>,
21927         <sys/param.h>, <time.h>; not needed to establish interface.
21928         (errno): Remove decl.
21929         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
21930         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
21931         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
21932
21933 2004-11-28  Simon Josefsson  <jas@extundo.com>
21934
21935         * lib/base64.h, base64.c: New file.
21936
21937 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
21938
21939         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
21940
21941 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
21942
21943         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
21944         (Depends-on): Remove pathmax, same.  Add mempcpy.
21945         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
21946         (Makefile.am): Append getcwd.h to lib_SOURCES.
21947         (Include): Add getcwd.h.
21948         (Maintainer): Change from Jim Meyering to "all, glibc",
21949         since getdate now uses intended-for-glibc code.
21950         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
21951         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
21952
21953 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21954
21955         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
21956         HP's ANSI C compiler.
21957         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
21958         Declaring int functions causes warnings on some modern systems and
21959         shouldn't be needed to compile on ancient ones.
21960         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
21961         defined.
21962
21963         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
21964         with the following changes.
21965         (__set_errno): Parenthesize properly.
21966         Include <stdbool.h>.
21967         (MIN, MAX, MATCHING_INO): New macros.
21968         (__getcwd): Define with prototype, not K&R form.
21969         Use heuristics to allocate default buffer on stack if possible.
21970         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
21971         behavior, and to avoid the PATH_MAX limit when computing
21972         ../../../../...
21973         Use MATCHING_INO to compare inode number to file.
21974         Check for arithmetic overflow in size calculations.
21975         Fix bug in reallocation of dot array that caused getcwd to fail
21976         on directories nested deeper than 75.
21977         Be more careful about saving errno on error.
21978         Do not use realloc; use only free+malloc, as this is a bit
21979         more flexible and avoids a needless copy operation.
21980         Do not inspect st_dev and st_ino for symbolic links; POSIX
21981         doesn't specify the latter.
21982         Check for closedir errors.
21983         Avoid needless casts.
21984         Use "#ifdef weak_alias" around weak_alias, to be like other
21985         glibc code.
21986         The following changes to getcwd.c have effect only when used in
21987         gnulib; they have no effect inside glibc proper.
21988         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
21989         as alloca isn't used.
21990         (alloca, __alloca): Likewise.
21991         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
21992         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21993         unconditionally, as gnulib assumes C89 or better.
21994         Do not include <sys/param.h>.
21995         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
21996         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
21997         better.
21998         (NULL) [!defined NULL]: Remove; we assume C89 or better.
21999         Include <dirent.h> in a way that is compatible with modern Autoconf.
22000         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
22001         New macros, if not already defined.
22002         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
22003         Use "_LIBC", not "defined _LIBC", for consistency.
22004         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
22005         a mempcpy module.
22006         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
22007         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
22008         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
22009         credit only to Jim Meyering and adjust the copyright dates.
22010         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
22011         <stdlib.h>, <unistd.h>, "pathmax.h".
22012         Instead, include "xgetcwd.h" (first) and "getcwd.h".
22013         (INITIAL_BUFFER_SIZE): Remove.
22014         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
22015
22016 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
22017
22018         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
22019         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
22020         Use the _ONCE methods, for efficiency.
22021         Check for fcntl.h.  In test program, include <errno.h>
22022         and <fcntl.h> if available.  Remove old K&R cruft from
22023         test program.  Check for common errors in GNU/Linux,
22024         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
22025         don't do AC_LIBOBJ, as that's getcwd.m4's job.
22026         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
22027         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
22028         name accordingly.
22029         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
22030         accommodate new getcwd.c.
22031         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
22032         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
22033         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
22034         that's all we need now.
22035
22036 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22037
22038         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
22039         argp-parse.c depends on getopt internals, that means we should
22040         always use our getopt, to be on the safe side.
22041         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
22042         order not to spoil the result of an eventual previous invocation
22043         of gl_GETOPT_SUBSTITUTE.
22044
22045 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22046
22047         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
22048         redefinition warnings. To avoid them, include the defines
22049         in `#if !defined __need_getopt ... #endif'. The only place
22050         where __getopt_argv_const is used is in definitions
22051         of getopt_long and getopt_long_only below, which are as well
22052         protected by `#ifndef __need_getopt'.
22053         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
22054         __need_getopt after including <stdio.h> and <unistd.h> These
22055         headers might have defined it.
22056
22057 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22058
22059         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
22060
22061 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22062
22063         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
22064         (futimens): New function, which uses futimes if available.
22065         (futimens, utimens): Support timespec==NULL, with same semantics
22066         as utime and utimens.
22067         * lib/utimens.h (futimens): New decl.
22068
22069 2004-11-23  Jim Meyering  <jim@meyering.net>
22070
22071         * lib/getopt_.h: Remove trailing blanks.
22072
22073 2004-11-23  Jim Meyering  <jim@meyering.net>
22074
22075         * lib/__fpending.c: Add comment.
22076
22077 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
22078
22079         * modules/canonicalize (Depends-on): Add xreadlink.
22080         Problem reported by James Youngman.
22081
22082 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
22083
22084         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
22085         New macros.
22086         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
22087         optopt): Use them instead of invoking ## directly; otherwise, the
22088         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
22089
22090 2004-11-19  Bruno Haible  <bruno@clisp.org>
22091
22092         * lib/strtok_r.c: Move comments from here...
22093         * lib/strtok_r.h: ... to here.
22094
22095 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22096
22097         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
22098         implementations that mishandle size_t overflow.
22099
22100 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22101
22102         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
22103         might fail.  Problem reported by Yoann Vandoorselaere.
22104         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
22105         implementations that mishandle size_t overflow.
22106
22107 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22108
22109         * modules/canon-host (Depends-on): Add strdup.
22110
22111 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22112
22113         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
22114
22115 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22116
22117         * lib/canon-host.c: Include "strdup.h".
22118         (canon_host): Use getaddrinfo if available, so that IPv6 works.
22119         Use strdup instead of malloc/strcpy to duplicate strings.
22120
22121         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
22122         (human_space_before_unit): New constant.
22123         * lib/human.c (human_readable): Support it.
22124
22125         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
22126         (xgetcwd): Set errno correctly when failing.
22127         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
22128         the failure is actually due to a PATH_MAX problem.
22129
22130         Further getopt changes to make it more likely that glibc will
22131         buy the changes back.
22132         * lib/getopt.c (POSIXLY_CORRECT): New constant.
22133         (getopt): Use it, so to preserve glibc semantic
22134         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
22135         when compiling for libc.
22136         * lib/getopt_.h (__getopt_argv_const): Bring it back.
22137         (getopt_long, getopt_long_only): Use it.
22138
22139         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22140         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
22141         (getopt): Argv is now char * const *, as per standard.
22142         (_getopt_internal_r, _getopt_internal): Argv is now char **,
22143         not char *__getopt_argv_const *.
22144         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22145         _getopt_long_only_r): Likewise.
22146         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
22147         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22148         _getopt_long_r, _getopt_long_only_r): Likewise.
22149         * lib/getopt_.h (__getopt_argv_const): Remove.
22150         (getopt): Argv is now char * const *, as per standard.
22151
22152         * lib/getdate.y (tORDINAL): New token.
22153         (day, relunit): Allow it for relative times.
22154         (relative_time_table): Use tORDINAL for ordinals.
22155
22156 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22157
22158         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
22159         Document that "second" isn't allowed as an ordinal number.
22160
22161 2004-11-16  Jim Meyering  <jim@meyering.net>
22162
22163         * modules/closeout (Depends-on): Add fpending.
22164
22165 2004-11-15  Jim Meyering  <jim@meyering.net>
22166
22167         * lib/closeout.c: Include "__fpending.h" once again.
22168         Include <stdbool.h>.
22169         (close_stdout): Don't fail just because stdout was closed initially,
22170         since some programs don't write to stdout in the normal course of
22171         operation (other than --version and --help), and we don't want this
22172         function to make e.g. `touch file >&-' fail.
22173         But do fail if it was closed and someone has tried to write to it.
22174         E.g., `printf foo >&-' must fail.
22175
22176 2004-11-13  Jim Meyering  <jim@meyering.net>
22177
22178         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
22179
22180 2004-11-12  Simon Josefsson  <jas@extundo.com>
22181
22182         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
22183         small doc fix is still pending.
22184
22185 2004-11-11  Simon Josefsson  <jas@extundo.com>
22186
22187         * modules/strtok_r: New file.
22188
22189         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22190         strtok_r.
22191
22192 2004-11-11  Simon Josefsson  <jas@extundo.com>
22193
22194         * m4/strtok_r.m4: New file.
22195
22196         * m4/getopt.m4: Replace opterr.
22197
22198 2004-11-11  Simon Josefsson  <jas@extundo.com>
22199
22200         * lib/strtok_r.h, strtok_r.c: New file.
22201
22202 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22203
22204         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
22205         of replacing opterr, getopt, etc.  This should handle the
22206         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
22207
22208 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22209
22210         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
22211         we can stop lying to compilers about the constness of argv when we
22212         are compiled outside glibc.
22213         (getopt, getopt_long, getopt_long_only): Use it.
22214         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22215         _getopt_internal, getopt): Likewise.
22216         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22217         _getopt_long_only_r): Likewise.
22218         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22219         _getopt_long_r, _getopt_long_only_r): Likewise.
22220
22221         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
22222         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
22223         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
22224         the other external symbols.
22225         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
22226         declaration, since the above renaming now works around collisions.
22227
22228 2004-11-11  Jim Meyering  <jim@meyering.net>
22229
22230         * lib/linebreak.c: Remove trailing blanks.
22231         * lib/alloca_.h: Likewise.
22232         * lib/acosl.c: Likewise.
22233         * lib/euidaccess.c: Likewise.
22234         * lib/allocsa.h: Likewise.
22235
22236 2004-11-10  Simon Josefsson  <jas@extundo.com>
22237
22238         * m4/getaddrinfo.m4: New file.
22239
22240 2004-11-10  Simon Josefsson  <jas@extundo.com>
22241
22242         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
22243
22244 2004-11-10  Simon Josefsson  <jas@extundo.com>
22245
22246         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22247         getaddrinfo.
22248
22249         * modules/getaddrinfo: New file.
22250
22251 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22252
22253         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
22254
22255 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22256
22257         * lib/mktime.c (SHR): New macro, which is a portable
22258         substitute for >> that should work even on Crays.
22259         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
22260         Problem reported by Mark D. Baushke in
22261         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
22262         * lib/getdate.y (SHR): Likewise.
22263         (tm_diff): Use it.
22264         * lib/strftime.c (SHR): Likewise.
22265         (tm_diff): Use it.
22266         * lib/quotearg.c (struct quoting_options): Use unsigned int for
22267         quote_these_too, so that right shifts are well defined.  All uses
22268         changed.
22269
22270 2004-11-10  Jim Meyering  <jim@meyering.net>
22271
22272         Ensure that no close failure goes unreported.
22273         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
22274         return early when it seems there's nothing to flush.
22275         Don't include __fpending.h.
22276
22277 2004-11-10  Jim Meyering  <jim@meyering.net>
22278
22279         * modules/closeout (Depends-on): Remove fpending.
22280
22281 2004-11-10  Jim Meyering  <jim@meyering.net>
22282
22283         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
22284
22285 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22286
22287         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
22288         gl_FUNC_STRFTIME.
22289         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
22290         and AC_REQUIRE when possible, to avoid duplicate checks.
22291         Check for <wchar.h>.
22292
22293 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22294
22295         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
22296
22297 2004-11-09  Bruno Haible  <bruno@clisp.org>
22298
22299         * m4/sockpfaf.m4: New file.
22300
22301 2004-11-05  Bruno Haible  <bruno@clisp.org>
22302
22303         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
22304         Reported by Mark D. Baushke <mdb@cvshome.org>.
22305
22306 2004-11-04  Bruno Haible  <bruno@clisp.org>
22307
22308         2004-09-11  Bruno Haible  <bruno@clisp.org>
22309                 * allocsa.valgrind: New file.
22310         2004-02-06  Bruno Haible  <bruno@clisp.org>
22311                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
22312                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
22313                 Reported by Christopher Seip <chris.seip@hp.com>.
22314
22315 2004-11-04  Bruno Haible  <bruno@clisp.org>
22316
22317         * modules/allocsa (Files): Add lib/allocsa.valgrind.
22318         (Makefile.am): Distribute it.
22319
22320 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
22321
22322         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
22323         with errno == ERANGE if the buffer is too small.
22324         Problem reported by Mark D. Baushke.
22325
22326 2004-11-03  Albert Chin  <china@thewrittenword.com>
22327             Paul Eggert  <eggert@cs.ucla.edu>
22328
22329         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
22330         equivalent, substitute $ac_type for equivalent type rather than
22331         blindly using uint32_t *always* which won't work if uint32_t is not
22332         available.  Define _UINT32_T to work around typedef of uint32_t if
22333         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
22334         2.5.1.
22335
22336 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22337
22338         * m4/jm-macros.m4: Sync from coreutils.
22339         (gl_MACROS): Check for mbrlen, for pathchk.
22340         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
22341
22342 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22343
22344         * lib/xreadlink.c (MAXSIZE): New macro.
22345         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
22346         size does not exceed MAXSIZE.  Avoid cast.
22347         As suggested by Mark D. Baushke in
22348         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
22349         if readlink fails with buffer size just under MAXSIZE, try again
22350         with MAXSIZE.
22351
22352 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22353
22354         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
22355
22356 2004-11-02  Derek R. Price  <derek@ximbiot.com>
22357         and  Paul Eggert  <eggert@cs.ucla.edu>
22358
22359         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
22360         (get_date): Overparenthesize to avoid GCC warning.
22361
22362 2004-11-02  Bruno Haible  <bruno@clisp.org>
22363
22364         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
22365         returns void.
22366
22367 2004-11-02  Bruno Haible  <bruno@clisp.org>
22368
22369         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
22370         function returns void.
22371
22372 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22373
22374         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
22375         fflush_unlocked, flockfile, funlockfile, funlockfile,
22376         fputs_unlocked, putc_unlocked.
22377
22378 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22379
22380         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22381         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
22382         already declared.
22383
22384 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22385
22386         * modules/getdate (Files): Add doc/getdate.texi.
22387         (Depends-on): Add setenv, xalloc.
22388
22389 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22390
22391         * lib/getdate.y: Add support for TZ="foo" within a date string.
22392         Fix some bugs near time_t boundaries.  Reject dates with
22393         out-of-range components, e.g., "Sept 31".
22394         Include <stdlib.h>, "setenv.h", "xalloc.h".
22395         (ISDIGIT_LOCALE): Remove; unused.
22396         Note that the TZ and time functions used here are not reentrant.
22397         (mktime_ok, get_tz): New functions.
22398         (TZBUFSIZE): New constant.
22399         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
22400         This requires that we sometimes generate our own TZ="XXX..." setting.
22401
22402 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22403
22404         * doc/getdate.texi: New file, from coreutils with modifications for
22405         the new TZ parsing.
22406
22407 2004-10-27  Derek R. Price  <derek@ximbiot.com>
22408
22409         * lib/mktime.c (not_equal_tm): Remove redundant check.
22410
22411 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22412
22413         * modules/regex (lib_SOURCES): Add regex.c.
22414         Reported by James Youngman in
22415         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
22416
22417 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22418
22419         * lib/getdate.y: Use Bison 1.875 features, and some minor
22420         code cleanups.  This change does not affect semantics.
22421         Don't include <stdlib.h>; no longer needed.
22422         Don't include unlocked-io.h; only the "#if TEST" code uses
22423         stdio, and performance isn't crucial there.
22424         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
22425         Bison 1.875 features as described below.
22426         All uses of "PC." replaced by "pc->".
22427         (YYSTYPE): Add a forward declaration.
22428         (yylex, yyerror): Use full prototypes in forward decls.
22429         Use "%pure-parser" rather than obsolescent "%pure_parser".
22430         Use %parse-param and %lex-param instead of obsolescent
22431         YYPARSE_PARAM and YYLEX_PARAM.
22432         (meridian_table, month_and_day_table, time_units_table,
22433         relative_time_table, time_zone_table, military_table,
22434         lookup_zone, lookup_word, get_date):
22435         Use NULL instead of 0 where appropriate.
22436         (to_hour): Avoid abort (), to avoid a dependency on
22437         stdlib.h.
22438         (yyerror, yylex): Now accepts parser_control * arg.
22439         (main) [TEST]: Use '\0' rather than 0 for char.
22440
22441 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22442
22443         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
22444
22445 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22446
22447         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
22448         It's now the caller's responsibility to handle the case where
22449         !HAVE_GETPAGESIZE && !defined getpagesize.
22450
22451         * lib/mktime.c (leapyear): Arg is long int, not int.
22452
22453 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
22454
22455         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
22456
22457 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
22458
22459         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
22460         missing.  Problem reported by James Youngman.
22461
22462 2004-10-16  Simon Josefsson  <jas@extundo.com>
22463
22464         * gnulib-tool: Fix comments.  Fix parse problem.
22465         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
22466
22467 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
22468
22469         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
22470         implementation of getopt_long.  Problem reported by Alexander Taler in:
22471         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
22472
22473 2004-10-15  Bruno Haible  <bruno@clisp.org>
22474
22475         * gnulib-tool: Untabify. Initialize supplied_libname.
22476         (func_usage): More homogenous output.
22477         (func_modules_transitive_closure, func_modules_to_filelist,
22478         func_emit_lib_Makefile_am): New functions.
22479         (func_import): New function, extracted from big case statement. Use
22480         func_get_license, func_modules_transitive_closure,
22481         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
22482         opt_lgpl. Don't use test -a, as it's not portable.
22483         (func_create_testdir): Use func_modules_transitive_closure,
22484         func_modules_to_filelist, func_emit_lib_Makefile_am.
22485
22486 2004-10-15  Bruno Haible  <bruno@clisp.org>
22487
22488         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
22489
22490 2004-10-15  Bruno Haible  <bruno@clisp.org>
22491
22492         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
22493         the portions belonging to each module.
22494         Suggested by Derek Robert Price <derek@ximbiot.com>.
22495
22496 2004-10-12  Simon Josefsson  <jas@extundo.com>
22497
22498         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22499         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
22500         to real functions.
22501
22502 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22503
22504         * modules/vsnprintf: New file.
22505
22506 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22507
22508         * m4/vsnprintf.m4: New file.
22509
22510 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22511
22512         * lib/vsnprintf.h: New file.
22513         * lib/vsnprintf.c: New file.
22514
22515 2004-10-11  Bruno Haible  <bruno@clisp.org>
22516
22517         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
22518         vsnprintf.
22519
22520 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
22521
22522         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
22523
22524 2004-10-07  Bruno Haible  <bruno@clisp.org>
22525
22526         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
22527         fits into the provided buffer.
22528
22529 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
22530
22531         * lib/diacrit.c, diacrit.h: Add GPL notice.
22532
22533         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
22534         notice.
22535         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
22536         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
22537         This avoids a potential constant-folding bug.
22538
22539 2004-10-05  Bruno Haible  <bruno@clisp.org>
22540
22541         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
22542         for the declaration of strsep.
22543
22544 2004-10-05  Bruno Haible  <bruno@clisp.org>
22545
22546         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
22547
22548 2004-10-04  Simon Josefsson  <jas@extundo.com>
22549
22550         * modules/memmem: New file.
22551         * tests/test-memmem.c: New file.
22552         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
22553
22554 2004-10-04  Simon Josefsson  <jas@extundo.com>
22555
22556         * m4/memmem.m4: New file.
22557
22558 2004-10-04  Simon Josefsson  <jas@extundo.com>
22559
22560         * lib/memmem.h: New file.
22561         * lib/memmem.c: New file, taken from glibc.
22562
22563 2004-10-04  Simon Josefsson  <jas@extundo.com>
22564
22565         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
22566         '#ifdef USE_UNLOCKED_IO'.
22567
22568 2004-10-04  Simon Josefsson  <jas@extundo.com>
22569
22570         * config/srclist.txt: Add memmem from glibc.
22571
22572 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22573
22574         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
22575
22576         * modules/argmatch, modules/argp, modules/closeout, modules/error,
22577         modules/exclude, modules/getdate, modules/getline,
22578         modules/getndelim2, modules/getpass, modules/getpass-gnu,
22579         modules/getusershell, modules/linebuffer, modules/md5,
22580         modules/mountlist, modules/posixtm, modules/readtokens,
22581         modules/readutmp, modules/regex, modules/sha1,
22582         modules/version-etc, modules/yesno:
22583         Remove dependency on unlocked-io.
22584
22585 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22586
22587         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
22588
22589         * m4/unlocked-io.m4: Add copyright notice.
22590         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
22591
22592 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22593
22594         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
22595         * lib/xmalloc.c (xmemdup): Likewise.
22596         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
22597         XFREE): Remove these long-obsolescent macros.
22598         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
22599         * lib/xstrdup.c: Remove.
22600
22601         * lib/regex.c (re_comp): Cast gettext return value to char *,
22602         Problem reported by Martin Neitzel via Mark D. Baushke.
22603
22604 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22605
22606         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
22607         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
22608         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
22609         regex.c, sha1.c, version-etc.c, yesno.c:
22610         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
22611         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
22612         the includer's responsibility.
22613
22614         Sync from coreutils.
22615
22616         * lib/modechange.c (mode_compile): Don't decrement a pointer that
22617         points to the start of a string, as the C Standard says the
22618         resulting behavior is undefined.
22619
22620         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
22621         simple -> simple_backups, numbered_existing ->
22622         numbered_existing_backups, numbered -> numbered_backups
22623         to avoid shadowing problems.  All uses changed.
22624         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
22625         * lib/backupfile.c (check_extension, numbered_backup):
22626         Rename locals to avoid shadowing 'basename'.
22627         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
22628         once.
22629
22630         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
22631         * lib/.cvsignore: Add getopt.h.
22632
22633 2004-10-04  Bruno Haible  <bruno@clisp.org>
22634
22635         * modules/README: New file.
22636         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
22637         not a module.
22638
22639 2004-10-02  Jim Meyering  <jim@meyering.net>
22640
22641         * lib/dirfd.h, getpagesize.h: Add copyright notice.
22642
22643 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22644
22645         * modules/strsep: New file.
22646
22647 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22648
22649         * m4/strsep.m4: New file.
22650
22651 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22652
22653         * lib/strsep.h: New file.
22654         * lib/strsep.c: New file.
22655
22656 2004-10-01  Simon Josefsson  <jas@extundo.com>
22657
22658         * lib/snprintf.c (snprintf): Handle size==0.
22659
22660 2004-10-01  Simon Josefsson  <jas@extundo.com>
22661             Bruno Haible  <bruno@clisp.org>
22662
22663         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
22664         (snprintf): Declare 'args'.
22665
22666 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
22667
22668         * lib/snprintf.c: Remove comments as to why each header is needed.
22669
22670 2004-10-01  Bruno Haible  <bruno@clisp.org>
22671
22672         * MODULES.html.sh: Add strsep.
22673
22674 2004-09-30  Simon Josefsson  <jas@extundo.com>
22675
22676         * modules/snprintf: New file.
22677
22678 2004-09-30  Simon Josefsson  <jas@extundo.com>
22679
22680         * m4/snprintf.m4: New file.
22681
22682 2004-09-30  Simon Josefsson  <jas@extundo.com>
22683
22684         * lib/snprintf.h, lib/snprintf.c: New files.
22685
22686 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22687
22688         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
22689         (hol_entry_help): Never translate an empty string.
22690         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
22691         * lib/argp.h (OPTION_NO_TRANS): New option.
22692
22693 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22694
22695         * modules/argp (Maintainer): Replace Simon Josefsson
22696         by Sergey Poznyakoff.
22697
22698 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22699
22700         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
22701         changes merged back into glibc.
22702
22703 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22704
22705         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
22706
22707 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
22708
22709         * lib/xvasprintf.c: Include xalloc.h.
22710         (xvasprintf): Use xalloc_die, not xmalloc_die.
22711
22712 2004-09-29  Bruno Haible  <bruno@clisp.org>
22713
22714         * modules/alloca-opt: New file, derived from modules/alloca.
22715         * modules/allocsa: Depend on alloca-opt instead of alloca.
22716         * modules/setenv: Likewise.
22717         * modules/vasnprintf: Likewise.
22718         * MODULES.html.sh: Add alloca-opt.
22719
22720 2004-09-28  Simon Josefsson  <jas@extundo.com>
22721
22722         * gnulib-tool: New parameter --lgpl, to asseert that modules are
22723         LGPL, and to replace license template from GPL to LGPL.
22724
22725 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22726
22727         * modules/dummy: Change license to LGPL.
22728
22729 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22730
22731         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
22732
22733 2004-09-24  Simon Josefsson  <jas@extundo.com>
22734
22735         * modules/minmax (License): Change from GPL to LGPL.
22736
22737 2004-09-23  Simon Josefsson  <jas@extundo.com>
22738
22739         * gnulib-tool (--import): Typo.
22740
22741 2004-09-23  Simon Josefsson  <jas@extundo.com>
22742
22743         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
22744
22745 2004-09-22  Bruno Haible  <bruno@clisp.org>
22746
22747         * modules/*: Add 'License' field.
22748         * gnulib-tool: Accept --extract-license option.
22749         (func_get_license): New function.
22750
22751 2004-09-21  Bruno Haible  <bruno@clisp.org>
22752
22753         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
22754         Reported by Simon Josefsson.
22755
22756 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22757
22758         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
22759         gl_AC_TYPE_LONG_LONG.
22760
22761 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22762
22763         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
22764
22765 2004-09-18  Simon Josefsson  <jas@extundo.com>
22766         and  Paul Eggert  <eggert@cs.ucla.edu>
22767
22768         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
22769         calls with autoreconf.  Define GL_LIB.
22770
22771 2004-09-14  Karl Berry  <karl@gnu.org>
22772
22773         * config/srclist.txt: unsync setenv.c, sigh.
22774
22775 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22776
22777         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
22778         Problem reported by Bruno Haible in:
22779         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
22780
22781 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22782
22783         * config/srclist.txt: Comment out argp-pvh.c.
22784
22785 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
22786
22787         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
22788         in case some system header has #define'd it.  Problem reported by
22789         Soeren D. Schulze in
22790         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
22791
22792 2004-09-09  Karl Berry  <karl@gnu.org>
22793
22794         * regex.[ch]: delete from the root.  These were supposed to be
22795                 synced with emacs cvs, but this has not happened for about
22796                 a year, and anyway nothing else uses emacs regex.[ch].
22797                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
22798                 lib/regex[.ch] is untouched.
22799
22800 2004-09-09  Bruno Haible  <bruno@clisp.org>
22801
22802         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
22803
22804 2004-09-09  Bruno Haible  <bruno@clisp.org>
22805
22806         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
22807         modifications.
22808         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
22809
22810 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22811
22812         * modules/xvasprintf: New file.
22813         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
22814
22815 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22816
22817         * lib/xvasprintf.h: New file.
22818         * lib/xvasprintf.c: New file.
22819         * lib/xasprintf.c: New file.
22820
22821 2004-09-08  Bruno Haible  <bruno@clisp.org>
22822
22823         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
22824
22825 2004-09-08  Bruno Haible  <bruno@clisp.org>
22826
22827         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
22828         length is > INT_MAX.
22829         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
22830         more.
22831
22832 2004-09-08  Bruno Haible  <bruno@clisp.org>
22833
22834         * lib/stdint_.h: New file, taken from GNU clisp.
22835
22836 2004-09-08  Bruno Haible  <bruno@clisp.org>
22837             Oskar Liljeblad  <oskar@osk.mine.nu>
22838
22839         * modules/stdint: New file.
22840         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
22841
22842 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22843
22844         Import from coreutils.
22845         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
22846         strings on unbounded length.  alloca's performance benefits aren't
22847         that important here.
22848         (V_STRDUP): Remove.
22849         (parse_with_separator): New function, with most of the internals
22850         of the old parse_user_spec.  Allow user to omit both user and group,
22851         for compatibility with FreeBSD.
22852         Clone only the user name, not the entire spec.
22853         Do not set *uid, *gid unless entirely successful.
22854         Avoid memory leak in some failing cases.
22855         Fix regression for USER.GROUP reported by Dmitry V. Levin in
22856         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
22857         (parse_user_spec): Rewrite to use parse_with_separator.
22858
22859 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22860
22861         * modules/userspec: Don't depend on alloca.
22862
22863 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22864
22865         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
22866
22867 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
22868
22869         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
22870         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
22871         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
22872
22873 2004-08-16  Simon Josefsson  <jas@extundo.com>
22874
22875         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
22876         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
22877         Add --dry-run for --import.
22878         Let user provided command line parameters override configure.ac
22879         settings.
22880
22881 2004-08-12  Simon Josefsson  <jas@extundo.com>
22882
22883         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
22884         as discussed with Paul Eggert in threads rooted at
22885         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
22886         and
22887         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
22888         Before, the test was empty, and relied on ELIDE_CODE in source
22889         code.)
22890         (gl_PREREQ_GETOPT): New macro.
22891         (gl_GETOPT): Use them.
22892
22893 2004-08-12  Simon Josefsson  <jas@extundo.com>
22894
22895         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
22896         * lib/getopt_.h: Renamed from getopt.h.
22897
22898 2004-08-12  Simon Josefsson  <jas@extundo.com>
22899
22900         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
22901         Change default library name from libfoo to libgnu.
22902         Now, if you have a configure.ac that says:
22903                 gl_SOURCE_BASE(gl)
22904                 gl_M4_BASE(gl/m4)
22905                 gl_MODULES(error getopt etcetera)
22906                 gl_INIT
22907         you can import all you need by running:
22908                 ../gnulib/gnulib-tool --import
22909
22910         * modules/getopt (Files): Rename getopt.h to getopt_.h.
22911         (Makefile.am): Rewrite, use logic from argz.
22912         (Include): Use <getopt.h> instead of "getopt.h".
22913
22914 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22915
22916         * modules/argp (Files): Add m4/unlocked-io.m4.
22917         (Depends-on): Add extensions.
22918
22919 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22920
22921         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
22922         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
22923         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
22924         Check for program_invocation_name, program_invocation_short_name,
22925         flockfile, funlockfile, features.h, _getopt_long_only_r.
22926
22927 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22928
22929         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
22930         its complicated substitute.
22931         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
22932         and program_invocation_name.
22933         (__argp_basename) [!_LIBC]: Remove; the only use was
22934         replaced by its body.
22935         (__argp_short_program_name): Change condition from
22936         !defined __argp_short_program_name to
22937         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
22938         to match argp-namefrob.h.
22939         (__argp_failure): Don't assume strerror_r returns char *.
22940         * lib/argp-parse.c (N_): Define unconditionally.
22941         (argp_default_options): Fill out initializers with 0 to avoid
22942         gcc warnings.
22943
22944 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22945
22946         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
22947         getopt1.c.
22948
22949 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22950
22951         Merge from coreutils.
22952
22953         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
22954
22955         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
22956         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
22957
22958 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22959
22960         Merge from coreutils.
22961
22962         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
22963         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
22964         for Reliant Unix 5.43.
22965
22966         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
22967         (union fooround): Use uintmax_t, not long int.
22968         The rest is a merge from libc:
22969         [defined _LIBC]: Include <shlib-compat.h>.
22970         (_obstack) [defined _LIBC]: Remove after 2.3.4.
22971
22972         * lib/settime.c (settime): Recode to avoid warning with
22973         Sun Forte C 6U2.
22974
22975         * lib/strverscmp.c: Convert to UTF-8.
22976
22977 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22978
22979         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
22980         m4/uintmax_t.m4.
22981
22982 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22983
22984         * modules/xalloc-die: New file.
22985         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
22986
22987         * modules/md5 (Files): Add m4/uint32_t.m4.
22988         * modules/sha1: Renamed from modules/sha.
22989         (Files):
22990         Rename lib/sha.h to lib/sha1.h.
22991         Rename lib/sha.c to lib/sha1.c.
22992         Rename m4/sha.m4 to m4/sha1.m4.
22993         (lib_SOURCES): Likewise.
22994         (configure.ac): Rename gl_SHA to gl_SHA1.
22995         (Include): sha.h -> sha1.h.
22996
22997 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22998
22999         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
23000         * m4/sha1.m4: Renamed from sha.m4.
23001         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
23002
23003 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
23004
23005         * lib/obstack.h (obstack_empty_p):
23006         Don't assume that chunk->contents is suitably aligned.
23007         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
23008         Likewise. Problem reported by Benno in
23009         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
23010
23011         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
23012         readable.  This could be improved further but it'd take some work.
23013
23014 2004-08-08  Simon Josefsson  <jas@extundo.com>
23015
23016         * modules/xgethostname (Depends-on): Remove exit and error (not
23017         used).
23018
23019         * modules/getpass-gnu: Add getpass.h.
23020         (Depends-on): Add stdbool.
23021         * modules/getpass: Add getpass.h.
23022
23023 2004-08-08  Simon Josefsson  <jas@extundo.com>
23024
23025         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
23026         Check getpass declaration.
23027
23028 2004-08-08  Simon Josefsson  <jas@extundo.com>
23029
23030         * lib/xgethostname.c: Don't include error.h (not used).
23031
23032         * lib/getpass.h: Add.
23033         * lib/getpass.c: Include getpass.h first.
23034
23035 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
23036
23037         * lib/xalloc-die.c: New file.
23038         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
23039         All uses removed.
23040         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
23041         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
23042         xalloc-die.c.
23043         (_, N_, xalloc_die): Move to xalloc-die.c.
23044         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
23045         so that we needn't mess with xalloc_msg_memory_exhausted.
23046
23047         * lib/sha1.h: Renamed from sha.h.
23048         (SHA1_H): Renamed from _SHA_H.
23049         (sha1_ctx): Renamed from sha_ctx.
23050         (sha1_init_ctx): Renamed from sha_init_ctx.
23051         (sha1_process_block): Renamed from sha_process_block.
23052         (sha1_process_bytes): Renamed from sha_process_bytes.
23053         (sha1_finish_ctx): Renamed from sha_finish_ctx.
23054         (sha1_read_ctx): Renamed from sha_read_ctx.
23055         (sha1_stream): Renamed from sha_stream.
23056         (sha1_buffer): Renamed from sha_buffer.
23057         * lib/sha1.c: Likewise; renamed from sha.c.
23058         Do not include <sys/types.h>.
23059         Include <stddef.h> rather than <stdlib.h>.
23060
23061 2004-08-08  Bruno Haible  <bruno@clisp.org>
23062
23063         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
23064         FILESYSTEM_PREFIX_LEN.
23065         * lib/progreloc.c: Likewise.
23066         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
23067
23068 2004-08-06  Simon Josefsson  <jas@extundo.com>
23069
23070         * modules/progname (Depends-on): Don't depend on stdbool.
23071
23072 2004-08-06  Simon Josefsson  <jas@extundo.com>
23073
23074         * modules/getsubopt: New file.
23075         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
23076         getsubopt.
23077
23078 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23079
23080         More merge from coreutils.
23081
23082         * m4/utimens.m4, m4/utimecmp.m4: New files.
23083         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
23084         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
23085         prereq.m4, sha.m4: Import changes from coreutils.
23086
23087 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23088
23089         More merge from coreutils.
23090         * modules/raise, modules/readtokens0, modules/utimens:
23091         * modules/utimecmp, module/xnanosleep: New files.
23092         * modules/strftime: Add lib/strftime.h.
23093         Change include from <time.h> to "strftime.h".
23094         * modules/yesno: Add lib/yesno.h.
23095         * modules/backupfile: Remove lib/addext.c.
23096         * modules/euidaccess: Add stat-macros.h.
23097         * modules/canonicalize, modules/euidaccess,
23098         modules/filemode, modules/lchown, modules/makepath,
23099         modules/rmdir, modules/stat: Likewise.
23100
23101 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23102
23103         Merge from tar.
23104         * lib/argp-help.c (make_hol, hol_append): Don't assume that
23105         SIZE_MAX is a valid preprocessor constant.
23106         (__argp_basename): Change from "#ifndef _LIBC"
23107         to "#ifndef __argp_short_program_name", so that
23108         we don't compile these functions for tar.
23109
23110         More merges from coreutils.
23111         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
23112         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
23113         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
23114         * lib/addext.c: Remove; no longer needed.
23115         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
23116         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
23117         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
23118         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
23119         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
23120         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
23121         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
23122         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
23123         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
23124         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
23125         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
23126         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
23127         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
23128         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
23129         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
23130         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
23131         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
23132         Import changes from coreutils.
23133
23134 2004-08-05  Simon Josefsson  <jas@extundo.com>
23135
23136         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
23137
23138 2004-08-05  Simon Josefsson  <jas@extundo.com>
23139
23140         * m4/getsubopt.m4: New file.
23141
23142 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23143
23144         Merge from coreutils.
23145
23146         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
23147         * m4/getcwd-path-max.m4: New files.
23148
23149         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
23150         FILESYSTEM_PREFIX_LEN ->
23151         FILE_SYSTEM_PREFIX_LEN.
23152         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
23153         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
23154         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
23155         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
23156
23157         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
23158         prerequisite modules now handle the DOS stuff.
23159         Don't check for unistd.h.
23160
23161 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23162
23163         Merge from coreutils.
23164
23165         * lib/.gdb-history: Remove; this doesn't belong here.
23166
23167         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
23168         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
23169         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
23170         * lib/getcwd.c: New files.
23171
23172         * lib/dirname.h: Include <stdbool.h>.
23173         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
23174         for consistency with POSIX terminology.  All uses changed.
23175         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
23176         (strip_trailing_slashes): Use bool for booleans.
23177         * lib/stripslash.c (strip_trailing_slashes): Likewise.
23178
23179         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
23180         sometimes returns a positive errno value even when it succeeds.
23181         (print_errno_message) [!LIBC]: Fall back on strerror if
23182         __strerror_r fails.
23183
23184         * lib/path-concat.c (mempcpy): Don't define if a system header defines
23185         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
23186         (longest_relative_suffix): New function.
23187         (path_concat): Use it.  Assume first argument is not NULL.
23188         Port to DOS.  Omit redundant separators.
23189         Report an error instead of returning NULL.
23190         Use mempcpy instead of memcpy.
23191         (xpath_concat): Remove: not declared or used.
23192
23193         * lib/same.h: Include <stdbool.h>
23194         (same_name): Return bool, not int.
23195         * lib/same.c (same_name): Likewise.
23196         (errno): Don't declare; we assume C89 or better now.
23197
23198         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
23199         if not already defined.
23200
23201         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
23202         * lib/dup-safer.c (errno): Likewise.
23203
23204 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23205
23206         Merge from coreutils.
23207         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
23208         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
23209         * modules/path-concat: Don't depend on strdup.
23210
23211 2004-08-03  Simon Josefsson  <jas@extundo.com>
23212
23213         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
23214         * lib/progname.h: Don't include stdbool.h.
23215
23216 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23217
23218         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
23219         * MODULES.html.sh (func_all_modules): Remove fatal.
23220
23221 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23222
23223         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
23224
23225 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23226
23227         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
23228         working.
23229
23230 2004-08-02  Simon Josefsson  <jas@extundo.com>
23231
23232         * lib/getsubopt.h: New file, with comments from Bruno Haible.
23233         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
23234         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
23235
23236 2004-08-01  Simon Josefsson  <jas@extundo.com>
23237
23238         * lib/xgetdomainname.c: Include stdlib.h, for free().
23239
23240 2004-07-19  Bruno Haible  <bruno@clisp.org>
23241
23242         * MODULES.html.sh (func_all_modules): Add dummy.
23243
23244 2004-07-16  Simon Josefsson  <jas@extundo.com>
23245
23246         * modules/dummy: New file.
23247
23248 2004-07-16  Simon Josefsson  <jas@extundo.com>
23249
23250         * lib/dummy.c: New file.
23251
23252 2004-07-16  Bruno Haible  <bruno@clisp.org>
23253
23254         * lib/backupfile.h: Add extern "C" for C++.
23255         * lib/closeout.h: Likewise.
23256         * lib/copy-file.h: Likewise.
23257         * lib/findprog.h: Likewise.
23258         * lib/full-write.h: Likewise.
23259         * lib/pathname.h: Likewise.
23260         * lib/progname.h: Likewise.
23261         * lib/stpcpy.h: Likewise.
23262         * lib/stpncpy.h: Likewise.
23263         * lib/strcase.h: Likewise.
23264         * lib/strstr.h: Likewise.
23265         * lib/xalloc.h: Likewise.
23266
23267         * lib/mbswidth.h: Add extern "C" for C++.
23268         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
23269
23270 2004-07-13  Robert Millan  <robertmh@gnu.org>
23271
23272         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
23273
23274 2004-07-09  Simon Josefsson  <jas@extundo.com>
23275
23276         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
23277         failed without this.)
23278
23279 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23280
23281         * modules/chown (Files): Add lib/fchown-stub.c, since
23282         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
23283
23284 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23285
23286         * lib/fchown-stub.c: New file.
23287
23288 2004-06-24  Jim Meyering  <jim@meyering.net>
23289
23290         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
23291
23292 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23293
23294         * modules/argz: Omit "#include".
23295
23296         * MODULES.html.sh (func_all_modules): Add calloc, to match
23297         2004-06-01 addition of calloc module.
23298
23299 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23300
23301         * m4/argz.m4: New file, which is autoupdated from libtool.
23302
23303 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23304
23305         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
23306         libtool.
23307
23308 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23309
23310         * config/srclist-update: Don't insist on "USA." before the
23311         close-comment, as libtool omits the period and puts the */ on a
23312         separate line.
23313         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
23314         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
23315
23316 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
23317
23318         * modules/argz: New file.
23319         * MODULES.html.sh (func_all_modules): Add argz.
23320
23321 2004-06-12  Jim Meyering  <jim@meyering.net>
23322         and  Paul Eggert  <eggert@cs.ucla.edu>
23323
23324         * modules/hash (Files): Add lib/xalloc.h.
23325         * modules/pipe (Depends-on): Add wait-process.
23326         * modules/stat (Depends-on): Add xalloc.
23327         * modules/userspec (Files): Add lib/userspec.h.
23328         * modules/xstrto
23329
23330         Upgrade from gettext-0.13.
23331         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
23332         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
23333         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
23334
23335 2004-06-10  Jim Meyering  <jim@meyering.net>
23336
23337         * lib/calloc.c: New file.
23338
23339 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
23340
23341         * lib/getdate.y (yylex): Allow space between sign and number.
23342         Problem reported by Dan Jacobson.
23343
23344 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23345
23346         Merge from coreutils CVS.
23347
23348         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
23349         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
23350         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
23351         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
23352         xstrtol.m4: Fix copyright date and/or serial number.
23353
23354         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
23355         See if we need an fchown replacement.
23356         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
23357         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
23358         and use the replacement function if we detect either defect.
23359
23360         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
23361         gl_UTIMECMP.
23362
23363 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23364         and  Jim Meyering  <jim@meyering.net>
23365
23366         Merge from coreutils CVS.
23367
23368         * lib/stat-macros.h: New file, with contents from file-type.h
23369         and coreutils' system.h.
23370         * lib/file-type.c: Include "stat-macros.h".
23371         * lib/file-type.h (file_type): Move all macro definitions to new file,
23372         stat-macros.h.
23373
23374         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
23375         Wrap old code with this conditional.
23376         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
23377         function that does not dereference symlinks.
23378         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
23379
23380         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
23381         dependency problems.
23382         (xreadlink): Accept new arg SIZE, for efficiency.
23383         All decls and uses changed.
23384         * lib/xreadlink.h: Include <stddef.h>, for size_t.
23385
23386         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
23387         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
23388
23389         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
23390         sysexits.h.
23391
23392 2004-06-01  Jim Meyering  <jim@meyering.net>
23393
23394         * m4/calloc.m4: New file.
23395
23396 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
23397
23398         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
23399         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
23400         Also, fix a typo in a diagnostic.
23401
23402 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23403
23404         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
23405         or AC_FUNC_REALLOC.
23406
23407 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23408
23409         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
23410         macros to be defined.
23411         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
23412         the allocator returns NULL because the requested size is zero.
23413
23414 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
23415
23416         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
23417         var.  Add comment explaining why libc still defines it.  This
23418         merges the following patch from glibc:
23419         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
23420
23421 2004-05-20  Andreas Schwab  <schwab@suse.de>
23422
23423         * m4/free.m4: Replace free if it not known to work, not the other
23424         way round.
23425
23426 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
23427
23428         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
23429         present in glibc since revision 1.1 of this file.
23430         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
23431         obstack_alignment_mask, obstack_alloc, obstack_base,
23432         obstack_blank, obstack_blank_fast, obstack_chunk_size,
23433         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
23434         obstack_grow0, obstack_init, obstack_int_grow,
23435         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
23436         obstack_next_free, obstack_object_size, obstack_ptr_grow,
23437         obstack_ptr_grow_fast, obstack_room): Remove declarations of
23438         nonexistent functions.
23439
23440 2004-05-18  Karl Berry  <karl@gnu.org>
23441
23442         * config/srclist.txt: break link for vasnprintf.c.
23443
23444 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23445
23446         Port obstack to the AS/400, where pointers are 16 bytes wide and
23447         you cannot cast an integer to a valid pointer.  This patch is
23448         currently waiting to be integrated into glibc; see
23449         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
23450
23451         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
23452         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
23453         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
23454         (struct obstack): temp member is now a union of a pointer and
23455         an integer, instead of an integer.  All integer uses changed.
23456         This does not affect the physical layout of struct obstack,
23457         except on hosts (like the AS/400) where the size or alignment of
23458         void * is greater than that of ptrdiff_t.
23459         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
23460         __STDC__)]: Store temporary in pointer member of union, not
23461         integer member.
23462         * lib/obstack.c: Include <stddef.h>, for offsetof.
23463         (struct fooalign): Remove; it doesn't need a name.
23464         (union fooround): Change double to long double, and add void *.
23465         (DEFAULT_ALIGNMENT): Use offsetof to compute.
23466         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
23467         not a macro.  Hence the values are always int; so remove all
23468         casts-to-int in uses.
23469
23470 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23471
23472         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
23473         we can get this patch merged into glibc.
23474
23475 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23476             Paul Eggert  <eggert@cs.ucla.edu>
23477
23478         * m4/argp: Depend on alloca.
23479
23480 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23481             Paul Eggert  <eggert@cs.ucla.edu>
23482
23483         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
23484         freecoding.
23485
23486 2004-05-17  Bruno Haible  <bruno@clisp.org>
23487
23488         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
23489         precision that consists of a '.' followed by an empty digit string.
23490         Patch by Tor Lillqvist <tml@iki.fi>.
23491
23492 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23493
23494         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
23495         for backward compatibility with older code.  We need our own
23496         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
23497         it under some other name, and our alloca.h will define it.
23498
23499 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23500             Derek Price  <derek@ximbiot.com>
23501
23502         * lib/alloca.c: Include <alloca.h>, to get our interface.
23503         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
23504         include <alloca.h> first.  Use C89 prototype for alloca; this
23505         requires including <stddef.h> for size_t.  Use extern "C" if C++.
23506         Use #elif for simplicity, since we can assume C89 now.
23507         Don't try to source the system alloca.h since it will not be found
23508         and to prevent recursively including its replacement.
23509         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
23510         * lib/regex.c: Likewise.
23511
23512 2004-05-16  Derek Price  <derek@ximbiot.com>
23513             Paul Eggert  <eggert@cs.ucla.edu>
23514
23515         getline cleanup.  This changes the getndelim2 API: both order of
23516         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
23517         no delimiter).
23518
23519         * lib/getline.c: Don't include stddef.h or stdio.h, since our
23520         interface does that.
23521         (getline): Always use getdelim, so that we don't have two
23522         copies of this code.
23523         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
23524         if available.
23525         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
23526         (GETNDELIM2_MAXIMUM): New macro.
23527         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
23528         instead of the old practice of delim2==0.  All callers changed.
23529         Return -1 on overflow, instead of returning junk.
23530         Do not set *linesize unless allocation succeeds.
23531         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
23532         that we include sys/types.h.
23533         * lib/getnline.h: Likewise.
23534         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
23535         (getndelim2): Reorder arguments.
23536         * lib/getnline.c (getnline, getndelim):
23537         Don't discard the NMAX argument.
23538         (getnline): Invoke getndelim, to avoid code duplication.
23539         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
23540         of (size_t) -1 by callers of the getnline family.
23541
23542 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23543
23544         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
23545         Check for gettimeofday.
23546         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
23547         Check for settimeofday, stime.
23548
23549 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23550
23551         * lib/nanosleep.c (suspended): Change its type from int to
23552         sig_atomic_t volatile.
23553         (first_call): Make it private to rpl_nanosleep, and have it
23554         be zero initially as that's a bit faster.
23555         (my_usleep): Round up fractional times instead of truncating them,
23556         as this is the usual meaning for 'sleep'.
23557
23558         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
23559         doesn't work.
23560         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
23561         (ENOSYS): Define if not defined.
23562         (settime): Fall back on stime if it exists and settimeofday fails.
23563         But don't bother with fallbacks if a method fails with errno == EPERM.
23564
23565 2004-05-11  Jim Meyering  <jim@meyering.net>
23566
23567         Prior to this change, the save_cwd caller required read access to the
23568         current directory on most systems (ones with the fchdir function).
23569
23570         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
23571         fails, try write-only, and finally, resort to using xgetcwd.
23572
23573 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
23574
23575         * lib/obstack.c, obstack.h: Import changes from libc.
23576
23577 2004-04-28  Bruno Haible  <bruno@clisp.org>
23578
23579         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
23580         also implicitly appends .exe to executables.
23581         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
23582         accepts Windows pathnames.
23583         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23584         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23585         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23586         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23587         Reported by Derek Robert Price <derek@ximbiot.com>.
23588
23589 2004-04-21  Karl Berry  <karl@gnu.org>
23590
23591         * config/srclist.txt (localcharset.c): break sync.
23592
23593 2004-04-20  Paul Eggert  <eggert@twinsun.com>
23594
23595         * m4/host-os.m4: Add a copyright notice.
23596
23597 2004-04-20  Jim Meyering  <jim@meyering.net>
23598
23599         Change UTILS_ to gl_ in AC_DEFINE'd names.
23600         Change utils_- and jm_-prefixed variables, too.
23601         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
23602         UTILS_FUNC_MKDIR_TRAILING_SLASH.
23603         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
23604
23605         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
23606         Don't emit trailing blanks.
23607         Also rename jm_-prefixed variables to have gl_ prefix.
23608
23609         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
23610         Also rename jm_-prefixed variables to have gl_ prefix.
23611
23612         * m4/jm-macros.m4: Reflect the renamings.
23613         * m4/prereq.m4: Likewise.
23614
23615 2004-04-20  Jim Meyering  <jim@meyering.net>
23616
23617         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
23618         memory.
23619
23620 2004-04-20  Jim Meyering  <jim@meyering.net>
23621             Bruno Haible  <bruno@clisp.org>
23622
23623         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
23624         memory when realloc fails.
23625
23626 2004-04-19  Jim Meyering  <jim@meyering.net>
23627
23628         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
23629         now that readutmp.c may call `free (0)'.
23630
23631 2004-04-19  Bruno Haible  <bruno@clisp.org>
23632
23633         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
23634         * m4/inttypes_h.m4: Likewise.
23635         * m4/stdint_h.m4: Likewise.
23636         * m4/intmax_t.m4: Likewise.
23637         * m4/uintmax_t.m4: Likewise.
23638
23639 2004-04-18  Jim Meyering  <jim@meyering.net>
23640
23641         * m4/prereq.m4: Don't forbid jm_ prefix.
23642
23643         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
23644         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
23645         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
23646         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
23647         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
23648         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
23649         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
23650         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
23651         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
23652         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
23653         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
23654         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
23655         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
23656         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
23657         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
23658         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
23659         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
23660         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
23661         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
23662
23663 2004-04-18  Jim Meyering  <jim@meyering.net>
23664
23665         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
23666         failure, don't leak memory and do call END_UTMP_ENT.
23667
23668 2004-04-16  Jim Meyering  <jim@meyering.net>
23669
23670         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
23671         coreutils' stat program.
23672         (gl_PREREQ): Don't require jm_PREREQ_STAT.
23673
23674 2004-04-11  Paul Eggert  <eggert@twinsun.com>
23675
23676         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
23677         C89.
23678         (CHAR_BIT): Remove, since we assume C89.
23679         Include <stdint.h> if available, as per current Autoconf CVS advice.
23680
23681 2004-03-31  Jim Meyering  <jim@meyering.net>
23682
23683         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
23684         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
23685         * m4/xalloc.m4: Likewise.
23686
23687 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23688
23689         Merge from coreutils.
23690
23691         * m4/inttostr.m4: New file.
23692         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
23693         Require AM_STDBOOL_H and gl_TIMESPEC instead.
23694         Require gl_CLOCK_TIME.
23695         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
23696
23697 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23698
23699         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
23700         not bool, to be more consistent with Unix conventions.
23701         Suggested by Bruno Haible.
23702
23703         Merge from coreutils.
23704
23705         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
23706         * lib/umaxtostr.c: New files.
23707
23708         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
23709         the usual <time.h> dance.
23710         (get_date): Change signature to support fractional time stamps.
23711         All callers changed.
23712         * lib/getdate.y: Include "getdate.h" first, as we can now
23713         assume C89 and don't need to worry about 'const'.
23714         Similarly, include "unlocked-io.h" near start, not in middle.
23715         Include <limits.h>.
23716         (textint.value): Use long int rather than int.
23717         (textint.digits): Use size_t rather than int.
23718         (BILLION, LOG10_BILLION): New constants.
23719         (parser_control): New member rel_ns.  Members day_ordinal,
23720         time_zone, month, day, hour, minutes, rel_year, rel_month,
23721         rel_day, rel_hour, rel_minutes, rel_seconds
23722         are now long int, not int.  Member seconds is now struct timespec,
23723         not int.  New member timespec_seen.  Members dates_seen, days_seen,
23724         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
23725         not int.
23726         (%union.intval): Now long int, not int.
23727         New member timespec.
23728         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
23729         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
23730         (spec): Now is a timespec or an item list.
23731         (timespec, items): New nonterminals.
23732         (time, rel, relunit, number, get_date):
23733         Add support for fractional seconds.
23734         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
23735         (gmtime, localtime, mktime): Remove decls; not needed with C89.
23736         (to_hour): First arg is now long int, not int.
23737         (to_year): Returns long int, not int.
23738         Don't treat year -70 like 70.
23739         (tm_diff): Returns long int, not int.
23740         (lookup_word): Use bool instead of int when appropriate.
23741         (yylex): Use size_t for count, not int.
23742         Detect overflow when parsing large integer constants.
23743         Add support for fractions.
23744         (get_date): Make pointers 'const' if possible.
23745         Use more-portable code to detect integer overflow.
23746         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
23747         Don't use ctime; it's not reliable if the year has >4 digits.
23748
23749         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
23750         This is for compatibility with BSD.
23751
23752         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
23753         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
23754         From coreutils' system.h.
23755
23756         * lib/userspec.c: Don't include "posixver.h".
23757         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
23758         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
23759         compatible extension.  Simplify code by removing a boolean int
23760         that was always nonzero if a string was nonnull.
23761
23762 2004-03-30  Jim Meyering  <jim@meyering.net>
23763
23764         Merge from coreutils.
23765
23766         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
23767         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
23768         on some systems one must include <grp.h> before it.
23769         Reported by Christian Krackowizer.
23770
23771 2004-03-30  Jim Meyering  <jim@meyering.net>
23772
23773         Merge from coreutils.
23774
23775         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
23776
23777         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
23778         an empty input stream.
23779
23780         * lib/readtokens.c: Include <stdbool.h>.
23781         (readtoken): Use `size_t' rather than int/long.
23782         All callers adjusted.
23783         Use `bool' rather than `int' where appropriate.
23784         Use memset rather than an explicit loop.
23785         Use x2nrealloc rather than xrealloc.
23786         Allow the use of `\0' as a delimiter.
23787         (readtokens): Likewise.
23788         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
23789
23790 2004-03-30  Jim Meyering  <jim@meyering.net>
23791
23792         * m4/realloc.m4: Remove file, since now it does no more than
23793         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
23794         the `configure.ac' section of module/realloc.
23795         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
23796
23797 2004-03-30  Bruno Haible  <bruno@clisp.org>
23798
23799         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
23800         nonnull.
23801
23802 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23803
23804         Merge changes to getloadavg.c from coreutils and Emacs.
23805
23806         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
23807         Define to an expression, not to the empty string.
23808         Include cloexec.h and xalloc.h.
23809         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
23810         Use set_cloexec_flag rather than rolling our own.
23811         * lib/cloexec.c, lib/cloexec.h: New files.
23812
23813 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23814
23815         * m4/cloexec.m4: New file.
23816
23817 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23818
23819         * lib/getopt.h: Sync with libc CVS.
23820
23821 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23822             Bruno Haible  <bruno@clisp.org>
23823
23824         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
23825         mbswidth.
23826
23827 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23828             Bruno Haible  <bruno@clisp.org>
23829
23830         * lib/mbswidth.h: Include <wchar.h> only if
23831         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
23832         <wchar.h>.
23833         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
23834
23835 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23836
23837         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
23838         Sync with libc CVS.
23839         * lib/getopt_int.h: New file, also synced from libc.
23840
23841 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23842
23843         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
23844         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
23845         Bring back getopt.c, getopt.h, getopt1.c.
23846
23847 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23848
23849         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
23850         All uses changed.  Check for sa_sigaction member; this fixes
23851         a bug first reported by Jason Andrade in
23852         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23853
23854 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23855
23856         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
23857         '#if' expressions.  Unlike the code it replaces, it does not
23858         depend on (defined _SC_PAGESIZE).  However, it does depend on
23859         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
23860         first reported by Jason Andrade in
23861         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23862
23863 2004-02-25  Simon Josefsson  <jas@extundo.com>
23864
23865         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
23866
23867 2004-02-25  Simon Josefsson  <jas@extundo.com>
23868
23869         * lib/strdup.h: New file.
23870         * lib/strdup.c: Include it.
23871         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
23872         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
23873
23874 2004-02-23  Karl Berry  <karl@gnu.org>
23875
23876         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
23877         (from fencepost.gnu.org:/gd/gnuorg).
23878
23879 2004-02-23  Karl Berry  <karl@gnu.org>
23880
23881         * config/srclistvars.sh (GNUORG) [karl]: redefine.
23882         * config/srclist.txt: add maintain/standards documents.
23883
23884 2004-02-18  Bruno Haible  <bruno@clisp.org>
23885
23886         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
23887         Reported by Derek Robert Price <derek@ximbiot.com>.
23888
23889 2004-02-16  Karl Berry  <karl@gnu.org>
23890
23891         * config/mkinstalldirs, install-sh: update from automake.
23892
23893 2004-02-06  Karl Berry  <karl@gnu.org>
23894
23895         * m4/po.m4: update from gettext 0.14.1.
23896
23897 2004-02-06  Karl Berry  <karl@gnu.org>
23898
23899         * lib/config.charset: update from gettext 0.14.1.
23900
23901 2004-02-05  Paul Eggert  <eggert@twinsun.com>
23902
23903         Add comments and code, prompted by suggestions from Bruno Haible
23904         for sh-quote.
23905         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
23906         describing the enum quoting_style values.
23907         * lib/quotearg.c (quotearg_alloc): New function.
23908         (quotearg_buffer_restyled): Treat lone { and } as special.
23909         Treat = as special.  Work around bug with older shells
23910         that "see" a '\' that is really the 2nd byte of a multibyte char.
23911         Quote empty string with shell_quoting_style.
23912
23913 2004-02-03  Bruno Haible  <bruno@clisp.org>
23914
23915         * m4/pipe.m4: New file, from GNU gettext.
23916
23917 2004-02-03  Bruno Haible  <bruno@clisp.org>
23918
23919         * lib/pipe.h: New file, from GNU gettext.
23920         * lib/pipe.c: New file, from GNU gettext.
23921
23922 2004-01-27  Bruno Haible  <bruno@clisp.org>
23923
23924         * m4/execute.m4: New file, from GNU gettext.
23925
23926 2004-01-27  Bruno Haible  <bruno@clisp.org>
23927
23928         * lib/execute.h: New file, from GNU gettext.
23929         * lib/execute.c: New file, from GNU gettext.
23930         * lib/w32spawn.h: New file, from GNU gettext.
23931
23932 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23933
23934         Merge from diffutils.
23935
23936         * lib/file-type.c (file_type): Add typed memory objects.
23937         * lib/file-type.h (S_TYPEISTMO): New macro.
23938
23939         * lib/c-stack.h (c_stack_action): Remove argv argument.
23940         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
23941         (die): Don't calculate message unless segv_action returns.
23942         (get_stack_location, min_address_from_argv, max_address_from_argv,
23943         volatile stack_base, volatile_stack_size): Remove.
23944         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
23945         that every segmentation violation is a stack overflow.  (Ouch!)
23946         See Debian bug 136249 (still outstanding) for more info about why
23947         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
23948
23949 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23950
23951         Exit-status fix from coreutils.
23952
23953         Use exit_failure consistently in place of EXIT_FAILURE,
23954         so that program exit statuses are consistent on failure.
23955
23956         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
23957         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
23958         * lib/argmatch.h: Comment fix to match the above.
23959         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
23960         Now a macro referring to exit_failure, instead of a separate
23961         variable.  Include "exitfail.h" to get it.
23962         * lib/xstrtol.h: Include "exitfail.h".
23963         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
23964
23965         * lib/long-options.c (parse_long_options): Use prototype
23966         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
23967         for clarity.
23968
23969 2004-01-21  Jim Meyering  <jim@meyering.net>
23970
23971         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
23972         so as not to conflict with a different-sized __mktime_internal
23973         function in GNU libc.
23974         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
23975         Problem building statically-linked `ls' reported by Michael Brunnbauer.
23976
23977 2004-01-20  Karl Berry  <karl@gnu.org>
23978
23979         * config/config.guess: update from config.
23980
23981         * config/srclistvars.sh: GNUWWWLICENSES for karl.
23982
23983 2004-01-20  Bruno Haible  <bruno@clisp.org>
23984
23985         Safer stack allocation.
23986         * lib/setenv.c: Include allocsa.h.
23987         (alloca): Remove fallback definition.
23988         (freea): Remove macro.
23989         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
23990         instead of freea.
23991
23992 2004-01-20  Bruno Haible  <bruno@clisp.org>
23993
23994         * m4/eealloc.m4: New file, from GNU gettext.
23995
23996 2004-01-20  Bruno Haible  <bruno@clisp.org>
23997
23998         * m4/allocsa.m4: New file, from GNU gettext.
23999
24000 2004-01-20  Bruno Haible  <bruno@clisp.org>
24001
24002         * lib/xallocsa.h: New file, from GNU gettext.
24003         * lib/xallocsa.c: New file, from GNU gettext.
24004
24005 2004-01-20  Bruno Haible  <bruno@clisp.org>
24006
24007         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
24008
24009 2004-01-20  Bruno Haible  <bruno@clisp.org>
24010
24011         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
24012         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
24013         specially.
24014
24015 2004-01-20  Bruno Haible  <bruno@clisp.org>
24016
24017         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
24018         patch.
24019
24020 2004-01-20  Bruno Haible  <bruno@clisp.org>
24021
24022         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
24023
24024 2004-01-20  Bruno Haible  <bruno@clisp.org>
24025
24026         * lib/eealloc.h: New file.
24027
24028 2004-01-20  Bruno Haible  <bruno@clisp.org>
24029
24030         * lib/binary-io.h: Avoid warnings on Cygwin.
24031
24032 2004-01-20  Bruno Haible  <bruno@clisp.org>
24033
24034         * lib/allocsa.h: New file, from GNU gettext.
24035         * lib/allocsa.c: New file, from GNU gettext.
24036
24037 2004-01-18  Karl Berry  <karl@gnu.org>
24038
24039         * doc/gpl.texi, doc/lgpl.texi: new files.
24040
24041 2004-01-18  Karl Berry  <karl@gnu.org>
24042
24043         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
24044         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
24045
24046 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24047
24048         Merge from coreutils.
24049
24050         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
24051         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
24052         (gl_DEFAULT_POSIX2_VERSION): Move
24053         the documentation from 'configure' into 'config.hin',
24054         so that 'configure --help' isn't burdened by it and
24055         we don't have to worry about its formatting there.
24056         Reword the documentation so that it's more succinct
24057         and can be run together into a single paragraph.
24058         * m4/same.m4 (gl_SAME): Check for pathconf.
24059
24060 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24061
24062         Merge from coreutils.
24063
24064         * lib/posixver.c: Include posixver.h.
24065
24066         * lib/same.c: Include <stdbool.h>, <limits.h>.
24067         (_POSIX_NAME_MAX): Define if not defined.
24068         (MIN): New macro.
24069         (same_name): If file names are silently truncated, report
24070         that the file names are the same if they are the same after
24071         the silent truncation.
24072
24073         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
24074         conversion function.
24075         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
24076         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
24077         longer needed.
24078
24079 2004-01-15  Jim Meyering  <jim@meyering.net>
24080
24081         Merge from coreutils.
24082
24083         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
24084         if no library is required.
24085         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
24086         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
24087         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
24088         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
24089         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
24090         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
24091         value, $ac_cv_search_crypt, if it's "none required".
24092         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
24093         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
24094         not gl_FUNC_GETLOADAVG.
24095         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
24096         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
24097
24098 2004-01-15  Jim Meyering  <jim@meyering.net>
24099
24100         Merge from coreutils.
24101
24102         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
24103         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
24104         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
24105
24106         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
24107         optional configure-time default.
24108
24109         * lib/version-etc.c (version_etc_copyright): Update copyright date.
24110
24111         * lib/xreadlink.c (xreadlink): Correct outdated comment.
24112
24113 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
24114
24115         Merge from coreutils.
24116
24117         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
24118         value, $ac_cv_search_nanosleep, if it's "none required".
24119
24120 2004-01-14  Paul Eggert  <eggert@twinsun.com>
24121
24122         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
24123         with like-named macro in fnmatch.c.
24124         (EXT): Use an internal constant instead.
24125
24126         Merge fnmatch patches from glibc.
24127         * lib/fnmatch.c (mbsinit): Remove define.
24128         Add libc_hidden_ver (__fnmatch, fnmatch).
24129         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
24130         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
24131
24132 2004-01-14  Karl Berry  <karl@gnu.org>
24133
24134         * config/install-sh: update from automake.
24135
24136 2004-01-13  Karl Berry  <karl@gnu.org>
24137
24138         * config/install-sh: update from automake.
24139
24140 2004-01-09  Karl Berry  <karl@gnu.org>
24141
24142         * config/install-sh: update from automake.
24143
24144 2004-01-05  Karl Berry  <karl@gnu.org>
24145
24146         * config/config.{sub,guess}: update from config.
24147
24148 2003-12-31  Karl Berry  <karl@gnu.org>
24149
24150         * config/depcomp: update from automake.
24151
24152 2003-12-14  Karl Berry  <karl@gnu.org>
24153
24154         * lib/config.charset: update from gettext-runtime.
24155
24156 2003-12-03  Paul Eggert  <eggert@twinsun.com>
24157
24158         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
24159         Bug reported by Alfred M. Szmidt.
24160
24161 2003-12-03  Bruno Haible  <bruno@clisp.org>
24162
24163         * m4/gettext.m4: Upgrade from gettext-0.13.
24164         * m4/po.m4: Upgrade from gettext-0.13.
24165         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
24166         * m4/intmax.m4: New file, from gettext-0.13.
24167         * m4/printf-posix.m4: New file, from gettext-0.13.
24168
24169 2003-11-29  Karl Berry  <karl@gnu.org>
24170
24171         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
24172
24173 2003-11-25  Paul Eggert  <eggert@twinsun.com>
24174             Bruno Haible  <bruno@clisp.org>
24175
24176         * lib/printf-parse.h: Don't include sys/types.h.
24177         (ARG_NONE): New macro.
24178         (char_directive): Change type of *arg_index fields to size_t.
24179         * lib/printf-parse.c: Don't include sys/types.h.
24180         (SSIZE_MAX): Remove macro.
24181         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
24182         Remove unnecessary overflow check.
24183         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
24184         fields.
24185
24186 2003-11-25  Bruno Haible  <bruno@clisp.org>
24187
24188         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
24189
24190 2003-11-25  Bruno Haible  <bruno@clisp.org>
24191
24192         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
24193         gt_TYPE_SSIZE_T.
24194
24195 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24196
24197         * modules/alloca: Remove dependency on xalloc.
24198
24199 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24200
24201         * lib/alloca.c: Remove dependency on xalloc module.
24202         (xalloc_die): Remove.
24203         (memory_full) [!defined emacs]: New macro.
24204         [!defined emacs]: Don't include xalloc.h.
24205         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
24206         address arithmetic overflows.  Change datatypes a bit to avoid
24207         unnecessary casts.
24208
24209 2003-11-22  Jim Meyering  <jim@meyering.net>
24210
24211         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
24212         s/size/size_t/.
24213
24214 2003-11-21  Karl Berry  <karl@gnu.org>
24215
24216         * config/config.{sub,guess}: update from config.
24217
24218 2003-11-18  Karl Berry  <karl@gnu.org>
24219
24220         * config/config.{sub,guess}: update from config.
24221
24222         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
24223
24224 2003-11-17  Paul Eggert  <eggert@twinsun.com>
24225
24226         * README: Mention that S+T cannot overflow if S is the size of
24227         an existing object and T is sufficiently small.
24228
24229 2003-11-17  Jim Meyering  <jim@meyering.net>
24230
24231         On systems without utime and without a utimes function capable of
24232         dealing with a NULL struct utimbuf* argument, this utime replacement
24233         could -- in unusual circumstances -- leak a file descriptor.
24234         * lib/utime.c: Include <unistd.h> and <errno.h>.
24235         (utime_null): Be sure to close `fd' and to preserve errno.
24236         Reported by Geoff Collyer via Arnold Robbins.
24237
24238 2003-11-17  Bruno Haible  <bruno@clisp.org>
24239
24240         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
24241         (Depends-on): Add xsize.
24242
24243 2003-11-17  Bruno Haible  <bruno@clisp.org>
24244
24245         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
24246
24247 2003-11-17  Bruno Haible  <bruno@clisp.org>
24248
24249         * lib/vasnprintf.c (alloca): Remove fallback definition.
24250         (freea): Remove definition.
24251         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
24252         Reported by Paul Eggert.
24253
24254 2003-11-16  Paul Eggert  <eggert@twinsun.com>
24255             Bruno Haible  <bruno@clisp.org>
24256
24257         Protect against address arithmetic overflow.
24258         * lib/printf-args.h: Include stddef.h.
24259         (arguments): Change type of field 'count' to size_t.
24260         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
24261         'unsigned int' where appropriate.
24262         * lib/printf-parse.h: Include sys/types.h.
24263         (char_directive): Change type of *arg_index fields to ssize_t.
24264         (char_directives): Change type of fields 'count', max_*_length to
24265         size_t.
24266         * lib/printf-parse.c: Include sys/types.h and xsize.h.
24267         (SSIZE_MAX): Define fallback value.
24268         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
24269         instead of 'int' where appropriate. Check a_allocated, d_allocated
24270         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
24271         * lib/vasnprintf.c: Include xsize.h.
24272         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
24273         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
24274         overflow. Avoid wraparound when converting a width or precision from
24275         decimal to binary.
24276
24277 2003-11-16  Bruno Haible  <bruno@clisp.org>
24278
24279         Update from GNU gettext.
24280         * lib/printf-parse.c: Generalize to it can be compiled for wide
24281         strings.
24282         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
24283         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
24284         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
24285         SNPRINTF): New macros.
24286         Don't include <alloca.h> if the file is used inside libintl.
24287         (local_wcslen): New function, for Solaris 2.5.1.
24288         (VASNPRINTF): Use it instead of wcslen.
24289
24290 2003-11-16  Bruno Haible  <bruno@clisp.org>
24291
24292         * lib/xsize.h (xmax): New function.
24293         (xsum, xsum3, xsum4): Declare as "pure" functions.
24294
24295 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24296
24297         * modules/xalloc (Files): Undo latest change, since xalloc.h
24298         no longer needs SIZE_MAX or PTRDIFF_MAX.
24299
24300 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24301
24302         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
24303         gl_PTRDIFF_MAX.
24304
24305 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24306
24307         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
24308         "return", to pacify some unknown compiler.  Problem reported
24309         by Joerg Schilling.
24310
24311 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24312
24313         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
24314         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
24315         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
24316         heuristic is just as accurate as far as we know, and it removes a
24317         dependency on size_max.m4 and ptrdiff_max.m4.
24318
24319 2003-11-11  Bruno Haible  <bruno@clisp.org>
24320
24321         * modules/xsize (Files): Add m4/size_max.m4.
24322         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
24323
24324 2003-11-11  Bruno Haible  <bruno@clisp.org>
24325
24326         * m4/size_max.m4: New file.
24327         * m4/ptrdiff_max.m4: New file.
24328         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
24329         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
24330         (gl_XALLOC): Invoke it.
24331
24332 2003-11-11  Bruno Haible  <bruno@clisp.org>
24333
24334         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
24335         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
24336         defined.
24337
24338 2003-11-10  Paul Eggert  <eggert@twinsun.com>
24339
24340         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
24341         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
24342         rejected some allocations of exactly SIZE_MAX - 2 bytes.
24343         From Bruno Haible.
24344         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
24345         not (size_t) -1, since it's defined here.
24346
24347 2003-11-09  Karl Berry  <karl@gnu.org>
24348
24349         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
24350
24351 2003-11-06  Paul Eggert  <eggert@twinsun.com>
24352
24353         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
24354         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
24355         Reject sizes of exactly SIZE_MAX bytes.
24356         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
24357         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
24358
24359 2003-11-05  Bruno Haible  <bruno@clisp.org>
24360
24361         * lib/xsize.h: Include limits.h, to avoid a possible collision with
24362         SIZE_MAX defined in <limits.h> on Solaris.
24363
24364 2003-11-04  Jim Meyering  <jim@meyering.net>
24365
24366         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
24367         variable names, rather than @VAR@.
24368         * modules/poll: Likewise.
24369
24370 2003-11-04  Bruno Haible  <bruno@clisp.org>
24371
24372         * modules/xsize: New file.
24373         * modules/linebreak: Depend on xsize.
24374         * MODULES.html.sh (func_all_modules): Add xsize.
24375
24376 2003-11-04  Bruno Haible  <bruno@clisp.org>
24377
24378         * m4/xsize.m4: New file.
24379
24380 2003-11-04  Bruno Haible  <bruno@clisp.org>
24381
24382         * lib/xsize.h: New file.
24383         * lib/linebreak.c: Include xsize.h.
24384         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
24385         argument for overflow.
24386         Suggested by Paul Eggert.
24387
24388 2003-11-03  Karl Berry  <karl@gnu.org>
24389
24390         * config/config.{guess,sub}: update from config.
24391
24392 2003-11-03  Jim Meyering  <jim@meyering.net>
24393
24394         * modules/userspec (lib_SOURCES): Add userspec.h.
24395         (Include): Add "userspec.h".
24396         Improve description.
24397
24398 2003-11-03  Jim Meyering  <jim@meyering.net>
24399
24400         * lib/userspec.c: Include "userspec.h".
24401         * lib/userspec.h: New file.
24402
24403 2003-11-03  Bruno Haible  <bruno@clisp.org>
24404
24405         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
24406
24407 2003-11-03  Bruno Haible  <bruno@clisp.org>
24408
24409         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
24410         available, to avoid (extremely rare) race condition.
24411         Suggested by Paul Eggert.
24412
24413 2003-11-02  Karl Berry  <karl@gnu.org>
24414
24415         * config/srclist.txt (vasprintf.c): sync broken, sigh.
24416
24417 2003-10-31  Paul Eggert  <eggert@twinsun.com>
24418
24419         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
24420         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
24421         (read_filesystem_list): Set and use me_type_malloced.
24422         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
24423         whatever the type happens to be), for brevity and consistency.
24424         Check for size calculation overflow on Alphas running OSF/1.
24425
24426 2003-10-31  Jim Meyering  <jim@meyering.net>
24427
24428         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
24429
24430         * lib/linebuffer.c: Include <string.h> for declaration of memset.
24431
24432 2003-10-30  Paul Eggert  <eggert@twinsun.com>
24433             Bruno Haible  <bruno@clisp.org>
24434
24435         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
24436         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
24437
24438 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
24439
24440         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
24441         netbsd*-gnu*.  Suggested by Robert Millan.
24442
24443 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24444
24445         * modules/group-member: Depend on stdbool.
24446
24447 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24448
24449         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
24450
24451 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24452
24453         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
24454         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
24455         after the 'gnu' in these cases.  This fixes some bugs in the
24456         previous change, and is based on suggestions by Robert Millan.
24457
24458 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24459
24460         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
24461         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
24462         no longer needed.
24463         * lib/quotearg.c (quotearg_n_options): Use it.
24464         * lib/group-member.c: Include <stdbool.h>.
24465         (free_group_info): Arg is now const *; don't free arg.
24466         (get_group_info): Now returns bool and accepts struct group_info *,
24467         rather than returning a malloc'ed struct group_info *.
24468         All uses changed.  Check for overflow in internal size calculation.
24469
24470         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
24471         rather than xmalloc/xrealloc.
24472         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
24473         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
24474         conformance bug: the old code used a pointer after freeing the
24475         storage that it addressed.
24476         * lib/hash.c (hash_initialize): Simplify the code by using
24477         xalloc_oversized rather than doing it by hand.
24478         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
24479         the buffer preserved.  Use free and xmalloc instead.
24480         * lib/quotearg.c (quotearg_n_options): Likewise.
24481         Use a simpler test for size overflow.  Don't use xalloc_oversized
24482         because unsigned int might be wider than size_t (!); this suggests
24483         that we should switch from unsigned int to size_t for slot numbers.
24484
24485 2003-10-28  Paul Eggert  <eggert@twinsun.com>
24486
24487         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
24488         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
24489         NetBSD kernels.  Requested by Richard Stallman.
24490
24491 2003-10-27  Paul Eggert  <eggert@twinsun.com>
24492
24493         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
24494         to allocate the returned structure.  Do not allocate a subarray,
24495         as x2nrealloc will do that.
24496         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
24497         instead of xnrealloc.
24498         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
24499
24500 2003-10-27  Bruno Haible  <bruno@clisp.org>
24501
24502         * lib/stdbool_.h: Better support for BeOS.
24503
24504 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24505
24506         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
24507         now uses inline.
24508
24509 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24510
24511         * lib/xalloc.h (xalloc_oversized): New static inline function, for
24512         callers that want to do their own size-overflow checking.  Include
24513         <stdbool.h>, since xalloc_oversized returns bool.
24514         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
24515         to use xalloc_oversized.
24516
24517         Add two functions x2realloc, x2nrealloc, for programs that grow
24518         arrays dynamically by doubling their sizes.
24519         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
24520         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
24521         New functions.
24522
24523         Port to C99 semantics for 'inline' of external functions.
24524         Bug reported by Bruno Haible.
24525         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
24526         with the old contents of xnmalloc.
24527         (xnmalloc, xmalloc): Use it.
24528         (xnrealloc_inline): New static inline function,
24529         with the old contents of xnrealloc.
24530         (xnrealloc, xrealloc): Use it.
24531
24532         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
24533         that.
24534
24535 2003-10-26  Karl Berry  <karl@gnu.org>
24536
24537         * config/srclist.txt (COPYING.DOC): no longer available from
24538         /gd/gnuorg; don't know where the ultimate source is.
24539
24540 2003-10-25  Paul Eggert  <eggert@twinsun.com>
24541
24542         Fix several address-calculation bugs in the hash modules,
24543         plus some minor code cleanup.
24544
24545         * lib/hash.h: Include <stdbool.h>, for bool.
24546         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
24547         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
24548         hash_get_n_entries, hash_get_max_bucket_length,
24549         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
24550         hash_rehash): Use size_t rather than unsigned.
24551         * lib/hash.c (struct hash_table, hash_get_n_buckets,
24552         hash_get_n_buckets_used, hash_get_n_entries,
24553         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
24554         hash_get_entries, hash_do_for_each, hash_string, is_prime,
24555         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
24556         Likewise.
24557         (SIZE_MAX): Define if not defined.
24558         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
24559         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
24560         hash_print):
24561         Use const * when possible.
24562         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
24563         (check_tuning): Fix bug: if tuning parameters were very close to
24564         0 or 1, rounding errors could have caused subscript violations.
24565         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
24566         (hash_initialize): Add 'fail:' label
24567         to free table and return NULL, and use it to simplify code.
24568         Use calloc rather than clearing the storage ourself.
24569         (hash_initialize, hash_rehash): Check for arithmetic overflow in
24570         buffer size calculations.
24571         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
24572         Include <stddef.h>, for size_t.
24573         * lib/hash-pjw.c (hash_pjw): Likewise.
24574         Switch to method described by Bruno Haible.
24575         Include <limits.h>, for CHAR_BIT.
24576         (SIZE_BITS): New macro.
24577
24578 2003-10-23  Paul Eggert  <eggert@twinsun.com>
24579
24580         * m4/getline.m4 (AM_FUNC_GETLINE):
24581         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
24582         hosts.  Problem reported by Derek Robert Price in
24583         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
24584         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
24585         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
24586
24587 2003-10-21  Paul Eggert  <eggert@twinsun.com>
24588
24589         * lib/getndelim2.c (getndelim2): When size calculation overflows,
24590         ceiling the allocation at NMAX bytes rather than silently
24591         discarding input bytes before NMAX is reached.  This makes
24592         a difference only if NMAX exceeds SIZE_MAX / 2.
24593
24594         * lib/obstack.c: Merge from glibc.
24595         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
24596         Add libc_hidden_def (_obstack_newchunk).
24597         (_obstack_free) [! defined _LIBC]: Remove.
24598         [defined _LIBC]: Make a strong alias from obstack_free, rather than
24599         a clone of the function body.
24600         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
24601         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
24602
24603         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
24604         glibc.
24605         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
24606         arg to memcpy.
24607
24608         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
24609         (obstack_ptr_grow_fast, obstack_int_grow_fast):
24610         Don't use lvalue casts, as GCC plans to remove support for them
24611         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
24612         was also present in the non-GCC version, indicating that this
24613         code had always been buggy and had never been widely used.
24614         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
24615         Use the fast variant of each macro, rather than copying the
24616         definiens of the fast variant; that way, we'll be more likely to
24617         catch future bugs in the fast variants.
24618
24619 2003-10-20  Bruno Haible  <bruno@clisp.org>
24620
24621         * modules/wait-process: New file.
24622         * MODULES.html.sh (func_all_modules): Add wait-process.
24623
24624 2003-10-20  Bruno Haible  <bruno@clisp.org>
24625
24626         * m4/wait-process.m4: New file.
24627
24628 2003-10-20  Bruno Haible  <bruno@clisp.org>
24629
24630         * lib/wait-process.h: New file, from GNU gettext.
24631         * lib/wait-process.c: New file, from GNU gettext.
24632
24633 2003-10-19  Jim Meyering  <jim@meyering.net>
24634
24635         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
24636         HPUX 10.20.
24637
24638 2003-10-18  Karl Berry  <karl@gnu.org>
24639
24640         * config/config.guess: update from config.
24641
24642 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24643
24644         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
24645         (getgroups): First arg is int, not size_t.
24646         Don't let 'free' mangle errno.
24647
24648 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24649
24650         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
24651
24652 2003-10-16  Karl Berry  <karl@gnu.org>
24653
24654         * config/config.{guess,sub}: update from config.
24655
24656 2003-10-16  Jim Meyering  <jim@meyering.net>
24657
24658         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
24659         memcpy.
24660
24661 2003-10-15  Paul Eggert  <eggert@twinsun.com>
24662
24663         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
24664         (SIZE_MAX): Remove.
24665         (new_exclude, add_exclude_file): Initial size no longer needs to
24666         be a power of 2.
24667         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
24668         our own address arithmetic overflow checking.
24669
24670         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
24671         (fnmatch): Do not alloca more than 2000 wide characters;
24672         instead, use malloc for large buffers.
24673         Check for address arithmetic overflow, and return -1
24674         with errno set to ENOMEM in that case.
24675         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
24676         (NEW_PATTERN): Do not alloca more than 8000 bytes;
24677         instead, return -1.  Check for address arithmetic overflow.
24678
24679 2003-10-14  Paul Eggert  <eggert@twinsun.com>
24680
24681         Handle invalid suffixes and overflow independently, so that
24682         callers can treat them independently as needed.  Fix some bugs in
24683         suffix handling, e.g., "100k@" was not diagnosed as an invalid
24684         suffix for a human-readable blocksize.  The major caller-visible
24685         change is the addition of a new
24686         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
24687         that both overflow and suffix chars were found.
24688
24689         * lib/human.c (humblock): Don't check separately for invalid suffix
24690         char; that is xstrtoumax's job (now that its bug is fixed).
24691         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
24692         INTMAX_MAX]: New macros.
24693         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
24694         TYPE_MAXIMUM): New macros.
24695         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
24696         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
24697         if overflow occurs, as it's what __strtol does and it's more useful
24698         in practice.
24699         (__xstrtol): If __strtol reports some error other than ERANGE,
24700         reflect it to the caller as LONGINT_INVALID.  If it reports
24701         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
24702         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
24703         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
24704         value.
24705         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
24706         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
24707         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
24708         [defined UINTMAX_MAX]: New macros.
24709
24710 2003-10-14  Bruno Haible  <bruno@clisp.org>
24711
24712         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
24713
24714 2003-10-14  Bruno Haible  <bruno@clisp.org>
24715
24716         * m4/sig_atomic_t: New file, from GNU gettext.
24717         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
24718
24719 2003-10-14  Bruno Haible  <bruno@clisp.org>
24720
24721         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
24722         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
24723         Also use volatile where needed.
24724
24725 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24726
24727         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
24728         Change maintainer from Bruno Haible to 'all'.
24729
24730 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24731
24732         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
24733
24734 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24735
24736         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
24737         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
24738         and define in terms of the other primitives.
24739         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
24740         (SIZE_MAX): Define if not already defined.
24741         (array_size_overflow): New function.
24742         (xalloc_die): Abort instead of exiting if 'error' returns.
24743         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
24744         (xmalloc, xrealloc): Use them.
24745         (xcalloc): Check for address arithmetic overflow.
24746         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
24747         a bit faster than strcpy.
24748
24749 2003-10-10  Simon Josefsson  <jas@extundo.com>
24750
24751         * modules/argp (Depends-on): Add restrict and strcase.
24752
24753 2003-10-10  Simon Josefsson  <jas@extundo.com>
24754
24755         * m4/argp.m4: Add AC_C_INLINE.
24756
24757 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24758
24759         Merge getpass from libc, plus a few fixes.
24760
24761         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
24762         Include <stdbool.h>.
24763         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
24764         __fsetlocking to empty.
24765         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
24766         do include <bits/libc-lock.h>.
24767         Do not include <fcntl.h>; not needed.
24768         [_LIBC]: Include <wchar.h>.
24769         (NOTCANCEL_MODE): New macro.
24770         (flockfile, funlockfile) [_LIBC]: New macros.
24771         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
24772         [!_LIBC]: New macros.
24773         (call_fclose): New function.
24774         (getpass): Use it.  Save tty stream separately; this simplifies the
24775         code and makes it more reliable if stdin happens to equal stdout.
24776         Invoke __fsetlocking on tty.
24777         Handle thread cancellation if needed.
24778         Namespace cleanup (use __tcgetattr, __getline).
24779         Use bool for Booleans.
24780         [USE_IN_LIBIO]: Handle wide streams.
24781         [!_LIBC]: Unconditionally do the fseek, since we don't know what
24782         stream might go where.
24783
24784         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
24785         doesn't have to include <stdio.h> before us.
24786         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
24787         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
24788         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
24789         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
24790         if not declared, so that we can use getpass.c code from libc without
24791         rewriting it.
24792         (flockfile, ftrylockfile, funlockfile): New macros.
24793
24794 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24795
24796         * modules/getpass: Depend on stdbool.
24797
24798 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24799
24800         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
24801
24802 2003-10-07  Karl Berry  <karl@gnu.org>
24803
24804         * config/config.{guess,sub}: update from config.
24805
24806 2003-10-06  Jim Meyering  <jim@meyering.net>
24807             Bruno Haible  <bruno@clisp.org>
24808
24809         This lets translators provide better translations for the
24810         "Written by ..." part of --version output.
24811         * lib/version-etc.h: Include stdarg.h.
24812         (version_etc_copyright): Declare as readonly.
24813         (version_etc): Make this function variadic with a NULL-terminated list
24814         of author name strings.
24815         (version_etc_va): New declaration.
24816         * lib/version-etc.c: Include stdarg.h, stdlib.h.
24817         (version_etc_copyright): Declare as readonly.
24818         (version_etc_va): New function. Provide a different translatable string
24819         for each possible number of authors < 10. Abbreviate when there are 10
24820         authors or more.
24821         (version_etc): Make this function variadic. Call version_etc_va.
24822         Suggestion from Gary V. Vaughan.
24823
24824         * lib/long-options.h (parse_long_options): Change prototype: the
24825         authors string is moved to the end and becomes variadic.
24826         * lib/long-options.c: Include stdarg.h.
24827         (parse_long_options): Make this function variadic, too.
24828         Call version_etc_va, not version_etc.
24829
24830 2003-10-06  Bruno Haible  <bruno@clisp.org>
24831
24832         * modules/version-etc-2: Remove file.
24833         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
24834
24835 2003-10-06  Bruno Haible  <bruno@clisp.org>
24836
24837         * modules/fatal-signal: New file.
24838         * MODULES.html.sh (func_all_modules): Add fatal-signal.
24839
24840 2003-10-06  Bruno Haible  <bruno@clisp.org>
24841
24842         * m4/fatal-signal.m4: New file.
24843         * m4/signalblocking.m4: New file, from GNU gettext.
24844
24845 2003-10-06  Bruno Haible  <bruno@clisp.org>
24846
24847         * lib/version-etc-2.h: Remove file.
24848         * lib/version-etc-2.c: Remove file.
24849
24850 2003-10-06  Bruno Haible  <bruno@clisp.org>
24851
24852         * lib/fatal-signal.h: New file, from GNU gettext.
24853         * lib/fatal-signal.c: New file, from GNU gettext.
24854
24855 2003-10-05  Paul Eggert  <eggert@twinsun.com>
24856
24857         * README: Rework advice for preventing empty .o files.
24858         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
24859         not <sys/types.h>.
24860
24861 2003-10-04  Karl Berry  <karl@gnu.org>
24862
24863         * lib/argp*: update from libc.
24864
24865 2003-10-04  Karl Berry  <karl@gnu.org>
24866
24867         * config/config.{guess,sub}: update from config.
24868
24869 2003-10-02  Bruno Haible  <bruno@clisp.org>
24870
24871         * modules/lchown (Include): Add lchown.h.
24872         * modules/time_r (Include): Use "..." syntax.
24873         * modules/xgetdomainname (Include): Add xgetdomainname.h.
24874
24875 2003-10-01  Simon Josefsson  <jas@extundo.com>
24876
24877         * MODULES.html.sh (func_all_modules): Move gethostname from section
24878         'based on' to section 'lacking' POSIX:2001.
24879
24880 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
24881
24882         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
24883         to output mode on the same stream.
24884
24885 2003-09-29  Paul Eggert  <eggert@twinsun.com>
24886
24887         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
24888         Fix arg typo in previous patch.
24889
24890 2003-09-28  Jim Meyering  <jim@meyering.net>
24891
24892         * lib/error.c: Correct cpp indentation.
24893
24894 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24895
24896         * modules/free: New file.
24897
24898 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24899
24900         * m4/free.m4: New file.
24901
24902 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24903
24904         * lib/minmax.h (MIN, MAX)
24905         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
24906         Omit the special code that used __typeof__, since we worry that
24907         it could be more trouble than it's worth.  See:
24908         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
24909         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
24910
24911         * lib/free.c: New file.
24912
24913 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
24914
24915         Trivial fixes to Makefile.am parts of module listings.
24916         * modules/strstr: Append strstr.h to lib_SOURCES.
24917         * modules/strcase: Likewise, for strcase.h.
24918
24919 2003-09-27  Karl Berry  <karl@gnu.org>
24920
24921         * config/mkinstalldirs: update from automake.
24922
24923 2003-09-26  Paul Eggert  <eggert@twinsun.com>
24924
24925         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
24926         (error_tail): Do not loop, reallocating temporary buffer, since
24927         the output cannot contain more wide characters than the input
24928         contains bytes, the size must be big enough already.  This avoids
24929         one potential size overflow calculation.  Check for size overflow
24930         when calculating temporary buffer size.  Free temporary buffer
24931         when done, if it was allocated with malloc; this plugs a memory
24932         leak.  Remove casts from void * to pointers, that are no longer
24933         needed now that we're assuming C89 or better.
24934
24935         Merge error changes from glibc.
24936
24937         * lib/error.c, error.h: Update copyright notice header to match glibc.
24938         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
24939         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
24940         Disable cancellation while printing error.
24941         * lib/error.h: Prepend __ to parameter names.
24942
24943 2003-09-26  Jim Meyering  <jim@meyering.net>
24944
24945         * lib/error.c (error_tail): Move some declarations
24946         into inner scope where the local variables are used.
24947
24948 2003-09-26  Bruno Haible  <bruno@clisp.org>
24949
24950         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
24951         stpncpy().
24952         Don't define stpncpy through config.h; it's now done through stpncpy.h.
24953
24954 2003-09-26  Bruno Haible  <bruno@clisp.org>
24955
24956         * lib/stpncpy.h (gnu_stpncpy): New declaration.
24957         (stpncpy): Define as alias for gnu_stpncpy.
24958         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
24959
24960 2003-09-25  Simon Josefsson  <jas@extundo.com>
24961
24962         * lib/xgetdomainname.h: New file.
24963         * lib/xgetdomainname.c: New file.
24964
24965 2003-09-25  Simon Josefsson  <jas@extundo.com>
24966             Bruno Haible  <bruno@clisp.org>
24967
24968         * modules/getdomainname: New file.
24969         * modules/xgetdomainname: New file.
24970         * MODULES.html.sh (func_all_modules): Add getdomainname,
24971         xgetdomainname.
24972
24973 2003-09-25  Simon Josefsson  <jas@extundo.com>
24974             Bruno Haible  <bruno@clisp.org>
24975
24976         * m4/getdomainname.m4: New file.
24977
24978 2003-09-25  Simon Josefsson  <jas@extundo.com>
24979             Bruno Haible  <bruno@clisp.org>
24980
24981         * lib/getdomainname.h: New file.
24982         * lib/getdomainname.c: New file.
24983
24984 2003-09-25  Karl Berry  <karl@gnu.org>
24985
24986         * lib/argp-fmtstream.c, argp-help.c: update from libc.
24987
24988 2003-09-25  Karl Berry  <karl@gnu.org>
24989
24990         * config/install-sh: update from automake.
24991
24992 2003-09-25  Bruno Haible  <bruno@clisp.org>
24993
24994         * modules/version-etc-2: New file, from modules/version-etc with
24995         modifications.
24996         * MODULES.html.sh (func_all_modules): Add version-etc-2.
24997
24998 2003-09-25  Bruno Haible  <bruno@clisp.org>
24999
25000         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
25001         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
25002
25003 2003-09-24  Simon Josefsson  <jas@extundo.com>
25004
25005         * modules/xgethostname: Add xgethostname.h.
25006
25007 2003-09-24  Paul Eggert  <eggert@twinsun.com>
25008
25009         * lib/linebuffer.c (freebuffer): Don't free the argument, just
25010         the buffer associated with the argument.  Bug reported by
25011         Simon Josefsson.
25012
25013 2003-09-24  Paul Eggert  <eggert@twinsun.com>
25014
25015         * README: Document assumptions that 'int' is at least 32 bits
25016         wide, that integer arithmetic is 2's complement without overflow,
25017         that there are no holes in integer values, that adding sizes of
25018         two nonoverlapping objects can't overflow, and that all-bits-zero
25019         yields scalar zero.  Fix spelling and capitalization typos.
25020
25021 2003-09-19  Karl Berry  <karl@gnu.org>
25022
25023         * lib/argp.h: update from libc.
25024
25025 2003-09-17  Paul Eggert  <eggert@twinsun.com>
25026
25027         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
25028         to avoid spurious warnings like "AC_RUN_IFELSE was called before
25029         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
25030
25031 2003-09-17  Paul Eggert  <eggert@twinsun.com>
25032
25033         * gnulib-tool: Use "test -h", not "test -L", for portability
25034         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
25035         (tags_regexp): Remove, since \| doesn't conform to POSIX.
25036         (sed_extract_prog): Issue s commands one-by-one, rather than
25037         using \| in one s command.
25038
25039 2003-09-16  Paul Eggert  <eggert@twinsun.com>
25040
25041         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
25042         input error, instead of returning NULL the next time we are called
25043         (and therefore losing track of errno).
25044
25045 2003-09-16  Bruno Haible  <bruno@clisp.org>
25046
25047         * gnulib-tool (func_create_testdir): Warn about duplicated
25048         dependencies.
25049
25050 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25051
25052         * modules/argmatch, modules/fatal, modules/obstack,
25053         modules/xalloc, modules/xgethostname: Sort dependencies by
25054         importance, not alphabetically.
25055
25056 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25057
25058         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
25059         fails, so that the caller gets the proper errno.
25060
25061         * lib/readutmp.c (read_utmp): Likewise.
25062         Check for fstat error.  Close stream and free storage
25063         when failing.
25064
25065 2003-09-14  Karl Berry  <karl@gnu.org>
25066
25067         * config/srclist.txt (strdup.c): disable for c89 changes.
25068
25069 2003-09-14  Jim Meyering  <jim@meyering.net>
25070
25071         * lib/getloadavg.c: Correct cpp indentation.
25072         * lib/strdup.c: Likewise.
25073         * lib/vasnprintf.c: Likewise.
25074
25075 2003-09-14  Bruno Haible  <bruno@clisp.org>
25076
25077         * modules/fwriteerror: New file.
25078         * MODULES.html.sh (func_all_modules): Add fwriteerror.
25079
25080 2003-09-14  Bruno Haible  <bruno@clisp.org>
25081
25082         * lib/fwriteerror.h: New file.
25083         * lib/fwriteerror.c: New file.
25084
25085 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25086
25087         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
25088         modules/xgethostname, modules/xalloc: Depend on exit.
25089
25090 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25091
25092         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
25093
25094         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
25095         and AC_MINIX, too, so that their extensions are available.
25096
25097         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
25098         This macro has been superseded by gl_BACKUPFILE.
25099
25100         More patches to assume C89 or better.
25101
25102         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
25103
25104         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
25105         unconditionally.
25106         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
25107         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
25108         Include <string.h>, <stdlib.h> unconditionally.
25109         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
25110         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
25111         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
25112         headers or for string.h.
25113         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
25114         or strtoul.
25115
25116         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
25117         headers.
25118         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
25119         * m4/userspec.m4 (gl_USERSPEC): Likewise.
25120         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
25121         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
25122         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
25123         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
25124         memcpy, memset.
25125         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
25126         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
25127         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
25128         strtol.
25129         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
25130         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
25131         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
25132         strtoul.
25133
25134 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25135
25136         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
25137         * lib/obstack.c [!defined _LIBC]: Likewise.
25138         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
25139         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
25140         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
25141
25142         More changes to assume C89 or better.
25143
25144         * lib/error.c (error_tail): Assume vprintf.
25145
25146         * lib/argmatch.c (getenv): Remove decl.
25147         * lib/progreloc.c (get_full_program_name): Define via prototype.
25148         * lib/setenv.c (clearenv): Likewise.
25149         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
25150         needed.
25151         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
25152         (malloc, memcpy): Remove decls.
25153         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
25154         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
25155         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25156         (memcpy): Remove macro.
25157         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
25158         (__P): Remove.  All uses removed.
25159         (PTR): Remove.  All uses changed to void *.
25160         (CHAR_BIT, NULL): Remove.
25161         (spaces, zeros, memset_space, memset_zero)
25162         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
25163         Remove.
25164         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
25165         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
25166         Define with prototype.
25167         Remove now-unnecessary prototype decl.
25168         (extra_args_spec): Assume ANSI C.  All uses changed.
25169         (extra_args_spec_iso): Remove.
25170         (my_strftime, emacs_strftimeu): Define via prototype.
25171         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
25172         unconditionally.
25173         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
25174         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
25175         (strtoul, strtol): Remove decls.
25176         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
25177         LONG_MAX): Remove.
25178         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25179         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
25180         (LOCALE_PARAM_PROTO): New macro.
25181         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
25182         (INTERNAL (strtol), strtol): Define with a prototype.
25183         (PARAMS): Remove.  All uses removed.
25184         * lib/tempname.c: Include <string.h> unconditionally.
25185         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
25186         * lib/xgethostname.c (main): Define with a prototype.
25187         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
25188         Include <stdlib.h> unconditionally.
25189         (calloc, malloc, realloc, free): Remove decls.
25190         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
25191         Include <stdlib.h> unconditionally.  Sort include file names.
25192         (strtod): Remove.
25193         (xstrtod): Define with a prototype.
25194         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
25195         (strtol, strtoul): Remove decls.
25196
25197 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25198
25199         More patches to assume C89 or better.
25200         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
25201         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
25202         string.h, memchr, STDC_HEADERS.
25203
25204 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25205
25206         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
25207         Include <stdlib.h>, <string.h> unconditionally.
25208         Remove now-unnecessary cast to char *.
25209         * lib/strnlen.c: Include <string.h> unconditionally.
25210         * lib/yesno.c (yesno): Define with a prototype.
25211
25212 2003-09-11  Bruno Haible  <bruno@clisp.org>
25213
25214         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
25215
25216 2003-09-10  Jim Meyering  <jim@meyering.net>
25217
25218         * lib/error.c: Correct indentation of cpp directives.
25219
25220 2003-09-10  Bruno Haible  <bruno@clisp.org>
25221
25222         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
25223         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
25224         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
25225         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
25226         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
25227         <stdlib.h> and <string.h> checks.
25228         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
25229         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
25230
25231 2003-09-10  Bruno Haible  <bruno@clisp.org>
25232
25233         * lib/strcspn.c: Include <string.h> unconditionally.
25234         * lib/strpbrk.c: Include <string.h> unconditionally.
25235         * lib/strstr.c: Include <string.h> unconditionally.
25236         * lib/unicodeio.c: Include <string.h> unconditionally.
25237         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
25238         * lib/unsetenv.c: Likewise.
25239         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
25240         * lib/yesno.c: Include <stdlib.h> unconditionally.
25241         (rpmatch): Add prototype.
25242
25243 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25244
25245         More patches to assume C89 or better.
25246         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
25247         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
25248         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
25249         or for string.h.
25250         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
25251         stdlib.h.
25252         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
25253         C headers.
25254         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
25255         string.h.
25256         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
25257         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
25258         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
25259         or for string.h.
25260         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
25261         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
25262         C headers.
25263         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
25264         memcpy.
25265         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
25266         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
25267         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
25268         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
25269         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
25270         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
25271         string.h, free.
25272         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
25273         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
25274         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
25275         C headers, or for string.h.
25276         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
25277         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
25278         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
25279         headers, memory.h, stdlib.h, string.h, strings.h.
25280         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
25281         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
25282         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
25283         strchr.
25284         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
25285         headers, memory.h, string.h.
25286         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
25287         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
25288         free.
25289         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
25290         headers.
25291         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
25292         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
25293         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
25294         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
25295         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
25296
25297 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25298
25299         More K&R removal.
25300
25301         * lib/acosl.c (main): Use a prototype.
25302         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
25303         tanl.c: Likewise.
25304
25305         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
25306
25307         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
25308         (getopt, etopt_long, getopt_long_only, _getopt_internal)
25309         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
25310         with a prototype.
25311         * lib/getopt.c (const): Remove macro.
25312         Include <string.h> unconditionally.
25313         (my_index): Remove; all uses changed to strchr.
25314         (strlen): Remove decl.
25315         (exchange): Remove forward decl; no longer needed.
25316         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
25317         Define with prototype.
25318         * lib/getopt1.c (const): Remove macro.
25319         (getopt_long, getopt_long_only, main): Define with prototype.
25320
25321         * lib/getugroups.c: Include <string.h> unconditionally.
25322
25323         * lib/getusershell.c: Include <stdlib.h> unconditionally.
25324         (getusershell, setusershell, endusershell, readname, main):
25325         Define with prototypes.
25326
25327         * lib/group-member.c: Include group-member.h first.
25328         Include <stdlib.h> unconditionally.
25329
25330         * lib/hard-locale.c: Include hard-locale.h first.
25331         Include <stdlib.h>, <string.h> unconditionally.
25332
25333         * lib/hash.c (free, malloc): Remove decls.
25334         Include <stdlib.h> unconditionally.
25335
25336         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
25337         (getenv): Do not declare.
25338
25339         * lib/idcache.c: Include <string.h> unconditionally.
25340
25341         * lib/long-options.c: Include long-options.h first, to test interface.
25342         Include <stdlib.h> unconditionally.
25343
25344         * lib/makepath.c: Include makepath.h first, to test interface.
25345         Include <stdlib.h> and <string.h> unconditionally.
25346
25347         * lib/linebuffer.c: Include <stdlib.h>.
25348         (free): Remove decl.
25349
25350         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
25351         stddef.h. rpl_malloc returns void *, not char *.
25352         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
25353         prototype.
25354
25355         * lib/md5.h: Include <limits.h> unconditionally.
25356         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
25357         (__P): Remove; all uses removed.
25358         * lib/md5.c: Include "md5.h" first.
25359         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
25360         md5_buffer, md5_process_bytes, md5_process_block):
25361         Define with prototypes.
25362         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
25363         * lib/sha.c: Include "sha.h" first.
25364         Include <stdlib.h>, <string.h> unconditionally.
25365
25366         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
25367         * lib/memcmp.c (__ptr_t): Likewise.
25368         * lib/memrchr.c (__ptr_t): Likewise.
25369         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
25370         Include <string.h> unconditionally.
25371         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
25372         * lib/memchr.c: Include <stdlib.h> unconditionally.
25373         * lib/memchr.c (LONG_MAX): Remove.
25374         * lib/memrchr.c (LONG_MAX): Likewise.
25375         * lib/memchr.c (__memchr): Define via a prototype.
25376         * lib/memrchr.c (__memrchr): Likewise.
25377         * lib/memcmp.c (__P): Remove, and remove all uses.
25378         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
25379         Remove forward decls; no longer needed.
25380         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
25381         Use types required by C89 in prototype.
25382
25383         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
25384         * lib/savedir.c: Likewise.
25385         * lib/mkdir.c (free): Remove decl.
25386         * lib/rmdir.c (rmdir): Define with a prototype.
25387         * lib/savedir.c: Include savedir.h first, to test interface.
25388
25389         * lib/mktime.c (STDC_HEADERS): Remove.
25390         Include <stdlib.h>, <string.h> unconditionally.
25391
25392         * lib/modechange.c: Include <stdlib.h> unconditionally.
25393         (malloc): Remove decl.
25394
25395         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
25396         (free): Remove decl.
25397
25398         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
25399         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
25400         (This type really should be intptr_t, but that's a C99ism.)
25401         (_obstack_memcpy): Remove: all uses changed to memcpy.
25402         Include <string.h> unconditionally.
25403         (struct obstack): Assume __STDC__ for types of members
25404         chunkfun, freefun, extra_arg.
25405         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
25406         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
25407         obstack_begin, obstack_specify_allocation,
25408         obstack_specify_allocation_with_arg, obstack_chunkfun,
25409         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
25410         Remove unprototyped decls and the macros that use them.
25411         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
25412         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
25413         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
25414         (defined __STDC__ && __STDC__)]:
25415         Remove nonprototyped code.
25416         Include <stdlib.h> unconditionally.
25417         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
25418         _obstack_allocated_p, _obstack_free, obstack_free,
25419         _obstack_memory_used, print_and_abort):
25420         Define using prototypes.
25421         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
25422         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
25423         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
25424         obstack_next_free, obstack_object_size, obstack_room) [0]:
25425         Remove unused, unprototyped code.
25426
25427         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
25428
25429         * lib/physmem.c (physmem_total, physmem_available, main): Define
25430         with prototypes.
25431
25432         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
25433         (main): Define with a prototype.
25434
25435         * lib/posixver.c (getenv): Remove decl.
25436
25437         * lib/putenv.c (malloc): Returns void *, not char *.
25438         Include <string.h> unconditionally.
25439         (strchr, memcpy, NULL): Do not define.
25440
25441         * lib/readtokens.c: Include readtokens.h first, to test interface.
25442         Include <stdlib.h>, <string.h> unconditionally.
25443         (init_tokenbuffer): Define with a prototype.
25444
25445         * lib/regex.c (PARAMS): Remove.  All uses removed.
25446         All uses of _RE_ARGS removed, too.
25447         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
25448         unconditionally.
25449         (bzero): Assume memset exists.
25450         (memcmp, memcpy, NULL): Remove.
25451         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
25452         char, or assignments to local vars of type signed char.
25453         (init_syntax_once, PREFIX(extract_number_and_incr),
25454         PREFIX(print_partial_compiled_pattern),
25455         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
25456         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
25457         PREFIX(regex_grow_registers), PREFIX(regex_compile),
25458         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
25459         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
25460         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
25461         wcs_compile_range, byte_compile_range, truncate_wchar,
25462         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
25463         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
25464         count_mbs_length, wcs_re_match_2_internal,
25465         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
25466         PREFIX(alt_match_null_string_p),
25467         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
25468         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
25469         regfree, PREFIX(extract_number)): Define with prototype.  Remove
25470         now-unnecessary declaration, if any.
25471         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
25472         regcomp, regexec):
25473         Remove now-unnecessary casts among pointer types.
25474         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
25475
25476         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
25477         (free): Remove decl.
25478
25479         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
25480
25481         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
25482         (free): Remove decl.
25483
25484         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
25485         * lib/xgetcwd.c: Likewise.
25486
25487         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
25488         (free): Remove decl.
25489
25490         * lib/strchrnul.c (strchrnul): Define with a prototype.
25491         Fix bug: c_in was not converted to char before searching.
25492
25493         The following changes are not K&R related:
25494
25495         * lib/group-member.h: Include <sys/types.h>, so that this file is
25496         self-contained.
25497         * lib/makepath.h: Likewise.
25498
25499         * lib/getusershell.c (readname, default_index, line_size, readname):
25500         Use size_t, not int, for sizes.
25501         (readname): If the size overflows, report an error instead of
25502         looping forever.
25503
25504 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25505
25506         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
25507         libc.
25508
25509 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25510
25511         * README: New section: portability guidelines.
25512
25513 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25514
25515         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
25516         C89 spec.
25517
25518 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25519
25520         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
25521
25522 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25523
25524         Assume C89 or better; remove K&R cruft.
25525         A few of these changes were first proposed by Derek Robert Price
25526         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
25527
25528         * lib/addext.c: Include <string.h> unconditionally.
25529         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
25530         Don't declare getenv or malloc.
25531
25532         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
25533         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
25534         (NULL): Remove.
25535         (find_stack_direction, alloca): Use prototypes.
25536
25537         * lib/atexit.c (atexit): Define using a prototype.
25538
25539         * lib/basename.c, dirname.c, stripslash.c:
25540         Include <string.h> unconditionally.
25541
25542         * lib/bcopy.c: Include <stddef.h>.
25543         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
25544
25545         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
25546
25547         * lib/error.h (error, error_at_line, error_print_progname)
25548         [! (defined (__STDC__) && __STDC__)]: Remove decls.
25549         * lib/error.c: Include error.h first, to check interface.
25550         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25551         (VA_START): Remove; all uses changeed to va_start.
25552         (exit, strerror): Remove decls.
25553         (error_print_progname): Prototype uncondionally.
25554         Don't include <errno.h>; no longer needed.
25555         (private_strerror): Remove.
25556         (error_tail): Always define.
25557         (error, error_at_line): Assume C89 or better; always use prototypes.
25558         * lib/fatal.c: Include "fatal.h" first, to test interface.
25559         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25560         (VA_START): Remove; all uses changed to va_start.
25561         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
25562         this case.
25563         (exit): Remove decl.
25564         (fatal): Prototype unconditionally.  Assume va_start works.
25565         Abort at end, to pacify gcc.
25566
25567         * lib/euidaccess.c (main): Define with a prototype.
25568
25569         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
25570
25571         * lib/exitfail.c: Include <stdlib.h> unconditionally.
25572
25573         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
25574         prototypes.
25575         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
25576         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
25577         (getenv): Remove decl.
25578         (fnmatch): Define using a prototype.
25579         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
25580         (FCT): Define using a prototype.
25581
25582         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
25583
25584         * lib/gethostname.c: Include <stddef.h>.
25585         (gethostname): Define with prototype.  Length is size_t, not int.
25586
25587 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25588
25589         Assume C89 or better; remove K&R cruft.
25590         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
25591         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
25592         string.h, getenv, malloc.
25593         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
25594         headers.
25595         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
25596         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
25597         do not check for strerror.
25598         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
25599         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
25600         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
25601         do not check for doprnt or vprintf.
25602         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
25603         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
25604
25605 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25606
25607         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
25608         getversion.c should have been removed then, but was accidentally
25609         preserved.
25610
25611         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
25612         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
25613
25614 2003-09-08  Karl Berry  <karl@gnu.org>
25615
25616         * config/config.sub, config.guess, srclistvars.sh: update from savannah
25617                 config, forget about prep.
25618
25619         * config/depcomp, missing: update from automake.
25620
25621 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25622
25623         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
25624         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25625
25626 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25627
25628         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
25629         copy_tm_result.  Bug reported by Simon Josefsson in
25630         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25631
25632 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25633
25634         * m4/time_r.m4: New file.
25635         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
25636         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
25637         is. Check for timegm declaration.
25638         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
25639         Do not check for gmtime_r.
25640         Replace mktime if __mktime_internal does not exist and if mktime
25641         hasn't been replaced already.
25642
25643 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25644
25645         * lib/time_r.c, lib/time_r.h: New files.
25646
25647         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
25648         __localtime_r.
25649         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
25650         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
25651
25652         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
25653         __gmtime_r.
25654         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
25655         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
25656         Include <time_r.h>.
25657
25658         * lib/timegm.c: Switch to glibc implementation, with the following
25659         changes:
25660         [defined HAVE_CONFIG_H]: Include <config.h>.
25661         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
25662         (__mktime_internal) [!defined _LIBC]: New decl.
25663         (__gmtime_r) [!defined _LIBC]: New macro and function.
25664         (timegm): Use a prototype, since gnulib assumes C89.
25665         Do not bother declaring tmp to be const, as it's not really usefu.
25666         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
25667         (timegm): Declare only if HAVE_DECL_TIMEGM.
25668
25669 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25670
25671         * MODULES.html.sh (func_all_modules): Add time_r.
25672         * modules/time_r: New file.
25673         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
25674         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
25675
25676 2003-09-03  Paul Eggert  <eggert@twinsun.com>
25677
25678         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
25679         Bug reported by Lute Kamstra in
25680         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
25681
25682         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
25683         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
25684         course with correspondingly smaller numbers for tomorrow and
25685         yesterday.  From Tadayoshi Funaba.  Originally installed into
25686         sh-utils on 1999-08-07, but the patch got lost (I guess during the
25687         coreutils merge?).
25688
25689 2003-08-31  Simon Josefsson  <jas@extundo.com>
25690
25691         * modules/timegm: New file.
25692         * MODULES.html.sh (func_all_modules): Add timegm.
25693
25694 2003-08-31  Simon Josefsson  <jas@extundo.com>
25695
25696         * m4/timegm.m4: New file.
25697
25698 2003-08-31  Simon Josefsson  <jas@extundo.com>
25699
25700         * lib/timegm.h: New file.
25701         * lib/timegm.c: New file.  Based on
25702         wget-1.8.2/src/http.c:mktime_from_utc.
25703
25704 2003-08-31  Karl Berry  <karl@gnu.org>
25705
25706         * lib/argp.h: update from libc.
25707
25708 2003-08-28  Bruno Haible  <bruno@clisp.org>
25709
25710         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
25711         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
25712         followed by '#define fnmatch fnmatch_posix' gives an error.
25713
25714 2003-08-28  Bruno Haible  <bruno@clisp.org>
25715
25716         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
25717         warning on QNX, which defines O_BINARY to 000000.
25718
25719 2003-08-27  Jim Meyering  <jim@meyering.net>
25720
25721         * m4/mkstemp.m4: Require that the system mkstemp be able to create
25722         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
25723         would fail after 32.  Reported by Danny Levinson.  Details here:
25724         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
25725
25726 2003-08-24  Bruno Haible  <bruno@clisp.org>
25727
25728         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
25729         MSVC7 <stdio.h> is included later.
25730
25731 2003-08-22  Simon Josefsson  <jas@extundo.com>
25732
25733         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
25734
25735 2003-08-20  Karl Berry  <karl@gnu.org>
25736
25737         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
25738
25739 2003-08-20  Bruno Haible  <bruno@clisp.org>
25740
25741         * modules/progname: New file.
25742         * MODULES.html.sh (func_all_modules): Add progname.
25743
25744 2003-08-20  Bruno Haible  <bruno@clisp.org>
25745
25746         * lib/progname.h: New file, from GNU gettext.
25747         * lib/progname.c: New file, from GNU gettext.
25748         * lib/progreloc.c: New file, from GNU gettext.
25749
25750 2003-08-19  Jim Meyering  <jim@meyering.net>
25751
25752         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
25753         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
25754
25755 2003-08-19  Bruno Haible  <bruno@clisp.org>
25756
25757         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
25758         more.
25759
25760 2003-08-19  Bruno Haible  <bruno@clisp.org>
25761
25762         * lib/xstrdup.c: Assume <string.h> exists.
25763
25764 2003-08-18  Paul Eggert  <eggert@twinsun.com>
25765
25766         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
25767         in makefile rules.
25768
25769 2003-08-18  Jim Meyering  <jim@meyering.net>
25770
25771         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
25772         * m4/lib-ld.m4: Likewise.
25773
25774 2003-08-18  Jim Meyering  <jim@meyering.net>
25775
25776         * lib/setenv.h: Indent nested cpp directive.
25777         * lib/vasnprintf.c: Remove trailing blanks.
25778
25779 2003-08-17  Simon Josefsson  <jas@extundo.com>
25780
25781         * modules/xstrndup: New file.
25782         * MODULES.html.sh (func_all_modules): Add xstrndup.
25783
25784 2003-08-17  Simon Josefsson  <jas@extundo.com>
25785
25786         * modules/argp: Fix autoconf macro name. Add more dependencies.
25787
25788 2003-08-17  Simon Josefsson  <jas@extundo.com>
25789
25790         * m4/xstrndup.m4: New file.
25791
25792 2003-08-17  Simon Josefsson  <jas@extundo.com>
25793
25794         * m4/argp.m4: New file.
25795
25796 2003-08-17  Simon Josefsson  <jas@extundo.com>
25797             Bruno Haible  <bruno@clisp.org>
25798
25799         * lib/xstrndup.h: New file.
25800         * lib/xstrndup.c: New file.
25801
25802 2003-08-17  Bruno Haible  <bruno@clisp.org>
25803
25804         * modules/strndup (Files, Include): Add lib/strndup.h.
25805
25806 2003-08-17  Bruno Haible  <bruno@clisp.org>
25807
25808         * modules/euidaccess (Files): Add lib/euidaccess.h.
25809
25810 2003-08-17  Bruno Haible  <bruno@clisp.org>
25811
25812         * lib/strndup.h: New file.
25813
25814 2003-08-17  Bruno Haible  <bruno@clisp.org>
25815
25816         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
25817         like AC_GNU_SOURCE.
25818         * modules/extensions (configure.ac): Comment out the invocation of
25819         gl_USE_SYSTEM_EXTENSIONS.
25820
25821 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25822
25823         Merges from coreutils, etc.
25824         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
25825         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
25826         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
25827         fixing a typo.
25828         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
25829         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
25830
25831 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25832
25833         Document merge from coreutils.
25834         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
25835         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
25836         * modules/utime: Add m4/utimes-null.m4.
25837
25838 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25839
25840         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
25841         space, undoing this 2003-08-12 change:
25842         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25843
25844 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25845
25846         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
25847         strtoul.c from libc, undoing this 2003-08-12 change:
25848         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25849
25850 2003-08-16  Jim Meyering  <jim@meyering.net>
25851
25852         Merges from coreutils.
25853         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
25854         prefix.  Adjust cache variables similarly.  Create 500 rather than
25855         just 300 files, to exercise bug on Darwin6.5, too.
25856         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
25857         $missing_dir.
25858         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
25859         AM_SYS_POSIX_TERMIOS.
25860         Reported by mkc@mathdogs.com.
25861         Also change use of $am_cv_sys_posix_termios
25862         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
25863         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
25864         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
25865         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
25866         in /proc/mounts until it finds one with matching device number.  This
25867         is unnecessary when the FILE argument *is* a mount point.  No stat call
25868         is necessary in that case.  So, disable the statvfs-testing code on
25869         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
25870         as RedHat bug# 84846.
25871         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25872         to 1MB, so as not to render systems with no stack size limit (e.g.,
25873         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25874         Include <unistd.h>.  On some systems,
25875         it is required for the definition of _SC_PAGESIZE.
25876
25877 2003-08-16  Jim Meyering  <jim@meyering.net>
25878
25879         Merge from coreutils.
25880         * lib/xstrtoimax.c: #else #if -> #elif.
25881         * lib/xstrtoumax.c: Likewise.
25882
25883 2003-08-16  Jim Meyering  <jim@meyering.net>
25884
25885         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
25886         * m4/utimes.m4: Removed.
25887         * m4/utimes-null.m4: Renamed from utimes.m4.
25888
25889         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25890         to 1MB, so as not to render systems with no stack size limit (e.g.,
25891         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25892         Include <unistd.h>.  On some systems,
25893         it is required for the definition of _SC_PAGESIZE.
25894
25895 2003-08-16  Jim Meyering  <jim@meyering.net>
25896         and Paul Eggert  <eggert@cs.ucla.edu>
25897
25898         Merges from coreutils, etc.
25899
25900         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
25901         using the latest version from cvs.  This avoids problems with #line
25902         directives using a vendor (Sun) compiler.
25903         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
25904         Don't set GETGROUPS_LIB here; now it's
25905         done via getgroups.m4's wrapper function.
25906         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
25907         rather than just in sh-util/configure.in, so that the
25908         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
25909         same.
25910         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
25911         AC_FUNC_GETLOADAVG where to find getloadavg.c.
25912         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
25913         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
25914         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
25915         Remove code that is now done by the newly-required macros.
25916         Append $(EXEEXT) to DF_PROG.
25917         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
25918         Do not invoke or require the following here,
25919         since prereq.m4 or some gnulib .m4 now does this for us:
25920         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
25921         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
25922         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
25923         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
25924         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
25925         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
25926         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
25927         AC_FUNC_OBSTACK.
25928         Do not replace the following functions, as this is now the job
25929         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
25930         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
25931         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
25932         atexit getpass, strdup, getpagesize.
25933         Replace 'raise'.
25934         Do not check for the following functions, as this is now the job
25935         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
25936         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
25937         setregid.
25938         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
25939         Check for sys/sysctl.h.
25940         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
25941         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
25942         of checking for ssize_t ourselves.
25943
25944         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
25945         Require every macro that gnulib/modules/* suggests for us.
25946         (jm_PREREQ_ADDEXT): New macro.
25947         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
25948         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
25949
25950         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
25951         (gl_PHYSMEM): Use it.
25952         Also check for `table' function.
25953         Check for new headers and functions.
25954         Add check for sys/sysmp.h.
25955         With suggestions from Kaveh Ghazi.
25956         Ignore headers that are present but cannot be compiled.  This
25957         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
25958         C 5.4.
25959
25960 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25961
25962         Document merge from coreutils.
25963         * modules/userspec: Depend on posixver.
25964         * modules/strftime: Depend on tzset.
25965
25966 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25967
25968         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
25969         rather than tab, after '#' in shell-script copyright notices.
25970         Suggested by Bruno Haible.
25971
25972 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25973
25974         * config/srclist-update: Use three spaces, rather than tab, after '#'
25975         in shell-script copyright notices.  Suggested by Bruno Haible.
25976         Remove unnecessary parenthesization in regular expression.
25977
25978 2003-08-15  Jim Meyering  <jim@meyering.net>
25979
25980         Merge from coreutils.
25981         * lib/xgethostname.c: Include <stdlib.h>.
25982         (xghostname): Don't exit for anything other than memory-related
25983         failure; just return NULL.
25984         * lib/userspec.c: Include "posixver.h".
25985         (parse_user_spec): Accept `.' as a separator only
25986         in pre-POSIX-200112 mode.
25987         * lib/strtoimax.c: Use #elif rather than #else #if.
25988         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
25989         Remove function, now that we can rely on a working tzset function.
25990         [!_LIBC]: Ensure that the required autoconf test has been run.
25991         [!defined _NL_CURRENT && HAVE_STRFTIME]:
25992         Use underlying_strftime for %r.
25993         * lib/sha.c: Merge in some clean-up and optimization changes from
25994         glibc.
25995         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
25996         Ensure that it is a multiple of 64.
25997         Rearrange loop exit tests so as to avoid performing an
25998         additional fread after encountering an error or EOF.
25999         * lib/realloc.c: Update copyright date.
26000
26001 2003-08-15  Jim Meyering  <jim@meyering.net>
26002         and Paul Eggert  <eggert@twinsun.com>
26003
26004         Merge from coreutils.
26005         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
26006         member but strut utmpx does not.  Needed for AIX 4.3.3.
26007         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
26008
26009 2003-08-15  Jim Meyering  <jim@meyering.net>
26010         and Paul Eggert  <eggert@cs.ucla.edu>
26011
26012         Merges from coreutils, etc.
26013         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
26014         Require gl_FUNC_TZSET_CLOBBER.
26015         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
26016         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
26017         members.
26018
26019 2003-08-14  Paul Eggert  <eggert@twinsun.com>
26020
26021         Help the merge from coreutils.
26022         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
26023         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
26024         * m4/tzset.m4: Use it too.
26025
26026 2003-08-14  Paul Eggert  <eggert@twinsun.com>
26027
26028         * modules/tzset: New file.
26029
26030 2003-08-14  Jim Meyering  <jim@meyering.net>
26031
26032         Merges from coreutils.
26033         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
26034         variable names, rather than @FNMATCH_H@.
26035         * modules/alloca: Likewise for $(ALLOCA_H).
26036
26037         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
26038         the three copies of the literal target, `fnmatch.h'.
26039         * modules/alloca (alloca.h): Likewise.
26040
26041 2003-08-14  Jim Meyering  <jim@meyering.net>
26042
26043         Merge from coreutils.
26044         * m4/tzset.m4: New file.
26045         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
26046         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
26047         otherwise, AIX 5.1 systems would end up using the latter.
26048         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
26049         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
26050         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
26051         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
26052
26053 2003-08-14  Jim Meyering  <jim@meyering.net>
26054
26055         Merge from coreutils.
26056         * lib/obstack.h: Whitespace changes.
26057         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
26058         and xcalloc return values.
26059         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
26060         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
26061         hang on OSF/1 5.1 for DIR on both local and remote file systems.
26062         Reported by (and fix confirmed by) Nelson H. F. Beebe.
26063         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26064         error from mntctl.
26065         Use mntctl's return value to drive the entry-processing loop, since
26066         we can't rely on the value of the vmt_length member in the last
26067         entry.  On some systems doing so could result in exhausting
26068         virtual memory.  Based in part on a patch from Mike Jetzer.
26069
26070 2003-08-14  Jim Meyering  <jim@meyering.net>
26071         and Paul Eggert  <eggert@twinsun.com>
26072
26073         Merges from coreutils, plus other fixes.
26074         * lib/physmem.c: Merge in portability changes from gcc/libiberty
26075         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
26076         for credits and details.  Thanks to Kaveh Ghazi for helping
26077         to keep these files in sync.
26078         (ARRAY_SIZE): Define it.
26079         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
26080         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
26081         (memcasecmp): Don't assume size_t fits in unsigned int.
26082         Remove casts and duplicate code.
26083         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
26084         (memcpy): Remove definition.
26085         Merge in some clean-up and optimization changes from glibc.
26086         [BLOCKSIZE]: Move definition to top of file.
26087         Ensure that it is a multiple of 64.
26088         Rearrange loop exit tests so as to avoid performing an
26089         additional fread after encountering an error or EOF.
26090         * lib/md5.h (md5_uintptr): Define.
26091         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
26092         return to the initial working directory.  Preserve errno
26093         for caller.
26094         * lib/idcache.c: Include "xalloc.h".
26095         (xmalloc, xrealloc): Remove decls.
26096         (getuser): Remove casts no longer required in C89.
26097         * lib/human.c: Include stdio.h, for sprintf.
26098         * lib/group-member.c: Include "xalloc.h".
26099         (xmalloc, xrealloc): Remove decls.
26100         (get_group_info): Remove casts no longer required in C89.
26101         * lib/getusershell.c (readname): Remove casts no longer required in
26102         C89.
26103         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
26104         * lib/getline.c: Whitespace fix, from coreutils.
26105
26106 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26107
26108         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
26109         Check for isascii.
26110
26111         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26112         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26113         Undo previous (whitespace-only) change.
26114
26115 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26116
26117         * lib/exclude.c: Include <ctype.h>
26118         (IN_CTYPE_DOMAIN): New macro.
26119         (is_space): New fn.
26120         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
26121         and empty lines.
26122
26123         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26124         Undo previous (whitespace-only) change.
26125
26126 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26127
26128         * config/srclist-update: Change update back to the old behavior,
26129         leaving whitespace alone.  Use one 'sed' command rather than a
26130         pipeline.
26131         (fixlicense): Now a variable, not a function.
26132         (remove_trailing_blanks): Remove.
26133         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
26134         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26135         Undo previous (whitespace-only) change.
26136
26137 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26138
26139         Merge from coreutils.
26140         * modules/euidaccess: Add lib_SOURCES, include for new
26141         file euidaccess.h
26142
26143 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26144
26145         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26146         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26147         Normalize leading white space and remove trailing white space.
26148
26149         Merge from coreutils
26150         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
26151
26152         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
26153         0.12.1.  These files are now being upgraded automatically by
26154         ../config/srclist-update.
26155
26156 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26157
26158         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26159         Normalize leading white space and remove trailing white space.
26160         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
26161         notice, as per ../config/srclist-update.
26162
26163         Merge from coreutils.
26164         * lib/euidaccess.h: New file.
26165         * lib/euidaccess.c: Include it.
26166         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
26167         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
26168         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
26169
26170 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26171
26172         * config/srclist-update: Add copyright notice.
26173         (remove_id_lines, remove_trailing_blanks): New constants.
26174         (fixfile): Use them to normalize spacing a bit in copied files.
26175         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26176         Normalize leading white space and remove trailing white space.
26177
26178         * config/texinfo.tex: Sync with texinfo.
26179
26180         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
26181         strtoul.c from libc, to merge coreutils whitespace changes.
26182
26183         * config/srclist.txt: Get the following m4 files from gettext:
26184         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
26185         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
26186         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
26187         wint_t.m4.
26188
26189 2003-08-12  Karl Berry  <karl@gnu.org>
26190
26191         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
26192         been made.
26193
26194 2003-08-11  Paul Eggert  <eggert@twinsun.com>
26195
26196         * modules/gnu-source, m4/gnu-source.m4:
26197         Remove; we're assuming Autoconf 2.54 or later now.
26198         Suggested by Bruno Haible.
26199         * MODULES.html.sh (func_all_modules): Remove gnu-source.
26200
26201 2003-08-11  Bruno Haible  <bruno@clisp.org>
26202
26203         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
26204
26205 2003-08-11  Bruno Haible  <bruno@clisp.org>
26206
26207         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
26208         (vasnprintf): Use it instead of wcslen.
26209
26210 2003-08-11  Bruno Haible  <bruno@clisp.org>
26211
26212         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
26213         value to ensure that _Bool promotes to int. Use #define for _Bool when
26214         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
26215
26216 2003-08-10  Karl Berry  <karl@gnu.org>
26217
26218         * lib/regex.h: update from libc (whitespace fix).
26219
26220 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26221
26222         Merge some files from coreutils.  These changes were
26223         originally made by Jim Meyering.
26224         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
26225         many older Unixes require this.
26226         * lib/alloca.c (alloca): Remove cast to argument of free;
26227         no longer needed in C89.
26228         * lib/alloca_.h, regex.h: Fix white space to match
26229         what GNU indent does.
26230
26231 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26232
26233         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
26234         apparently Emacs's Unicode mode got confused before my 2003-08-05
26235         checkin.
26236
26237 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26238
26239         * m4/extensions.m4: New file.
26240         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
26241         Require gl_USE_SYSTEM_EXTENSIONS.
26242         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
26243         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
26244
26245 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26246
26247         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
26248         * modules/extensions, modules/gnu-source: New files.
26249         * modules/timespec, modules/unlocked-io: Depend on extensions.
26250
26251 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26252
26253         * modules/restrict: New file.
26254         * MODULES.html.sh (func_all_modules): Add restrict.
26255         * modules/regex: Depend on restrict.
26256
26257 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26258
26259         * m4/restrict.m4: New file.
26260         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
26261
26262 2003-08-07  Bruno Haible  <bruno@clisp.org>
26263
26264         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
26265         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
26266
26267 2003-08-07  Bruno Haible  <bruno@clisp.org>
26268
26269         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
26270         makes the module 'getndelim2' compatible with the module 'getline'.
26271
26272 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26273
26274         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
26275         byte with "\201" to avoid glitches when editing that source file
26276         with multi-gnome-terminal.
26277
26278 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26279
26280         * lib/bumpalloc.h: Remove.
26281
26282 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26283
26284         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
26285         * modules/bumpalloc: Remove.
26286
26287 2003-08-04  Paul Eggert  <eggert@twinsun.com>
26288
26289         * lib/getloadavg.c: Change copyright notice and spacing to conform to
26290         GNU coding style.
26291
26292         Merge from coreutils.
26293         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
26294         1. From glibc.
26295         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
26296         from Karl Berry, implemented by Jim Meyering.
26297         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
26298         from Dmitry V. Levin.
26299         Remove anachronistic cast of xrealloc.
26300         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
26301         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
26302         type. Otherwise, it wouldn't compile with at least /bin/cc on
26303         ymp-cray-unicos9.0.2.X.
26304         Combine two mostly-identical uses of alloca into one.
26305         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
26306
26307 2003-08-04  Dave Love  <d.love@dl.ac.uk>
26308
26309         [From Emacs.]
26310
26311         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
26312         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
26313         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
26314         obsolete NLIST_NAME_UNION.
26315         [__GNU__]: Undef BSD and FSCALE.
26316         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
26317
26318 2003-08-03  Paul Eggert  <eggert@twinsun.com>
26319
26320         * lib/stdbool_.h (_Bool): Make it signed char, instead of
26321         an enum type, so that it's guaranteed to promote to int.  See:
26322         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
26323
26324 2003-08-03  Karl Berry  <karl@gnu.org>
26325
26326         * config/depcomp: update from automake.
26327
26328 2003-07-31  Paul Eggert  <eggert@twinsun.com>
26329
26330         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
26331         (strerror): Don't assume that a printable int fits in 14 bytes.
26332
26333 2003-07-31  Bruno Haible  <bruno@clisp.org>
26334
26335         * modules/getpass-gnu: New file.
26336         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
26337
26338 2003-07-31  Bruno Haible  <bruno@clisp.org>
26339
26340         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
26341
26342 2003-07-24  Karl Berry  <karl@gnu.org>
26343
26344         * config/missing: update from automake.
26345
26346 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
26347             Bruno Haible  <bruno@clisp.org>
26348
26349         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
26350         * lib/getline.c (getline, getdelim): Likewise.
26351         Remove _GNU_SOURCE define; now it's defined in config.h through
26352         m4/getline.m4.
26353
26354 2003-07-23  Karl Berry  <karl@gnu.org>
26355
26356         * config/config.sub: update from prep.
26357
26358 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26359
26360         * modules/xalloc (Depends-on): Add exitfail.
26361         * modules/xmemcoll: Likewise.
26362
26363 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26364
26365         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
26366         over-parenthesization in macros.
26367
26368         Sync with coreutils.
26369
26370         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
26371         required by C99.
26372
26373         Use `exit_failure' for xalloc and xmemcoll instead of their own
26374         private exit-failure variables.
26375         * lib/xalloc.h (xalloc_exit_failure): Remove.
26376         * lib/xmalloc.c: Likewise.  Include exitfail.h.
26377         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
26378         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
26379         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
26380         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
26381
26382 2003-07-20  Jim Meyering  <jim@meyering.net>
26383
26384         * modules/closeout (Depends-on): Add exitfail.
26385         Suggestion from Bruno Haible.
26386
26387 2003-07-19  Karl Berry  <karl@gnu.org>
26388
26389         * config/config.sub: update from prep.
26390
26391 2003-07-18  Paul Eggert  <eggert@twinsun.com>
26392
26393         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
26394         Remove.
26395         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
26396         to test that it can stand by itself.  Include "exitfail.h".
26397         Clients should set exit_failure instead.
26398         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
26399
26400 2003-07-18  Bruno Haible  <bruno@clisp.org>
26401
26402         * modules/getndelim2: New file.
26403         * modules/getline: Share files with module getndelim2.
26404         * modules/getnline: Depend on getndelim2 instead of sharing files with
26405         it. Add getnline.c to lib_SOURCES.
26406         * MODULES.html.sh (func_all_modules): Add getndelim2.
26407
26408 2003-07-18  Bruno Haible  <bruno@clisp.org>
26409
26410         * m4/getndelim2.m4: New file.
26411         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
26412         invoke gl_PREREQ_GETNDELIM2.
26413         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
26414         gl_PREREQ_GETNDELIM2.
26415         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
26416         gl_GETNDELIM2.
26417
26418 2003-07-18  Bruno Haible  <bruno@clisp.org>
26419
26420         * lib/getndelim2.h: New file.
26421         * lib/getndelim2.c: Make into a module of its own. Include config.h,
26422         getndelim2.h.
26423         (getndelim2): Make non-static. Change return type to ssize_t.
26424         * lib/getline.h: Change argument names.
26425         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
26426         * lib/getnline.c: Include getndelim2.h.
26427
26428 2003-07-18  Andreas Schwab  <schwab@suse.de>
26429
26430         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
26431
26432 2003-07-17  Karl Berry  <karl@gnu.org>
26433
26434         * config/config.sub: update from prep.
26435
26436 2003-07-17  Bruno Haible  <bruno@clisp.org>
26437
26438         * modules/getnline: New file.
26439         * modules/getline: Add lib/getndelim2.c to source file list.
26440         * MODULES.html.sh (func_all_modules): Add getnline.
26441
26442 2003-07-17  Bruno Haible  <bruno@clisp.org>
26443
26444         * m4/getnline.m4: New file.
26445
26446 2003-07-17  Bruno Haible  <bruno@clisp.org>
26447
26448         * m4/Makefile.am.in: Remove file.
26449         * m4/Makefile.am: Remove file.
26450         * m4/Makefile.in: Remove file.
26451
26452 2003-07-17  Bruno Haible  <bruno@clisp.org>
26453
26454         * lib/getnline.h: New file.
26455         * lib/getnline.c: New file.
26456         * lib/getndelim2.c: New file, extracted from getline.c.
26457         (getndelim2): Renamed from getdelim2, with added nmax argument.
26458         * lib/getline.c: Include getndelim2.c.
26459         (getdelim2): Moved out to getndelim2.c.
26460         (getline, getdelim): Update.
26461
26462 2003-07-17  Bruno Haible  <bruno@clisp.org>
26463
26464         * lib/Makefile.am: Remove file.
26465         * lib/Makefile.in: Remove file.
26466
26467 2003-07-17  Bruno Haible  <bruno@clisp.org>
26468
26469         * configure.in: Remove file.
26470         * Makefile.in: Remove file.
26471
26472 2003-07-17  Bruno Haible  <bruno@clisp.org>
26473
26474         * MODULES.html.sh: Put the </BODY> right before </HTML>.
26475
26476 2003-07-16  Karl Berry  <karl@gnu.org>
26477
26478         * config/srclist-update: was running fixlicense twice, which caused
26479                 texinfo.tex to be nullified for some reason.  Simplify,
26480                 $gplsrc is no longer needed as far as I can see?
26481
26482 2003-07-16  Jim Meyering  <jim@meyering.net>
26483
26484         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
26485
26486 2003-07-15  Paul Eggert  <eggert@twinsun.com>
26487
26488         * config/srclist.txt: Get the following files from gettext-runtime/intl
26489         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
26490         ref-del.sin.  From Bruno Haible.
26491         * config/srclist-update (fixfile): Change grep pattern again, since the
26492         previous fix didn't work (there was another trailing $).  Use
26493         '[$]' to escape the $s.
26494
26495 2003-07-15  Karl Berry  <karl@gnu.org>
26496
26497         * lib/vasnprintf.c: update from gettext.
26498
26499 2003-07-15  Karl Berry  <karl@gnu.org>
26500
26501         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
26502         gets expanded when surrounded by '$'.
26503
26504 2003-07-15  Jim Meyering  <jim@meyering.net>
26505
26506         * modules/save-cwd: Don't depend on error.  From Derek Price.
26507
26508 2003-07-15  Jim Meyering  <jim@meyering.net>
26509
26510         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
26511
26512 2003-07-14  Simon Josefsson  <jas@extundo.com>
26513
26514         * modules/mempcpy: New file.
26515         * MODULES.html.sh (func_all_modules): Add mempcpy.
26516
26517 2003-07-14  Simon Josefsson  <jas@extundo.com>
26518
26519         * m4/mempcpy.m4: New file.
26520
26521 2003-07-14  Simon Josefsson  <jas@extundo.com>
26522
26523         * lib/mempcpy.h: New file.
26524         * lib/mempcpy.c: New file.
26525
26526 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26527
26528         * modules/getdate, modules/posixtm: Depend on mktime.
26529
26530 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26531
26532         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
26533         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
26534         unicodeio.c, unicodeio.h, unlocked-io.h:
26535         Switch from LGPL to GPL.
26536
26537 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26538
26539         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
26540         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
26541         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
26542         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
26543         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
26544         updated automatically by ../config/srclist-update.  This changes
26545         their license from LPGL to GPL.
26546
26547 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26548
26549         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
26550         assumed to refer to the root of the most recent stable gettext version.
26551         * config/srclistvars.sh: Add defaults for eggert.
26552         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
26553         Match "This program" as well as "The program".  This is needed
26554         for gettext.
26555
26556 2003-07-14  Jim Meyering  <jim@meyering.net>
26557
26558         Don't emit diagnostics.  Let callers do that.
26559         * lib/save-cwd.c: Don't include "error.h".
26560         (save_cwd): Don't call error.  Ensure that errno is valid
26561         when returning nonzero.
26562
26563         * lib/save-cwd.h (restore_cwd): Update prototype.
26564         * lib/save-cwd.c (restore_cwd): Remove two parameters.
26565         Simplify.  Don't call error upon failure.  Let callers do that.
26566         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
26567         when auditing is enabled.  But don't bother updating the #if.
26568
26569 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
26570
26571         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
26572         it breaks C++ compilation.
26573         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
26574
26575 2003-07-10  Simon Josefsson  <jas@extundo.com>
26576
26577         * modules/strchrnul (Makefile.am): Add strchrnul.h.
26578
26579 2003-07-10  Jim Meyering  <jim@meyering.net>
26580
26581         * m4/clock_time.m4: Remove trailing blank.
26582         * m4/intmax_t.m4: Likewise.
26583
26584 2003-07-10  Jim Meyering  <jim@meyering.net>
26585
26586         * lib/vasnprintf.c: Remove trailing blanks.
26587         Make cpp indentation consistent.
26588
26589 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26590
26591         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
26592         posixver.c, strftime.c, strnlen.c, strverscmp.c:
26593         Switch from LGPL to GPL.
26594
26595 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26596
26597         * config/srclist.txt: Sort sublists.  Add
26598         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
26599         that differ from gnulib for one reason or another; we'd like this list
26600         to be smaller but for now let's document what we have.
26601
26602 2003-07-08  Paul Eggert  <eggert@twinsun.com>
26603
26604         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
26605         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
26606         and sweeter "eval x=$x".
26607         * config/srclist.txt: Get lib/argp* from glibc.
26608
26609 2003-07-07  Paul Eggert  <eggert@twinsun.com>
26610
26611         * lib/mktime.c: Fix some boundary cases and remove need for floating
26612         point.
26613
26614         Issue a compile-time diagnostic if time_t is floating point, or if
26615         two's complement arithmetic is not in effect, or if arithmetic
26616         right shift does not propagate the sign.  These assumptions were
26617         all in the original code but they weren't checked.
26618
26619         (TIME_T_MIDPOINT, verify): New macros.
26620         (__isleap): Remove; it has integer overflow problems.
26621         (leapyear): New function, without those problems.
26622         (ydhms_tm_diff): Remove; splitting into two parts.
26623         (ydhms_diff): New function, containing the arithmetic part of
26624         the old ydhms_tm_diff function.  Issue a compile-time
26625         diagnostic if we are not using C99 integer division.
26626         Avoid casts when possible.
26627         (guess_time_tm): New function, containing the checking part of
26628         the old ydhms_tm_diff function.  Return the new value, rather than
26629         the difference between it and the old.  Accept a new argument T
26630         so that *T specifies the old value.  Check for overflow in the result.
26631
26632         (__mktime_internal): Use a time_t offset, not a long int offset.
26633         This undoes the 2003-06-04 change, which is no longer needed now
26634         that we have better overflow checking.
26635         (localtime_offset): Likewise.
26636
26637         (__mktime_internal): Avoid harmful overflow on hosts where time_t
26638         and long are 64-bit but int is only 32-bit.
26639         (ydhms_diff): Use long int to store year1 and yday1.
26640         Issue a compile-time diagnostic if long int is not wide enough.
26641
26642         (__mktime_internal): Use long int to store adjusted year and yday.
26643         Use plain C rather than preprocessor commands, if that doesn't
26644         affect efficiency.
26645         Check for overflow (and try to repair) after each probe
26646         rather than checking only at the very end.  This avoids some bugs
26647         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
26648         does not equal GMT offset at maximum time).
26649         Use integer to check for overflow rather than floating point; this
26650         is more portable to non-IEEE hosts, and is a tad faster.
26651         When we detect that we are oscillating between two values,
26652         don't check whether tm_isdst has the requested value, since
26653         we already know the answer.  When tm_isdst has the wrong value,
26654         use a different heuristic to find the right one, based on the
26655         extreme values actually observed in practice in tz2003a,
26656         rather than the (overly optimistic) "previous 3 calendar quarters".
26657
26658         (not_equal_tm, print_tm, check_result): Use "const T" rather than
26659         "T const" to accommodate glibc style.
26660         (check_result): Use less-confusing report format.  "long" -> "long int.
26661         (main): Likewise.
26662         Don't loop if the iteration overflows time_t.
26663         Allow a negative step in the iteration.
26664
26665 2003-07-06  Karl Berry  <karl@gnu.org>
26666
26667         * config/depcomp: update from automake.
26668         * config/config.sub: update from prep.
26669
26670 2003-07-03  Karl Berry  <karl@gnu.org>
26671
26672         * config/config.guess: update from prep.
26673
26674 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26675
26676         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
26677         xreadlink.c now includes it unconditionally.
26678
26679 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26680
26681         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
26682         having it depend on HAVE_SYS_TYPES_H.
26683
26684 2003-07-01  Bruno Haible  <bruno@clisp.org>
26685
26686         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
26687         <sys/types.h> should be sufficient.
26688         Reported by Paul Eggert.
26689
26690 2003-06-26  Karl Berry  <karl@gnu.org>
26691
26692         * config/depcomp: update from automake.
26693
26694 2003-06-26  Bruno Haible  <bruno@clisp.org>
26695
26696         * modules/human: Depend on module stdbool.
26697
26698 2003-06-25  Bruno Haible  <bruno@clisp.org>
26699
26700         * modules/readlink: New file.
26701         * modules/xreadlink: Depend on it.
26702         * MODULES.html.sh (func_all_modules): Add readlink.
26703
26704 2003-06-25  Bruno Haible  <bruno@clisp.org>
26705
26706         * m4/readlink.m4: New file.
26707
26708 2003-06-25  Bruno Haible  <bruno@clisp.org>
26709
26710         * lib/readlink.c: New file.
26711
26712 2003-06-22  Karl Berry  <karl@gnu.org>
26713
26714         * config/srclist.txt: update mkinstalldirs from automake.
26715         * config/mkinstalldirs: update.
26716
26717 2003-06-22  Bruno Haible  <bruno@clisp.org>
26718
26719         Portability to mingw32.
26720         * m4/ssize_t.m4: New file, from GNU gettext.
26721         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
26722         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
26723
26724 2003-06-22  Bruno Haible  <bruno@clisp.org>
26725
26726         * modules/safe-read: Add m4/ssize_t.m4.
26727         * modules/xreadlink: Add m4/ssize_t.m4.
26728
26729 2003-06-20  Bruno Haible  <bruno@clisp.org>
26730
26731         Assume C89, so PARAMS isn't needed.
26732         * lib/unicodeio.h (PARAMS): Remove.
26733         * lib/unicodeio.c: Don't use PARAMS.
26734
26735 2003-06-18  Karl Berry  <karl@gnu.org>
26736
26737         * config/config.{guess,sub}: update from prep.
26738
26739 2003-06-18  Jim Meyering  <jim@meyering.net>
26740
26741         Merge changes from coreutils.
26742         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
26743         Remove explicit declarations of xmalloc and realloc.
26744         Include xalloc.h.
26745         (read_utmp): Remove anachronistic cast of xmalloc.
26746
26747 2003-06-17  Paul Eggert  <eggert@twinsun.com>
26748
26749         Assume C89, so PARAMS isn't needed.
26750         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
26751         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
26752         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
26753         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
26754         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
26755         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
26756         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
26757         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
26758         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
26759         lib/xstrtod.h, lib/xstrtol.h: Likewise.
26760         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
26761         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
26762         no longer needed. Anyway, config.h should always be included before any
26763         other file.
26764
26765 2003-06-11  Simon Josefsson  <jas@extundo.com>
26766
26767         * modules/sysexits: New file.
26768         * MODULES.html.sh (func_all_modules): Add sysexits.
26769
26770 2003-06-11  Simon Josefsson  <jas@extundo.com>
26771
26772         * lib/sysexit_.h: New file.
26773
26774 2003-06-11  Derek Price  <derek@ximbiot.com>
26775
26776         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
26777         necessary.
26778
26779 2003-06-11  Bruno Haible  <bruno@clisp.org>
26780
26781         * m4/sysexits.m4: New file.
26782
26783 2003-06-10  Simon Josefsson  <jas@extundo.com>
26784
26785         * lib/argp.h: New file, from glibc.
26786         * lib/argp-ba.c: New file, from glibc.
26787         * lib/argp-eexst.c: New file, from glibc.
26788         * lib/argp-fmtstream.c: New file, from glibc.
26789         * lib/argp-fmtstream.h: New file, from glibc.
26790         * lib/argp-fs-xinl.c: New file, from glibc.
26791         * lib/argp-help.c: New file, from glibc.
26792         * lib/argp-namefrob.h: New file, from glibc.
26793         * lib/argp-parse.c: New file, from glibc.
26794         * lib/argp-pv.c: New file, from glibc.
26795         * lib/argp-pvh.c: New file, from glibc.
26796         * lib/argp-xinl.c: New file, from glibc.
26797
26798 2003-06-10  Simon Josefsson  <jas@extundo.com>
26799
26800         * modules/strchrnul: New file.
26801
26802 2003-06-10  Simon Josefsson  <jas@extundo.com>
26803
26804         * modules/argp: New file.
26805
26806 2003-06-10  Simon Josefsson  <jas@extundo.com>
26807
26808         * m4/strchrnul.m4: New file.
26809
26810 2003-06-10  Simon Josefsson  <jas@extundo.com>
26811
26812         * lib/strchrnul.h: New file.
26813         * lib/strchrnul.c: New file.
26814
26815 2003-06-10  Bruno Haible  <bruno@clisp.org>
26816
26817         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
26818
26819 2003-06-07  Karl Berry  <karl@gnu.org>
26820
26821         * config/config.{guess,sub}: update from prep.
26822
26823 2003-06-07  Jim Meyering  <jim@meyering.net>
26824
26825         * modules/strtod: Use $(...) notation, not @...@ for
26826         AC_REPLACE'd variables.
26827         * modules/localcharset: Likewise.
26828
26829 2003-06-07  Jim Meyering  <jim@meyering.net>
26830
26831         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
26832         in place of my name in the copyright comment.
26833         Remove definition and uses of __P.
26834
26835         From coreutils.
26836         * lib/stat.c: Don't declare xmalloc explicitly.
26837         Instead, include "xalloc.h".
26838         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
26839         xrealloc, and xcalloc return values.
26840         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
26841         Improve comment.
26842         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
26843
26844 2003-06-07  Bruno Haible  <bruno@clisp.org>
26845
26846         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
26847         avoid AC_CONFIG_LINKS.
26848         * modules/fnmatch (Makefile.am): Use explicit creation rule for
26849         fnmatch.h, to avoid AC_CONFIG_LINKS.
26850         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
26851
26852 2003-06-07  Bruno Haible  <bruno@clisp.org>
26853
26854         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
26855         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
26856         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26857         directory.
26858         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
26859         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26860         directory.
26861
26862 2003-06-06  Jim Meyering  <jim@meyering.net>
26863
26864         Merge from coreutils.
26865         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
26866         Consolidate declarations and initializations of *_base* locals.
26867
26868         Merge from coreutils.
26869         This avoids a core dump on systems without GNU putenv,
26870         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
26871         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
26872         (unsetenv): New static function, from GNU libc.
26873         (rpl_putenv): Use it.
26874
26875         * lib/modechange.c: Remove trailing blanks.
26876
26877         Merge from coreutils.
26878         * lib/fsusage.c: Remove declaration of statfs.
26879         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
26880
26881         * lib/posixtm.c: Include <stdbool.h> unconditionally.
26882
26883 2003-06-06  Jim Meyering  <jim@meyering.net>
26884
26885         * lib/stdbool_.h: Renamed from stdbool.h.in.
26886
26887 2003-06-06  Jim Meyering  <jim@meyering.net>
26888             Bruno Haible  <bruno@clisp.org>
26889
26890         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
26891         Adjust Makefile.am snippet not to redirect directly to target.
26892         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
26893
26894 2003-06-05  Paul Eggert  <eggert@twinsun.com>
26895
26896         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
26897         mismatch, look in future quarters as well as past.  This fixes a
26898         bug when processing fall-backwards gaps immediately after a long
26899         period of daylight-saving time.
26900
26901         * lib/mktime.c: Assume freestanding C89 or better.
26902         (HAVE_LIMITS_H): Remove.  Assume it's 1.
26903         (__P): Remove; not used.
26904         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
26905         (mktime, not_equal_tm, print_tm, check_result,
26906         main): Use prototypes.  Use const * where appropriate.
26907         (main): Fix typo in testing code that uncovered by above changes.
26908         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
26909
26910 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26911
26912         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
26913         locale.h, localeconv.  This merges changes from coreutils.
26914
26915         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
26916         It can be removed after the next Autoconf is released.
26917         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
26918         needed.
26919
26920 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26921
26922         * lib/mktime.c: Fix Debian bug 177940
26923         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
26924         (localtime_offset): Now long int, not time_t, because we want it
26925         to be guaranteed to be signed.  All uses changed.
26926         (__mktime_internal): If overflow would occur when adding offset,
26927         don't add it.
26928
26929         Merge 'human' changes from coreutils.  Rewrite to support
26930         locale-specific notations like thousands separators.
26931         * lib/human.c: Simplify authorship notice.
26932         Include human.h immediately after config.h.
26933         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
26934         <limits.h>: Do not include, since human.h does.
26935         (SIZE_MAX, UINTMAX_MAX): New macros.
26936         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
26937         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
26938         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
26939         (power_letter): Renamed from suffixes.
26940         (generate_suffix_backwards): Remove.
26941         (adjust_value): Now takes int style (because of human.h changes)
26942         and long double value (for greater precision on some platforms).
26943         (group_number): New function.
26944         (human_readable): Use it.  Use integer options, not enum.
26945         Put the options before the sizes in the arg list.
26946         Support all the new options.
26947         The old human_readable function has been removed;
26948         use inttostr.h instead.
26949         (human_readable, default_block_size, humblock):
26950         Use uintmax_t, not int, for block sizes.
26951         (human_readable_inexact, block_size_types): Remove.
26952         (block_size_opts): New constant.
26953         (human_options): Renamed from human_block_size, with new signature
26954         that allows block sizes up to UINTMAX_MAX.  All callers changed.
26955         * lib/human.h: Add copyright and authorship notice.
26956         Include <limits.h> and <stdbool.h> unconditionally.
26957         (PARAMS): Remove.  All uses removed.
26958         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
26959         (enum human_inexact_style): Remove tag; now a nameless enum.
26960         (human_floor, human_ceiling, human_round_to_even): Now have
26961         values 2, 0, 1 rather than -1, 1, 0.
26962         (human_group_digits, human_suppress_point_zero, human_autoscale,
26963         human_base_1024, human_SI, human_B): New constants.
26964         (human_readable_inexact, human_block_size): Remove.
26965         (human_readable): Size args are now uintmax_t, not int.
26966         (human_options): New decl.
26967
26968         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
26969         unnecessary now that we assume C89 or better.  This change
26970         imported from coreutils.
26971
26972         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26973         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
26974         in the 2003-05-30 sync from glibc.
26975
26976         .h files should stand alone, but we shouldn't include <sys/types.h>
26977         if we can get away with just <stddef.h>.
26978
26979         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
26980         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
26981         rather than <sys/types.h>, as we merely need size_t.
26982         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
26983         to get size_t.
26984         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
26985         Include <stdio.h>, to get FILE.
26986         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
26987         memcasecmp.h has included <stddef.h> and all we need is size_t.
26988         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
26989         our interface, instead of including <sys/types.h>
26990
26991 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26992
26993         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
26994         now, as glibc mktime is buggy on non-glibc systems.
26995
26996 2003-06-03  Karl Berry  <karl@gnu.org>
26997
26998         * config/config.sub: update from prep.
26999
27000 2003-06-02  Paul Eggert  <eggert@twinsun.com>
27001
27002         [from coreutils]
27003         Fix some minor time-related bugs with POSIX time arguments.
27004         Some valid time stamps were being rejected (notably -1, and
27005         time stamps before 1900 on 64-bit hosts).  And some invalid
27006         time stamps were being accepted, e.g. September 31.
27007
27008         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
27009         that we can return (time_t) -1 successfully.
27010         * lib/posixtm.c: Likewise.
27011         [HAVE_STDBOOL_H]: Include <stdbool.h>.
27012         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
27013         (t): Remove static var.
27014         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
27015         of static var.  All uses changed.
27016         (year): Do not reject years before 1900; they can occur with
27017         64-bit time_t.
27018         (posix_time_parse): Do not check for out-of-range components;
27019         that is now the caller's responsibility, since our checks were
27020         only approximations.
27021         (posixtime): Use mktime to check for out-of-range components,
27022         since it knows them exactly.
27023         If mktime returns (time_t) -1, check whether an error actually occurred
27024         by invoking localtime on -1.
27025         (main) [TEST_POSIXTIME]: Check for input data errors, and report
27026         posixtime failures better.
27027         Improve the test data (in comments only).
27028
27029 2003-06-02  Karl Berry  <karl@gnu.org>
27030
27031         * config/mkinstalldirs (version): new variable.
27032         (--version): new option.
27033         (usage): improve message.
27034
27035 2003-05-30  Karl Berry  <karl@gnu.org>
27036
27037         * lib/mktime.c: update from libc.
27038
27039 2003-05-30  Bruno Haible  <bruno@clisp.org>
27040
27041         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
27042         * config/config.rpath: Upgrade to gettext-0.12.1.
27043
27044 2003-05-30  Bruno Haible  <bruno@clisp.org>
27045
27046         * m4/gettext.m4: Upgrade to gettext-0.12.1.
27047         * m4/nls.m4: New file, from gettext-0.12.1.
27048         * m4/po.m4: New file, from gettext-0.12.1.
27049         * m4/progtest.m4: Upgrade to gettext-0.12.1.
27050
27051 2003-05-30  Bruno Haible  <bruno@clisp.org>
27052
27053         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
27054         * lib/localcharset.h: Likewise.
27055         * lib/localcharset.c: Likewise.
27056
27057 2003-05-29  Karl Berry  <karl@gnu.org>
27058
27059         * config/config.rpath: update from gettext.
27060
27061 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27062
27063         Assume the headers required for C89 freestanding compilers.
27064         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
27065         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
27066         * m4/human.m4 (gl_HUMAN): Likewise.
27067         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
27068         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
27069         * m4/userspec.m4 (gl_USERSPEC): Likewise.
27070         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
27071         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
27072         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
27073
27074 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27075
27076         Assume the headers required for C89 freestanding compilers.
27077         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
27078         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
27079         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
27080         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
27081         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
27082         define, since <limits.h> is guaranteed to do that.
27083         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
27084         * lib/exclude.c: Include <stdbool.h> unconditionally.
27085         * lib/tempname.c: Include <stddef.h> unconditionally.
27086         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
27087         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
27088         <stddef.h> does that.
27089         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
27090         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
27091         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
27092         needed.
27093         * lib/xstrtol.c: Likewise.
27094         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
27095         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
27096
27097         * lib/addext.c (addext): Use assignment rather than cast, to avoid
27098         warnings on some platforms.
27099
27100         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
27101         arbitrarily.
27102
27103 2003-05-26  Jim Meyering  <jim@meyering.net>
27104
27105         Merge in a change from coreutils:
27106         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
27107         that is guaranteed to be `no'.  Use `no_such_member' to indicate
27108         that condition, rather than `-1' which is slightly misleading.
27109         Change the name of the cache variable to have the gl_ prefix.
27110         Prompted by a patch from Richard Dawe for DJGPP.
27111
27112 2003-05-24  Karl Berry  <karl@gnu.org>
27113
27114         * config/config.guess: update from prep.
27115
27116 2003-05-22  Karl Berry  <karl@gnu.org>
27117
27118         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
27119
27120 2003-05-20  Karl Berry  <karl@gnu.org>
27121
27122         * config/config.guess: update from prep.
27123
27124 2003-05-18  Karl Berry  <karl@gnu.org>
27125
27126         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
27127         might actually be set by the user.
27128
27129         * config/depcomp, install-sh, mdate-sh: update from automake.
27130
27131 2003-05-17  Bruno Haible  <bruno@clisp.org>
27132
27133         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
27134         invalid expansion for AC_EGREP_CPP.
27135         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
27136         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
27137         Suggested by Akim Demaille <akim@epita.fr> in
27138         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
27139
27140 2003-05-12  Jim Meyering  <jim@meyering.net>
27141
27142         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
27143         the space-padded-by-default conversion specifiers, %e, %k, %l.
27144
27145 2003-05-12  Bruno Haible  <bruno@clisp.org>
27146
27147         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
27148         the string is longer than 4 KB.
27149
27150 2003-05-11  Karl Berry  <karl@gnu.org>
27151
27152         * config/config.{guess,sub}: update from prep.
27153
27154 2003-05-09  Bruno Haible  <bruno@clisp.org>
27155
27156         * modules/error: Add m4/strerror_r.m4 to file list.
27157
27158 2003-05-03  Bruno Haible  <bruno@clisp.org>
27159
27160         Upgrade to Unicode-4.0.
27161         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
27162         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
27163         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
27164         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
27165         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
27166         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
27167         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
27168         Change width of U+E0100..U+E01EF from 1 to 0.
27169
27170 2003-04-25  Jim Meyering  <jim@meyering.net>
27171
27172         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
27173         of type size_t, not int.
27174
27175 2003-04-25  Bruno Haible  <bruno@clisp.org>
27176
27177         * lib/copy-file.c: Include <stddef.h>, for size_t.
27178
27179 2003-04-21  Paul Eggert  <eggert@twinsun.com>
27180
27181         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
27182         code which expansion is under static control.  Patch imported from
27183         Akim Demaille's patch to Bison; see
27184         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
27185
27186 2003-04-14  Bruno Haible  <bruno@clisp.org>
27187
27188         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
27189
27190 2003-04-11  Jim Meyering  <jim@meyering.net>
27191
27192         Merge changes from Coreutils.
27193
27194         2003-03-22  Jim Meyering  <jim@meyering.net>
27195
27196         * lib/strftime.c (widen): Cast alloca return value to proper type.
27197
27198         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
27199
27200         From GNU libc.
27201         * lib/strftime.c (my_strftime): Handle very large width
27202         specifications for numeric values correctly.  Improve checks for
27203         overflow.
27204
27205         2003-01-19  Jim Meyering  <jim@meyering.net>
27206
27207         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
27208         definitions.
27209         (nl_get_alt_digit) [! defined my_strftime]: Define.
27210         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
27211         _nl_get_alt_digit and _nl_get_walt_digit.
27212
27213         * lib/strftime.c (my_strftime): Merge in locale-related changes from
27214         libc. These changes have no effect outside of _LIBC.
27215
27216 2003-04-10  Bruno Haible  <bruno@clisp.org>
27217
27218         * modules/findprog: New file.
27219         * MODULES.html.sh (func_all_modules): Add it.
27220
27221 2003-04-10  Bruno Haible  <bruno@clisp.org>
27222
27223         * m4/findprog.m4: New file.
27224         * m4/eaccess.m4: New file.
27225
27226 2003-04-10  Bruno Haible  <bruno@clisp.org>
27227
27228         * lib/findprog.h: New file, from GNU gettext.
27229         * lib/findprog.c: New file, from GNU gettext.
27230
27231 2003-04-05  Jim Meyering  <jim@meyering.net>
27232
27233         Merge changes from Coreutils.
27234
27235         * lib/exclude.h (PARAMS): Remove definition and uses.
27236         * lib/exclude.c: Remove uses of `PARAMS'.
27237
27238         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
27239         Add test-cases for DOS filenames. Declare program_name.
27240         (main): Set up program_name.  Patch by Rich Dawe.
27241
27242         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
27243         error from mntctl.
27244         Use mntctl's return value to drive the entry-processing loop, since
27245         we can't rely on the value of the vmt_length member in the last
27246         entry.  On some systems doing so could result in exhausting
27247         virtual memory.  Based in part on a patch from Mike Jetzer.
27248
27249 2003-04-04  Bruno Haible  <bruno@clisp.org>
27250
27251         * modules/linebreak: New file.
27252         * MODULES.html.sh (func_all_modules): Add it.
27253
27254 2003-04-04  Bruno Haible  <bruno@clisp.org>
27255
27256         * m4/linebreak.m4: New file.
27257
27258 2003-04-04  Bruno Haible  <bruno@clisp.org>
27259
27260         * lib/linebreak.h: New file, from GNU gettext.
27261         * lib/linebreak.c: New file, from GNU gettext with slight
27262         modifications.
27263         * lib/lbrkprop.h: New file, from GNU gettext.
27264
27265 2003-04-03  Bruno Haible  <bruno@clisp.org>
27266
27267         * modules/utf8-ucs4: New file.
27268         * modules/utf16-ucs4: New file.
27269         * modules/ucs4-utf8: New file.
27270         * modules/ucs4-utf16: New file.
27271         * MODULES.html.sh (func_all_modules): Add them.
27272
27273 2003-04-03  Bruno Haible  <bruno@clisp.org>
27274
27275         * m4/utf-ucs4.m4: New file.
27276         * m4/ucs4-utf.m4: New file.
27277
27278 2003-04-03  Bruno Haible  <bruno@clisp.org>
27279
27280         * lib/utf8-ucs4.h: New file, from GNU gettext.
27281         * lib/utf16-ucs4.h: New file, from GNU gettext.
27282         * lib/ucs4-utf8.h: New file, from GNU gettext.
27283         * lib/ucs4-utf16.h: New file, from GNU gettext.
27284
27285 2003-04-02  Bruno Haible  <bruno@clisp.org>
27286
27287         * modules/binary-io: New file.
27288         * MODULES.html.sh (func_all_modules): Add it.
27289
27290 2003-04-02  Bruno Haible  <bruno@clisp.org>
27291
27292         * lib/binary-io.h: New file, from GNU gettext.
27293
27294 2003-04-01  Bruno Haible  <bruno@clisp.org>
27295
27296         * modules/pathname: New file.
27297         * MODULES.html.sh (func_all_modules): Add it.
27298
27299 2003-04-01  Bruno Haible  <bruno@clisp.org>
27300
27301         * lib/pathname.h: New file, from GNU gettext.
27302         * lib/concatpath.c: New file, from GNU gettext.
27303
27304 2003-03-30  Bruno Haible  <bruno@clisp.org>
27305
27306         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
27307
27308 2003-03-30  Bruno Haible  <bruno@clisp.org>
27309
27310         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
27311         function chown() doesn't exist.
27312
27313 2003-03-28  Bruno Haible  <bruno@clisp.org>
27314
27315         * modules/copy-file: New file.
27316         * MODULES.html.sh (func_all_modules): Add it.
27317
27318 2003-03-28  Bruno Haible  <bruno@clisp.org>
27319
27320         * m4/copy-file.m4: New file.
27321
27322 2003-03-28  Bruno Haible  <bruno@clisp.org>
27323
27324         * lib/copy-file.h: New file, from GNU gettext.
27325         * lib/copy-file.c: New file, from GNU gettext.
27326
27327 2003-03-18  Jim Meyering  <jim@meyering.net>
27328
27329         * lib/quote.c (quote_n): Fix typo in comment.
27330
27331 2003-03-18  Bruno Haible  <bruno@clisp.org>
27332
27333         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
27334         checking.
27335         * m4/onceonly_2_57.m4: Likewise.
27336
27337 2003-03-17  Bruno Haible  <bruno@clisp.org>
27338
27339         * m4/onceonly.m4: Require autoconf 2.54 or newer.
27340         (m4_quote): Remove macro.
27341         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
27342
27343 2003-03-14  Jim Meyering  <jim@meyering.net>
27344
27345         Merge changes from Coreutils.
27346         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
27347         to be const, in order to avoid warnings.
27348         (obstack_room): Likewise.
27349         (obstack_empty_p): Likewise.
27350
27351 2003-03-14  Bruno Haible  <bruno@clisp.org>
27352
27353         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
27354         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
27355
27356 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27357
27358         Merge changes from Bison.
27359         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
27360         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
27361         when compiling Bison 1.875's `bitset bset = obstack_alloc
27362         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
27363         * lib/hash.c: Include <stdbool.h> unconditionally.
27364
27365 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27366
27367         * m4/onceonly.m4 (m4_quote): New macro.
27368         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
27369         Quote AC_FOREACH variable-expansions properly.
27370
27371 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27372
27373         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
27374
27375 2003-03-09  Paul Eggert  <eggert@twinsun.com>
27376
27377         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
27378         Reported by Bruce Becker; see:
27379         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
27380
27381 2003-03-03  Paul Eggert  <eggert@twinsun.com>
27382             Bruno Haible  <bruno@clisp.org>
27383
27384         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
27385         Reported by John Hughes, see
27386         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
27387
27388 2003-02-20  Bruno Haible  <bruno@clisp.org>
27389
27390         * MODULES.html.sh (func_all_modules): Add poll.
27391
27392 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27393
27394         * modules/poll: New file.
27395
27396 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27397
27398         * lib/poll_.h: New file.
27399         * lib/poll.c: New file.
27400
27401 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27402
27403         * m4/poll.m4: New file.
27404
27405 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27406
27407         * modules/mathl: New file.
27408
27409 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27410
27411         * lib/mathl.h: New file.
27412         * lib/acosl.c: New file.
27413         * lib/asinl.c: New file.
27414         * lib/atanl.c: New file.
27415         * lib/ceill.c: New file.
27416         * lib/cosl.c: New file.
27417         * lib/expl.c: New file.
27418         * lib/floorl.c: New file.
27419         * lib/frexpl.c: New file.
27420         * lib/ldexpl.c: New file.
27421         * lib/logl.c: New file.
27422         * lib/sincosl.c: New file.
27423         * lib/sinl.c: New file.
27424         * lib/sqrtl.c: New file.
27425         * lib/tanl.c: New file.
27426         * lib/trigl.c: New file.
27427         * lib/trigl.h: New file.
27428
27429 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27430
27431         * m4/mathl.m4: New file.
27432
27433 2003-02-18  Bruno Haible  <bruno@clisp.org>
27434
27435         * MODULES.html.sh (func_all_modules): Add mathl.
27436
27437 2003-02-17  Bruno Haible  <bruno@clisp.org>
27438
27439         * modules/mkdtemp: New module.
27440         * MODULES.html.sh (func_all_modules): Add it.
27441
27442 2003-02-17  Bruno Haible  <bruno@clisp.org>
27443
27444         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
27445
27446 2003-02-17  Bruno Haible  <bruno@clisp.org>
27447
27448         * lib/mkdtemp.h: New file, from GNU gettext.
27449         * lib/mkdtemp.c: New file, from GNU gettext.
27450
27451 2003-02-02  Jim Meyering  <jim@meyering.net>
27452
27453         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
27454         e.g. glibc-2.2.93.
27455
27456 2003-01-31  Bruno Haible  <bruno@clisp.org>
27457
27458         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
27459         'rpl_rename'.
27460         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
27461         'rpl_strnlen'.
27462         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
27463         'rpl_strtod'.
27464         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
27465         'rpl_utime'.
27466
27467 2003-01-31  Bruno Haible  <bruno@clisp.org>
27468
27469         * lib/rename.c: #undef rename before defining rpl_rename.
27470         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
27471
27472 2003-01-30  Bruno Haible  <bruno@clisp.org>
27473
27474         * modules/vasnprintf, modules/vasprintf: New modules.
27475         * MODULES.html.sh (func_all_modules): Add them.
27476
27477 2003-01-30  Bruno Haible  <bruno@clisp.org>
27478
27479         * m4/signed.m4: New file, from GNU gettext.
27480         * m4/longdouble.m4: New file, from GNU gettext.
27481         * m4/wchar_t.m4: New file, from GNU gettext.
27482         * m4/wint_t.m4: New file, from GNU gettext.
27483         * m4/vasnprintf.m4: New file.
27484         * m4/vasprintf.m4: New file.
27485
27486 2003-01-30  Bruno Haible  <bruno@clisp.org>
27487
27488         * lib/printf-args.h: New file, from GNU gettext.
27489         * lib/printf-args.c: New file, from GNU gettext.
27490         * lib/printf-parse.h: New file, from GNU gettext.
27491         * lib/printf-parse.c: New file, from GNU gettext.
27492         * lib/vasnprintf.h: New file, from GNU gettext.
27493         * lib/vasnprintf.c: New file, from GNU gettext.
27494         * lib/asnprintf.c: New file, from GNU gettext.
27495         * lib/vasprintf.h: New file, from GNU gettext with modifications.
27496         * lib/vasprintf.c: New file, from GNU gettext.
27497         * lib/asprintf.c: New file, from GNU gettext.
27498
27499 2003-01-29  Bruno Haible  <bruno@clisp.org>
27500
27501         * modules/stpncpy: New module.
27502         * MODULES.html.sh (func_all_modules): Add it.
27503
27504 2003-01-29  Bruno Haible  <bruno@clisp.org>
27505
27506         * m4/stpncpy.m4: New file.
27507
27508 2003-01-29  Bruno Haible  <bruno@clisp.org>
27509
27510         * lib/stpncpy.h: New file, from GNU gettext with modifications.
27511         * lib/stpncpy.c: New file, from GNU gettext with modifications.
27512
27513 2003-01-28  Bruno Haible  <bruno@clisp.org>
27514
27515         * modules/c-ctype: New module.
27516         * MODULES.html.sh (func_all_modules): Add it.
27517
27518 2003-01-28  Bruno Haible  <bruno@clisp.org>
27519
27520         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
27521         Paul Eggert.
27522         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
27523         Paul Eggert.
27524
27525 2003-01-27  Bruno Haible  <bruno@clisp.org>
27526
27527         * modules/xsetenv: New module.
27528         * MODULES.html.sh (func_all_modules): Add it.
27529
27530 2003-01-27  Bruno Haible  <bruno@clisp.org>
27531
27532         * lib/xsetenv.h: New file, from GNU gettext.
27533         * lib/xsetenv.c: New file, from GNU gettext.
27534
27535 2003-01-23  Jim Meyering  <jim@meyering.net>
27536
27537         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
27538         from working on systems without dirfd (at least Irix and OSF1/Tru64).
27539
27540 2003-01-23  Bruno Haible  <bruno@clisp.org>
27541
27542         * modules/minmax: New module.
27543         * MODULES.html.sh (func_all_modules): Add it.
27544
27545 2003-01-23  Bruno Haible  <bruno@clisp.org>
27546
27547         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
27548         Eggert.
27549
27550 2003-01-22  Bruno Haible  <bruno@clisp.org>
27551
27552         * modules/exit: New module.
27553         * MODULES.html.sh (func_all_modules): Add it.
27554
27555 2003-01-22  Bruno Haible  <bruno@clisp.org>
27556
27557         * lib/exit.h: New file, from GNU gettext.
27558
27559 2003-01-19  Bruno Haible  <bruno@clisp.org>
27560
27561         * gnulib-tool: Recognize option --extract-maintainer.
27562         (func_get_maintainer): New function.
27563         * modules/*: Add Maintainer entry.
27564
27565 2003-01-16  Jim Meyering  <jim@meyering.net>
27566
27567         * m4/regex.m4: The `regex' struct is both input and output.
27568         Initialize it before each use.  Patch by Tim Waugh.
27569
27570 2003-01-16  Bruno Haible  <bruno@clisp.org>
27571
27572         * MODULES.html.sh: Add a table of contents. Add the module name as
27573         leftmost column. Add hyperlinks.
27574
27575 2003-01-15  Bruno Haible  <bruno@clisp.org>
27576
27577         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
27578
27579 2003-01-15  Bruno Haible  <bruno@clisp.org>
27580
27581         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
27582         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
27583         suffix.
27584
27585 2003-01-15  Bruno Haible  <bruno@clisp.org>
27586
27587         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
27588
27589 2003-01-15  Bruno Haible  <bruno@clisp.org>
27590
27591         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
27592         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
27593
27594 2003-01-14  Jim Meyering  <jim@meyering.net>
27595
27596         * lib/same.c (same_name): Tweak a comment.
27597
27598 2003-01-14  Bruno Haible  <bruno@clisp.org>
27599
27600         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
27601         when a string comparison is sufficient.
27602
27603 2003-01-14  Bruno Haible  <bruno@clisp.org>
27604
27605         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
27606         'unsigned int'.
27607
27608 2003-01-14  Bruno Haible  <bruno@clisp.org>
27609
27610         * lib/hash-pjw.c: Add comment about low quality of this function.
27611
27612 2003-01-13  Bruno Haible  <bruno@clisp.org>
27613
27614         * modules/stpcpy: Distribute lib/stpcpy.h.
27615         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
27616
27617 2003-01-13  Bruno Haible  <bruno@clisp.org>
27618
27619         * modules/*: Add a description.
27620         * modules/strpbrk: Fix Makefile.am snippet.
27621         * modules/strtoimax: Fix dependencies.
27622         * modules/strtoumax: Likewise.
27623
27624 2003-01-13  Bruno Haible  <bruno@clisp.org>
27625
27626         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
27627         * modules/alloca (Makefile.am): All object files depend on alloca.h.
27628         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
27629
27630 2003-01-13  Bruno Haible  <bruno@clisp.org>
27631
27632         * gnulib-tool (func_create_testdir): Store config/* files in the main
27633         directory.
27634         * config.rpath: Move to ...
27635         * config/config.rpath: ... here.
27636         * modules/gettext: Contains config/config.rpath, not config.rpath.
27637         * modules/iconv: Likewise.
27638
27639 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27640
27641         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27642         to avoid collisions with libcurses and libreadline.
27643
27644         * m4/getstr.m4: Remove.
27645         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
27646
27647 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27648
27649         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27650         to avoid collisions with libcurses and libreadline.
27651
27652         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
27653         * lib/getstr.h, getstr.c: Remove.
27654         * lib/getline.c: Include "getline.h", to check interface.
27655         Move body of old getstr.c here: this defines MIN_CHUNK and
27656         declares getdelim2, which is renamed from getstr.
27657         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
27658
27659         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
27660         All uses changed.
27661         * lib/linebuffer.h: Likewise.
27662         (readline): Remove backward-compatibility macro.
27663
27664 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27665
27666         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27667         to avoid collisions with libcurses and libreadline.
27668         * getstr: Remove.
27669         * MODULES.html.sh: Remove getstr.
27670         * modules/getline: Depend on unlocked-io, not getstr.
27671
27672 2003-01-12  Jim Meyering  <jim@meyering.net>
27673
27674         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
27675
27676 2003-01-10  Bruno Haible  <bruno@clisp.org>
27677
27678         * modules/alloca: Change Makefile.am requirements. Simplify Include
27679         requirements. Add lib/alloca_.h to file list.
27680
27681 2003-01-10  Bruno Haible  <bruno@clisp.org>
27682
27683         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
27684
27685 2003-01-10  Bruno Haible  <bruno@clisp.org>
27686
27687         * lib/alloca_.h: New file.
27688         * lib/getdate.y: Unconditionally include alloca.h.
27689         * lib/makepath.c: Likewise.
27690         * lib/setenv.c: Likewise.
27691         * lib/userspec.c: Likewise.
27692
27693 2003-01-09  Karl Berry  <karl@gnu.org>
27694
27695         * MODULES.html.sh: include `dirname $0` in PATH, to find
27696         gnulib-tool.
27697
27698 2003-01-09  Bruno Haible  <bruno@clisp.org>
27699
27700         * modules/stdbool: Change configure.ac, Makefile.am requirements.
27701         Simplify Include requirements. Add lib/stdbool.h.in to file list.
27702
27703 2003-01-09  Bruno Haible  <bruno@clisp.org>
27704
27705         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
27706
27707 2003-01-09  Bruno Haible  <bruno@clisp.org>
27708
27709         * lib/stdbool.h.in: New file.
27710
27711 2003-01-09  Bruno Haible  <bruno@clisp.org>
27712
27713         * gnulib-tool (func_all_modules): Ignore files ending in ~.
27714         * MODULES.html.sh: Likewise.
27715
27716 2003-01-08  Jim Meyering  <jim@meyering.net>
27717
27718         * lib/full-write.c: Undefine and define-away `const' after inclusion
27719         of errno.h, not before.  Suggestion from Bruno Haible.
27720
27721 2003-01-08  Bruno Haible  <bruno@clisp.org>
27722
27723         * modules/full-read: Depend on full-write.
27724
27725 2003-01-08  Bruno Haible  <bruno@clisp.org>
27726
27727         * lib/safe-read.c: Include specification header first, to ensure its
27728         selfcontainedness.
27729         * lib/full-write.c: Likewise.
27730
27731 2003-01-07  Jim Meyering  <jim@meyering.net>
27732
27733         * lib/full-write.c: Rework so that it may serve to define full_read,
27734         too.
27735         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
27736
27737 2003-01-07  Bruno Haible  <bruno@clisp.org>
27738
27739         * lib/strtoimax.c: Include <stdint.h> as an alternative to
27740         <inttypes.h>.
27741         * lib/xstrtol.h: Likewise.
27742         * lib/xstrtoimax.c: Likewise.
27743         * lib/xstrtoumax.c: Likewise.
27744         * lib/human.h: Likewise.
27745
27746         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
27747         on systems that have <inttypes.h> but not <stdint.h>.
27748
27749 2003-01-07  Bruno Haible  <bruno@clisp.org>
27750
27751         * MODULES.html.sh: Add copyright notice.
27752         (missed_files): Omit CVS directory entries.
27753         (func_module): Make it work with sed-3.02.
27754         * MODULES.txt: Remove file.
27755
27756 2003-01-06  Jim Meyering  <jim@meyering.net>
27757
27758         * lib/version-etc.c: Update year in translatable copyright string.
27759
27760 2003-01-03  Karl Berry  <karl@gnu.org>
27761
27762         * config/config.{guess,sub}: update from prep.
27763
27764 2003-01-02  Karl Berry  <karl@gnu.org>
27765
27766         * doc/COPYING.DOC: belatedly updated to 1.2.
27767
27768 2003-01-01  Karl Berry  <karl@gnu.org>
27769
27770         * gnulib-tool (func_verify_module): report module name $module in
27771         error message, not $1.
27772         * gnulib-tool (create-testdir): don't complain if destdir couldn't
27773         be created, only if it doesn't exist.
27774         * gnulib-tool (last_checkin_date): don't expand the $Date here.
27775
27776 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27777
27778         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
27779
27780 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27781
27782         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
27783         memcmp if strcoll doesn't work.
27784
27785 2002-12-31  Bruno Haible  <bruno@clisp.org>
27786
27787         * lib/utime.c (utime_null): No need to call ftruncate if the file was
27788         nonempty.
27789
27790 2002-12-31  Bruno Haible  <bruno@clisp.org>
27791
27792         * lib/memcoll.c (STRCOLL): New macro.
27793         (memcoll): Use it.
27794
27795 2002-12-31  Bruno Haible  <bruno@clisp.org>
27796
27797         * lib/localcharset.h: New file.
27798         * lib/localcharset.c: Include it.
27799         * lib/unicodeio.c: Likewise.
27800
27801 2002-12-31  Bruno Haible  <bruno@clisp.org>
27802
27803         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
27804         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
27805
27806 2002-12-31  Bruno Haible  <bruno@clisp.org>
27807
27808         * lib/getline.h: Include <stddef.h>, for size_t.
27809
27810         * lib/unicodeio.h: Include <stddef.h>, for size_t.
27811         * lib/unicodeio.c: Don't include <stddef.h>.
27812
27813 2002-12-31  Bruno Haible  <bruno@clisp.org>
27814
27815         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
27816         HAVE_TM_ZONE.
27817
27818 2002-12-24  Karl Berry  <karl@gnu.org>
27819
27820         * config/config.guess: update from prep.
27821
27822 2002-12-24  Bruno Haible  <bruno@clisp.org>
27823
27824         General infrasructure.
27825         * m4/README: Rewritten.
27826         * m4/onceonly.m4: New file.
27827         * m4/onceonly_2_57.m4: New file.
27828
27829         Module atexit.
27830         * m4/atexit.m4: New file.
27831
27832         Module strtod.
27833         * m4/strtod.m4: New file.
27834
27835         Module strtol.
27836         * m4/strtol.m4: New file.
27837
27838         Module strtoul.
27839         * m4/strtoul.m4: New file.
27840
27841         Module memchr.
27842         * m4/memchr.m4: New file.
27843
27844         Module memcmp.
27845         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
27846         (jm_FUNC_MEMCMP): Invoke it.
27847
27848         Module memcpy.
27849         * m4/memcpy.m4: New file.
27850
27851         Module memmove.
27852         * m4/memmove.m4: New file.
27853
27854         Module memset.
27855         * m4/memset.m4: New file.
27856
27857         Module strcspn.
27858         * m4/strcspn.m4: New file.
27859
27860         Module strpbrk.
27861         * m4/strpbrk.m4: New file.
27862
27863         Module strstr.
27864         * m4/strstr.m4: New file.
27865
27866         Module strerror.
27867         * m4/strerror.m4: New file.
27868
27869         Module mktime.
27870         * m4/mktime.m4: Renamed from jm-mktime.m4.
27871         (gl_PREREQ_MKTIME): New macro.
27872         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
27873
27874         Module malloc.
27875         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
27876         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
27877         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
27878
27879         Module realloc.
27880         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
27881         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
27882         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
27883
27884         Module strftime.
27885         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
27886         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
27887         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
27888         gl_TM_GMTOFF.
27889         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
27890
27891         Module xalloc.
27892         * m4/xalloc.m4: New file.
27893
27894         Module alloca.
27895         * m4/alloca.m4: New file.
27896
27897         Module putenv.
27898         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
27899         (jm_FUNC_PUTENV): Invoke it.
27900
27901         Module setenv.
27902         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
27903         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
27904         when invoked twice.
27905         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
27906         gt_FUNC_SETENV.
27907
27908         Module memrchr.
27909         * m4/memrchr.m4: New file.
27910
27911         Module stpcpy.
27912         * m4/stpcpy.m4: New file.
27913
27914         Module strcase.
27915         * m4/strcase.m4: New file.
27916
27917         Module strdup.
27918         * m4/strdup.m4: New file.
27919
27920         Module strnlen.
27921         * m4/strnlen.m4: New file.
27922
27923         Module strndup.
27924         * m4/strndup.m4: New file.
27925
27926         Module xstrtod.
27927         * m4/xstrtod.m4: New file.
27928
27929         Module xstrtol.
27930         * m4/xstrtol.m4: New file.
27931
27932         Module getdate.
27933         * m4/getdate.m4: New file.
27934
27935         Module unlocked-io.
27936         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
27937         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
27938         * m4/jm-glibc-io.m4n: Remove file.
27939
27940         Module long-options.
27941         * m4/long-options.m4: New file.
27942
27943         Module md5.
27944         * m4/md5.m4: New file.
27945
27946         Module sha.
27947         * m4/sha.m4: New file.
27948
27949         Module getstr.
27950         * m4/getstr.m4: New file.
27951
27952         Module getline.
27953         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
27954         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
27955         <sys/types.h>, for size_t. Use the function name gnu_getline, not
27956         simply getline. Infoke gl_PREREQ_GETLINE.
27957
27958         Module obstack.
27959         * m4/obstack.m4: New file.
27960
27961         Module hash.
27962         * m4/hash.m4: New file.
27963
27964         Module readtokens.
27965         * m4/readtokens.m4: New file.
27966
27967         Module strverscmp.
27968         * m4/strverscmp.m4: New file.
27969
27970         Module stdbool.
27971         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
27972         OSF/1.
27973
27974         Module strtoll.
27975         * m4/strtoll.m4: New file.
27976
27977         Module strtoull.
27978         * m4/strtoull.m4: New file.
27979
27980         Module strtoimax.
27981         * m4/strtoimax.m4: New file.
27982
27983         Module strtoumax.
27984         * m4/strtoumax.m4: New file.
27985
27986         Module xstrtoimax.
27987         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
27988         jm_AC_PREREQ_XSTRTOIMAX.
27989         Moved the strtol prerequisites to strtol.m4.
27990         Moved the strtoll prerequisites to strtoll.m4.
27991         Moved the strtoimax prerequisites to strtoimax.m4.
27992
27993         Module xstrtoumax.
27994         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
27995         jm_AC_PREREQ_XSTRTOUMAX.
27996         Moved the strtoul prerequisites to strtoul.m4.
27997         Moved the strtoull prerequisites to strtoull.m4.
27998         Moved the strtoumax prerequisites to strtoumax.m4.
27999
28000         Module chown.
28001         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
28002         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
28003
28004         Module dup2.
28005         * m4/dup2.m4: New file.
28006
28007         Module ftruncate.
28008         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
28009         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
28010
28011         Module getgroups.
28012         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
28013         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
28014
28015         Module gettimeofday.
28016         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
28017         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
28018         gl_PREREQ_GETTIMEOFDAY.
28019
28020         Module mkdir.
28021         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
28022         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
28023
28024         Module mkstemp.
28025         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
28026         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
28027         jm_AC_TYPE_UINTMAX_T.
28028         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
28029
28030         Module stat.
28031         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
28032         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
28033
28034         Module lstat.
28035         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
28036         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
28037
28038         Module timespec.
28039         * m4/timespec.m4 (gl_TIMESPEC): New macro.
28040         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
28041         * m4/st_mtim.m4: Indentation.
28042
28043         Module nanosleep.
28044         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
28045         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
28046         gl_PREREQ_NANOSLEEP.
28047
28048         Module regex.
28049         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
28050         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
28051         (gl_REGEX): New macro.
28052
28053         Module rename.
28054         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
28055         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
28056
28057         Module rmdir.
28058         * m4/rmdir.m4: New file.
28059
28060         Module utime.
28061         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
28062         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
28063         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
28064
28065         Module dirname.
28066         * m4/dirname.m4: New file.
28067
28068         Module getopt.
28069         * m4/getopt.m4: New file.
28070
28071         Module unistd-safer.
28072         * m4/unistd-safer.m4: New file.
28073
28074         Module fnmatch.
28075         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
28076         declaration.
28077         (gl_PREREQ_FNMATCH_EXTRA): New macro.
28078         (gl_FUNC_FNMATCH_POSIX): New macro.
28079         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
28080         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
28081         simply fnmatch.
28082
28083         Module exclude.
28084         * m4/exclude.m4: New file.
28085
28086         Module human.
28087         * m4/human.m4: New file.
28088
28089         Module acl.
28090         * m4/acl.m4: Nop.
28091
28092         Module backupfile.
28093         * m4/backupfile.m4: New file.
28094         * m4/d-ino.m4: Indentation.
28095
28096         Module fsusage.
28097         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
28098         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
28099         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
28100
28101         Module dirfd.
28102         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
28103         requirements.
28104
28105         Module euidaccess.
28106         * m4/euidaccess.m4: New file.
28107
28108         Module file-type.
28109         * m4/file-type.m4: New file.
28110
28111         Module fileblocks.
28112         * m4/fileblocks.m4: New file.
28113
28114         Module filemode.
28115         * m4/filemode.m4: New file.
28116
28117         Module isdir.
28118         * m4/isdir.m4: New file.
28119
28120         Module lchown.
28121         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
28122         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
28123
28124         Module makepath.
28125         * m4/makepath.m4: New file.
28126
28127         Module modechange.
28128         * m4/modechange.m4: New file.
28129
28130         Module mountlist.
28131         * m4/mountlist.m4: New file.
28132         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
28133         Indentation.
28134
28135         Module path-concat.
28136         * m4/path-concat.m4: New file.
28137
28138         Module pathmax.
28139         * m4/pathmax.m4: New file.
28140
28141         Module same.
28142         * m4/same.m4: New file.
28143
28144         Module save-cwd.
28145         * m4/save-cwd.m4: New file.
28146
28147         Module savedir.
28148         * m4/savedir.m4: New file.
28149
28150         Module xgetcwd.
28151         * m4/xgetcwd.m4: New file.
28152         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
28153
28154         Module xreadlink.
28155         * m4/xreadlink.m4: New file.
28156
28157         Module safe-read.
28158         * m4/safe-read.m4: New file.
28159
28160         Module safe-write.
28161         * m4/safe-write.m4: New file.
28162
28163         Module closeout.
28164         * m4/closeout.m4: New file.
28165
28166         Module stdio-safer.
28167         * m4/stdio-safer.m4: New file.
28168
28169         Module getpass.
28170         * m4/getpass.m4: New file.
28171
28172         Module getugroups.
28173         * m4/getugroups.m4: New file.
28174
28175         Module group-member.
28176         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
28177         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
28178
28179         Module idcache.
28180         * m4/idcache.m4: New file.
28181
28182         Module userspec.
28183         * m4/userspec.m4: New file.
28184
28185         Module gettime.
28186         * m4/clock_time.m4: New file.
28187         * m4/gettime.m4: New file.
28188
28189         Module settime.
28190         * m4/settime.m4: New file.
28191
28192         Module posixtm.
28193         * m4/posixtm.m4: New file.
28194
28195         Module gethostname.
28196         * m4/gethostname.m4: New file.
28197
28198         Module canon-host.
28199         * m4/canon-host.m4: New file.
28200
28201         Module gettext.
28202         * m4/codeset.m4: New file, from gettext-0.11.5.
28203         * m4/gettext.m4: New file, from gettext-0.11.5.
28204         * m4/glibc21.m4: New file, from gettext-0.11.5.
28205         * m4/iconv.m4: New file, from gettext-0.11.5.
28206         * m4/intdiv0.m4: New file, from gettext-0.11.5.
28207         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
28208         * m4/inttypes.m4: New file, from gettext-0.11.5.
28209         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
28210         * m4/isc-posix.m4: New file, from gettext-0.11.5.
28211         * m4/lcmessage.m4: New file, from gettext-0.11.5.
28212         * m4/lib-ld.m4: New file, from gettext-0.11.5.
28213         * m4/lib-link.m4: New file, from gettext-0.11.5.
28214         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
28215         * m4/progtest.m4: New file, from gettext-0.11.5.
28216         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
28217         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
28218         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
28219
28220         Module localcharset.
28221         * m4/localcharset.m4: New file.
28222
28223         Module hard-locale.
28224         * m4/hard-locale.m4: New file.
28225
28226         Module mbswidth.
28227         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
28228         onceonly macros.
28229         * m4/mbrtowc.m4: Add comment.
28230
28231         Module memcasecmp.
28232         * m4/memcasecmp.m4: New file.
28233
28234         Module memcoll.
28235         * m4/memcoll.m4: New file.
28236
28237         Module unicodeio.
28238         * m4/unicodeio.m4: New file.
28239
28240         Module rpmatch.
28241         * m4/rpmatch.m4: New file.
28242
28243         Module yesno.
28244         * m4/yesno.m4: New file.
28245
28246         Module exitfail.
28247         * m4/exitfail.m4: New file.
28248
28249         Module c-stack.
28250         * m4/c-stack.m4 (gl_C_STACK): New macro.
28251         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
28252
28253         Module error.
28254         * m4/error.m4 (gl_ERROR): New macro.
28255         (jm_PREREQ_ERROR): Use onceonly macros.
28256
28257         Module fatal.
28258         * m4/fatal.m4: New file.
28259
28260         Module getloadavg.
28261         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
28262         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
28263
28264         Module getpagesize.
28265         * m4/getpagesize.m4: New file.
28266
28267         Module getusershell.
28268         * m4/getusershell.m4: New file.
28269
28270         Module physmem.
28271         * m4/physmem.m4: New file.
28272
28273         Module posixver.
28274         * m4/posixver.m4: New file.
28275
28276         Module quotearg.
28277         * m4/quotearg.m4: New file.
28278
28279         Module quote.
28280         * m4/quote.m4: New file.
28281
28282         Module readutmp.
28283         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
28284
28285         Module sig2str.
28286         * m4/sig2str.m4: New file.
28287
28288         Other.
28289         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
28290         ulonglong.m4.
28291         * m4/intmax_t.m4: New file.
28292         * m4/d-type.m4: Indentation.
28293         * m4/jm-macros.m4: Update.
28294         * m4/prereq.m4 (jm_PREREQ): Update.
28295         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
28296         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
28297         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
28298         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
28299         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
28300         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
28301         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
28302         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
28303         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
28304         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
28305         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
28306         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
28307         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
28308         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
28309         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
28310         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
28311         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
28312         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
28313         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
28314
28315 2002-12-24  Bruno Haible  <bruno@clisp.org>
28316
28317         * MODULES.txt: Update according to m4/ changes.
28318
28319         Module gettext.
28320         * config.rpath: New file, from gettext-0.11.5.
28321
28322         * modules/*: New module descriptions.
28323         * gnulib-tool: New file.
28324         * MODULES.html.sh: New file.
28325
28326 2002-12-21  Karl Berry  <karl@gnu.org>
28327
28328         * doc/fdl.texi: update to version 1.2.
28329
28330 2002-12-19  Karl Berry  <karl@gnu.org>
28331
28332         * config/config.guess: update from prep.
28333
28334 2002-12-18  Bruno Haible  <bruno@clisp.org>
28335
28336         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
28337         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
28338
28339 2002-12-17  Bruno Haible  <bruno@clisp.org>
28340
28341         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
28342         stdlib.h, string.h.
28343
28344 2002-12-17  Bruno Haible  <bruno@clisp.org>
28345
28346         * lib/canon-host.c (strdup): Remove unused declaration.
28347
28348         * lib/fsusage.c: Include full_read.h.
28349         (get_fs_usage): Use full_read instead of safe_read.
28350
28351         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
28352
28353 2002-12-12  Karl Berry  <karl@gnu.org>
28354
28355         * config/config.guess: update from prep.
28356
28357 2002-12-11  Bruno Haible  <bruno@clisp.org>
28358
28359         * m4/setenv.m4: New file, from gettext-0.11.5.
28360
28361 2002-12-11  Bruno Haible  <bruno@clisp.org>
28362
28363         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
28364         not unsetenv().
28365         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
28366         modifications:
28367
28368         2002-12-11  Bruno Haible  <bruno@clisp.org>
28369
28370                 * setenv.c (alloca): Fall back to malloc.
28371                 (freea): New macro.
28372                 (setenv): Use freea() to free memory allocated with alloca().
28373
28374         2002-11-13  Bruno Haible  <bruno@clisp.org>
28375
28376                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
28377                 function declarations.
28378                 * unsetenv.c (unsetenv): Likewise.
28379
28380         2002-03-04  Bruno Haible  <bruno@clisp.org>
28381
28382                 Portability to AIX 4.3.3.
28383                 * unsetenv.c: New file, extracted from setenv.c.
28384                 * setenv.c: Move the unsetenv() function to unsetenv.c.
28385
28386         2001-12-20  Bruno Haible  <bruno@clisp.org>
28387
28388                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
28389                 use malloc instead. For SunOS 4.
28390
28391         2001-12-11  Bruno Haible  <bruno@clisp.org>
28392
28393                 * setenv.c: Declare alloca.
28394                 (compar_fn_t): New typedef.
28395                 (KNOWN_VALUE, STORE_VALUE): Use it.
28396
28397         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
28398         setenv.h.
28399
28400 2002-12-10  Paul Eggert  <eggert@twinsun.com>
28401
28402         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
28403         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
28404         Choose values that are less likely to collide with system fnmatch
28405         options.
28406         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
28407         defined (e.g., a pure POSIX system).
28408         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
28409         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
28410
28411 2002-12-06  Paul Eggert  <eggert@twinsun.com>
28412
28413         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
28414         a pain in practice to deal with generated m4 files.  This change
28415         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
28416
28417         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
28418         and jm-glibc-io.m4, as they are no longer a special case.
28419         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
28420         kludge and the auto-generation stuff.  Check only whether the
28421         functions are declared, not whether they exist, since older hosts
28422         that don't declare the functions can't use the optimization anyway.
28423
28424 2002-12-06  Jim Meyering  <jim@meyering.net>
28425
28426         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
28427
28428         Merge in changes from libc's misc/error.c, in preparation
28429         for the merge of gnulib's changes back into libc.
28430
28431         * lib/error.c (_): Define only if not already defined.
28432         Move definition to follow all #include directives.
28433         Include unlocked-io.h only if !_LIBC.
28434         [_LIBC]: Include <libio/libioP.h>.
28435         [USE_IN_LIBIO]: Include <libio/iolibio.h>
28436         (fflush): Tweak definition to use INTUSE.
28437         (putc): Define.
28438
28439 2002-12-05  Paul Eggert  <eggert@twinsun.com>
28440
28441         * lib/alloca.c [defined emacs]: Include "lisp.h".
28442         (xalloc_die) [defined emacs]: New macro.
28443         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
28444         [! defined emacs]: Include <xalloc.h>.
28445         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
28446         (pointer): Typedef to POINTER_TYPE *.
28447         (malloc): Remove decl; we now always use xmalloc.
28448         (alloca): Use old-style definition, since Emacs needs this.
28449         Check for arithmetic overflow when computing combined size.
28450
28451 2002-12-04  Paul Eggert  <eggert@twinsun.com>
28452
28453         Do not generate unlocked-io.h automatically, since it's easier to
28454         maintain it by hand.
28455
28456         * lib/unlocked-io.h: New file, from GNU diffutils,
28457         but with proper copyright notice and attribution.
28458         * lib/gen-uio: Remove.
28459         * lib/Makefile.am: Add copyright notice.
28460         (libfetish_a_SOURCES): Add unlocked-io.h.
28461         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
28462         (DISTCLEANFILES, io_functions): Remove macros.
28463         (EXTRA_DIST): Remove gen_uio.
28464         (unlocked-io.h): Remove rule.
28465
28466 2002-12-04  Jim Meyering  <jim@meyering.net>
28467
28468         Reflect the fact that stat.c and lstat.c are no longer generated.
28469         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
28470         (DISTCLEANFILES): Likewise.
28471         (EXTRA_DIST): Likewise.
28472         (all_local): Don't depend on stat.c or lstat.c.
28473         (stat.c, lstat.c): Remove rules.
28474         (EXTRA_DIST): Remove xstat.in.
28475
28476         * lib/xstat.in: Remove file.  Contents moved into stat.c.
28477         * lib/stat.c: New file.  Contents mostly from xstat.in.
28478         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
28479         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
28480
28481         * lib/safe-read.c: Rework so that it may serve to define safe_write,
28482         too.
28483         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
28484
28485 2002-12-03  Jim Meyering  <jim@meyering.net>
28486
28487         * lib/safe-read.c, safe-write.c: Change variable names and comments,
28488         but not semantics, to minimize the differences between these two files.
28489         (safe_read): Change comment to mention SAFE_READ_ERROR.
28490
28491         * lib/safe-read.c (IS_EINTR): Define.
28492         (safe_read): Use IS_EINTR in place of in-function cpp directives.
28493
28494 2002-12-02  Jim Meyering  <jim@meyering.net>
28495
28496         * lib/safe-read.c (EINTR): Define.
28497         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
28498         (INT_MAX): Provide fallback.
28499         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
28500
28501         * lib/safe-read.h (SAFE_READ_ERROR): Define.
28502
28503 2002-12-02  Bruno Haible  <bruno@clisp.org>
28504
28505         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
28506         Define, taken from safe-read.c.
28507         (INT_MAX): Provide fallback.
28508         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
28509         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
28510
28511         * lib/safe-read.c (EINTR): Remove definition.
28512         (safe_read): Don't use EINTR if it is absent.
28513
28514 2002-12-01  Jim Meyering  <jim@meyering.net>
28515
28516         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
28517         zero.
28518         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
28519
28520 2002-11-27  Paul Eggert  <eggert@twinsun.com>
28521
28522         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
28523         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
28524         with `if (! (value < limit)) abort ();', for readability.
28525
28526 2002-11-26  Karl Berry  <karl@gnu.org>
28527
28528         * lib/strdup.c: copy from libc again, with jim's ok.
28529         * lib/.cppi-disable: re-add strdup.c
28530
28531 2002-11-25  Karl Berry  <karl@gnu.org>
28532
28533         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
28534         instead of "strtol.c".
28535
28536 2002-11-25  Karl Berry  <karl@gnu.org>
28537
28538         * config/install-sh: update from automake for variable quoting, $0 in
28539         error msgs, etc.
28540
28541         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
28542         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
28543         entry.
28544
28545 2002-11-25  Jim Meyering  <jim@meyering.net>
28546
28547         * lib/mktime.c: Sync from libc, now that it has the latest fix.
28548
28549 2002-11-24  Karl Berry  <karl@gnu.org>
28550
28551         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
28552         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
28553
28554 2002-11-24  Jim Meyering  <jim@meyering.net>
28555
28556         Update from coreutils:
28557
28558         * lib/mktime.c: Merge in changes from libc.
28559
28560         Avoid a link-time failure on some Linux systems.
28561         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
28562         (otherwise).
28563         (__mon_yday): Declare with the STATIC attribute.
28564         (__mktime_internal): Likewise.
28565         Based on a report from Greg Schafer.
28566
28567 2002-11-23  Jim Meyering  <jim@meyering.net>
28568
28569         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
28570         Use `unsigned', not `int', as type of index.
28571
28572         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
28573
28574         * lib/fsusage.c: Remove unneeded parentheses around operands of
28575         `defined'.
28576
28577 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28578
28579         * lib/quotearg.h: Allow multiple inclusion by surrounding with
28580         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
28581         so that we can be included first.
28582         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
28583         * lib/quotearg.c: Include quotearg.h immediately after config.h.
28584         No need to include stddef.h or sys/types.h any more.
28585         Surround local include files with "", not "<>".
28586         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
28587         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
28588         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
28589         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
28590         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
28591         (ISPRINT): Remove; no longer needed now that we assume C89.
28592
28593         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
28594         Preserve errno.
28595
28596         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
28597         quotearg_char): Use SIZE_MAX rather than
28598         (size_t) -1 when we are talking about "infinity".
28599
28600         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
28601
28602 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28603
28604         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
28605         hint that one should use `if (! x) abort ();' rather than `assert
28606         (x);', and anyway it's one less thing to worry about configuring.
28607         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
28608         hash_rehash, hash_insert): Use abort rather than assert.
28609
28610 2002-11-22  Bruno Haible  <bruno@clisp.org>
28611
28612         * lib/safe-read.h: Assume C89. Add comments.
28613         (safe_read): Change return type to size_t.
28614         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
28615         byte counts > SSIZE_MAX correctly.
28616         * lib/safe-write.h: New file.
28617         * lib/safe-write.c: New file.
28618         * lib/full-read.h: New file.
28619         * lib/full-read.c: New file.
28620         * lib/full-write.h: Assume C89. Add comments.
28621         * lib/full-write.c: Include safe-write.h.
28622         (full_write): Rewritten to use safe_write.
28623         Suggested by Jim Meyering and Paul Eggert.
28624
28625 2002-11-21  Jim Meyering  <jim@meyering.net>
28626
28627         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
28628
28629         Merge in changes from the coreutils.
28630
28631         2002-09-25  Paul Eggert  <eggert@twinsun.com>
28632         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
28633         <stdint.h>.
28634         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
28635         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
28636         int.  Work more efficiently if X is the same width as uintmax_t.
28637         Do not compare X to -1, to avoid bogus compiler warning.
28638         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
28639         Don't assume that f_frsize and f_bsize are the same type.
28640
28641         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
28642         warning on FreeBSD.
28643
28644         * lib/makepath.c (make_path): Restore umask *before* creating the final
28645         component.
28646         (make_path): Minor reformatting.
28647
28648         * lib/xmalloc.c: Adjust to work with new autoconf macros,
28649         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
28650         HAVE_MALLOC/HAVE_REALLOC.
28651
28652         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
28653         dummy ones.  At least on GNU/Linux systems, `auto' means something
28654         else.
28655         From Michael Stone.
28656
28657 2002-11-21  Bruno Haible  <bruno@clisp.org>
28658
28659         Remove case insensitive option matching.
28660         * lib/argmatch.h (argcasematch): Remove declaration.
28661         (ARGCASEMATCH): Remove macro.
28662         (__xargmatch_internal): Remove case_sensitive argument.
28663         (XARGMATCH): Update.
28664         (XARGCASEMATCH): Remove macro.
28665         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
28666         case_sensitive argument.
28667         (argcasematch): Remove function.
28668         (__xargmatch_internal): Remove case_sensitive argument.
28669         (main): Use XARGMATCH instead of XARGCASEMATCH.
28670
28671         * lib/xmalloc.c: Change compile-time error message. Add comment about
28672         required autoconf version.
28673
28674 2002-11-20  Paul Eggert  <eggert@twinsun.com>
28675
28676         Merge argmatch cleanups from Bison.  Assume C89.
28677
28678         * lib/argmatch.c: Include config.h here, not in argmatch.h.
28679         Include stdlib.h, for EXIT_FAILURE.
28680         Always include <string.h>, since we assume C89.
28681         (EXIT_FAILURE): Remove pre-C89 bug workaround.
28682         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
28683         Include <stddef.h> instead, since it's all we need for size_t.
28684         (PARAMS): Remove.  All uses removed.
28685         (ARRAY_CARDINALITY): Do not bother to #undef.
28686         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
28687         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28688         Remove unnecessary parentheses.
28689         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28690         Insert necessary parentheses.
28691         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
28692         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
28693
28694 2002-11-19  Bruno Haible  <bruno@clisp.org>
28695
28696         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
28697         * lib/mbswidth.h: Include <stddef.h>, for size_t.
28698
28699         * lib/mbswidth.h (PARAMS): Remove macro.
28700         (mbswidth, mbsnwidth): Use ANSI C function declarations.
28701         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
28702
28703         * lib/gcd.h (PARAMS): Remove macro.
28704         (gcd): Use ANSI C function declarations.
28705         * lib/gcd.c (gcd): Likewise.
28706
28707 2002-11-15  Bruno Haible  <bruno@clisp.org>
28708
28709         * lib/strcspn.c: Include <stddef.h>.
28710         (strcspn): Use ANSI C function declaration. Change return type to
28711         size_t. Use NULL.
28712         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
28713         (strpbrk): Use NULL.
28714         * lib/strpbrk.h (PARAMS): Remove macro.
28715         (strpbrk): Use ANSI C function declaration.
28716         * lib/strstr.c: Don't include <sys/types.h>.
28717         * lib/strstr.h (PARAMS): Remove macro.
28718         (strstr): Use ANSI C function declarations.
28719
28720 2002-11-14  Karl Berry  <karl@gnu.org>
28721
28722         * config/mkinstalldirs: `do' on separate line, instead of
28723         `for var; do'.
28724
28725 2002-11-06  Bruno Haible  <bruno@clisp.org>
28726
28727         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
28728         * lib/gcd.c (gcd): Likewise.
28729
28730 2002-11-05  Bruno Haible  <bruno@clisp.org>
28731
28732         * lib/gcd.h: New file, from gettext-0.11.5.
28733         * lib/gcd.c: New file, from gettext-0.11.5.
28734
28735 2002-11-05  Bruno Haible  <bruno@clisp.org>
28736
28737         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28738         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28739         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28740         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28741
28742         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
28743         <libintl.h>.
28744         * lib/makepath.c: Include gettext.h instead of <locale.h> and
28745         <libintl.h>.
28746
28747         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
28748         * lib/human.c: Include gettext.h instead of <libintl.h>.
28749         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
28750         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
28751         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
28752         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
28753         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
28754         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
28755         (textdomain): Remove definition.
28756         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
28757
28758         * lib/long-options.c: Remove include of <libintl.h> and definition of
28759         _.
28760         * lib/same.c: Remove include of <libintl.h> and definition of _.
28761
28762 2002-11-04  Owen Taylor  <otaylor@redhat.com>
28763
28764         * lib/config.charset: A few additions for Solaris.
28765
28766 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28767
28768         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
28769         * lib/localcharset.c (locale_charset): Declare as extern "C".
28770
28771 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28772
28773         * lib/config.charset: msdos in uk_UA uses CP1125.
28774
28775 2002-11-04  Bruno Haible  <bruno@clisp.org>
28776
28777         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
28778         * lib/strcase.h: New file, from GNU gettext-0.11.5.
28779         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
28780         * lib/strstr.h: New file, from GNU gettext-0.11.5.
28781         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
28782
28783 2002-11-04  Bruno Haible  <bruno@clisp.org>
28784
28785         * lib/localcharset.c (locale_charset): Don't return an empty string.
28786
28787 2002-11-04  Bruno Haible  <bruno@clisp.org>
28788
28789         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
28790         aliases.
28791
28792 2002-11-04  Bruno Haible  <bruno@clisp.org>
28793
28794         * lib/config.charset: Update for newest glibc. Add canonical names
28795         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
28796
28797 2002-11-04  Bruno Haible  <bruno@clisp.org>
28798
28799         * lib/config.charset: Add support for NetBSD.
28800
28801 2002-11-04  Bruno Haible  <bruno@clisp.org>
28802
28803         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
28804
28805 2002-11-01  Bruno Haible  <bruno@clisp.org>
28806
28807         * configure.in: Add AC_CONFIG_AUX_DIR call.
28808         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
28809         test/Makefile.
28810         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
28811
28812 2002-09-28  Karl Berry  <karl@gnu.org>
28813
28814         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
28815         installed automake until the next release, since changes have been
28816         made.
28817
28818 2002-09-25  Karl Berry  <karl@gnu.org>
28819
28820         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
28821         * lib/getopt*: copy from libc/posix.
28822         * lib/gettext.h: copy from gettext.
28823         * lib/.cppi-disable: add strdup.c, gettext.h.
28824
28825 2002-09-25  Karl Berry  <karl@gnu.org>
28826
28827         * config/srclist.txt: enable gettext.h check.
28828         * config/config.{guess,sub}: update from prep.
28829         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
28830                 from automake 1.6.3.
28831         See srclist*.
28832
28833 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
28834
28835         * regex.c (PATFETCH): Remove the translating fetch.
28836         (PATFETCH_RAW): Rename to PATFETCH.
28837         (set_image_of_range): New fun.
28838         (SET_RANGE_TABLE_WORK_AREA): Use it.
28839         (regex_compile): Don't translate the pattern chars so eagerly.
28840         Only do it when inserting an `exactn' bytecode or when handling
28841         a char-range.
28842         (mutually_exclusive_p): Avoid empty statement.
28843
28844 2002-07-06  Jim Meyering  <meyering@lucent.com>
28845
28846         * m4/README: Don't mention Makefile.am.in.
28847         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
28848
28849 2002-07-01  Jim Meyering  <meyering@lucent.com>
28850
28851         * lib/c-stack.c: Include sys/time.h.
28852         From Volker Borchert.
28853
28854 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28855
28856         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
28857
28858 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28859
28860         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
28861         New macro.  Use it uniformly instead of
28862         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
28863         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
28864         reported by Vin Shelton.
28865
28866 2002-06-22  Paul Eggert  <eggert@twinsun.com>
28867
28868         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
28869         Do not assume SA_SIGINFO behavior.
28870         Bug reported by Jim Meyering on NetBSD 1.5.2.
28871
28872 2002-06-22  Jim Meyering  <meyering@lucent.com>
28873
28874         * m4/c-stack.m4: New file, from diffutils-2.8.2.
28875         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
28876
28877         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
28878         now that configure.ac uses AC_GNU_SOURCE.
28879         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
28880         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
28881
28882         Update to latest tools.  Suggestions from Paul Eggert.
28883         * m4/stdbool.m4: New file, from diffutils-2.8.2.
28884         * m4/gnu-source.m4: Update from diffutils-2.8.2.
28885         * m4/fnmatch.m4: Likewise.
28886         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
28887         to AC_HEADER_STDBOOL
28888
28889 2002-06-22  Jim Meyering  <meyering@lucent.com>
28890
28891         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
28892         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
28893
28894 2002-06-22  Jim Meyering  <meyering@lucent.com>
28895
28896         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
28897
28898         * lib/exitfail.c, exitfail.h: Likewise.
28899         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
28900
28901         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
28902         of fnmatch.h.
28903         (EXTRA_DIST): Add fnmatch_loop.c.
28904         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
28905
28906         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
28907         * lib/fnmatch.c: Update from diffutils-2.8.2.
28908         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
28909         * lib/fnmatch.h: Remove file.
28910
28911 2002-06-21  Jim Meyering  <meyering@lucent.com>
28912
28913         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
28914         * m4/mbrtowc.m4: Likewise.
28915
28916         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
28917         * m4/mbswidth.m4: Reflect name change:
28918         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
28919         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
28920
28921         * m4/lib-link.m4: Update from gettext-0.11.2.
28922         * m4/gettext.m4: Likewise.
28923
28924         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
28925         From Alfred M. Szmidt.
28926
28927 2002-06-18  Paul Eggert  <eggert@twinsun.com>
28928
28929         * lib/file-type.h: Report an error if neither S_ISREG nor
28930         S_IFREG is defined, instead of using a test specific to glibc
28931         2.2.  This should be safe, since POSIX requires S_ISREG and
28932         Unix Version 7 had S_IFREG.  We don't need to check for
28933         <sys/types.h> since we don't use any symbols that it defines.
28934
28935 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
28936
28937         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
28938         $@-t, so that each temporary file name is unique and valid in the first
28939         8 characters, for operation under DOS.
28940
28941 2002-06-15  Paul Eggert  <eggert@twinsun.com>
28942
28943         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
28944
28945 2002-06-15  Jim Meyering  <meyering@lucent.com>
28946
28947         Work even with DJGPP 2.03, which lacks support for symlinks.
28948         From Richard Dawe.
28949         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
28950         is defined.
28951         * lib/lchown.c (S_ISLNK): Likewise.
28952
28953 2002-06-15  Jim Meyering  <meyering@lucent.com>
28954
28955         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
28956         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
28957         have been included before this file.
28958
28959 2002-06-14  Jim Meyering  <meyering@lucent.com>
28960
28961         * lib/file-type.h: Use the version from diffutils-2.8.2.
28962         * lib/file-type.c: Likewise.
28963
28964 2002-06-07  Jim Meyering  <meyering@lucent.com>
28965
28966         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
28967         They're needed at least for NetBSD 1.5.2.
28968         ($statxfs_includes): Include those same headers.
28969         ($statxfs_includes): Include sys/vfs.h if available.
28970         ($statxfs_includes): Likewise for sys/statvfs.h.
28971         Check for the following members in both structs statfs and statvfs:
28972         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
28973
28974 2002-06-01  Jim Meyering  <meyering@lucent.com>
28975
28976         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
28977         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
28978
28979 2002-05-28  Jim Meyering  <meyering@lucent.com>
28980
28981         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
28982         Reported by Volker Borchert.
28983
28984 2002-05-27  Jim Meyering  <meyering@lucent.com>
28985
28986         Fix a problem seen only on nonconforming systems whereby ls.c's
28987         use of localtime, and then of gettimeofday would cause trouble:
28988         the localtime call used to initialize rpl_gettimeofday's save
28989         mechanism would clobber ls's current local time information so
28990         that in any long listing the first file would always be listed
28991         with date 1970-01-01.  Analysis by Volker Borchert.
28992
28993         * lib/gettimeofday.c (localtime): Undefine.
28994         (rpl_localtime): New function.
28995
28996 2002-05-27  Jim Meyering  <meyering@lucent.com>
28997
28998         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
28999         localtime.
29000
29001         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
29002         use the replacement function; it wouldn't resolve at link time.
29003         Reported by Volker Borchert.
29004
29005 2002-05-22  Jim Meyering  <meyering@lucent.com>
29006
29007         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
29008         file-type.h.
29009         * lib/file-type.h: New file.
29010         * lib/file-type.c (file_type): New file/function.  Extracted from
29011         diffutils.
29012
29013 2002-04-30  Jim Meyering  <meyering@lucent.com>
29014
29015         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
29016
29017 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29018
29019         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
29020
29021 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29022
29023         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
29024         Do not check for alloca.h (no longer used) or stdbool.h (was never
29025         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
29026
29027 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29028
29029         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
29030
29031 2002-04-29  Jim Meyering  <meyering@lucent.com>
29032
29033         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
29034         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
29035         Use AC_FUNC_STRNLEN here instead.
29036
29037         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
29038         With autoconf-2.53a, it's part of AC_PROG_CC.
29039
29040 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29041
29042         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
29043         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
29044
29045 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29046
29047         * lib/sig2str.h, lib/sig2str.c: New files.
29048         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
29049
29050 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29051
29052         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
29053         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
29054         of 127, since 64 is the largest conceivable number for ancient
29055         nonstandard hosts.
29056         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
29057
29058 2002-04-28  Jim Meyering  <meyering@lucent.com>
29059
29060         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
29061
29062 2002-04-24  Jim Meyering  <meyering@lucent.com>
29063
29064         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
29065         (jm_PREREQ): Use it.
29066
29067         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
29068         mach/mach.h fcntl.h.
29069         Check for this function: setlocale.
29070
29071 2002-04-24  Jim Meyering  <meyering@lucent.com>
29072
29073         * lib/gettext.h: New file, from Gettext.
29074         * lib/Makefile.am (INCLUDES): Remove -I../intl.
29075         (libfetish_a_SOURCES): Add gettext.h.
29076
29077 2002-04-16  Jim Meyering  <meyering@lucent.com>
29078
29079         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
29080         ut_pid, ut_id, ut_exit.
29081
29082 2002-04-16  Jim Meyering  <meyering@lucent.com>
29083
29084         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
29085         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
29086         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
29087
29088 2002-04-12  Jim Meyering  <meyering@lucent.com>
29089
29090         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
29091         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
29092         existence of the getmntinfo function.  Needed for Darwin 5.3.
29093
29094         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
29095         This is necessary at least on Darwin 5.3.
29096
29097         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
29098         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
29099         strnlen.o in the library, and that makes some versions of ranlib
29100         object.
29101
29102 2002-04-12  Jim Meyering  <meyering@lucent.com>
29103
29104         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
29105
29106 2002-04-09  Jim Meyering  <meyering@lucent.com>
29107
29108         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
29109         to be more precise.  Rather than saying we're checking whether the
29110         function `works', say what we're testing.
29111         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
29112         Reported by Bruno Haible.
29113
29114 2002-03-10  Jim Meyering  <meyering@lucent.com>
29115
29116         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
29117         Suggestion from Santiago Vila.
29118
29119 2002-03-08  Jim Meyering  <meyering@lucent.com>
29120
29121         * lib/rename.c: Mention that this wrapper is needed also on
29122         mips-dec-ultrix4.4 systems.
29123
29124 2002-03-02  Jim Meyering  <meyering@lucent.com>
29125
29126         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
29127         not HAVE_CLOCK_SETTIME.
29128
29129 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29130
29131         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
29132         Check for clock_settime.
29133
29134 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29135
29136         * lib/nanosleep.h: Rename to....
29137         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
29138
29139         * lib/gettime.c: New file.
29140         * lib/settime.c: New file.
29141         * lib/stime.c: Remove.
29142
29143         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
29144         timespec.h.  Remove nanosleep.h.
29145
29146 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29147
29148         * m4/acl.m4: New file.
29149         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
29150         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
29151
29152 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29153
29154         * lib/acl.c, lib/acl.h: New files.
29155         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
29156
29157 2002-02-24  Jim Meyering  <meyering@lucent.com>
29158
29159         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
29160         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
29161         cause trouble.  Reported by Nelson Beebe.
29162
29163 2002-02-23  Paul Eggert  <eggert@twinsun.com>
29164
29165         * lib/path-concat.c (xpath_concat): Reorder code to pacify
29166         compilers that don't know that xalloc_die never returns.
29167
29168 2002-02-20  Jim Meyering  <meyering@lucent.com>
29169
29170         * lib/getdate.c: Regenerate using bison-1.33.
29171
29172 2002-02-17  Jim Meyering  <meyering@lucent.com>
29173
29174         * config/config.guess (main): Don't use `head -1'; it's no longer
29175         portable. Use `sed 1q' instead.
29176
29177 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
29178
29179         * m4/codeset.m4: Upgrade to gettext-0.11.
29180         * m4/gettext.m4: Upgrade to gettext-0.11.
29181         * m4/glibc21.m4: Upgrade to gettext-0.11.
29182         * m4/iconv.m4: Upgrade to gettext-0.11.
29183         * m4/isc-posix.m4: Upgrade to gettext-0.11.
29184         * m4/lcmessage.m4: Upgrade to gettext-0.11.
29185         * m4/lib-ld.m4: New file, from gettext-0.11.
29186         * m4/lib-link.m4: New file, from gettext-0.11.
29187         * m4/lib-prefix.m4: New file, from gettext-0.11.
29188         * m4/progtest.m4: Upgrade to gettext-0.11.
29189
29190 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29191
29192         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
29193         (jm_PREREQ): Use it.
29194
29195 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29196
29197         * lib/posixver.c, lib/posixver.h: New files.
29198         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29199
29200 2002-02-02  Paul Eggert  <eggert@twinsun.com>
29201             Bruno Haible  <bruno@clisp.org>
29202
29203         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
29204         (fwrite_success_callback): New declaration.
29205         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
29206         print_unicode_char. Call failure callback instead of error.
29207         (fwrite_success_callback): New function.
29208         (exit_failure_callback): New function.
29209         (fallback_failure_callback): New function.
29210         (print_unicode_char): Call unicode_to_mb.
29211
29212 2002-01-26  Jim Meyering  <meyering@lucent.com>
29213
29214         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
29215         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
29216
29217 2002-01-26  Jim Meyering  <meyering@lucent.com>
29218
29219         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
29220
29221 2002-01-22  Paul Eggert  <eggert@twinsun.com>
29222
29223         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
29224
29225 2002-01-22  Jim Meyering  <meyering@lucent.com>
29226
29227         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
29228         Otherwise, some versions of automake would omit the rule that makes
29229         Makefile from Makefile.in.
29230
29231 2002-01-21  Paul Eggert  <eggert@twinsun.com>
29232
29233         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
29234         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29235         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
29236         (memcoll): Set errno to zero if there is no error.
29237
29238         * lib/quotearg.c (quotearg_buffer_restyled):
29239         Fix bug with quoting buffers containing NUL when backslashing escapes.
29240         This bug was exposed by the other changes in this patch.
29241         (quotearg_n_options): New arg ARGSIZE.
29242         All callers changed.
29243         (quoting_options_from_style): New function.
29244         (quotearg_n_style): Use it.
29245         (quotearg_n_style_mem): New function.
29246
29247         * lib/quotearg.h (quotearg_n_style_mem): New function.
29248
29249 2002-01-19  Jim Meyering  <meyering@lucent.com>
29250
29251         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
29252         Remove useless quotes: DF_PROG="df".
29253         * m4/strnlen.m4: New file.
29254
29255 2002-01-16  Paul Eggert  <eggert@twinsun.com>
29256
29257         * lib/backupfile.c (ISDIGIT): Comment fix.
29258         * lib/getdate.y (ISDIGIT): Likewise.
29259         * lib/posixtm.c (ISDIGIT, year): Likewise.
29260         * lib/strverscmp.c (ISDIGIT): Likewise.
29261         * lib/userspec.c (ISDIGIT): Likewise.
29262
29263 2002-01-16  Jim Meyering  <meyering@lucent.com>
29264
29265         * lib/getdate.y: Add three semicolons, each just before a closing
29266         brace. Bison (as of version 1.31) no longer papers over that mistake.
29267
29268 2002-01-05  Jim Meyering  <meyering@lucent.com>
29269
29270         * lib/version-etc.c (version_etc_copyright): Update copyright year.
29271
29272 2001-12-19  Paul Eggert  <eggert@twinsun.com>
29273
29274         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
29275         not silently exit merely because the output buffer happens to
29276         have nothing pending.
29277
29278 2001-12-18  Paul Eggert  <eggert@twinsun.com>
29279
29280         See the big note in ../ChangeLog.
29281         * lib/human.c (suffixes): Prefer K to k for 1024.
29282         (generate_suffix_backwards): New function.
29283         (human_readable_inexact): Use it.
29284         * lib/xstrtol.c (__xstrtol): If there is no number but there
29285         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
29286         Accept 'K' as well as 'k'.
29287
29288 2001-12-15  Jim Meyering  <meyering@lucent.com>
29289
29290         * lib/regex.h (__restrict_arr): Update from libc.
29291
29292         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
29293         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
29294         (STREQ): Define.
29295
29296 2001-12-14  Jim Meyering  <meyering@lucent.com>
29297
29298         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
29299         Suggestion from Bruno Haible.
29300
29301 2001-12-10  Jim Meyering  <meyering@lucent.com>
29302
29303         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
29304         xrealloc, Instead, include "xalloc.h".
29305         (initbuffer): Don't cast xmalloc return value to char*.
29306         (readline): Reword comment.
29307         Don't cast xrealloc return value to char*
29308         Return NULL, not 0.
29309
29310 2001-12-09  Jim Meyering  <meyering@lucent.com>
29311
29312         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
29313         about `signed and unsigned type in conditional expression'.
29314         * lib/posixtm.c (posix_time_parse): Likewise.
29315
29316         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
29317
29318         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
29319         to avoid a pedantic warning.
29320
29321         * lib/getstr.c: Don't include assert.h.
29322         (getstr): Remove warning-evoking assertions.
29323         Return -1 if offset parameter is out of bounds.
29324         Change the type of a local from int to size_t.
29325
29326         * lib/strftime.c (my_strftime_localtime_r): Include this function
29327         definition in the `#if ! HAVE_TM_GMTOFF' block.
29328
29329         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
29330         Include xalloc.h instead.
29331
29332 2001-12-02  Jim Meyering  <meyering@lucent.com>
29333
29334         * lib/tempname.c: Don't declare getenv, thus reverting the change of
29335         2001-11-18.  It's no longer necessary, now that stdlib.h is always
29336         included.
29337
29338         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
29339         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
29340
29341 2001-11-30  Akim Demaille  <akim@epita.fr>
29342
29343         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
29344         before being defined.
29345
29346 2001-11-27  Paul Eggert  <eggert@twinsun.com>
29347
29348         * lib/quotearg.h (quotearg_n, quotearg_n_style):
29349         First arg is int, not unsigned.
29350         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
29351         (SIZE_MAX, UINT_MAX): New macros.
29352         (quotearg_n_options): Abort if N is negative.
29353         Avoid overflow check on hosts where size_t is 64 bits and int
29354         is 32 bits, as overflow is impossible there.
29355         Fix off-by-one typo that caused unnecessary reallocation.
29356
29357 2001-11-27  Jim Meyering  <meyering@lucent.com>
29358
29359         * lib/tempname.c: Merge with version from libc.
29360         * lib/regex.c: Likewise.
29361
29362         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
29363         systems for which STDC_HEADERS is 0, it was not included, resulting in
29364         a warning about an integer-to-pointer conversion problem with getenv.
29365         Reported by Volker Borchert.
29366
29367 2001-11-26  Jim Meyering  <meyering@lucent.com>
29368
29369         * lib/gtod.h: Remove file.
29370         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
29371         * lib/gettimeofday.c: Don't include gtod.h.
29372         (GTOD_init): Remove function.
29373         (rpl_gettimeofday): Do its job here instead, rather than aborting.
29374         Suggestion from Volker Borchert.
29375
29376 2001-11-23  Jim Meyering  <meyering@lucent.com>
29377
29378         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
29379         it.
29380         * lib/hash.c (struct hash_table): Define it here instead.
29381
29382 2001-11-22  Jim Meyering  <meyering@lucent.com>
29383
29384         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
29385
29386 2001-11-20  Jim Meyering  <meyering@lucent.com>
29387
29388         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
29389         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
29390
29391 2001-11-19  Jim Meyering  <meyering@lucent.com>
29392
29393         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
29394         directory.  Use "conftestXXXXXX" as the template.
29395         Suggestion from Paul Eggert.
29396
29397         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
29398         immediately, so the test doesn't mistakenly hit the max-open-files
29399         limit.
29400
29401 2001-11-18  Paul Eggert  <eggert@twinsun.com>
29402
29403         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
29404         (TEMPORARIES): New macro.
29405         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
29406         removes an artificial limitation (e.g. HP-UX 10.20, where
29407         TMP_MAX is 17576).
29408
29409 2001-11-18  Jim Meyering  <meyering@lucent.com>
29410
29411         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
29412
29413 2001-11-18  Jim Meyering  <meyering@lucent.com>
29414
29415         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
29416         on SunOS 4.
29417
29418         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
29419         files will be created before anything else.
29420
29421 2001-11-17  Paul Eggert  <eggert@twinsun.com>
29422
29423         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
29424         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
29425
29426 2001-11-17  Jim Meyering  <meyering@lucent.com>
29427
29428         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
29429         Prompted by a report from Bob Proulx.
29430
29431         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
29432         Instead, require UTILS_FUNC_MKSTEMP.
29433
29434 2001-11-17  Jim Meyering  <meyering@lucent.com>
29435
29436         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
29437         Now, that's done as part of AC_FUNC_STRTOD.
29438
29439 2001-11-17  Jim Meyering  <meyering@lucent.com>
29440
29441         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
29442         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
29443         rather than group writable.  Patch by Juan F. Codagnone.
29444
29445         * lib/readtokens.c: Remove explicit declarations of xmalloc and
29446         xrealloc, Instead, include "xalloc.h".
29447
29448         * lib/mountlist.c: Include unlocked-io.h after all system headers.
29449         Remove explicit declarations of xmalloc, xrealloc,
29450         and xstrdup.  Instead, include "xalloc.h".
29451
29452         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
29453         unlocked-io.h.
29454         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
29455         Likewise.
29456         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
29457
29458         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
29459         Reported by Padraig Brady.
29460
29461         * lib/mkstemp.c: #undef mkstemp.
29462         Include config.h.
29463         (rpl_mkstemp): Rename from mkstemp.
29464         Protoize.
29465
29466 2001-11-16  Jim Meyering  <meyering@lucent.com>
29467
29468         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
29469         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
29470         determine the amount of total physical memory, use pstat_getstatic.
29471         HPUX-11 doesn't define _SC_PHYS_PAGES.
29472         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
29473         If sysconf couldn't be used to determine the amount of available
29474         physical memory, use both pstat_getstatic and pstat_getdynamic.
29475         Based on a patch from Bob Proulx.
29476
29477 2001-11-10  Jim Meyering  <meyering@lucent.com>
29478
29479         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
29480         (jm_PREREQ): Use it.
29481
29482 2001-11-09  Jim Meyering  <meyering@lucent.com>
29483
29484         * m4/jm-macros.m4: Require autoconf-2.52f.
29485         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
29486         Use these AC_-prefixed names, not the AM_-prefixed ones.
29487
29488         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
29489
29490 2001-11-05  Jim Meyering  <meyering@lucent.com>
29491
29492         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
29493
29494 2001-11-04  Jim Meyering  <meyering@lucent.com>
29495
29496         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
29497         $DEFS.
29498
29499 2001-11-03  Jim Meyering  <meyering@lucent.com>
29500
29501         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
29502         of AC_DEFUN.
29503
29504         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
29505         know the name of the variable in the macro definition.
29506
29507 2001-11-03  Jim Meyering  <meyering@lucent.com>
29508
29509         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
29510         in argmatch_to_argument call.
29511
29512         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
29513         argument.
29514
29515         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
29516         e.g., a fault due to an attempt to free a NULL pointer.
29517
29518 2001-11-01  Jim Meyering  <meyering@lucent.com>
29519
29520         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
29521         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
29522
29523 2001-11-01  Jim Meyering  <meyering@lucent.com>
29524
29525         * lib/dirfd.c, lib/dirfd.h: New files.
29526         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
29527
29528         * lib/hash.c (hash_print) [TESTING]: Clean up.
29529
29530 2001-10-22  Paul Eggert  <eggert@twinsun.com>
29531
29532         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
29533         to avoid a warning if -Wall.
29534
29535 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
29536
29537         * README: New file
29538         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
29539         (per RMS's instructions, this is now the canonical source)
29540         * lgpl/, gpl/: New directories.
29541
29542 2001-10-21  Paul Eggert  <eggert@twinsun.com>
29543
29544         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
29545
29546 2001-10-21  Jim Meyering  <meyering@lucent.com>
29547
29548         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
29549         this code would end up calling gettext even in packages built
29550         with --disable-nls.
29551         * lib/getopt.c (_): Likewise.
29552         * lib/regex.c (_): Likewise.
29553
29554 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29555
29556         * m4/error.m4 (jm_PREREQ_ERROR):
29557         Do not invoke AC_CHECK_FUNCS with strerror_r, as
29558         AC_FUNC_STRERROR_R does that.
29559         Check for strerror declaration.
29560
29561         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
29562         are supposed to have them these days.
29563         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
29564         Merge changes from latest Autoconf CVS.
29565         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
29566         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
29567         POSIX decided to standardize on the int flavor of strerror_r.
29568
29569 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29570
29571         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
29572         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
29573         Use strerror_r that is only a macro, even if it is not a function.
29574         (strerror): Check for HAVE_DECL_STRERROR before declaring.
29575         (private_strerror): Use prototypes, not old-style function definition.
29576         (print_errno_message): New function.
29577         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
29578         char*-flavored one.
29579         (error_tail, error, error_at_line): Use it.
29580
29581 2001-10-11  Jim Meyering  <meyering@lucent.com>
29582
29583         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
29584         and quote_n (1, ... to avoid clobbering a buffer.
29585
29586 2001-10-05  Jim Meyering  <meyering@lucent.com>
29587
29588         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
29589         hash-pjw.h.
29590         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
29591         * lib/hash-pjw.h: New file.
29592
29593 2001-09-30  Jim Meyering  <meyering@lucent.com>
29594
29595         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
29596         `struct fsstat' has the `f_fstypename' member.
29597         Use that to define FS_TYPE, which is now used to make
29598         the getfsstat link test tighter.
29599
29600 2001-09-30  Jim Meyering  <meyering@lucent.com>
29601
29602         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
29603         Include <sys/ucred.h>, for Apple Darwin.
29604         Include sys/mount.h and sys/fs_types.h only if available.
29605         (FS_TYPE): Define.
29606         (read_filesystem_list): Use FS_TYPE.
29607
29608 2001-09-29  Paul Eggert  <eggert@twinsun.com>
29609
29610         * lib/exclude.c (excluded_filename): 0 -> false, since it's
29611         a boolean context.
29612
29613 2001-09-29  Jim Meyering  <meyering@lucent.com>
29614
29615         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29616         [one-argument getmntent function]): Include stdio.h before mntent.h.
29617         SunOS 4.1.x needs it for the declaration of `FILE'.
29618         Patch by Volker Borchert.
29619
29620         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29621         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
29622         sys/fs_types.h, and make the link-test for getfsstat guard #include
29623         directives with appropriate #if HAVE_*_H tests so that we can
29624         detect getfsstat on Apple Darwin1.3.7 systems.
29625         Reported by Nelson Beebe.
29626         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
29627
29628 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29629
29630         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29631         #defines strtoimax.  Also treat the other strto* functions
29632         like strtoimax.
29633
29634         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29635         Check for strtoul and strtoumax,
29636         as those declarations are made even in the signed case.
29637         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
29638         Likewise, for strtol and strtoimax.
29639
29640 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29641
29642         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29643         #defines strtoimax.  Also treat the other strto* functions
29644         like strtoimax.
29645
29646         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
29647         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
29648         (strtoimax, strtoumax): Do not declare if already defined as a macro.
29649
29650 2001-09-26  Jim Meyering  <meyering@lucent.com>
29651
29652         Most macros in unlocked-io.h had the wrong number of arguments.
29653         * lib/gen-uio: New script.
29654         (USE_UNLOCKED_IO): Define to 1 if not already defined.
29655         * lib/unlocked-io.hin: Remove file.
29656         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
29657         rather than trying to embed it here.
29658         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
29659         Reported by Padraig Brady.
29660
29661 2001-09-25  Volker Borchert  <bt@teknon.de>
29662
29663         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
29664         `result'.
29665
29666 2001-09-24  Jim Meyering  <meyering@lucent.com>
29667
29668         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
29669
29670 2001-09-23  Jim Meyering  <meyering@lucent.com>
29671
29672         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
29673         instead of the mere test for existence of mntent.h.  The latter
29674         would get a false-positive on AIX 3.4 systems.
29675         In the outer getmntent if-block, don't die if neither of the getmntent
29676         tests succeeds.  Instead, just fall through and continue with the
29677         remaining tests.
29678
29679 2001-09-23  Jim Meyering  <meyering@lucent.com>
29680
29681         * lib/mountlist.c: Remove useless parentheses in #if directives.
29682         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
29683         the deprecated MOUNTED symbol is no longer defined in mntent.h.
29684
29685 2001-09-22  Jim Meyering  <meyering@lucent.com>
29686
29687         * m4/gettext.m4: New file.  From gettext.
29688         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
29689         * m4/progtest.m4: Likewise
29690         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
29691         * m4/glibc21.m4: Likewise.
29692
29693         * m4/libintl.m4: Remove.  No longer used.
29694
29695 2001-09-22  Jim Meyering  <meyering@lucent.com>
29696
29697         * lib/localcharset.c: Update from latest gettext.
29698         * lib/config.charset: Likewise.
29699
29700 2001-09-20  Jim Meyering  <meyering@lucent.com>
29701
29702         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
29703         strtoimax.
29704         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
29705         strtoumax.
29706
29707 2001-09-20  Jim Meyering  <meyering@lucent.com>
29708
29709         * lib/xstrtol.c (strtoimax): Guard declaration with
29710         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
29711         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
29712         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
29713         (strtoumax): Likewise, for completeness (it wasn't necessary).
29714
29715 2001-09-17  Paul Eggert  <eggert@twinsun.com>
29716
29717         * lib/strtoimax.c (HAVE_LONG_LONG):
29718         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
29719         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
29720         to work around bug in IBM C compiler.
29721
29722 2001-09-17  Jim Meyering  <meyering@lucent.com>
29723
29724         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
29725         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
29726         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
29727         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
29728         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
29729         whenever the right hand side need not be expanded by the shell.
29730
29731 2001-09-16  Paul Eggert  <eggert@twinsun.com>
29732
29733         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
29734         library.  It's not correct, as some older glibcs are buggy.
29735         fnmatch wasn't fixed until glibc 2.2.
29736
29737         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
29738         special shell magic here.
29739
29740 2001-09-16  Jim Meyering  <meyering@lucent.com>
29741
29742         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
29743         * m4/jm-macros.m4: Require it.
29744
29745 2001-09-16  Jim Meyering  <meyering@lucent.com>
29746
29747         * lib/mkdir.c: New file.
29748
29749 2001-09-15  Jim Meyering  <meyering@lucent.com>
29750
29751         * m4/jm-macros.m4: Check for help2man.
29752
29753 2001-09-11  Jim Meyering  <meyering@lucent.com>
29754
29755         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
29756         The body, by Paul Eggert, was moved here from configure.in.
29757         * m4/jm-macros.m4: Require UTILS_HOST_OS.
29758
29759 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29760
29761         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
29762         (jm_PREREQ): Use it.
29763
29764 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29765
29766         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
29767         Use ssize_t, not int, to store result of readlink.
29768         Check for ssize_t overflow as well as size_t overflow,
29769         as POSIX says the result of readlink is implementation-defined
29770         when ssize_t overflows.
29771         Remove unnecessary cast to char*.
29772         Use free+malloc instead of realloc, as the storage doesn't need
29773         to be preserved and it's clearer and can be more efficient that way.
29774         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
29775         * lib/xreadlink.h (xreadlink): Update prototype.
29776
29777 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29778
29779         * lib/xgetcwd.c: Revert some of the previous change; intead,
29780         fix the HAVE_GETCWD_NULL code to behave more like the
29781         !HAVE_GETCWD_NULL code used to.
29782
29783         Include "xalloc.h".
29784         (xgetcwd): Do not return NULL when memory is exhausted; instead,
29785         invoke xalloc_die.
29786
29787 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29788
29789         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
29790         sys/param.h, as pathmax.h includes them.
29791
29792 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29793
29794         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
29795         (jm_PREREQ_XGETCWD): New macro.
29796
29797         * m4/getcwd.m4: New file.
29798
29799 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29800
29801         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
29802         like the HAVE_GETCWD_NULL code.
29803         Include pathmax.h if not HAVE_GETCWD.
29804         Do not include xalloc.h.
29805         (INITIAL_BUFFER_SIZE): New symbol.
29806         Do not use xmalloc / xrealloc, since the caller is responsible for
29807         handling errors.  Preserve errno around `free' during failure.
29808         Do not overrun buffer when using getwd.
29809
29810 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29811
29812         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
29813         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
29814         getcwd (NULL, 0).
29815
29816 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29817
29818         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
29819         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
29820         spotted by Jim Meyering.
29821
29822 2001-09-03  Jim Meyering  <meyering@lucent.com>
29823
29824         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
29825         failure.
29826
29827 2001-09-02  Jim Meyering  <meyering@lucent.com>
29828
29829         * lib/error.c: Update from GNU libc.
29830
29831 2001-09-01  Jim Meyering  <meyering@lucent.com>
29832
29833         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
29834         Used by df.
29835
29836 2001-09-01  Jim Meyering  <meyering@lucent.com>
29837
29838         * lib/xreadlink.c: New file.
29839         * lib/xreadlink.h: New file.
29840         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
29841         xreadlink.h.
29842
29843         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
29844         doesn't conflict with sparc Solaris 7's definition in
29845         /usr/include/sys/int_types.h.
29846
29847         * lib/exclude.c: Use `""', not `<>' to #include non-system header
29848         files.
29849         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
29850         and strncasecmp as r-values.  Unixware didn't have declarations.
29851
29852 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29853
29854         * lib/xstrtol.h: Add copyright notice.
29855         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
29856         LONGINT_INVALID_SUFFIX_CHAR.
29857
29858 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29859
29860         * lib/xstrtol.c (strtoimax): New decl.
29861
29862 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29863
29864         * lib/xgetcwd.c: Don't include pathmax.h.
29865         Include stdlib.h and unistd.h if available.
29866         Include xalloc.h.
29867         (xmalloc, xstrdup, free): Remove decls.
29868         (xgetcwd): Don't assume sizes fit in unsigned.
29869         Check for overflow when computing sizes.
29870         Simplify reallocation code.
29871
29872 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29873
29874         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
29875         a directory's st_size can have an arbitrary value, so the old
29876         usage could waste an arbitrary amount of memory.  All uses
29877         changed.
29878         * lib/savedir.h: Update prototype.
29879
29880 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29881
29882         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
29883
29884         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
29885         old strtoimax.c.
29886
29887         Also, make the following further changes to make this file's
29888         configuration more similar to that of strtol.c:
29889         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
29890         (strtoumax, uintmax_t, strtoull, strtol): Remove.
29891         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
29892         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
29893         changed to signed values.
29894
29895         And make the following changes as well:
29896         Fix copyright notice, as 1999 was missing.
29897         (verify): New macro.
29898         (strtoimax): Check sizes at compile-time, not run-time.
29899         Prefer strtol to strtoll if both work.
29900         (main): Remove; it was not that useful and was a pain to maintain.
29901
29902         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
29903
29904 2001-08-31  Jim Meyering  <meyering@lucent.com>
29905
29906         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
29907         Use an initial, malloc'd, buffer of length 128 rather than
29908         a statically allocated one of length 1024.
29909
29910 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29911
29912         Simplify code, partly by assuming autoconf 2.52 semantics.
29913
29914         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
29915
29916         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
29917         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
29918         All uses removed.
29919         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
29920         Move AC_REQUIRE to next-to-top level, to avoid confusion.
29921         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
29922         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
29923         jm_AC_HEADER_INTTYPES_H.
29924         * m4/jm-macros.m4 (jm_MACROS): Likewise.
29925
29926         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
29927
29928         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29929         Quote first arg of AC_DEFUN.
29930         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
29931         since they are needed to parse the include file even if we need
29932         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
29933         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
29934         but with opposite signedness.
29935
29936 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29937
29938         Merge 'exclude' changes from tar 1.13.22.
29939         This fixes one or two unlikely storage allocation overflow bugs,
29940         but doesn't change user-visible behavior otherwise.
29941
29942 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29943
29944         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
29945         (jm_PREREQ_EXCLUDE): New macro.
29946
29947 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29948
29949         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
29950         tm to be declared.
29951
29952 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29953
29954         * lib/hash.c: Remove '2001' from copyright notice.
29955
29956 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29957
29958         * lib/full-write.h: New file.
29959         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
29960         * lib/full-write.c: Correct credits, as cccp.c no longer
29961         exists and anyway it was so heavily changed from the old cccp
29962         code as to be unrecognizable.  Include full-write.h.
29963         (full_write) Return size_t, with short writes meaning failure.
29964         All callers changed.  This fixes a bug with large buffers
29965         on 64-bit hosts.
29966         * lib/utime.c: Include full-write.h.
29967
29968 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29969
29970         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
29971         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
29972         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
29973         Include if available.
29974         (<xalloc.h>): Include
29975         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
29976         (verify): New macro.  Use it to verify that EXCLUDE macros do not
29977         collide with FNM macros.
29978         (struct patopts): New struct.
29979         (struct exclude): Use it, as exclude patterns now come with options.
29980         (new_exclude): Support above changes.
29981         (new_exclude, add_exclude_file):
29982         Initial size must now be a power of two to simplify overflow checking.
29983         (free_exclude, fnmatch_no_wildcards): New function.
29984         (excluded_filename): No longer requires options arg, as the options
29985         are determined by add_exclude.  Now returns bool, not int.
29986         (excluded_filename, add_exclude):
29987         Add support for the fancy new exclusion options.
29988         (add_exclude, add_exclude_file): Now takes int options arg.
29989         Check for arithmetic overflow when computing sizes.
29990         (add_exclude_file): xrealloc might modify errno, so don't
29991         realloc until after errno might be used.
29992
29993         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
29994         New macros.
29995         (free_exclude): New decl.
29996         (add_exclude, add_exclude_file): Now takes int options arg.
29997         (excluded_filename): No longer requires options arg, as the options
29998         are determined by add_exclude.  Now returns bool, not int.
29999
30000 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30001
30002         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
30003
30004 2001-08-27  Jim Meyering  <meyering@lucent.com>
30005
30006         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
30007
30008         * lib/version-etc.c (N_): Remove definition.
30009         Revert most of last change.
30010         Instead, simply don't mark the `Copyright...' string for translation.
30011         Based on advice from Paul Eggert.
30012
30013         * lib/strtoxmax.c: Tweak comment.
30014
30015 2001-08-26  Jim Meyering  <meyering@lucent.com>
30016
30017         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
30018
30019         * m4/xstrtoimax.m4: New file.
30020         * m4/xstrtoumax.m4: Add comments explaining why we
30021         AC_REPLACE_FUNCS(strtol).
30022
30023 2001-08-26  Jim Meyering  <meyering@lucent.com>
30024
30025         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
30026         of copyright with `%s' so translators don't get an untranslated
30027         message in 2002.
30028         (COPYRIGHT_YEAR): Define.
30029         (version_etc): Use fprintf rather than fputs.
30030         Suggestion from Ulrich Drepper.
30031
30032         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
30033
30034         * lib/strtoll.c: New file, from GNU libc.
30035         * lib/xstrtoimax.c: New file.
30036
30037         * lib/xstrtol.h: Add xstrtoimax.
30038         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
30039         * lib/strtoimax.c: New file.  Likewise, but first define
30040         STRTOUXMAX_SIGNED.
30041
30042         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
30043         ...
30044         * lib/strtoxmax.c: ... then renamed to this.
30045
30046 2001-08-18  Paul Eggert  <eggert@twinsun.com>
30047
30048         * m4/inttypes.m4: Add AC_PREREQ(2.13).
30049         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
30050         (jm_AC_TYPE_INTMAX_T): New macro.
30051         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
30052
30053         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
30054
30055         * m4/longlong.m4: Renamed from ulonglong.m4.
30056         * m4/inttypes.m4: Renamed from inttypes_h.m4.
30057         * m4/uintmax_t.m4: Removed.
30058
30059 2001-08-13  Paul Eggert  <eggert@twinsun.com>
30060
30061         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
30062         Port to Solaris 8, where 'sed' requires a space after the 'r'
30063         command, and where sh dislikes "$/".  Clean up the spacing a bit.
30064         Redirect output to $tmp just once.
30065
30066 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
30067
30068         * lib/addext.c (<errno.h>): Include.
30069         (errno): Declare if not defined.
30070         (addext): Work correctly when pathconf returns -1 and leaves
30071         errno alone because there is no limit.  Also, work even if
30072         pathconf returns a value greater than SIZE_MAX.
30073
30074 2001-08-12  Jim Meyering  <meyering@lucent.com>
30075
30076         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
30077         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
30078         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
30079         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
30080         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
30081         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
30082         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
30083         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
30084         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
30085         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
30086         utime.m4, utimes.m4, xstrtoumax.m4:
30087         Quote the first argument in each use of AC_DEFUN.
30088
30089 2001-08-12  Jim Meyering  <meyering@lucent.com>
30090
30091         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
30092         Simply `return getcwd (NULL, 0);'.
30093         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
30094         Use 1300 as initial value for length, not PATH_MAX.
30095
30096         * lib/pathmax.h: Clean up cpp syntax.
30097
30098 2001-08-12  Jim Meyering  <meyering@lucent.com>
30099
30100         * lib/gettimeofday.c: New file.
30101         * lib/gtod.h: New file.
30102         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
30103
30104 2001-08-05  Jim Meyering  <meyering@lucent.com>
30105
30106         * m4/jm-macros.m4: Require autoconf-2.52.
30107
30108 2001-08-04  Jim Meyering  <meyering@lucent.com>
30109
30110         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
30111         stmt, to get in sync with glibc.
30112
30113 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30114
30115         The following changes are from gettext 0.10.39 as maintained by
30116         Bruno Haible.
30117
30118         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
30119         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
30120         with inverted sense.  All uses changed.
30121
30122         * lib/mbswidth.c: Don't include <limits.h>.
30123         Include <stdlib.h> and <string.h> unconditionally.
30124         (iswcntrl, mbsinit, ISCNTRL): New macros.
30125         (mbsnwidth): Use K&R style function declarations.
30126         Don't bother checking for MB_LEN_MAX == 1, since the compiler
30127         can optimize it when MB_CUR_MAX == 1.
30128         The width of control characters is zero, not 1.
30129
30130 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30131
30132         The following changes are from gettext 0.10.39 as maintained by
30133         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
30134
30135         * m4/codeset.m4: Upgrade to serial AM1.
30136         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
30137         all uses changed.  Quote first arg of AC_DEFUN.
30138         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
30139
30140         * m4/iconv.m4: Upgrade to serial AM2.
30141         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
30142         Add --with-libconv-prefix.
30143         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
30144         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
30145         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
30146         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
30147         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
30148
30149         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
30150         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
30151         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
30152         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
30153         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
30154         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
30155         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
30156         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
30157         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
30158
30159         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
30160         string.h any more.
30161
30162         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
30163         not the default value.
30164
30165         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
30166         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
30167         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
30168         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
30169         Also check for iswcntrl, used for wcwidth fallback.
30170         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
30171         to Autoconf 2.13.
30172
30173 2001-08-03  Jim Meyering  <meyering@lucent.com>
30174
30175         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
30176         as it was in the original.  Reported by Paul Eggert.
30177
30178 2001-07-16  Jim Meyering  <meyering@lucent.com>
30179
30180         * m4/gettimeofday.m4: New file.
30181         Prompted by a report from Bernhard Baehr.
30182
30183 2001-07-15  Jim Meyering  <meyering@lucent.com>
30184
30185         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
30186         stuff. Now it's in ../Makefile.cfg.
30187
30188 2001-07-15  Jim Meyering  <meyering@lucent.com>
30189
30190         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
30191         (BUILT_SOURCES): Add unlocked-io.h.
30192         (io_functions): Define.
30193         (unlocked-io.h): New rule.
30194         (DISTCLEANFILES): Add unlocked-io.h.
30195         (all-local): Depend on unlocked-io.h, to ensure it is created.
30196
30197         * lib/unlocked-io.hin: New file
30198
30199         * lib/regex.c: Update from glibc.
30200
30201 2001-07-05  Jim Meyering  <meyering@lucent.com>
30202
30203         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
30204         recommendation.
30205         (libfetish_a_SOURCES): Put all .h files here instead.
30206         Remove a thus-exposed (better checks in automake) duplicate and
30207         two unnecessary .h files.
30208
30209 2001-07-04  Jim Meyering  <meyering@lucent.com>
30210
30211         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
30212         that generates jm-glibc-io.m4 so that it doesn't trigger any make
30213         distcheck failure.
30214
30215 2001-07-02  Jim Meyering  <meyering@lucent.com>
30216
30217         The following changes were prompted by suggestions from Bruno Haible.
30218
30219         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
30220         is now generated.
30221         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
30222         definition of EXTRA_DIST.
30223         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
30224         ensure that the generated file is created/updated whenever the list
30225         of $(unlocked_functions) is changed.
30226         (jm-glibc-io.m4): New rule.
30227         (unlocked-io.h): New rule -- currently unused.
30228
30229 2001-06-24  Jim Meyering  <meyering@lucent.com>
30230
30231         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
30232         unmatched right bracket, rather than kludging it with an extra,
30233         falsely-matching quote in a comment.  Patch by Akim Demaille.
30234
30235 2001-06-11  Jim Meyering  <meyering@lucent.com>
30236
30237         * lib/regex.c: Update from GNU libc.
30238
30239 2001-05-27  Jim Meyering  <meyering@lucent.com>
30240
30241         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
30242         Check for ut_type in struct utmp.
30243
30244 2001-05-27  Jim Meyering  <meyering@lucent.com>
30245
30246         * lib/readutmp.h (UT_TYPE): Define.
30247
30248 2001-05-24  Jim Meyering  <meyering@lucent.com>
30249
30250         * lib/argmatch.c: Include "quote.h".
30251         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
30252         quote function.  Reported by Göran Uddeborg.
30253
30254 2001-05-22  Jim Meyering  <meyering@lucent.com>
30255
30256         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
30257         now that we use the package-supplied version unconditionally.
30258         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
30259
30260 2001-05-21  Jim Meyering  <meyering@lucent.com>
30261
30262         * m4/regex.m4: Change a couple backticks to single quotes to avoid
30263         shell syntax errors.
30264
30265 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30266
30267         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
30268
30269 2001-05-20  Paul Eggert  <eggert@twinsun.com>
30270
30271         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
30272         Don't bother to check library strftime, since
30273         we'll be using our own my_strftime function anyway.
30274         Define my_strftime instead of strftime.
30275
30276 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
30277
30278         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
30279         which is not yet declared.
30280
30281 2001-05-15  Jim Meyering  <meyering@lucent.com>
30282
30283         * m4/regex.m4: Use proper quoting so brackets appear in the test
30284         program.
30285         Reported by, and with help from, Bruno Haible.
30286
30287 2001-05-13  Jim Meyering  <meyering@lucent.com>
30288
30289         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
30290         undefined.
30291
30292 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30293
30294         dirname code cleanup.  base_name now behaves more compatibly
30295         with POSIX basename when given file names that have trailing
30296         slashes, and similarly for dir_name.  Add new primitives
30297         base_len and dir_len.  Put the directory-name-related decls
30298         into dirname.h.
30299
30300         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
30301         * lib/backupfile.c (base_name): Likewise.
30302         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
30303         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
30304         * lib/makepath.c (strip_trailing_slashes): Likewise.
30305         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
30306         ISSLASH): Likewise.
30307         * lib/rename.c (strip_trailing_slashes): Likewise.
30308         * lib/same.c (base_name): Likewise.
30309         * lib/stripslash.c (ISSLASH): Likewise.
30310
30311         * lib/addext.c: Include <dirname.h> after size_t is defined.
30312         * lib/backupfile.c: Likewise.
30313
30314         * lib/addext.c (addext): Use base_len to trim redundant
30315         trailing slashes instead of doing it ourselves.
30316         But do not trim the last slash if it is not redundant.
30317
30318         * lib/backupfile.c (find_backup_file_name,
30319         max_backup_version): Use base_len instead of rolling it ourselves.
30320         Handle the case of "" and (on DOS) "C:" correctly.
30321
30322         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
30323         needed. Include <string.h>, <dirname.h>.
30324         (base_name): Allow file names ending in slashes, other than names
30325         that are all slashes.  In this case, return the basename followed
30326         by the slashes.  This is more general, and can be used in places
30327         where the original base_name purposely had an assertion failure.
30328         (base_len): New function.
30329
30330         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
30331         Do not include <assert.h>; no longer needed.
30332         Include xalloc.h.
30333         (memrchr): Remove decl.
30334         (dir_name_r): Remove.
30335         (dir_len): Renamed from dirlen.  All callers changed.
30336         Rewrite in terms of base_name, for simplicity and consistency.
30337         (dir_name): Never return NULL.  All callers changed.
30338         Do not include <stdlib.h> in test program; no longer needed.
30339         return 0; is fine for test program.
30340
30341         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
30342         New macros.
30343         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
30344
30345         * lib/path-concat.c (path_concat): Use base_len to compute
30346         base length, not strlen; this means we cannot rely on memcpy
30347         to null-terminate.
30348
30349         * lib/same.c (STREQ): Remove.
30350         (same_name): Handle the case where the basename ends in trailing '/'.
30351
30352         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
30353         a slash was stripped.  Do not strip the last slash after a
30354         file system prefix.
30355
30356 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30357
30358         * lib/Makefile.am (libfetish_a_SOURCES):
30359         Add strftime.c, since we now compile it on all hosts.
30360
30361         * lib/strftime.c (my_strftime):
30362         Define to nstrftime if emacs, but only if my_strftime is not defined.
30363         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
30364         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
30365         Add one more extra argument: a nanoseconds value.
30366         All uses changed.
30367         (ns): New macro.
30368         (my_strftime function): Add %N format.
30369         (emacs_strftimeu): Renamed from emacs_strftime,
30370         with extra ut argument.
30371
30372 2001-05-09  Paul Eggert  <eggert@twinsun.com>
30373
30374         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
30375
30376 2001-04-21  Jim Meyering  <meyering@lucent.com>
30377
30378         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
30379         doesn't interfere.
30380
30381 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30382
30383         * m4/ftruncate.m4: Check for chsize.
30384         Link with ftruncate.o unconditionally if ftruncate is missing.
30385         This was required when cross-compiling to i586-mingw32msvc.
30386
30387 2001-04-08  Jim Meyering  <meyering@lucent.com>
30388
30389         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
30390         recomputed; that's necessary when the offset spans a DST transition.
30391         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
30392
30393 2001-04-02  Jim Meyering  <meyering@lucent.com>
30394
30395         * lib/regex.h, regex.c: Update from GNU libc.
30396
30397 2001-03-24  Jim Meyering  <meyering@lucent.com>
30398
30399         * m4/jm-macros.m4: Require autoconf-2.49d.
30400
30401 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
30402
30403         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
30404
30405 2001-03-19  Paul Eggert  <eggert@twinsun.com>
30406
30407         * lib/version-etc.c (version_etc_copyright): Update to 2001.
30408
30409 2001-03-17  Jim Meyering  <meyering@lucent.com>
30410
30411         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
30412         now that the version in autoconf is equivalent.
30413         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
30414
30415         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
30416         Suggestion from Akim Demaille.
30417
30418         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
30419         (jm_PREREQ_TEMPNAME): New function.
30420
30421 2001-03-16  Paul Eggert  <eggert@twinsun.com>
30422
30423         * lib/tempname.c (uint64_t): Define to uintmax_t if
30424         not defined, and if UINT64_MAX is not defined.
30425         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
30426         Reported by John David Anglin.
30427
30428 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
30429
30430         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
30431         resolve alias if codeset is empty.
30432         * lib/config.charset (BeOS): Use wildcard syntax.
30433
30434 2001-03-13  Jim Meyering  <meyering@lucent.com>
30435
30436         * lib/path-concat.c (path_concat)
30437         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
30438         concatenating e.g., `C:' and `foo'.
30439         From Bruno Haible.
30440
30441 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30442
30443         * lib/localcharset.c (locale_charset): Don't use
30444         setlocale(LC_CTYPE,NULL). Don't return NULL.
30445         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
30446
30447 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30448
30449         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
30450         support for DOS/DJGPP.
30451
30452 2001-03-01  Paul Eggert  <eggert@twinsun.com>
30453
30454         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
30455         lacks mkstemp.  Compile our own tempname.c if we compile our own
30456         mkstemp.c, as mkstemp relies on tempname.
30457
30458 2001-03-01  Jim Meyering  <meyering@lucent.com>
30459
30460         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
30461         AH_VERBATIM really does output its argument verbatim.
30462
30463 2001-02-28  Paul Eggert  <eggert@twinsun.com>
30464
30465         * lib/Makefile.am (libfetish_a_SOURCES):
30466         Add dup-safer.c, fopen-safer.c.
30467         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
30468
30469         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
30470         * lib/unistd-safer.h: New files.
30471
30472 2001-02-25  Paul Eggert  <eggert@twinsun.com>
30473
30474         The mkstemp replacement is taken from glibc 2.2.2, with some
30475         portability fixes for use outside glibc, as follows:
30476
30477         * lib/tempname.c (struct_stat64): New macro.
30478         (direxists, __gen_tempname): Use it.
30479         This avoids a portability problem with Solaris 8.
30480
30481         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
30482         (<stddef.h>, <stdint.h>, <string.h>):
30483         Include only if STDC_HEADERS || _LIBC.
30484         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
30485         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
30486         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
30487         (__set_errno): Define this macro if <errno.h> doesn't.
30488         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
30489         Define these macros if <stdio.h> doesn't.
30490         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
30491         Define these macros if <sys/stat.h>
30492         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
30493         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
30494         __xstat64): Define if not _LIBC.
30495         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
30496         (__gen_tempname): Invoke gettimeofday only if
30497         HAVE_GETTIMEOFDAY || _LIBC;
30498         otherwise, fall back on plain "time".
30499         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
30500
30501         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
30502
30503         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
30504
30505 2001-02-18  Paul Eggert  <eggert@twinsun.com>
30506
30507         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
30508
30509 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30510
30511         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
30512         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
30513         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
30514         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
30515
30516 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30517
30518         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
30519         Remove workaround macros for hosts that have mbrtowc but not
30520         mbstate_t, as we now insist on proper declarations for both
30521         before using mbrtowc.
30522
30523 2001-02-17  Jim Meyering  <meyering@lucent.com>
30524
30525         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
30526         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
30527         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
30528         UnixWare 7.1.1.
30529
30530         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
30531         rather than AC_CACHE_VAL.
30532
30533 2001-02-17  Jim Meyering  <meyering@lucent.com>
30534
30535         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
30536         around included file name.
30537
30538         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
30539
30540         * lib/strftime.c: Update from GNU libc (the only changes were to
30541         comments).
30542
30543 2001-02-17  Jim Meyering  <meyering@lucent.com>
30544
30545         * lib/regex.c: Update from libc.
30546
30547 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
30548
30549         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
30550         clash.
30551
30552 2001-02-16  Paul Eggert  <eggert@twinsun.com>
30553
30554         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
30555         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
30556         Reported by Mark Hounschell via Paul Eggert.
30557
30558 2001-02-07  Jim Meyering  <meyering@lucent.com>
30559
30560         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
30561
30562 2001-02-05  Jim Meyering  <meyering@lucent.com>
30563
30564         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
30565         it includes the patch required for `large file' support with at least
30566         HP-UX's 10.20 /bin/cc.
30567
30568 2001-02-03  Jim Meyering  <meyering@lucent.com>
30569
30570         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
30571         AS_IF, now that it works once again (mysteriously).
30572         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30573
30574 2001-01-30  Jim Meyering  <meyering@lucent.com>
30575
30576         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
30577         * m4/chown.m4: Rename conftestchown to conftest.chown.
30578         * m4/rename.m4: s/conftestdir/conftest.d1/ and
30579         s/conftestdir2/conftest.d2/.
30580         * m4/utimes.m4: s/conftestdata/conftest.data/
30581         Inspired by Pavel Roskin's change in autoconf.
30582
30583 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
30584
30585         * lib/config.charset: Update for FreeBSD 4.2.
30586
30587 2001-01-27  Jim Meyering  <meyering@lucent.com>
30588
30589         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
30590         a use of AS_IF.
30591         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30592
30593 2001-01-26  Jim Meyering  <meyering@lucent.com>
30594
30595         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
30596         quotearg.c includes it.
30597
30598 2001-01-26  Jim Meyering  <meyering@lucent.com>
30599
30600         * lib/quotearg.c: Include stddef.h.
30601         * lib/quote.c: Include stddef.h.
30602         Reported by Axel Kittenberger.
30603
30604         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
30605         line in double quotes so that it evokes a better diagnostic.
30606         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
30607         Reported by Axel Kittenberger.
30608
30609 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
30610
30611         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
30612         as if it was a `charset'.
30613
30614 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30615
30616         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
30617         has const.
30618
30619 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30620
30621         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
30622         to avoid a warning.  Add back 'const' to inptr.
30623
30624 2001-01-20  Jim Meyering  <meyering@lucent.com>
30625
30626         Be sure that headers are checked before used in code compiled
30627         for the type checks.
30628         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
30629         In place of that, invoke jm_CHECK_ALL_TYPES.
30630         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
30631         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
30632         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
30633         The check for ssize_t was mistakenly run before the test for unistd.h.
30634
30635         The configure-time check for stdbool.h was missing.
30636         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
30637         (jm_PREREQ_HASH): New function.
30638
30639 2001-01-17  Jim Meyering  <meyering@lucent.com>
30640
30641         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
30642         for autoconf-2.49c.
30643         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
30644
30645 2001-01-16  Jim Meyering  <meyering@lucent.com>
30646
30647         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
30648         From Bruno Haible.
30649
30650 2001-01-14  Jim Meyering  <meyering@lucent.com>
30651
30652         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
30653         foo and bar.  Create conftestdir/ in the script, not in the C code.
30654         Remove directories in the script, not in the C code.
30655         Remove conftestdir{,2} before trying to create the directory.
30656         Make the entire configure script fail if the mkdir fails.
30657
30658 2001-01-14  Jim Meyering  <meyering@lucent.com>
30659
30660         * lib/rename.c: New file.  From Volker Borchert.
30661         Include stdlib.h, string.h or strings.h, and xalloc.h.
30662         Use strip_trailing_slashes rather than open-coding it.
30663
30664 2001-01-03  Paul Eggert  <eggert@twinsun.com>
30665
30666         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
30667
30668 2001-01-03  Jim Meyering  <meyering@lucent.com>
30669
30670         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
30671         of local `inptr' to avoid warning with some system declarations of
30672         iconv.
30673
30674 2001-01-02  Volker Borchert  <bt@teknon.de>
30675
30676         * m4/rename.m4: New file.
30677         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
30678
30679 2001-01-01  Jim Meyering  <meyering@lucent.com>
30680
30681         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
30682         even on systems with utmpx.h.  It's necessary for the declaration of
30683         utmp's ut_user member.  Reported by Andreas Jaeger.
30684
30685         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
30686         available. They are required for the declarations of getgrgid and
30687         getpwuid resp.
30688         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
30689         Reported by Andreas Jaeger.
30690
30691 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
30692
30693         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
30694         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
30695         so `make install' also works in VPATH builds.
30696
30697 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
30698
30699         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
30700         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
30701         can be used in subdirectories.
30702
30703 2000-12-29  Paul Eggert  <eggert@twinsun.com>
30704
30705         * lib/modechange.c: Do not assume that mode_t uses the
30706         traditional octal encoding.  E.g. "chmod 1 FOO" should set
30707         the other-execute bit of FOO even if S_IXOTH != 1.
30708
30709         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
30710         WOTH, XOTH, ALLM): New macros.
30711         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
30712          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
30713         Use them.
30714         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
30715         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
30716         (mode_compile):
30717         No need to use uintmax_t; unsigned long is long enough.
30718         Don't bother to get suffix since we don't use it.
30719
30720 2000-12-26  Jim Meyering  <meyering@lucent.com>
30721
30722         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
30723         better with autoheader.
30724
30725 2000-12-24  Jim Meyering  <meyering@lucent.com>
30726
30727         * lib/hash.c (is_prime): Return explicit boolean values.
30728         (hash_get_first): Return NULL to appease Irix5.6's 89.
30729         Reported by Nelson Beebe.
30730
30731 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
30732
30733         * lib/localcharset.c (locale_charset): Add support for Win32.
30734
30735 2000-12-18  Paul Eggert  <eggert@twinsun.com>
30736
30737         * lib/physmem.h, lib/physmem.c: New files.
30738
30739         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
30740         (noinst_HEADERS): Add physmem.h.
30741
30742         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
30743         't' for compatibility with Solaris 8 sort.
30744
30745 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
30746
30747         * lib/config.charset: Add support for BeOS.
30748
30749 2000-12-17  Jim Meyering  <meyering@lucent.com>
30750
30751         * m4/dos.m4 (jm_AC_DOS): New file and macro.
30752         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
30753
30754 2000-12-16  Jim Meyering  <meyering@lucent.com>
30755
30756         This bug had a serious impact on chown: `chown N:M FILE' (for integer
30757         N and M) would have treated it like `chown N:N FILE'.
30758
30759         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
30760
30761 2000-12-16  Jim Meyering  <meyering@lucent.com>
30762
30763         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
30764         SHELLS_FILE to a file name that's useful on djgpp systems.
30765         Include stdlib.h.
30766         (ADDITIONAL_DEFAULT_SHELLS): Define.
30767         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
30768         Based mostly on a patch from Prashant TR.
30769
30770 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
30771
30772         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
30773         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
30774         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
30775
30776 2000-12-08  Andreas Schwab  <schwab@suse.de>
30777
30778         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
30779         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
30780
30781 2000-12-07  Jim Meyering  <meyering@lucent.com>
30782
30783         * lib/stripslash.c (ISSLASH): Define.
30784         (strip_trailing_slashes): Use ISSLASH rather than comparing against
30785         `/'.
30786         From Prashant TR.
30787
30788         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
30789         (dir_name_r): Declare this function as static.
30790         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
30791         manifest itself on a name containing a mix of slashes and
30792         backslashes.
30793         Make this function work with names starting with a DOS-style
30794         drive letter and colon prefix.
30795         (dir_name): Append `.' if necessary.
30796         Based mostly on patches from Prashant TR and Eli Zaretskii.
30797
30798         * lib/dirname.h (dir_name_r): Remove prototype.
30799
30800 2000-12-06  Paul Eggert  <eggert@twinsun.com>
30801
30802         * m4/off_t-format.m4: Remove this file.
30803         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
30804
30805 2000-12-06  Jim Meyering  <meyering@lucent.com>
30806
30807         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
30808         replacement strtoull, we may well need the replacement strtoul, too.
30809         Check for declarations of strtoul and strtoull.
30810         Check for strtol.  Mainly as a cue to cause automake to include
30811         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
30812         Check for limits.h -- strtol.c needs it.
30813
30814 2000-12-05  Jim Meyering  <meyering@lucent.com>
30815
30816         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
30817
30818 2000-12-04  Jim Meyering  <meyering@lucent.com>
30819
30820         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
30821         Also include memory.h, stdlib.h, unistd.h if appropriate.
30822         Reported by Andreas Jaeger (conflicting declaration of malloc).
30823
30824 2000-12-02  Jim Meyering  <meyering@lucent.com>
30825
30826         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
30827         * m4/jm-macros.m4 (jm_MACROS): require it.
30828
30829 2000-12-02  Jim Meyering  <meyering@lucent.com>
30830
30831         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
30832
30833 2000-12-01  Paul Eggert  <eggert@twinsun.com>
30834
30835         * lib/memrchr.c: Include <config.h> before any system include file.
30836
30837 2000-11-30  Jim Meyering  <meyering@lucent.com>
30838
30839         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
30840
30841 2000-11-30  Jim Meyering  <meyering@lucent.com>
30842
30843         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
30844
30845 2000-11-29  Paul Eggert  <eggert@twinsun.com>
30846
30847         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
30848
30849 2000-11-26  Jim Meyering  <meyering@lucent.com>
30850
30851         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
30852
30853 2000-11-22  Paul Eggert  <eggert@twinsun.com>
30854
30855         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
30856         size of (size_t) -1; it's not portable.
30857
30858 2000-11-17  Jim Meyering  <meyering@lucent.com>
30859
30860         * lib/strstr.c: Update from GNU libc.
30861
30862 2000-11-17  Akim Demaille  <akim@epita.fr>
30863
30864         * lib/obstack.h: Formatting changes.
30865         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
30866         prevent type checking.
30867         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
30868         cast the value to (void *): assigning a `foo *' to a `void *'
30869         variable is valid.
30870         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
30871
30872 2000-11-16  Jim Meyering  <meyering@lucent.com>
30873
30874         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
30875
30876 2000-11-11  Jim Meyering  <meyering@lucent.com>
30877
30878         * lib/error.c: Add a couple #includes, merging from GNU libc version.
30879
30880 2000-11-10  Jim Meyering  <meyering@lucent.com>
30881
30882         * lib/obstack.h: Update from GNU libc.
30883         * lib/obstack.c: Likewise.
30884
30885 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
30886
30887         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
30888
30889 2000-11-06  Paul Eggert  <eggert@twinsun.com>
30890
30891         * lib/getusershell.c (setusershell): Use rewind rather than
30892         fseek/fseeko, to avoid configuration hassles with fseeko.
30893         Don't bother opening SHELLS_FILE if shellstream is NULL;
30894         it's not necessary.
30895
30896 2000-11-05  Jim Meyering  <meyering@lucent.com>
30897
30898         * lib/makepath.h (make_dir): Declare.
30899         * lib/makepath.c (make_dir): Remove `static' attribute.
30900         Tweak a comment.
30901
30902 2000-11-04  Jim Meyering  <meyering@lucent.com>
30903
30904         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
30905
30906 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
30907
30908         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
30909         last one in a bucket, advance to the next bucket.
30910
30911 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
30912
30913         * lib/fnmatch.c: Do not comment out all the code if we are using
30914         the GNU C library, because in some cases we are replacing buggy
30915         code in the GNU C library itself.
30916
30917 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
30918
30919         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
30920         (regex_compile): Catch bogus \(\1\).
30921
30922 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30923
30924         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
30925         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
30926         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
30927
30928 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30929
30930         * lib/error.h, getline.h, modechange.h:
30931         Remove "2000" from Copyright line, as the file hasn't been
30932         changed this year other than in the copyright notice.
30933
30934         * lib/xalloc.h: Add "2000" to Copyright line, as this file
30935         was changed this year.
30936
30937 2000-10-29  Jim Meyering  <meyering@lucent.com>
30938
30939         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
30940         renaming.
30941         * m4/ls-mntd-fs.m4: Likewise
30942
30943 2000-10-29  Jim Meyering  <meyering@lucent.com>
30944
30945         * lib/xstat.in: Fix grammar in comment.
30946
30947 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
30948
30949         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
30950         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
30951         doesn't define __restrict_arr.
30952
30953 2000-10-28  Jim Meyering  <meyering@lucent.com>
30954
30955         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
30956         (jm_PREREQ_MEMCHR): New function.
30957
30958 2000-10-28  Jim Meyering  <meyering@lucent.com>
30959
30960         * lib/memchr.c: Update from libc.
30961         Adjust for portability:
30962         [HAVE_STDLIB_H]: Include stdlib.h.
30963         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
30964         Undef __memchr, too.
30965         [!weak_alias]: Define __memchr to memchr.
30966
30967         * lib/regex.c: Update from libc.
30968         * lib/regex.h: Likewise.
30969         * lib/getopt1.c: Likewise.
30970         * lib/memcmp.c: Likewise.
30971
30972         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
30973         Avoid using fseek, when possible -- it's broken by design.
30974         Patch by Ulrich Drepper.
30975
30976 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
30977
30978         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
30979         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
30980         Giving in to popular pressure to shut up the compiler with casts.
30981
30982 2000-10-26  Jim Meyering  <meyering@lucent.com>
30983
30984         * lib/strftime.c: Update from libc.
30985
30986 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
30987
30988         * regex.c: More `unsigned char' -> `re_char' changes.
30989         Also change several `int' into `re_wchar_t'.
30990         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
30991         (PUSH_FAILURE_POINTER): Don't cast any more.
30992         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
30993         We want GCC to complain, since this piece of code makes
30994         re_match non-reentrant, which *should* be fixed.
30995         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
30996         (EXTEND_BUFFER): Use RETALLOC.
30997         (SET_LIST_BIT): Don't cast.
30998         (re_wchar_t): New type.
30999         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
31000         that those two functions will always properly return.
31001         (IMMEDIATE_QUIT_CHECK): Cast to void.
31002         (analyse_first): Use recursion rather than an explicit stack.
31003         (re_compile_fastmap): Can't fail anymore.
31004         (re_search_2): Don't check re_compile_fastmap for failure.
31005         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
31006         Now also sets the new value (passed in a new argument).
31007         (re_match_2_internal): Use it.
31008         Also, use a new var `reg' of type size_t when looping through regs
31009         rather than reuse the inappropriate `mcnt'.
31010
31011 2000-10-25  Jim Meyering  <meyering@lucent.com>
31012
31013         * lib/obstack.c: Update from libc.
31014
31015 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
31016
31017         * regex.c (regex_compile): Change the way of handling a range from
31018         a char less than 256 to a char not less than 256.
31019
31020 2000-10-24  Andrew Innes  <andrewi@gnu.org>
31021
31022         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
31023         NT-Emacs only.
31024         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
31025         so that re_search functions only quit when callers expect them to.
31026
31027 2000-10-23  Jim Meyering  <meyering@lucent.com>
31028
31029         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
31030         wrong.  That set_locale call must not have any side effects.
31031         From Paul Eggert.
31032
31033 2000-10-22  Jim Meyering  <meyering@lucent.com>
31034
31035         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
31036         [CYCLIC]: Remove now-unused definition.
31037
31038         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
31039         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
31040         Suggestion from Ulrich Drepper.
31041
31042 2000-10-21  Jim Meyering  <meyering@lucent.com>
31043
31044         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
31045         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
31046         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
31047
31048 2000-10-21  Jim Meyering  <meyering@lucent.com>
31049
31050         * lib/dirname.c (memrchr): Declare if necessary.
31051         (dir_name): Remove the restriction that there be no
31052         trailing slashes.  Now, this code skips past them, effectively
31053         ignoring them.
31054         [TEST_DIRNAME] (main): New unit tests.
31055
31056         * lib/memrchr.c: New file from GNU libc.
31057         Undef __memrchr, too.
31058         [!weak_alias]: Define __memrchr to memrchr.
31059         Guard weak_alias use with `#ifdef weak_alias'.
31060
31061 2000-10-21  Jim Meyering  <meyering@lucent.com>
31062
31063         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
31064         (dir_name): Use dir_name_r.
31065         * lib/dirname.h (dir_name_r): Declare it.
31066
31067 2000-10-17  Jim Meyering  <meyering@lucent.com>
31068
31069         * lib/quote.h (PARAMS): Define and use.
31070         Reported by Akim Demaille.
31071
31072         * lib/getopt.c: Update from libc.
31073
31074 2000-10-16  Jim Meyering  <meyering@lucent.com>
31075
31076         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
31077         setlocale.
31078         From Jan Fedak.
31079
31080 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
31081
31082         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
31083
31084 2000-09-25  Jim Meyering  <meyering@lucent.com>
31085
31086         * lib/md5.h (rol): Define (from GnuPG).
31087
31088         * lib/sha.c: Give credit (GnuPG) where due.
31089         (M): Use rol rather than open-coding it.
31090         Add a FIXME comment.
31091
31092 2000-09-21  Jim Meyering  <meyering@lucent.com>
31093
31094         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
31095         Reported by Michael Stone.
31096
31097 2000-09-20  Jim Meyering  <meyering@lucent.com>
31098
31099         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
31100         (noinst_HEADERS): Add sha.h.
31101         Based on code from Scott G. Miller and from GnuPG.
31102
31103 2000-09-18  Jim Meyering  <meyering@lucent.com>
31104
31105         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
31106         LIBS. Otherwise, everyone ends up linking with -lelf for some
31107         configurations.
31108         Reported by Mike Stone.
31109
31110 2000-09-15  Jim Meyering  <meyering@lucent.com>
31111
31112         * lib/regex.c: Update from libc.
31113
31114 2000-09-10  Jim Meyering  <meyering@lucent.com>
31115
31116         * lib/getopt.c (_getopt_internal): Update from glibc.
31117
31118 2000-09-09  Jim Meyering  <meyering@lucent.com>
31119
31120         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
31121         think it should be used as a general replacement for isascii.
31122         * lib/fnmatch.c: Likewise.
31123         * lib/mbswidth.c: Likewise
31124         * lib/regex.c: Likewise.
31125
31126         Don't use atoi.
31127         * lib/userspec.c: Include sys/param.h and limits.h.
31128         Include xstrtol.h.
31129         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
31130         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
31131         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
31132         UID, GID.  Check range.
31133
31134 2000-09-06  Jim Meyering  <meyering@lucent.com>
31135
31136         * lib/getopt.c (_getopt_internal): Update from glibc.
31137
31138 2000-08-30  Jim Meyering  <meyering@lucent.com>
31139
31140         * lib/strftime.c: Merge in changes from GNU libc.
31141
31142 2000-08-26  Jim Meyering  <meyering@lucent.com>
31143
31144         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
31145         * m4/fpending.m4: New file.
31146
31147 2000-08-26  Jim Meyering  <meyering@lucent.com>
31148
31149         * lib/closeout.c: Include "__fpending.h".
31150         (close_stdout_status): Return right away if there's nothing to flush.
31151
31152         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
31153         * lib/__fpending.c: New file.
31154         * lib/__fpending.h: New file.
31155
31156 2000-08-20  Jim Meyering  <meyering@lucent.com>
31157
31158         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
31159         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
31160         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
31161
31162 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
31163
31164         Improve fileutils installation on systems where running
31165         programs (like install) can't be unlinked.
31166         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
31167         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
31168
31169 2000-08-07  Paul Eggert  <eggert@twinsun.com>
31170
31171         Standardize on "memory exhausted" instead of "Memory exhausted"
31172         or "virtual memory exhausted".
31173         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
31174         "virtual memory exhausted".
31175         * lib/same.c (same_name): Invoke xalloc_die instead of printing
31176         our own message.
31177         * lib/userspec.c (parse_user_spec): Likewise.
31178         * lib/bumpalloc.h: comment fix
31179         * lib/same.c, userspec.c: Include xalloc.h.
31180
31181         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
31182         not char *const and pointing to a constant array.
31183         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
31184         (xrealloc): Comment fix.
31185
31186         * lib/userspec.c (parse_user_spec):
31187         Don't translate a message until just before returning,
31188         to avoid unnecessary translation.
31189
31190 2000-08-07  Jim Meyering  <meyering@lucent.com>
31191
31192         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
31193         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
31194         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
31195         getgroups.c, gethostname.c, getopt.h, group-member.c,
31196         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
31197         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
31198         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
31199         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
31200         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
31201         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
31202         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
31203         yesno.c: Back out Copyright date changes for each file with no change
31204         this year.  This eases coordination with other programs using the same
31205         source code modules.  From Paul Eggert.
31206
31207 2000-08-06  Paul Eggert  <eggert@twinsun.com>
31208
31209         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
31210         not char, for compatibility with glibc 2.1.3 strftime.c.
31211
31212 2000-08-03  Greg McGary  <greg@mcgary.org>
31213
31214         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
31215         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
31216         (EXTEND_BUFFER): Use them.
31217
31218 2000-08-01  Jim Meyering  <meyering@lucent.com>
31219
31220         * lib/dirname.c (ISSLASH): Define.
31221         (BACKSLASH_IS_PATH_SEPARATOR): Define.
31222         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
31223         both `\' and `/' may be use as path separators.
31224         Based on a patch from Prashant TR.
31225
31226 2000-07-31  Paul Eggert  <eggert@twinsun.com>
31227
31228         * lib/quotearg.c (quotearg_n_options): Don't make the initial
31229         slot vector a constant, since it might get modified.
31230
31231 2000-07-31  Jim Meyering  <meyering@lucent.com>
31232
31233         * lib/xmalloc.c: Use `virtual memory exhausted', not
31234         `Memory exhausted'.
31235         * lib/obstack.c (print_and_abort): Likewise.
31236
31237 2000-07-30  Paul Eggert  <eggert@twinsun.com>
31238
31239         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
31240         buffer, so that the caller can always quote one small
31241         component of a "memory exhausted" message in slot 0.
31242         From a suggestion by Jim Meyering.
31243
31244 2000-07-30  Jim Meyering  <meyering@lucent.com>
31245
31246         * lib/makepath.c (make_path): Quote the other instance, too.
31247
31248         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
31249         (STATIC_BUF_SIZE): Define.
31250         (quotearg_n_options): Use only statically allocated storage when
31251         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
31252         than STATIC_BUF_SIZE.
31253
31254 2000-07-29  Jim Meyering  <meyering@lucent.com>
31255
31256         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
31257         * lib/dirname.c (dir_name): Likewise.
31258
31259         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
31260         `/'.
31261
31262         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
31263         (dir_name): Assert that there are no trailing slashes.
31264
31265 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
31266
31267         * lib/mbswidth.h (mbswidth): Add a flags argument.
31268         (mbswidth): New declaration.
31269         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
31270         * lib/mbswidth.c (mbswidth): Add a flags argument.
31271         (mbsnwidth): New function.
31272
31273 2000-07-24  Jim Meyering  <meyering@lucent.com>
31274
31275         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
31276
31277 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31278
31279         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
31280
31281 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31282
31283         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
31284         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
31285         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
31286         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
31287         invoke multibyte primitives.
31288
31289 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31290
31291         * lib/quotearg.c:
31292         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
31293         so that mbstate_t is always defined.
31294
31295         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
31296         be 1 in at least one GCC installation, and this configuration
31297         error is likely to be common.  Ignoring MB_LEN_MAX hurts
31298         performance on hosts that have mbrtowc but have only unibyte
31299         locales, but I assume these hosts are rare.
31300
31301 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31302
31303         * lib/mbswidth.c (_XOPEN_SOURCE):
31304         Don't define; this causes problems on Solaris 7.
31305         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
31306
31307 2000-07-23  Jim Meyering  <meyering@lucent.com>
31308
31309         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
31310         too: getgrgid, getpwuid, getuid.
31311
31312 2000-07-23  Jim Meyering  <meyering@lucent.com>
31313
31314         * lib/basename.c (base_name): Add an assertion.
31315
31316 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
31317
31318         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
31319         shadow its mbsinit function.
31320
31321 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31322
31323         * lib/mbswidth.h: New file.
31324         * lib/mbswidth.c: New file.
31325         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
31326         (noinst_HEADERS): Add mbswidth.h.
31327
31328 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31329
31330         * lib/config.charset: Add support for FreeBSD. Improve support for
31331         HP-UX and IRIX 6.
31332
31333 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
31334
31335         * m4/mbswidth.m4: New file.
31336         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
31337
31338 2000-07-15  Jim Meyering  <meyering@lucent.com>
31339
31340         * lib/makepath.c: Include quote.h.
31341         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
31342         corresponding argument in a `quote (...)' call.
31343         Give better diagnostics.
31344
31345         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
31346         (noinst_HEADERS): Add quote.h.
31347
31348         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
31349         from tar's src/misc.c.
31350         * lib/quote.h: New file.  Prototypes for same.
31351
31352 2000-07-14  Paul Eggert  <eggert@twinsun.com>
31353
31354         From a suggestion by Bruno Haible.
31355         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
31356         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
31357         to decide whether to define the BeOS workaround macro;
31358         this adjusts to the change to AC_MBSTATE_T.
31359
31360 2000-07-14  Jim Meyering  <meyering@lucent.com>
31361
31362         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
31363         jm_AC_TYPE_UINTMAX_T.
31364
31365 2000-07-13  Paul Eggert  <eggert@twinsun.com>
31366
31367         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
31368
31369         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
31370         quotearg_buffer_restyled): Add support for
31371         clocale_quoting_style.  Undo previous change to
31372         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
31373         and "{RIGHT QUOTATION MARK}" msgids.
31374
31375 2000-07-10  Paul Eggert  <eggert@twinsun.com>
31376
31377         From a suggestion by Bruno Haible.
31378         * m4/mbstate_t.m4 (AC_MBSTATE_T):
31379         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
31380         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
31381         and mbstate_t, to a single-part test that simply defines mbstate_t.
31382         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
31383         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
31384
31385 2000-07-10  Jim Meyering  <meyering@lucent.com>
31386
31387         * m4/strerror_r.m4: Mirror the correction made in autoconf.
31388
31389         * m4/gnu-source.m4: Output to confdefs.h directly.
31390         Suggestion from Akim Demaille.
31391
31392 2000-07-09  Paul Eggert  <eggert@twinsun.com>
31393
31394         The old behavior of quoting `like this' doesn't look good with
31395         newer, ISO-style fonts.  See:
31396         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
31397
31398         Instead, quote "like this" by default.  Let the translator
31399         tailor the locale-specific quoting behavior by providing
31400         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
31401
31402         * lib/quotearg.c (N_): New macro.
31403         (gettext_default): New function.
31404         (quotearg_buffer_restyled): Use
31405         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
31406         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
31407
31408 2000-07-09  Jim Meyering  <meyering@lucent.com>
31409
31410         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
31411         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
31412
31413         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
31414         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
31415
31416 2000-07-09  Jim Meyering  <meyering@lucent.com>
31417
31418         * lib/Most files: Update copyright dates to include 2000.
31419
31420 2000-07-08  Jim Meyering  <meyering@lucent.com>
31421
31422         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
31423         if not defined.
31424         (xgethostname): Remove now-unnecessary #ifdef.
31425         Move declaration of `err' into loop where it's used.
31426
31427 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31428         and Bruno Haible  <haible@clisp.cons.org>
31429
31430         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
31431         only if the test for an object-type mbstate_t fails.  This
31432         prevents us from mistakenly reporting that mbstate_t is a
31433         system object type after we "#define mbstate_t int" to work
31434         around its lack.
31435
31436 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31437         and Bruno Haible  <haible@clisp.cons.org>
31438
31439         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
31440
31441 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31442
31443         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
31444         to strerror_r.
31445         Include <ctype.h> for use of isalpha.
31446
31447 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31448
31449         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
31450         by allocating a larger buffer. Test the gethostname return value for
31451         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
31452         returns an error and ENAMETOOLONG isn't defined.
31453
31454 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31455
31456         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
31457         dimension.
31458
31459 2000-07-04  Jim Meyering  <meyering@lucent.com>
31460
31461         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
31462         of the deprecated AC_CHECKING.
31463
31464 2000-07-04  Jim Meyering  <meyering@lucent.com>
31465
31466         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
31467         Reported by Bruno Haible.
31468
31469 2000-07-04  Jim Meyering  <meyering@lucent.com>
31470
31471         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
31472         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
31473         lacks mbrtowc.
31474
31475 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31476
31477         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
31478         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
31479
31480 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31481         and Bruno Haible  <haible@clisp.cons.org>
31482
31483         * lib/quotearg.c (mbrtowc):
31484         Assign to *pwc, and return 1 only if result is nonzero.
31485         (iswprint): Use ISPRINT when substituting our own mbrtowc.
31486
31487 2000-07-03  Jim Meyering  <meyering@lucent.com>
31488
31489         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
31490
31491 2000-07-03  Jim Meyering  <meyering@lucent.com>
31492
31493         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
31494         This is necessary to get a definition of e.g., UTMP_FILE on
31495         HP-UX 10.20.
31496         From Bob Proulx.
31497
31498 2000-07-02  Jim Meyering  <meyering@lucent.com>
31499
31500         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
31501
31502         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
31503         AC_LIBOBJ(function_name).
31504         * m4/chown.m4: Likewise.
31505         * m4/fnmatch.m4: Likewise.
31506         * m4/ftruncate.m4: Likewise.
31507         * m4/getgroups.m4: Likewise.
31508         * m4/getline.m4: Likewise.
31509         * m4/group-member.m4: Likewise.
31510         * m4/jm-macros.m4: Likewise.
31511         * m4/lstat.m4: Likewise.
31512         * m4/malloc.m4: Likewise.
31513         * m4/memcmp.m4: Likewise.
31514         * m4/nanosleep.m4: Likewise.
31515         * m4/putenv.m4: Likewise.
31516         * m4/realloc.m4: Likewise.
31517         * m4/regex.m4: Likewise.
31518         * m4/stat.m4: Likewise.
31519         * m4/strftime.m4: Likewise.
31520
31521 2000-07-02  Jim Meyering  <meyering@lucent.com>
31522
31523         * lib/quotearg.c (mbstate_t): Don't define here.
31524
31525 2000-07-02  Jim Meyering  <meyering@lucent.com>
31526
31527         * lib/nanosleep.c (SIGCONT): Define if not already defined.
31528
31529 2000-07-01  Jim Meyering  <meyering@lucent.com>
31530
31531         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
31532
31533 2000-07-01  Jim Meyering  <meyering@lucent.com>
31534
31535         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
31536         problem.
31537
31538 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31539
31540         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
31541         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
31542
31543 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31544
31545         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
31546         per change in ../m4/ls-mntd-fs.m4.
31547         (read_filesystem_list): Ignore symbolic links.
31548
31549 2000-06-29  Jim Meyering  <meyering@lucent.com>
31550
31551         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
31552         for declaration of strcmp.
31553
31554         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
31555
31556         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
31557         Avoid warning by casting result to `char *' to remove `const'.
31558
31559 2000-06-28  Jim Meyering  <meyering@lucent.com>
31560
31561         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
31562         included by quotearg.c, for which we perform this test.  From
31563         Bruno Haible.
31564
31565 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31566
31567         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
31568         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
31569         <utmpx.h> exists, put readutmp.o into LIBOBJS.
31570
31571 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31572
31573         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
31574
31575 2000-06-26  Paul Eggert  <eggert@twinsun.com>
31576
31577         savedir now sets errno on failure and invokes xmalloc to get memory.
31578         Fix a couple of other minor bugs while we're at it.
31579
31580         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
31581         (NAMLEN): Remove macro.
31582         (malloc, realloc): Remove decls.
31583         (stpcpy): Likewise.
31584         ("xalloc.h"): Include.
31585         (NAME_SIZE_DEFAULT): New macro.
31586         (savedir): Use xmalloc / xrealloc to allocate memory.
31587         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
31588         Skip "" directory entries.
31589         Use strlen to calculate directory entry length, since the old method
31590         is rarely used these days and isn't worth supporting.
31591         Don't use a pointer after freeing it.
31592         Check for integer overflow when calculating allocation size.
31593         Use memcpy to copy entries, instead of stpcpy.
31594         Set errno properly when returning NULL.
31595         Check for readdir error.
31596
31597 2000-06-26  Jim Meyering  <meyering@lucent.com>
31598
31599         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
31600
31601 2000-06-25  Jim Meyering  <meyering@lucent.com>
31602
31603         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
31604         Linux header bug when _XOPEN_SOURCE is defined to 500.
31605
31606 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31607
31608         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
31609         deficiency.
31610
31611 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31612
31613         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
31614         Include xalloc.h.
31615         Don't include <stdlib.h>.  Don't declare malloc, realloc.
31616
31617 2000-06-24  Jim Meyering  <meyering@lucent.com>
31618
31619         * m4/strerror_r.m4: Revive this file -- to try out an experimental
31620         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
31621         for which strerror does return char*, but which lacks a conveniently
31622         accessible declaration of the function.  If the compile-test says
31623         strerror_r doesn't work, then resort to a `run'-test that works on
31624         BeOS and segfaults on DEC Unix.
31625
31626 2000-06-24  Jim Meyering  <meyering@lucent.com>
31627
31628         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
31629
31630 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31631
31632         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
31633         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
31634
31635 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31636
31637         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
31638         (mbrtowc, mbstate_t): Define substitutes if
31639         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
31640         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
31641         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
31642
31643 2000-06-23  Jim Meyering  <meyering@lucent.com>
31644
31645         * m4/afs.m4: Add missing AC_MSG_RESULT.
31646         Reported by Bruno Haible.
31647
31648         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
31649         Suggestion from Bruno Haible.
31650
31651 2000-06-23  Jim Meyering  <meyering@lucent.com>
31652
31653         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
31654
31655 2000-06-21  Jim Meyering  <meyering@lucent.com>
31656
31657         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
31658
31659 2000-06-21  Jim Meyering  <meyering@lucent.com>
31660
31661         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
31662         (noinst_HEADERS): Add getstr.h.
31663
31664         * lib/getline.c (getstr): Move into a separate file.
31665         * lib/getstr.c (getstr): New file, extracted from getline.c, with
31666         the following changes: new parameter, delim2; both delim[12]
31667         parameters have type `int', not `char'.  The latter would lose
31668         with 8-bit delimiters.
31669         * lib/getstr.h: New file.
31670
31671 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31672
31673         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
31674         than 1024, return a memory chunk of least possible size, instead
31675         of size PATH_MAX + 2. In the loop, increment the size proportionally.
31676         Use free/xmalloc instead of xrealloc to avoid copying for very long
31677         paths.
31678
31679 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31680
31681         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
31682         the empty string.
31683
31684 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31685
31686         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
31687         address, not strdup.  Include <stdlib.h> and don't declare free().
31688
31689 2000-06-19  Jim Meyering  <meyering@lucent.com>
31690
31691         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
31692
31693 2000-06-18  Jim Meyering  <meyering@lucent.com>
31694
31695         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
31696
31697         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
31698         `checking whether...' message to be consistent with that of the
31699         lstat test.
31700
31701 2000-06-18  Jim Meyering  <meyering@lucent.com>
31702
31703         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
31704         Besides, these days every porting target provides a mkdir function.
31705
31706         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
31707         needed. (this snippet comes from src/system.h).
31708
31709 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
31710
31711         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
31712
31713 2000-06-15  Paul Eggert  <eggert@twinsun.com>
31714
31715         * lib/human.c (adjust_value): New function.
31716         (human_readable_inexact): Apply rounding style even when
31717         printing approximate values.
31718
31719 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31720
31721         * lib/human.c (human_readable_inexact): Allow an input block
31722         size that is not a multiple of the output block size, and vice versa.
31723         Reported by Piergiorgio Sartor.
31724
31725 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31726
31727         * lib/getdate.y (get_date): Apply relative times after time
31728         zone indicator, not before.  Reported by Todd A. Jacobs.
31729
31730 2000-06-13  Jim Meyering  <meyering@lucent.com>
31731
31732         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
31733
31734         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
31735
31736 2000-06-12  Paul Eggert  <eggert@twinsun.com>
31737
31738         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
31739
31740 2000-06-12  Jim Meyering  <meyering@lucent.com>
31741
31742         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
31743         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
31744         optional argument.
31745         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
31746         the optional argument, `lib'.
31747
31748 2000-06-08  Jim Meyering  <meyering@lucent.com>
31749
31750         * m4/largefile.m4: Remove file (now that it's part of autoconf).
31751
31752 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31753
31754         Rewrite largefile configuration so that we don't need to run
31755         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
31756         AC_CANONICAL_HOST in configure.in -- jmm]
31757
31758         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
31759         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
31760         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
31761         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
31762         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
31763         All uses changed.
31764         Instead of inspecting the output of getconf, try to compile the
31765         test program without and with the macro definition.
31766         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
31767         for getconf.  Instead, check for the needed flags by compiling
31768         test programs.
31769
31770 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31771
31772         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
31773
31774 2000-06-04  Jim Meyering  <meyering@lucent.com>
31775
31776         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
31777         SunOS 4.1.4 for which gid_t is an unsigned type.
31778
31779 2000-06-03  Jim Meyering  <meyering@lucent.com>
31780
31781         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
31782         now that autoconf requires that.
31783
31784         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
31785         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
31786         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
31787
31788 2000-06-03  Jim Meyering  <meyering@lucent.com>
31789
31790         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
31791
31792 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31793
31794         * m4/glibc21.m4: New file.
31795         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
31796
31797 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31798
31799         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
31800         newer, don't install charset.alias.
31801         * lib/config.charset: Change the Linux/glibc rules so they become empty
31802         on glibc-2.1 or newer.
31803
31804 2000-06-02  Jim Meyering  <meyering@lucent.com>
31805
31806         * lib/mountlist.c: Back out last change.  Instead, do this...
31807         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
31808         me_dummy member using the same `ignore'-testing code.
31809         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
31810         fs_type strings.
31811         From Mark D. Roth.
31812
31813 2000-05-29  Jim Meyering  <meyering@lucent.com>
31814
31815         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
31816         mounts with the `ignore' attribute.  Based on a patch from
31817         Mark D. Roth.
31818
31819 2000-05-28  Jim Meyering  <meyering@lucent.com>
31820
31821         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
31822         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31823         * m4/stat.m4: Likewise.
31824         * m4/lstat.m4: Likewise.
31825         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
31826
31827         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
31828         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
31829
31830 2000-05-26  Jim Meyering  <meyering@lucent.com>
31831
31832         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
31833
31834 2000-05-24  Jim Meyering  <meyering@lucent.com>
31835
31836         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
31837         autoconf requires that.
31838         * m4/lib-check.m4: Likewise.
31839         * m4/jm-macros.m4: Likewise.
31840         * m4/strftime.m4: Likewise.
31841
31842         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
31843         AC_CHECK_DECLS, now that autoconf requires that.
31844
31845 2000-05-22  Jim Meyering  <meyering@lucent.com>
31846
31847         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31848         * m4/lstat.m4: Likewise.
31849
31850 2000-05-22  Jim Meyering  <meyering@lucent.com>
31851
31852         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
31853
31854 2000-05-20  Jim Meyering  <meyering@lucent.com>
31855
31856         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
31857         (jm_PREREQ): Use it.
31858
31859 2000-05-18  Jim Meyering  <meyering@lucent.com>
31860
31861         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
31862         back, too, since it may have been modified by allocate_entry.
31863         (hash_delete): Rewrite to use neither the assignment operator
31864         nor the comma operator in an if-expression.
31865
31866 2000-05-15  Paul Eggert  <eggert@twinsun.com>
31867
31868         * lib/closeout.c:
31869         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
31870         Remove; no longer needed.
31871         "quotearg.h": Add include.
31872         (file_name): Do not bother to explicitly initialize to NULL; it's less
31873         efficient on some hosts.
31874         (close_stdout_status): Remove test as to whether stdout was already
31875         closed; it breaks for the case "echo x | sort >&-".
31876         Quote file name colons.
31877         Do not assume that _("write error") lacks format strings.
31878
31879 2000-05-15  Jim Meyering  <meyering@lucent.com>
31880
31881         * lib/version-etc.c (version_etc_copyright): Update the copyright
31882         string used in all --version output.
31883
31884 2000-05-14  Jim Meyering  <meyering@lucent.com>
31885
31886         * lib/closeout.c (close_stdout_set_file_name): New function.
31887         (close_stdout_status): Use new file-scoped global.
31888         Return right away if fstat says the stdout file descriptor is invalid.
31889         * lib/closeout.h (close_stdout_set_file_name): Declare.
31890
31891 2000-05-10  Jim Meyering  <meyering@lucent.com>
31892
31893         * lib/closeout.c [default_exit_status]: New file-scoped variable.
31894         (close_stdout_set_status): New function.
31895         * lib/closeout.h (close_stdout_set_status): Declare.
31896
31897 2000-05-09  Jim Meyering  <meyering@lucent.com>
31898
31899         * m4/gettext.m4: Rename this...
31900         * m4/libintl.m4: ...to this.
31901
31902 2000-05-08  Jim Meyering  <meyering@lucent.com>
31903
31904         * lib/long-options.c: Don't include closeout.h.
31905         (parse_long_options): Don't call close_stdout for --version.
31906
31907 2000-05-06  Paul Eggert  <eggert@twinsun.com>
31908
31909         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
31910         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
31911         2.1.3 bug.  This avoids a clash when files like regex.c define
31912         _GNU_SOURCE.
31913
31914 2000-05-06  Jim Meyering  <meyering@lucent.com>
31915
31916         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
31917         (AC_REPLACE_FUNCS): Add strnlen.
31918
31919         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
31920         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
31921
31922         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
31923         AC_SEARCH_LIBS call for nanosleep.
31924         (LIB_NANOSLEEP): Set and AC_SUBST.
31925
31926 2000-05-06  Jim Meyering  <meyering@lucent.com>
31927
31928         * lib/strnlen.c: Undefine __strnlen and strnlen.
31929         [!weak_alias]: Define __strnlen to strnlen.
31930
31931         * lib/atexit.c: New file, from libiberty.
31932
31933 2000-05-06  Jim Meyering  <meyering@lucent.com>
31934
31935         * lib/closeout.c (close_stdout_status): Also check for errors on the
31936         stderr stream.
31937
31938 2000-05-05  Jim Meyering  <meyering@lucent.com>
31939
31940         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
31941         AC_SEARCH_LIBS call for clock_gettime.
31942         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
31943
31944         * m4/search-libs.m4: Update from autoconf.
31945
31946         su doesn't work on Solaris 2.6.
31947         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
31948         <shadow.h>.  Reported by Dragos Harabor.
31949
31950 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
31951
31952         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
31953         memcpy instead of xmalloc, xrealloc, path_concat.
31954         (locale_charset): Treat empty environment variables as absent.
31955         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
31956
31957 2000-05-04  Jim Meyering  <meyering@lucent.com>
31958
31959         * lib/getopt.c: Update from glibc.
31960         * lib/obstack.c: Likewise.
31961         * lib/obstack.h: Likewise.
31962         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
31963         file
31964
31965         * lib/regex.h: Likewise.
31966         * lib/strndup.c: Likewise.
31967         * lib/strnlen.c: New file, from glibc.
31968
31969 2000-05-03  Jim Meyering  <meyering@lucent.com>
31970
31971         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
31972
31973 2000-05-02  Paul Eggert  <eggert@twinsun.com>
31974
31975         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
31976         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
31977         compile-time test, rather than inspecting host and OS, to
31978         decide whether to define _LARGEFILE_SOURCE.
31979
31980 2000-05-01  Jim Meyering  <meyering@lucent.com>
31981
31982         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
31983
31984         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
31985         Based on a patch from Bruno Haible.
31986
31987 2000-05-01  Jim Meyering  <meyering@lucent.com>
31988
31989         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
31990
31991 2000-04-29  Jim Meyering  <meyering@lucent.com>
31992
31993         * lib/path-concat.c: Declare strdup only if it's not defined.
31994         * lib/canon-host.c: Likewise.
31995
31996 2000-04-28  Jim Meyering  <meyering@lucent.com>
31997
31998         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
31999         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
32000         is included first, then limits.h is included by locale.h by libintl.h.
32001         From John David Anglin.
32002
32003 2000-04-25  Jim Meyering  <meyering@lucent.com>
32004
32005         * lib/makepath.c (S_IRWXUGO): Define.
32006         (make_path): Always perform explicit chmod if MODE specifies any
32007         of the `special' permission bits.  Prompted by a bug report against
32008         install from Mate Wierdl and Joost van Baal.
32009
32010 2000-04-18  Jim Meyering  <meyering@lucent.com>
32011
32012         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
32013         (jm_PREREQ): Use it.
32014
32015 2000-04-18  Jim Meyering  <meyering@lucent.com>
32016
32017         * lib/README: New file.
32018
32019         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
32020         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
32021
32022 2000-04-17  Jim Meyering  <meyering@lucent.com>
32023
32024         Get it right :-)
32025         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
32026         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
32027         Suggestion from Akim Demaille.
32028
32029 2000-04-17  Jim Meyering  <meyering@lucent.com>
32030
32031         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
32032         the definition of it to rpl_strftime also defined-away the system's
32033         declaration.
32034
32035 2000-04-15  Jim Meyering  <meyering@lucent.com>
32036
32037         Use `C' to denote so-called `contiguous' files, the same way
32038         that tar does.
32039         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
32040         (ftypelet): Use S_ISCTG.
32041         From Michael Deutschmann.
32042
32043 2000-04-14  Jim Meyering  <meyering@lucent.com>
32044
32045         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
32046         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
32047         clobbered.
32048
32049 2000-04-14  Jim Meyering  <meyering@lucent.com>
32050
32051         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
32052
32053 2000-04-13  Jim Meyering  <meyering@lucent.com>
32054
32055         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
32056         AH_VERBATIM to insert required #ifndef into config.h.in.
32057         Suggestion from Akim Demaille.
32058
32059 2000-04-12  Jim Meyering  <meyering@lucent.com>
32060
32061         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
32062         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
32063         Christian Krackowizer.
32064
32065         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
32066         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
32067         (AC_SYS_LARGEFILE): Require.
32068         (AM_C_PROTOTYPES): Require.
32069
32070 2000-04-08  Jim Meyering  <meyering@lucent.com>
32071
32072         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
32073         names don't conflict.  Reported by Eli Zaretskii.
32074
32075 2000-04-07  Jim Meyering  <meyering@lucent.com>
32076
32077         * lib/putenv.c: Move inclusion of errno.h so it follows that of
32078         sys/types.h, to work around system header problems on AIX 3.2.5.
32079         From Bruno Haible.
32080
32081 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
32082
32083         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
32084         bug.  Deal with the different error behavior of Irix iconv.
32085
32086 2000-04-05  Paul Eggert  <eggert@twinsun.com>
32087
32088         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
32089         IRIX if the installer said otherwise.
32090
32091 2000-04-05  Jim Meyering  <meyering@lucent.com>
32092
32093         Portability tweaks required for ultrix4.3.
32094         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
32095         (jm_CHECK_DECLS): Add getutent to the list of functions.
32096         (_jm_DECL_HEADERS): Add utmpx.h.
32097         From John David Anglin.
32098
32099         * m4/strftime.m4: Back out the 2000-04-02 change.
32100         Instead of that change, simply undefine putenv in the test program.
32101
32102 2000-04-05  Jim Meyering  <meyering@lucent.com>
32103
32104         Portability tweaks required for ultrix4.3.
32105         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
32106         getutent.
32107         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
32108         * lib/canon-host.c: Declare strdup.
32109         * lib/path-concat.c: Likewise.
32110         From John David Anglin.
32111
32112 2000-04-04  Jim Meyering  <meyering@lucent.com>
32113
32114         Be more DOS 8.3-friendly.
32115         * lib/ref-add.sin: Renamed from ref-add.sed.in.
32116         * lib/ref-del.sin: Renamed from ref-del.sed.in.
32117         * lib/Makefile.am: Reflect renaming.
32118         Reported by Eli Zaretskii.
32119
32120         Use a temporary file name that won't clash with `charset.alias'
32121         in the DOS 8.3 name space.
32122         * lib/Makefile.am (charset_tmp): Define.
32123         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
32124         (uninstall-local): Likewise.
32125         Reported by Eli Zaretskii.
32126
32127 2000-04-03  Jim Meyering  <meyering@lucent.com>
32128
32129         * m4/gettext.m4: Fix typo in comment.
32130
32131         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
32132         textutils/configure.in).  Suggestion from Paul Eggert.
32133         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
32134
32135 2000-04-02  Paul Eggert  <eggert@twinsun.com>
32136
32137         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
32138         variable in the shell rather than using putenv, which isn't
32139         portable.  This avoids the configure-time inter-test dependency
32140         on the potentially-renamed putenv function.
32141
32142 2000-03-30  Paul Eggert  <eggert@twinsun.com>
32143
32144         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
32145         before checking struct stat.st_blksize, so that
32146         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
32147
32148 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32149
32150         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
32151         since strftime.c uses HAVE_STRFTIME to decide whether to use
32152         the underlying strftime.
32153
32154 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32155
32156         * lib/time/strftime.c (my_strftime): Make sure we call the system
32157         strftime, not ourselves, when invoking the underlying strftime.
32158
32159 2000-03-24  Jim Meyering  <meyering@lucent.com>
32160
32161         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
32162         (charset_alias): Define.
32163         (install-exec-local): Factor out common code.
32164         (uninstall-local): Split lines longer than 80.
32165         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
32166         (SUFFIXES): Define.
32167         (.sed.in.sed): New rule.  Don't redirect directly to $@.
32168         (CLEANFILES): Add ref-add.sed and ref-del.sed.
32169
32170 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
32171
32172         * lib/config.charset: Output a line containing "Packages using this
32173         file".
32174         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
32175         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
32176         ref-del.sed): New rules.
32177
32178 2000-03-17  Jim Meyering  <meyering@lucent.com>
32179
32180         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
32181         Otherwise, include <strings.h>
32182
32183 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
32184
32185         * lib/unicodeio.c (utf8_wctomb): New function.
32186         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
32187         format instead of in UCS-4 with platform dependent endianness.
32188
32189 2000-03-10  Jim Meyering  <meyering@lucent.com>
32190
32191         * m4/lib-check.m4: Look for getspnam in -lgen, too.
32192         From Marco Franzen.
32193
32194 2000-03-07  Paul Eggert  <eggert@twinsun.com>
32195
32196         * lib/savedir.c (savedir): Work even if directory size is
32197         negative; this can happen with some screwy NFS configurations.
32198
32199 2000-03-06  Jim Meyering  <meyering@lucent.com>
32200
32201         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
32202         if it's NULL (because we ran out of memory).  From Bruno Haible.
32203
32204 2000-03-05  Jim Meyering  <meyering@lucent.com>
32205
32206         * lib/localcharset.c ("path-concat.h"): Include.
32207         (get_charset_aliases): Use path_concat instead of ANSI string
32208         concatenation.
32209
32210         * lib/unicodeio.h (PARAMS): Define.
32211         Use it to guard prototype.
32212
32213 2000-03-04  Jim Meyering  <meyering@lucent.com>
32214
32215         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
32216         for lib/localcharset.c.
32217
32218 2000-03-04  Jim Meyering  <meyering@lucent.com>
32219
32220         * lib/Makefile.am (install-exec-local): Create $(libdir) before
32221         installing into it.
32222         (uninstall-local): Uncomment this rule so `make distcheck' works
32223         once again.
32224
32225         * lib/unicodeio.c (<errno.h>): Include it.
32226         (errno): Declare if not defined.
32227
32228         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
32229
32230         * lib/config.charset: New version, incorporating remarks from a linux
32231         i18n mailing list.  From Bruno Haible.
32232
32233 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
32234
32235         * m4/codeset.m4: New file.
32236         * m4/iconv.m4: New file.
32237         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
32238
32239 2000-03-03  Jim Meyering  <meyering@lucent.com>
32240
32241         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
32242
32243 2000-03-02  Jim Meyering  <meyering@lucent.com>
32244
32245         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
32246         the messages come out on separate lines.
32247
32248         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
32249         rather than jm_CHECK_DECLARATIONS.
32250         * m4/decl.m4: Remove now-unused file.
32251
32252         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
32253         geteuid.
32254
32255 2000-03-02  Jim Meyering  <meyering@lucent.com>
32256
32257         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
32258
32259 2000-03-01  Jim Meyering  <meyering@lucent.com>
32260
32261         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
32262         * lib/unicodeio.c: Likewise.
32263
32264 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
32265
32266         * lib/config.charset: New file.
32267         * lib/localcharset.c: New file.
32268         * lib/unicodeio.h, lib/unicodeio.c: New files.
32269         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
32270         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
32271         (noinst_HEADERS): Add unicodeio.h.
32272         (all-local, install-exec-local, charset.alias): New targets.
32273
32274 2000-02-28  Paul Eggert  <eggert@twinsun.com>
32275
32276         * lib/quotearg.c (ALERT_CHAR): New macro.
32277         (quotearg_buffer_restyled): Use it.
32278
32279 2000-02-27  Jim Meyering  <meyering@lucent.com>
32280
32281         * m4/check-decl.m4: Add getenv to the list.
32282
32283 2000-02-27  Jim Meyering  <meyering@lucent.com>
32284
32285         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
32286         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
32287
32288         * lib/backupfile.c: Guard inclusion of stdlib.h with
32289         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
32290         Declare malloc if needed.
32291
32292         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
32293         `#ifndef HAVE_DECL..'
32294         now that autoconf always defines the HAVE_DECL_ symbols.
32295         * lib/human.c: Likewise.
32296         * lib/same.c: Likewise.
32297         * lib/strtoumax.c: Likewise.
32298
32299         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
32300         declaration check was not run.
32301         * lib/hash.c: Likewise.
32302         * lib/human.c: Likewise.
32303         * lib/same.c: Likewise.
32304         * lib/strtoumax.c: Likewise.
32305
32306         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
32307         `.', then first look up the entire `.'-containing string as a login
32308         name.
32309
32310 2000-02-23  Jim Meyering  <meyering@lucent.com>
32311
32312         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
32313         in place of my hack.
32314
32315 2000-02-18  Paul Eggert  <eggert@twinsun.com>
32316
32317         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
32318         (textint): New typedef.
32319         (parser_control): Member year changed from int to textint.
32320         All uses changed.
32321         (YYSTYPE): Removed; replaced by %union with int and textint members.
32322         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
32323         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
32324         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
32325         (tSNUMBER, tUNUMBER): Now of type <textintval>.
32326         (date, number, to_year): Use width of number in digits, not its value,
32327         to determine whether it's a 2-digit year, or a 2-digit time.
32328         (yylex): Store number of digits of numeric tokens.
32329         Reported by John Kendall.
32330
32331         (parser_control): Changed from struct parser_control to typedef (for
32332         consistency).  All uses changed.
32333
32334         (tID): Removed; not used.
32335         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
32336
32337 2000-02-14  Paul Eggert  <eggert@twinsun.com>
32338
32339         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
32340         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
32341
32342 2000-02-12  Jim Meyering  <meyering@lucent.com>
32343
32344         * lib/userspec.c (ISDIGIT): Define it.
32345         (isdigit): Remove definition.
32346         (is_number): Use ISDIGIT, not isdigit.
32347         <libintl.h>: Include.
32348         (_ and N_): Define.
32349         (parse_user_spec): Mark translatable strings.
32350
32351 2000-02-10  Jim Meyering  <meyering@lucent.com>
32352
32353         With these changes, nanosleep.[ch] are finally enough like the other
32354         lib/* replacement files to compile on a few more losing systems.
32355
32356         * lib/nanosleep.h: Don't include config.h.
32357         Remove prototype from declaration of nanosleep.
32358         (PARAMS): Remove now-unneeded definition.
32359         * lib/nanosleep.c: #undef nanosleep.
32360         (rpl_nanosleep): Rename from nanosleep.
32361
32362 2000-02-10  Jim Meyering  <meyering@lucent.com>
32363
32364         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
32365         gnu_nanosleep to rpl_nanosleep.
32366
32367 2000-02-09  Jim Meyering  <meyering@lucent.com>
32368
32369         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
32370         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
32371
32372 2000-02-08  Akim Demaille  <akim@epita.fr>
32373
32374         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
32375         `[' and `]' and remove uses of `changequote'.
32376         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
32377         (AC_SYS_LARGEFILE): Likewise.
32378         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
32379         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
32380         of changequote.
32381         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
32382         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
32383         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
32384         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
32385
32386 2000-02-05  Jim Meyering  <meyering@lucent.com>
32387
32388         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
32389         Remove explicit use of AC_HEADER_TIME.  It is required by
32390         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
32391         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
32392         in autoconf whereby the expansion of the latter ended up preceding
32393         the expansion of its prerequisite, AC_HEADER_TIME.
32394         Reported by Volker Borchert.
32395
32396 2000-02-03  Jim Meyering  <meyering@lucent.com>
32397
32398         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
32399
32400 2000-02-03  Jim Meyering  <meyering@lucent.com>
32401
32402         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
32403         rather than with `#if HAVE_UTMPNAME'.
32404
32405 2000-02-02  Jim Meyering  <meyering@lucent.com>
32406
32407         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
32408         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
32409         Reported by Eli Zaretskii.
32410
32411 2000-02-01  Jim Meyering  <meyering@lucent.com>
32412
32413         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
32414
32415 2000-01-31  Jim Meyering  <meyering@lucent.com>
32416
32417         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
32418         functions.  Add the time.h and sys/time.h headers along with the
32419         AC_REQUIRE'ment of AC_HEADER_TIME.
32420
32421 2000-01-31  Jim Meyering  <meyering@lucent.com>
32422
32423         * lib/nanosleep.h (nanosleep): Guard declaration with
32424         `#if ! HAVE_DECL_NANOSLEEP'.
32425         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
32426         the declaration in that vendor's sys/timers.h.
32427         Reported by Christian Krackowizer.
32428
32429         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
32430         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
32431         (ISPRINT): Likewise.
32432         Reported by Tom Tromey.
32433
32434 2000-01-30  Jim Meyering  <meyering@lucent.com>
32435
32436         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
32437
32438         * m4/prereq.m4 (utmp_includes): Define.
32439         Check for ut_user and ut_name members in both struct utmpx
32440         and struct utmp.
32441
32442 2000-01-30  Jim Meyering  <meyering@lucent.com>
32443
32444         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
32445         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
32446         header files where only utmpx.ut_user is declared.
32447
32448         * lib/readutmp.h (UT_USER): Define.
32449
32450 2000-01-29  Jim Meyering  <meyering@lucent.com>
32451
32452         * m4/lib-check.m4: New file containing library-related checks from
32453         fileutils and sh-utils (textutils had none).
32454
32455 2000-01-28  Jim Meyering  <meyering@lucent.com>
32456
32457         * m4/perl.m4: Change format of warning message to look more like that
32458         from the missing script.  Suggestion from François Pinard.
32459
32460 2000-01-25  Jim Meyering  <meyering@lucent.com>
32461
32462         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
32463         well as time.h in the compile check.
32464         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
32465         Fix typo in cross-compiling case: s/yes/no/.
32466
32467 2000-01-23  Jim Meyering  <meyering@lucent.com>
32468
32469         * m4/jm-macros.m4: Move df-related tests here from
32470         fileutils/configure.in
32471
32472         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
32473         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
32474
32475         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
32476         s/space/ac_fsusage_space/.
32477         (jm_FILE_SYSTEM_USAGE): Take two parameters.
32478
32479         * m4/ftruncate.m4: New file (derived from part of
32480         fileutils/configure.in).
32481         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
32482         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
32483
32484         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
32485         AC_SUBST these here, rather than just in sh-util/configure.in, so
32486         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
32487         all the same.
32488         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
32489         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
32490         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
32491         (AC_SUBST(POW_LIBM)): Likewise.
32492         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
32493
32494 2000-01-23  Jim Meyering  <meyering@lucent.com>
32495
32496         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
32497         obstack.c.
32498
32499 2000-01-22  Jim Meyering  <meyering@lucent.com>
32500
32501         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
32502
32503         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
32504
32505         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
32506         configure.in
32507         (AC_CHECK_HEADERS): Likewise for sh-utils.
32508         (AC_CHECK_HEADERS): Likewise for textutils.
32509         Merge the three lists of headers.
32510
32511         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
32512         from fileutils' configure.in.
32513
32514         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
32515         code. Moved tests into their own function (_jm_DECL_HEADERS) in
32516         check-decl.m4.
32517
32518         * m4/check-decl.m4: Use #if rather than #ifdef.
32519         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
32520         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
32521         (_jm_DECL_HEADERS): Define new function.
32522         (jm_CHECK_DECLARATIONS): Require it.
32523
32524 2000-01-22  Jim Meyering  <meyering@lucent.com>
32525
32526         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
32527         [! HAVE_DECL_STRTOULL]: Declare strtoull.
32528         Required for some AIX systems.  Reported by Christian Krackowizer.
32529         [TESTING] (main): New function.
32530
32531         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
32532         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
32533         letters.
32534
32535         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
32536         iswprint.
32537
32538         * lib/strverscmp.c (ISDIGIT): Define.
32539         (strverscmp): Use ISDIGIT, not isdigit.
32540
32541 2000-01-19  Jim Meyering  <meyering@lucent.com>
32542
32543         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
32544         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
32545         defines `struct timespec' in <sys/time.h>
32546
32547         * m4/c-bs-a.m4: Remove uses of changequote altogether.
32548         Thanks to Akim for explaining.
32549
32550 2000-01-17  Paul Eggert  <eggert@twinsun.com>
32551
32552         * lib/nanosleep.c (nanosleep):
32553         Don't use SA_INTERRUPT to decide whether to call sigaction, as
32554         POSIX.1 doesn't require SA_INTERRUPT and some systems
32555         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
32556         it's been part of POSIX.1 since day 1 (in 1988).
32557
32558 2000-01-17  Jim Meyering  <meyering@lucent.com>
32559
32560         * lib/interlock: Remove unused file.  Reported by François Pinard.
32561
32562 2000-01-16  Paul Eggert  <eggert@twinsun.com>
32563
32564         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
32565         alert, backslash, formfeed, and vertical tab unnecessarily in
32566         shell quoting style.
32567
32568 2000-01-16  Jim Meyering  <meyering@lucent.com>
32569
32570         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
32571         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
32572         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
32573         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
32574
32575 2000-01-16  Jim Meyering  <meyering@lucent.com>
32576
32577         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
32578         because the latter didn't work.
32579
32580 2000-01-15  Jim Meyering  <meyering@lucent.com>
32581
32582         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
32583         (AC_REPLACE_FUNCS): Add memcpy and memset.
32584         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
32585         Add strpbrk.
32586         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
32587
32588 2000-01-12  Jim Meyering  <meyering@lucent.com>
32589
32590         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
32591         (jm_PREREQ): Use it.
32592         (jm_PREREQ_READUTMP): New macro.
32593         (jm_PREREQ): Use it.
32594
32595 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32596
32597         Quote multibyte characters correctly.
32598         * m4/c-bs-a.m4: New file.
32599         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
32600         (jm_PREREQ): Use it.
32601
32602 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32603
32604         * m4/uintmax_t.m4: Port to autoconf 2.13.
32605
32606 2000-01-08  Jim Meyering  <meyering@ascend.com>
32607
32608         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
32609         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
32610
32611 2000-01-04  Jim Meyering  <meyering@ascend.com>
32612
32613         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
32614         jm_STRUCT_DIRENT_D_TYPE.
32615         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
32616         jm_STRUCT_DIRENT_D_INO.
32617         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
32618         jm_STRUCT_UTIMBUF.
32619         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
32620         renamings.
32621         * m4/utime.m4: Likewise.
32622
32623         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
32624         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
32625
32626 2000-01-03  Paul Eggert  <eggert@twinsun.com>
32627
32628         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
32629         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
32630
32631 2000-01-02  Jim Meyering  <meyering@ascend.com>
32632
32633         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
32634         remember if this is necessary.
32635
32636 1999-12-26  Jim Meyering  <meyering@ascend.com>
32637
32638         * m4/jm-macros.m4: Use it here.
32639         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
32640
32641 1999-12-23  Jim Meyering  <meyering@ascend.com>
32642
32643         * m4/jm-macros.m4: Check for clock_gettime (moved from
32644         fileutils/configure.in)
32645         Check for gettimeofday.
32646
32647 1999-12-20  Jim Meyering  <meyering@ascend.com>
32648
32649         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
32650         autoconf-2.14a-1999-12-20.
32651
32652 1999-12-19  Jim Meyering  <meyering@ascend.com>
32653
32654         * m4/lstat-slash.m4: New file.
32655         * m4/jm-macros.m4: Use the new macro:
32656         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
32657
32658 1999-12-07  Jim Meyering  <meyering@ascend.com>
32659
32660         * m4/perl.m4: Require that File::Compare be available, too.
32661         Too many systems seem to lack it.
32662
32663         * m4/strftime.m4: Add checks for most of the cpp macros tested in
32664         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
32665
32666 1999-11-18  Paul Eggert  <eggert@twinsun.com>
32667
32668         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
32669         problem with the QNX 4.25 shell, which doesn't propagate exit
32670         status of failed commands inside shell assignments.
32671
32672 1999-11-17  Jim Meyering  <meyering@ascend.com>
32673
32674         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
32675
32676 1999-11-07  Jim Meyering  <meyering@ascend.com>
32677
32678         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
32679
32680 1999-11-06  Jim Meyering  <meyering@ascend.com>
32681
32682         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
32683         * m4/jm-macros.m4 (jm_MACROS): Use it here.
32684
32685 1999-11-05  Jim Meyering  <meyering@ascend.com>
32686
32687         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
32688         configure.in of textutils, fileutils, and sh-utils into this one
32689         (shared between those packages) file.
32690         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
32691         AC_STRUCT_ST_BLKSIZE.
32692
32693 1999-11-03  Jim Meyering  <meyering@ascend.com>
32694
32695         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
32696         of AC_CHECK_TYPE checks includes unistd.h.
32697         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
32698         Suggestion from Akim Demaille.
32699
32700 1999-10-30  Jim Meyering  <meyering@ascend.com>
32701
32702         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
32703         m4-quoted string.
32704         * m4/ls-mntd-fs.m4: Likewise.
32705         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
32706         * m4/jm-winsz1.m4: Likewise.
32707
32708         * m4/const.m4: Remove file, since the fix made it into the experimental
32709         version of autoconf.
32710         * m4/mktime.m4: Likewise.
32711
32712         * m4/check-type.m4: Remove file, now that the latest version of
32713         AC_CHECK_TYPE takes a third arg to specify additional #includes.
32714
32715         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
32716         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
32717         AC_CHECK_TYPE.
32718
32719 1999-10-04  Jim Meyering  <meyering@ascend.com>
32720
32721         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
32722
32723 1999-09-22  Paul Eggert  <eggert@twinsun.com>
32724
32725         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
32726         2.95.1 bug with HP-UX 10.20.
32727
32728 1999-09-17  Jim Meyering  <meyering@ascend.com>
32729
32730         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
32731         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
32732         due to missing strdup (against sh-utils-2.0).
32733
32734 1999-08-29  Jim Meyering  <meyering@ascend.com>
32735
32736         * m4/jm-macros.m4: Require jm_BISON.
32737         * m4/bison.m4: New file.
32738
32739 1999-08-17  Paul Eggert  <eggert@twinsun.com>
32740
32741         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
32742         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
32743
32744 1999-08-05  Jim Meyering  <meyering@ascend.com>
32745
32746         * m4/getline.m4: Rename test file from conftestdata to conftest.data
32747         to avoid conflicts with `conftest' on 8+3 filesystems.
32748         Suggestion from Eli Zaretskii.
32749
32750 1999-08-04  Jim Meyering  <meyering@ascend.com>
32751
32752         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
32753         fileutils and sh-utils (textutils's getline test was inadequate).
32754         (AM_FUNC_GETLINE): Run this test.
32755         (AC_CHECK_FUNCS): Check for getdelim.
32756         Reported by Bob Proulx.
32757
32758 1999-08-02  Jim Meyering  <meyering@ascend.com>
32759
32760         * m4/jm-macros.m4: Add a comment.
32761
32762 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32763
32764         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
32765         <inttypes.h> defines strtoumax as a macro (and not as a
32766         function).
32767
32768 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32769
32770         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
32771         that we can shift, multiply and divide unsigned long long
32772         values; Ultrix cc can't do it.
32773
32774 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32775
32776         * m4/mktime.m4: New file, which is a preview of what should appear
32777         in the next public autoconf release.
32778
32779 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32780
32781         * m4/lfs.m4: Remove this file.
32782         * m4/largefile.m4: New file.  It contains the old contents of
32783         lfs.m4, except that all names with prefix AC_LFS have been
32784         changed to use the prefix AC_SYS_LARGEFILE instead, to be
32785         compatible with future autoconf versions.  Also, some minor m4
32786         quoting problems have been fixed.
32787
32788 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32789
32790         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
32791         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
32792         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
32793         and simplify the shell code.
32794
32795 1999-08-01  Jim Meyering  <meyering@ascend.com>
32796
32797         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
32798         m4.
32799
32800 1999-07-20  Jim Meyering  <meyering@ascend.com>
32801
32802         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
32803
32804 1999-07-15  Jim Meyering  <meyering@ascend.com>
32805
32806         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
32807
32808 1999-05-22  Jim Meyering  <meyering@ascend.com>
32809
32810         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
32811
32812 1999-05-20  Jim Meyering  <meyering@ascend.com>
32813
32814         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
32815         Add a colon after each `then' in case $4 is empty.
32816
32817 1999-05-16  Jim Meyering  <meyering@ascend.com>
32818
32819         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
32820
32821 1999-05-10  Jim Meyering  <meyering@ascend.com>
32822
32823         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
32824
32825         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
32826         AC_FUNC_MKTIME.
32827
32828 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
32829
32830         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
32831
32832 1999-05-04  Paul Eggert  <eggert@twinsun.com>
32833
32834         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
32835         not CPPFLAGS, so that linking works correctly in IRIX.
32836
32837 1999-04-30  Paul Eggert  <eggert@twinsun.com>
32838
32839         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
32840
32841 1999-04-20  Paul Eggert  <eggert@twinsun.com>
32842
32843         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
32844         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
32845         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
32846         jm_AC_TYPE_UNSIGNED_LONG_LONG.
32847         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
32848
32849         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
32850
32851 1999-04-20  Jim Meyering  <meyering@ascend.com>
32852
32853         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
32854         AC_REPLACE xstroull if necessary.  From Paul Eggert.
32855         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
32856
32857 1999-04-18  Jim Meyering  <meyering@ascend.com>
32858
32859         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
32860         * m4/jm-macros.m4: Use it.
32861
32862 1999-04-06  Jim Meyering  <meyering@ascend.com>
32863
32864         * m4/strftime.m4: Remove test for %f.
32865
32866 1999-03-29  Jim Meyering  <meyering@ascend.com>
32867
32868         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
32869         superset of the AC_TYPE_* checks in the textutils, fileutils,
32870         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
32871         AC_TYPE_PID_T.
32872
32873 1999-03-28  Jim Meyering  <meyering@ascend.com>
32874
32875         * m4/jm-macros.m4: Define GNU_PACKAGE here.
32876         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
32877         replaced e.g., in the *.sh files of the sh-utils.
32878
32879 1999-03-20  Jim Meyering  <meyering@ascend.com>
32880
32881         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
32882         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
32883         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
32884
32885 1999-03-19  Jim Meyering  <meyering@ascend.com>
32886
32887         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
32888
32889 1999-03-12  Jim Meyering  <meyering@ascend.com>
32890
32891         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
32892
32893 1999-03-07  Jim Meyering  <meyering@ascend.com>
32894
32895         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
32896         declared.
32897
32898 1999-02-17  Jim Meyering  <meyering@ascend.com>
32899
32900         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
32901         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
32902
32903 1999-02-07  Jim Meyering  <meyering@ascend.com>
32904
32905         * m4/group-member.m4: New file -- extracted from sh-utils'
32906         configure.in.
32907
32908         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
32909         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
32910
32911 1999-02-06  Jim Meyering  <meyering@ascend.com>
32912
32913         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
32914         * m4/fnmatch.m4: Likewise.
32915         * m4/getgroups.m4: Likewise.
32916         * m4/lstat.m4: Likewise.
32917         * m4/malloc.m4: Likewise.
32918         * m4/putenv.m4: Likewise.
32919         * m4/realloc.m4: Likewise.
32920         * m4/regex.m4: Likewise.
32921         * m4/stat.m4: Likewise.
32922         * m4/strftime.m4: Likewise.
32923         Suggestion from Alain Magloire.
32924
32925         * m4/chown.m4: Use `.$ac_objext', not `.o'.
32926         * m4/fnmatch.m4: Likewise.
32927         * m4/getgroups.m4: Likewise.
32928         * m4/getline.m4: Likewise.
32929         * m4/lstat.m4: Likewise.
32930         * m4/malloc.m4: Likewise.
32931         * m4/memcmp.m4: Likewise.
32932         * m4/putenv.m4: Likewise.
32933         * m4/realloc.m4: Likewise.
32934         * m4/regex.m4: Likewise.
32935         * m4/stat.m4: Likewise.
32936         * m4/strftime.m4: Likewise.
32937         Suggestion from Alain Magloire.
32938
32939         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
32940         an argument.
32941
32942         * m4/regex.m4: Add a run-time Test for proper operation of
32943         re_compile_pattern.
32944
32945 1999-01-31  Jim Meyering  <meyering@ascend.com>
32946
32947         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
32948
32949 1999-01-30  Jim Meyering  <meyering@ascend.com>
32950
32951         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
32952
32953         * m4/jm-mktime.m4: Make this a wrapper around the official
32954         AM_FUNC_MKTIME rather than my private copy, now that the official one
32955         is up to date.
32956         * m4/mktime.m4: Remove file.
32957
32958         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
32959         * m4/uptime.m4: Likewise.
32960         * m4/uintmax_t.m4: Likewise.
32961
32962 1999-01-28  Jim Meyering  <meyering@ascend.com>
32963
32964         * m4/jm-macros.m4: Use jm_AFS.
32965         * m4/afs.m4: New file (from fileutils' configure.in).
32966
32967         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
32968         * m4/chown.m4: Likewise.
32969         * m4/d-ino.m4: Likewise.
32970         * m4/d-type.m4: Likewise.
32971         * m4/fnmatch.m4: Likewise.
32972         * m4/getgroups.m4: Likewise.
32973         * m4/gettext.m4: Likewise.
32974         * m4/jm-mktime.m4: Likewise.
32975         * m4/jm-winsz2.m4: Likewise.
32976         * m4/lcmessage.m4: Likewise.
32977         * m4/ls-mntd-fs.m4: Likewise.
32978         * m4/malloc.m4: Likewise.
32979         * m4/memcmp.m4: Likewise.
32980         * m4/putenv.m4: Likewise.
32981         * m4/realloc.m4: Likewise.
32982         * m4/st_mtim.m4: Likewise.
32983         * m4/strftime.m4: Likewise.
32984
32985 1999-01-16  Jim Meyering  <meyering@ascend.com>
32986
32987         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
32988         (ARGMATCH_DIE_DECL): Define.
32989
32990 1999-01-12  Jim Meyering  <meyering@ascend.com>
32991
32992         * m4/Makefile.am.in: Rewrite to avoid using fmt.
32993         Reported by Lars Hecking.
32994
32995 1999-01-10  Jim Meyering  <meyering@ascend.com>
32996
32997         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
32998         gross kludge.
32999         * m4/inttypes_h.m4: Likewise.
33000         * m4/lstat.m4: Likewise.
33001         * m4/malloc.m4: Likewise.
33002         * m4/readdir.m4: Likewise.
33003         * m4/realloc.m4: Likewise.
33004         * m4/st_dm_mode.m4: Likewise.
33005         * m4/stat.m4: Likewise.
33006         * m4/utimbuf.m4: Likewise.
33007         * m4/utimes.m4: Likewise.
33008
33009         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
33010         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
33011         comments in config.h.in are meaningful.
33012
33013         * m4/jm-macros.m4: Require autoconf-2.13 here.
33014
33015         * m4/regex.m4: By default, don't use the included regex.c on systems
33016         with glibc 2.  Suggestion from Uli Drepper.
33017
33018 1999-01-02  Jim Meyering  <meyering@ascend.com>
33019
33020         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
33021
33022 1998-12-18  Jim Meyering  <meyering@ascend.com>
33023
33024         * m4/Makefile.am.in (Makefile.am): Simplify rule.
33025         Based on a suggestion from Lars Hecking.
33026
33027 1998-11-16  Paul Eggert  <eggert@twinsun.com>
33028
33029         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
33030
33031 1998-11-16  Jim Meyering  <meyering@ascend.com>
33032
33033         * m4/lfs.m4: Double-quote the `uname...` expression.
33034
33035 1998-11-14  Jim Meyering  <meyering@ascend.com>
33036
33037         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
33038         * m4/stat.m4: Likewise.
33039
33040 1998-11-03  Jim Meyering  <meyering@ascend.com>
33041
33042         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
33043         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
33044
33045 1998-10-18  Jim Meyering  <meyering@ascend.com>
33046
33047         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
33048
33049 1998-10-17  Jim Meyering  <meyering@ascend.com>
33050
33051         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
33052         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
33053         calls for those previously hard-coded headers.  Instead, take a new
33054         parameter.
33055         (jm_CHECK_DECLARATIONS): Reflect interface change.
33056         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
33057         (jm_CHECK_DECL_LOCALTIME_R): New macro.
33058
33059         * m4/mktime.m4: Test for spring-forward gap before long-running test.
33060
33061 1998-10-14  Jim Meyering  <meyering@ascend.com>
33062
33063         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
33064         instead of "TZ=America/Vancouver".  From Paul Eggert.
33065
33066 1998-10-11  Jim Meyering  <meyering@ascend.com>
33067
33068         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
33069         This adds a test for a recently added compatibility fix for mktime.c.
33070         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
33071
33072 1998-09-27  Jim Meyering  <meyering@ascend.com>
33073
33074         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
33075
33076         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
33077         ../configure.in, including a change from Gordon Matzigkeit to allow
33078         cross-compiling for the Hurd.
33079
33080         * m4/glibc.m4: New file/macro to test for the GNU C Library
33081         versions 1 and 2.  From Gordon Matzigkeit.
33082         Indent.
33083
33084 1998-09-21  Jim Meyering  <meyering@ascend.com>
33085
33086         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
33087
33088 1998-08-18  Paul Eggert  <eggert@twinsun.com>
33089
33090         Port nanosecond-resolution times to UnixWare 2.1.2 and
33091         pedantic Solaris 2.6.
33092
33093         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
33094         AC_STRUCT_ST_MTIM.
33095         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
33096         Generate name of ns member, instead of just 1 or undef.
33097         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
33098
33099 1998-08-15  Jim Meyering  <meyering@ascend.com>
33100
33101         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
33102         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
33103         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
33104         instead of jm_TYPE_SSIZE_T.
33105
33106 1998-08-12  Jim Meyering  <meyering@ascend.com>
33107
33108         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
33109
33110 1998-08-02  Jim Meyering  <meyering@ascend.com>
33111
33112         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
33113         in acconfig.h manually.
33114
33115 1998-07-31  Paul Eggert  <eggert@twinsun.com>
33116
33117         * m4/st_mtim.m4: New file.
33118
33119 1998-07-28  Jim Meyering  <meyering@ascend.com>
33120
33121         * m4/utimes.m4: Undef stat.
33122
33123 1998-07-25  Jim Meyering  <meyering@ascend.com>
33124
33125         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
33126         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
33127
33128 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
33129
33130         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
33131         uid and gid actually remain unchanged.
33132
33133 1998-07-07  Jim Meyering  <meyering@ascend.com>
33134
33135         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
33136
33137 1998-07-04  Jim Meyering  <meyering@ascend.com>
33138
33139         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
33140         to prove that this macro can be used in packages without regex.c.
33141
33142 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
33143
33144         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
33145         is to be used.
33146
33147 1998-07-03  Jim Meyering  <meyering@ascend.com>
33148
33149         * m4/gettext.m4: Add -lintl if it's found to be necessary.
33150
33151         * m4/gettext.m4: New file -- from gettext-0.10.35.
33152         * m4/lcmessage.m4: Likewise.
33153         * m4/progtest.m4: Likewise.
33154
33155         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
33156         * m4/jm-macros.m4: Require the new macro.
33157
33158 1998-06-29  Jim Meyering  <meyering@ascend.com>
33159
33160         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
33161         for the definition of NGROUPS (used in a system header included
33162         by sys/mount.h).
33163
33164 1998-06-28  Jim Meyering  <meyering@ascend.com>
33165
33166         * m4/ls-mntd-fs.m4: New file.
33167         * m4/fstypename.m4: New file.
33168
33169         * m4/jm-macros.m4: Require the new macro.
33170         * m4/jm-glibc-io.m4: New file.
33171
33172 1998-05-19  Jim Meyering  <meyering@ascend.com>
33173
33174         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
33175         * m4/lchown.m4: New file.
33176
33177         * m4/Makefile.am.in: New file.
33178         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
33179
33180 1998-05-14  Jim Meyering  <meyering@ascend.com>
33181
33182         * m4/Makefile.am (EXTRA_DIST): Add them.
33183         * m4/jm-macros.m4: New file.
33184         * m4/utimbuf.m4: New file.
33185
33186 1998-05-12  Jim Meyering  <meyering@ascend.com>
33187
33188         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
33189
33190 1998-05-11  Jim Meyering  <meyering@ascend.com>
33191
33192         * m4/isc-posix.m4: New file.
33193
33194 1998-05-10  Jim Meyering  <meyering@ascend.com>
33195
33196         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
33197
33198 1998-05-09  Jim Meyering  <meyering@ascend.com>
33199
33200         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
33201         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
33202         with automake.
33203
33204         * m4/ssize_t.m4: New file.
33205         * m4/mktime.m4: Remove file -- the new automake has this now.
33206
33207 1998-04-26  Jim Meyering  <meyering@ascend.com>
33208
33209         * m4/assert.m4: New file.
33210         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
33211
33212 1998-04-05  Jim Meyering  <meyering@ascend.com>
33213
33214         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
33215         (jm_PREREQ): Use it here.
33216
33217 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
33218
33219         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
33220         in acconfig.h.
33221
33222 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
33223
33224         * m4/prereq.m4: New file.
33225         * m4/error.m4: New file.
33226         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
33227
33228 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
33229
33230         * m4/getline.m4: Don't set am_cv_func_working_getline before the
33231         cache-check for the same variable -- that defeated the purpose of
33232         the test; the test program was never run.  This was a problem only
33233         on systems with losing getline functions -- HP-UX 10.20 is one.
33234         Reported by Bjorn Helgaas.
33235
33236 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
33237
33238         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
33239
33240 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
33241
33242         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
33243
33244         * m4/const.m4: New file.  Use an initializer in this declaration
33245         typedef int charset[2]; const charset x;
33246         Reported by Bob Glickstein.
33247
33248 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
33249
33250         * m4/chown.m4: Fix reversed types on -1 args to chown.
33251         From Kaveh Ghazi.
33252
33253 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
33254
33255         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
33256         Add lseek and memchr.
33257
33258         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
33259         T.E.Dickey <dickey@clark.net> said that some older preprocessors
33260         have a 20-character limit on names.
33261
33262 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
33263
33264         * m4/inttypes_h.m4: New file.
33265         * m4/uintmax_t.m4: New file.
33266         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
33267
33268 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
33269   Free Software Foundation, Inc.
33270 Copying and distribution of this file, with or without modification,
33271 are permitted provided the copyright notice and this notice are preserved.