Change xreadlink module to use areadlink.
[gnulib.git] / ChangeLog
1 2007-09-29  Bruno Haible  <bruno@clisp.org>
2
3         * lib/xreadlink.c (xreadlink): Simplify to a wrapper around areadlink.
4         * modules/xreadlink (Depends-on): Add areadlink, remove readlink etc.
5         * build-aux/install-reloc: Compile also areadlink.c.
6         * modules/relocatable-prog-wrapper (Files): Add lib/areadlink.[hc].
7
8 2007-09-29  Bruno Haible  <bruno@clisp.org>
9
10         * gnulib-tool (func_emit_initmacro_done): Indentation.
11
12 2007-09-29  Bruno Haible  <bruno@clisp.org>
13
14         * README: Add CVS checkout update instructions.
15         Info from Bob Proulx <bob@proulx.com>.
16
17 2007-09-28  Eric Blake  <ebb9@byu.net>
18
19         Provide move-if-change.
20         * build-aux/move-if-change: New file, based on best practice
21         rather than any canonical upstream location.
22
23 2007-09-28  Jim Meyering  <jim@meyering.net>
24
25         Fix canonicalize loop-detection corner case.
26         Do not attempt to stat the symlink values stored via seen_triple.
27         Without this, coreutils' tests/misc/readlink-fp-loop test would fail
28         on linux-2.6.18, (but not 2.6.22).
29         * lib/canonicalize.c (seen_triple): Use triple_compare_ino_str, not
30         triple_compare.  The former compares dev,ino,filename, while the latter
31         would actually stat dirname(filename) when dev and ino were equal.
32         * lib/hash-triple.c: Install <string.h>.
33         (STREQ): Define.
34         (triple_compare_ino_str): New function.
35         * lib/hash-triple.h (triple_compare_ino_str): Declare it.
36
37 2007-09-28  Eric Blake  <ebb9@byu.net>
38
39         Enforce that AC_REPLACE_FUNCS files exist.
40         * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES
41         override check for typos.
42
43         Fix test-closein on Solaris 10.
44         * tests/test-closein.c (main): Don't assume stdin can be inherited
45         closed on all systems.
46         * tests/test-closein.sh: Likewise.
47         Reported by Piotr Tarnowski.
48
49 2007-09-28  Jim Meyering  <jim@meyering.net>
50
51         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Fix typo in comment.
52
53 2007-09-27  Jim Meyering  <jim@meyering.net>
54
55         canonicalize: Avoid a false-positive cycle failure.
56         * modules/canonicalize (Depends-on): Add file-set and hash-triple.
57         Sort.  Remove cycle-check.
58         * lib/canonicalize.c: Include file-set.h and hash-triple.h,
59         not cycle-check.h.
60         (seen_triple): New function.
61         (canonicalize_filename_mode): Use it instead of cycle-check.
62         * tests/test-canonicalize.c: Add a test for this bug.
63         * tests/test-canonicalize.sh: Set up and run the test.
64
65         New module, file-set, from coreutils.
66         * modules/file-set: Define it.
67         * lib/file-set.c, lib/file-set.h: Implement.
68
69         New module, hash-triple, from coreutils.
70         * modules/hash-triple: Define it.
71         * lib/hash-triple.c, lib/hash-triple.h: Implement.
72
73 2007-09-25  Eric Blake  <ebb9@byu.net>
74
75         Fix strerror on Interix.
76         * lib/string_.h (strerror): Declare replacement.
77         * doc/functions/strerror.texi (strerror): Document the Interix
78         shortcoming.
79         * modules/string (Makefile.am): Support new hooks.
80         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add new hooks.
81         * m4/strerror.m4 (gl_FUNC_STRERROR): Defer to
82         gl_FUNC_STRERROR_SEPARATE.
83         (gl_FUNC_STRERROR_SEPARATE): Check for Interix bug.
84         * lib/strerror.c (rpl_strerror): Provide replacement.
85         * modules/strerror (Depends-on): Add string.
86         (configure.ac): Detect use of module.
87         * tests/test-strerror.c: New file.
88         * modules/strerror-tests: New test module.
89         * modules/argp (Depends-on): Add strerror.
90         * modules/error (Depends-on): Likewise.
91         Reported by Martin Koeppe.
92
93 2007-09-24  Bruno Haible  <bruno@clisp.org>
94
95         * README: Update git instructions.
96
97 2007-09-24  Eric Blake  <ebb9@byu.net>
98
99         Revert fpending breakage from 2007-09-08.
100         * m4/fpending.m4 (gl_FUNC_FPENDING): Don't require existence of
101         __fpending.c.
102
103 2007-09-24  Jim Meyering  <jim@meyering.net>
104
105         filenamecat.c: Add a test.
106         * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test
107         showing how the function works when DIR is the empty string.
108
109 2007-09-21  Simon Josefsson  <simon@josefsson.org>
110
111         * tests/test-canonicalize.sh: Turn on executable bit.
112
113 2007-09-19  Eric Blake  <ebb9@byu.net>
114
115         * README: Update CVS instructions.
116
117 2007-09-18  Bruno Haible  <bruno@clisp.org>
118
119         * modules/areadlink: New file.
120         * lib/areadlink.h (areadlink): New declaration.
121         * lib/areadlink.c: New file, based on lib/xreadlink.c.
122
123 2007-09-17  Jim Meyering  <jim@meyering.net>
124
125         * lib/savewd.c (ESTALE) [!defined]: Define.
126         Reported to be required on Interix by Martin Koeppe.
127
128 2007-09-17  Bruno Haible  <bruno@clisp.org>
129
130         * gnulib-tool (func_version): Use $version.
131
132 2007-09-16  Bruno Haible  <bruno@clisp.org>
133
134         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE,
135         gl_PRINTF_INFINITE_LONG_DOUBLE): Increase buf's size from 100 to 10000.
136         Needed on glibc-2.6.1 with -fstack-protector -D_FORTIFY_SOURCE=2.
137         Reported by Greg Schafer <gschafer@zip.com.au>.
138
139 2007-09-15  Bruno Haible  <bruno@clisp.org>
140
141         * gnulib-tool (sed): Try a little harder to make bash understand the
142         alias.
143         Reported by Bruce Korb <bruce.korb@gmail.com>.
144
145 2007-09-13  Eric Blake  <ebb9@byu.net>
146
147         * ChangeLog: Remove conflict markers.
148
149 2007-09-13  Simon Josefsson  <simon@josefsson.org>
150
151         * lib/gc-gnulib.c (gc_hash_open): Catch NULL calloc return value.
152         Reported by Bruno Haible <bruno@clisp.org>.
153
154 2007-09-12  Bruno Haible  <bruno@clisp.org>
155
156         * m4/lock.m4: Don't provide an AC_USE_SYSTEM_EXTENSIONS definition.
157         (gl_LOCK_EARLY_BODY): Use AC_GNU_SOURCE when AC_USE_SYSTEM_EXTENSIONS
158         is not defined.
159
160 2007-09-12  Eric Blake  <ebb9@byu.net>
161
162         Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
163         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Update to CVS
164         Autoconf definition.
165         * modules/euidaccess (Depends-on): Add extensions, for
166         AC_USE_SYSTEM_EXTENSIONS with autoconf <= 2.59.
167         * modules/fnmatch (Depends-on): Likewise.
168         * modules/getaddrinfo (Depends-on): Likewise.
169         * modules/getdelim (Depends-on): Likewise.
170         * modules/getline (Depends-on): Likewise.
171         * modules/getsubopt (Depends-on): Likewise.
172         * modules/gettext (Depends-on): Likewise.
173         * modules/group-member (Depends-on): Likewise.
174         * modules/mbchar (Depends-on): Likewise.
175         * modules/memmem (Depends-on): Likewise.
176         * modules/mempcpy (Depends-on): Likewise.
177         * modules/memrchr (Depends-on): Likewise.
178         * modules/pagealign_alloc (Depends-on): Likewise.
179         * modules/readutmp (Depends-on): Likewise.
180         * modules/stpcpy (Depends-on): Likewise.
181         * modules/stpncpy (Depends-on): Likewise.
182         * modules/strchrnul (Depends-on): Likewise.
183         * modules/strndup (Depends-on): Likewise.
184         * modules/strsep (Depends-on): Likewise.
185         * modules/strverscmp (Depends-on): Likewise.
186         * modules/vasprintf (Depends-on): Likewise.
187         * modules/wcwidth (Depends-on): Likewise.
188         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): AC_GNU_SOURCE will be
189         obsolete in Autoconf 2.62; use AC_USE_SYSTEM_EXTENSIONS instead.
190         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Likewise.
191         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDR_INFO): Likewise.
192         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
193         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
194         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Likewise.
195         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
196         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Likewise.
197         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
198         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
199         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
200         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
201         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
202         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Likewise.
203         * m4/readutmp.m4 (gl_READUTMP): Likewise.
204         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
205         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
206         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
207         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
208         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
209         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
210         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
211         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Likewise.
212         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): Likewise.
213         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
214         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Likewise, but provide fallback,
215         so that lock.m4 can be used in gettext without extensions module.
216
217 2007-09-11  Bruno Haible  <bruno@clisp.org>
218
219         * m4/isc-posix.m4: Remove file.
220         Suggested by Eric Blake.
221
222 2007-09-11  Eric Blake  <ebb9@byu.net>
223
224         * ChangeLog: Restore lines accidentally truncated 2007-04-06.
225
226 2007-09-10  Bruno Haible  <bruno@clisp.org>
227
228         * posix-modules: Fix typo in error message.
229         Reported by Matt <mkraai@beckman.com>.
230
231 2007-09-09  Bruno Haible  <bruno@clisp.org>
232
233         * doc/functions/getdelim.texi: Update list of platforms lacking the
234         function.
235         * doc/functions/getline.texi: Likewise.
236
237 2007-09-09  Jim Meyering  <jim@meyering.net>
238
239         * lib/hash.c (hash_initialize): Detect calloc failure.
240         Reported by Bruno Haible.
241
242 2007-09-09  Bruno Haible  <bruno@clisp.org>
243
244         * lib/canonicalize-lgpl.c (__realpath): Set errno to ENOMEM when
245         malloc or realloc fails.
246
247 2007-09-09  Bruno Haible  <bruno@clisp.org>
248
249         * modules/getcwd (Depends-on): Add malloc-posix.
250         * modules/glob (Depends-on): Likewise.
251         * modules/putenv (Depends-on): Likewise.
252         * modules/strdup (Depends-on): Likewise.
253         * modules/getdelim (Depends-on): Add realloc-posix.
254         * modules/read-file (Depends-on): Likewise.
255
256 2007-09-09  Bruno Haible  <bruno@clisp.org>
257
258         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): New macro.
259         (gl_FUNC_MALLOC_POSIX): Require it.
260         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
261         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Likewise.
262         * modules/realloc (Files): Add m4/malloc.m4.
263         * modules/calloc (Files): Likewise.
264
265 2007-09-09  Bruno Haible  <bruno@clisp.org>
266
267         * modules/malloc-posix: New file.
268         * modules/malloc (Depends-on): Add malloc-posix.
269         * lib/malloc.c: Include errno.h.
270         (rpl_malloc): Merge the requirements of a glibc-compatible malloc
271         and a POSIX-compatible malloc into a single function. Set ENOMEM
272         when returning NULL.
273         * m4/malloc.m4: New file.
274         * doc/functions/malloc.texi: Mention the malloc-posix module.
275         * lib/stdlib_.h (malloc): New declaration.
276         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
277         GNULIB_MALLOC_POSIX and HAVE_MALLOC_POSIX.
278         * modules/stdlib (stdlib.h): Substitute also GNULIB_MALLOC_POSIX
279         and HAVE_MALLOC_POSIX.
280
281 2007-09-09  Bruno Haible  <bruno@clisp.org>
282
283         * modules/realloc-posix: New file.
284         * modules/realloc (Depends-on): Add realloc-posix.
285         * lib/realloc.c: Include errno.h.
286         (rpl_realloc): Merge the requirements of a glibc-compatible realloc
287         and a POSIX-compatible realloc into a single function. Set ENOMEM
288         when returning NULL.
289         * m4/realloc.m4: New file.
290         * doc/functions/realloc.texi: Mention the realloc-posix module.
291         * lib/stdlib_.h (realloc): New declaration.
292         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
293         GNULIB_REALLOC_POSIX and HAVE_REALLOC_POSIX.
294         * modules/stdlib (stdlib.h): Substitute also GNULIB_REALLOC_POSIX
295         and HAVE_REALLOC_POSIX.
296
297 2007-09-09  Bruno Haible  <bruno@clisp.org>
298
299         * modules/calloc-posix: New file.
300         * modules/calloc (Depends-on): Add calloc-posix.
301         * lib/calloc.c: Include errno.h.
302         (rpl_calloc): Merge the requirements of a glibc-compatible calloc
303         and a POSIX-compatible calloc into a single function. Set ENOMEM
304         when returning NULL.
305         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): New macro.
306         * doc/functions/calloc.texi: Mention the calloc-posix module.
307         * lib/stdlib_.h (calloc): New declaration.
308         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
309         GNULIB_CALLOC_POSIX and HAVE_CALLOC_POSIX.
310         * modules/stdlib (stdlib.h): Substitute also GNULIB_CALLOC_POSIX
311         and HAVE_CALLOC_POSIX.
312
313 2007-09-09  Bruno Haible  <bruno@clisp.org>
314
315         Allow for modules to show an arbitrary notice.
316         * modules/TEMPLATE-EXTENDED: Add 'Notice' field.
317         * gnulib-tool: New option --extract-notice.
318         (func_usage): Document it.
319         (sed_extract_prog): Update.
320         (func_get_notice): New function.
321         (func_modules_notice): New function.
322         (func_import, func_create_testdir): Invoke it.
323         Suggested by Jim Meyering.
324
325 2007-09-09  Bruno Haible  <bruno@clisp.org>
326
327         * gnulib-tool: New options --verbose, --quiet.
328         (func_usage): Document them.
329         (verbose): New variable.
330         (func_execute_command): New function.
331         (func_import): Don't show the module list and the file list if
332         $verbose < 0.
333         (func_create_testdir): Likewise. Use func_execute_command.
334         (func_create_megatestdir): Use func_execute_command.
335
336 2007-09-08  Bruno Haible  <bruno@clisp.org>
337
338         * gnulib-tool (func_import): Prefer rsync over wget when available,
339         for fetching the PO files.
340
341 2007-09-08  Bruno Haible  <bruno@clisp.org>
342
343         * posix-modules: New file. Portions copied from gnulib-tool.
344         * doc/gnulib.texi (POSIX Substitutes Library): New chapter.
345
346 2007-09-08  Jim Meyering  <jim@meyering.net>
347
348         Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h
349         * lib/fpending.h: Rename from __fpending.h.
350         * lib/fpending.c: Rename from __fpending.c.
351         Include "fpending.h", not "__fpending.h".
352         * lib/__fpending.h, lib/__fpending.c: Remove files.
353         * modules/fpending (Files): Reflect new file names.
354         * lib/close-stream.c: Include "fpending.h", not "__fpending.h".
355
356 2007-09-08  Bruno Haible  <bruno@clisp.org>
357
358         * m4/inttypes-h.m4: Remove stub file.
359
360 2007-09-07  Simon Josefsson  <simon@josefsson.org>
361
362         * doc/headers/stdint.texi: Discuss #include_next issue.
363
364 2007-09-06  Paul Eggert  <eggert@cs.ucla.edu>
365
366         * build-aux/bootstrap: Remove obsolete comment about wget --help.
367
368 2007-09-06  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
369
370         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Fix misspelling
371         in variable name.
372
373 2007-09-03  Jim Meyering  <jim@meyering.net>
374
375         New module: git-version-gen.
376         * modules/git-version-gen: New file.
377
378         Import changes from coreutils for bootstrap script.
379
380         * build-aux/bootstrap (WGET_COMMAND): Remove code to set this variable.
381
382         bootstrap: uses rsync to download the .po files
383         * build-aux/bootstrap (po_download_command_format): New global.
384         (download_po_files): Use rsync.
385         (update_po_files): Don't remove .po files after download,
386         so future rsync runs can take advantage of the copies.
387
388         * build-aux/bootstrap (gnulib_tool): Make sha1sum check quietly.
389
390         Solve the unnecessary-.po-file-regeneration problem once and for all.
391         * build-aux/bootstrap (download_po_files): New function, renamed from
392         get_translations.  Now, downloads, but doesn't update LINGUAS.
393         (update_po_files): New function.
394
395         bootstrap: Ignore more.
396         * build-aux/bootstrap (symlink_to_dir): Add a directory name like
397         uniwidth to e.g., lib/.gitignore.
398         (slurp): Handle the sys_stat_.h -> sys mapping, too.
399
400         * build-aux/bootstrap: New setting: vc_ignore.
401         (insert_sorted_if_absent): Create $file if absent.
402         Adapt to new, possibly empty, list: $vc_ignore.
403
404         bootstrap: generate more ignorable names
405         * build-aux/bootstrap (slurp): When generating ignorable names,
406         also map .sin to .sed, .gperf to .c, and .y to .c.
407
408 2007-09-03  Jim Meyering  <jim@meyering.net>
409
410         * build-aux/git-version-gen: New file, from coreutils.  For details, see
411         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=bfe49f506
412
413 2007-09-02  Bruno Haible  <bruno@clisp.org>
414
415         Fix mis-recognition of 'mcs' on QNX 6.
416         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Test whether the "mcs --version"
417         output contains the string "Mono".
418         * lib/csharpcomp.c (compile_csharp_using_mono): Likewise.
419         Reported by <kraai@ftbfs.org> at <https://savannah.gnu.org/bugs/?18337>.
420
421 2007-09-01  Bruno Haible  <bruno@clisp.org>
422
423         Fix collision between uniwidth/* and linebreak modules.
424         * lib/linebreak.h (locale_charset, uc_width, u8_width, u16_width,
425         u32_width): Remove declarations.
426         * lib/linebreak.c: Include uniwidth.h, uniwidth/cjk.h, streq.h.
427         (u32_mbtouc_unsafe, streq9, streq8, streq7, streq6, streq5, streq4,
428         streq3, streq2, streq1, streq0): Remove functions.
429         (STREQ): Remove macro.
430         (is_cjk_encoding): Remove function.
431         (nonspacing_table_data, nonspacing_table_ind): Remove constants.
432         (uc_width, u8_width, u16_width, u32_width): Remove functions.
433         * modules/linebreak (Depends-on): Add streq, uniwidth/width.
434         * NEWS: Document the change.
435
436 2007-09-01  Bruno Haible  <bruno@clisp.org>
437
438         * lib/streq.h: Add double-inclusion guard.
439
440 2007-09-01  Karl Berry  <karl@gnu.org>
441
442         * MODULES.html.sh: Rename mreadlink_with_size to areadlink_with_size.
443
444 2007-08-28  Jim Meyering  <jim@meyering.net>
445
446         Rename mreadlink_with_size to areadlink_with_size.
447         * NEWS: Document the change.
448         * lib/mreadlink-with-size.c (mreadlink_with_size): Rename this to...
449         * lib/areadlink-with-size.c (areadlink_with_size): ...this.
450         * lib/mreadlink.h: Rename this to...
451         * lib/areadlink.h: ...this.
452         * modules/mreadlink-with-size: Rename this to...
453         * modules/areadlink-with-size: ...this.
454         * lib/canonicalize.c: Reflect the renaming.
455         * modules/canonicalize: Likewise.
456
457 2007-08-26  Bruno Haible  <bruno@clisp.org>
458
459         * gnulib-tool (func_import): When deciding which files to remove,
460         consider also dangling symbolic links.
461         Reported by Eric Blake.
462
463 2007-08-26  Bruno Haible  <bruno@clisp.org>
464
465         * gnulib-tool (func_ln_if_changed): Use "test -h", not "test -L".
466
467 2007-08-23  Simon Josefsson  <simon@josefsson.org>
468
469         * lib/readline.c: Don't include getline.h, the prototype is now
470         found in stdio.h.
471
472 2007-08-23  Jim Meyering  <jim@meyering.net>
473
474         Getdelim touchup.
475         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
476         around the funlockfile call, since funlockfile never sets errno.
477         Don't set errno upon failed realloc.
478
479 2007-08-22  Eric Blake  <ebb9@byu.net>
480
481         Getline touchups.
482         * lib/getdelim.c (getdelim): Revert regression that required *n to
483         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
484         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
485         getdelim, rather than whether implementation is missing.
486         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
487         * lib/stdio_.h (getline): Also declare if replacement is
488         required.
489         * doc/functions/getdelim.texi: New file.
490         * doc/functions/getline.texi: Likewise.
491         * doc/gnulib.texi (Function Substitutes): Add new files.
492         Reported by Bruno Haible.
493
494 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
495
496         * users.txt: Add Guile.
497
498 2007-08-22  Eric Blake  <ebb9@byu.net>
499
500         * tests/test-getdelim.c (main): Use remove, not unlink.
501         * tests/test-getline.c (main): Likewise.
502
503         Move getline and getdelim into stdio.h, per POSIX 200x.
504         * modules/getline (Files): Remove getline.h.
505         (Depends-on): Add stdio.
506         (configure.ac): Add module indicator.
507         * modules/getdelim (Files): Remove getdelim.h.
508         (Depends-on): Add stdio.
509         (configure.ac): Add module indicator.
510         * modules/stdio (Makefile.am): Work with new indicators.
511         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
512         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
513         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
514         * lib/getdelim.h: Delete.
515         * lib/getline.h: Delete.
516         * lib/stdio_.h (getdelim, getline): Declare.
517         * modules/getdelim-tests: New module.
518         * modules/getline-tests: Likewise.
519         * tests/test-getdelim.c: New file.
520         * tests/test-getline.c: Likewise.
521         * NEWS: Document the change.
522         * lib/getline.c: Update choice of header.
523         * lib/csharpcomp.c: Likewise.
524         * lib/getpass.c: Likewise.
525         * lib/javacomp.c: Likewise.
526         * lib/javaversion.c: Likewise.
527         * lib/yesno.c: Likewise.
528         * lib/getdelim.c: Likewise.
529         (getdelim): Set errno on failure, and avoid memory leak.
530
531 2007-08-19  Bruno Haible  <bruno@clisp.org>
532
533         * modules/closein (Depends-on): Add freadahead.
534         * lib/closein.c: Include freadahead.h.
535         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
536         is zero.
537
538 2007-08-19  Bruno Haible  <bruno@clisp.org>
539
540         * modules/freadahead-tests: New file.
541         * tests/test-freadahead.sh: New file.
542         * tests/test-freadahead.c: New file.
543
544         * modules/freadahead: New file.
545         * lib/freadahead.h: New file.
546         * lib/freadahead.c: New file.
547         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
548         fbufmode, fpurge, freadable, fwritable.
549
550 2007-08-19  Eric Blake  <ebb9@byu.net>
551
552         Test yesno in combination with closein.
553         * lib/yesno.c (yesno): Document use of stdin.
554         * modules/yesno-tests (Files): New module.
555         * tests/test-yesno.c (main): New file.
556         * tests/test-yesno.sh: Likewise.
557
558 2007-08-19  Bruno Haible  <bruno@clisp.org>
559
560         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
561         * lib/fseeko.c (rpl_fseeko): Likewise.
562         * lib/fseterr.c (fseterr): Likewise.
563
564 2007-08-19  Bruno Haible  <bruno@clisp.org>
565
566         * tests/test-lseek.c (main): Disable a test for BeOS.
567         * doc/functions/lseek.texi: Document the BeOS bug.
568
569 2007-08-19  Bruno Haible  <bruno@clisp.org>
570             Eric Blake  <ebb9@byu.net>
571
572         * lib/lseek.c: Include <sys/stat.h>.
573         (rpl_lseek): Add workaround code also for Unix platforms.
574         Needed for BeOS.
575         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
576         * doc/functions/lseek.texi: Document BeOS definiency.
577
578 2007-08-18  Bruno Haible  <bruno@clisp.org>
579
580         * modules/fstrcmp-tests: New file.
581         * tests/test-fstrcmp.c: New file.
582
583 2007-08-18  Bruno Haible  <bruno@clisp.org>
584
585         * modules/fstrcmp: New file, from GNU gettext with modifications.
586         * lib/fstrcmp.h: New file, from GNU gettext.
587         * lib/fstrcmp.c: New file, from GNU gettext.
588         * MODULES.html.sh (String handling): Add fstrcmp.
589
590 2007-08-18  Bruno Haible  <bruno@clisp.org>
591
592         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
593         'bool'.
594         (diag, compareseq): Remove const from the ctxt argument.
595         (USE_HEURISTIC): Undefine at the end.
596
597 2007-08-18  Jim Meyering  <jim@meyering.net>
598
599         New file: lib/idcache.h
600         * NEWS: Mention the addition.
601         * modules/idcache (Files): Add lib/idcache.h
602         * lib/idcache.c: Include "idcache.h".
603         Don't include <sys/types.h>.
604         Add a FIXME comment.
605         Move file-scoped "static" declarations to the top.
606         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
607
608 2007-08-17  Bruno Haible  <bruno@clisp.org>
609         and Paul Eggert  <eggert@cs.ucla.edu>
610
611         * MODULES.html.sh: Add diffseq.
612         * modules/diffseq: New file.
613         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
614         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
615
616 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
617
618         Import changes from coreutils for bootstrap script.
619
620         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
621
622         * build-aux/bootstrap (slurp): Work even in environments where
623         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
624         current code does not slurp files whose names start with ".", and
625         this looks like it might be a troublesome area.
626
627         2007-07-11  Jim Meyering  <jim@meyering.net>
628
629         If there's a GPL vN copyright comment, require that N == 3.
630
631         2007-07-08  Jim Meyering  <jim@meyering.net>
632
633         Run the coreutils-specific code only if tests/Makefile.am.in exists.
634         * build-aux/bootstrap (mam_template): Move definition out of loop.
635
636         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
637
638         * build-aux/bootstrap (symlink_to_dir): Rename function from
639         symlink_to_gnulib.  Add a directory parameter.  Update all
640         callers.
641         (cp_mark_as_generated): Also check for -- and link to -- files in
642         gl/.
643
644         2007-07-08  Jim Meyering  <jim@meyering.net>
645
646         Adapt to deeper hierarchy in gnulib.
647         * build-aux/bootstrap (symlink_to_dir): If the destination
648         directory doesn't exist, create it. This is required at least for
649         "lib/uniwidth/cjk.h".
650
651         2007-05-15  Jim Meyering  <jim@meyering.net>
652
653         * build-aux/bootstrap: Now that generated Makefile.am files
654         are no longer under version control, they must be created at
655         bootstrap time.
656
657 2007-08-14  Ben Pfaff  <blp@gnu.org>
658
659         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
660
661 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
662
663         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
664         given the changes below.
665         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
666         even on hosts that have padding bits beyond the supported 64.
667
668 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
669
670         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
671         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
672         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
673         depends on it.
674         (xstrtol_error): Remove.
675         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
676         but with a different signature.
677         (ATTRIBUTE_NORETURN, __attribute__): New macros.
678         * lib/xstrtol-error.c: Include exitfail.h.
679         (xstrtol_fatal): New function, with a different signature from the
680         old xstrtol_error, so that the caller need not worry about passing
681         in an exit status, or about storage management of the option argument.
682         (xstrtol_error): Now a static function.  Redo signature to
683         implement xstrtol_fatal.  Output the correct number of hyphens in
684         front of the option so that the caller need not worry about
685         storage management.
686         (N_): New macro.
687         (_): Remove; not used now.
688         * modules/xstrtol: Depend on getopt.
689         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
690         of old STRTOL_FATAL_ERROR macro.
691         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
692         of test program.
693         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
694         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
695
696 2007-08-08  Eric Blake  <ebb9@byu.net>
697
698         * lib/xstrtol-error.c: Add missing include.
699
700         Move xstrtol messages into gnulib domain, when --pobase is used.
701         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
702         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
703         * modules/xstrtol (Files): Distribute new file.
704         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
705         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
706         * tests/test-xstrtol.c: ...into new file.
707         * tests/test-xstrtoul.c: Also test xstrtoul.
708         * tests/test-xstrtoimax.c: Also test xstrtoimax.
709         * tests/test-xstrtoumax.c: Also test xstrtoumax.
710         * tests/test-xstrtol.sh: Drive the tests.
711         * tests/test-xstrtoimax.sh: Likewise.
712         * tests/test-xstrtoumax.sh: Likewise.
713         * modules/xstrtol-tests: New module.
714         * modules/xstrtoimax-tests: Likewise.
715         * modules/xstrtoumax-tests: Likewise.
716
717 2007-08-08  Jim Meyering  <jim@meyering.net>
718
719         New function: mfile_name_concat.
720         * lib/filenamecat.c (mfile_name_concat): New function, just like
721         file_name_concat, but return NULL upon failure rather than exiting
722         with a diagnostic.
723         * lib/filenamecat.h: Declare it.
724
725 2007-08-07  Bruno Haible  <bruno@clisp.org>
726
727         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
728         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
729         warning from gcc.
730         Reported by Eric Blake.
731
732 2007-08-07  Simon Josefsson  <simon@josefsson.org>
733
734         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
735         * modules/crypto/arcfour (License): Likewise.
736         * modules/crypto/des-tests (License): Likewise.
737         * modules/crypto/gc-arctwo-tests (License): Likewise.
738         * modules/crypto/gc-des-tests (License): Likewise.
739         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
740         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
741         * modules/crypto/gc-md2-tests (License): Likewise.
742         * modules/crypto/gc-md4-tests (License): Likewise.
743         * modules/crypto/gc-md5-tests (License): Likewise.
744         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
745         * modules/crypto/gc-rijndael-tests (License): Likewise.
746         * modules/crypto/gc-sha1-tests (License): Likewise.
747         * modules/crypto/gc-tests (License): Likewise.
748         * modules/crypto/hmac-md5 (License): Likewise.
749         * modules/crypto/hmac-sha1 (License): Likewise.
750         * modules/crypto/md2-tests (License): Likewise.
751         * modules/crypto/md4-tests (License): Likewise.
752         * modules/crypto/md5 (License): Likewise.
753         * modules/crypto/rijndael (License): Likewise.
754         * modules/crypto/sha1 (License): Likewise.
755         * modules/memxor (License): Likewise.
756
757 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
758         and Bruno Haible  <bruno@clisp.org>
759
760         * NEWS: Describe interface changes to human, xstrtol.
761         * lib/human.h: Include <xstrtol.h>.
762         (human_options): Return enum strtol_error, not int.  Remove
763         bool arg; take int * instead.
764         * lib/human.c: Don't include "gettext.h".
765         (_): Remove; no longer used.
766         Don't include <xstrtol.h>, since human.h does it.
767         (human_options): Adjust to abovementioned interface changes.
768         Do not report error to stderr; that's now the caller's
769         responsibility.
770         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
771         interface change.
772         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
773         Str, Argument_type_string.  All uses changed.  Put " argument"
774         in diagnostics to make them clearer.  Change wording of suffix
775         message for clarity.
776         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
777         Argument_type_string.
778         (STRTOL_FATAL_WARN): Remove; no longer used.
779         * modules/human (Depends-on): Remove gettext-h.
780
781 2007-08-06  Simon Josefsson  <simon@josefsson.org>
782
783         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
784
785 2007-07-31  Bruno Haible  <bruno@clisp.org>
786
787         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
788         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
789         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
790
791 2007-07-31  Bruno Haible  <bruno@clisp.org>
792
793         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
794         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
795
796 2007-07-30  Bruno Haible  <bruno@clisp.org>
797
798         * modules/base64 (License): Use the synonymous term "LGPLv2+".
799         * modules/c-ctype (License): Likewise.
800         * modules/c-strcase (License): Likewise.
801         * modules/check-version (License): Likewise.
802         * modules/iconv (License): Likewise.
803         * modules/iconv_open (License): Likewise.
804         * modules/read-file (License): Likewise.
805         * modules/striconv (License): Likewise.
806         * modules/strverscmp (License): Likewise.
807         * modules/vasprintf (License): Likewise.
808         * modules/crypto/des (License): Likewise.
809         * modules/crypto/gc (License): Likewise.
810         * modules/crypto/gc-arcfour (License): Likewise.
811         * modules/crypto/gc-arctwo (License): Likewise.
812         * modules/crypto/gc-des (License): Likewise.
813         * modules/crypto/gc-hmac-md5 (License): Likewise.
814         * modules/crypto/gc-hmac-sha1 (License): Likewise.
815         * modules/crypto/gc-md2 (License): Likewise.
816         * modules/crypto/gc-md4 (License): Likewise.
817         * modules/crypto/gc-md5 (License): Likewise.
818         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
819         * modules/crypto/gc-random (License): Likewise.
820         * modules/crypto/gc-rijndael (License): Likewise.
821         * modules/crypto/gc-sha1 (License): Likewise.
822         * modules/crypto/md2 (License): Likewise.
823         * modules/crypto/md4 (License): Likewise.
824
825 2007-07-30  Jim Meyering  <jim@meyering.net>
826
827         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
828         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
829         it has valid stat data.  This bug would cause du not to count the
830         sizes of inaccessible directories.
831         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
832         in <http://bugzilla.redhat.com/250077>.
833
834 2007-07-25  Peter O'Gorman  <peter@pogma.com>
835             Bruno Haible  <bruno@clisp.org>
836
837         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
838         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
839         #include_next, gives a diagnostic about it, but reports no error in
840         the exit code.
841         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
842
843 2007-07-24  Ben Pfaff  <blp@gnu.org>
844
845         Improve name: "count-one-bits" is better than "popcount".
846         * MODULES.html.sh: Update name.
847         * lib/popcount.h: Renamed lib/count-one-bits.h.
848         (popcount): Renamed count_one_bits.
849         (popcountl): Renamed count_one_bits_l.
850         (popcountll): Renamed count_one_bits_ll.
851         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
852         * modules/popcount: Renamed module/count-one-bits.
853         * modules/popcount-tests: Renamed module/count-one-bits-tests.
854         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
855
856 2007-07-23  Ben Pfaff  <blp@gnu.org>
857
858         * lib/popcount.h (popcount32): Reduce size of constants, to allow
859         better code generation, and add U to large constants to avoid
860         warnings, in non-GCC case.
861         Suggested by Bruno Haible.
862
863 2007-07-23  Ben Pfaff  <blp@gnu.org>
864
865         * lib/popcount.h: Use verify_true instead of if...abort.
866         * modules/popcount: Depend on verify module.
867         Suggested by Jim Meyering.
868
869 2007-07-23  Bruno Haible  <bruno@clisp.org>
870
871         * gnulib-tool (func_import): Create a .cvsignore file also when the
872         directory is not yet in CVS but the toplevel directory is. When
873         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
874         Reported by Karl Berry.
875
876 2007-07-22  Ben Pfaff  <blp@gnu.org>
877
878         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
879         case.
880         Suggested by Eric Blake.
881
882 2007-07-22  Ben Pfaff  <blp@gnu.org>
883
884         New module: popcount.
885         * MODULES.html.sh: Add popcount.
886         * modules/popcount: New file.
887         * modules/popcount-tests: New file.
888         * tests/test-popcount.c: New file.
889         * lib/popcount.h: New file.
890         * m4/popcount.m4: New file.
891
892 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
893
894         * build-aux/announce-gen: Update to GPLv3.
895
896         * build-aux/config.guess: Update from config.
897
898 2007-07-21  Bruno Haible  <bruno@clisp.org>
899
900         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
901         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
902
903 2007-07-20  Jim Meyering  <jim@meyering.net>
904
905         * check-module: Diagnose a self-dependency.
906
907 2007-07-19  Bruno Haible  <bruno@clisp.org>
908
909         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
910         empty.
911         Reported by Eric Blake.
912
913 2007-07-18  Bruno Haible  <bruno@clisp.org>
914
915         * gnulib-tool: New options --po-base, --po-domain.
916         (func_usage): Document them.
917         (pobase, po_domain): New variables.
918         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
919         DEFAULT_TEXT_DOMAIN.
920         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
921         (func_import): Consider pobase and po_domain. Create a po/ directory.
922         (func_create_testdir): Set pobase and po_domain to empty.
923         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
924         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
925
926 2007-07-18  Bruno Haible  <bruno@clisp.org>
927
928         * gnulib-tool (func_get_automake_snippet): Synthesize also an
929         EXTRA_DIST augmentation for files in build-aux/.
930
931 2007-07-16  Bruno Haible  <bruno@clisp.org>
932
933         * modules/lseek (License): Use the synonymous term "LGPLv2+".
934         * modules/getdelim (License): Likewise.
935
936 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
937
938         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
939         * modules/d-type (License): Likewise.
940         * modules/extensions (License): Likewise.
941         * modules/fnmatch (License): Likewise.
942         * modules/fseeko (License): Likewise.
943         * modules/getaddrinfo (License): Likewise.
944         * modules/getline (License): Likewise.
945         * modules/getlogin_r (License): Likewise.
946         * modules/getpass (License): Likewise.
947         * modules/gettimeofday (License): Likewise.
948         * modules/glob (License): Likewise.
949         * modules/inet_ntop (License): Likewise.
950         * modules/malloc (License): Likewise.
951         * modules/malloca (License): Likewise.
952         * modules/memmem (License): Likewise.
953         * modules/mempcpy (License): Likewise.
954         * modules/memset (License): Likewise.
955         * modules/minmax (License): Likewise.
956         * modules/mktime (License): Likewise.
957         * modules/netinet_in (License): Likewise.
958         * modules/pathmax (License): Likewise.
959         * modules/poll (License): Likewise.
960         * modules/regex (License): Likewise.
961         * modules/snprintf (License): Likewise.
962         * modules/stdbool (License): Likewise.
963         * modules/stdint (License): Likewise.
964         * modules/stdio (License): Likewise.
965         * modules/strcase (License): Likewise.
966         * modules/strcasestr (License): Likewise.
967         * modules/strdup (License): Likewise.
968         * modules/string (License): Likewise.
969         * modules/strndup (License): Likewise.
970         * modules/strnlen (License): Likewise.
971         * modules/strpbrk (License): Likewise.
972         * modules/strptime (License): Likewise.
973         * modules/strsep (License): Likewise.
974         * modules/sys_select (License): Likewise.
975         * modules/sys_socket (License): Likewise.
976         * modules/sys_stat (License): Likewise.
977         * modules/sys_time (License): Likewise.
978         * modules/time (License): Likewise.
979         * modules/time_r (License): Likewise.
980         * modules/timegm (License): Likewise.
981         * modules/unistd (License): Likewise.
982         * modules/vsnprintf (License): Likewise.
983         * modules/wctype (License): Likewise.
984
985 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
986
987         * modules/argz (License): LGPLv2+.
988
989 2007-07-15  Karl Berry  <karl@gnu.org>
990
991         * doc/gnulib.texi: revise node structure per new fdl.texi.
992
993 2007-07-14  Bruno Haible  <bruno@clisp.org>
994
995         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
996         the output file.
997         * lib/uniname/uninames.h: Regenerated.
998
999 2007-07-14  Karl Berry  <karl@gnu.org>
1000
1001         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
1002         omitting sectioning and index commands.
1003
1004 2007-07-13  Bruno Haible  <bruno@clisp.org>
1005
1006         New gnulib-tool option --more-symlinks.
1007         * gnulib-tool (func_usage): Document --more-symlinks.
1008         (do_copyrights): New variable.
1009         Recognize option --more-symlinks.
1010         (func_import): Don't add a copyright notice transform to
1011         sed_transform_lib_file if do_copyrights is empty.
1012
1013 2007-07-13  Bruno Haible  <bruno@clisp.org>
1014
1015         * lib/vasnprintf.c (decimal_point_char): Define also if
1016         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
1017         && !NEED_PRINTF_DIRECTIVE_A.
1018         Reported by Clemens Koller <clemens.koller@anagramm.de> via
1019         Gary V. Vaughan <gary@gnu.org>.
1020
1021 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
1022
1023         * lib/inttypes_.h: Undo previous change, since it was fixed
1024         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
1025
1026 2007-07-13  Bruno Haible  <bruno@clisp.org>
1027
1028         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
1029         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
1030
1031 2007-07-13  Jim Meyering  <jim@meyering.net>
1032
1033         df: Don't fail for Tru64's "file-on-file mount".
1034         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
1035         so we fall through and use statfs instead.  Details here:
1036         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
1037         Reported by Albert Chin.
1038
1039 2007-07-13  Bruno Haible  <bruno@clisp.org>
1040
1041         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
1042         * modules/configmake (License): Likewise.
1043         * modules/gettext (License): Likewise.
1044         * modules/gettext-h (License): Likewise.
1045         * modules/include_next (License): Likewise.
1046         * modules/link-warning (License): Likewise.
1047         * modules/localcharset (License): Likewise.
1048         * modules/localename (License): Likewise.
1049         * modules/lock (License): Likewise.
1050         * modules/relocatable-lib-lgpl (License): Likewise.
1051         * modules/size_max (License): Likewise.
1052         * modules/vasnprintf (License): Likewise.
1053         * modules/wchar (License): Likewise.
1054         * modules/xsize (License): Likewise.
1055
1056 2007-07-13  Bruno Haible  <bruno@clisp.org>
1057
1058         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
1059         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
1060
1061 2007-07-12  Bruno Haible  <bruno@clisp.org>
1062
1063         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
1064         in the modules files.
1065
1066 2007-07-11  Karl Berry  <karl@gnu.org>
1067
1068         * MODULES.html.sh (func_module): use
1069          sed -e '\|^'"${includefile}"'$|d'
1070          instead of /.../d, to avoid errors on $includefile's containing /.
1071
1072 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
1073
1074         * gnulib-tool (func_import): Avoid duplication of --avoid
1075         statements
1076         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
1077         names to `_' in variable names.
1078
1079 2007-07-10  Eric Blake  <ebb9@byu.net>
1080
1081         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
1082         * NEWS: Document this change.
1083
1084 2007-07-08  Bruno Haible  <bruno@clisp.org>
1085
1086         Update to Unicode 5.0.
1087         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
1088         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
1089         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
1090         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
1091         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
1092         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
1093         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
1094         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
1095         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
1096         U+10A3F, U+1D242..U+1D244.
1097         (nonspacing_table_ind): Update.
1098         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
1099         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
1100
1101 2007-07-08  Bruno Haible  <bruno@clisp.org>
1102
1103         Update to Unicode 5.0.
1104         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
1105         code transform. Extend the name index field of unicode_name_to_code and
1106         unicode_code_to_name from 16 to 24 bits.
1107         * lib/uniname/uniname.c (unicode_character_name,
1108         unicode_name_character): Add the range 0x12xxx to the code transform.
1109         * lib/uniname/uninames.h: Regenerated.
1110         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
1111
1112 2007-07-07  Bruno Haible  <bruno@clisp.org>
1113
1114         * modules/wcwidth-tests: New file.
1115         * tests/test-wcwidth.c: New file.
1116
1117         Work around MacOS X wcwidth() bug.
1118         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
1119         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
1120         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
1121         original wcwidth in non-UTF-8 locales.
1122         * modules/wcwidth (Depends-on): Add localcharset, streq,
1123         uniwidth/width.
1124         * doc/functions/wcwidth.texi: Update.
1125
1126 2007-07-07  Bruno Haible  <bruno@clisp.org>
1127
1128         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
1129         (wcwidth): New declaration.
1130         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
1131         macros.
1132         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
1133         here. Prepare for creating <wchar.h> unconditionally.
1134         * modules/wchar (Depends-on): Add link-warning.
1135         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
1136         REPLACE_WCWIDTH, and GL_LINK_WARNING.
1137         * lib/wcwidth.h: Remove file.
1138         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
1139         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
1140         * modules/wcwidth (Files): Remove lib/wcwidth.h.
1141         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
1142         (Include): Replace wcwidth.h with <wchar.h>.
1143         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
1144         * lib/mbchar.h: Don't include wcwidth.h.
1145         * lib/mbswidth.c: Likewise.
1146         * NEWS: Mention the change.
1147
1148 2007-07-07  Bruno Haible  <bruno@clisp.org>
1149
1150         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
1151         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
1152         definition with an external declaration.
1153         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
1154         defined as a function. Remove AC_C_INLINE requirement.
1155         * modules/wcwidth (Files): Add lib/wcwidth.c.
1156         (Makefile.am): Remove redundant statement.
1157
1158 2007-07-07  Bruno Haible  <bruno@clisp.org>
1159
1160         * MODULES.html.sh (Unicode string functions): Add the new modules.
1161
1162         * tests/uniwidth/test-u32-strwidth.c: New file.
1163         * modules/uniwidth/u32-strwidth-tests: New file.
1164
1165         * lib/uniwidth/u32-strwidth.c: New file.
1166         * modules/uniwidth/u32-strwidth: New file.
1167
1168         * tests/uniwidth/test-u16-strwidth.c: New file.
1169         * modules/uniwidth/u16-strwidth-tests: New file.
1170
1171         * lib/uniwidth/u16-strwidth.c: New file.
1172         * modules/uniwidth/u16-strwidth: New file.
1173
1174         * tests/uniwidth/test-u8-strwidth.c: New file.
1175         * modules/uniwidth/u8-strwidth-tests: New file.
1176
1177         * lib/uniwidth/u8-strwidth.c: New file.
1178         * modules/uniwidth/u8-strwidth: New file.
1179
1180         * tests/uniwidth/test-u32-width.c: New file.
1181         * modules/uniwidth/u32-width-tests: New file.
1182
1183         * lib/uniwidth/u32-width.c: New file.
1184         * modules/uniwidth/u32-width: New file.
1185
1186         * tests/uniwidth/test-u16-width.c: New file.
1187         * modules/uniwidth/u16-width-tests: New file.
1188
1189         * lib/uniwidth/u16-width.c: New file.
1190         * modules/uniwidth/u16-width: New file.
1191
1192         * tests/uniwidth/test-u8-width.c: New file.
1193         * modules/uniwidth/u8-width-tests: New file.
1194
1195         * lib/uniwidth/u8-width.c: New file.
1196         * modules/uniwidth/u8-width: New file.
1197
1198         * tests/uniwidth/test-uc_width.c: New file.
1199         * modules/uniwidth/width-tests: New file.
1200
1201         * lib/uniwidth/width.c: New file, from GNU libiconv.
1202         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
1203         * modules/uniwidth/width: New file.
1204
1205         * lib/uniwidth.h: New file, from GNU libiconv.
1206         * modules/uniwidth/base: New file.
1207
1208 2007-07-07  Bruno Haible  <bruno@clisp.org>
1209
1210         * lib/uniname.h: New file, from GNU gettext.
1211         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
1212         * lib/uniname/uninames.h: New file, from GNU gettext.
1213         * lib/uniname/uniname.c: New file, from GNU gettext.
1214         * tests/uniname/test-uninames.sh: New file.
1215         * tests/uniname/test-uninames.c: New file, from GNU gettext.
1216         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
1217         * modules/uniname/base: New file.
1218         * modules/uniname/uniname: New file.
1219         * modules/uniname/uniname-tests: New file.
1220         * MODULES.html.sh (Unicode string functions): Add the new modules.
1221
1222 2007-07-06  Bruno Haible  <bruno@clisp.org>
1223
1224         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
1225
1226 2007-07-06  Bruno Haible  <bruno@clisp.org>
1227
1228         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
1229         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
1230         includes <cygwin/sys_time.h> which includes <sys/select.h> which
1231         include <sys/time.h>.
1232         Reported by Eric Blake.
1233
1234 2007-07-06  Eric Blake  <ebb9@byu.net>
1235
1236         Fix testing canonicalize on cygwin.
1237         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1238         Revert patch from 2007-06-19.
1239         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
1240         canonicalize module is also in use.
1241         * tests/test-canonicalize.c: New file.
1242         * tests/test-canonicalize.sh: Likewise.
1243         * modules/canonicalize-tests: Likewise.
1244
1245 2007-07-06  Jim Meyering  <jim@meyering.net>
1246
1247         * lib/getugroups.c (getugroups): Detect getgrent failure.
1248         Adjust comment to reflect reality: this function may return -1.
1249
1250 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
1251
1252         * build-aux/bootstrap (TP_URL,get_translations): Update to use
1253         the new TP address.
1254         (usage): Fix typo
1255         (gnulib_mk): New variable.
1256
1257 2007-07-05  Jim Meyering  <jim@meyering.net>
1258
1259         Don't let endgrent clobber errno, no matter how improbable.
1260         * lib/getugroups.c (getugroups): Save and restore errno around
1261         endgrent call.
1262
1263         Close the group DB even when failing with 2^31 or more members.
1264         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
1265
1266 2007-07-04  Jim Meyering  <jim@meyering.net>
1267
1268         * lib/getugroups.h: New file.
1269         * lib/getugroups.c: Include "getugroups.h".
1270         Remove uses of "register" keyword.
1271         Move local variable, "cp", down into scope where used.
1272         Give "username" parameter the "const" attribute.
1273         * modules/getugroups (Files): Add lib/getugroups.h
1274
1275 2007-07-04  Karl Berry  <karl@gnu.org>
1276
1277         * MODULES.html.sh (func_all_modules): Complete rename of
1278         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
1279
1280 2007-07-02  Bruno Haible  <bruno@clisp.org>
1281
1282         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
1283         mode, when inttypes.h comes from gnulib.
1284         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1285
1286 2007-07-02  Simon Josefsson  <simon@josefsson.org>
1287
1288         * NEWS: Mention lgpl module name change.
1289
1290         * modules/lgpl-2.1: Renamed from lgpl.
1291
1292         * NEWS: Mention gpl module name change.
1293
1294         * modules/gpl-3.0: New file, based on gpl-2.0.
1295
1296         * modules/gpl-2.0: Renamed from gpl.
1297
1298         * modules/gpl: Fix filename, doc/gpl.texi is now found at
1299         doc/gpl-2.0.texi.
1300
1301 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
1302
1303         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
1304         #define __STDC_LIMIT_MACROS temporarily while including
1305         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
1306         Problem reported by Joel E. Denny in
1307         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
1308
1309 2007-07-01  Bruno Haible  <bruno@clisp.org>
1310
1311         * lib/unistdio.h: New file.
1312         * lib/unistdio/u-asnprintf.h: New file.
1313         * lib/unistdio/u-asprintf.h: New file.
1314         * lib/unistdio/u-printf-args.c: New file.
1315         * lib/unistdio/u-printf-args.h: New file.
1316         * lib/unistdio/u-printf-parse.h: New file.
1317         * lib/unistdio/u-snprintf.h: New file.
1318         * lib/unistdio/u-sprintf.h: New file.
1319         * lib/unistdio/u-vasprintf.h: New file.
1320         * lib/unistdio/u-vsnprintf.h: New file.
1321         * lib/unistdio/u-vsprintf.h: New file.
1322         * lib/unistdio/ulc-asnprintf.c: New file.
1323         * lib/unistdio/ulc-asprintf.c: New file.
1324         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
1325         * lib/unistdio/ulc-printf-parse.c: New file.
1326         * lib/unistdio/ulc-snprintf.c: New file.
1327         * lib/unistdio/ulc-sprintf.c: New file.
1328         * lib/unistdio/ulc-vasnprintf.c: New file.
1329         * lib/unistdio/ulc-vasprintf.c: New file.
1330         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
1331         * lib/unistdio/ulc-vsnprintf.c: New file.
1332         * lib/unistdio/ulc-vsprintf.c: New file.
1333         * lib/unistdio/u8-asnprintf.c: New file.
1334         * lib/unistdio/u8-asprintf.c: New file.
1335         * lib/unistdio/u8-printf-parse.c: New file.
1336         * lib/unistdio/u8-snprintf.c: New file.
1337         * lib/unistdio/u8-sprintf.c: New file.
1338         * lib/unistdio/u8-vasnprintf.c: New file.
1339         * lib/unistdio/u8-vasprintf.c: New file.
1340         * lib/unistdio/u8-vsnprintf.c: New file.
1341         * lib/unistdio/u8-vsprintf.c: New file.
1342         * lib/unistdio/u8-u8-asnprintf.c: New file.
1343         * lib/unistdio/u8-u8-asprintf.c: New file.
1344         * lib/unistdio/u8-u8-snprintf.c: New file.
1345         * lib/unistdio/u8-u8-sprintf.c: New file.
1346         * lib/unistdio/u8-u8-vasnprintf.c: New file.
1347         * lib/unistdio/u8-u8-vasprintf.c: New file.
1348         * lib/unistdio/u8-u8-vsnprintf.c: New file.
1349         * lib/unistdio/u8-u8-vsprintf.c: New file.
1350         * lib/unistdio/u16-asnprintf.c: New file.
1351         * lib/unistdio/u16-asprintf.c: New file.
1352         * lib/unistdio/u16-printf-parse.c: New file.
1353         * lib/unistdio/u16-snprintf.c: New file.
1354         * lib/unistdio/u16-sprintf.c: New file.
1355         * lib/unistdio/u16-vasnprintf.c: New file.
1356         * lib/unistdio/u16-vasprintf.c: New file.
1357         * lib/unistdio/u16-vsnprintf.c: New file.
1358         * lib/unistdio/u16-vsprintf.c: New file.
1359         * lib/unistdio/u16-u16-asnprintf.c: New file.
1360         * lib/unistdio/u16-u16-asprintf.c: New file.
1361         * lib/unistdio/u16-u16-snprintf.c: New file.
1362         * lib/unistdio/u16-u16-sprintf.c: New file.
1363         * lib/unistdio/u16-u16-vasnprintf.c: New file.
1364         * lib/unistdio/u16-u16-vasprintf.c: New file.
1365         * lib/unistdio/u16-u16-vsnprintf.c: New file.
1366         * lib/unistdio/u16-u16-vsprintf.c: New file.
1367         * lib/unistdio/u32-asnprintf.c: New file.
1368         * lib/unistdio/u32-asprintf.c: New file.
1369         * lib/unistdio/u32-printf-parse.c: New file.
1370         * lib/unistdio/u32-snprintf.c: New file.
1371         * lib/unistdio/u32-sprintf.c: New file.
1372         * lib/unistdio/u32-vasnprintf.c: New file.
1373         * lib/unistdio/u32-vasprintf.c: New file.
1374         * lib/unistdio/u32-vsnprintf.c: New file.
1375         * lib/unistdio/u32-vsprintf.c: New file.
1376         * lib/unistdio/u32-u32-asnprintf.c: New file.
1377         * lib/unistdio/u32-u32-asprintf.c: New file.
1378         * lib/unistdio/u32-u32-snprintf.c: New file.
1379         * lib/unistdio/u32-u32-sprintf.c: New file.
1380         * lib/unistdio/u32-u32-vasnprintf.c: New file.
1381         * lib/unistdio/u32-u32-vasprintf.c: New file.
1382         * lib/unistdio/u32-u32-vsnprintf.c: New file.
1383         * lib/unistdio/u32-u32-vsprintf.c: New file.
1384         * tests/unistdio/test-ulc-asnprintf1.c: New file.
1385         * tests/unistdio/test-ulc-asnprintf1.h: New file.
1386         * tests/unistdio/test-ulc-printf1.h: New file.
1387         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
1388         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
1389         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
1390         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
1391         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
1392         * tests/unistdio/test-ulc-vasprintf1.c: New file.
1393         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
1394         * tests/unistdio/test-ulc-vsprintf1.c: New file.
1395         * tests/unistdio/test-u8-asnprintf1.c: New file.
1396         * tests/unistdio/test-u8-asnprintf1.h: New file.
1397         * tests/unistdio/test-u8-printf1.h: New file.
1398         * tests/unistdio/test-u8-vasnprintf1.c: New file.
1399         * tests/unistdio/test-u8-vasnprintf2.c: New file.
1400         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
1401         * tests/unistdio/test-u8-vasnprintf3.c: New file.
1402         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
1403         * tests/unistdio/test-u8-vasprintf1.c: New file.
1404         * tests/unistdio/test-u8-vsnprintf1.c: New file.
1405         * tests/unistdio/test-u8-vsprintf1.c: New file.
1406         * tests/unistdio/test-u16-asnprintf1.c: New file.
1407         * tests/unistdio/test-u16-asnprintf1.h: New file.
1408         * tests/unistdio/test-u16-printf1.h: New file.
1409         * tests/unistdio/test-u16-vasnprintf1.c: New file.
1410         * tests/unistdio/test-u16-vasnprintf2.c: New file.
1411         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
1412         * tests/unistdio/test-u16-vasnprintf3.c: New file.
1413         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
1414         * tests/unistdio/test-u16-vasprintf1.c: New file.
1415         * tests/unistdio/test-u16-vsnprintf1.c: New file.
1416         * tests/unistdio/test-u16-vsprintf1.c: New file.
1417         * tests/unistdio/test-u32-asnprintf1.c: New file.
1418         * tests/unistdio/test-u32-asnprintf1.h: New file.
1419         * tests/unistdio/test-u32-printf1.h: New file.
1420         * tests/unistdio/test-u32-vasnprintf1.c: New file.
1421         * tests/unistdio/test-u32-vasnprintf2.c: New file.
1422         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
1423         * tests/unistdio/test-u32-vasnprintf3.c: New file.
1424         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
1425         * tests/unistdio/test-u32-vasprintf1.c: New file.
1426         * tests/unistdio/test-u32-vsnprintf1.c: New file.
1427         * tests/unistdio/test-u32-vsprintf1.c: New file.
1428         * modules/unistdio/base: New file.
1429         * modules/unistdio/u-printf-args: New file.
1430         * modules/unistdio/ulc-asnprintf: New file.
1431         * modules/unistdio/ulc-asprintf: New file.
1432         * modules/unistdio/ulc-fprintf: New file.
1433         * modules/unistdio/ulc-printf-parse: New file.
1434         * modules/unistdio/ulc-snprintf: New file.
1435         * modules/unistdio/ulc-sprintf: New file.
1436         * modules/unistdio/ulc-vasnprintf: New file.
1437         * modules/unistdio/ulc-vasprintf: New file.
1438         * modules/unistdio/ulc-vfprintf: New file.
1439         * modules/unistdio/ulc-vsnprintf: New file.
1440         * modules/unistdio/ulc-vsprintf: New file.
1441         * modules/unistdio/u8-asnprintf: New file.
1442         * modules/unistdio/u8-asprintf: New file.
1443         * modules/unistdio/u8-printf-parse: New file.
1444         * modules/unistdio/u8-snprintf: New file.
1445         * modules/unistdio/u8-sprintf: New file.
1446         * modules/unistdio/u8-vasnprintf: New file.
1447         * modules/unistdio/u8-vasprintf: New file.
1448         * modules/unistdio/u8-vsnprintf: New file.
1449         * modules/unistdio/u8-vsprintf: New file.
1450         * modules/unistdio/u8-u8-asnprintf: New file.
1451         * modules/unistdio/u8-u8-asprintf: New file.
1452         * modules/unistdio/u8-u8-snprintf: New file.
1453         * modules/unistdio/u8-u8-sprintf: New file.
1454         * modules/unistdio/u8-u8-vasnprintf: New file.
1455         * modules/unistdio/u8-u8-vasprintf: New file.
1456         * modules/unistdio/u8-u8-vsnprintf: New file.
1457         * modules/unistdio/u8-u8-vsprintf: New file.
1458         * modules/unistdio/u16-asnprintf: New file.
1459         * modules/unistdio/u16-asprintf: New file.
1460         * modules/unistdio/u16-printf-parse: New file.
1461         * modules/unistdio/u16-snprintf: New file.
1462         * modules/unistdio/u16-sprintf: New file.
1463         * modules/unistdio/u16-vasnprintf: New file.
1464         * modules/unistdio/u16-vasprintf: New file.
1465         * modules/unistdio/u16-vsnprintf: New file.
1466         * modules/unistdio/u16-vsprintf: New file.
1467         * modules/unistdio/u16-u16-asnprintf: New file.
1468         * modules/unistdio/u16-u16-asprintf: New file.
1469         * modules/unistdio/u16-u16-snprintf: New file.
1470         * modules/unistdio/u16-u16-sprintf: New file.
1471         * modules/unistdio/u16-u16-vasnprintf: New file.
1472         * modules/unistdio/u16-u16-vasprintf: New file.
1473         * modules/unistdio/u16-u16-vsnprintf: New file.
1474         * modules/unistdio/u16-u16-vsprintf: New file.
1475         * modules/unistdio/u32-asnprintf: New file.
1476         * modules/unistdio/u32-asprintf: New file.
1477         * modules/unistdio/u32-printf-parse: New file.
1478         * modules/unistdio/u32-snprintf: New file.
1479         * modules/unistdio/u32-sprintf: New file.
1480         * modules/unistdio/u32-vasnprintf: New file.
1481         * modules/unistdio/u32-vasprintf: New file.
1482         * modules/unistdio/u32-vsnprintf: New file.
1483         * modules/unistdio/u32-vsprintf: New file.
1484         * modules/unistdio/u32-u32-asnprintf: New file.
1485         * modules/unistdio/u32-u32-asprintf: New file.
1486         * modules/unistdio/u32-u32-snprintf: New file.
1487         * modules/unistdio/u32-u32-sprintf: New file.
1488         * modules/unistdio/u32-u32-vasnprintf: New file.
1489         * modules/unistdio/u32-u32-vasprintf: New file.
1490         * modules/unistdio/u32-u32-vsnprintf: New file.
1491         * modules/unistdio/u32-u32-vsprintf: New file.
1492         * modules/unistdio/ulc-asnprintf-tests: New file.
1493         * modules/unistdio/ulc-vasnprintf-tests: New file.
1494         * modules/unistdio/ulc-vasprintf-tests: New file.
1495         * modules/unistdio/ulc-vsnprintf-tests: New file.
1496         * modules/unistdio/ulc-vsprintf-tests: New file.
1497         * modules/unistdio/u8-asnprintf-tests: New file.
1498         * modules/unistdio/u8-vasnprintf-tests: New file.
1499         * modules/unistdio/u8-vasprintf-tests: New file.
1500         * modules/unistdio/u8-vsnprintf-tests: New file.
1501         * modules/unistdio/u8-vsprintf-tests: New file.
1502         * modules/unistdio/u16-asnprintf-tests: New file.
1503         * modules/unistdio/u16-vasnprintf-tests: New file.
1504         * modules/unistdio/u16-vasprintf-tests: New file.
1505         * modules/unistdio/u16-vsnprintf-tests: New file.
1506         * modules/unistdio/u16-vsprintf-tests: New file.
1507         * modules/unistdio/u32-asnprintf-tests: New file.
1508         * modules/unistdio/u32-vasnprintf-tests: New file.
1509         * modules/unistdio/u32-vasprintf-tests: New file.
1510         * modules/unistdio/u32-vsnprintf-tests: New file.
1511         * modules/unistdio/u32-vsprintf-tests: New file.
1512         * MODULES.html.sh (Unicode string functions): Add the new modules.
1513
1514 2007-07-01  Bruno Haible  <bruno@clisp.org>
1515
1516         * lib/sprintf.c (sprintf): Limit the available length estimation,
1517         to avoid address wraparound.
1518         * lib/vsprintf.c (vsprintf): Likewise.
1519         * modules/sprintf-posix (Dependencies): Add stdint.
1520         * modules/vsprintf-posix (Dependencies): Likewise.
1521
1522 2007-07-01  Bruno Haible  <bruno@clisp.org>
1523
1524         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
1525         Windows PATH as well. Conservative double-quoting. Comments.
1526
1527 2007-07-01  Bruno Haible  <bruno@clisp.org>
1528             Eric Blake  <ebb9@byu.net>
1529             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1530
1531         * gnulib-tool (self_abspathname): Fix algorithm to cope with
1532         empty components in $PATH, denoting '.'.
1533
1534 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1535
1536         * gnulib-tool: Fix indentation.
1537         (func_create_megatestdir): Likewise.
1538         Report by Bruno Haible.
1539
1540 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1541
1542         Sync from Automake.
1543         * build-aux/gnupload: Fix shell portability issues with for loops.
1544         Report by Karl Berry.
1545
1546 2007-06-29  Simon Josefsson  <simon@josefsson.org>
1547
1548         * build-aux/maint.mk (POURL): Use translationproject.org.
1549
1550 2007-06-27  Simon Josefsson  <simon@josefsson.org>
1551             Bruno Haible  <bruno@clisp.org>
1552
1553         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
1554         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
1555         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
1556         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
1557         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
1558
1559 2007-06-27  Bruno Haible  <bruno@clisp.org>
1560
1561         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
1562         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
1563
1564 2007-06-26  Karl Berry  <karl@gnu.org>
1565
1566         * MODULES.html.sh: remove xreadlink-with-size.
1567
1568 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1569
1570         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
1571         method that I hope also handles the double-include problem noted
1572         by Bruno Haible in
1573         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
1574
1575 2007-06-23  Bruno Haible  <bruno@clisp.org>
1576
1577         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1578         Don't let the 'mostlyclean' target fail if the last subdirectory could
1579         not be removed.
1580         Reported by Karl Berry.
1581
1582 2007-06-23  Bruno Haible  <bruno@clisp.org>
1583
1584         * gnulib-tool (echo): Add a speedier workaround for ksh.
1585         * tests/test-echo.sh: Likewise.
1586
1587 2007-06-23  Bruno Haible  <bruno@clisp.org>
1588
1589         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
1590         * tests/test-echo.sh: Likewise.
1591
1592 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1593
1594         * gnulib-tool (IFS): Initialize early, so we don't set it to
1595         empty later.
1596         (self_abspathname): Rewrite algorithm to set it, reindent.
1597         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
1598         (func_create_megatestdir): Merge some sed scripts.
1599
1600 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1601
1602         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
1603         exposed by Sun Studio 11 cc on Solaris 8.
1604
1605 2007-06-22  Bruno Haible  <bruno@clisp.org>
1606
1607         * gnulib-tool (echo): Ensure the echo primitive does not interpret
1608         backslashes.
1609         * tests/test-echo.sh: New file.
1610
1611 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1612
1613         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
1614         simplify `sed_replace_build_aux' scripts, they are portable but
1615         echoing them with `echo' is not.
1616         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
1617
1618 2007-06-21  Karl Berry  <karl@gnu.org>
1619
1620         * config/srclist.txt: guess we can't handle the licenses via
1621         srclist at the moment.
1622
1623 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
1624
1625         * MODULES.html.sh: Add include_next.
1626         * modules/include_next: New file.
1627
1628 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
1629
1630         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
1631         INCLUDE_NEXT.
1632         (gl_CHECK_NEXT_HEADERS): New macro.
1633         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
1634         the obsolescent gl_ABSOLUTE_HEADER.
1635         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
1636         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
1637         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
1638         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
1639         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
1640         * m4/math_h.m4 (gl_MATH_H): Likewise.
1641         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
1642         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
1643         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
1644         * m4/stdint.m4 (gl_STDINT_H): Likewise.
1645         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
1646         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
1647         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
1648         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
1649         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
1650         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
1651         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
1652         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
1653         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
1654         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
1655         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
1656         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1657         * m4/inttypes.m4 (gl_INTTYPES_H): Define
1658         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
1659         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
1660         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
1661         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
1662         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
1663         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
1664         * lib/float_.h: Likewise.
1665         * lib/inttypes_.h: Likewise.
1666         * lib/math_.h: Likewise.
1667         * lib/search_.h: Likewise.
1668         * lib/signal_.h: Likewise.
1669         * lib/stdint_.h: Likewise.
1670         * lib/stdio_.h: Likewise.
1671         * lib/stdlib_.h: Likewise.
1672         * lib/string_.h: Likewise.
1673         * lib/sys_stat_.h: Likewise.
1674         * lib/sys_time_.h: Likewise.
1675         * lib/time_.h: Likewise.
1676         * lib/unistd_.h: Likewise.
1677         * lib/wchar_.h: Likewise.
1678         * lib/wctype_.h: Likewise.
1679         * lib/dirent_.h: Likewise.
1680         * lib/iconv_.h: Likewise.
1681         * lib/locale_.h: Likewise.
1682         * lib/netinet_in_.h: Likewise.
1683         * lib/sys_select_.h: Likewise.
1684         * lib/sys_socket_.h: Likewise.
1685         * lib/sysexits_.h: Likewise.
1686         * modules/fcntl (Depends-on): Depend on include_next, not
1687         absolute_header.
1688         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
1689         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
1690         * modules/fchdir: Likewise.
1691         * modules/float: Likewise.
1692         * modules/iconv_open: Likewise.
1693         * modules/inttypes: Likewise.
1694         * modules/locale: Likewise.
1695         * modules/math: Likewise.
1696         * modules/netinet_in: Likewise.
1697         * modules/search: Likewise.
1698         * modules/signal: Likewise.
1699         * modules/stdint: Likewise.
1700         * modules/stdio: Likewise.
1701         * modules/stdlib: Likewise.
1702         * modules/string: Likewise.
1703         * modules/sys_select: Likewise.
1704         * modules/sys_socket: Likewise.
1705         * modules/sys_stat: Likewise.
1706         * modules/sys_time: Likewise.
1707         * modules/sysexits: Likewise.
1708         * modules/time: Likewise.
1709         * modules/unistd: Likewise.
1710         * modules/wchar: Likewise.
1711         * modules/wctype: Likewise.
1712         * modules/sys_stat: Change maintainer to "all".
1713         * modules/unistd: Likewise.
1714
1715 2007-06-20  Karl Berry  <karl@gnu.org>
1716
1717         * config/srclist.txt: track www changes in license files.
1718
1719 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
1720
1721         * build-aux/bootstrap: Remove stray dot.
1722         Make sure build_aux settings are honored when linking
1723         gnulib_extra_files.
1724
1725 2007-06-19  Eric Blake  <ebb9@byu.net>
1726
1727         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1728         Allow compilation on cygwin.
1729
1730 2007-06-19  Jim Meyering  <jim@meyering.net>
1731
1732         xreadlink-with-size: Remove module.  No longer used.
1733         Ex-callers now use xreadlink or mreadlink-with-size.
1734         * modules/xreadlink-with-size: Remove module.
1735         * lib/xreadlink-with-size.c: Remove file.
1736         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
1737         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
1738         just before the function definition *is* accurate.
1739
1740         Eliminate one way canonicalize_filename_mode could exit.
1741         * lib/canonicalize.c (canonicalize_filename_mode):
1742         Use mreadlink_with_size, not xreadlink_with_size.
1743
1744 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
1745
1746         Detect porting problems to FreeBSD/arm, which has time_t wider than
1747         long int.  Original problem reported for GNU diff by Xin Li in
1748         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
1749         * modules/getdate (Depends-on): Add intprops, verify.
1750         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
1751         is an integer type no wider than long int.
1752
1753 2007-06-18  Jim Meyering  <jim@meyering.net>
1754
1755         New module: mreadlink-with-size.
1756         * MODULES.html.sh: Add mreadlink-with-size.
1757         * modules/mreadlink-with-size: New module
1758         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
1759         not xreadlink-with-size.
1760         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
1761
1762 2007-06-16  Bruno Haible  <bruno@clisp.org>
1763
1764         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
1765         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
1766         Reported by Gary V. Vaughan <gary@gnu.org>.
1767
1768 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
1769
1770         Revamp lchown so that it lives in unistd.h where it belongs.
1771         * lib/lchown.h: Remove.
1772         * lib/dirchownmod.c: Don't include lib/lchown.h.
1773         * lib/fchownat.c: Likewise.
1774         * lib/openat.c: Likewise.
1775         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
1776         does not follow symlinks.
1777         (EOPNOTSUPP): Define if not defined.
1778         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
1779         is defined to 0.
1780         (lchown): New decl.
1781         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
1782         Do not check for lchown decl.
1783         Set REPLACE_LCHOWN.
1784         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
1785         REPLACE_LCHOWN.
1786         * modules/chown: Make it clear it follows symlinks.
1787         * modules/lchown: Make it clear it doesn't follow symlinks.
1788         (Files): Remove lib/lchown.h
1789         (Depends-on): Add unistd.
1790         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
1791         (Include): Include <unistd.h>, not "lchown.h".
1792         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
1793         REPLACE_LCHOWN.
1794
1795 2007-06-15  Jim Meyering  <jim@meyering.net>
1796
1797         Change license (GPL to LGPL) of fsusage and dependents.
1798         * modules/fsusage (License): Change to LGPL.
1799         * modules/full-read (License): Likewise.
1800         * modules/full-write (License): Likewise.
1801         * modules/safe-read (License): Likewise.
1802         * modules/safe-write (License): Likewise.
1803
1804 2007-06-14  Ben Pfaff  <blp@gnu.org>
1805
1806         Missing part of allocsa -> malloca transition.
1807         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
1808         gl_MALLOCA.
1809
1810 2007-06-12  Bruno Haible  <bruno@clisp.org>
1811
1812         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
1813         to ia64, x86_64, i386.
1814         Reported by Eric Blake.
1815
1816 2007-06-12  Bruno Haible  <bruno@clisp.org>
1817
1818         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
1819         cross-compiling to x86_64.
1820
1821 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
1822
1823         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
1824         glitch reported by Ralf Wildenhues in
1825         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
1826
1827         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
1828         Vin Shelton.
1829
1830 2007-06-11  Bruno Haible  <bruno@clisp.org>
1831
1832         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
1833         replacement string.
1834         Reported by Eric Blake.
1835
1836 2007-06-10  Bruno Haible  <bruno@clisp.org>
1837
1838         Prepare vasnprintf code for use with Unicode strings.
1839         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
1840         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
1841         TYPE_U32_STRING.
1842         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
1843         a_u32_string variants.
1844         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1845         * lib/printf-args.c: Don't include config.h and the specification
1846         header if PRINTF_FETCHARGS is already defined.
1847         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1848         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
1849         TYPE_U16_STRING, TYPE_U32_STRING.
1850         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
1851         u16_directive, u16_directives, u32_directive, u32_directives): New
1852         types.
1853         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
1854         New declarations.
1855         * lib/printf-parse.c: Don't include config.h and the specification
1856         header if PRINTF_PARSE is already defined. Eliminate the set of
1857         parameters for WIDE_CHAR_VERSION; the user of this file must provide
1858         them now. Include c-ctype.h.
1859         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
1860         directive and CHAR_T_ONLY_ASCII.
1861         * lib/vasnprintf.c: Don't include config.h and the specification header
1862         if VASNPRINTF is already defined.
1863         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
1864         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
1865         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
1866         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
1867         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
1868         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
1869         code accordingly.
1870         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
1871         pad_ourselves also in this case, with the 'c' and 's' directives, and
1872         with a different notion of "width".
1873         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
1874
1875 2007-06-10  Bruno Haible  <bruno@clisp.org>
1876
1877         * modules/unistr/u32-mbsnlen: New file.
1878         * lib/unistr/u32-mbsnlen.c: New file.
1879
1880         * modules/unistr/u16-mbsnlen: New file.
1881         * lib/unistr/u16-mbsnlen.c: New file.
1882
1883         * modules/unistr/u8-mbsnlen: New file.
1884         * lib/unistr/u8-mbsnlen.c: New file.
1885
1886         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
1887         declarations.
1888
1889 2007-06-10  Bruno Haible  <bruno@clisp.org>
1890
1891         * lib/string_.h (mbsnlen): New declaration.
1892         * lib/mbsnlen.c: New file.
1893         * m4/mbsnlen.m4: New file.
1894         * modules/mbsnlen: New file.
1895         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
1896         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
1897         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
1898
1899 2007-06-10  Bruno Haible  <bruno@clisp.org>
1900
1901         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
1902
1903 2007-06-10  Bruno Haible  <bruno@clisp.org>
1904
1905         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
1906         * lib/mbuiter.h: Likewise.
1907
1908 2007-06-10  Bruno Haible  <bruno@clisp.org>
1909
1910         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
1911         declaration.
1912
1913 2007-06-10  Karl Berry  <karl@gnu.org>
1914
1915         * config/srclist.txt: remove gettext entries, Bruno prefers
1916         to update individually.
1917
1918 2007-06-10  Bruno Haible  <bruno@clisp.org>
1919
1920         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
1921         'maxlen'. Ensure only length + width bytes are allocated, not
1922         length + 1 + width.
1923
1924 2007-06-09  Bruno Haible  <bruno@clisp.org>
1925
1926         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
1927         (CHAR_T): Remove macro.
1928         (VASNPRINTF): Update.
1929
1930 2007-06-09  Bruno Haible  <bruno@clisp.org>
1931
1932         * MODULES.html.sh (Unicode string functions): Add the new modules.
1933
1934         * modules/uniconv/u32-conv-to-enc: New file.
1935         * lib/uniconv/u32-conv-to-enc.c: New file.
1936         * modules/uniconv/u32-conv-to-enc-tests: New file.
1937         * tests/uniconv/test-u32-conv-to-enc.c: New file.
1938
1939         * modules/uniconv/u16-conv-to-enc: New file.
1940         * lib/uniconv/u16-conv-to-enc.c: New file.
1941         * lib/uniconv/u-conv-to-enc.h: New file.
1942         * modules/uniconv/u16-conv-to-enc-tests: New file.
1943         * tests/uniconv/test-u16-conv-to-enc.c: New file.
1944
1945         * modules/uniconv/u8-conv-to-enc: New file.
1946         * lib/uniconv/u8-conv-to-enc.c: New file.
1947         * modules/uniconv/u8-conv-to-enc-tests: New file.
1948         * tests/uniconv/test-u8-conv-to-enc.c: New file.
1949
1950         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
1951         u32_conv_to_encoding): New declarations.
1952
1953 2007-06-09  Bruno Haible  <bruno@clisp.org>
1954
1955         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
1956
1957 2007-06-09  Bruno Haible  <bruno@clisp.org>
1958
1959         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
1960         * modules/malloca: Renamed from modules/allocsa, updated.
1961         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
1962         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
1963         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
1964         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
1965         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
1966         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
1967         * modules/xmalloca: Renamed from modules/xallocsa, updated.
1968         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
1969         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
1970         * modules/c-strcasestr (Depends-on): Update.
1971         * lib/c-strcasestr.c: Update.
1972         * modules/c-strstr (Depends-on): Update.
1973         * lib/c-strstr.c: Update.
1974         * modules/canonicalize-lgpl (Depends-on): Update.
1975         * lib/canonicalize-lgpl.c: Update.
1976         * modules/clean-temp (Depends-on): Update.
1977         * lib/clean-temp.c: Update.
1978         * modules/csharpcomp (Depends-on): Update.
1979         * lib/csharpcomp.c: Update.
1980         * modules/csharpexec (Depends-on): Update.
1981         * lib/csharpexec.c: Update.
1982         * modules/javacomp (Depends-on): Update.
1983         * lib/javacomp.c: Update.
1984         * modules/javaexec (Depends-on): Update.
1985         * lib/javaexec.c: Update.
1986         * modules/mbscasestr (Depends-on): Update.
1987         * lib/mbscasestr.c: Update.
1988         * modules/mbsstr (Depends-on): Update.
1989         * lib/mbsstr.c: Update.
1990         * modules/setenv (Depends-on): Update.
1991         * lib/setenv.c: Update.
1992         * modules/strcasestr (Depends-on): Update.
1993         * lib/strcasestr.c: Update.
1994         * modules/striconveha (Depends-on): Update.
1995         * lib/striconveha.c: Update.
1996         * modules/relocatable-prog-wrapper (Files): Update.
1997         * lib/relocwrapper.c: Update.
1998         * build-aux/install-reloc: Update.
1999         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
2000
2001 2007-06-08  Bruno Haible  <bruno@clisp.org>
2002
2003         Port to uClibc.
2004         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
2005         * lib/fpurge.c (fpurge): Likewise.
2006         * lib/freading.c (freading): Likewise.
2007         * lib/fseeko.c (rpl_fseeko): Likewise.
2008         * lib/fseterr.c (fseterr): Likewise.
2009         * lib/fwriting.c (fwriting): Likewise.
2010         * tests/test-fflush.c (main): Avoid a failure on uClibc.
2011
2012 2007-06-08  Bruno Haible  <bruno@clisp.org>
2013
2014         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
2015         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
2016         * modules/gettext (Files): Add m4/intlmacosx.m4.
2017
2018 2007-06-07  Bruno Haible  <bruno@clisp.org>
2019
2020         * modules/localename-tests: New file.
2021         * tests/test-localename.c: New file.
2022
2023         New module 'localename'.
2024         * lib/localename.h: New file.
2025         * lib/localename.c: New file, from GNU gettext.
2026         * m4/localename.m4: New file.
2027         * modules/localename: New file.
2028
2029 2007-06-07  Bruno Haible  <bruno@clisp.org>
2030
2031         Work around the lack of <wchar.h> on some builds of uClibc.
2032         * doc/headers/wchar.texi: Update.
2033         * lib/wchar_.h: Include <wchar.h> only if it exists.
2034         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
2035         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
2036         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
2037         doesn't exist.
2038         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
2039         * modules/mbfile (Depends-on): Add wchar.
2040         * modules/mbiter (Depends-on): Likewise.
2041         * modules/mbuiter (Depends-on): Likewise.
2042         Reported by Simon Josefsson.
2043
2044 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
2045
2046         Work around problem reported by Steven M. Schweda in
2047         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
2048         Tru64 5.1B with the Compaq compiler environment installed declares
2049         an 'isblank' function but does not define it in the C library.
2050         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
2051         * lib/regex_internal.h (isblank): Likewise.
2052         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
2053         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2054
2055 2007-06-05  Bruno Haible  <bruno@clisp.org>
2056
2057         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
2058         ia64.
2059         * modules/printf-safe: New file.
2060         * modules/fprintf-posix (Depends-on): Add printf-safe.
2061         * modules/printf-posix (Depends-on): Likewise.
2062         * modules/snprintf-posix (Depends-on): Likewise.
2063         * modules/sprintf-posix (Depends-on): Likewise.
2064         * modules/vasnprintf-posix (Depends-on): Likewise.
2065         * modules/vasprintf-posix (Depends-on): Likewise.
2066         * modules/vfprintf-posix (Depends-on): Likewise.
2067         * modules/vprintf-posix (Depends-on): Likewise.
2068         * modules/vsnprintf-posix (Depends-on): Likewise.
2069         * modules/vsprintf-posix (Depends-on): Likewise.
2070         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
2071         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
2072         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
2073         "no" on i386, x86_64, ia64.
2074         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
2075         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2076         on i386, x86_64, ia64.
2077         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
2078         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2079         on i386, x86_64, ia64.
2080         * tests/test-vasnprintf-posix.c: Include float.h.
2081         (LDBL80_WORDS): New macro.
2082         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2083         on i386, x86_64, ia64.
2084         * tests/test-vasprintf-posix.c: Include float.h.
2085         (LDBL80_WORDS): New macro.
2086         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2087         on i386, x86_64, ia64.
2088         * tests/test-snprintf-posix.c: Include float.h.
2089         * tests/test-sprintf-posix.c: Likewise.
2090         * tests/test-vsnprintf-posix.c: Likewise.
2091         * tests/test-vsprintf-posix.c: Likewise.
2092
2093 2007-06-05  Bruno Haible  <bruno@clisp.org>
2094
2095         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
2096         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
2097         non-IEEE numbers on i386, x86_64, ia64.
2098         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
2099         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
2100         * tests/test-isnanl.h: Include float.h.
2101         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
2102
2103 2007-06-05  Bruno Haible  <bruno@clisp.org>
2104
2105         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
2106         also the %a / %A. Handle the %a / %A code before this extra handling.
2107
2108 2007-06-05  Bruno Haible  <bruno@clisp.org>
2109
2110         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
2111         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
2112
2113 2007-06-05  Bruno Haible  <bruno@clisp.org>
2114
2115         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
2116         typo in variable name.
2117
2118 2007-06-05  Eric Blake  <ebb9@byu.net>
2119
2120         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
2121         Reported by Simon Josefsson.
2122
2123 2007-06-04  Bruno Haible  <bruno@clisp.org>
2124
2125         Avoid test failures on some PowerPC platforms.
2126         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
2127         Define differently for PowerPC.
2128         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
2129         Reported by Gary V. Vaughan <gary@gnu.org>.
2130
2131 2007-06-02  Bruno Haible  <bruno@clisp.org>
2132
2133         Fix test-stdint failure on FreeBSD/ia64.
2134         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
2135         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
2136         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
2137         * doc/headers/stdint.texi: Update.
2138
2139 2007-06-01  Bruno Haible  <bruno@clisp.org>
2140
2141         * tests/test-binary-io.c (main): Pass a third argument to open().
2142         Reported by Gary V. Vaughan <gary@gnu.org>.
2143
2144 2007-06-01  Bruno Haible  <bruno@clisp.org>
2145
2146         * doc/functions/frexpl.texi: Update for mingw.
2147
2148 2007-06-01  Bruno Haible  <bruno@clisp.org>
2149
2150         * tests/test-lseek.c (main): Disable test of errno for invalid third
2151         argument.
2152         * doc/functions/lseek.texi: Update.
2153         Reported by Gary V. Vaughan <gary@gnu.org>.
2154
2155 2007-05-28  Bruno Haible  <bruno@clisp.org>
2156
2157         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
2158
2159 2007-05-31  Eric Blake  <ebb9@byu.net>
2160
2161         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
2162         cross compiling.
2163
2164 2007-05-30  Eric Blake  <ebb9@byu.net>
2165         and Bruno Haible  <bruno@clisp.org>
2166
2167         Work around mingw test failures exposed by m4-1.4.9b.
2168         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
2169         * tests/test-unistd.c: Disable uid_t and git_t tests for the
2170         moment.
2171
2172 2007-05-30  Bruno Haible  <bruno@clisp.org>
2173
2174         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
2175         assuming that they are closed. Needed on HP-UX 11.
2176
2177 2007-05-29  Bruno Haible  <bruno@clisp.org>
2178
2179         Fix a problem with #include_next.
2180         * lib/dirent_.h: Split the double-inclusion guard.
2181         * lib/fcntl_.h: Likewise.
2182         * lib/float_.h: Likewise.
2183         * lib/iconv_.h: Likewise.
2184         * lib/inttypes_.h: Likewise.
2185         * lib/locale_.h: Likewise.
2186         * lib/math_.h: Likewise.
2187         * lib/netinet_in_.h: Likewise.
2188         * lib/search_.h: Likewise.
2189         * lib/signal_.h: Likewise.
2190         * lib/stdint_.h: Likewise.
2191         * lib/stdio_.h: Likewise.
2192         * lib/stdlib_.h: Likewise.
2193         * lib/string_.h: Likewise.
2194         * lib/sys_select_.h: Likewise.
2195         * lib/sys_socket_.h: Likewise.
2196         * lib/sys_stat_.h: Likewise.
2197         * lib/sys_time_.h: Likewise.
2198         * lib/sysexits_.h: Likewise.
2199         * lib/time_.h: Likewise.
2200         * lib/unistd_.h: Likewise.
2201         * lib/wchar_.h: Likewise.
2202         * lib/wctype_.h: Likewise.
2203
2204 2007-05-29  Bruno Haible  <bruno@clisp.org>
2205
2206         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
2207         for the moment.
2208
2209 2007-05-29  Bruno Haible  <bruno@clisp.org>
2210
2211         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
2212         invocation.
2213         Reported by Eric Blake.
2214
2215 2007-05-29  Bruno Haible  <bruno@clisp.org>
2216
2217         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
2218         compiling case.
2219
2220 2007-05-29  Eric Blake  <ebb9@byu.net>
2221             Bruno Haible  <bruno@clisp.org>
2222
2223         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
2224         cross compiles.
2225
2226 2007-05-28  Eric Blake  <ebb9@byu.net>
2227
2228         * modules/closein-tests (test_closein_LDADD): Support test on
2229         cygwin with libtool.
2230
2231 2007-05-28  Bruno Haible  <bruno@clisp.org>
2232
2233         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
2234         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
2235         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
2236         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
2237         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
2238         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
2239         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
2240         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
2241         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
2242
2243 2007-05-28  Eric Blake  <ebb9@byu.net>
2244
2245         Unconditionally include <config.h> in unit tests.
2246         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
2247         * tests/test-allocsa.c, tests/test-arcfour.c,
2248         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
2249         tests/test-array_list.c, tests/test-array_oset.c,
2250         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
2251         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
2252         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
2253         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
2254         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
2255         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
2256         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
2257         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
2258         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
2259         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
2260         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
2261         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
2262         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
2263         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
2264         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
2265         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
2266         test-md5.c, test-memmem.c, test-printf-posix.c,
2267         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
2268         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
2269         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
2270         test-strcasestr.c, test-striconv.c, test-striconveh.c,
2271         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
2272         test-vasnprintf-posix2.c, test-vasnprintf.c,
2273         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
2274         test-vfprintf-posix.c, test-vprintf-posix.c,
2275         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
2276         test-xvasprintf.c: Likewise.
2277
2278 2007-05-28  Bruno Haible  <bruno@clisp.org>
2279
2280         * gnulib-tool (func_import): Remember the --with-tests command-line
2281         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
2282         Reported by Eric Blake.
2283
2284 2007-05-28  Bruno Haible  <bruno@clisp.org>
2285
2286         * modules/ftell-tests: New file.
2287         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
2288         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
2289
2290         * lib/ftell.c: New file.
2291         * modules/ftell: New file.
2292         * m4/ftell.m4: New file.
2293         * doc/functions/ftell.texi: Update.
2294         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
2295         REPLACE_FTELL.
2296         * lib/stdio_.h (rpl_ftell): New declaration.
2297         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
2298         REPLACE_FTELL.
2299
2300 2007-05-28  Eric Blake  <ebb9@byu.net>
2301
2302         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
2303
2304 2007-05-28  Bruno Haible  <bruno@clisp.org>
2305
2306         * modules/fseek-tests: New file.
2307         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
2308         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
2309
2310         * lib/fseek.c: New file.
2311         * modules/fseek: New file.
2312         * m4/fseek.m4: New file.
2313         * doc/functions/fseek.texi: Update.
2314         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
2315         REPLACE_FSEEK.
2316         * lib/stdio_.h (rpl_fseek): New declaration.
2317         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
2318         REPLACE_FSEEK.
2319
2320 2007-05-28  Bruno Haible  <bruno@clisp.org>
2321
2322         * lib/stdio_.h (fflush): More comments.
2323
2324 2007-05-28  Bruno Haible  <bruno@clisp.org>
2325
2326         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
2327         runtime test.
2328
2329 2007-05-28  Eric Blake  <ebb9@byu.net>
2330
2331         Improve lseek module.
2332         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
2333         * lib/unistd_.h (lseek): Scale back link warning message.
2334         * tests/test-lseek.c: Beef up test.
2335         * tests/test-lseek.sh: Exercise more facets of lseek.
2336         Reported by Bruno Haible.
2337
2338 2007-05-28  Bruno Haible  <bruno@clisp.org>
2339
2340         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
2341         to define.
2342
2343 2007-05-27  Bruno Haible  <bruno@clisp.org>
2344
2345         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
2346
2347 2007-05-27  Bruno Haible  <bruno@clisp.org>
2348
2349         * modules/openmp: New file.
2350         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
2351         Noah Misch.
2352
2353 2007-05-26  Bruno Haible  <bruno@clisp.org>
2354
2355         * modules/chdir-long (Depends-on): Add fchdir.
2356         * modules/chdir-safer (Depends-on): Likewise.
2357         * modules/fts (Depends-on): Likewise.
2358         * modules/fts-lgpl (Depends-on): Likewise.
2359         * modules/openat (Depends-on): Likewise.
2360         * modules/savewd (Depends-on): Likewise.
2361
2362 2007-05-24  Eric Blake  <ebb9@byu.net>
2363
2364         Fix lseek on mingw.
2365         * modules/lseek: New module.
2366         * m4/lseek.m4: New file.
2367         * lib/lseek.c: New file.
2368         * modules/lseek-tests: New file.
2369         * tests/test-lseek.c: New file.
2370         * tests/test-lseek.sh: New file.
2371         * MODULES.html.sh: Document lseek module.
2372         * modules/fflush (Depends-on): Add lseek, fseeko.
2373         * modules/fseeko (Depends-on): Likewise.
2374         * modules/ftello (Depends-on): Likewise.
2375         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
2376         broken.
2377         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
2378         broken.
2379         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
2380         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
2381         * lib/ftello.c (rpl_ftello): Likewise.
2382         * tests/test-fseeko.c (main): Test this.
2383         * tests/test-fseeko.sh: Likewise.
2384         * tests/test-ftello.c (main): Likewise.
2385         * tests/test-ftello.sh: Likewise.
2386         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
2387         implies replacing fseek.
2388         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
2389         HAVE_FTELLO.
2390         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
2391         * modules/unistd (Makefile.am): Likewise.
2392         * lib/unistd_.h (lseek): Declare a replacement.
2393         * doc/functions/lseek.texi (lseek): Document this fix.
2394         * doc/functions/fseek.texi (fseek): Likewise.
2395         * doc/functions/ftell.texi (ftell): Likewise.
2396
2397 2007-05-24  Bruno Haible  <bruno@clisp.org>
2398
2399         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
2400         in the printed representation of a NaN.
2401         * tests/test-vasprintf-posix.c (test_function): Likewise.
2402         * tests/test-snprintf-posix.h (test_function): Likewise.
2403         * tests/test-sprintf-posix.h (test_function): Likewise.
2404         Reported by Eric Blake.
2405
2406 2007-05-23  Eric Blake  <ebb9@byu.net>
2407
2408         Fix fseeko/ftello on cygwin 1.5.24.
2409         * doc/functions/fseeko.texi (fseeko): Document the fix.
2410         * doc/functions/ftello.texi (ftello): Document the fix.
2411         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
2412         * doc/functions/stdout.text (stdout): New file.
2413         * doc/functions/stderr.text (stderr): New file.
2414         * doc/gnulib.texi (Function Substitutes): Use new files.
2415         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
2416         prior to 1.7.0.
2417         * tests/test-ftello.c (main): Likewise for ftello.
2418         * tests/test-fseeko.sh: New file.
2419         * tests/test-ftello.sh: New file.
2420         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
2421         with seekable stdin.
2422         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
2423         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
2424         (gl_REPLACE_FSEEKO): New macro.
2425         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
2426         * modules/fseeko (Files): Distribute fseeko.c.
2427         * modules/ftello (Files): Distribute ftello.c.
2428         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
2429         mode.
2430         * lib/ftello.c (rpl_ftello): New file.
2431         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
2432         fseeko, ftello.
2433         (gl_STDIN_LARGE_OFFSET): New macro.
2434         * modules/stdio (Makefile.am): Perform the replacement.
2435         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
2436
2437 2007-05-23  Bruno Haible  <bruno@clisp.org>
2438
2439         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
2440         GNULIB_POSIXCHECK is defined.
2441
2442 2007-05-21  Bruno Haible  <bruno@clisp.org>
2443
2444         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
2445         Check also the output for NaN arguments. When cross-compiling, guess
2446         no on IRIX.
2447         * lib/vasnprintf.c: Update comments.
2448         * tests/test-vasnprintf-posix.c (strisnan): New function.
2449         (test_function): Use it.
2450         * tests/test-vasprintf-posix.c (strisnan): New function.
2451         (test_function): Use it.
2452         * tests/test-snprintf-posix.h (strisnan): New function.
2453         (test_function): Use it.
2454         * tests/test-sprintf-posix.h (strisnan): New function.
2455         (test_function): Use it.
2456         Reported by Eric Blake.
2457
2458 2007-05-20  Bruno Haible  <bruno@clisp.org>
2459
2460         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
2461         numbers that fails on BeOS.
2462         * doc/functions/frexpl.texi: Update.
2463
2464 2007-05-20  Jim Meyering  <jim@meyering.net>
2465
2466         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
2467         forced upon us by glibc-2.6.
2468
2469 2007-05-20  Bruno Haible  <bruno@clisp.org>
2470
2471         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
2472         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
2473         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
2474         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
2475         NEED_PRINTF_INFINITE.
2476         (is_infinitel): New function.
2477         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
2478         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
2479         gl_PREREQ_VASNPRINTF_INFINITE.
2480         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
2481         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2482         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
2483         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
2484         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
2485         gl_PREREQ_VASNPRINTF_INFINITE.
2486         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2487         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2488         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2489         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2490         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2491         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2492         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2493         * doc/functions/fprintf.texi: Update.
2494         * doc/functions/printf.texi: Update.
2495         * doc/functions/snprintf.texi: Update.
2496         * doc/functions/sprintf.texi: Update.
2497         * doc/functions/vfprintf.texi: Update.
2498         * doc/functions/vprintf.texi: Update.
2499         * doc/functions/vsnprintf.texi: Update.
2500         * doc/functions/vsprintf.texi: Update.
2501
2502 2007-05-20  Bruno Haible  <bruno@clisp.org>
2503
2504         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
2505         was not found in libc.
2506         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
2507
2508 2007-05-20  Bruno Haible  <bruno@clisp.org>
2509
2510         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2511         printed as "-nan" instead of "nan".
2512         * tests/test-vasprintf-posix.c (test_function): Likewise.
2513         * tests/test-snprintf-posix.h (test_function): Likewise.
2514         * tests/test-sprintf-posix.h (test_function): Likewise.
2515         Needed for HP-UX 11.
2516
2517 2007-05-20  Jim Meyering  <jim@meyering.net>
2518
2519         Fix buggy test for the fchownat-deref bug.
2520         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
2521         symlink required for the run-test.  Without it, this test would
2522         always declare that fchownat doesn't work, and client code would
2523         unnecessarily use the replacement function with fixed libc.
2524         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
2525         Reported by Greg Schafer.
2526
2527 2007-05-19  Bruno Haible  <bruno@clisp.org>
2528
2529         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
2530         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
2531         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
2532         Needed for IRIX 6.5 and Solaris 2.5.1.
2533
2534 2007-05-19  Bruno Haible  <bruno@clisp.org>
2535
2536         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
2537         (test_function): Skip tests involving -0.0 on platforms where
2538         -0.0 = 0.0.
2539         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
2540         (test_function): Skip tests involving -0.0 on platforms where
2541         -0.0 = 0.0.
2542         * tests/test-snprintf-posix.h (have_minus_zero): New function.
2543         (test_function): Skip tests involving -0.0 on platforms where
2544         -0.0 = 0.0.
2545         * tests/test-sprintf-posix.h (have_minus_zero): New function.
2546         (test_function): Skip tests involving -0.0 on platforms where
2547         -0.0 = 0.0.
2548         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
2549         tests.
2550         * tests/test-printf-posix.h (test_function): Likewise.
2551         * tests/test-printf-posix.output: Remove all -0.0 related results.
2552         Needed for IRIX 6.5.
2553
2554 2007-05-19  Bruno Haible  <bruno@clisp.org>
2555
2556         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2557         printed as "nan0x7fffffff" instead of "nan".
2558         * tests/test-vasprintf-posix.c (test_function): Likewise.
2559         * tests/test-snprintf-posix.h (test_function): Likewise.
2560         * tests/test-sprintf-posix.h (test_function): Likewise.
2561         * tests/test-fprintf-posix.h (NaN): Remove macro.
2562         (test_function): Remove all NaN related tests.
2563         * tests/test-printf-posix.h (NaN): Remove macro.
2564         (test_function): Remove all NaN related tests.
2565         * tests/test-printf-posix.output: Remove all NaN related results.
2566         Needed for IRIX 6.5.
2567
2568 2007-05-19  Bruno Haible  <bruno@clisp.org>
2569
2570         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
2571         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
2572
2573 2007-05-19  Bruno Haible  <bruno@clisp.org>
2574
2575         * lib/float_.h: New file.
2576         * m4/float_h.m4: New file.
2577         * modules/float: New file.
2578         * modules/isnanl (Dependencies): Add float.
2579         * modules/isnanl-nolibm (Dependencies): Likewise.
2580         * modules/mathl (Dependencies): Likewise.
2581         * modules/printf-frexpl (Dependencies): Likewise.
2582         * modules/signbit (Dependencies): Likewise.
2583         * modules/vasnprintf (Dependencies): Likewise.
2584         * doc/headers/float.texi: Update.
2585
2586 2007-05-19  Jim Meyering  <jim@meyering.net>
2587
2588         * lib/utimens.c (gl_futimens): Rename from futimens,
2589         now that glibc-2.6 declares futimens.
2590         * lib/utimens.h: Likewise.
2591
2592 2007-05-19  Bruno Haible  <bruno@clisp.org>
2593
2594         Avoid test failures on mingw.
2595         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
2596         * tests/test-printf-posix.sh: Likewise.
2597         * tests/test-vfprintf-posix.sh: Likewise.
2598         * tests/test-vprintf-posix.sh: Likewise.
2599
2600 2007-05-19  Bruno Haible  <bruno@clisp.org>
2601
2602         Fix *printf result for NaN, Inf, -0.0 on mingw.
2603         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
2604         * lib/vasnprintf.c: Include math.h and isnan.h.
2605         (is_infinite_or_zero): New function.
2606         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
2607         values in the %f, %F, %e, %E, %g, %G directives.
2608         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
2609         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2610         gl_PRINTF_INFINITE and test its result. Invoke
2611         gl_PREREQ_VASNPRINTF_INFINITE.
2612         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2613         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2614         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2615         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2616         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2617         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2618         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2619         * doc/functions/fprintf.texi: Update.
2620         * doc/functions/printf.texi: Update.
2621         * doc/functions/snprintf.texi: Update.
2622         * doc/functions/sprintf.texi: Update.
2623         * doc/functions/vfprintf.texi: Update.
2624         * doc/functions/vprintf.texi: Update.
2625         * doc/functions/vsnprintf.texi: Update.
2626         * doc/functions/vsprintf.texi: Update.
2627
2628 2007-05-19  Bruno Haible  <bruno@clisp.org>
2629
2630         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
2631         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
2632         Instead of multiplying with 10^k, set extra_zeroes to k.
2633         (scale10_round_long_double): Remove function.
2634
2635 2007-05-18  Bruno Haible  <bruno@clisp.org>
2636
2637         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
2638         introduced on 2007-05-06.
2639
2640 2007-05-18  Bruno Haible  <bruno@clisp.org>
2641
2642         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
2643         %g directives.
2644         * tests/test-vasprintf-posix.c (test_function): Likewise.
2645         * tests/test-snprintf-posix.h (test_function): Likewise.
2646         * tests/test-sprintf-posix.h (test_function): Likewise.
2647
2648 2007-05-18  Bruno Haible  <bruno@clisp.org>
2649
2650         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
2651         (strmatch): New function.
2652         (test_function): Test the %f directive on numbers of various exponents.
2653         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
2654         (strmatch): New function.
2655         (test_function): Test the %f directive on numbers of various exponents.
2656         * tests/test-snprintf-posix.h (strmatch): New function.
2657         (test_function): Test the %f directive on numbers of various exponents.
2658         * tests/test-sprintf-posix.h (strmatch): New function.
2659         (test_function): Test the %f directive on numbers of various exponents.
2660         * tests/test-snprintf-posix.c (SIZEOF): New macro.
2661         * tests/test-sprintf-posix.c (SIZEOF): New macro.
2662         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
2663         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
2664
2665 2007-05-18  Bruno Haible  <bruno@clisp.org>
2666
2667         Add support for 'long double' number output.
2668         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
2669         * lib/vasnprintf.c: Include math.h and float+.h.
2670         (mp_limb_t): New type.
2671         (GMP_LIMB_BITS): New macro.
2672         (mp_twolimb_t): New type.
2673         (GMP_TWOLIMB_BITS): New macro.
2674         (mpn_t): New type.
2675         (multiply, divide, convert_to_decimal, decode_long_double,
2676         scale10_round_long_double, scale10_round_decimal_long_double,
2677         floorlog10l): New functions.
2678         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
2679         for the %f, %F, %e, %E, %g, %G directives.
2680         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
2681         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2682         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
2683         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
2684         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2685         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2686         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2687         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2688         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2689         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2690         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2691         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
2692         * modules/snprintf-posix (Depends-on): Likewise.
2693         * modules/sprintf-posix (Depends-on): Likewise.
2694         * modules/vasnprintf-posix (Depends-on): Likewise.
2695         * modules/vasprintf-posix (Depends-on): Likewise.
2696         * modules/vfprintf-posix (Depends-on): Likewise.
2697         * modules/vsnprintf-posix (Depends-on): Likewise.
2698         * modules/vsprintf-posix (Depends-on): Likewise.
2699         * modules/vasnprintf (Files): Add lib/float+.h.
2700         * doc/functions/fprintf.texi: Update.
2701         * doc/functions/printf.texi: Update.
2702         * doc/functions/snprintf.texi: Update.
2703         * doc/functions/sprintf.texi: Update.
2704         * doc/functions/vfprintf.texi: Update.
2705         * doc/functions/vprintf.texi: Update.
2706         * doc/functions/vsnprintf.texi: Update.
2707         * doc/functions/vsprintf.texi: Update.
2708
2709 2007-05-18  Bruno Haible  <bruno@clisp.org>
2710
2711         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
2712
2713 2007-05-18  Bruno Haible  <bruno@clisp.org>
2714
2715         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
2716         for printing 64-bit integers. Needed for mingw.
2717
2718 2007-05-18  Bruno Haible  <bruno@clisp.org>
2719
2720         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2721         gl_FUNC_FREXPL_WORKS.
2722         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
2723
2724 2007-05-18  Bruno Haible  <bruno@clisp.org>
2725
2726         * modules/frexpl-nolibm-tests: New file.
2727
2728         * modules/frexpl-nolibm: New file.
2729         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
2730
2731 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
2732
2733         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
2734         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2735         GCC 4.2, which otherwise issues a lot of warnings.
2736         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
2737         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
2738         Likewise.
2739         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
2740         * modules/iconv_open (iconv.h): Likewise.
2741         * modules/locale (locale.h): Likewise.
2742         * modules/netinet_in (netinet/in.h): Likewise.
2743         * modules/sys_select (sys_select.h): Likewise.
2744         * modules/sys_socket (sys/socket.h): Likewise.
2745         * modules/sys_stat (sys/stat.h): Likewise.
2746         * modules/sysexits (sysexits.h): Likewise.
2747         * modules/unistd (unistd.h): Likewise.
2748
2749 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2750
2751         * modules/closein-tests (Makefile.am): Distribute
2752         `test-closein.sh'.
2753
2754 2007-05-17  Bruno Haible  <bruno@clisp.org>
2755
2756         * tests/test-printf-posix.output: Renamed from
2757         tests/test-fprintf-posix.out.
2758         * modules/fprintf-posix-tests: Update.
2759         * modules/printf-posix-tests: Update.
2760         * modules/vfprintf-posix-tests: Update.
2761         * modules/vprintf-posix-tests: Update.
2762         * tests/test-fprintf-posix.sh: Update.
2763         * tests/test-printf-posix.sh: Update.
2764         * tests/test-vfprintf-posix.sh: Update.
2765         * tests/test-vprintf-posix.sh: Update.
2766         Reported by Ralf Wildenhues.
2767
2768 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
2769
2770         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
2771         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2772         GCC 4.2, which otherwise issues a lot of warnings.
2773         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
2774         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
2775         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
2776         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
2777         it should no longer be needed.
2778         * lib/string_.h: Likewise.
2779         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
2780         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
2781         * modules/inttypes (inttypes.h): Likewise.
2782         * modules/math (math.h): Likewise.
2783         * modules/search (search.h): Likewise.
2784         * modules/signal (signal.h): Likewise.
2785         * modules/stdint (stdint.h): Likewise.
2786         * modules/stdio (stdio.h): Likewise.
2787         * modules/stdlib (stdlib.h): Likewise.
2788         * modules/string (string.h): Likewise.
2789         * modules/sys_time (sys/time.h): Likewise.
2790         * modules/time (time.h): Likewise.
2791         * modules/wchar (wchar.h): Likewise.
2792         * modules/wctype (wtype.h): Likewise.
2793
2794 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
2795
2796         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
2797
2798 2007-05-13  Bruno Haible  <bruno@clisp.org>
2799
2800         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
2801         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
2802         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
2803         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2804         (gl_PREREQ_STRTOK_R): Don't require it here.
2805
2806 2007-05-13  Bruno Haible  <bruno@clisp.org>
2807
2808         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
2809         when used in C++ mode.
2810
2811 2007-05-12  Bruno Haible  <bruno@clisp.org>
2812
2813         * lib/linebuffer.h: Tweak doc.
2814         * lib/linebuffer.c: Likewise.
2815
2816 2007-05-12  James Youngman  <jay@gnu.org>
2817
2818         * lib/linebuffer.c (readlinebuffer_delim): New function,
2819         like readlinebuffer, but use a caller-specified delimiter.
2820         (readlinebuffer): Just call readlinebuffer_delim with '\n'
2821         as the delimiter.
2822         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
2823
2824 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2825
2826         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
2827         * modules/openat (Files): Remove openat-die.c.
2828         (Depends-on): Add openat-die.
2829         * modules/openat-die: New module.
2830
2831 2007-05-06  Bruno Haible  <bruno@clisp.org>
2832
2833         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
2834         Update with info about Cygwin.
2835         * doc/functions/fprintf.texi: Update.
2836         * doc/functions/printf.texi: Update.
2837         * doc/functions/snprintf.texi: Update.
2838         * doc/functions/sprintf.texi: Update.
2839         * doc/functions/vfprintf.texi: Update.
2840         * doc/functions/vprintf.texi: Update.
2841         * doc/functions/vsnprintf.texi: Update.
2842         * doc/functions/vsprintf.texi: Update.
2843         Reported by Eric Blake.
2844
2845 2007-05-06  Bruno Haible  <bruno@clisp.org>
2846
2847         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
2848         padding ourselves for the floating-point directives.
2849         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
2850         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
2851         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2852         gl_PRINTF_FLAG_ZERO and test its result. Invoke
2853         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
2854         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2855         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2856         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2857         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2858         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2859         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2860         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2861         * tests/test-snprintf-posix.h (test_function): Also check the width
2862         and some flags in the %f directive.
2863         * tests/test-sprintf-posix.h (test_function): Likewise.
2864         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2865         * tests/test-vasprintf-posix.c (test_function): Likewise.
2866         * doc/functions/fprintf.texi: Update.
2867         * doc/functions/printf.texi: Update.
2868         * doc/functions/snprintf.texi: Update.
2869         * doc/functions/sprintf.texi: Update.
2870         * doc/functions/vfprintf.texi: Update.
2871         * doc/functions/vprintf.texi: Update.
2872         * doc/functions/vsnprintf.texi: Update.
2873         * doc/functions/vsprintf.texi: Update.
2874
2875 2007-05-06  Bruno Haible  <bruno@clisp.org>
2876
2877         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
2878         pass the ' flag character to sprintf or snprintf.
2879         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
2880         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
2881         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2882         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
2883         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
2884         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2885         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2886         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2887         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2888         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2889         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2890         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2891         * tests/test-snprintf-posix.h (test_function): Also check the grouping
2892         flag.
2893         * tests/test-sprintf-posix.h (test_function): Likewise.
2894         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2895         * tests/test-vasprintf-posix.c (test_function): Likewise.
2896         * doc/functions/fprintf.texi: Update.
2897         * doc/functions/printf.texi: Update.
2898         * doc/functions/snprintf.texi: Update.
2899         * doc/functions/sprintf.texi: Update.
2900         * doc/functions/vfprintf.texi: Update.
2901         * doc/functions/vprintf.texi: Update.
2902         * doc/functions/vsnprintf.texi: Update.
2903         * doc/functions/vsprintf.texi: Update.
2904
2905 2007-05-01  Bruno Haible  <bruno@clisp.org>
2906
2907         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
2908
2909 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
2910
2911         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
2912         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
2913
2914 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
2915
2916         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
2917         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
2918         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
2919
2920 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2921
2922         * lib/argp-help.c (struct hol_entry): New member `ord'.
2923         (HOL_ENTRY_PTRCMP): Use ord for comparison
2924         (hol_sort): Initialize ord.
2925
2926 2007-05-01  Bruno Haible  <bruno@clisp.org>
2927
2928         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
2929         Reported by Eric Blake.
2930         * doc/gnulib.texi (Function Substitutes): Update.
2931
2932 2007-05-01  Bruno Haible  <bruno@clisp.org>
2933
2934         * doc/functions.texi: Remove file, now redundant through
2935         doc/functions/*.texi.
2936
2937 2007-05-01  Bruno Haible  <bruno@clisp.org>
2938
2939         * modules/argp (Depends-on): Add sleep.
2940
2941 2007-05-01  Bruno Haible  <bruno@clisp.org>
2942
2943         * modules/sleep-tests: New file.
2944         * tests/test-sleep.c: New file.
2945
2946         * modules/sleep: New file.
2947         * lib/sleep.c: New file.
2948         * m4/sleep.m4: New file.
2949         * lib/unistd_.h (sleep): New declaration.
2950         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
2951         HAVE_SLEEP.
2952         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
2953         * doc/functions/sleep.texi: Document the sleep module.
2954
2955 2007-05-01  Bruno Haible  <bruno@clisp.org>
2956
2957         * lib/sigprocmask.h: Remove file.
2958         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
2959         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
2960         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
2961         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
2962         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
2963         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
2964         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
2965         HAVE_SIGSET_T as a shell variable.
2966         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
2967         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
2968         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
2969         (Depends-on): Add signal. Remove verify.
2970         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
2971         (Include): Mention <signal.h> instead of sigprocmask.h.
2972         * NEWS: Mention the change.
2973         * lib/fatal-signal.c: Don't include sigprocmask.h.
2974
2975 2007-05-01  Bruno Haible  <bruno@clisp.org>
2976
2977         * modules/signal: New file.
2978         * lib/signal_.h: New file.
2979         * m4/signal_h.m4: New file.
2980
2981 2007-05-01  Bruno Haible  <bruno@clisp.org>
2982
2983         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
2984         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
2985         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
2986         HAVE_WCTYPE_CTMP_BUG into wctype.h.
2987
2988 2007-05-01  Bruno Haible  <bruno@clisp.org>
2989
2990         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
2991         configure time.
2992         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
2993         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
2994         * modules/sys_stat (Makefile.am): Substitute their values into
2995         sys/stat.h.
2996
2997 2007-05-01  Bruno Haible  <bruno@clisp.org>
2998
2999         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
3000         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
3001         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
3002
3003 2007-05-01  Bruno Haible  <bruno@clisp.org>
3004
3005         * doc/header/assert.texi: Undo last change: don't mention the gnulib
3006         'assert' module here.
3007
3008 2007-05-01  Bruno Haible  <bruno@clisp.org>
3009
3010         * doc/functions/*.texi: New files.
3011         * doc/functions/google-ranking.txt: New file.
3012         * doc/gnulib.texi (Function Substitutes): New chapter.
3013         (ctime, inet_ntoa): Remove sections.
3014         * doc/ctime.texi: Remove file.
3015         * doc/inet_ntoa.texi: Remove file.
3016         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
3017         dependencies.
3018         (%.info): New rule, specifying a --reference-limit.
3019
3020 2007-05-01  Bruno Haible  <bruno@clisp.org>
3021
3022         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
3023
3024 2007-05-01  Bruno Haible  <bruno@clisp.org>
3025
3026         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
3027         the portability of 'mkdir' to mingw systems.
3028
3029 2007-05-01  Bruno Haible  <bruno@clisp.org>
3030
3031         * doc/headers/google-ranking.txt: New file.
3032
3033 2007-04-30  Eric Blake  <ebb9@byu.net>
3034
3035         Prefer fseeko to fseek.
3036         * modules/getpass (Depends-on): Add fseeko.
3037         * lib/getpass.c (getpass): Use fseeko, not fseek.
3038
3039 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
3040
3041         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
3042         assumes the sorting is stable, while most qsort implementations
3043         are not.  Use argument addresses to ensure they never compare as
3044         equal.
3045
3046         * tests/test-argp-2.sh (usage-indent test): Fix output
3047         (func_compare): Restore diff options
3048         * tests/test-argp.c: Restore #include "progname.h"
3049
3050 2007-04-29  Bruno Haible  <bruno@clisp.org>
3051
3052         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
3053         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3054         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
3055         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
3056         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
3057         (configure.ac): Define CHECK_SNPRINTF_POSIX.
3058         (TESTS, check_PROGRAMS): Add test-snprintf.
3059         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
3060         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
3061         (TESTS, check_PROGRAMS): Add test-vsnprintf.
3062         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
3063         assertions that fail on HP-UX, OSF/1, or IRIX.
3064         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
3065
3066 2007-04-29  Bruno Haible  <bruno@clisp.org>
3067
3068         * MODULES.html.sh (posix_functions): Remove 'contents'.
3069
3070 2007-04-29  Karl Berry  <karl@gnu.org>
3071
3072         * config/srclist.txt (gendocs_template_min): new entry.
3073
3074 2007-04-29  Bruno Haible  <bruno@clisp.org>
3075
3076         Work around fpurge bug on BSD systems.
3077         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
3078         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
3079         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
3080         fpurge to rpl_fpurge if the system already has this function.
3081         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
3082         the case where the system already has this function. Correct invariants
3083         on BSD systems.
3084         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
3085         BSD systems.
3086
3087 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
3088
3089         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
3090         proposed by Sven Verdoolaege.
3091
3092         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
3093         options.
3094         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
3095         (usage and help tests): Update
3096
3097 2007-04-29  Bruno Haible  <bruno@clisp.org>
3098
3099         * tests/test-fflush.c (main): Use a file of size 17, not 10.
3100         Print more information in case of failure. Disable a test on BeOS.
3101
3102 2007-04-29  Bruno Haible  <bruno@clisp.org>
3103
3104         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
3105         This helps debugging on systems on which no gdb is available.
3106
3107 2007-04-29  Bruno Haible  <bruno@clisp.org>
3108
3109         * lib/freading.h: Improve comments.
3110         * lib/fwriting.h: Likewise.
3111         * tests/test-freading.c (main): Don't check freading immediately after
3112         repositioning. Needed for glibc.
3113
3114 2007-04-29  Bruno Haible  <bruno@clisp.org>
3115
3116         * lib/freading.c (freading): Trivial simplification.
3117
3118 2007-04-28  Bruno Haible  <bruno@clisp.org>
3119
3120         * tests/test-fwriting.c (main): Also test the interaction between
3121         fflush and fwriting.
3122         * modules/fwriting-tests (Depends-on): Add fflush.
3123
3124         * tests/test-freading.c (main): Also test the interaction between
3125         fflush and freading.
3126         * modules/freading-tests (Depends-on): Add fflush.
3127
3128 2007-04-28  Bruno Haible  <bruno@clisp.org>
3129
3130         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
3131         fseeko and ftello.
3132         Suggested by Eric Blake.
3133
3134 2007-04-28  Jim Meyering  <jim@meyering.net>
3135
3136         Avoid false-negative in gl_STDINT_H's C99 conformance test.
3137         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
3138         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
3139
3140 2007-04-27  Eric Blake  <ebb9@byu.net>
3141
3142         * doc/headers/assert.texi (assert.h): Document assert module use.
3143
3144 2007-04-27  Bruno Haible  <bruno@clisp.org>
3145
3146         * doc/headers/*.texi: New files.
3147         * doc/gnulib.texi (Header File Substitutes): New chapter.
3148         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
3149         dependencies.
3150         (standards.info ,standards.html, standards.dvi): Update dependencies.
3151         (mostlyclean, clean): New targets.
3152
3153 2007-04-27  Bruno Haible  <bruno@clisp.org>
3154
3155         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
3156         * modules/sysexits (Files, Makefile.am): Update.
3157
3158         * lib/sys_socket_.h: Renamed from lib/socket_.h.
3159         * modules/sys_socket (Files, Makefile.am): Update.
3160
3161         * lib/sys_stat_.h: Renamed from lib/stat_.h.
3162         * modules/sys_stat (Files, Makefile.am): Update.
3163
3164 2007-04-27  Eric Blake  <ebb9@byu.net>
3165
3166         * lib/freading.h: Improve comments.
3167         * lib/fwriting.h: Likewise.
3168         * lib/fflush.c: Likewise.
3169
3170         Fix closein for mingw.
3171         * modules/closein-tests: Add tests for closein.
3172         * tests/test-closein.c: New file.
3173         * tests/test-closein.sh: Likewise.
3174         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
3175         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
3176
3177 2007-04-27  Bruno Haible  <bruno@clisp.org>
3178
3179         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
3180         version is < 6.
3181         * lib/math_.h [__DECC]: Likewise.
3182         * lib/stdio_.h [__DECC]: Likewise.
3183         * lib/stdlib_.h [__DECC]: Likewise.
3184         * lib/string_.h [__DECC]: Likewise.
3185         * lib/time_.h [__DECC]: Likewise.
3186         * lib/wchar_.h [__DECC]: Likewise.
3187         * lib/wctype_.h [__DECC]: Likewise.
3188
3189 2007-04-27  Bruno Haible  <bruno@clisp.org>
3190
3191         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
3192
3193 2007-04-27  Bruno Haible  <bruno@clisp.org>
3194
3195         * lib/fflush.c: Add comments.
3196         * modules/fpurge-tests (Depends-on): Add fflush.
3197         * modules/freadable-tests (Depends-on): Likewise.
3198         * modules/fwritable-tests (Depends-on): Likewise.
3199
3200 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
3201
3202         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
3203         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
3204         Report by Bruno Haible <bruno@clisp.org>.
3205
3206 2007-04-26  Eric Blake  <ebb9@byu.net>
3207
3208         Fix fflush on mingw.
3209         * modules/fflush (Depends-on): Add freading.
3210         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
3211         but unread data.
3212
3213 2007-04-26  Eric Blake  <ebb9@byu.net>
3214         and Bruno Haible  <bruno@clisp.org>
3215
3216         Implement freading and fwriting.
3217         * lib/freading.c: New file.
3218         * lib/freading.h: Likewise.
3219         * m4/freading.m4: Likewise.
3220         * modules/freading: Likewise.
3221         * modules/freading-tests: Likewise.
3222         * tests/test-freading.c: Likewise.
3223         * lib/fwriting.c: New file.
3224         * lib/fwriting.h: Likewise.
3225         * m4/fwriting.m4: Likewise.
3226         * modules/fwriting: Likewise.
3227         * modules/fwriting-tests: Likewise.
3228         * tests/test-fwriting.c: Likewise.
3229         * MODULES.html.sh (File stream based Input/Output): Mention them.
3230
3231 2007-04-26  Bruno Haible  <bruno@clisp.org>
3232
3233         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
3234         'long' when we assume it.
3235         Suggested by Eric Blake.
3236
3237 2007-04-26  Bruno Haible  <bruno@clisp.org>
3238
3239         Ensure fseeko, ftello are declared on glibc systems.
3240         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
3241         * modules/fseeko (configure.ac-early): Likewise.
3242         * modules/ftello (configure.ac-early): Likewise.
3243         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
3244         AC_FUNC_FSEEKO for this.
3245         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
3246         (gl_CHECK_FSEEKO): Remove macro.
3247
3248 2007-04-26  Bruno Haible  <bruno@clisp.org>
3249
3250         * tests/test-fflush.c (main): Also check the ftell result after
3251         fflush and fseek/fseeko.
3252         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
3253         file descriptor position cache in the stream.
3254         * lib/fseeko.c (rpl_fseeko): Likewise.
3255
3256 2007-04-26  Bruno Haible  <bruno@clisp.org>
3257
3258         * modules/fflush-tests (Depends-on): Add fseeko.
3259
3260 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
3261             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3262
3263         * lib/argz_.h: ensure error_t definition is obtained in same
3264         mechanism system argz.h would have.
3265         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
3266         argz facilities are known bad.  Err on the side of caution if
3267         cross-compiling.
3268
3269 2007-04-25  Eric Blake  <ebb9@byu.net>
3270
3271         * lib/fpurge.c (includes): Use stdlib.h for free.
3272         * tests/test-fflush.c (main): Also test fflush-fseeko.
3273
3274 2007-04-25  Bruno Haible  <bruno@clisp.org>
3275
3276         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
3277         * lib/fseeko.c: New file.
3278         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
3279         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
3280         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
3281         gl_FUNC_FSEEKO.
3282         (gl_FUNC_FSEEKO): Invoke it.
3283         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
3284         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
3285         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
3286
3287 2007-04-25  Bruno Haible  <bruno@clisp.org>
3288
3289         * modules/fflush (Depends-on): Add ftello.
3290
3291 2007-04-25  Bruno Haible  <bruno@clisp.org>
3292
3293         * modules/ftello-tests: New file.
3294         * tests/test-ftello.c: New file.
3295
3296         * modules/ftello: New file.
3297         * m4/ftello.m4: New file.
3298         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
3299         HAVE_FTELLO.
3300         * lib/stdio_.h (ftello): New declaration.
3301         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
3302         HAVE_FTELLO.
3303
3304 2007-04-25  Bruno Haible  <bruno@clisp.org>
3305
3306         * modules/fseeko-tests: New file.
3307         * tests/test-fseeko.c: New file.
3308
3309         * modules/fseeko: New file.
3310         * m4/fseeko.m4: New file.
3311         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
3312         HAVE_FSEEKO.
3313         * lib/stdio_.h (fseeko): New declaration.
3314         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
3315         HAVE_FSEEKO.
3316
3317 2007-04-25  Bruno Haible  <bruno@clisp.org>
3318
3319         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
3320
3321 2007-04-25  Bruno Haible  <bruno@clisp.org>
3322
3323         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
3324         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
3325         * tests/test-unistd.c: Likewise.
3326         * tests/test-fcntl.c: Likewise.
3327
3328 2007-04-23  Eric Blake  <ebb9@byu.net>
3329
3330         * lib/fflush.c: Fix missing include.
3331         Reported by Bruno Haible.
3332
3333 2007-04-23  Bruno Haible  <bruno@clisp.org>
3334
3335         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
3336         Reported by Eric Blake.
3337
3338 2007-04-23  Bruno Haible  <bruno@clisp.org>
3339
3340         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
3341
3342 2007-04-23  Bruno Haible  <bruno@clisp.org>
3343
3344         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
3345
3346 2007-04-23  Bruno Haible  <bruno@clisp.org>
3347
3348         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
3349         Needed on HP-UX 11.
3350
3351 2007-04-16  Eric Blake  <ebb9@byu.net>
3352
3353         Make fflush rely on fpurge.
3354         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
3355         open coding all variants.
3356         * modules/fflush (Depends-on): Add fpurge and unistd.
3357         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
3358         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
3359
3360         Fix --with-tests compilation on cygwin.
3361         * modules/argmatch-tests (Makefile.am): List gnulib library first
3362         in LDADD.
3363         * modules/argp-tests (Makefile.am): Likewise.
3364         * modules/array-list-tests (Makefile.am): Likewise.
3365         * modules/array-oset-tests (Makefile.am): Likewise.
3366         * modules/avltree-list-tests (Makefile.am): Likewise.
3367         * modules/avltree-oset-tests (Makefile.am): Likewise.
3368         * modules/avltreehash-list-tests (Makefile.am): Likewise.
3369         * modules/carray-list-tests (Makefile.am): Likewise.
3370         * modules/dirname-tests (Makefile.am): Likewise.
3371         * modules/frexp-tests (Makefile.am): Likewise.
3372         * modules/isnanl-tests (Makefile.am): Likewise.
3373         * modules/linked-list-tests (Makefile.am): Likewise.
3374         * modules/linkedhash-list-tests (Makefile.am): Likewise.
3375         * modules/lock-tests (Makefile.am): Likewise.
3376         * modules/rbtree-list-tests (Makefile.am): Likewise.
3377         * modules/rbtree-oset-tests (Makefile.am): Likewise.
3378         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
3379         * modules/tls-tests (Makefile.am): Likewise.
3380         * modules/tsearch-tests (Makefile.am): Likewise.
3381         * modules/xvasprintf-tests (Makefile.am): Likewise.
3382
3383         Fix fpurge for cygwin.
3384         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
3385         value.
3386         * modules/fpurge-tests (Depends-on): Clean up trash.
3387
3388 2007-04-16  Simon Josefsson  <simon@josefsson.org>
3389
3390         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
3391
3392         * m4/autobuild.m4: Re-indent.
3393
3394 2007-04-13  Bruno Haible  <bruno@clisp.org>
3395
3396         * modules/fpurge-tests: New file.
3397         * tests/test-fpurge.c: New file.
3398
3399         * modules/fpurge: New file.
3400         * lib/fpurge.h: New file.
3401         * lib/fpurge.c: New file.
3402         * m4/fpurge.m4: New file.
3403
3404 2007-04-13  Bruno Haible  <bruno@clisp.org>
3405
3406         * modules/fbufmode-tests: New file.
3407         * tests/test-fbufmode.c: New file.
3408
3409         * modules/fbufmode: New file.
3410         * lib/fbufmode.h: New file.
3411         * lib/fbufmode.c: New file.
3412         * m4/fbufmode.m4: New file.
3413
3414 2007-04-13  Bruno Haible  <bruno@clisp.org>
3415
3416         * modules/fwritable-tests: New file.
3417         * tests/test-fwritable.c: New file.
3418
3419         * modules/fwritable: New file.
3420         * lib/fwritable.h: New file.
3421         * lib/fwritable.c: New file.
3422         * m4/fwritable.m4: New file.
3423
3424 2007-04-13  Bruno Haible  <bruno@clisp.org>
3425
3426         * modules/freadable-tests: New file.
3427         * tests/test-freadable.c: New file.
3428
3429         * modules/freadable: New file.
3430         * lib/freadable.h: New file.
3431         * lib/freadable.c: New file.
3432         * m4/freadable.m4: New file.
3433
3434 2007-04-13  Bruno Haible  <bruno@clisp.org>
3435
3436         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
3437         MOSTLYCLEANFILES.
3438
3439 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
3440
3441         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
3442         gzip bootstrap.conf to avoid dragging in i18n machinery.
3443         (gnulib_tool_option): Use it.
3444
3445 2007-04-13  Bruno Haible  <bruno@clisp.org>
3446
3447         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
3448         %F directives.
3449         * tests/test-vasprintf-posix.c (test_function): Likewise.
3450         * tests/test-snprintf-posix.h (test_function): Likewise.
3451         * tests/test-sprintf-posix.h (test_function): Likewise.
3452         * tests/test-fprintf-posix.h (test_function): Likewise.
3453         * tests/test-printf-posix.h (test_function): Likewise.
3454         * tests/test-fprintf-posix.out: Likewise.
3455
3456 2007-04-13  Bruno Haible  <bruno@clisp.org>
3457
3458         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
3459         * modules/tls-tests (configure.ac): Likewise.
3460         Reported by Arto C. Nirkko <anirkko@insel.ch>.
3461
3462 2007-04-13  Bruno Haible  <bruno@clisp.org>
3463
3464         * lib/tls.c (glthread_tls_get): Fix return type.
3465         Patch by Arto C. Nirkko <anirkko@insel.ch>.
3466
3467 2007-04-12  Eric Blake  <ebb9@byu.net>
3468
3469         * modules/gettime (Depends-on): Remove gettime.
3470         Reported by Dmitry V. Levin.
3471
3472 2007-04-12  Bruno Haible  <bruno@clisp.org>
3473
3474         * modules/fflush (Include): Mention <stdio.h>.
3475         * modules/strtoimax (Include): Mention <inttypes.h>.
3476         * modules/strtoumax (Include): Likewise.
3477
3478 2007-04-12  Eric Blake  <ebb9@byu.net>
3479
3480         * .cvsignore: New file.
3481         * .gitignore: Likewise.
3482
3483 2007-04-12  Bruno Haible  <bruno@clisp.org>
3484
3485         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
3486         not before, since $(LDADD) often contains libgnu.a.
3487         * modules/striconv-tests (test_striconv_LDADD): Likewise.
3488         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
3489         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
3490         Needed on Cygwin.
3491
3492 2007-04-12  Eric Blake  <ebb9@byu.net>
3493
3494         Work around glibc's failure to flush stdin on fclose.
3495         * lib/closein.c (close_stdin): Flush stdin before closing.
3496
3497         Work around glibc's failure to reset seekable stdin on exit.
3498         * modules/closein: New module.
3499         * lib/closein.c: New file.
3500         * lib/closein.h: Likewise.
3501         * m4/closein.m4: Likewise.
3502         * MODULES.html.sh (File stream based Input/Output): Document it.
3503
3504 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3505
3506         * gnulib-tool: Rename generated 'autobuild' script to
3507         'do-autobuild' in --create-megatestdir output.
3508
3509         * doc/gnulib.texi (Build robot for gnulib): Fix.
3510
3511 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3512
3513         * modules/sysexits (Depends-on): Add absolute-header.
3514
3515 2007-04-12  Eric Blake  <ebb9@byu.net>
3516
3517         No need to preserve errno on success.
3518         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
3519         Reported by Bruno Haible.
3520
3521 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3522
3523         * MODULES.html.sh (Support for maintaining and releasing
3524         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
3525
3526 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3527
3528         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
3529
3530 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3531
3532         * modules/autobuild: New module.
3533
3534         * m4/autobuild.m4: New file.
3535
3536 2007-04-11  Bruno Haible  <bruno@clisp.org>
3537
3538         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
3539         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
3540         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
3541         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
3542         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
3543         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3544         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3545         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3546         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3547         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3548         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
3549         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3550         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3551         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
3552         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3553         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3554         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
3555         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3556         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3557         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
3558         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3559         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3560         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
3561         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3562         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3563         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
3564         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3565         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3566         Reported by Eric Blake.
3567
3568 2007-04-11  Bruno Haible  <bruno@clisp.org>
3569
3570         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
3571
3572 2007-04-10  Bruno Haible  <bruno@clisp.org>
3573
3574         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
3575         for NaN and Infinity. Needed on FreeBSD 6.1.
3576         * tests/test-vasnprintf-posix.c (test_function): Undo last change
3577         regarding results for "%010a" of Infinity and NaN.
3578         * tests/test-vasprintf-posix.c (test_function): Likewise.
3579         * tests/test-snprintf-posix.h (test_function): Likewise.
3580         * tests/test-sprintf-posix.h (test_function): Likewise.
3581         * tests/test-fprintf-posix.h (test_function): Likewise.
3582         * tests/test-printf-posix.h (test_function): Likewise.
3583         * tests/test-fprintf-posix.out: Likewise.
3584
3585 2007-04-10  Bruno Haible  <bruno@clisp.org>
3586
3587         * modules/locale-tests: New file.
3588         * tests/test-locale.c: New file.
3589
3590         * modules/locale: New file.
3591         * lib/locale_.h: New file.
3592         * m4/locale_h.m4: New file.
3593
3594 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
3595             Bruno Haible  <bruno@clisp.org>
3596
3597         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
3598         be determined, test for availability of the copysignf, copysign,
3599         copysignl functions.
3600         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
3601         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
3602         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
3603
3604 2007-04-09  Eric Blake  <ebb9@byu.net>
3605
3606         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
3607         * modules/stdio (Makefile.am): Support fflush.
3608         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
3609         * modules/fflush: New file.
3610         * lib/fflush.c: Likewise.
3611         * m4/fflush.m4: Likewise.
3612         * modules/fflush-tests: New test.
3613         * tests/test-fflush.c: Likewise.
3614         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
3615
3616 2007-04-06  Bruno Haible  <bruno@clisp.org>
3617
3618         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
3619         (VASNPRINTF): Use signbit for faster determination whether to print a
3620         minus sign.
3621         * modules/vasnprintf (Files): Remove lib/float+.h.
3622         * modules/fprintf-posix (Depends-on): Add signbit.
3623         * modules/snprintf-posix (Depends-on): Likewise.
3624         * modules/sprintf-posix (Depends-on): Likewise.
3625         * modules/vasnprintf-posix (Depends-on): Likewise.
3626         * modules/vasprintf-posix (Depends-on): Likewise.
3627         * modules/vfprintf-posix (Depends-on): Likewise.
3628         * modules/vsnprintf-posix (Depends-on): Likewise.
3629         * modules/vsprintf-posix (Depends-on): Likewise.
3630
3631 2007-04-06  Bruno Haible  <bruno@clisp.org>
3632
3633         * tests/test-frexp.c (main): Test also the sign bit of zero results.
3634         * tests/test-frexpl.c (main): Likewise.
3635         * tests/test-ldexpl.c (main): Likewise.
3636         * modules/frexp-tests (Depends-on): Add signbit.
3637         * modules/frexpl-tests (Depdends-on): Likewise.
3638         * modules/ldexpl-tests (Depdends-on): Likewise.
3639
3640 2007-04-06  Bruno Haible  <bruno@clisp.org>
3641
3642         * modules/signbit-tests: New file.
3643         * tests/test-signbit.c: New file.
3644
3645         * modules/signbit: New file.
3646         * lib/signbitf.c: New file.
3647         * lib/signbitd.c: New file.
3648         * lib/signbitl.c: New file.
3649         * m4/signbit.m4: New file.
3650         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
3651         (signbit): New macro.
3652         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
3653         REPLACE_SIGNBIT.
3654         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
3655         REPLACE_FREXPL into math.h.
3656
3657 2007-04-06  Bruno Haible  <bruno@clisp.org>
3658
3659         * modules/isnanf-nolibm-tests: New file.
3660         * tests/test-isnanf.c: New file.
3661
3662         * modules/isnanf-nolibm: New file.
3663         * lib/isnanf.h: New file.
3664         * lib/isnanf.c: New file.
3665         * lib/isnan.c: Consider the USE_FLOAT macro.
3666         * m4/isnanf.m4: New file.
3667
3668 2007-04-06  Bruno Haible  <bruno@clisp.org>
3669
3670         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
3671         (Link): New section.
3672
3673         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
3674
3675 2007-04-06  Bruno Haible  <bruno@clisp.org>
3676
3677         Assume the 'long double' type.
3678         * m4/longdouble.m4: Remove file.
3679         * config/srclist.txt: Don't mention longdouble.m4.
3680         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
3681         * lib/float+.h: Likewise.
3682         * lib/frexp.c: Likewise.
3683         * lib/printf-args.h: Likewise.
3684         * lib/printf-args.c: Likewise.
3685         * lib/printf-frexp.c: Likewise.
3686         * lib/printf-parse.c: Likewise.
3687         * lib/vasnprintf.c: Likewise.
3688         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
3689         * m4/intl.m4: Likewise.
3690         * m4/isnanl.m4: Likewise.
3691         * m4/printf.m4: Likewise.
3692         * m4/printf-frexpl.m4: Likewise.
3693         * m4/vasnprintf.m4: Likewise.
3694         * modules/allocsa (Files): Remove m4/longdouble.m4.
3695         * modules/gettext (Files): Likewise.
3696         * modules/relocatable-prog-wrapper (Files): Likewise.
3697         * modules/vasnprintf (Files): Likewise.
3698         * modules/isnanl (Files): Likewise.
3699         (Include): Simplify.
3700         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
3701         (Include): Simplify.
3702         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
3703         (Include): Simplify.
3704         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
3705         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3706         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
3707         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3708         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3709         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3710         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
3711         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3712         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3713         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3714         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
3715         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3716         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
3717         * tests/test-isnanl.c: Likewise.
3718         * tests/test-snprintf-posix.h: Likewise.
3719         * tests/test-sprintf-posix.h: Likewise.
3720         * tests/test-vasnprintf-posix.c: Likewise.
3721         * tests/test-vasnprintf-posix2.c: Likewise.
3722         * tests/test-vasprintf-posix.c: Likewise.
3723
3724 2007-04-06  Bruno Haible  <bruno@clisp.org>
3725
3726         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
3727         * lib/math_.h [__DECC]: Include the overridden include file through
3728         #include_next, outside the double-inclusion guard.
3729         * lib/stdio_.h [__DECC]: Likewise.
3730         * lib/stdlib_.h [__DECC]: Likewise.
3731         * lib/string_.h [__DECC]: Likewise.
3732         * lib/time_.h [__DECC]: Likewise.
3733         * lib/wchar_.h [__DECC]: Likewise.
3734         * lib/wctype_.h [__DECC]: Likewise.
3735         * lib/inttypes_.h [__DECC]: Likewise.
3736         Reported by Albert Chin <china@thewrittenword.com> in
3737         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
3738
3739 2007-04-04  Eric Blake  <ebb9@byu.net>
3740
3741         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
3742         1.5.x.
3743
3744 2007-04-04  Bruno Haible  <bruno@clisp.org>
3745
3746         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
3747         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
3748
3749 2007-04-04  Bruno Haible  <bruno@clisp.org>
3750
3751         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
3752         results for "%010a" of Infinity and NaN.
3753         * tests/test-vasprintf-posix.c (test_function): Likewise.
3754         * tests/test-snprintf-posix.h (test_function): Likewise.
3755         * tests/test-sprintf-posix.h (test_function): Likewise.
3756         * tests/test-fprintf-posix.h (test_function): Remove these tests.
3757         * tests/test-printf-posix.h (test_function): Likewise.
3758         * tests/test-fprintf-posix.out: Update.
3759         Needed for FreeBSD 6.1.
3760
3761 2007-04-04  Bruno Haible  <bruno@clisp.org>
3762
3763         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
3764         directly used by the gnulib modules nor by gnulib-tool.
3765
3766 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
3767
3768         * DEPENDENCIES: Give overall description of version dependency
3769         desirability.  Use more-typical names for apps.
3770         Add shell, coreutils, diffutils, grep, tar, gzip.
3771
3772 2007-04-04  Simon Josefsson  <simon@josefsson.org>
3773
3774         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
3775
3776 2007-04-04  Karl Berry  <karl@gnu.org>
3777
3778         * MODULES.html.sh (func_module): missing '.
3779
3780 2007-04-03  Bruno Haible  <bruno@clisp.org>
3781
3782         * modules/argmatch-tests (Makefile.am): New variable
3783         test_argmatch_LDADD.
3784         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
3785         * modules/array-list-tests (Makefile.am): New variable
3786         test_array_list_LDADD.
3787         * modules/array-oset-tests (Makefile.am): New variable
3788         test_array_oset_LDADD.
3789         * modules/avltree-list-tests (Makefile.am): New variable
3790         test_avltree_list_LDADD.
3791         * modules/avltree-oset-tests (Makefile.am): New variable
3792         test_avltree_oset_LDADD.
3793         * modules/avltreehash-list-tests (Makefile.am): New variable
3794         test_avltreehash_list_LDADD.
3795         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
3796         test_canonicalize_lgpl_LDADD.
3797         * modules/carray-list-tests (Makefile.am): New variable
3798         test_carray_list_LDADD.
3799         * modules/dirname-tests (Makefile.am): New variable
3800         test_dirname_LDADD.
3801         * modules/linked-list-tests (Makefile.am): New variable
3802         test_linked_list_LDADD.
3803         * modules/linkedhash-list-tests (Makefile.am): New variable
3804         test_linkedhash_list_LDADD.
3805         * modules/rbtree-list-tests (Makefile.am): New variable
3806         test_rbtree_list_LDADD.
3807         * modules/rbtree-oset-tests (Makefile.am): New variable
3808         test_rbtree_oset_LDADD.
3809         * modules/rbtreehash-list-tests (Makefile.am): New variable
3810         test_rbtreehash_list_LDADD.
3811         * modules/xvasprintf-tests (Makefile.am): New variable
3812         test_xvasprintf_LDADD.
3813         Reported by Eric Blake.
3814
3815 2007-04-03  Eric Blake  <ebb9@byu.net>
3816
3817         * DEPENDENCIES: Weaken m4 requirements.
3818
3819 2007-04-03  Bruno Haible  <bruno@clisp.org>
3820
3821         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
3822         * modules/isnanl-tests (configure.ac): Likewise.
3823
3824 2007-04-03  Ben Pfaff  <blp@gnu.org>
3825
3826         * modules/iconv_open: Add $(srcdir)/ to source directory
3827         references in Makefile fragments that call gperf, to fix VPATH
3828         builds.
3829
3830 2007-04-03  Bruno Haible  <bruno@clisp.org>
3831
3832         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
3833         * lib/ldexpl.c: Undo last change.
3834
3835 2007-04-03  Bruno Haible  <bruno@clisp.org>
3836
3837         * modules/printf-frexpl (Depends-on): Undo last change.
3838         (Files): Add m4/ldexpl.m4.
3839
3840 2007-04-03  Bruno Haible  <bruno@clisp.org>
3841
3842         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
3843         * modules/isnanl (Link): New section.
3844
3845         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
3846         * modules/frexp (Link): New section.
3847
3848         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
3849         * modules/frexpl (Link): New section.
3850
3851         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
3852         * modules/ldexpl (Link): New section.
3853
3854 2007-04-03  Bruno Haible  <bruno@clisp.org>
3855
3856         * modules/TEMPLATE-EXTENDED: New file.
3857         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
3858
3859 2007-04-03  Bruno Haible  <bruno@clisp.org>
3860
3861         * DEPENDENCIES: New file.
3862         Suggested by Simon Josefsson.
3863
3864 2007-04-03  Bruno Haible  <bruno@clisp.org>
3865
3866         * doc/gnulib.texi: Escape @.
3867
3868 2007-04-03  James Youngman  <jay@gnu.org>
3869         and Paul Eggert  <eggert@cs.ucla.edu>
3870
3871         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
3872         birthtime on all systems that have birthtime, not just those which
3873         use st_birthtimensec rather than st_birthtim.  Putting zero in
3874         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
3875         that the birth time is not available for files on an NFS mount.
3876
3877 2007-04-03  Simon Josefsson  <simon@josefsson.org>
3878
3879         * modules/memxor: Move back from crypto/, suggested by Bruno.
3880         * modules/crypto/hmac-sha1: Fix memxor dependency.
3881
3882         * modules/crypto/gc: Moved from ../.
3883
3884 2007-04-02  Eric Blake  <ebb9@byu.net>
3885
3886         * lib/ldexpl.c (includes): Avoid libm.
3887
3888         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
3889
3890 2007-04-02  Bruno Haible  <bruno@clisp.org>
3891
3892         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
3893         on IRIX.
3894
3895 2007-04-02  Bruno Haible  <bruno@clisp.org>
3896
3897         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
3898         x86 or x86_64 platforms running MacOS X.
3899         Reported by Ryan Schmidt <@ryandesign.com>.
3900
3901 2007-04-02  Bruno Haible  <bruno@clisp.org>
3902
3903         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
3904         i386.
3905
3906 2007-04-01  Simon Josefsson  <simon@josefsson.org>
3907
3908         * modules/crypto/arcfour: Moved from ../.
3909         * modules/crypto/arcfour-tests: Moved from ../.
3910         * modules/crypto/arctwo: Moved from ../.
3911         * modules/crypto/arctwo-tests: Moved from ../.
3912         * modules/crypto/des: Moved from ../.
3913         * modules/crypto/des-tests: Moved from ../.
3914         * modules/crypto/gc-arcfour: Moved from ../.
3915         * modules/crypto/gc-arcfour-tests: Moved from ../.
3916         * modules/crypto/gc-arctwo: Moved from ../.
3917         * modules/crypto/gc-arctwo-tests: Moved from ../.
3918         * modules/crypto/gc-des: Moved from ../.
3919         * modules/crypto/gc-des-tests: Moved from ../.
3920         * modules/crypto/gc-hmac-md5: Moved from ../.
3921         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
3922         * modules/crypto/gc-hmac-sha1: Moved from ../.
3923         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
3924         * modules/crypto/gc-md2: Moved from ../.
3925         * modules/crypto/gc-md2-tests: Moved from ../.
3926         * modules/crypto/gc-md4: Moved from ../.
3927         * modules/crypto/gc-md4-tests: Moved from ../.
3928         * modules/crypto/gc-md5: Moved from ../.
3929         * modules/crypto/gc-md5-tests: Moved from ../.
3930         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
3931         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
3932         * modules/crypto/gc-random: Moved from ../.
3933         * modules/crypto/gc-rijndael: Moved from ../.
3934         * modules/crypto/gc-rijndael-tests: Moved from ../.
3935         * modules/crypto/gc-sha1: Moved from ../.
3936         * modules/crypto/gc-sha1-tests: Moved from ../.
3937         * modules/crypto/gc-tests: Moved from ../.
3938         * modules/crypto/hmac-md5: Moved from ../.
3939         * modules/crypto/hmac-md5-tests: Moved from ../.
3940         * modules/crypto/hmac-sha1: Moved from ../.
3941         * modules/crypto/hmac-sha1-tests: Moved from ../.
3942         * modules/crypto/md2: Moved from ../.
3943         * modules/crypto/md2-tests: Moved from ../.
3944         * modules/crypto/md4: Moved from ../.
3945         * modules/crypto/md4-tests: Moved from ../.
3946         * modules/crypto/md5: Moved from ../.
3947         * modules/crypto/md5-tests: Moved from ../.
3948         * modules/crypto/memxor: Moved from ../.
3949         * modules/crypto/rijndael: Moved from ../.
3950         * modules/crypto/rijndael-tests: Moved from ../.
3951         * modules/crypto/sha1: Moved from ../.
3952
3953 2007-03-30  James Youngman  <jay@gnu.org>
3954
3955         * tests/test-stat-time.c (prepare_test): use chmod() rather than
3956         rename() to change the ctime of a file (because ctime is unaffected
3957         by rename on jfs2 on AIX 5.1).
3958         (main): Start by doing cleanup, in case a previous run failed leaving
3959         test files behind.
3960
3961 2007-03-31  Bruno Haible  <bruno@clisp.org>
3962
3963         Support old proprietary implementations of iconv.
3964         * modules/iconv_open: New file.
3965         * lib/iconv_.h: New file.
3966         * m4/iconv_h.m4: New file.
3967         * lib/iconv_open.c: New file.
3968         * lib/iconv_open-aix.gperf: New file.
3969         * lib/iconv_open-hpux.gperf: New file.
3970         * lib/iconv_open-irix.gperf: New file.
3971         * lib/iconv_open-osf.gperf: New file.
3972         * m4/iconv_open.m4: New file.
3973         * modules/linebreak (Depends-on): Add iconv_open.
3974         * modules/striconv (Depends-on): Likewise.
3975         * modules/striconveh (Depends-on): Likewise.
3976         * modules/unicodeio (Depends-on): Likewise.
3977         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
3978         (iconv_t)(-1).
3979         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
3980         conversion if cd is (iconv_t)(-1).
3981         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
3982         is not possible.
3983
3984 2007-03-31  Bruno Haible  <bruno@clisp.org>
3985
3986         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3987         work on Solaris either. Protect also second use of "autodetect_jp".
3988
3989 2007-03-31  Bruno Haible  <bruno@clisp.org>
3990
3991         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
3992         the function is not present.
3993
3994 2007-03-31  Bruno Haible  <bruno@clisp.org>
3995
3996         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
3997         the function is not present.
3998
3999 2007-03-31  Bruno Haible  <bruno@clisp.org>
4000
4001         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
4002         a bug in HP-UX iconv_open().
4003
4004 2007-03-31  Bruno Haible  <bruno@clisp.org>
4005
4006         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
4007         (Mathematics <math.h>): New section, add fpieee.
4008         (Input/output <stdio.h>): Add fseterr.
4009         (Mathematics <math.h>): New section, add printf-frexp.
4010         (Container data structures): Add sublist.
4011         (Core language properties): Add fpucw, inline.
4012         (Functions for greatest-width integer types <inttypes.h>): Add
4013         imaxabs, imaxdiv, inttypes.
4014         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
4015         isnanl-nolibm, ldexp.
4016         (Mathematics <math.h>): New section, add printf-frexpl.
4017         (Support for systems lacking POSIX:2001): Add fprintf-posix,
4018         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
4019         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
4020         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
4021         (Unicode string functions): Add unistr/u*-mbtoucr.
4022         (Java): Add javacomp-script, javaexec-script.
4023         (C#): Add csharpcomp-script, csharpexec-script.
4024         (Support for building libraries and executables): Add havelib,
4025         relocatable-*.
4026         (Support for maintaining and releasing projects): Renamed from
4027         'Support for maintaining and release projects'. Add announce-gen.
4028
4029 2007-03-31  Bruno Haible  <bruno@clisp.org>
4030
4031         * README: Talk primarily about git.
4032         (git and CVS): Renamed from CVS.
4033         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
4034         gnulib is available through git.
4035         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
4036
4037 2007-03-30  Bruno Haible  <bruno@clisp.org>
4038
4039         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
4040         * lib/poll_.h: Likewise.
4041         * lib/stat_.h: Likewise.
4042         * lib/sys_time_.h: Likewise.
4043         * lib/sysexit_.h: Likewise.
4044         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
4045         * lib/stdbool_.h: Likewise.
4046         * lib/byteswap_.h: Add double-inclusion guard.
4047
4048 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
4049
4050         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
4051
4052 2007-03-30  Karl Berry  <karl@gnu.org>
4053
4054         * config/srclist-update: double space after USA in the license
4055         substitution, since that's how it's usually (?) written.
4056
4057 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
4058
4059         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
4060         reported by Bruno Haible.
4061
4062 2007-03-29  Bruno Haible  <bruno@clisp.org>
4063
4064         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
4065         a bug in AIX iconv().
4066
4067 2007-03-29  Bruno Haible  <bruno@clisp.org>
4068
4069         * modules/ldexpl-tests: New file.
4070         * tests/test-ldexpl.c: New file.
4071
4072 2007-03-29  Bruno Haible  <bruno@clisp.org>
4073
4074         * lib/ldexpl.c: Include fpucw.h.
4075         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
4076         multiplication.
4077         * modules/ldexpl (Depends-on): Add fpucw.
4078
4079 2007-03-29  Bruno Haible  <bruno@clisp.org>
4080
4081         * modules/ldexpl: New file.
4082         * m4/ldexpl.m4: New file.
4083         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
4084         set.
4085         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
4086         REPLACE_LDEXPL.
4087         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
4088         REPLACE_LDEXPL.
4089         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
4090         gl_FUNC_LDEXPL_WORKS.
4091         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
4092         * modules/mathl (Files): Remove lib/ldexpl.c.
4093         (Depends-on): Add ldexpl.
4094
4095 2007-03-29  Bruno Haible  <bruno@clisp.org>
4096
4097         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
4098
4099 2007-03-29  Bruno Haible  <bruno@clisp.org>
4100
4101         * tests/test-striconveh.c (main): Don't assume that a direct conversion
4102         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
4103         and possibly also HP-UX.
4104         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
4105         work on AIX, IRIX, HP-UX, OSF/1.
4106         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
4107         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
4108         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
4109         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
4110         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
4111         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
4112
4113 2007-03-29  Bruno Haible  <bruno@clisp.org>
4114
4115         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
4116
4117 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4118
4119         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
4120         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
4121
4122 2007-03-29  Eric Blake  <ebb9@byu.net>
4123
4124         * lib/acl-internal.h: Remove redundant include.
4125         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
4126         Cygwin when a file is locked.
4127
4128 2007-03-29  Bruno Haible  <bruno@clisp.org>
4129
4130         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
4131         file.
4132         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
4133
4134 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4135
4136         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
4137         try to remove a parent directory if the child couldn't be removed
4138         (except for the first rmdir, which could fail because the child
4139         doesn't exist).  Problem reported by Jeff Blaine in
4140         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
4141
4142 2007-03-28  Bruno Haible  <bruno@clisp.org>
4143
4144         * lib/striconveh.c (utf8conv_carefully): New function.
4145         (mem_cd_iconveh_internal): Invoke it.
4146
4147 2007-03-28  Bruno Haible  <bruno@clisp.org>
4148
4149         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
4150         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
4151         input.
4152         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
4153         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
4154         unistr/u8-uctomb.
4155
4156 2007-03-28  Bruno Haible  <bruno@clisp.org>
4157
4158         * modules/unistr/u8-mbtoucr: New file.
4159         * lib/unistr/u8-mbtoucr.c: New file.
4160         * modules/unistr/u16-mbtoucr: New file.
4161         * lib/unistr/u16-mbtoucr.c: New file.
4162         * modules/unistr/u16-mbtoucr: New file.
4163         * lib/unistr/u16-mbtoucr.c: New file.
4164         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
4165
4166 2007-03-27  Simon Josefsson  <simon@josefsson.org>
4167             Bruno Haible  <bruno@clisp.org>
4168
4169         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
4170         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
4171         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
4172
4173         * m4/stdio_h.m4: Add stubs for vasprintf too.
4174
4175         * modules/stdio: Support vasprintf in sed command.
4176
4177         * modules/vasprintf: Depend on stdio for prototypes.  Remove
4178         vasprintf.h.  Add stdio module indicator.
4179
4180         * lib/stdio_.h: Declare asprintf and vasprintf, based on
4181         vasprintf.h.
4182
4183         * lib/vasprintf.h: File removed.
4184
4185         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
4186         * lib/vasprintf.c: Ditto.
4187         * lib/xvasprintf.c: Ditto.
4188         * tests/test-vasprintf-posix.c: Ditto.
4189         * tests/test-vasprintf.c: Ditto.
4190
4191 2007-03-27  Bruno Haible  <bruno@clisp.org>
4192
4193         Make vasnprintf multithread-safe.
4194         * lib/vasnprintf.c (decimal_point_char): New function.
4195         (VASNPRINTF): Use it.
4196         Suggested by Simon Josefsson.
4197
4198 2007-03-27  Eric Blake  <ebb9@byu.net>
4199
4200         Support sub-second birthtime on cygwin.
4201         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
4202         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
4203         (get_stat_birthtime): Also work with st_birthtim.
4204
4205 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
4206
4207         * lib/stat-time.h (USE_BIRTHTIME): Remove.
4208         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
4209         (get_stat_birthtime_ns): Do not try to use "spare" fields.
4210         (get_stat_birthtime_ns): Simplify compile-time tests.
4211         (get_stat_birthtime): Change the API to look like
4212         get_stat_mtime etc., except return a negative tv_nsec on error.
4213         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
4214         Don't check for "spare" fields.
4215         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
4216         or for struct stat.st_birthtime, as these tests aren't used.
4217         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
4218
4219 2007-03-27  Bruno Haible  <bruno@clisp.org>
4220
4221         * lib/stat-time.h: Include <sys/stat.h>.
4222
4223 2007-03-27  James Youngman  <jay@gnu.org>
4224
4225         * lib/stat-time.h (get_stat_birthtime): New function for
4226           retrieving st_birthtime as provided by UFS2 (hence *BSD).
4227         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
4228           and its variants.
4229         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
4230         * modules/stat-time-test: New file.
4231         * tests/test-stat-time.c: New test, devised by Bruno Haible.
4232
4233 2007-03-26  Bruno Haible  <bruno@clisp.org>
4234
4235         Better support of signalling NaNs.
4236         * lib/atanl.c: Include isnanl.h.
4237         (atanl): Perform test for NaN at the beginning of the function and
4238         through a call to isnanl.
4239         * lib/cosl.c: Include isnanl.h.
4240         (cosl): Perform test for NaN at the beginning of the function and
4241         through a call to isnanl.
4242         * lib/ldexpl.c: Include isnanl.h.
4243         (ldexpl): Perform test for NaN through a call to isnanl.
4244         * lib/logl.c: Include isnanl.h.
4245         (logl): Perform test for NaN at the beginning of the function and
4246         through a call to isnanl.
4247         * lib/sinl.c: Include isnanl.h.
4248         (sinl): Perform test for NaN at the beginning of the function and
4249         through a call to isnanl.
4250         * lib/sqrtl.c: Include isnanl.h.
4251         (sqrtl): Perform test for NaN at the beginning of the function and
4252         through a call to isnanl.
4253         * lib/tanl.c: Include isnanl.h.
4254         (tanl): Perform test for NaN at the beginning of the function and
4255         through a call to isnanl.
4256         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
4257         * modules/mathl (Depends-on): Add isnanl.
4258
4259 2007-03-26  Eric Blake  <ebb9@byu.net>
4260
4261         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
4262         regression in logic sense of previous patch.
4263
4264 2007-03-26  Bruno Haible  <bruno@clisp.org>
4265
4266         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
4267         unportable shell command "if ! ...".
4268         Reported by Ralf Wildenhues.
4269
4270 2007-03-25  Bruno Haible  <bruno@clisp.org>
4271
4272         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
4273         <sysexits.h> file, and only add EX_CONFIG.
4274         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
4275         absolute file name and whether it is sufficient. Substitute also
4276         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
4277         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
4278         ABSOLUTE_SYSEXITS_H into sysexits.h.
4279
4280 2007-03-25  Bruno Haible  <bruno@clisp.org>
4281
4282         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
4283         hints is NULL.
4284
4285 2007-03-25  Bruno Haible  <bruno@clisp.org>
4286
4287         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
4288         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
4289
4290 2007-03-25  Bruno Haible  <bruno@clisp.org>
4291
4292         * lib/vasnprintf.c: Include langinfo.h.
4293         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
4294         multithread-safe.
4295         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
4296         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
4297         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
4298         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4299         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4300         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4301         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
4302         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
4303         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4304         Reported by Simon Josefsson.
4305
4306 2007-03-25  Bruno Haible  <bruno@clisp.org>
4307
4308         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
4309         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
4310         * modules/vasnprintf (Depends-on): Add stdint.
4311
4312 2007-03-25  Bruno Haible  <bruno@clisp.org>
4313
4314         * modules/fpieee: New file.
4315         * m4/fpieee.m4: New file.
4316         * modules/isnan-nolibm (Depends-on): Add fpieee.
4317         * modules/isnanl-nolibm (Depends-on): Add fpieee.
4318         * modules/isnanl (Depends-on): Add fpieee.
4319
4320 2007-03-25  Bruno Haible  <bruno@clisp.org>
4321
4322         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
4323
4324 2007-03-25  Bruno Haible  <bruno@clisp.org>
4325
4326         Avoid test failures on IRIX 6.5.
4327         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
4328         (main): Use it.
4329         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
4330         macros.
4331         (main): Use them.
4332
4333 2007-03-25  Bruno Haible  <bruno@clisp.org>
4334
4335         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
4336         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
4337         exists but doesn't work.
4338         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
4339         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
4340         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
4341         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
4342
4343 2007-03-25  Bruno Haible  <bruno@clisp.org>
4344
4345         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
4346         returns inf. Needed on IRIX 6.5.
4347
4348 2007-03-25  Bruno Haible  <bruno@clisp.org>
4349
4350         * tests/test-frexpl.c: Include isnanl-nolibm.h.
4351         (main): Use isnanl instead of x != x idiom.
4352         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
4353
4354         * tests/test-frexp.c: Include isnan.h.
4355         (main): Use isnan instead of x != x idiom.
4356         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
4357
4358 2007-03-25  Bruno Haible  <bruno@clisp.org>
4359
4360         * tests/test-frexp.c (NaN): New function/macro.
4361         (main): Use it instead of 0.0 / 0.0.
4362         * tests/test-isnan.c (NaN): New function/macro.
4363         (main): Use it instead of 0.0 / 0.0.
4364         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
4365         (test_function): Use it instead of 0.0 / 0.0.
4366         * tests/test-vasprintf-posix.c (NaN): New function/macro.
4367         (test_function): Use it instead of 0.0 / 0.0.
4368         * tests/test-snprintf-posix.h (NaN): New function/macro.
4369         (test_function): Use it instead of 0.0 / 0.0.
4370         * tests/test-sprintf-posix.h (NaN): New function/macro.
4371         (test_function): Use it instead of 0.0 / 0.0.
4372         * tests/test-fprintf-posix.h (NaN): New function/macro.
4373         (test_function): Use it instead of 0.0 / 0.0.
4374         * tests/test-printf-posix.h (NaN): New function/macro.
4375         (test_function): Use it instead of 0.0 / 0.0.
4376
4377         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
4378
4379 2007-03-25  Bruno Haible  <bruno@clisp.org>
4380
4381         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
4382
4383 2007-03-25  Bruno Haible  <bruno@clisp.org>
4384
4385         * lib/regexec.c (merge_state_with_log): Make static.
4386
4387 2007-03-25  Bruno Haible  <bruno@clisp.org>
4388
4389         * lib/trigl.c (kernel_rem_pio2): Make static.
4390
4391 2007-03-25  Bruno Haible  <bruno@clisp.org>
4392
4393         * lib/sincosl.c (sincosl_table): Make static.
4394
4395 2007-03-25  Bruno Haible  <bruno@clisp.org>
4396
4397         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
4398         if the compiler does not support C99.
4399
4400 2007-03-25  Bruno Haible  <bruno@clisp.org>
4401
4402         * modules/time (Makefile.am): Ensure all rule action lines start with a
4403         tab.
4404
4405 2007-03-24  Bruno Haible  <bruno@clisp.org>
4406
4407         * modules/tsearch-tests: New file.
4408         * tests/test-tsearch.sh: New file.
4409         * tests/test-tsearch.c: New file, mostly copied from glibc.
4410
4411         * modules/search-tests: New file.
4412         * tests/test-search.c: New file.
4413
4414         * modules/search: New file.
4415         * lib/search_.h: New file, incorporating lib/tsearch.h.
4416         * m4/search_h.m4: New file.
4417         * lib/tsearch.h: Remove file.
4418         * lib/tsearch.c: Include search.h instead of tsearch.h.
4419         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
4420         HAVE_TSEARCH.
4421         * modules/tsearch (Files): Remove lib/tsearch.h.
4422         (Depends-on): Add search.
4423         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
4424         (Include): Change tsearch.h into search.h.
4425
4426 2007-03-24  Bruno Haible  <bruno@clisp.org>
4427
4428         * modules/fpucw: New file.
4429         * lib/fpucw.h: New file.
4430         * lib/frexp.c: Include fpucw.h.
4431         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4432         (FUNC): Use them.
4433         * lib/printf-frexp.c: Include fpucw.h.
4434         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4435         (FUNC): Use them.
4436         * lib/vasnprintf.c: Include fpucw.h.
4437         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
4438         'long double' calculations.
4439         * tests/test-frexpl.c: Include fpucw.h.
4440         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4441         * tests/test-printf-frexpl.c: Include fpucw.h.
4442         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4443         * modules/frexpl (Depends-on): Add fpucw.
4444         * modules/printf-frexpl (Depends-on): Likewise.
4445         * modules/fprintf-posix (Depends-on): Likewise.
4446         * modules/snprintf-posix (Depends-on): Likewise.
4447         * modules/sprintf-posix (Depends-on): Likewise.
4448         * modules/vasnprintf-posix (Depends-on): Likewise.
4449         * modules/vasprintf-posix (Depends-on): Likewise.
4450         * modules/vfprintf-posix (Depends-on): Likewise.
4451         * modules/vsnprintf-posix (Depends-on): Likewise.
4452         * modules/vsprintf-posix (Depends-on): Likewise.
4453         * modules/frexpl-tests (Depends-on): Likewise.
4454         * modules/printf-frexpl-tests (Depends-on): Likewise.
4455
4456 2007-03-24  Bruno Haible  <bruno@clisp.org>
4457
4458         * lib/float+.h: New file.
4459         * lib/isnan.c: Include float+.h.
4460         (SIZE): New macro.
4461         (FUNC): Compare only SIZE bytes of the value.
4462         * lib/vasnprintf.c: Include float+.h.
4463         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
4464         SIZEOF_LDBL or SIZEOF_DBL bytes.
4465         * modules/isnan-nolibm (Files): Add lib/float+.h.
4466         * modules/isnanl-nolibm (Files): Add lib/float+.h.
4467         * modules/isnanl (Files): Add lib/float+.h.
4468         * modules/vasnprintf (Files): Add lib/float+.h.
4469
4470 2007-03-24  Bruno Haible  <bruno@clisp.org>
4471
4472         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
4473         include isnanl-nolibm.h.
4474
4475 2007-03-24  Bruno Haible  <bruno@clisp.org>
4476
4477         * tests/test-read-file.c (main): Don't produce spurious output for
4478         expected situations. Make the test fail if it encountered unexpected
4479         results.
4480
4481 2007-03-24  Bruno Haible  <bruno@clisp.org>
4482
4483         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
4484         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
4485
4486 2007-03-24  Bruno Haible  <bruno@clisp.org>
4487
4488         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
4489
4490 2007-03-24  Bruno Haible  <bruno@clisp.org>
4491
4492         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
4493         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
4494
4495         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
4496         * modules/utf8-ucs4: Turn into a symbolic link to module
4497         unistr/u8-mbtouc.
4498
4499         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
4500         utf8-ucs4-unsafe.
4501         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
4502         unistr/u8-mbtouc-unsafe.
4503
4504         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
4505         * modules/utf16-ucs4: Turn into a symbolic link to module
4506         unistr/u16-mbtouc.
4507
4508         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
4509         utf16-ucs4-unsafe.
4510         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
4511         unistr/u16-mbtouc-unsafe.
4512
4513         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
4514         * modules/ucs4-utf8: Turn into a symbolic link to module
4515         unistr/u8-ubtomb.
4516
4517         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
4518         * modules/ucs4-utf16: Turn into a symbolic link to module
4519         unistr/u16-ubtomb.
4520
4521 2007-03-24  Bruno Haible  <bruno@clisp.org>
4522
4523         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
4524         Enable the function only if HAVE_INLINE.
4525         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
4526         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4527         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
4528         Enable the function only if HAVE_INLINE.
4529         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
4530         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4531         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
4532         Enable the function only if HAVE_INLINE.
4533         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
4534         Enable the function only if HAVE_INLINE.
4535         * modules/utf8-ucs4: Update.
4536         * modules/utf8-ucs4-unsafe: Update.
4537         * modules/utf16-ucs4: Update.
4538         * modules/utf16-ucs4-unsafe: Update.
4539         * modules/ucs4-utf8: Update.
4540         * modules/ucs4-utf16: Update.
4541
4542 2007-03-24  Bruno Haible  <bruno@clisp.org>
4543
4544         * lib/utf8-ucs4.h: Remove file.
4545         * lib/utf8-ucs4-unsafe.h: Remove file.
4546         * lib/utf16-ucs4.h: Remove file.
4547         * lib/utf16-ucs4-unsafe.h: Remove file.
4548         * lib/ucs4-utf8.h: Remove file.
4549         * lib/ucs4-utf16.h: Remove file.
4550         * lib/unistr.h: Include their previous contents.
4551         * m4/utf-ucs4.m4: Remove file.
4552         * m4/ucs4-utf.m4: Remove file.
4553         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
4554         (Depends-on): Add unistr/base.
4555         (configure.ac): Remove gl_UTF_UCS4.
4556         (Makefile.am): Update.
4557         (Include): Change to unistr.h.
4558         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
4559         (Depends-on): Add unistr/base.
4560         (configure.ac): Remove gl_UTF_UCS4.
4561         (Makefile.am): Update.
4562         (Include): Change to unistr.h.
4563         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
4564         (Depends-on): Add unistr/base.
4565         (configure.ac): Remove gl_UTF_UCS4.
4566         (Makefile.am): Update.
4567         (Include): Change to unistr.h.
4568         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
4569         (Depends-on): Add unistr/base.
4570         (configure.ac): Remove gl_UTF_UCS4.
4571         (Makefile.am): Update.
4572         (Include): Change to unistr.h.
4573         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
4574         (Depends-on): Add unistr/base.
4575         (configure.ac): Remove gl_UCS4_UTF.
4576         (Makefile.am): Update.
4577         (Include): Change to unistr.h.
4578         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
4579         (Depends-on): Add unistr/base.
4580         (configure.ac): Remove gl_UCS4_UTF.
4581         (Makefile.am): Update.
4582         (Include): Change to unistr.h.
4583         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
4584         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
4585         utf8-ucs4-unsafe.h.
4586         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
4587         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
4588         utf16-ucs4-unsafe.h.
4589         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
4590         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
4591         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
4592         * lib/unistr/u8-strchr.c: Likewise.
4593         * lib/unistr/u8-strrchr.c: Likewise.
4594         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
4595         * lib/unistr/u16-strchr.c: Likewise.
4596         * lib/unistr/u16-strrchr.c: Likewise.
4597         * lib/striconveh.c: Update.
4598         * lib/linebreak.c: Update.
4599
4600 2007-03-24  Bruno Haible  <bruno@clisp.org>
4601
4602         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
4603         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
4604
4605 2007-03-22  Bruno Haible  <bruno@clisp.org>
4606
4607         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
4608
4609 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
4610
4611         * MODULES.html.sh (File system functions): New module write-any-file.
4612         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
4613         * m4/write-any-file.m4: New files.
4614
4615 2007-03-23  Eric Blake  <ebb9@byu.net>
4616
4617         * gnulib-tool: Rearrange space-tab sequences, since some editors
4618         like to eat them.
4619
4620 2007-03-23  Eric Blake  <ebb9@byu.net>
4621
4622         * lib/version-etc.c (version_etc_va): Update license wording to
4623         be more concise.  Recommended by Richard Stallman.
4624
4625 2007-03-22  Bruno Haible  <bruno@clisp.org>
4626
4627         * lib/poll.c (MSG_PEEK): New fallback definition.
4628
4629 2007-03-22  Bruno Haible  <bruno@clisp.org>
4630
4631         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
4632         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
4633         (main): Update.
4634         Fixes a compilation error on BeOS.
4635
4636 2007-03-22  Bruno Haible  <bruno@clisp.org>
4637
4638         * modules/frexpl-tests: New file.
4639         * tests/test-frexpl.c: New file.
4640
4641         * modules/frexpl: New file.
4642         * m4/frexpl.m4: New file.
4643         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
4644         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
4645         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
4646         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
4647         (Depends-on): Add frexpl. Remove isnanl-nolibm.
4648         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
4649
4650 2007-03-22  Bruno Haible  <bruno@clisp.org>
4651
4652         * lib/frexpl.c: Share code with lib/frexp.c.
4653         * modules/mathl (Files): Add lib/frexp.c.
4654         (Depends-on): Add isnanl-nolibm.
4655
4656 2007-03-22  Bruno Haible  <bruno@clisp.org>
4657
4658         * modules/printf-frexp (Files): Add m4/frexp.m4.
4659         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
4660         only if the found frexp function actually works.
4661
4662 2007-03-22  Bruno Haible  <bruno@clisp.org>
4663
4664         * lib/frexp.c: Remove older implementation that uses divisions.
4665
4666 2007-03-21  Bruno Haible  <bruno@clisp.org>
4667
4668         * modules/frexp-tests: New file.
4669         * tests/test-frexp.c: New file.
4670
4671         * modules/frexp: New file.
4672         * lib/frexp.c: New file.
4673         * m4/frexp.m4: New file.
4674         * lib/math_.h (frexp): New declaration.
4675         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
4676         REPLACE_FREXP.
4677         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
4678
4679 2007-03-21  Bruno Haible  <bruno@clisp.org>
4680
4681         * modules/isnanl-tests: New file.
4682         * tests/test-isnanl.c: New file.
4683
4684         * modules/isnanl: New file.
4685         * lib/isnanl.h: New file.
4686         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
4687         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
4688         gl_FUNC_ISNANL_WORKS.
4689         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
4690         New macros.
4691
4692 2007-03-21  Bruno Haible  <bruno@clisp.org>
4693
4694         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
4695         lib/isnanl.h.
4696         (Include): Update.
4697         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
4698         * lib/vasnprintf.c: Update.
4699         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
4700         tests/test-isnanl.h, remove tests/test-isnanl.c.
4701         (Makefile.am): Update.
4702         * tests/test-isnanl-nolibm.c: New file.
4703         * tests/test-isnanl.h: New file.
4704         * tests/test-isnanl.c: Remove file.
4705
4706 2007-03-21  Jim Meyering  <jim@meyering.net>
4707
4708         When trying to open ".", treat ESTALE like EACCES.
4709         * lib/savewd.c (savewd_save): Resort to forking not just upon
4710         failure with EACCES, but also when errno is ESTALE.
4711
4712 2007-03-20  Bruno Haible  <bruno@clisp.org>
4713
4714         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
4715         Needed on AIX 5.1. Reported by Matthew Woehlke.
4716
4717 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4718
4719         Suggestions by Bruno Haible:
4720         * lib/acl-internal.h: Include "gettext.h" rather than rolling
4721         our own.
4722         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
4723         * modules/acl (Depends-on): Add gettext.
4724
4725 2007-03-19  Bruno Haible  <bruno@clisp.org>
4726
4727         * modules/iconvme: Remove file.
4728         * lib/iconvme.h: Remove file.
4729         * lib/iconvme.c: Remove file.
4730         * m4/iconvme.m4: Remove file.
4731
4732 2007-03-19  Bruno Haible  <bruno@clisp.org>
4733
4734         * doc/relocatable-maint.texi: Break long shell script line.
4735         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4736
4737 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4738
4739         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
4740         handle file_has_acl.
4741         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
4742         * lib/acl.c: Move header inclusions and related macro defns into
4743         lib/acl-internal.h.
4744         (S_ISLNK): Remove defn, since that's now done for us.
4745         (file_has_acl): Move to lib/file-has-acl.c.
4746         Call acl_trivial if available.  This is the crucial part of the fix.
4747         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
4748         shared within the library.  Rewrite a bit, partly to make it compatible
4749         with the GNU coding style.
4750         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
4751         Remove unnecessary double-quotes.
4752         Don't test for acl_to_text; the build will catch that.
4753         Replace acl_entries if it doesn't exist and it is needed.
4754         Check for -lsec and acl_trivial (as used on Solaris 10).
4755         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
4756         lib/file-has-acl.c.
4757         (Depends-on): Add sys_stat, for S_ISLNK.
4758
4759 2007-03-19  Ben Pfaff  <blp@gnu.org>
4760
4761         * doc/gnulib.texi: Fix typos.
4762         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4763
4764 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4765
4766         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
4767         If size is zero here, buf must be zero.
4768
4769 2007-03-19  Simon Josefsson  <simon@josefsson.org>
4770
4771         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
4772         <bruno@clisp.org>.
4773
4774 2007-03-18  Bruno Haible  <bruno@clisp.org>
4775
4776         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
4777         Suggested by Eric Blake.
4778
4779 2007-03-18  Ben Pfaff  <blp@gnu.org>
4780
4781         * doc/relocatable.texi: Recommend using as prefix a directory
4782         that does not exist and will never be created.  Based on
4783         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
4784         and others.
4785
4786 2007-03-17  Bruno Haible  <bruno@clisp.org>
4787
4788         * lib/fchownat.c: Include lchown.h.
4789
4790 2007-03-17  Bruno Haible  <bruno@clisp.org>
4791
4792         Fix endless loop when the given allocated size was > INT_MAX.
4793         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
4794         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
4795         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
4796         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
4797         * lib/sprintf.c (sprintf): Likewise.
4798
4799 2007-03-17  Bruno Haible  <bruno@clisp.org>
4800
4801         * tests/test-argp-2.sh (func_compare): Output a context diff.
4802
4803 2007-03-17  Bruno Haible  <bruno@clisp.org>
4804
4805         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
4806         locale's decimal-point character.
4807
4808 2007-03-17  Bruno Haible  <bruno@clisp.org>
4809
4810         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
4811         before comparing it. Needed because on some platforms (e.g. x86) a
4812         'long double' occupies less bytes than sizeof (long double).
4813
4814 2007-03-17  Bruno Haible  <bruno@clisp.org>
4815
4816         * tests/test-crc.c (main): Make printf statements 64-bit clean.
4817         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
4818         * tests/test-getaddrinfo.c (simple): Likewise.
4819         * tests/test-read-file.c (main): Likewise.
4820
4821 2007-03-17  Bruno Haible  <bruno@clisp.org>
4822
4823         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
4824
4825 2007-03-17  Bruno Haible  <bruno@clisp.org>
4826
4827         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
4828         unused variable.
4829
4830 2007-03-17  Bruno Haible  <bruno@clisp.org>
4831
4832         * tests/test-c-strcasecmp.c: Include c-strcase.h.
4833         * tests/test-c-strncasecmp.c: Likewise.
4834
4835 2007-03-17  Bruno Haible  <bruno@clisp.org>
4836
4837         * modules/stdlib (Depends-on): Add unistd.
4838         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
4839         Needed for MacOS X 10.3.
4840
4841 2007-03-17  Bruno Haible  <bruno@clisp.org>
4842
4843         * lib/unistr/u-strdup.h: Include <stdlib.h>.
4844
4845 2007-03-17  Bruno Haible  <bruno@clisp.org>
4846
4847         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
4848
4849 2007-03-17  Bruno Haible  <bruno@clisp.org>
4850
4851         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
4852         to reflect files copied from gnulib (with or without modifications).
4853         Suggested by Jim Meyering.
4854
4855 2007-03-17  Eric Blake  <ebb9@byu.net>
4856
4857         * NEWS: Document stdlib change from 2007-02-18.
4858
4859 2007-03-17  Jim Meyering  <jim@meyering.net>
4860
4861         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
4862         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
4863         someone uses a name containing shell meta-characters.
4864         Reported by Alfred M. Szmidt.
4865
4866         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
4867
4868 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4869
4870         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
4871         and copy gettext configuration files only if configure.ac contains
4872         a use of AM_GNU_GETTEXT_VERSION.
4873
4874 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4875
4876         * build-aux/bootstrap (gnulib_name): New variable.
4877         (gnulib_tool_options): Use it.
4878
4879 2007-03-13  Simon Josefsson  <simon@josefsson.org>
4880
4881         * tests/test-des.c: Use new namespace.
4882
4883 2007-03-15  Bruno Haible  <bruno@clisp.org>
4884
4885         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
4886         Reported by James Youngman <jay@gnu.org>.
4887
4888 2007-03-15  Bruno Haible  <bruno@clisp.org>
4889
4890         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
4891         declared prototype. Needed with cc on OSF/1 5.1.
4892
4893 2007-03-15  Bruno Haible  <bruno@clisp.org>
4894
4895         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
4896         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
4897         (struct gl_list_implementation): Add dispose_fn argument to the
4898         'create_empty', 'create' methods.
4899         (struct gl_list_impl_base): Add field 'dispose_fn'.
4900         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
4901         argument.
4902         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
4903         dispose_fn argument.
4904         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
4905         dispose_fn on the dropped values.
4906         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
4907         dispose_fn argument.
4908         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
4909         dropped values.
4910         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
4911         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4912         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
4913         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4914         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
4915         argument.
4916         (gl_tree_list_free): Call dispose_fn on the dropped values.
4917         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
4918         the dropped values.
4919         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4920         Add dispose_fn argument.
4921         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
4922         Call dispose_fn on the dropped values.
4923         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
4924         Add dispose_fn argument.
4925         (gl_sublist_create): Initialize the 'dispose_fn' field.
4926         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
4927         * tests/test-array_list.c (main): Update.
4928         * tests/test-carray_list.c (main): Update.
4929         * tests/test-avltree_list.c (main): Update.
4930         * tests/test-rbtree_list.c (main): Update.
4931         * tests/test-avltreehash_list.c (main): Update.
4932         * tests/test-rbtreehash_list.c (main): Update.
4933         * tests/test-linked_list.c (main): Update.
4934         * tests/test-linkedhash_list.c (main): Update.
4935         * tests/test-array_oset.c (main): Update.
4936
4937 2007-03-15  Bruno Haible  <bruno@clisp.org>
4938
4939         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
4940         (gl_oset_create_empty): Add dispose_fn argument.
4941         (struct gl_oset_implementation): Add dispose_fn argument to
4942         'create_empty' method.
4943         (struct gl_oset_impl_base): Add dispose_fn field.
4944         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
4945         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
4946         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
4947         values.
4948         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
4949         (gl_tree_oset_free): Call dispose_fn on the dropped values.
4950         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4951         dropped value.
4952         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4953         dropped value.
4954         * tests/test-array_oset.c (main): Update.
4955         * tests/test-avltree_oset.c (main): Update.
4956         * tests/test-rbtree_oset.c (main): Update.
4957         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
4958
4959 2007-03-13  Bruno Haible  <bruno@clisp.org>
4960
4961         * tests/test-stdbool.c (i): Update after last patch.
4962
4963 2007-03-12  Bruno Haible  <bruno@clisp.org>
4964
4965         * lib/quotearg.c: Include <wctype.h> early, before the definition of
4966         the iswprint macro. Needed on Solaris 2.5.1.
4967
4968 2007-03-12  Bruno Haible  <bruno@clisp.org>
4969
4970         * tests/test-printf-frexp.c (main): Declare x as volatile.
4971
4972 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4973
4974         * doc/gnulib.texi (Build robot for gnulib): New section.
4975
4976 2007-03-12  Jim Meyering  <jim@meyering.net>
4977
4978         * build-aux/bootstrap: New file.
4979         * build-aux/bootstrap.conf: New file, from coreutils.
4980
4981 2007-03-11  Bruno Haible  <bruno@clisp.org>
4982
4983         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
4984
4985 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4986
4987         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
4988         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
4989         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
4990
4991 2007-03-11  Bruno Haible  <bruno@clisp.org>
4992
4993         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
4994         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
4995
4996 2007-03-11  Bruno Haible  <bruno@clisp.org>
4997
4998         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
4999         formula. Needed for SunPRO C 5.0.
5000
5001 2007-03-11  Bruno Haible  <bruno@clisp.org>
5002
5003         * modules/long-options (Depends-on): Add getopt.
5004
5005 2007-03-11  Bruno Haible  <bruno@clisp.org>
5006
5007         * modules/modechange (Depends-on): Add stdbool.
5008
5009 2007-03-11  Bruno Haible  <bruno@clisp.org>
5010
5011         * modules/i-ring (Depends-on): Add stdbool.
5012
5013 2007-03-11  Bruno Haible  <bruno@clisp.org>
5014
5015         * modules/gc-des (Depends-on): Add stdbool.
5016
5017 2007-03-11  Bruno Haible  <bruno@clisp.org>
5018
5019         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
5020
5021 2007-03-11  Bruno Haible  <bruno@clisp.org>
5022
5023         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
5024
5025 2007-03-11  Bruno Haible  <bruno@clisp.org>
5026
5027         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
5028
5029 2007-03-11  Bruno Haible  <bruno@clisp.org>
5030
5031         * lib/vasnprintf.c (sprintf): Undefine.
5032
5033 2007-03-11  Bruno Haible  <bruno@clisp.org>
5034
5035         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
5036         initializers in SunPRO C and Compaq C compilers.
5037
5038 2007-03-11  Bruno Haible  <bruno@clisp.org>
5039
5040         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
5041         decrementing code ANSI C compliant.
5042
5043 2007-03-11  Bruno Haible  <bruno@clisp.org>
5044
5045         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
5046         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
5047
5048 2007-03-11  Bruno Haible  <bruno@clisp.org>
5049
5050         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
5051         <stdbool.h> substitute doesn't pass.
5052
5053 2007-03-11  Bruno Haible  <bruno@clisp.org>
5054
5055         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
5056
5057 2007-03-11  Bruno Haible  <bruno@clisp.org>
5058
5059         * gnulib-tool (func_create_megatestdir): Create also an autobuild
5060         script, for submission to autobuild.josefsson.org.
5061
5062 2007-03-10  Bruno Haible  <bruno@clisp.org>
5063
5064         * modules/canonicalize-lgpl-tests: New file.
5065         * tests/test-canonicalize-lgpl.sh: New file.
5066         * tests/test-canonicalize-lgpl.c: New file.
5067
5068         * modules/c-strcase-tests: New file.
5069         * tests/test-c-strcase.sh: New file.
5070         * tests/test-c-strcasecmp.c: New file.
5071         * tests/test-c-strncasecmp.c: New file.
5072
5073         * modules/atexit-tests: New file.
5074         * tests/test-atexit.sh: New file.
5075         * tests/test-atexit.c: New file.
5076
5077 2007-03-10  Bruno Haible  <bruno@clisp.org>
5078
5079         * tests/test-binary-io.sh: Use temporary filenames that are not so
5080         likely to clash with those of other tests (in a parallel make).
5081         * tests/test-binary-io.c: Likewise.
5082
5083 2007-03-10  Bruno Haible  <bruno@clisp.org>
5084
5085         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
5086         fallback; use #error instead.
5087         Suggested by Simon Josefsson.
5088
5089 2007-03-10  Bruno Haible  <bruno@clisp.org>
5090
5091         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
5092         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
5093         first and the last.
5094
5095 2007-03-10  Bruno Haible  <bruno@clisp.org>
5096
5097         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
5098
5099 2007-03-10  Bruno Haible  <bruno@clisp.org>
5100
5101         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
5102         "make distcheck".
5103         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
5104         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
5105         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
5106
5107 2007-03-10  Bruno Haible  <bruno@clisp.org>
5108
5109         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
5110         variable.
5111         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
5112         variable.
5113
5114 2007-03-09  Eric Blake  <ebb9@byu.net>
5115         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
5116
5117         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
5118         types are not being provided by gnulib.
5119         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
5120         types are supported.
5121
5122 2007-03-10  Bruno Haible  <bruno@clisp.org>
5123
5124         * lib/stdio_.h (__attribute__): New macro.
5125         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
5126         vsprintf): Specify __attribute__ __format__ for GCC.
5127         Suggested by Eric Blake.
5128
5129 2007-03-09  Bruno Haible  <bruno@clisp.org>
5130
5131         * modules/printf-posix-tests: New file.
5132         * tests/test-printf-posix.sh: New file.
5133         * tests/test-printf-posix.c: New file.
5134
5135         * modules/printf-posix: New file.
5136         * lib/printf.c: New file.
5137         * m4/printf-posix-rpl.m4: New file.
5138         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
5139         REPLACE_PRINTF.
5140         * lib/stdio_.h (printf): New declaration.
5141         (format, __format__, ____printf____, ____scanf____, ____strftime____,
5142         ____strfmon____): New macros.
5143         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
5144         REPLACE_PRINTF.
5145
5146 2007-03-09  Bruno Haible  <bruno@clisp.org>
5147
5148         * tests/test-vasnprintf-posix2.sh: New file.
5149         * tests/test-vasnprintf-posix2.c: New file.
5150         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
5151         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
5152         (Makefile.am): Activate test-vasnprintf-posix2.sh.
5153
5154         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
5155         a locale dependent decimal point, rather than always '.'.
5156
5157 2007-03-09  Eric Blake  <ebb9@byu.net>
5158
5159         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
5160         spite of platforms like Tandem/NSK that define it to -1.
5161
5162 2007-03-08  Bruno Haible  <bruno@clisp.org>
5163
5164         * modules/vprintf-posix-tests: New file.
5165         * tests/test-vprintf-posix.sh: New file.
5166         * tests/test-vprintf-posix.c: New file.
5167         * tests/test-printf-posix.h: New file.
5168
5169         * modules/vprintf-posix: New file.
5170         * lib/vprintf.c: New file.
5171         * m4/vprintf-posix.m4: New file.
5172         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
5173         REPLACE_VPRINTF.
5174         * lib/stdio_.h (vprintf): New declaration.
5175         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
5176         REPLACE_VPRINTF.
5177
5178 2007-03-08  Bruno Haible  <bruno@clisp.org>
5179
5180         * modules/fprintf-posix-tests: New file.
5181         * tests/test-fprintf-posix.sh: New file.
5182         * tests/test-fprintf-posix.c: New file.
5183
5184         * modules/fprintf-posix: New file.
5185         * lib/fprintf.c: New file.
5186         * m4/fprintf-posix.m4: New file.
5187         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
5188         REPLACE_FPRINTF.
5189         * lib/stdio_.h (fprintf): New declaration.
5190         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
5191         REPLACE_FPRINTF.
5192
5193 2007-03-08  Bruno Haible  <bruno@clisp.org>
5194
5195         * modules/vfprintf-posix-tests: New file.
5196         * tests/test-vfprintf-posix.sh: New file.
5197         * tests/test-vfprintf-posix.c: New file.
5198         * tests/test-fprintf-posix.h: New file.
5199         * tests/test-fprintf-posix.out: New file.
5200
5201         * modules/vfprintf-posix: New file.
5202         * lib/vfprintf.c: New file.
5203         * m4/vfprintf-posix.m4: New file.
5204         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
5205         REPLACE_VFPRINTF.
5206         * lib/stdio_.h (vfprintf): New declaration.
5207         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
5208         REPLACE_VFPRINTF.
5209
5210 2007-03-08  Bruno Haible  <bruno@clisp.org>
5211
5212         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
5213
5214 2007-03-08  Bruno Haible  <bruno@clisp.org>
5215
5216         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
5217         instead of 'expr' invocations.
5218         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
5219         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
5220         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
5221         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
5222         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
5223         Suggested by Paul Eggert.
5224
5225 2007-03-08  Bruno Haible  <bruno@clisp.org>
5226
5227         * modules/fseterr-tests: New file.
5228         * tests/test-fseterr.c: New file.
5229
5230         * modules/fseterr: New file.
5231         * lib/fseterr.h: New file.
5232         * lib/fseterr.c: New file.
5233
5234 2007-03-08  Bruno Haible  <bruno@clisp.org>
5235
5236         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
5237         * lib/getopt_.h: Likewise.
5238         * lib/mbswidth.h: Likewise.
5239         * lib/setenv.h: Likewise.
5240         * lib/vasnprintf.h: Likewise.
5241         * lib/vasprintf.h: Likewise.
5242         * lib/verror.h: Likewise.
5243         * lib/xsetenv.h: Likewise.
5244         * lib/xvasprintf.h: Likewise.
5245
5246 2007-03-08  Jim Meyering  <jim@meyering.net>
5247
5248         * users.txt: Add parted.
5249
5250         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
5251
5252 2007-03-07  Bruno Haible  <bruno@clisp.org>
5253
5254         * m4/printf.m4: Make the shell script snippets copy&pastable.
5255
5256 2007-03-02  Bruno Haible  <bruno@clisp.org>
5257
5258         * lib/netinet_in_.h: New file.
5259         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
5260         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
5261         * modules/netinet_in (Files): Add lib/netinet_in_.h.
5262         (Depends-on): Add absolute-header.
5263         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
5264         into netinet/in.h.
5265
5266 2007-03-03  Bruno Haible  <bruno@clisp.org>
5267
5268         * lib/sys_select_.h: New file.
5269         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
5270         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
5271         * modules/sys_select (Files): Add lib/sys_select_.h.
5272         (Depends-on): Add absolute-header.
5273         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
5274         into sys/select.h.
5275
5276 2007-03-02  Bruno Haible  <bruno@clisp.org>
5277
5278         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
5279         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
5280         values.
5281         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
5282         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
5283         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
5284         * modules/sys_socket (Depends-on): Add absolute-header.
5285         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
5286         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
5287         (Include): Remove requirement of inclusion of <sys/types.h>.
5288
5289 2007-03-02  Bruno Haible  <bruno@clisp.org>
5290
5291         * lib/byteswap_.h (bswap_32): Fix formula.
5292
5293 2007-03-06  Bruno Haible  <bruno@clisp.org>
5294
5295         * modules/sprintf-posix-tests: New file.
5296         * tests/test-sprintf-posix.c: New file.
5297
5298         * modules/sprintf-posix: New file.
5299         * lib/sprintf.c: New file.
5300         * m4/sprintf-posix.m4: New file.
5301         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
5302         REPLACE_SPRINTF.
5303         * lib/stdio_.h (sprintf): New declaration.
5304         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
5305         REPLACE_SPRINTF.
5306
5307 2007-03-06  Bruno Haible  <bruno@clisp.org>
5308
5309         * modules/vsprintf-posix-tests: New file.
5310         * tests/test-vsprintf-posix.c: New file.
5311         * tests/test-sprintf-posix.h: New file.
5312
5313         * modules/vsprintf-posix: New file.
5314         * lib/vsprintf.c: New file.
5315         * m4/vsprintf-posix.m4: New file.
5316         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
5317         REPLACE_VSPRINTF.
5318         * lib/stdio_.h (vsprintf): New declaration.
5319         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
5320         REPLACE_VSPRINTF.
5321
5322 2007-03-06  Bruno Haible  <bruno@clisp.org>
5323
5324         * modules/vsnprintf (Depend-on): Remove minmax.
5325
5326 2007-03-06  Bruno Haible  <bruno@clisp.org>
5327
5328         * modules/snprintf-posix-tests: New file.
5329         * tests/test-snprintf-posix.c: New file.
5330
5331         * modules/snprintf-posix: New file.
5332         * m4/snprintf-posix.m4: New file.
5333         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
5334         gl_FUNC_SNPRINTF.
5335         (gl_FUNC_SNPRINTF): Invoke it.
5336         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
5337         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
5338         is set.
5339         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
5340
5341 2007-03-06  Bruno Haible  <bruno@clisp.org>
5342
5343         * modules/vsnprintf-posix-tests: New file.
5344         * tests/test-vsnprintf-posix.c: New file.
5345         * tests/test-snprintf-posix.h: New file.
5346
5347         * modules/vsnprintf-posix: New file.
5348         * m4/vsnprintf-posix.m4: New file.
5349         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
5350         gl_FUNC_VSNPRINTF.
5351         (gl_FUNC_VSNPRINTF): Invoke it.
5352         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
5353         * lib/stdio_.h (vsnprintf): Define as a replacement if
5354         REPLACE_VSNPRINTF is set.
5355         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
5356
5357 2007-03-06  Bruno Haible  <bruno@clisp.org>
5358
5359         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
5360         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
5361
5362 2007-03-06  Bruno Haible  <bruno@clisp.org>
5363
5364         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
5365         (asinl): Declare also if HAVE_DECL_ASINL is set.
5366         (atanl): Declare also if HAVE_DECL_ATANL is set.
5367         (ceill): Declare also if HAVE_DECL_CEILL is set.
5368         (cosl): Declare also if HAVE_DECL_COSL is set.
5369         (expl): Declare also if HAVE_DECL_EXPL is set.
5370         (floorl): Declare also if HAVE_DECL_FLOORL is set.
5371         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
5372         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
5373         (logl): Declare also if HAVE_DECL_LOGL is set.
5374         (sinl): Declare also if HAVE_DECL_SINL is set.
5375         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
5376         (tanl): Declare also if HAVE_DECL_TANL is set.
5377         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
5378         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
5379         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
5380         declaration of frexpl, ldexpl.
5381         * modules/printf-frexpl (Depends-on): Add math.
5382         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
5383
5384 2007-03-05  Bruno Haible  <bruno@clisp.org>
5385
5386         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
5387         frexpl and ldexpl are declared.
5388         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
5389
5390 2007-03-05  Bruno Haible  <bruno@clisp.org>
5391
5392         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
5393         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
5394
5395 2007-03-05  Bruno Haible  <bruno@clisp.org>
5396
5397         * lib/stdio_.h: Include <stddef.h>.
5398
5399 2007-03-05  Bruno Haible  <bruno@clisp.org>
5400
5401         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
5402
5403 2007-03-05  Bruno Haible  <bruno@clisp.org>
5404
5405         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
5406         NetBSD 4, from Ralf Wildenhues.
5407
5408 2007-03-04  Bruno Haible  <bruno@clisp.org>
5409
5410         * lib/vasprintf.h: Update #if logic for the case when the functions
5411         exist but are overridden.
5412
5413 2007-03-04  Bruno Haible  <bruno@clisp.org>
5414
5415         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
5416         implementations: glibc-2.4 and MacOS X 10.3.
5417         * tests/test-vasnprintf-posix.c (test_function): Test also the case
5418         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
5419         * tests/test-vasprintf-posix.c (test_function): Likewise.
5420
5421 2007-03-04  Bruno Haible  <bruno@clisp.org>
5422
5423         * modules/vasprintf-posix-tests: New file.
5424         * tests/test-vasprintf-posix.c: New file.
5425
5426         * modules/vasprintf-posix: New file.
5427         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
5428         defined.
5429         * m4/vasprintf-posix.m4: New file.
5430         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
5431         gl_FUNC_VASPRINTF.
5432         (gl_FUNC_VASPRINTF): Invoke it.
5433         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
5434         here.
5435         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
5436
5437 2007-03-04  Bruno Haible  <bruno@clisp.org>
5438
5439         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
5440         REPLACE_GETTIMEOFDAY.
5441         * modules/sys_time (Makefile.am): Likewise.
5442         * m4/sys_time_h.m4: Likewise.
5443         * m4/gettimeofday.m4: Likewise.
5444
5445 2007-03-04  Bruno Haible  <bruno@clisp.org>
5446
5447         * modules/vasnprintf-posix-tests: New file.
5448         * tests/test-vasnprintf-posix.c: New file.
5449
5450         * modules/vasnprintf-posix: New file.
5451         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
5452         printf-frexpl.h.
5453         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
5454         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
5455         REPLACE_VASNPRINTF is defined.
5456         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
5457         gl_FUNC_VASNPRINTF.
5458         (gl_FUNC_VASNPRINTF): Invoke it.
5459         * m4/vasnprintf-posix.m4: New file.
5460         * m4/printf.m4: New file.
5461
5462 2007-03-04  Bruno Haible  <bruno@clisp.org>
5463
5464         Compile progreloc.c only if --enable-relocatable is specified.
5465         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
5466         if --enable-relocatable was specified.
5467         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
5468         lib_SOURCES.
5469
5470 2007-03-04  Jim Meyering  <jim@meyering.net>
5471
5472         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
5473         Use it consistently, rather than enumerating errno constants.
5474
5475 2007-03-04  Bruno Haible  <bruno@clisp.org>
5476
5477         * modules/xvasprintf-tests: New file.
5478         * tests/test-xvasprintf.c: New file.
5479
5480         * modules/vasprintf-tests: New file.
5481         * tests/test-vasprintf.c: New file.
5482
5483         * modules/vasnprintf-tests: New file.
5484         * tests/test-vasnprintf.c: New file.
5485
5486         * modules/vsnprintf-tests: New file.
5487         * tests/test-vsnprintf.c: New file.
5488
5489         * modules/snprintf-tests: New file.
5490         * tests/test-snprintf.c: New file.
5491
5492 2007-03-04  Bruno Haible  <bruno@clisp.org>
5493
5494         Compile relocatable.c only if --enable-relocatable is specified.
5495         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
5496         gl_RELOCATABLE_LIBRARY.
5497         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
5498         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
5499         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
5500         gl_RELOCATABLE_LIBRARY.
5501         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
5502         (Makefile.am): Remove lib_SOURCES.
5503         * modules/relocatable-lib-lgpl (configure.ac): Invoke
5504         gl_RELOCATABLE_LIBRARY.
5505         (Makefile.am): Remove lib_SOURCES.
5506         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
5507         always.
5508         * modules/relocatable-prog-wrapper (configure.ac): Invoke
5509         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
5510
5511 2007-03-04  Bruno Haible  <bruno@clisp.org>
5512
5513         * modules/argmatch-tests: New file.
5514         * tests/test-argmatch.c: New file.
5515
5516         * tests/test-allocsa.c (main): Halve the number of loop runs.
5517
5518         * modules/alloca-opt-tests: New file.
5519         * tests/test-alloca-opt.c: New file.
5520
5521 2007-03-04  Jim Meyering  <jim@meyering.net>
5522
5523         Work around difference between Linux ACLs and Solaris 10 ZFS.
5524         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
5525         for EINVAL.
5526
5527 2007-03-03  Bruno Haible  <bruno@clisp.org>
5528
5529         * modules/relocatable-prog (Depends-on): Add back progreloc's
5530         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
5531
5532 2007-03-03  Bruno Haible  <bruno@clisp.org>
5533
5534         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
5535         * modules/relocatable-lib: New file.
5536
5537 2007-03-03  Bruno Haible  <bruno@clisp.org>
5538
5539         * modules/relocatable-prog: Renamed from modules/relocatable.
5540         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
5541
5542 2007-03-03  Bruno Haible  <bruno@clisp.org>
5543
5544         * modules/relocatable-script (Files): Add doc/relocatable.texi,
5545         m4/relocatable-lib.m4.
5546         (Depends-on): Remove 'relocatable'.
5547         (configure.ac): Add gl_RELOCATABLE_NOP.
5548
5549 2007-03-03  Bruno Haible  <bruno@clisp.org>
5550
5551         * modules/relocatable-prog-wrapper: New file.
5552         * modules/relocatable (Depends-on): Add it. Remove all other
5553         dependencies except progname.
5554         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
5555
5556         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
5557         (gl_FUNC_STRERROR): Nop.
5558         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
5559
5560         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
5561         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
5562
5563         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
5564         (gl_FUNC_READLINK): Update.
5565
5566         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
5567
5568 2007-03-03  Bruno Haible  <bruno@clisp.org>
5569
5570         * lib/xreadlink.c: Include <unistd.h> unconditionally.
5571         * modules/xreadlink (Depends-on): Add unistd.
5572         * modules/xreadlink-with-size (Depends-on): Likewise.
5573
5574 2007-03-03  Bruno Haible  <bruno@clisp.org>
5575
5576         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
5577         extracted from gt_FUNC_SETENV.
5578         (gt_FUNC_SETENV): Remove macro.
5579         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
5580         remove gt_FUNC_SETENV.
5581
5582 2007-03-03  Bruno Haible  <bruno@clisp.org>
5583
5584         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
5585         ENABLE_RELOCATABLE here.
5586         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
5587
5588 2007-03-03  Bruno Haible  <bruno@clisp.org>
5589
5590         * modules/rbtreehash-list-tests (Depends-on): Add progname.
5591         * tests/test-rbtreehash_list.c: Include progname.h.
5592         (main): Call set_program_name.
5593
5594         * modules/rbtree-oset-tests (Depends-on): Add progname.
5595         * tests/test-rbtree_oset.c: Include progname.h.
5596         (main): Call set_program_name.
5597
5598         * modules/rbtree-list-tests (Depends-on): Add progname.
5599         * tests/test-rbtree_list.c: Include progname.h.
5600         (main): Call set_program_name.
5601
5602         * modules/linked-list-tests (Depends-on): Add progname.
5603         * tests/test-linked_list.c: Include progname.h.
5604         (main): Call set_program_name.
5605
5606 2007-03-03  Bruno Haible  <bruno@clisp.org>
5607
5608         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
5609         All uses of __restrict changed to _Restrict_.
5610         * lib/glob_.h (__restrict): Remove macro.
5611
5612 2007-03-02  Bruno Haible  <bruno@clisp.org>
5613
5614         * modules/gettext (configure.ac): Require gettext infrastructure
5615         from version 0.16.1.
5616
5617 2007-03-02  Bruno Haible  <bruno@clisp.org>
5618
5619         * modules/linkedhash-list-tests (Depends-on): Add progname.
5620         * tests/test-linkedhash_list.c: Include progname.h.
5621         (main): Call set_program_name.
5622
5623         * modules/carray-list-tests (Depends-on): Add progname.
5624         * tests/test-carray_list.c: Include progname.h.
5625         (main): Call set_program_name.
5626
5627         * modules/avltreehash-list-tests (Depends-on): Add progname.
5628         * tests/test-avltreehash_list.c: Include progname.h.
5629         (main): Call set_program_name.
5630
5631         * modules/avltree-oset-tests (Depends-on): Add progname.
5632         * tests/test-avltree_oset.c: Include progname.h.
5633         (main): Call set_program_name.
5634
5635         * modules/avltree-list-tests (Depends-on): Add progname.
5636         * tests/test-avltree_list.c: Include progname.h.
5637         (main): Call set_program_name.
5638
5639         * modules/array-oset-tests (Depends-on): Add progname.
5640         * tests/test-array_oset.c: Include progname.h.
5641         (main): Call set_program_name.
5642
5643         * modules/array-list-tests (Depends-on): Add progname.
5644         * tests/test-array_list.c: Include progname.h.
5645         (main): Call set_program_name.
5646
5647         * modules/argp-tests (Depends-on): Add progname.
5648         * tests/test-argp.c: Include argp.h first. Include progname.h.
5649         (main): Call set_program_name.
5650
5651 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
5652
5653         * doc/gnulib-tool.texi (Initial import): Reword description of
5654         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
5655         limited effect even if defined after the first system include.
5656
5657 2007-03-01  Bruno Haible  <bruno@clisp.org>
5658
5659         * build-aux/config.libpath: Update to libtool-1.5.22.
5660         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
5661
5662 2007-03-01  Bruno Haible  <bruno@clisp.org>
5663
5664         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
5665         foo_CFLAGS.
5666         Reported by Ralf Wildenhues.
5667
5668 2007-03-01  Bruno Haible  <bruno@clisp.org>
5669
5670         * build-aux/install-reloc: Remove object files left over by some
5671         compilers.
5672         Reported by Ralf Wildenhues.
5673
5674 2007-03-01  Bruno Haible  <bruno@clisp.org>
5675
5676         * build-aux/install-reloc: Break long lines.
5677
5678 2007-03-01  Bruno Haible  <bruno@clisp.org>
5679
5680         * doc/relocatable.texi: Document that it may not work on OpenBSD.
5681         Reported by Ralf Wildenhues.
5682
5683 2007-03-01  Bruno Haible  <bruno@clisp.org>
5684
5685         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
5686         include ordering constraints.
5687
5688 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5689
5690         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
5691         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
5692         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
5693         as another example.
5694         * lib/time_.h: Fix misspelling.
5695         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5696         Require gl_HEADER_TIME_H_DEFAULTS.
5697         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
5698         * m4/time_r.m4 (gl_TIME_R): Likewise.
5699         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
5700
5701 2007-03-01  Bruno Haible  <bruno@clisp.org>
5702
5703         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
5704         * m4/utimens.m4 (gl_UTIMENS): Likewise.
5705
5706 2007-03-01  Jim Meyering  <jim@meyering.net>
5707
5708         * modules/xreadlink (Maintainer): Add my name.
5709         * modules/xreadlink-with-size (Depends-on): Alphabetize.
5710
5711 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
5712             Bruno Haible  <bruno@clisp.org>
5713
5714         * build-aux/install-reloc: Compile also c-ctype.c.
5715         * build-aux/relocatable.sh.in: New file.
5716         * doc/relocatable.texi: New file.
5717         * doc/relocatable-maint.texi: New file.
5718         * doc/gnulib.texi: Include relocatable-maint.texi.
5719         * lib/progreloc.c: Include unistd.h unconditionally.
5720         * lib/relocwrapper.c: Include unistd.h unconditionally.
5721         Include c-ctype.h.
5722         (add_dotbin): Use c_tolower.
5723         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
5724         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
5725         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
5726         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
5727         to m4/relocatable-lib.m4.
5728         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
5729         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
5730         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
5731         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
5732         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
5733         * modules/relocatable: New file.
5734         * modules/relocatable-lib: New file.
5735         * modules/relocatable-script: New file.
5736
5737 2007-02-28  Bruno Haible  <bruno@clisp.org>
5738
5739         Import --enable-relocatable infrastructure.
5740         * build-aux/config.libpath: New file, from GNU gettext.
5741         * build-aux/install-reloc: New file, from GNU gettext.
5742         * build-aux/reloc-ldflags: New file, from GNU gettext.
5743         * lib/relocatable.h: New file, from GNU gettext.
5744         * lib/relocatable.c: New file, from GNU gettext.
5745         * lib/relocwrapper.c: New file, from GNU gettext.
5746         * m4/relocatable.m4: New file, from GNU gettext.
5747
5748 2007-02-28  Bruno Haible  <bruno@clisp.org>
5749
5750         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
5751
5752         * modules/xreadlink: New file, from GNU gettext with modifications.
5753         * lib/xreadlink.c: New file, from GNU gettext.
5754         * lib/xreadlink.h: Add comments.
5755         (xreadlink): New declaration.
5756
5757         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
5758         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
5759         lib/xreadlink-with-size.c.
5760         (configure.ac): Remove gl_XREADLINK invocation.
5761         (Makefile.am): Augment lib_SOURCES.
5762         * m4/xreadlink.m4: Remove file.
5763         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
5764         (xreadlink_with_size): Renamed from xreadink.
5765         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
5766         * modules/canonicalize (Depends-on): Replace xreadlink with
5767         xreadlink-with-size.
5768         * lib/canonicalize.c (canonicalize_filename_mode): Update.
5769
5770 2007-02-25  Jim Meyering  <jim@meyering.net>
5771
5772         * build-aux/announce-gen: When complaining about excess arguments,
5773         list them.
5774
5775 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
5776
5777         * README: Document signed integer overflow situation more
5778         accurately.
5779
5780 2007-02-25  Bruno Haible  <bruno@clisp.org>
5781
5782         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
5783         'a' or 'A' conversion.
5784
5785 2007-02-25  Bruno Haible  <bruno@clisp.org>
5786
5787         * modules/filename: Renamed from modules/pathname.
5788         (Files): Replace lib/pathname.h with lib/filename.h. Replace
5789         lib/concatpath.c with lib/concat-filename.c.
5790         (Makefile.am): Update.
5791         (Include): Replace pathname.h with filename.h.
5792         * lib/filename.h: Renamed from lib/pathname.h.
5793         (concatenated_filename): Renamed from concatenated_pathname.
5794         * lib/concat-filename.c: Renamed from lib/concatpath.c.
5795         (concatenated_filename): Renamed from concatenated_pathname.
5796         * lib/findprog.c: Include filename.h instead of pathname.h.
5797         (find_in_path): Update.
5798         * lib/javacomp.c: Include filename.h instead of pathname.h.
5799         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
5800         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
5801         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
5802         is_oldgcj_14_13_usable, is_javac_usable): Update.
5803         * lib/javaexec.c: Include filename.h instead of pathname.h.
5804         (execute_java_class): Update.
5805         * modules/findprog: Update.
5806         * modules/javacomp: Update.
5807         * modules/javaexec: Update.
5808         * MODULES.html.sh (File system functions): Add 'filename', remove
5809         'pathname'.
5810
5811 2007-02-25  Bruno Haible  <bruno@clisp.org>
5812
5813         * modules/printf-frexpl-tests: New file.
5814         * tests/test-printf-frexpl.c: New file.
5815
5816         * modules/printf-frexpl: New file.
5817         * lib/printf-frexpl.h: New file.
5818         * lib/printf-frexpl.c: New file.
5819         * m4/printf-frexpl.m4: New file.
5820
5821 2007-02-25  Bruno Haible  <bruno@clisp.org>
5822
5823         * modules/printf-frexp-tests: New file.
5824         * tests/test-printf-frexp.c: New file.
5825
5826         * modules/printf-frexp: New file.
5827         * lib/printf-frexp.h: New file.
5828         * lib/printf-frexp.c: New file.
5829         * m4/printf-frexp.m4: New file.
5830
5831 2007-02-25  Bruno Haible  <bruno@clisp.org>
5832
5833         Assume automake >= 1.10 for the tests.
5834         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
5835         * modules/arctwo-tests: Likewise.
5836         * modules/argp-tests: Likewise.
5837         * modules/avltree-list-tests: Likewise.
5838         * modules/avltree-oset-tests: Likewise.
5839         * modules/avltreehash-list-tests: Likewise.
5840         * modules/carray-list-tests: Likewise.
5841         * modules/crc-tests: Likewise.
5842         * modules/des-tests: Likewise.
5843         * modules/gc-arcfour-tests: Likewise.
5844         * modules/gc-arctwo-tests: Likewise.
5845         * modules/gc-des-tests: Likewise.
5846         * modules/gc-hmac-md5-tests: Likewise.
5847         * modules/gc-hmac-sha1-tests: Likewise.
5848         * modules/gc-md2-tests: Likewise.
5849         * modules/gc-md4-tests: Likewise.
5850         * modules/gc-md5-tests: Likewise.
5851         * modules/gc-pbkdf2-sha1-tests: Likewise.
5852         * modules/gc-rijndael-tests: Likewise.
5853         * modules/gc-sha1-tests: Likewise.
5854         * modules/gc-tests: Likewise.
5855         * modules/getaddrinfo-tests: Likewise.
5856         * modules/hmac-md5-tests: Likewise.
5857         * modules/hmac-sha1-tests: Likewise.
5858         * modules/linked-list-tests: Likewise.
5859         * modules/linkedhash-list-tests: Likewise.
5860         * modules/lock-tests: Likewise.
5861         * modules/md2-tests: Likewise.
5862         * modules/md4-tests: Likewise.
5863         * modules/md5-tests: Likewise.
5864         * modules/rbtree-list-tests: Likewise.
5865         * modules/rbtree-oset-tests: Likewise.
5866         * modules/rbtreehash-list-tests: Likewise.
5867         * modules/read-file-tests: Likewise.
5868         * modules/rijndael-tests: Likewise.
5869         * modules/stdint-tests: Likewise.
5870         * modules/tls-tests: Likewise.
5871
5872 2007-02-24  Bruno Haible  <bruno@clisp.org>
5873
5874         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
5875         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
5876         function; instead check whether isnan with a double argument links.
5877         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
5878         function; instead check whether isnan with a 'long double' argument
5879         links.
5880         Reported by Eric Blake <ebb9@byu.net>.
5881
5882 2007-02-24  Bruno Haible  <bruno@clisp.org>
5883
5884         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
5885         defined.
5886         * lib/isnanl.c: Remove all code. Just include isnan.c.
5887         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
5888
5889 2007-02-25  Jim Meyering  <jim@meyering.net>
5890
5891         Avoid conflicting types for 'unsetenv' on FreeBSD.
5892         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
5893         conflicting with FreeBSD's (5.0 and 6.1) function declaration
5894         in stdlib.h.
5895
5896 2007-02-24  Bruno Haible  <bruno@clisp.org>
5897
5898         * modules/isnanl-nolibm-tests: New file.
5899         * tests/test-isnanl.c: New file.
5900
5901         * modules/isnanl-nolibm: New file.
5902         * lib/isnanl.h: New file.
5903         * lib/isnanl.c: New file.
5904         * m4/isnanl.m4: New file.
5905
5906 2007-02-24  Bruno Haible  <bruno@clisp.org>
5907
5908         * modules/isnan-nolibm-tests: New file.
5909         * tests/test-isnan.c: New file.
5910
5911         * modules/isnan-nolibm: New file.
5912         * lib/isnan.h: New file.
5913         * lib/isnan.c: New file.
5914         * m4/isnan.m4: New file.
5915
5916 2007-02-24  Bruno Haible  <bruno@clisp.org>
5917
5918         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
5919         assume that an exponent fits in 20 bits.
5920
5921 2007-02-24  Jim Meyering  <jim@meyering.net>
5922
5923         * m4/regex.m4: Update the description of the configure-time option,
5924         --without-included-regex, to state accurately what the defaults are,
5925         and perhaps to give people an idea why using this option is risky.
5926
5927 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
5928
5929         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
5930         loops on small arguments.  This attempts to avoid the problem
5931         Bruno Haible reported for AIX 4.3.2 in
5932         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
5933
5934 2007-02-23  Bruno Haible  <bruno@clisp.org>
5935
5936         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
5937         Needed for help2man.
5938
5939 2007-02-23  Karl Berry  <karl@gnu.org>
5940
5941         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
5942         exists, foo.h should be cvs-ignored, not committed.
5943
5944 2007-02-23  Eric Blake  <ebb9@byu.net>
5945
5946         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
5947         * lib/stat-time.h (includes): Likewise.
5948         * lib/utimecmp.c (includes): Likewise.
5949         * lib/utimens.h (includes): Likewise.
5950         * lib/getdate.y (includes): Also include "timespec.h" for use
5951         internal to the module.
5952         * modules/utimens (Depends-on): Revert yesterday's patch.
5953         * modules/nanosleep (Depends-on): Add missing dependency.
5954
5955 2007-02-22  Bruno Haible  <bruno@clisp.org>
5956
5957         * lib/glob.c: Don't include getlogin_r.h.
5958
5959 2007-02-22  Jim Meyering  <jim@meyering.net>
5960
5961         * modules/utimens (Depends-on): Add timespec, required for
5962         utimens.h's inclusion of timespec.h.
5963
5964 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
5965
5966         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
5967         long unreadable paths in GNU/Linux.  Problem reported by Andreas
5968         Schwab in
5969         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
5970         I'll try to think of a better way to fix the Solaris problem.
5971
5972         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
5973         like glibc; on Solaris 10, it fails with errno == EINVAL.
5974         POSIX says the behavior is unspecified if the first argument is NULL,
5975         so play it safe and never pass NULL to the system getcwd.
5976
5977 2007-02-21  Jim Meyering  <jim@meyering.net>
5978
5979         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
5980         of gettimeofday.  It would conflict with the one now always
5981         provided via sys_time_.h.  Reported by Matthew Woehlke, as
5982         an IRIX 6.5 build failure.
5983
5984 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
5985
5986         Minor fixups to port to Solaris 10 with Sun C 5.8.
5987         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
5988         * modules/getcwd (Depends-on): Add dirfd.
5989         * lib/putenv.c (putenv): #undef it.
5990         (rpl_putenv): New decl.
5991         (malloc, free): Include <stdlib.h> rather than prototyping separately.
5992
5993 2007-02-20  Bruno Haible  <bruno@clisp.org>
5994
5995         * modules/stdio-tests: New file.
5996         * tests/test-stdio.c: New file.
5997
5998         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
5999         (Depends-on): Add stdio.
6000         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
6001         (Include): Use <stdio.h> instead of vsnprintf.h.
6002         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6003         HAVE_DECL_VSNPRINTF.
6004         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
6005
6006         * modules/snprintf (Files): Remove lib/snprintf.h.
6007         (Depends-on): Add stdio.
6008         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
6009         (Include): Use <stdio.h> instead of snprintf.h.
6010         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6011         HAVE_DECL_SNPRINTF.
6012         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
6013         * lib/getaddrinfo.c: Likewise.
6014
6015         * modules/stdio: New file.
6016         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
6017         * lib/snprintf.h: Remove file.
6018         * lib/vsnprintf.h: Remove file.
6019         * lib/.cppi-disable: Remove snprintf.h.
6020         * m4/stdio_h.m4: New file.
6021         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
6022
6023 2007-02-20  Jim Meyering  <jim@meyering.net>
6024
6025         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
6026         used by e.g., mingw.  From Bruno Haible.
6027
6028 2007-02-19  Bruno Haible  <bruno@clisp.org>
6029
6030         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
6031         warnings.
6032         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6033
6034 2007-02-19  Bruno Haible  <bruno@clisp.org>
6035
6036         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
6037         from mingw users.
6038
6039 2007-02-19  Bruno Haible  <bruno@clisp.org>
6040
6041         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
6042         warnings.
6043         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
6044
6045 2007-02-19  Jim Meyering  <jim@meyering.net>
6046
6047         Don't use FD after a successful "fdopendir (fd)".
6048         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
6049         Reset it by calling dirfd on the just-obtained DIR*.
6050
6051         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
6052         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
6053
6054 2007-02-18  Bruno Haible  <bruno@clisp.org>
6055
6056         * lib/readlink.c: Include <unistd.h>.
6057         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
6058         HAVE_READLINK.
6059         * modules/readlink (Depends-on): Add unistd.
6060         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6061         (Include): Add <unistd.h>.
6062
6063         * lib/getlogin_r.h: Remove file.
6064         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
6065         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
6066         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
6067         HAVE_DECL_GETLOGIN_R.
6068         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
6069         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6070         (Include): Use <unistd.h> instead of getlogin_r.h.
6071
6072         * lib/getcwd.h: Remove file.
6073         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
6074         * lib/xgetcwd.c: Likewise.
6075         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
6076         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
6077         * modules/getcwd (Files): Remove lib/getcwd.h.
6078         (Depends-on): Add unistd.
6079         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6080         (Include): Use <unistd.h> instad of getcwd.h.
6081
6082         * lib/ftruncate.c: Include <unistd.h> first.
6083         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
6084         Set HAVE_FTRUNCATE.
6085         * modules/ftruncate (Depends-on): Add unistd.
6086         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6087
6088         * lib/fchdir.c: Include <unistd.h> first.
6089         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
6090         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
6091         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
6092         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6093         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
6094
6095         * lib/dup2.c: Include <unistd.h> first.
6096         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
6097         HAVE_DUP2.
6098         * modules/dup2 (Depends-on): Add unistd.
6099         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6100
6101         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
6102         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
6103         REPLACE_CHOWN. Don't define chown as a macro here.
6104         * modules/chown (Depends-on): Add unistd.
6105         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6106
6107         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
6108         Add definition for GL_LINK_WARNING.
6109         (chown, dup2): New declarations.
6110         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
6111         link warning.
6112         (ftruncate): New declaration.
6113         (getcwd): New declaration, taken from old getcwd.h.
6114         (getlogin_r): New declaration, taken from old getlogin_r.h.
6115         (readlink): New declaration.
6116         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
6117         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
6118         (gl_PREREQ_UNISTD): Remove macro.
6119         (gl_UNISTD_MODULE_INDICATOR): New macro.
6120         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
6121         many new variables. Don't set UNISTD_H.
6122         * modules/unistd (Description): Change.
6123         (Depends-on): Add link-warning.
6124         (configure.ac): Update.
6125         (Makefile.am): Create unistd.h always. Substitute many new variables
6126         into it.
6127
6128 2007-02-18  Bruno Haible  <bruno@clisp.org>
6129
6130         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
6131         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
6132         HAVE_GETSUBOPT.
6133         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
6134         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
6135         * lib/getsubopt.h: Remove file.
6136         * modules/getsubopt (Files): Remove lib/getsubopt.h.
6137         (Depends-on): Add stdlib.
6138         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6139         (Includes): Use <stdlib.h> instead of getsubopt.h.
6140         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
6141         Set HAVE_GETSUBOPT.
6142         * lib/getsubopt.c: Don't include getsubopt.h.
6143
6144 2007-02-18  Bruno Haible  <bruno@clisp.org>
6145
6146         * modules/fchdir (Depends-on): Add dup2.
6147
6148 2007-02-18  Bruno Haible  <bruno@clisp.org>
6149
6150         * lib/stdlib_.h: Handle glibc's special invocation convention
6151         specially.
6152
6153 2007-02-18  Bruno Haible  <bruno@clisp.org>
6154
6155         * modules/stdlib-tests: New file.
6156         * tests/test-stdlib.c: New file.
6157
6158         * modules/mkstemp (Files): Remove lib/mkstemp.h.
6159         (Depends-on): Add stdlib.
6160         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6161         (Includes): Use <stdlib.h> instead of mkstemp.h.
6162         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6163         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
6164         * lib/mkstemp.c: Don't include mkstemp.h.
6165         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
6166         * lib/stdlib--.h: Don't include mkstemp.h.
6167
6168         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
6169         (Depends-on): Add stdlib.
6170         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6171         (Includes): Use <stdlib.h> instead of mkdtemp.h.
6172         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6173         HAVE_MKDTEMP.
6174         * lib/mkdtemp.c: Don't include mkdtemp.h.
6175         * lib/clean-temp.c: Don't include mkdtemp.h.
6176
6177         * modules/exit (Files): Remove lib/exit.h.
6178         (Depends-on): Add stdlib.
6179         (Makefile.am): Remove lib_SOURCES.
6180         (Include): Use <stdlib.h> instead of exit.h.
6181         * lib/argmatch.c: Don't include exit.h.
6182         * lib/execute.c: Likewise.
6183         * lib/pagealign_alloc.c: Likewise.
6184         * lib/pipe.c: Likewise.
6185         * lib/wait-process.c: Likewise.
6186         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
6187         * lib/exitfail.c: Likewise.
6188         * lib/savewd.c: Likewise.
6189         * lib/xsetenv.c: Likewise.
6190
6191         * modules/stdlib: New file.
6192         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
6193         and extra comments about mkstemp().
6194         * lib/exit.h: Remove file.
6195         * lib/mkdtemp.h: Remove file.
6196         * lib/mkstemp.h: Remove file.
6197         * m4/stdlib_h.m4: New file.
6198         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
6199
6200 2007-02-18  Bruno Haible  <bruno@clisp.org>
6201
6202         * modules/math-tests: New file.
6203         * tests/test-math.c: New file.
6204
6205         * modules/math: New file.
6206         * modules/mathl (Files): Remove lib/mathl.h.
6207         (Depends-on): Add math.
6208         (Makefile.am): Don't mention mathl.h.
6209         (Include): Use <math.h> instead of mathl.h.
6210         * lib/math_.h: New file.
6211         * lib/mathl.h: Remove file.
6212         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
6213         mathl.h.
6214         * lib/asinl.c: Likewise.
6215         * lib/atanl.c: Likewise.
6216         * lib/ceill.c: Likewise.
6217         * lib/cosl.c: Likewise.
6218         * lib/expl.c: Likewise.
6219         * lib/floorl.c: Likewise.
6220         * lib/frexpl.c: Likewise.
6221         * lib/ldexpl.c: Likewise.
6222         * lib/logl.c: Likewise.
6223         * lib/sincosl.c: Likewise.
6224         * lib/sinl.c: Likewise.
6225         * lib/sqrtl.c: Likewise.
6226         * lib/tanl.c: Likewise.
6227         * lib/trigl.c: Likewise.
6228         * m4/math_h.m4: New file.
6229         * MODULES.html.sh (Mathematics): Add math.
6230
6231 2007-02-17  Bruno Haible  <bruno@clisp.org>
6232
6233         * modules/wctype-tests: New file.
6234         * tests/test-wctype.c: New file.
6235
6236         * modules/wchar-tests: New file.
6237         * tests/test-wchar.c: New file.
6238
6239         * modules/unistd-tests: New file.
6240         * tests/test-unistd.c: New file.
6241
6242         * modules/time-tests: New file.
6243         * tests/test-time.c: New file.
6244
6245         * modules/sysexits-tests: New file.
6246         * tests/test-sysexits.c: New file.
6247
6248         * modules/sys_time-tests: New file.
6249         * tests/test-sys_time.c: New file.
6250
6251         * modules/sys_stat-tests: New file.
6252         * tests/test-sys_stat.c: New file.
6253
6254         * modules/sys_socket-tests: New file.
6255         * tests/test-sys_socket.c: New file.
6256
6257         * modules/sys_select-tests: New file.
6258         * tests/test-sys_select.c: New file.
6259
6260         * modules/string-tests: New file.
6261         * tests/test-string.c: New file.
6262
6263         * modules/stdbool-tests: New file.
6264         * tests/test-stdbool.c: New file.
6265
6266         * modules/netinet_in-tests: New file.
6267         * tests/test-netinet_in.c: New file.
6268
6269         * modules/inttypes-tests: New file.
6270         * tests/test-inttypes.c: New file.
6271
6272         * modules/fcntl-tests: New file.
6273         * tests/test-fcntl.c: New file.
6274
6275         * modules/byteswap-tests: New file.
6276         * tests/test-byteswap.c: New file.
6277
6278         * modules/arpa_inet-tests: New file.
6279         * tests/test-arpa_inet.c: New file.
6280
6281 2007-02-17  Bruno Haible  <bruno@clisp.org>
6282
6283         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
6284         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
6285         if the corresponding module is not enabled. Emit link warnings if
6286         the function is used nevertheless.
6287         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
6288         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
6289         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
6290         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
6291         * modules/inttypes (Depends-on): Add link-warning.
6292         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6293         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
6294         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
6295         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
6296         * modules/imaxdiv (configure.ac): Likewise.
6297         * modules/strtoimax (configure.ac): Likewise.
6298         * modules/strtoumax (configure.ac): Likewise.
6299
6300 2007-02-17  Bruno Haible  <bruno@clisp.org>
6301
6302         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
6303         gl_STRING_MODULE_INDICATOR_DEFAULTS.
6304         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
6305         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
6306
6307 2007-02-17  Bruno Haible  <bruno@clisp.org>
6308
6309         * modules/link-warning: New file.
6310         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
6311         * lib/string_.h (GL_LINK_WARNING): Remove definition.
6312         * modules/string (Depends-on): Add link-warning.
6313         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6314         string.h.
6315         * MODULES.html.sh (Support for building libraries and executables): Add
6316         link-warning.
6317
6318 2007-02-17  Bruno Haible  <bruno@clisp.org>
6319
6320         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
6321         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
6322         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
6323         long lines.
6324
6325 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
6326             Bruno Haible  <bruno@clisp.org>
6327
6328         * modules/tmpfile: New file.
6329         * lib/tmpfile.c: New file.
6330         * m4/tmpfile.m4: New file.
6331         * MODULES.html.sh (func_all_modules): New section "Input/output".
6332
6333 2007-02-15  Bruno Haible  <bruno@clisp.org>
6334
6335         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
6336         (supports_delete_on_close): New function.
6337         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
6338
6339 2007-02-14  Bruno Haible  <bruno@clisp.org>
6340
6341         * modules/mbspcasecmp-tests: New file.
6342         * tests/test-mbspcasecmp.sh: New file.
6343         * tests/test-mbspcasecmp.c: New file.
6344
6345         New module mbspcasecmp.
6346         * modules/mbspcasecmp: New file.
6347         * lib/mbspcasecmp.c: New file.
6348         * lib/string_.h (strncasecmp): Change warning message.
6349         (mbspcasecmp): New declaration.
6350         * m4/mbspcasecmp.m4: New file.
6351         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6352         GNULIB_MBSPCASECMP.
6353         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
6354         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
6355
6356 2007-02-14  Bruno Haible  <bruno@clisp.org>
6357
6358         * modules/mbsncasecmp-tests: New file.
6359         * tests/test-mbsncasecmp.sh: New file.
6360         * tests/test-mbsncasecmp.c: New file.
6361
6362         New module mbsncasecmp.
6363         * modules/mbsncasecmp: New file.
6364         * lib/mbsncasecmp.c: New file.
6365         * lib/string_.h (mbsncasecmp): New declaration.
6366         * m4/mbsncasecmp.m4: New file.
6367         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6368         GNULIB_MBSNCASECMP.
6369         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
6370         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
6371
6372 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
6373
6374         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
6375         Verify that it doesn't overlap with our flags.
6376         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
6377         do not have the desired effect in multibyte locales; instead, use
6378         mbscasecmp.
6379         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
6380         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
6381         we don't require GNU fnmatch ourselves (if our users require it, they
6382         should do so explicitly).
6383
6384         Fix regex code so it doesn't rely on strcasecmp.
6385         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
6386         Otherwise, include gnulib's langinfo.h.
6387         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
6388         undesirable behavior in non-C locales.  Instead, rely on localecharset.
6389         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
6390         * modules/regex (FILES): Remove m4/codeset.m4.
6391         (Depends-on): Add localcharset.  Remove strcase.
6392
6393 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6394
6395         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
6396         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
6397
6398 2007-02-13  Bruno Haible  <bruno@clisp.org>
6399
6400         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
6401         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6402
6403 2007-02-12  Bruno Haible  <bruno@clisp.org>
6404
6405         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6406         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
6407         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
6408         time warning rather than a link error.
6409
6410 2007-02-12  Bruno Haible  <bruno@clisp.org>
6411
6412         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
6413         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
6414         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6415
6416 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6417
6418         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
6419         args, not 2.
6420
6421 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6422
6423         New module 'time', so that apps can include <time.h> as per
6424         POSIX and GNU instead of separate include files like time_r.h
6425         and timegm.h.  This implementation tries out a simpler approach
6426         for replacing decls in standard include files (as compared to
6427         the string module), somewhat as an experiment.
6428
6429         * config/srclist.txt: Comment out mktime.c for now.
6430         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
6431         since it doesn't apply any more.  Use generic wording instead.
6432         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
6433         'time'.
6434         * lib/time_.h, m4/time_h.m4, modules/time: New files.
6435         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
6436         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
6437         Don't include <sys/types.h>; no longer needed since we assume C89.
6438         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
6439         * lib/strftime.c: Likewise.
6440         * lib/time_r.c: Likewise.
6441         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
6442         * lib/nanosleep.c: Include <time.h> first, to check interface.
6443         * lib/strptime.c: Likewise.
6444         * lib/time_r.c: Likewise.
6445         * lib/timegm.c: Likewise.
6446         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
6447         needed.
6448         * lib/timegm.c: Don't include timegm.h; no longer needed.
6449         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
6450         time.h now handles any problems in that area.
6451         (struct timespec, nanosleep): Remove; time.h now arranges for these.
6452         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
6453         that time.h defines struct timespec.
6454         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
6455         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
6456         handles that.
6457         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
6458         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
6459         needed.  Set REPLACE_LOCALTIME.
6460         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
6461         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
6462         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
6463         nanosleep; time_h.m4 now does that.  Don't require
6464         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
6465         module handles this now.
6466         * modules/getdate (Depends-on): Remove timespec.  Add time.
6467         * modules/nanosleep (Depends-on): Likewise.
6468         * modules/stat-time (Depends-on): Likewise.
6469         * modules/nanosleep (Include): Include time.h, not timespec.h.
6470         * modules/strptime (Files): Remove lib/strptime.h.
6471         (Depends-on): Add extensions, time.
6472         (Include): Include time.h, not strptime.h.
6473         * modules/time_r (Files): Remove lib/time_r.h.
6474         (Depends-on): Add time.
6475         (Include): Include time.h, not time_r.h.
6476         * modules/timegm: Likewise.
6477         * modules/timespec (Description): Now does timespec-related decls
6478         of our own, instead of struct timespec itself.
6479         (Depends-on): Add time; remove extensions.
6480         (Maintainer): Add self.
6481         * modules/utimecmp (Depends-on): Add time; remove timespec.
6482         * modules/utimens (Depends-on): Likewise.
6483         * modules/xnanosleep (Depends-on): Likewise.
6484
6485 2007-02-11  Bruno Haible  <bruno@clisp.org>
6486
6487         * lib/c-strstr.c: Include allocsa.h.
6488         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6489         * lib/c-strcasestr.c: Include allocsa.h.
6490         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6491         * lib/strcasestr.c: Include allocsa.h.
6492         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6493         * lib/mbsstr.c: Include allocsa.h.
6494         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6495         allocsa/freesa instead of malloc/free.
6496         * lib/mbscasestr.c: Include allocsa.h.
6497         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6498         allocsa/freesa instead of malloc/free.
6499         * modules/c-strstr (Depends-on): Add allocsa.
6500         * modules/c-strcasestr (Depends-on): Likewise.
6501         * modules/strcasestr (Depends-on): Likewise.
6502         * modules/mbsstr (Depends-on): Likewise.
6503         * modules/mbscasestr (Depends-on): Likewise.
6504
6505 2007-02-11  Bruno Haible  <bruno@clisp.org>
6506
6507         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
6508
6509         * modules/mbsspn-tests: New file.
6510         * tests/test-mbsspn.sh: New file.
6511         * tests/test-mbsspn.c: New file.
6512
6513 2007-02-11  Bruno Haible  <bruno@clisp.org>
6514
6515         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
6516
6517         * modules/mbspbrk-tests: New file.
6518         * tests/test-mbspbrk.sh: New file.
6519         * tests/test-mbspbrk.c: New file.
6520
6521 2007-02-11  Bruno Haible  <bruno@clisp.org>
6522
6523         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
6524         unneeded cast.
6525
6526         * modules/mbscspn-tests: New file.
6527         * tests/test-mbscspn.sh: New file.
6528         * tests/test-mbscspn.c: New file.
6529
6530 2007-02-11  Bruno Haible  <bruno@clisp.org>
6531
6532         * modules/mbscasecmp-tests: New file.
6533         * tests/test-mbscasecmp.sh: New file.
6534         * tests/test-mbscasecmp.c: New file.
6535
6536 2007-02-11  Bruno Haible  <bruno@clisp.org>
6537
6538         Ensure O(n) worst-case complexity of mbscasestr.
6539         * lib/mbscasestr.c: Include stdbool.h.
6540         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6541         functions.
6542         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
6543         the bookkeeping indicates that it's worth it.
6544         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
6545
6546         * modules/mbscasestr-tests: New file.
6547         * tests/test-mbscasestr1.c: New file.
6548         * tests/test-mbscasestr2.sh: New file.
6549         * tests/test-mbscasestr2.c: New file.
6550         * tests/test-mbscasestr3.sh: New file.
6551         * tests/test-mbscasestr3.c: New file.
6552         * tests/test-mbscasestr4.sh: New file.
6553         * tests/test-mbscasestr4.c: New file.
6554         * m4/locale-tr.m4: New file.
6555
6556 2007-02-11  Bruno Haible  <bruno@clisp.org>
6557
6558         Ensure O(n) worst-case complexity of mbsstr.
6559         * lib/mbsstr.c: Include stdbool.h.
6560         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6561         functions.
6562         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
6563         bookkeeping indicates that it's worth it.
6564         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
6565
6566         * modules/mbsstr-tests: New file.
6567         * tests/test-mbsstr1.c: New file.
6568         * tests/test-mbsstr2.sh: New file.
6569         * tests/test-mbsstr2.c: New file.
6570         * tests/test-mbsstr3.sh: New file.
6571         * tests/test-mbsstr3.c: New file.
6572         * m4/locale-fr.m4: New file.
6573
6574 2007-02-11  Bruno Haible  <bruno@clisp.org>
6575
6576         * lib/mbsrchr.c (mbsrchr): Fix bug.
6577
6578         * modules/mbsrchr-tests: New file.
6579         * tests/test-mbsrchr.sh: New file.
6580         * tests/test-mbsrchr.c: New file.
6581
6582 2007-02-11  Bruno Haible  <bruno@clisp.org>
6583
6584         * lib/mbschr.c (mbschr): Fix bug.
6585
6586         * modules/mbschr-tests: New file.
6587         * tests/test-mbschr.sh: New file.
6588         * tests/test-mbschr.c: New file.
6589         * m4/locale-zh.m4: New file.
6590
6591 2007-02-11  Bruno Haible  <bruno@clisp.org>
6592
6593         Support for copying multibyte string iterators.
6594         * lib/mbiter.h: Include <string.h>.
6595         (mbiter_multi_copy): New function.
6596         (mbi_copy): New macro.
6597         * lib/mbuiter.h: Include <string.h>.
6598         (mbuiter_multi_copy): New function.
6599         (mbui_copy): New macro.
6600
6601 2007-02-11  Bruno Haible  <bruno@clisp.org>
6602
6603         New module mbslen.
6604         * modules/mbslen: New file.
6605         * lib/mbslen.c: New file.
6606         * lib/string_.h (mbslen): New declaration.
6607         * m4/mbslen.m4: New file.
6608         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6609         GNULIB_MBSLEN.
6610         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
6611         * MODULES.html.sh (Internationalization functions): Add mbslen.
6612
6613 2007-02-11  Bruno Haible  <bruno@clisp.org>
6614
6615         Ensure O(n) worst-case complexity of strcasestr substitute.
6616         * lib/strcasestr.c: Include stdbool.h.
6617         (knuth_morris_pratt): New function.
6618         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6619         bookkeeping indicates that it's worth it.
6620         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
6621
6622         * modules/strcasestr-tests: New file.
6623         * tests/test-strcasestr.c: New file.
6624
6625 2007-02-11  Bruno Haible  <bruno@clisp.org>
6626
6627         Ensure O(n) worst-case complexity of c_strcasestr.
6628         * lib/c-strcasestr.c: Include stdbool.h, string.h.
6629         (knuth_morris_pratt): New function.
6630         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
6631         the bookkeeping indicates that it's worth it.
6632         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
6633
6634         * modules/c-strcasestr-tests: New file.
6635         * tests/test-c-strcasestr.c: New file.
6636
6637 2007-02-11  Bruno Haible  <bruno@clisp.org>
6638
6639         Ensure O(n) worst-case complexity of c_strstr.
6640         * lib/c-strstr.c: Include stdbool.h, string.h.
6641         (knuth_morris_pratt): New function.
6642         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6643         bookkeeping indicates that it's worth it.
6644         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
6645
6646         * lib/c-strstr.c: Complete rewrite for maintainability.
6647
6648         * modules/c-strstr-tests: New file.
6649         * tests/test-c-strstr.c: New file.
6650
6651 2007-02-11  Bruno Haible  <bruno@clisp.org>
6652
6653         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
6654         5.2.1 and earlier, whereby \055 was treated just like the range
6655         delimiter '-'.
6656         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
6657
6658 2007-02-08  Bruno Haible  <bruno@clisp.org>
6659
6660         * modules/regex (Depends-on): Add stdbool.
6661         Reported by Dalibor Topic <robilad@kaffe.org>.
6662
6663 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6664
6665         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
6666         Prefer returning from main to exiting from it.
6667         Remove unnecessary parens after sizeof.
6668
6669 2007-02-05  Bruno Haible  <bruno@clisp.org>
6670
6671         New module mbssep.
6672         * modules/mbssep: New file.
6673         * lib/mbssep.c: New file.
6674         * lib/string_.h (strsep): Add a conditional link warning.
6675         (mbssep): New declaration.
6676         * m4/mbssep.m4: New file.
6677         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6678         GNULIB_MBSSEP.
6679         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
6680         * MODULES.html.sh (Internationalization functions): Add mbssep.
6681
6682 2007-02-05  Bruno Haible  <bruno@clisp.org>
6683
6684         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
6685         Optimize search in case of 1 delimiter.
6686
6687 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6688
6689         * lib/acl.h: Include sys/types.h before sys/acl.h.
6690
6691 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6692
6693         Merge upstream fix for glibc bugzilla #3957:
6694
6695         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
6696
6697         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
6698         bit for RE_HAT_LISTS_NOT_NEWLINE.
6699         (build_charclass_op): Remove bogus comment.
6700
6701 2007-02-05  Simon Josefsson  <simon@josefsson.org>
6702
6703         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
6704
6705 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6706
6707         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
6708         * lib/memmem.c [!defined _LIBC]: Include config.h.
6709
6710 2007-02-04  Bruno Haible  <bruno@clisp.org>
6711
6712         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
6713         warning message.
6714
6715 2007-02-04  Bruno Haible  <bruno@clisp.org>
6716
6717         New module mbstok_r.
6718         * modules/mbstok_r: New file.
6719         * lib/mbstok_r.c: New file.
6720         * lib/string_.h (strtok_r): Change argument names to match the
6721         comments. Add a conditional link warning.
6722         (mbstok_r): New declaration.
6723         * m4/mbstok_r.m4: New file.
6724         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6725         GNULIB_MBSTOK_R.
6726         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
6727         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
6728
6729 2007-02-04  Bruno Haible  <bruno@clisp.org>
6730
6731         New module mbsspn.
6732         * modules/mbsspn: New file.
6733         * lib/mbsspn.c: New file.
6734         * lib/string_.h (strspn): Add a conditional link warning.
6735         (mbsspn): New declaration.
6736         * m4/mbsspn.m4: New file.
6737         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6738         GNULIB_MBSSPN.
6739         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
6740         * MODULES.html.sh (Internationalization functions): Add mbsspn.
6741
6742 2007-02-04  Bruno Haible  <bruno@clisp.org>
6743
6744         New module mbspbrk.
6745         * modules/mbspbrk: New file.
6746         * lib/mbspbrk.c: New file.
6747         * lib/string_.h (strpbrk): Add a conditional link warning.
6748         (mbspbrk): New declaration.
6749         * m4/mbspbrk.m4: New file.
6750         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6751         GNULIB_MBSPBRK.
6752         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
6753         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
6754
6755 2007-02-04  Bruno Haible  <bruno@clisp.org>
6756
6757         New module mbscspn.
6758         * modules/mbscspn: New file.
6759         * lib/mbscspn.c: New file.
6760         * lib/string_.h (strcspn): Add a conditional link warning.
6761         (mbscspn): New declaration.
6762         * m4/mbscspn.m4: New file.
6763         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6764         GNULIB_MBSCSPN.
6765         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
6766         * MODULES.html.sh (Internationalization functions): Add mbscspn.
6767
6768 2007-02-04  Bruno Haible  <bruno@clisp.org>
6769
6770         New module mbscasestr, reduced goal of strcasestr.
6771         * modules/mbscasestr: New file.
6772         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
6773         (mbscasestr): Renamed from strcasestr.
6774         * lib/strcasestr.c: Don't include mbuiter.h.
6775         (strcasestr): Remove support for multibyte locales.
6776         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
6777         Change the conditional link warning.
6778         (mbscasestr): New declaration.
6779         * m4/mbscasestr.m4: New file.
6780         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
6781         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
6782         REPLACE_STRCASESTR.
6783         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
6784         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6785         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6786         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
6787         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
6788         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6789         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
6790         (Depends-on): Remove mbuiter.
6791         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
6792
6793 2007-02-04  Bruno Haible  <bruno@clisp.org>
6794
6795         Simplify handling of strncasecmp.
6796         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
6797         the conditional link warning.
6798         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6799         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
6800         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
6801         * modules/strcase (configure.ac): Don't invoke
6802         gl_STRING_MODULE_INDICATOR.
6803         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
6804
6805 2007-02-04  Bruno Haible  <bruno@clisp.org>
6806
6807         New module mbscasecmp, reduced goal of strcasecmp.
6808         * modules/mbscasecmp: New file.
6809         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
6810         (mbscasecmp): Renamed from strcasecmp.
6811         * lib/strcasecmp.c: Don't include mbuiter.h.
6812         (strcasecmp): Remove support for multibyte locales.
6813         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
6814         Change the conditional link warning.
6815         (mbscasecmp): New declaration.
6816         * m4/mbscasecmp.m4: New file.
6817         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
6818         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
6819         REPLACE_STRCASECMP.
6820         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
6821         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6822         GNULIB_MBSCASECMP.
6823         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
6824         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
6825         * modules/strcase (Files): Remove m4/mbrtowc.m4.
6826         (Depends-on): Remove mbuiter.
6827         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
6828
6829 2007-02-04  Bruno Haible  <bruno@clisp.org>
6830
6831         New module mbsstr. Remove module strstr.
6832         * modules/mbsstr: New file.
6833         * modules/strstr: Remove file.
6834         * lib/mbsstr.c: Renamed from lib/strstr.c.
6835         (mbsstr): Renamed from strstr.
6836         * lib/string_.h (strstr): Remove declaration. Change the conditional
6837         link warning.
6838         (mbsstr): New declaration.
6839         * m4/mbsstr.m4: New file.
6840         * m4/strstr.m4: Remove file.
6841         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
6842         REPLACE_STRSTR.
6843         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
6844         Don't initialize GNULIB_STRSTR.
6845         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
6846         substitute GNULIB_STRSTR and REPLACE_STRSTR.
6847         * MODULES.html.sh (Internationalization functions): Add mbsstr.
6848         (Support for systems lacking ANSI C 89): Remove strstr.
6849
6850 2007-02-04  Bruno Haible  <bruno@clisp.org>
6851
6852         New module mbsrchr.
6853         * modules/mbsrchr: New file.
6854         * lib/mbsrchr.c: New file.
6855         * lib/string_.h (strrchr): Add a conditional link warning.
6856         (mbsrchr): New declaration.
6857         * m4/mbsrchr.m4: New file.
6858         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6859         GNULIB_MBSRCHR.
6860         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
6861         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
6862
6863 2007-02-04  Bruno Haible  <bruno@clisp.org>
6864
6865         New module mbschr.
6866         * modules/mbschr: New file.
6867         * lib/mbschr.c: New file.
6868         * lib/string_.h (strchr): Add a conditional link warning.
6869         (mbschr): New declaration.
6870         * m4/mbschr.m4: New file.
6871         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6872         GNULIB_MBSCHR.
6873         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
6874         * MODULES.html.sh (Internationalization functions): Add mbschr.
6875
6876 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6877
6878         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
6879
6880         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
6881
6882 2007-02-04  Bruno Haible  <bruno@clisp.org>
6883
6884         New module description section 'configure.ac-early'.
6885         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
6886         (func_get_autoconf_early_snippet): New function.
6887         (func_import, func_create_testdir): Use it. Remove special cases for
6888         modules 'extensions' and 'lock'.
6889         * modules/extensions (configure.ac-early): Require
6890         gl_USE_SYSTEM_EXTENSIONS.
6891         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
6892
6893 2007-02-04  Bruno Haible  <bruno@clisp.org>
6894
6895         Make use of gcj-4.3's -fsource and -ftarget option.
6896         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
6897         and if so try the options -fsource and -ftarget.
6898         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
6899         source_version, ftarget_option, target_version arguments.
6900         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
6901         (is_envjavac_oldgcj_14_14_usable): Renamed from
6902         is_envjavac_gcj_14_14_usable.
6903         (is_envjavac_oldgcj_14_13_usable): Renamed from
6904         is_envjavac_gcj_14_13_usable.
6905         (is_gcj_present): Update.
6906         (is_gcj_43, is_gcj43_usable): New functions.
6907         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
6908         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
6909         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
6910         try the options -fsource and -ftarget.
6911
6912 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
6913
6914         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
6915         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
6916         larger value.
6917
6918 2007-02-03  Jim Meyering  <jim@meyering.net>
6919
6920         Give tools a better chance to allocate space for very large buffers.
6921         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
6922
6923         Make pwd and readlink work also when run with an unreadable parent dir
6924         on systems with openat support.
6925         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
6926         provided getcwd function, even when we have openat support.
6927         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
6928
6929 2007-02-02  Bruno Haible  <bruno@clisp.org>
6930
6931         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6932         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
6933         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
6934         portability problems if one of these functions is only used on specific
6935         platforms.
6936         Reported by Paul Eggert.
6937
6938 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
6939
6940         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
6941         is causing more trouble than it's curing.
6942         * lib/regex_internal.h (__mempcpy): Remove.
6943         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
6944         (and make the code a tad smaller to boot).
6945         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
6946
6947 2007-02-02  Jim Meyering  <jim@meyering.net>
6948
6949         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
6950         section, not in the Makefile.am: one.
6951
6952 2007-02-02  Eric Blake  <ebb9@byu.net>
6953
6954         * lib/strchrnul.c: Always include config.h first.
6955
6956         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
6957         gnulib strstr is not necessary here.
6958
6959 2007-02-02  Simon Josefsson  <simon@josefsson.org>
6960
6961         * m4/socklen.m4: Fix typo.
6962
6963 2007-02-02  Eric Blake  <ebb9@byu.net>
6964
6965         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
6966         * modules/netinet_in (Makefile.am): Likewise.
6967
6968 2007-02-01  Bruno Haible  <bruno@clisp.org>
6969
6970         * lib/string_.h (GL_LINK_WARNING): New macro.
6971         (strcasecmp, strstr, strcasestr): If provided by the system,
6972         conditionally define as a macro that leads to a warning instead of to
6973         an error.
6974         (strncasecmp): Conditionally define as a macro that leads to a warning.
6975
6976 2007-02-01  Karl Berry  <karl@gnu.org>
6977
6978         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
6979
6980 2007-02-01  Bruno Haible  <bruno@clisp.org>
6981
6982         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
6983         renamings.
6984
6985 2007-02-01  Eric Blake  <ebb9@byu.net>
6986
6987         * modules/regex (Depends-on): Revert dependence on mempcpy.
6988         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
6989         module's definition of mempcpy.
6990         Reported by Paul Eggert.
6991
6992 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
6993
6994         * lib/string_.h: If the gnulib module XYZ is not present, undefine
6995         the symbol XYZ before redefining it.  This fixes a problem with
6996         programs that don't use XYZ, when compiled on systems that define
6997         XYZ to something else.
6998
6999 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
7000
7001         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
7002         occurs when "mkdir -m foo" creates a setgid directory that is (1)
7003         writeable to group or other and (2) is intended to have a special
7004         mode bit that is set or cleared.  In such a case, the directory
7005         should be neither group- nor other-writeable until the special
7006         mode bits are right.
7007
7008 2007-01-31  Eric Blake  <ebb9@byu.net>
7009
7010         * modules/mountlist (Depends-on): Add strstr.
7011
7012         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
7013         bug.
7014         * modules/string (Makefile.am): Remove redundant replacement.
7015         * modules/regex (Depends-on): Add mempcpy.
7016
7017 2007-01-31  Bruno Haible  <bruno@clisp.org>
7018
7019         New module description field 'Link'.
7020         * gnulib-tool (func_usage): Document --extract-link-directive.
7021         (sed_extract_prog): Recognize 'Link' directive.
7022         (func_get_link_directive): New function.
7023         (func_import): Show summary of link directives.
7024         Handle --extract-link-directive option.
7025         * modules/acl (Link): New section.
7026         * modules/clock-time (Link): New section.
7027         * modules/euidaccess (Link): New section.
7028         * modules/gettext (Link): New section.
7029         * modules/iconv (Link): New section.
7030         * modules/lock (Link): New section.
7031         * modules/nanosleep (Link): New section.
7032         * modules/readline (Link): New section.
7033
7034 2007-01-27  Bruno Haible  <bruno@clisp.org>
7035
7036         Enforce the use of gnulib modules for unportable <string.h> functions.
7037         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
7038         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
7039         (gl_HEADER_STRING_H_BODY): Require it.
7040         * lib/string_.h: If the gnulib module XYZ is not present, redefine
7041         the symbol XYZ to one that gives a link error.
7042         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
7043         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
7044         * modules/mempcpy (configure.ac): Likewise.
7045         * modules/memrchr (configure.ac): Likewise.
7046         * modules/stpcpy (configure.ac): Likewise.
7047         * modules/stpncpy (configure.ac): Likewise.
7048         * modules/strcase (configure.ac): Likewise.
7049         * modules/strcasestr (configure.ac): Likewise.
7050         * modules/strchrnul (configure.ac): Likewise.
7051         * modules/strdup (configure.ac): Likewise.
7052         * modules/strndup (configure.ac): Likewise.
7053         * modules/strnlen (configure.ac): Likewise.
7054         * modules/strpbrk (configure.ac): Likewise.
7055         * modules/strsep (configure.ac): Likewise.
7056         * modules/strstr (configure.ac): Likewise.
7057         * modules/strtok_r (configure.ac): Likewise.
7058
7059 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
7060
7061         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
7062
7063 2007-01-30  Jim Meyering  <jim@meyering.net>
7064
7065         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
7066
7067 2007-01-29  Bruno Haible  <bruno@clisp.org>
7068
7069         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
7070         * lib/execute.c: Likewise.
7071         * lib/pipe.c: Likewise.
7072         * lib/printf-args.h: Likewise.
7073         * lib/printf-args.c: Likewise.
7074         * lib/printf-parse.c: Likewise.
7075         * lib/vasnprintf.c: Likewise.
7076
7077 2007-01-29  Eric Blake  <ebb9@byu.net>
7078
7079         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
7080         declaration.
7081
7082 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
7083
7084         * lib/strptime.h (strptime): Use 'restrict' for args where
7085         POSIX requires this.
7086         * lib/strptime.c (strptime): Likewise.
7087         Change license notice from LGPL to GPL, since gnulib-tool will
7088         change this as needed.
7089         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
7090         defined.
7091         Include "strptime.h" first, to check interface.
7092         Do not #undef _LIBC and _NL_CURRENT.
7093         Do not include <stdlib.h>; no longer needed.
7094         Include "time_r.h" and declare ptime_locale_status
7095         only if _LIBC is not defined.
7096         (__P): Remove unused macro.
7097         (match_string): Bring back glibc version, but use it only if _LIBC
7098         is defined.
7099         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
7100         Remove unnecessary assertion and abort() call.
7101         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
7102         * m4/strptime.m4: Fix serial number comment.
7103         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
7104         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
7105         (Depends-on): Add time_r.
7106
7107 2007-01-29  Bruno Haible  <bruno@clisp.org>
7108
7109         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
7110         strptime.
7111         * modules/strptime (Depends-on): Add stdbool.
7112         * lib/strptime.h: Include <time.h> always. Add comments.
7113
7114 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
7115
7116         * modules/strptime: New file.
7117         * lib/strptime.h: New file.
7118         * lib/strptime.c: New file.
7119         * m4/strptime.m4: New file.
7120
7121 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
7122
7123         * MODULES.html.sh: New module mpsort.
7124         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
7125
7126         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
7127         a circularity problem with HP-UX ia64 reported by Bob Proulx in
7128         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
7129         All uses changed.
7130         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
7131         All uses changed.
7132         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
7133         to _Restrict_.
7134         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
7135         the parameter matches the prototype.
7136
7137 2007-01-28  Jim Meyering  <jim@meyering.net>
7138
7139         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
7140         sys/time.h here, reverting that part of the previous patch:
7141         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
7142
7143 2007-01-28  Bruno Haible  <bruno@clisp.org>
7144
7145         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
7146         value of $(SYS_TIME_H).
7147         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
7148         remove it conditionally, too. [added by Jim Meyering]
7149         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
7150         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7151         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
7152         GETTIMEOFDAY_REPLACEMENT to 1.
7153
7154 2007-01-28  Bruno Haible  <bruno@clisp.org>
7155
7156         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
7157         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
7158         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
7159         Set UNISTD_H instead of UNISTD_H2.
7160         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
7161
7162 2007-01-28  Bruno Haible  <bruno@clisp.org>
7163
7164         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
7165         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
7166
7167 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7168
7169         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
7170         (func_create_testdir): Ensure C locale for `grep' and `tr'
7171         character ranges.
7172         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
7173         ACLOCAL_AMFLAGS parsing state machine.
7174
7175 2007-01-27  Bruno Haible  <bruno@clisp.org>
7176
7177         * modules/unistr/base: Update.
7178
7179 2007-01-27  Bruno Haible  <bruno@clisp.org>
7180
7181         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
7182         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
7183         * modules/unistr/u32-mbtouc-unsafe: Renamed from
7184         modules/unistr/u32-mbtouc.
7185         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
7186         * lib/unistr.h: Update.
7187         * lib/linebreak.c: Update.
7188         * modules/unistr/u32-mbtouc: Renamed from
7189         modules/unistr/u32-mbtouc-safe.
7190         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
7191         * lib/unistr.h: Update.
7192         * lib/unistr/u32-to-u8.c: Update.
7193         * lib/unistr/u32-to-u16.c: Update.
7194
7195 2007-01-27  Bruno Haible  <bruno@clisp.org>
7196
7197         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
7198         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
7199         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
7200         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
7201         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
7202         * modules/unistr/u16-mbtouc-unsafe: Renamed from
7203         modules/unistr/u16-mbtouc.
7204         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
7205         * lib/unistr.h: Update.
7206         * lib/linebreak.c: Update.
7207         * modules/linebreak: Update.
7208         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
7209         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
7210         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
7211         * modules/unistr/u16-mbtouc: Renamed from
7212         modules/unistr/u16-mbtouc-safe.
7213         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
7214         * lib/unistr.h: Update.
7215         * lib/unistr/u16-to-u8.c: Update.
7216         * modules/unistr/u16-to-u8: Update.
7217         * lib/unistr/u16-to-u32.c: Update.
7218         * modules/unistr/u16-to-u32: Update.
7219
7220 2007-01-27  Bruno Haible  <bruno@clisp.org>
7221
7222         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
7223         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
7224         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
7225         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
7226         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
7227         * modules/unistr/u8-mbtouc-unsafe: Renamed from
7228         modules/unistr/u8-mbtouc.
7229         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
7230         * lib/unistr.h: Update.
7231         * lib/striconveh.c: Update.
7232         * modules/striconveh: Update.
7233         * lib/linebreak.c: Update.
7234         * modules/linebreak: Update.
7235         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
7236         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
7237         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
7238         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
7239         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
7240         * lib/unistr.h: Update.
7241         * lib/striconveh.c: Update.
7242         * modules/striconveh: Update.
7243         * lib/unistr/u8-to-u16.c: Update.
7244         * modules/unistr/u8-to-u16: Update.
7245         * lib/unistr/u8-to-u32.c: Update.
7246         * modules/unistr/u8-to-u32: Update.
7247
7248 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7249
7250         Sync from Libtool.
7251         * lib/argz.c: Do not include strings.h nor memory.h, include
7252         string.h unconditionally.  Patch by Simon Josefsson.
7253
7254 2007-01-27  Bruno Haible  <bruno@clisp.org>
7255
7256         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
7257         from gl_HEADER_STRING_H_BODY.
7258         (gl_HEADER_STRING_H_BODY): Require it.
7259         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
7260         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
7261         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
7262         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
7263         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
7264         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
7265         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
7266         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
7267         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
7268         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
7269         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
7270         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
7271         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
7272         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
7273         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7274
7275 2007-01-27  Bruno Haible  <bruno@clisp.org>
7276
7277         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
7278         check_PROGRAMS into noinst_PROGRAMS.
7279         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
7280         check_PROGRAMS in this case.
7281         (func_import): Set for_test to false.
7282         (func_create_testdir): Set for_test to true.
7283
7284 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7285             Bruno Haible  <bruno@clisp.org>
7286
7287         * modules/strcasestr (Files): Remove lib/strcasestr.h.
7288         (Depends-on): Add string.
7289         (Includes): Use <string.h> instead of strcasestr.h.
7290         * modules/string (Makefile.am): Also substitute the value of
7291         REPLACE_STRCASESTR.
7292         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
7293         assume strcasestr is declared in <string.h> not <strings.h>. Also
7294         set REPLACE_STRCASESTR.
7295         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
7296         REPLACE_STRCASESTR.
7297         * lib/strcasestr.h: Remove file.
7298         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
7299         * lib/string_.h (strcasestr): New declaration.
7300
7301 2007-01-27  Bruno Haible  <bruno@clisp.org>
7302
7303         * lib/string_.h: Use 'extern'.
7304
7305 2007-01-27  Jim Meyering  <jim@meyering.net>
7306
7307         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
7308         of set-but-not-used local, "q".
7309
7310         * lib/mempcpy.c: Include <config.h> before <string.h>.
7311         This fixes a compilation error on HP-UX, due to the system's
7312         "restrict"-using mempcpy prototype.
7313
7314 2007-01-26  Bruno Haible  <bruno@clisp.org>
7315
7316         Small optimization.
7317         * lib/javacomp.c: Include c-strstr.h.
7318          (is_envjavac_gcj): Use c_strstr instead of strstr.
7319         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
7320
7321 2007-01-26  Bruno Haible  <bruno@clisp.org>
7322
7323         * MODULES.html.sh (Unicode string functions): Add the new modules.
7324
7325         * modules/uniconv/u32-strconv-to-locale: New file.
7326         * lib/uniconv/u32-strconv-to-locale.c: New file.
7327
7328         * modules/uniconv/u16-strconv-to-locale: New file.
7329         * lib/uniconv/u16-strconv-to-locale.c: New file.
7330
7331         * modules/uniconv/u8-strconv-to-locale: New file.
7332         * lib/uniconv/u8-strconv-to-locale.c: New file.
7333
7334         * modules/uniconv/u32-strconv-from-locale: New file.
7335         * lib/uniconv/u32-strconv-from-locale.c: New file.
7336
7337         * modules/uniconv/u16-strconv-from-locale: New file.
7338         * lib/uniconv/u16-strconv-from-locale.c: New file.
7339
7340         * modules/uniconv/u8-strconv-from-locale: New file.
7341         * lib/uniconv/u8-strconv-from-locale.c: New file.
7342
7343         * modules/uniconv/u32-strconv-to-enc: New file.
7344         * lib/uniconv/u32-strconv-to-enc.c: New file.
7345         * modules/uniconv/u32-strconv-to-enc-tests: New file.
7346         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
7347
7348         * modules/uniconv/u16-strconv-to-enc: New file.
7349         * lib/uniconv/u16-strconv-to-enc.c: New file.
7350         * lib/uniconv/u-strconv-to-enc.h: New file.
7351         * modules/uniconv/u16-strconv-to-enc-tests: New file.
7352         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
7353
7354         * modules/uniconv/u8-strconv-to-enc: New file.
7355         * lib/uniconv/u8-strconv-to-enc.c: New file.
7356         * modules/uniconv/u8-strconv-to-enc-tests: New file.
7357         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
7358
7359         * modules/uniconv/u32-strconv-from-enc: New file.
7360         * lib/uniconv/u32-strconv-from-enc.c: New file.
7361         * modules/uniconv/u32-strconv-from-enc-tests: New file.
7362         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
7363
7364         * modules/uniconv/u16-strconv-from-enc: New file.
7365         * lib/uniconv/u16-strconv-from-enc.c: New file.
7366         * modules/uniconv/u16-strconv-from-enc-tests: New file.
7367         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
7368
7369         * modules/uniconv/u8-strconv-from-enc: New file.
7370         * lib/uniconv/u8-strconv-from-enc.c: New file.
7371         * lib/uniconv/u-strconv-from-enc.h: New file.
7372         * modules/uniconv/u8-strconv-from-enc-tests: New file.
7373         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
7374
7375         * modules/uniconv/u32-conv-from-enc: New file.
7376         * lib/uniconv/u32-conv-from-enc.c: New file.
7377         * modules/uniconv/u32-conv-from-enc-tests: New file.
7378         * tests/uniconv/test-u32-conv-from-enc.c: New file.
7379
7380         * modules/uniconv/u16-conv-from-enc: New file.
7381         * lib/uniconv/u16-conv-from-enc.c: New file.
7382         * lib/uniconv/u-conv-from-enc.h: New file.
7383         * modules/uniconv/u16-conv-from-enc-tests: New file.
7384         * tests/uniconv/test-u16-conv-from-enc.c: New file.
7385
7386         * modules/uniconv/u8-conv-from-enc: New file.
7387         * lib/uniconv/u8-conv-from-enc.c: New file.
7388         * modules/uniconv/u8-conv-from-enc-tests: New file.
7389         * tests/uniconv/test-u8-conv-from-enc.c: New file.
7390
7391         * modules/uniconv/base: New file.
7392         * lib/uniconv.h: New file.
7393
7394 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7395
7396         * doc/gnulib-tool.texi (Initial import): Update to match current
7397         behavior with strdup module.
7398         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
7399         * lib/memmem.h: Remove; all uses removed.  This is now done
7400         by <string.h>.
7401         * lib/mempcpy.h: Likewise.
7402         * lib/memrchr.h: Likewise.
7403         * lib/stpcpy.h: Likewise.
7404         * lib/stpncpy.h: Likewise.
7405         * lib/strcase.h: Likewise.
7406         * lib/strchrnul.h: Likewise.
7407         * lib/strdup.h: Likewise.
7408         * lib/strndup.h: Likewise.
7409         * lib/strnlen.h: Likewise.
7410         * lib/strpbrk.h: Likewise.
7411         * lib/strsep.h: Likewise.
7412         * lib/strstr.h: Likewise.
7413         * lib/strtok_r.h: Likewise.
7414         * lib/string_.h: New file.
7415         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
7416         Rely on <string.h> instead.
7417         * lib/canon-host.c: Likewise.
7418         * lib/chdir-long.c: Likewise.
7419         * lib/concatpath.c: Likewise.
7420         * lib/exclude.c: Likewise.
7421         * lib/fchdir.c: Likewise.
7422         * lib/getaddrinfo.c: Likewise.
7423         * lib/getcwd.c: Likewise.
7424         * lib/getsubopt.c: Likewise.
7425         * lib/glob.c: Likewise.
7426         * lib/hard-locale.c: Likewise.
7427         * lib/iconvme.c: Likewise.
7428         * lib/javacomp.c: Likewise.
7429         * lib/mempcpy.c: Likewise.
7430         * lib/memrchr.c: Likewise.
7431         * lib/regex_internal.h: Likewise.
7432         * lib/stpncpy.c: Likewise.
7433         * lib/strcasecmp.c: Likewise.
7434         * lib/strchrnul.c: Likewise.
7435         * lib/strdup.c: Likewise.
7436         * lib/striconv.c: Likewise.
7437         * lib/striconveh.c: Likewise.
7438         * lib/striconveha.c: Likewise.
7439         * lib/strncasecmp.c: Likewise.
7440         * lib/strndup.c: Likewise.
7441         * lib/strnlen.c: Likewise.
7442         * lib/strsep.c: Likewise.
7443         * lib/strstr.c: Likewise.
7444         * lib/strtok_r.c: Likewise.
7445         * lib/userspec.c: Likewise.
7446         * lib/w32spawn.h: Likewise.
7447         * lib/xstrndup.c: Likewise.
7448         * lib/mountlist.c (strstr): Remove decl.
7449         * m4/string_h.m4: New file.
7450         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
7451         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
7452         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
7453         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
7454         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
7455         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
7456         Set REPLACE_STRCASECMP if necessary.
7457         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
7458         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
7459         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
7460         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
7461         HAVE_DECL_STRDUP if necessary.
7462         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
7463         since gl_FUNC_STRNDUP does that now.
7464         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
7465         Check for decl here...
7466         (gl_PREREQ_STRNLEN): ... not here.
7467         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
7468         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
7469         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
7470         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
7471         necessary.
7472         * modules/string: New file.
7473         * modules/memmem (Files): Remove special-purpose include file.
7474         (Depends-on): Add string.
7475         (Include): Include <string.h>, not the removed file.
7476         * modules/mempcpy: Likewise.
7477         * modules/memrchr: Likewise.
7478         * modules/stpcpy: Likewise.
7479         * modules/stpncpy: Likewise.
7480         * modules/strcase: Likewise.
7481         * modules/strchrnul: Likewise.
7482         * modules/strdup: Likewise.
7483         * modules/strndup: Likewise.
7484         * modules/strnlen: Likewise.
7485         * modules/strpbrk: Likewise.
7486         * modules/strsep: Likewise.
7487         * modules/strstr: Likewise.
7488         * modules/strtok_r: Likewise.
7489         * tests/test-dirname.c: Don't include "strdup.h", since
7490         <string.h> now suffices.
7491         * tests/test-memmem.c: Don't include "memmem.h", since
7492         <string.h> now suffices.
7493
7494 2007-01-25  Bruno Haible  <bruno@clisp.org>
7495
7496         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
7497         *resultp is 0.
7498
7499         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
7500         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
7501         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
7502         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
7503
7504         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
7505         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
7506         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
7507         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
7508         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
7509         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
7510
7511 2007-01-24  Bruno Haible  <bruno@clisp.org>
7512
7513         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
7514         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
7515         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
7516         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
7517         gl_FUNC_FTS_CORE.
7518         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
7519         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
7520         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
7521         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
7522         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
7523         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
7524         gl_FUNC_FCHOWNAT.
7525         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
7526         gl_FUNC_STRFTIME.
7527         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
7528         Reported by Ralf Wildenhues.
7529
7530 2007-01-24  Bruno Haible  <bruno@clisp.org>
7531
7532         Drop AC_REQUIRE calls that are redundant with the module dependencies.
7533         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
7534         gl_GETADDRINFO.
7535         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
7536         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
7537         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
7538
7539 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
7540
7541         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
7542         Don't use 'exit'; just return from 'main'.
7543         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
7544
7545         * lib/fnmatch_.h: Readjust white space and comments to match
7546         glibc, to avoid spurious diffs.
7547
7548 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7549
7550         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
7551         2004-12-01 change by Jakub Jelinek, since this code won't compile
7552         if !LIBC.  Problem reported by Bob Proulx.
7553
7554 2007-01-23  Bruno Haible  <bruno@clisp.org>
7555
7556         * lib/striconveh.c: Include c-strcaseeq.h.
7557         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
7558         * modules/striconveh (Depends-on): Add c-strcaseeq.
7559
7560 2007-01-23  Bruno Haible  <bruno@clisp.org>
7561
7562         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
7563
7564         * modules/c-strcaseeq: New file.
7565         * lib/c-strcaseeq.h: New file.
7566
7567         * modules/streq: New file.
7568         * lib/streq.h: New file.
7569
7570 2007-01-23  Bruno Haible  <bruno@clisp.org>
7571
7572         * modules/striconveha-tests: New file.
7573         * tests/test-striconveha.c: New file.
7574
7575         * lib/striconveha.h: Include <stdbool.h>.
7576         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
7577         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
7578         (mem_iconveha_notranslit): Renamed from mem_iconveha.
7579         (mem_iconveha): New function.
7580         (str_iconveha_notranslit): Renamed from str_iconveha.
7581         (str_iconveha): New function.
7582         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
7583         c-strcase.
7584
7585 2007-01-23  Bruno Haible  <bruno@clisp.org>
7586
7587         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
7588         encodings without forgiving before trying any encoding with handler.
7589         (str_iconveha): Try all encodings without forgiving before trying any
7590         encoding with handler.
7591
7592 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7593
7594         Import the following changes from libc.
7595
7596         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7597
7598         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
7599
7600         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
7601
7602         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
7603         normal_bracket label.
7604
7605         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
7606
7607         [BZ #361]
7608         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
7609         to normal_bracket after fetching the next character.
7610
7611 2007-01-22  Bruno Haible  <bruno@clisp.org>
7612
7613         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
7614         argument.
7615         * lib/striconveh.c (iconv_carefully_1): New function.
7616         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
7617         argument.
7618         (str_cd_iconveh): Update.
7619         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
7620         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
7621         * tests/test-striconveh.c (MAGIC): New macro.
7622         (new_offsets): New function.
7623         (main): Test call with and without offsets.
7624
7625 2007-01-22  Bruno Haible  <bruno@clisp.org>
7626
7627         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
7628         * modules/sys_select (Makefile.am): Likewise.
7629         * modules/sys_socket (Makefile.am): Likewise.
7630         * modules/sys_time (Makefile.am): Likewise.
7631
7632 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7633
7634         * modules/gettimeofday (License): Change from GPL to LGPL, since
7635         gettimeofday is a library function.
7636
7637 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7638
7639         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
7640
7641 2007-01-21  Bruno Haible  <bruno@clisp.org>
7642
7643         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
7644
7645 2007-01-21  Bruno Haible  <bruno@clisp.org>
7646
7647         * modules/striconveha: New file.
7648         * lib/striconveha.h: New file.
7649         * lib/striconveha.c: New file.
7650         * MODULES.html.sh (Internationalization functions): Add striconveha.
7651         * lib/striconv.c (str_iconv): Optimize the case of an empty input
7652         string.
7653         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
7654
7655 2007-01-21  Bruno Haible  <bruno@clisp.org>
7656
7657         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
7658         * lib/striconveh.c (str_iconveh): Likewise.
7659
7660 2007-01-21  Bruno Haible  <bruno@clisp.org>
7661
7662         * lib/striconveh.h (mem_iconveh): New declaration.
7663         * lib/striconveh.c (mem_iconveh): New function.
7664         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
7665
7666 2007-01-21  Bruno Haible  <bruno@clisp.org>
7667
7668         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
7669
7670         * lib/striconveh.h (mem_cd_iconveh): Change specification.
7671         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
7672         original result buffer.
7673         (str_cd_iconveh): Update.
7674         * tests/test-striconveh.c (main): Update.
7675
7676         * lib/striconv.h (mem_cd_iconv): Change specification.
7677         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
7678         result buffer.
7679         (str_cd_iconv): Update.
7680         * tests/test-striconv.c (main): Update.
7681
7682 2007-01-21  Bruno Haible  <bruno@clisp.org>
7683
7684         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
7685
7686 2007-01-20  Jim Meyering  <jim@meyering.net>
7687
7688         * lib/userspec.c (parse_with_separator): If a user or group string
7689         starts with "+", skip the corresponding name-to-ID look-up, since
7690         such a look-up must fail: user and group names may not include "+".
7691
7692 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
7693
7694         * lib/poll.c: Include sys/time.h and time.h unconditionally,
7695         since we now assume the sys_time module.
7696         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
7697         check for sys/time.h; no longer needed.
7698         * modules/poll (Depends-on): Depend on sys_time.
7699
7700 2007-01-18  Bruno Haible  <bruno@clisp.org>
7701
7702         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
7703         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7704
7705         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
7706         gettimeofday.
7707
7708         * tests/test-gettimeofday.c: Include <time.h>.
7709         (dummy): Remove variable.
7710
7711         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
7712         gl_HEADER_SYS_TIME_H.
7713         (gl_HEADER_SYS_TIME_H): New macro.
7714
7715         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
7716         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7717         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
7718         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
7719         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7720         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
7721         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
7722         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7723         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
7724         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
7725         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7726
7727         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
7728         last change; it caused a compilation error when cross-compiling to
7729         Cygwin.
7730
7731 2007-01-18  Jim Meyering  <jim@meyering.net>
7732
7733         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
7734         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
7735         than the race-prone "test -d sys || mkdir sys".
7736         (configure.ac): Use AC_PROG_MKDIR_P.
7737         * modules/sys_select: Likewise.
7738         * modules/sys_socket: Likewise.
7739         * modules/sys_time: Likewise.
7740
7741 2007-01-18  Eric Blake  <ebb9@byu.net>
7742
7743         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
7744         replace gettimeofday.
7745         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
7746         name, to avoid infinite recursion.
7747
7748 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
7749
7750         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
7751         module sys_time.
7752         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
7753         assume timespec.h defines struct timeval.
7754         * lib/settime.c: Likewise.
7755         * lib/utimens.c: Likewise.
7756         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
7757         since we now assume the gettimeofday module.
7758         * lib/tempname.c (__gen_tempname): Likewise.
7759         * lib/gettimeofday.h: Remove.
7760         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
7761         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
7762         Include <time.h>, for 'time()'.
7763         (localtime_buffer_addr): Also use this workaround if
7764         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
7765         to simplify the uses.  All uses changed.
7766         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
7767         that #undef is inside {}, and 'const' follows type name consistently.
7768         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
7769         (gettimeofday): Do not use the maximum possible value for
7770         tv->tv_usec, since that might break usages other than ls.c.
7771         Instead, we'll leave ls.c alone.  This undoes today's patch
7772         by Bruno.  Add a compile-time warning for 1s-clock resolution;
7773         we've never observed the problem but might as well keep the
7774         canary.
7775         * lib/nanosleep.c: Include timespec.h first, for interface check.
7776         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
7777         now assume the sys_time module.
7778         * lib/tempname.c: Likewise.
7779         * lib/timespec.h: Likewise.
7780         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
7781         needed.
7782         * lib/strftime.c: Likewise.
7783         * lib/timespec.h: Likewise.
7784         * lib/posixtm.c: Include posixtm.h first, for interface check.
7785         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
7786         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
7787         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
7788         * lib/sys_time_.h: New file.
7789         * lib/timespec.h (struct timespec): Use long int, not long.
7790         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7791         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
7792         Remove obsolescent call to AC_HEADER_TIME.
7793         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
7794         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7795         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7796         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
7797         Likewise.
7798         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
7799         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
7800         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
7801         into the sys_time module.  Check for gettimeofday just once.
7802         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
7803         for gettimeofday signature to just check the signature.  Merely
7804         compile it, since linking doesn't test signature.  Improve test for
7805         whether gettimeofday.o is actually needed.
7806         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
7807         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
7808         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
7809         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7810         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
7811         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
7812         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
7813         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
7814         than worrying about sys/time.h.
7815         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7816         Don't bother worrying about TIME_WITH_SYS_TIME.
7817         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
7818         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
7819         * m4/sys_time_h.m4: New file.
7820         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
7821         Don't include sys/time.h.  Return from main rather than exiting.
7822         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
7823         all uses changed.
7824         * modules/gethrxtime (Depends-on): Add sys_time.
7825         * modules/gettime (Depends-on): Likewise.
7826         * modules/gettimeofday (Depends-on): Likewise.
7827         * modules/nanosleep (Depends-on): Likewise.
7828         * modules/settime (Depends-on): Likewise.
7829         * modules/tempname (Depends-on): Likewise.
7830         * modules/utimens (Depends-on): Likewise.
7831         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
7832         (Include:) Change back to <sys/time.h>.
7833         (Maintainer:) Add self.
7834         * modules/sys_time: New file.
7835         * modules/tempname (Depends-on): Add gettimeofday.
7836         * tests/test-gettimeofday.c: Include <sys/time.h>
7837         rather than gettimeofday.h.
7838
7839 2007-01-17  Bruno Haible  <bruno@clisp.org>
7840
7841         * gnulib-tool (func_get_license): Revert last patch. Instead, let
7842         the license default to GPL.
7843         (func_create_testdir): Don't complain if a module is LGPL and its
7844         tests module depends on GPLed modules.
7845
7846 2007-01-17  Bruno Haible  <bruno@clisp.org>
7847
7848         * lib/gettimeofday.c (gettimeofday): Add code for the case
7849         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
7850         maximum possible value for tv->tv_usec, rather than the minimum one.
7851
7852 2005-10-08  Martin Lambers  <marlam@marlam.de>
7853 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7854 2007-01-16  Bruno Haible  <bruno@clisp.org>
7855
7856         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
7857         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
7858         gl_FUNC_GETTIMEOFDAY.
7859         (Include): Add gettimeofday.h.
7860         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
7861         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
7862         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
7863         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
7864         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
7865         * lib/gettimeofday.h: New file.
7866         * lib/gettimeofday.c: Include <sys/timeb.h>.
7867         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
7868         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7869         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
7870         fall back on time().
7871
7872         * tests/test-gettimeofday.c: New file.
7873         * modules/gettimeofday-tests: New file.
7874
7875 2007-01-16  Eric Blake  <ebb9@byu.net>
7876
7877         * modules/fnmatch (Depends-on): Depend on wchar.
7878         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
7879         * m4/fnmatch.m4: Likewise.
7880         * modules/mbchar (Makefile.am): Assume <wchar.h>.
7881         * m4/mbchar.m4: Likewise.
7882         * modules/mbswidth (Depends-on): Depend on wchar.
7883         * lib/mbswidth.c: Assume <wchar.h>.
7884         * m4/mbswidth.m4: Likewise.
7885         * modules/quotearg (Depends-on): Depend on wchar.
7886         * lib/quotearg.c: Assume <wchar.h>.
7887         * m4/quotearg.m4: Likewise.
7888         * modules/regex (Depends-on): Depend on wchar.
7889         * lib/regex_internal.h: Assume <wchar.h>.
7890         * m4/regex.m4: Likewise.
7891         * modules/stdint (Depends-on): Depend on wchar.
7892         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
7893         * m4/stdint.m4: Likewise.
7894         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
7895         * modules/strftime (Depends-on): Depend on wchar.
7896         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
7897         * modules/strtol (Depends-on): Depend on wchar.
7898         * lib/strtol.c: Assume <wchar.h>.
7899         * modules/wcwidth (Depends-on): Depend on wchar.
7900         * lib/wcwidth.h: Assume <wchar.h>.
7901         * m4/wcwidth.m4: Likewise.
7902
7903 2007-01-16  Bruno Haible  <bruno@clisp.org>
7904
7905         * modules/csharpexec-script: New, created from...
7906         * modules/csharpexec: ... this.
7907
7908 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
7909
7910         * modules/javaexec-script: New, created from...
7911         * modules/javaexec: ... this.
7912
7913 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7914
7915         * modules/poll (Dependencies): Add sys_select.
7916
7917 2007-01-15  Jim Meyering  <jim@meyering.net>
7918
7919         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
7920         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
7921         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
7922         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
7923
7924 2007-01-15  Bruno Haible  <bruno@clisp.org>
7925
7926         * modules/striconveh: New file.
7927         * lib/striconveh.h: New file.
7928         * lib/striconveh.c: New file.
7929         * MODULES.html.sh (Internationalization functions): Add striconveh.
7930
7931         * modules/striconveh-tests: New file.
7932         * tests/test-striconveh.c: New file.
7933
7934 2007-01-15  Bruno Haible  <bruno@clisp.org>
7935
7936         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
7937         not from GNU libiconv or GNU libc.
7938
7939 2007-01-15  Bruno Haible  <bruno@clisp.org>
7940
7941         * doc/gnulib-intro.texi (Copyright): Explain the different license
7942         terms for module descriptions, autoconf macros, tests, documentation.
7943
7944 2007-01-14  Bruno Haible  <bruno@clisp.org>
7945
7946         * modules/striconv-tests: New file.
7947         * tests/test-striconv.c: New file.
7948
7949 2007-01-14  Bruno Haible  <bruno@clisp.org>
7950
7951         * modules/iconv-tests: New file.
7952         * tests/test-iconv.c: New file.
7953
7954 2007-01-14  Bruno Haible  <bruno@clisp.org>
7955
7956         * gnulib-tool (func_get_license): For test modules, use the license of
7957         the main module.
7958
7959 2007-01-14  Bruno Haible  <bruno@clisp.org>
7960
7961         * modules/iconv (Include): Clarify that <iconv.h> can only be included
7962         if iconv is found to exist.
7963
7964 2007-01-14  Bruno Haible  <bruno@clisp.org>
7965
7966         * modules/c-ctype-tests: New file.
7967         * tests/test-c-ctype.c: New file.
7968
7969 2007-01-14  Bruno Haible  <bruno@clisp.org>
7970
7971         * modules/binary-io-tests: New file.
7972         * tests/test-binary-io.sh: New file.
7973         * tests/test-binary-io.c: New file.
7974
7975 2007-01-14  Bruno Haible  <bruno@clisp.org>
7976
7977         * modules/array-oset-tests: New file.
7978         * tests/test-array_oset.c: New file.
7979
7980 2007-01-14  Bruno Haible  <bruno@clisp.org>
7981
7982         * modules/array-list-tests: New file.
7983         * tests/test-array_list.c: New file.
7984
7985 2007-01-14  Bruno Haible  <bruno@clisp.org>
7986
7987         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
7988         and make.
7989         Reported by Simon Josefsson in
7990         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
7991
7992 2007-01-14  Bruno Haible  <bruno@clisp.org>
7993
7994         * modules/allocsa-tests: New file.
7995         * tests/test-allocsa.c: New file.
7996
7997 2007-01-14  Bruno Haible  <bruno@clisp.org>
7998
7999         * modules/fchdir (Depends-on): Add absolute-header.
8000         * modules/unistd (Depends-on): Likewise.
8001
8002 2006-12-30  Bruno Haible  <bruno@clisp.org>
8003
8004         * modules/fchdir: New file.
8005         * modules/unistd (Files): Add lib/unistd_.h.
8006         (Makefile.am): Generate unistd.h from unistd_.h.
8007         * lib/fchdir.c: New file.
8008         * lib/dirent_.h: New file.
8009         * lib/unistd_.h: New file.
8010         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
8011         * m4/fchdir.m4: New file.
8012         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
8013         (gl_HEADER_UNISTD): Invoke it.
8014         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
8015         function.
8016         * lib/backupfile.c (opendir, closedir): Undefine.
8017         * lib/chown.c (open, close): Undefine.
8018         * lib/clean-temp.c (open, close): Undefine.
8019         * lib/copy-file.c (open, close): Undefine.
8020         * lib/execute.c (open, close): Undefine.
8021         * lib/fsusage.c (open, close): Undefine.
8022         * lib/gc-gnulib.c (open, close): Undefine.
8023         * lib/getcwd.c (opendir, closedir): Undefine.
8024         * lib/glob.c (opendir, closedir): Undefine.
8025         * lib/javacomp.c (open, close): Undefine.
8026         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
8027         * lib/openat-proc.c (open, close): Undefine.
8028         * lib/pagealign_alloc.c (open, close): Undefine.
8029         * lib/pipe.c (open, close): Undefine.
8030         * lib/progreloc.c (open, close): Undefine.
8031         * lib/savedir.c (opendir, closedir): Undefine.
8032         * lib/utime.c (open, close): Undefine.
8033         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
8034
8035 2007-01-10  Bruno Haible  <bruno@clisp.org>
8036
8037         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
8038
8039 2007-01-12  Eric Blake  <ebb9@byu.net>
8040
8041         Provide a robust <wchar.h>.  Further simplifications are now
8042         possible in other modules, but not included here.
8043         * modules/wchar: New module.
8044         * m4/wchar.m4: New file.
8045         * lib/wchar_.h: Likewise.
8046         * modules/mbchar (Depends-on): Depend on wchar, as the first use
8047         of the new module.
8048         * MODULES.html.sh (Extended multibyte and wide character utilities):
8049         New section.
8050
8051 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
8052
8053         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
8054         to a reasonable default for memory allocation.
8055         (xreadlink): Don't allocate a huge buffer, to work around a buggy
8056         file system that reports garbage st_size values for symlinks.
8057         Problem reported by Liyang Hu.
8058
8059 2007-01-11  Simon Josefsson  <simon@josefsson.org>
8060
8061         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
8062         Emacs .#* auto-save files).
8063
8064 2007-01-11  Bruno Haible  <bruno@clisp.org>
8065
8066         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
8067         directory.
8068
8069 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8070
8071         Use @...@ consistently in lib/wctype_.h.
8072         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
8073         on it being set to 1 or 0.
8074         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
8075         go back to AC_SUBSTing it.
8076         * modules/wctype (Makefile.am): Undo previous change.
8077
8078 2007-01-10  Eric Blake  <ebb9@byu.net>
8079
8080         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
8081         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
8082         * modules/wctype (Makefile.am): Likewise.
8083         Reported by Chris McGuire.
8084
8085 2007-01-10  Jim Meyering  <jim@meyering.net>
8086
8087         fts.c: a small readability/maintainability improvement
8088         * lib/fts.c (fts_read): Make this code slightly more readable and
8089         maintainable by hoisting the "sp->fts_cur = p" assignments to
8090         immediately follow the statements that set P.  Derived from
8091         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
8092
8093 2007-01-10  Eric Blake  <ebb9@byu.net>
8094
8095         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
8096         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
8097         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8098         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
8099         Reported by Chris McGuire.
8100
8101 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8102
8103         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
8104         in sed script.
8105
8106 2007-01-09  Bruno Haible  <bruno@clisp.org>
8107
8108         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
8109         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
8110         variables.
8111         (func_module): Use them.
8112
8113 2007-01-09  Bruno Haible  <bruno@clisp.org>
8114
8115         * modules/unistr/base: New file.
8116         * lib/unistr.h: New file.
8117
8118         * modules/unistr/u8-to-u16: New file.
8119         * lib/unistr/u8-to-u16.c: New file.
8120
8121         * modules/unistr/u8-to-u32: New file.
8122         * lib/unistr/u8-to-u32.c: New file.
8123
8124         * modules/unistr/u16-to-u8: New file.
8125         * lib/unistr/u16-to-u8.c: New file.
8126
8127         * modules/unistr/u16-to-u32: New file.
8128         * lib/unistr/u16-to-u32.c: New file.
8129
8130         * modules/unistr/u32-to-u8: New file.
8131         * lib/unistr/u32-to-u8.c: New file.
8132
8133         * modules/unistr/u32-to-u16: New file.
8134         * lib/unistr/u32-to-u16.c: New file.
8135
8136         * modules/unistr/u8-check: New file.
8137         * modules/unistr/u16-check: New file.
8138         * modules/unistr/u32-check: New file.
8139         * lib/unistr/u8-check.c: New file.
8140         * lib/unistr/u16-check.c: New file.
8141         * lib/unistr/u32-check.c: New file.
8142
8143         * modules/unistr/u8-chr: New file.
8144         * modules/unistr/u16-chr: New file.
8145         * modules/unistr/u32-chr: New file.
8146         * lib/unistr/u8-chr.c: New file.
8147         * lib/unistr/u16-chr.c: New file.
8148         * lib/unistr/u32-chr.c: New file.
8149
8150         * modules/unistr/u8-cmp: New file.
8151         * modules/unistr/u16-cmp: New file.
8152         * modules/unistr/u32-cmp: New file.
8153         * lib/unistr/u8-cmp.c: New file.
8154         * lib/unistr/u16-cmp.c: New file.
8155         * lib/unistr/u32-cmp.c: New file.
8156
8157         * modules/unistr/u8-cpy: New file.
8158         * modules/unistr/u16-cpy: New file.
8159         * modules/unistr/u32-cpy: New file.
8160         * lib/unistr/u8-cpy.c: New file.
8161         * lib/unistr/u16-cpy.c: New file.
8162         * lib/unistr/u32-cpy.c: New file.
8163         * lib/unistr/u-cpy.h: New file.
8164
8165         * modules/unistr/u8-cpy-alloc: New file.
8166         * modules/unistr/u16-cpy-alloc: New file.
8167         * modules/unistr/u32-cpy-alloc: New file.
8168         * lib/unistr/u8-cpy-alloc.c: New file.
8169         * lib/unistr/u16-cpy-alloc.c: New file.
8170         * lib/unistr/u32-cpy-alloc.c: New file.
8171         * lib/unistr/u-cpy-alloc.h: New file.
8172
8173         * modules/unistr/u8-endswith: New file.
8174         * modules/unistr/u16-endswith: New file.
8175         * modules/unistr/u32-endswith: New file.
8176         * lib/unistr/u8-endswith.c: New file.
8177         * lib/unistr/u16-endswith.c: New file.
8178         * lib/unistr/u32-endswith.c: New file.
8179         * lib/unistr/u-endswith.h: New file.
8180
8181         * modules/unistr/u8-mblen: New file.
8182         * modules/unistr/u16-mblen: New file.
8183         * modules/unistr/u32-mblen: New file.
8184         * lib/unistr/u8-mblen.c: New file.
8185         * lib/unistr/u16-mblen.c: New file.
8186         * lib/unistr/u32-mblen.c: New file.
8187
8188         * modules/unistr/u8-mbtouc: New file.
8189         * modules/unistr/u16-mbtouc: New file.
8190         * modules/unistr/u32-mbtouc: New file.
8191         * lib/unistr/u8-mbtouc.c: New file.
8192         * lib/unistr/u16-mbtouc.c: New file.
8193         * lib/unistr/u32-mbtouc.c: New file.
8194
8195         * modules/unistr/u8-mbtouc-safe: New file.
8196         * modules/unistr/u16-mbtouc-safe: New file.
8197         * modules/unistr/u32-mbtouc-safe: New file.
8198         * lib/unistr/u8-mbtouc-safe.c: New file.
8199         * lib/unistr/u16-mbtouc-safe.c: New file.
8200         * lib/unistr/u32-mbtouc-safe.c: New file.
8201
8202         * modules/unistr/u8-move: New file.
8203         * modules/unistr/u16-move: New file.
8204         * modules/unistr/u32-move: New file.
8205         * lib/unistr/u8-move.c: New file.
8206         * lib/unistr/u16-move.c: New file.
8207         * lib/unistr/u32-move.c: New file.
8208         * lib/unistr/u-move.h: New file.
8209
8210         * modules/unistr/u8-next: New file.
8211         * modules/unistr/u16-next: New file.
8212         * modules/unistr/u32-next: New file.
8213         * lib/unistr/u8-next.c: New file.
8214         * lib/unistr/u16-next.c: New file.
8215         * lib/unistr/u32-next.c: New file.
8216
8217         * modules/unistr/u8-prev: New file.
8218         * modules/unistr/u16-prev: New file.
8219         * modules/unistr/u32-prev: New file.
8220         * lib/unistr/u8-prev.c: New file.
8221         * lib/unistr/u16-prev.c: New file.
8222         * lib/unistr/u32-prev.c: New file.
8223
8224         * modules/unistr/u8-set: New file.
8225         * modules/unistr/u16-set: New file.
8226         * modules/unistr/u32-set: New file.
8227         * lib/unistr/u8-set.c: New file.
8228         * lib/unistr/u16-set.c: New file.
8229         * lib/unistr/u32-set.c: New file.
8230         * lib/unistr/u-set.h: New file.
8231
8232         * modules/unistr/u8-startswith: New file.
8233         * modules/unistr/u16-startswith: New file.
8234         * modules/unistr/u32-startswith: New file.
8235         * lib/unistr/u8-startswith.c: New file.
8236         * lib/unistr/u16-startswith.c: New file.
8237         * lib/unistr/u32-startswith.c: New file.
8238         * lib/unistr/u-startswith.h: New file.
8239
8240         * modules/unistr/u8-stpcpy: New file.
8241         * modules/unistr/u16-stpcpy: New file.
8242         * modules/unistr/u32-stpcpy: New file.
8243         * lib/unistr/u8-stpcpy.c: New file.
8244         * lib/unistr/u16-stpcpy.c: New file.
8245         * lib/unistr/u32-stpcpy.c: New file.
8246         * lib/unistr/u-stpcpy.h: New file.
8247
8248         * modules/unistr/u8-stpncpy: New file.
8249         * modules/unistr/u16-stpncpy: New file.
8250         * modules/unistr/u32-stpncpy: New file.
8251         * lib/unistr/u8-stpncpy.c: New file.
8252         * lib/unistr/u16-stpncpy.c: New file.
8253         * lib/unistr/u32-stpncpy.c: New file.
8254         * lib/unistr/u-stpncpy.h: New file.
8255
8256         * modules/unistr/u8-strcat: New file.
8257         * modules/unistr/u16-strcat: New file.
8258         * modules/unistr/u32-strcat: New file.
8259         * lib/unistr/u8-strcat.c: New file.
8260         * lib/unistr/u16-strcat.c: New file.
8261         * lib/unistr/u32-strcat.c: New file.
8262         * lib/unistr/u-strcat.h: New file.
8263
8264         * modules/unistr/u8-strchr: New file.
8265         * modules/unistr/u16-strchr: New file.
8266         * modules/unistr/u32-strchr: New file.
8267         * lib/unistr/u8-strchr.c: New file.
8268         * lib/unistr/u16-strchr.c: New file.
8269         * lib/unistr/u32-strchr.c: New file.
8270
8271         * modules/unistr/u8-strcmp: New file.
8272         * modules/unistr/u16-strcmp: New file.
8273         * modules/unistr/u32-strcmp: New file.
8274         * lib/unistr/u8-strcmp.c: New file.
8275         * lib/unistr/u16-strcmp.c: New file.
8276         * lib/unistr/u32-strcmp.c: New file.
8277
8278         * modules/unistr/u8-strcpy: New file.
8279         * modules/unistr/u16-strcpy: New file.
8280         * modules/unistr/u32-strcpy: New file.
8281         * lib/unistr/u8-strcpy.c: New file.
8282         * lib/unistr/u16-strcpy.c: New file.
8283         * lib/unistr/u32-strcpy.c: New file.
8284         * lib/unistr/u-strcpy.h: New file.
8285
8286         * modules/unistr/u8-strcspn: New file.
8287         * modules/unistr/u16-strcspn: New file.
8288         * modules/unistr/u32-strcspn: New file.
8289         * lib/unistr/u8-strcspn.c: New file.
8290         * lib/unistr/u16-strcspn.c: New file.
8291         * lib/unistr/u32-strcspn.c: New file.
8292         * lib/unistr/u-strcspn.h: New file.
8293
8294         * modules/unistr/u8-strdup: New file.
8295         * modules/unistr/u16-strdup: New file.
8296         * modules/unistr/u32-strdup: New file.
8297         * lib/unistr/u8-strdup.c: New file.
8298         * lib/unistr/u16-strdup.c: New file.
8299         * lib/unistr/u32-strdup.c: New file.
8300         * lib/unistr/u-strdup.h: New file.
8301
8302         * modules/unistr/u8-strlen: New file.
8303         * modules/unistr/u16-strlen: New file.
8304         * modules/unistr/u32-strlen: New file.
8305         * lib/unistr/u8-strlen.c: New file.
8306         * lib/unistr/u16-strlen.c: New file.
8307         * lib/unistr/u32-strlen.c: New file.
8308         * lib/unistr/u-strlen.h: New file.
8309
8310         * modules/unistr/u8-strmblen: New file.
8311         * modules/unistr/u16-strmblen: New file.
8312         * modules/unistr/u32-strmblen: New file.
8313         * lib/unistr/u8-strmblen.c: New file.
8314         * lib/unistr/u16-strmblen.c: New file.
8315         * lib/unistr/u32-strmblen.c: New file.
8316
8317         * modules/unistr/u8-strmbtouc: New file.
8318         * modules/unistr/u16-strmbtouc: New file.
8319         * modules/unistr/u32-strmbtouc: New file.
8320         * lib/unistr/u8-strmbtouc.c: New file.
8321         * lib/unistr/u16-strmbtouc.c: New file.
8322         * lib/unistr/u32-strmbtouc.c: New file.
8323
8324         * modules/unistr/u8-strncat: New file.
8325         * modules/unistr/u16-strncat: New file.
8326         * modules/unistr/u32-strncat: New file.
8327         * lib/unistr/u8-strncat.c: New file.
8328         * lib/unistr/u16-strncat.c: New file.
8329         * lib/unistr/u32-strncat.c: New file.
8330         * lib/unistr/u-strncat.h: New file.
8331
8332         * modules/unistr/u8-strncmp: New file.
8333         * modules/unistr/u16-strncmp: New file.
8334         * modules/unistr/u32-strncmp: New file.
8335         * lib/unistr/u8-strncmp.c: New file.
8336         * lib/unistr/u16-strncmp.c: New file.
8337         * lib/unistr/u32-strncmp.c: New file.
8338
8339         * modules/unistr/u8-strncpy: New file.
8340         * modules/unistr/u16-strncpy: New file.
8341         * modules/unistr/u32-strncpy: New file.
8342         * lib/unistr/u8-strncpy.c: New file.
8343         * lib/unistr/u16-strncpy.c: New file.
8344         * lib/unistr/u32-strncpy.c: New file.
8345         * lib/unistr/u-strncpy.h: New file.
8346
8347         * modules/unistr/u8-strnlen: New file.
8348         * modules/unistr/u16-strnlen: New file.
8349         * modules/unistr/u32-strnlen: New file.
8350         * lib/unistr/u8-strnlen.c: New file.
8351         * lib/unistr/u16-strnlen.c: New file.
8352         * lib/unistr/u32-strnlen.c: New file.
8353         * lib/unistr/u-strnlen.h: New file.
8354
8355         * modules/unistr/u8-strpbrk: New file.
8356         * modules/unistr/u16-strpbrk: New file.
8357         * modules/unistr/u32-strpbrk: New file.
8358         * lib/unistr/u8-strpbrk.c: New file.
8359         * lib/unistr/u16-strpbrk.c: New file.
8360         * lib/unistr/u32-strpbrk.c: New file.
8361         * lib/unistr/u-strpbrk.h: New file.
8362
8363         * modules/unistr/u8-strrchr: New file.
8364         * modules/unistr/u16-strrchr: New file.
8365         * modules/unistr/u32-strrchr: New file.
8366         * lib/unistr/u8-strrchr.c: New file.
8367         * lib/unistr/u16-strrchr.c: New file.
8368         * lib/unistr/u32-strrchr.c: New file.
8369
8370         * modules/unistr/u8-strspn: New file.
8371         * modules/unistr/u16-strspn: New file.
8372         * modules/unistr/u32-strspn: New file.
8373         * lib/unistr/u8-strspn.c: New file.
8374         * lib/unistr/u16-strspn.c: New file.
8375         * lib/unistr/u32-strspn.c: New file.
8376         * lib/unistr/u-strspn.h: New file.
8377
8378         * modules/unistr/u8-strstr: New file.
8379         * modules/unistr/u16-strstr: New file.
8380         * modules/unistr/u32-strstr: New file.
8381         * lib/unistr/u8-strstr.c: New file.
8382         * lib/unistr/u16-strstr.c: New file.
8383         * lib/unistr/u32-strstr.c: New file.
8384         * lib/unistr/u-strstr.h: New file.
8385
8386         * modules/unistr/u8-strtok: New file.
8387         * modules/unistr/u16-strtok: New file.
8388         * modules/unistr/u32-strtok: New file.
8389         * lib/unistr/u8-strtok.c: New file.
8390         * lib/unistr/u16-strtok.c: New file.
8391         * lib/unistr/u32-strtok.c: New file.
8392         * lib/unistr/u-strtok.h: New file.
8393
8394         * modules/unistr/u8-uctomb: New file.
8395         * modules/unistr/u16-uctomb: New file.
8396         * modules/unistr/u32-uctomb: New file.
8397         * lib/unistr/u8-uctomb.c: New file.
8398         * lib/unistr/u16-uctomb.c: New file.
8399         * lib/unistr/u32-uctomb.c: New file.
8400
8401         * MODULES.html.sh (Unicode string functions): Add the new modules.
8402
8403 2007-01-08  Bruno Haible  <bruno@clisp.org>
8404
8405         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
8406         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
8407         subdirectories.
8408
8409 2007-01-08  Karl Berry  <karl@gnu.org>
8410
8411         * doc/error.texi: mention that main() fns must set program_name
8412         when progname is used.
8413
8414 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
8415
8416         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
8417         WCTYPE_H is empty, for the benefit of builds from non-distclean
8418         directories.  Problem reported by Eric Blake in
8419         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
8420
8421 2007-01-08  Bruno Haible  <bruno@clisp.org>
8422
8423         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
8424         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
8425         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
8426         PROVIDE_CANONICALIZE_FILENAME_MODE.
8427         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
8428
8429 2007-01-08  Bruno Haible  <bruno@clisp.org>
8430
8431         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
8432         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
8433         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
8434         * lib/fts.c: Likewise.
8435         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
8436
8437 2006-12-25  Bruno Haible  <bruno@clisp.org>
8438
8439         * modules/utf8-ucs4-safe: New file.
8440         * lib/utf8-ucs4-safe.h: New file.
8441         * lib/unistr/utf8-ucs4-safe.c: New file.
8442
8443         * modules/utf16-ucs4-safe: New file.
8444         * lib/utf16-ucs4-safe.h: New file.
8445         * lib/unistr/utf16-ucs4-safe.c: New file.
8446
8447         * MODULES.html.sh (Unicode string functions): Add the new modules.
8448
8449 2007-01-08  Bruno Haible  <bruno@clisp.org>
8450
8451         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
8452         (Depends-on): Add unitypes.
8453         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8454         (u8_mbtouc_aux): Move out to separate file.
8455         (u8_mbtouc): Use ucs4_t, uint8_t types.
8456         * lib/unistr/utf8-ucs4.c: New file.
8457
8458         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
8459         (Depends-on): Add unitypes.
8460         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8461         (u16_mbtouc_aux): Move out to separate file.
8462         (u16_mbtouc): Use ucs4_t, uint16_t types.
8463         * lib/unistr/utf16-ucs4.c: New file.
8464
8465         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
8466         (Depends-on): Add unitypes.
8467         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
8468         (u8_uctomb_aux): Move out to separate file.
8469         (u8_uctomb): Use ucs4_t, uint8_t types.
8470         * lib/unistr/ucs4-utf8.c: New file.
8471
8472         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
8473         (Depends-on): Add unitypes.
8474         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
8475         (u16_uctomb_aux): Move out to separate file.
8476         (u16_uctomb): Use ucs4_t, uint16_t types.
8477         * lib/unistr/ucs4-utf16.c: New file.
8478
8479 2006-12-25  Bruno Haible  <bruno@clisp.org>
8480
8481         * modules/unitypes: New file.
8482         * lib/unitypes.h: New file.
8483         * MODULES.html.sh (func_all_modules): New section "Unicode string
8484         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
8485         this section. Add unitypes.
8486
8487 2007-01-08  Bruno Haible  <bruno@clisp.org>
8488
8489         Avoid variable names that conflict with those from libtool.
8490         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
8491         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
8492         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
8493         library_names_spec to acl_library_names_spec, hardcode_* to
8494         acl_hardcode_*.
8495         Reported by Ralf Wildenhues.
8496
8497 2007-01-08  Bruno Haible  <bruno@clisp.org>
8498
8499         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
8500         definition.
8501         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
8502         definition.
8503         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
8504         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
8505         definition.
8506         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
8507         definition.
8508         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
8509         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
8510         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
8511         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
8512         definition.
8513         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
8514         definition.
8515         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
8516         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
8517         GC_USE_<algorithm>.
8518         * lib/gc-libgcrypt.c: Likewise.
8519         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
8520         * modules/gc-arctwo (configure.ac): Likewise.
8521         * modules/gc-des (configure.ac): Likewise.
8522         * modules/gc-hmac-md5 (configure.ac): Likewise.
8523         * modules/gc-hmac-sha1 (configure.ac): Likewise.
8524         * modules/gc-md2 (configure.ac): Likewise.
8525         * modules/gc-md4 (configure.ac): Likewise.
8526         * modules/gc-md5 (configure.ac): Likewise.
8527         * modules/gc-random (configure.ac): Likewise.
8528         * modules/gc-rijndael (configure.ac): Likewise.
8529         * modules/gc-sha1 (configure.ac): Likewise.
8530
8531 2007-01-08  Bruno Haible  <bruno@clisp.org>
8532
8533         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
8534         macro definition.
8535         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
8536         definition.
8537         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
8538         definition.
8539         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
8540         * modules/fcntl-safer (configure.ac): Likewise.
8541         * modules/fopen-safer (configure.ac): Likewise.
8542         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
8543         GNULIB_FWRITEERROR macro definition.
8544
8545 2007-01-08  Bruno Haible  <bruno@clisp.org>
8546
8547         * m4/gnulib-common.m4: New file.
8548         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
8549         (func_get_filelist): Add m4/gnulib-common.m4.
8550
8551 2007-01-08  Bruno Haible  <bruno@clisp.org>
8552
8553         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
8554         command.
8555
8556 2007-01-08  Jim Meyering  <jim@meyering.net>
8557
8558         Use a more robust test for a "can't happen" condition.
8559         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
8560         narrowed the st_size value.  Presuming the "can't happen" condition
8561         is true, that narrowing could conceivably convert an invalid st_size
8562         value into a valid one.  Instead, use a change based on Matthew
8563         Woehlke's original patch.
8564
8565         Slight readability improvement: use an assert-like macro
8566         in place of literal "abort ()" uses.
8567         * lib/fts.c (fts_assert): Define.
8568         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
8569         Use this macro instead of a bare 'abort'.
8570
8571 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
8572
8573         Don't worry about using IRIX 5.3's wctype.h broken definitions;
8574         simply work around them.
8575         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
8576         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
8577         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
8578         declaring.
8579         Don't bother to define as macros, since the standard doesn't require it.
8580         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
8581         longer worry about IRIX 5.3.
8582         (HAVE_WCTYPE_CTMP_BUG): Remove.
8583
8584 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8585
8586         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
8587         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
8588         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
8589         Problems reported by Georg Schwarz for IRIX 5.3.
8590
8591         * gnulib-tool (autoconf_minversion): Take the maximum version number
8592         found, not the minimum.  Problem reported by James Youngman.
8593
8594 2007-01-03  Karl Berry  <karl@gnu.org>
8595
8596         * doc/error.texi: new file, explaining interaction with progname.
8597         * doc/gnulib.texi: include it.  Update copyright.
8598
8599 2007-01-03  Simon Josefsson  <simon@josefsson.org>
8600
8601         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
8602         AC_CANONICAL_HOST, to improve autobuild outputs.
8603
8604 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
8605             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
8606
8607         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
8608         sockets, server sockets, and other file descriptors.  Count errors
8609         to compute the return value.  Reorder the code a bit to be easier
8610         to follow.  Don't set event bits that were not requested (except
8611         POLLERR and POLLHUP).
8612
8613 2007-01-01  Bruno Haible  <bruno@clisp.org>
8614
8615         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
8616
8617 2007-01-03  Jim Meyering  <jim@meyering.net>
8618
8619         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
8620
8621 2007-01-02  Bruno Haible  <bruno@clisp.org>
8622
8623         * modules/settime (Include): Require timespec.h.
8624         * modules/nanosleep (Include): Likewise.
8625
8626 2007-01-01  Bruno Haible  <bruno@clisp.org>
8627
8628         * gnulib-tool (func_emit_copyright_notice): Bump year.
8629         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
8630
8631 2007-01-01  Bruno Haible  <bruno@clisp.org>
8632
8633         Improve support for OpenBSD.
8634         * build-aux/config.rpath (libname_spec): Export.
8635         (library_names_spec): New variable. Export.
8636         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
8637         library_names_spec from the config.rpath output. Locate shared library
8638         through the name pattern in library_names_spec.
8639
8640 2007-01-01  Eric Blake  <ebb9@byu.net>
8641
8642         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
8643
8644 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
8645
8646         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
8647         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
8648         assume the C locale, and avoid an "eval" that could cause trouble.
8649         Problem with SORT reported by Bob Proulx.
8650
8651         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
8652         Define.  Trivial patch from Henning Nielsen Lund, originally
8653         sent to bug-grep@gnu.org today.
8654
8655 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
8656
8657         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
8658         struct stat.  Problem reported by Henning Nielsen Lund.
8659         * lib/acl.c: Include acl.h first, to check interface.  Don't
8660         bother to include sys/types.h and sys/stat.h again.
8661
8662 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
8663
8664         Import the following change from libc; problem reported by
8665         Sven Verdoolaege.
8666
8667         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
8668
8669         [BZ #1373]
8670         * lib/argp.h: Remove __NTH for __argp_usage inline function.
8671
8672 2006-12-28  Jim Meyering  <jim@meyering.net>
8673
8674         * build-aux/announce-gen: Do not assume that the package
8675         builds any of tar.gz, tar.bz2, and .xdelta files.
8676         Suggestion from Simon Josefsson.
8677
8678 2006-12-28  Simon Josefsson  <simon@josefsson.org>
8679
8680         * modules/announce-gen: New file.
8681
8682 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
8683
8684         * lib/mbchar.h: Just include <wctype.h>; the wctype module
8685         handles its gotchas now.
8686         * lib/mbswidth.c: Likewise.
8687         * lib/wcwidth.h: Likewise.
8688         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
8689         and iswcntrl; the wctype module does this stuff now.
8690         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
8691         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8692         * modules/mbchar (Depends-on): Add wctype.
8693         * modules/mbswidth (Depends-on): Likewise.
8694         * modules/wcwidth (Depends-on): Likewise.
8695
8696 2006-12-27  Eric Blake  <ebb9@byu.net>
8697
8698         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
8699         module uses more than what <wctype.h> is required to provide.
8700
8701 2006-12-26  Eric Blake  <ebb9@byu.net>
8702
8703         * gnulib-tool (sed_extract_prog): Avoid space-tab.
8704
8705 2006-12-26  Eric Blake  <ebb9@byu.net>
8706
8707         * modules/absolute-header: New module.
8708         * modules/fcntl (Depends-on): Depend on it.
8709         * modules/inttypes (Depends-on): Likewise.
8710         * modules/stdint (Depends-on): Likewise.
8711         * modules/sys_stat (Depends-on): Likewise.
8712         * modules/wctype (Depends-on): Likewise.
8713         * MODULES.html.sh (Support for building libraries and
8714         executables): Document it.
8715
8716 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
8717
8718         * gnulib-tool (SED): Remove, undoing previous change.
8719         The problem was that it broke coreutils on Solaris, because
8720         "sed --posix" leaked into a makefile.
8721         (sed): New alias, if 'alias' and GNU sed.
8722
8723 2006-12-24  Jim Meyering  <jim@meyering.net>
8724
8725         Work around an fchownat bug in glibc-2.4:
8726         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
8727         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
8728         in spite of the -P option.
8729         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
8730         New macros.
8731         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
8732         * modules/openat (Files): Add lib/fchownat.c.
8733         * lib/openat.c (fchownat): Don't define here.  Move to...
8734         * lib/fchownat.c: ...this new file.
8735
8736 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
8737
8738         Fix bug reported by Bruno Haible in
8739         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
8740         where quotearg.c didn't compile on Mac OS X 10.2 because it
8741         lacks <wchar.h> and wint_t.
8742         * lib/wctype_.h (__wctype_wint_t): New type.
8743         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
8744         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
8745         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
8746         Arg is now of type __wctype_wint_t, not wint_t.
8747         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
8748         substitute HAVE_WINT_T.
8749         * modules/wctype (Files): Add m4/wint_t.m4.
8750         (wctype.h): Substitute HAVE_WINT_T.
8751
8752 2006-12-23  Bruno Haible  <bruno@clisp.org>
8753
8754         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
8755
8756 2006-12-23  Bruno Haible  <bruno@clisp.org>
8757
8758         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
8759         S_ISLNK.
8760         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
8761         mingw.
8762
8763 2006-12-22  Bruno Haible  <bruno@clisp.org>
8764
8765         * lib/copy-file.c: Include acl.h.
8766         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
8767         Close the file descriptors only after being done with copy_acl.
8768         * modules/copy-file (Depends-on): Add acl.
8769
8770 2006-12-22  Bruno Haible  <bruno@clisp.org>
8771
8772         * gnulib-tool (SED): New variable.
8773         Use $SED instead of sed everywhere.
8774
8775 2006-12-22  Bruno Haible  <bruno@clisp.org>
8776
8777         * modules/no-c++: New file.
8778         * m4/no-c++.m4: New file.
8779         * MODULES.html.sh (Support for building libraries and executables):
8780         Add no-c++.
8781
8782 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
8783
8784         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8785         Include <limits.h>, and use its INT_MAX to rewrite the
8786         j loop so that it does not overflow 'int'.  Problem reported by
8787         Ralf Wildenhues in
8788         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
8789         Play it safe by shifting left by 1 rather than multiplying by 2,
8790         as GCC is less likely to optimize this away when the value
8791         is signed (when it assumes overflow leads to undefined behavior).
8792         Also, don't assume time_t uses two's complement.
8793
8794 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
8795
8796         * MODULES.html.sh: New module wctype.
8797         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
8798         * lib/fnmatch.c: Don't bother to include <wchar.h> before
8799         <wctype.h>, since the new wctype module should fix this.
8800         * lib/quotearg.c: Include <wctype.h> unconditionally, since
8801         the wctype module should arrange for it.
8802         * lib/regex_internal.h: Likewise.
8803         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
8804         since the wctype module should handle this now.
8805         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
8806         * modules/fnmatch (Depends-on): Add wctype.
8807         * modules/quotearg (Depends-on): Likewise.
8808         * modules/regex (Depends-on): Likewise.
8809
8810 2006-12-19  Bruno Haible  <bruno@clisp.org>
8811
8812         * lib/strdup.h [C++]: Wrap definitions in extern "C".
8813         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
8814
8815 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8816
8817         * modules/savewd (Depends-on): Fix dependency on fcntl.
8818
8819 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8820
8821         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
8822         conforms to C99, rather than relying on the user's environment
8823         setting of STDINT_H.
8824
8825 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8826         and Eric Blake  <ebb9@byu.net>
8827
8828         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
8829         This is more consistent with the other defines here.
8830         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
8831         Port to z/OS.  Problem reported by Paul Gilmartin.
8832         Change local vars to use gl_ prefix rather than ac_.
8833         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
8834         with other defines.
8835         * modules/double-slash-root: New module.
8836         * modules/dirname (Files): Remove m4/double-slash-root.m4.
8837         (Depends-on): Add double-slash-root.
8838         * MODULES.html.sh (File system functions): Mention new module.
8839
8840 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
8841
8842         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
8843         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
8844         This is for the benefit of gzip, which doesn't do i18n.
8845
8846 2006-12-12  Jim Meyering  <jim@meyering.net>
8847
8848         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
8849         Reported by Andreas Schwab <schwab@suse.de>.
8850
8851 2006-12-12  Bruno Haible  <bruno@clisp.org>
8852
8853         Merge these changes.
8854         2006-09-05  Bruno Haible  <bruno@clisp.org>
8855         * lib/iconvme.c (iconv_string): No need to save and restore errno when
8856         iconv_alloc succeeded.
8857         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
8858         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
8859         test for " && dest " at the end - dest is always != NULL there. Call
8860         iconv with 4xNULL arguments initially, to reset the state. Call iconv
8861         with 2xNULL arguments, also to flush the state storage. Handle the
8862         IRIX iconv behaviour. Realloc the final result, to throw away unused
8863         memory.
8864
8865 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
8866
8867         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
8868         and fchmodat unconditionally, since glibc 2.4 has them.
8869         Problem reported by Arkadiusz Miskiewicz.
8870
8871 2006-12-10  Bruno Haible  <bruno@clisp.org>
8872
8873         * gnulib-tool (func_import): Show the include files only for those
8874         modules that are copied and specified.
8875         Reported by Karl Berry.
8876
8877 2006-12-08  Jim Meyering  <jim@meyering.net>
8878
8879         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
8880         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
8881
8882         * build-aux/announce-gen: Add two new options, both optional:
8883         --bootstrap-tools=TOOL_LIST
8884               a comma-separated list of tools, e.g.,
8885               autoconf,automake,bison,gnulib
8886         --gnulib-snapshot-date=DATE
8887               if gnulib is in the bootstrap tool list,
8888               then report this as the snapshot date.
8889               If not specified, use the current date/time.
8890               If you specify a date here, be sure it's UTC.
8891
8892 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8893
8894         * tests/test-argp-2.sh: Fix test to match actual output.
8895         (func_compare): Fix sed script to be portable.
8896
8897 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
8898
8899         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
8900         workaround for this case.  It is not autoconfigured now; offhand
8901         it's hard to see how to autoconfigure it.
8902
8903 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
8904
8905         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
8906         a directory that is about to be chowned.  Such a directory's
8907         initial file permissions should permit the owner only and this
8908         should not be changed until after the chown, since the group and
8909         other bits would be incorrect if they granted permission before
8910         the chown.
8911
8912         Fix porting problem for iswctype reported by Georg Schwarz in:
8913         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
8914         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
8915         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
8916         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
8917         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
8918
8919 2006-12-03  Jim Meyering  <jim@meyering.net>
8920
8921         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
8922         p->fts_statp may not yet be defined.
8923         (fts_read): Instead, set it in the caller, once p->fts_statp is
8924         sure to be defined, and corresponds to a top-level directory.
8925         This bug made du -x fail.  Here's the coreutils test case:
8926         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
8927         Reported by Mike Frysinger.
8928
8929 2006-12-01  Jim Meyering  <jim@meyering.net>
8930
8931         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
8932         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
8933         Reported by Simon Josefsson.
8934
8935 2006-11-30  Jim Meyering  <jim@meyering.net>
8936
8937         * m4/warning.m4: Use the all-permissive copyright notice
8938         recommended by RMS (rather than LGPL).
8939         * m4/vararrays.m4: Likewise.
8940         * m4/flexmember.m4: Likewise.
8941
8942 2006-11-29  Bruno Haible  <bruno@clisp.org>
8943
8944         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8945         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
8946         using +=.
8947         Reported by Simon Josefsson <simon@josefsson.org>.
8948
8949 2006-11-28  James Youngman <jay@gnu.org>
8950
8951         * README: Advise users that they might find the bug-gnulib@gnu.org
8952         and autotools-announce@gnu.org mailing lists useful.
8953
8954 2006-11-28  Bruno Haible  <bruno@clisp.org>
8955
8956         * m4/ptrdiff_max.m4: Remove file.
8957
8958 2006-11-21  Bruno Haible  <bruno@clisp.org>
8959
8960         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
8961         _AC_COMPUTE_INT.
8962         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8963         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
8964         _AC_COMPUTE_INT.
8965         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8966         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
8967         _AC_COMPUTE_INT.
8968         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8969
8970 2006-11-28  Jim Meyering  <jim@meyering.net>
8971
8972         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
8973         warning from "gcc -Wshadow" about shadowing the builtin.
8974
8975 2006-11-27  Bruno Haible  <bruno@clisp.org>
8976
8977         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
8978         _AC_COMPUTE_INT.
8979         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8980
8981 2006-11-27  Bruno Haible  <bruno@clisp.org>
8982             Paul Eggert  <eggert@cs.ucla.edu>
8983
8984         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
8985
8986 2006-11-26  Bruno Haible  <bruno@clisp.org>
8987
8988         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8989         noinst_LTLIBRARIES.
8990
8991 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
8992             Bruno Haible  <bruno@clisp.org>
8993
8994         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
8995         if compiling with "gcc -ansi".
8996
8997 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
8998
8999         Fix some incompatibilities with gcc -ansi -pedantic.
9000         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
9001         if compiling pedantically with GCC, unless it's C99 or later.
9002         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
9003         it mishandles gcc -ansi -pedantic as well.
9004         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
9005         if gcc -pedantic.
9006         * lib/regexec.c (check_node_accept_bytes): Don't use auto
9007         initializers for struct if -pedantic, unless it's C99 or later.
9008
9009 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
9010
9011         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
9012         Don't close an fd more than once. Identical atimes indicate
9013         success, not failure.
9014
9015 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
9016
9017         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
9018
9019 2006-11-23  Jim Meyering  <jim@meyering.net>
9020
9021         * build-aux/announce-gen: New file.  From coreutils.
9022
9023 2006-11-22  Jim Meyering  <jim@meyering.net>
9024
9025         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
9026         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
9027         (fts_read): Use a temporary to narrow the overused st_size member
9028         before using it in a switch statement.  Reported by Matthew Woehlke.
9029
9030         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
9031         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
9032
9033 2006-11-20  Bruno Haible  <bruno@clisp.org>
9034
9035         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
9036         changequote instead of pairs of brackets.
9037         Reported by Andreas Schwab <schwab@suse.de>.
9038
9039 2006-11-21  Jim Meyering  <jim@meyering.net>
9040
9041         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
9042         so as to remain compatible with older compilers.
9043         Patch from Michael Deutschmann.
9044
9045 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9046
9047         * MODULES.html.sh (File system functions): Add openat.
9048
9049         * lib/openat.h (rpl_fstatat): New macro, if
9050         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
9051         (fstatat): Define to rpl_fstatat under the same conditions,
9052         unless COMPILING_FSTATAT.
9053         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
9054         seems to have the bug.
9055         * lib/fstatat.c: New file.
9056         * modules/openat (Files): Add it.
9057
9058 2006-11-20  Bruno Haible  <bruno@clisp.org>
9059
9060         * Makefile: New file.
9061
9062 2006-11-20  Jim Meyering  <jim@meyering.net>
9063
9064         The beginnings of syntax-related checks for gnulib.
9065         * lib/Makefile: New file.
9066         * lib/t-idcache: New script.  Ensure that the two halves of
9067         idcache.c stay in sync.
9068
9069         * lib/idcache.c: Adjust comments in user- and group- portions to
9070         be more accurate, and to be consistent with one another.
9071
9072 2006-11-20  Jim Meyering  <jim@meyering.net>
9073
9074         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
9075         continue using the flexible array member (thus, this module performs
9076         half as many malloc calls), with the addition that...
9077         (getgroup, getuser): Consistently record a non-match via an empty
9078         "name" string, and map an empty string match to a NULL return value.
9079         * modules/idcache (Depends-on): Re-add flexmember.
9080
9081         * lib/idcache.c (getuser): Remove all uses of the register keyword.
9082         (getuidbyname, getgroup, getgidbyname): Likewise.
9083
9084         Use cleaner syntax: NULL rather than 0.
9085         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
9086
9087 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9088
9089         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
9090         It mishandled the case where the group was missing.
9091         Problem reported by Greg Schafer.
9092         * modules/idcache: Likewise.
9093
9094 2006-11-18  Jim Meyering  <jim@meyering.net>
9095
9096         * check-module (%exempt_header): Add exception for some
9097         conditionally-included headers.
9098
9099         * modules/i-ring (Depends-on): Add verify.
9100         (License): Change to LGPL.
9101
9102 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
9103
9104         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
9105         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
9106         and inttostr.h.  Use snprintf rather than uinttostr, so that
9107         LGPLed code doesn't depend on GPLed.
9108
9109 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
9110
9111         * modules/inline (License): Change from GPL to LGPL.
9112
9113 2006-11-17  Jim Meyering  <jim@meyering.net>
9114
9115         * modules/d-type (License): Switch to LGPL.
9116
9117 2006-11-15  Bruno Haible  <bruno@clisp.org>
9118
9119         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
9120
9121 2006-11-15  Eric Blake  <ebb9@byu.net>
9122
9123         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
9124         the module dependency.
9125
9126 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9127             Bruno Haible  <bruno@clisp.org>
9128
9129         * gnulib-tool (func_create_testdir): Add license consistency check.
9130
9131 2006-11-15  Eric Blake  <ebb9@byu.net>
9132
9133         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
9134         random "(cached)" in configure output.
9135
9136 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9137
9138         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
9139         test for conforming inttypes.h is both announced and cached.
9140
9141         * MODULES.html.sh (seen_modules, seen_files): New variables.
9142         (func_module): Rewrite to use a few less gnulib-tool and sed
9143         invocations.  Avoid a couple of quadratic algorithms for ...
9144         (missed_modules, missed_files): ... these, with ...
9145         (func_append, func_tmpdir): ... these new functions, from
9146         gnulib-tool.  Analogously, install traps for cleanup.
9147
9148         * tests/test-gc.c (main): Remove unused variables.
9149         * tests/test-read-file.c: Include stdlib.h, for 'free'.
9150
9151 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
9152
9153         * modules/inttostr (License): Change to LGPL.
9154
9155 2006-11-14  Eric Blake  <ebb9@byu.net>
9156
9157         * modules/tempname (License): Change to LGPL.
9158
9159 2006-11-14  Eric Blake  <ebb9@byu.net>
9160
9161         * doc/functions.texi (Function Portability): *printf functions on
9162         Cygwin now understand all POSIX size specifiers.
9163
9164 2006-11-14  Bruno Haible  <bruno@clisp.org>
9165
9166         * modules/c-ctype (License): Change to LGPL.
9167
9168 2006-11-12  Bruno Haible  <bruno@clisp.org>
9169
9170         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
9171         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
9172         for GNOME libraries, for which the include files are installed in
9173         subdirectories of $prefix/include.
9174
9175 2006-11-12  Bruno Haible  <bruno@clisp.org>
9176
9177         * m4/lib-link.m4: Require at least autoconf-2.54.
9178         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
9179         name to underscores for the --with option.
9180
9181 2006-11-13  Bruno Haible  <bruno@clisp.org>
9182
9183         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
9184         the tests directory.
9185         Reported by Ralf Wildenhues.
9186
9187 2006-11-13  Bruno Haible  <bruno@clisp.org>
9188
9189         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
9190         (func_emit_initmacro_end): Undo the override here.
9191         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
9192         Works around the famous automake error in coreutils.
9193
9194 2006-11-13  Eric Blake  <ebb9@byu.net>
9195
9196         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
9197         element, not its node.
9198
9199 2006-11-12  Bruno Haible  <bruno@clisp.org>
9200
9201         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
9202         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
9203
9204 2006-11-12  Bruno Haible  <bruno@clisp.org>
9205
9206         * gnulib-tool: New option --local-symlink.
9207         (func_usage): Document it.
9208         (lsymbolic): New variable.
9209         (func_import, func_create_testdir): If --symlink was not specified,
9210         test whether --local-symlink was specified and the file comes from
9211         the local_gnulib_dir.
9212
9213 2006-11-12  Bruno Haible  <bruno@clisp.org>
9214
9215         * gnulib-tool (func_ln): New function.
9216         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
9217
9218 2006-11-12  Bruno Haible  <bruno@clisp.org>
9219
9220         Finish support for source files in subdirectories.
9221         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
9222         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
9223         AUTOMAKE_OPTIONS.
9224         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
9225
9226 2006-11-12  Bruno Haible  <bruno@clisp.org>
9227
9228         * gnulib-tool (func_get_automake_snippet): Synthesize also an
9229         EXTRA_lib_SOURCES augmentation.
9230         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
9231
9232 2006-11-12  Jim Meyering  <jim@meyering.net>
9233
9234         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
9235         file descriptors.  This also averts a failure on systems with
9236         native openat support when a traversed directory lacks "x" access.
9237         * lib/fts_.h: Include "i-ring.h"
9238         (struct FTS) [fts_fd_ring]: New member.
9239         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
9240         (FCHDIR): Add parentheses.
9241         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
9242         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
9243         When descending, rather than simply closing the previous
9244         fts_cwd_fd value, push that file descriptor onto the ring.
9245         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
9246         (fts_open): Initialize the new fd_ring member.
9247         (fts_close): Clear the ring.
9248         (fts_safe_changedir): When possible, use our new fd_ring to skip
9249         the diropen and fstat and dev/ino comparison that would normally
9250         accompany a virtual `chdir ("..")'.
9251
9252         * modules/fts (Depends-on): Add i-ring.
9253         * modules/i-ring: New module.
9254         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
9255         * m4/i-ring.m4: New file.
9256
9257 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9258
9259         * gnulib-tool (func_create_testdir): Fix replacement of
9260         `build-aux' in configure.ac.  Run autotools in gltests
9261         subdirectory.
9262         (func_create_testdir, func_create_megatestdir, test): There is
9263         no need for '--force' in most autotool invocations in a new
9264         tree.  Actually fail the whole test if any of the tools, or the
9265         configure or make stages fail.
9266
9267         Sync from Automake.
9268         * build-aux/gnupload: Revert last change.  Add pointer to upload
9269         instructions of the GNU Maintenance Instructions.
9270         Suggestion by Karl Berry.
9271
9272 2006-11-10  Jim Meyering  <jim@meyering.net>
9273
9274         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
9275
9276 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9277
9278         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
9279         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
9280         (bind_textdomain_codeset) [! ENABLE_NLS]:
9281         Evaluate all the arguments.  That way, callers get compatible behavior
9282         if the arguments have side effects.  Also, it avoids some GCC
9283         diagnostics in some cases; Joel E. Denny reported problems when Bison
9284         was configured with --enable-gcc-warnigs.
9285
9286 2006-11-10  Jim Meyering  <jim@meyering.net>
9287
9288         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
9289         relevant options in CFLAGS (like -O, -fno-inline) are taken into
9290         account.
9291
9292 2006-11-10  Jim Meyering  <jim@meyering.net>
9293
9294         * modules/inline: New file/module.
9295         * modules/xalloc (Files): Remove m4/inline.m4.
9296         (Depends-on): Add inline, instead.
9297         * modules/oset: Likewise.
9298         * modules/list: Likewise.
9299
9300 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9301
9302         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
9303         Problem reported by Matthew Woehlke.
9304
9305 2006-11-09  Bruno Haible  <bruno@clisp.org>
9306
9307         * lib/tempname.c (gen_tempname): Remove variant that invokes
9308         __gen_tempname.
9309         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
9310         __gen_tempname.
9311
9312 2006-11-08  Bruno Haible  <bruno@clisp.org>
9313
9314         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
9315         to 'yes' instead of 'cross-compiling'.
9316
9317 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
9318
9319         * lib/quotearg.h (quotearg_free): New decl.
9320         * lib/quotearg.c (quotearg_free): New function.
9321         (slot0, nslots, slotvec0, slotvec):
9322         Now file-scope so that quotearg_free can get at them.
9323
9324 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9325
9326         Sync from Automake.
9327         * build-aux/gnupload: Add missing 'gnu' to example URL.
9328         Report by Karl Berry.
9329
9330 2006-11-08  Bruno Haible  <bruno@clisp.org>
9331
9332         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
9333         Suggested by Paul Eggert.
9334
9335 2006-11-08  Jim Meyering  <jim@meyering.net>
9336
9337         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
9338         It's already included if !_LIBC.
9339         (fts_safe_changedir): Add a comment.
9340
9341 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9342
9343         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
9344         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
9345         Matthew Woehlke.
9346
9347         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
9348         definitions up, to avoid colliding with change below.
9349         (static_inline) [HAVE_INLINE]: New macro.
9350         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
9351         Provide extern decls when !HAVE_INLINE.  Do not define unless
9352         static_inline is defined, either by us or by xmalloc.c.  Use
9353         static_inline rather than static inline.
9354         (XCALLOC): Optimize sizeof(T) = 1 case.
9355         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
9356
9357 2006-11-07  Bruno Haible  <bruno@clisp.org>
9358
9359         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
9360         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
9361         AC_C_INLINE.
9362         * modules/xalloc (Files): Add m4/inline.m4.
9363
9364 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9365
9366         * README: Fix typo.
9367         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
9368         (Miscellanous Notes): ...from this.
9369
9370 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9371
9372         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
9373         Mention that offsetof should be used instead of sizeof.
9374         From Bruno Haible.
9375
9376 2006-11-07  Bruno Haible  <bruno@clisp.org>
9377
9378         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
9379
9380 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9381
9382         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9383         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
9384         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9385         (gl_tree_add_before, gl_tree_add_after):
9386         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
9387         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
9388         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
9389         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
9390         (gl_linked_add_after, gl_linked_add_at): Likewise.
9391         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
9392         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9393         (gl_tree_add_before, gl_tree_add_after): Likewise.
9394         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
9395         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
9396         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
9397
9398 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9399
9400         * lib/gl_oset.h: Use C comment style, not C++ comment style.
9401
9402 2006-11-06  Bruno Haible  <bruno@clisp.org>
9403
9404         * m4/inline.m4: New file.
9405         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
9406         * modules/list (Files): Add m4/inline.m4.
9407         * modules/oset (Files): Likewise.
9408
9409 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9410
9411         * lib/idcache.c: Include <stddef.h>, for offsetof.
9412         (struct userid.name): Change from char * to a flexible array member.
9413         All uses changed.
9414         * modules/idcache (Depends-on): Add flexmember.
9415
9416         * MODULES.html.sh (Core language properties): New module flexmember.
9417         * modules/flexmember, m4/flexmember.m4: New files.
9418
9419         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
9420         inline functions that are identical with the old xnmalloc_inline,
9421         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
9422         that we can avoid some unnecessary integer multiplications and
9423         divisions in the common case where the element size is known at
9424         compile time.
9425         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
9426         needed.
9427         (xnboundedmalloc): Remove.
9428         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
9429         arguments, for consistency with rest of this header.
9430         (xcharalloc): Rewrite using XNMALLOC.
9431         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
9432         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
9433         versions have been moved to lib/xalloc.h and renamed to be the
9434         non-*_inline versions.
9435         (xmalloc, xrealloc): Implement without reference to the xnmalloc
9436         and xnrealloc functions, since those functions are now inline and
9437         now call us.
9438         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
9439         renaming described above.
9440         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
9441         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
9442         captures the dependency in AC_C_INLINE.
9443
9444         New module canonicalize-lgpl, proposed by Charles Wilson in
9445         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
9446         with a few small changes afterwards.
9447         * MODULES.html.sh (File system functions): New module
9448         canonicalize-lgpl.
9449         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
9450         and canonicalize_file_name.
9451         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
9452         * modules/canonicalize-lgpl: New files.
9453
9454 2006-11-05  Bruno Haible  <bruno@clisp.org>
9455
9456         * gnulib-tool (func_import, func_create_testdir): Create directories
9457         also for files in subdirectories of lib/.
9458
9459 2006-11-05  Bruno Haible  <bruno@clisp.org>
9460
9461         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
9462         ANSI C compliant.
9463
9464 2006-11-03  Bruno Haible  <bruno@clisp.org>
9465
9466         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9467         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
9468         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
9469         (xnboundedmalloc): New inline function.
9470         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
9471         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
9472         xmalloc.
9473         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
9474         xmalloc.
9475         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
9476         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
9477         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
9478         xmalloc.
9479         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9480         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
9481         xmalloc.
9482         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
9483         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9484         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
9485         xmalloc.
9486         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9487         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
9488         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9489         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
9490         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
9491         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
9492         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
9493
9494 2006-11-03  Bruno Haible  <bruno@clisp.org>
9495
9496         * lib/c-ctype.h [C++]: Define functions without name mangling.
9497         * lib/fwriteerror.h [C++]: Likewise.
9498         * lib/gcd.h [C++]: Likewise.
9499         * lib/linebreak.h [C++]: Likewise.
9500
9501 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
9502
9503         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
9504         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
9505         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
9506         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9507         Check for functions and headers just once.
9508         Check for declaration of canonicalize_file_name.
9509         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
9510
9511 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9512
9513         * gnulib-tool (func_import): Fix typo in actioncmd.
9514
9515 2006-11-02  Bruno Haible  <bruno@clisp.org>
9516
9517         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
9518         newline sequence in the Makefile.am snippet as a space, like "make"
9519         does.
9520         Reported by Roger Persson <perrog@gmail.com>.
9521
9522 2006-11-01  Bruno Haible  <bruno@clisp.org>
9523
9524         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
9525         already declared in <string.h>.
9526         * lib/strcase.h (strncasecmp): Don't declare it if yes.
9527
9528 2006-11-01  Bruno Haible  <bruno@clisp.org>
9529
9530         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
9531         * lib/strcase.h: Include <string.h>.
9532         (strcasecmp): Define to rpl_strcasecmp here.
9533
9534 2006-11-01  Bruno Haible  <bruno@clisp.org>
9535
9536         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
9537
9538 2006-11-01  Eric Blake  <ebb9@byu.net>
9539
9540         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
9541
9542         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
9543
9544 2006-10-29  Bruno Haible  <bruno@clisp.org>
9545
9546         Make it compile in C++ mode.
9547         * lib/full-write.c (full_rw): Add a cast.
9548
9549 2006-11-01  Bruno Haible  <bruno@clisp.org>
9550
9551         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
9552         be POSIX compliant.
9553         Reported by Roger Persson <perrog@gmail.com>.
9554
9555 2006-11-01  Eric Blake  <ebb9@byu.net>
9556
9557         * lib/getopt_.h: Fix comments.
9558
9559 2006-10-31  Eric Blake  <ebb9@byu.net>
9560
9561         * modules/tmpdir (Depends-on): Add sys_stat.
9562         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
9563         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
9564         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
9565         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
9566         tempname.
9567
9568 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
9569
9570         Avoid some C++ diagnostics reported by Bruno Haible.
9571         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
9572         xmalloc.
9573         (quotearg_alloc): Use xcharalloc rather than xmalloc.
9574         (struct slotvec): Move to top level.
9575         (quotearg_n_options): Rewrite to avoid xmalloc.
9576         * lib/xalloc.h (xcharalloc): New function.
9577         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
9578         [defined __cplusplus]: Add function template that provides result
9579         type propagation.  This part of the change is from Bruno Haible.
9580
9581 2006-10-29  Bruno Haible  <bruno@clisp.org>
9582
9583         Make it compile in C++ mode.
9584         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
9585         * lib/strnlen1.c (strnlen1): Cast memchr result.
9586         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
9587         * lib/clean-temp.c (string_equals, string_hash): Add casts.
9588         (create_temp_dir): Rename local variable 'template'.
9589         (compile_csharp_using_sscli): Add cast.
9590         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
9591         * lib/findprog.c (find_in_path): Likewise.
9592         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
9593         * lib/wait-process.c (register_slave_subprocess): Likewise.
9594
9595 2006-10-22  Bruno Haible  <bruno@clisp.org>
9596
9597         * modules/tsearch: New file.
9598         * lib/tsearch.h: New file.
9599         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
9600         * m4/tsearch.m4: New file.
9601         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
9602
9603 2006-10-29  Eric Blake  <ebb9@byu.net>
9604
9605         * lib/arcfour.c: Assume config.h.
9606         * lib/arctwo.c: Likewise.
9607         * lib/base64.c: Likewise.
9608         * lib/check-version.c: Likewise.
9609         * lib/crc.c: Likewise.
9610         * lib/des.c: Likewise.
9611         * lib/gc-gnulib.c: Likewise.
9612         * lib/gc-libgcrypt.c: Likewise.
9613         * lib/gc-pbkdf2-sha1.c: Likewise.
9614         * lib/getaddrinfo.c: Likewise.
9615         * lib/getdelim.c: Likewise.
9616         * lib/getline.c: Likewise.
9617         * lib/hmac-md5.c: Likewise.
9618         * lib/hmac-sha1.c: Likewise.
9619         * lib/iconvme.c: Likewise.
9620         * lib/md2.c: Likewise.
9621         * lib/md4.c: Likewise.
9622         * lib/memxor.c: Likewise.
9623         * lib/read-file.c: Likewise.
9624         * lib/readline.c: Likewise.
9625         * lib/rijndael-alg-fst.c: Likewise.
9626         * lib/rijndael-api-fst.c: Likewise.
9627         * lib/xgetdomainname.c: Likewise.
9628
9629 2006-10-28  Eric Blake  <ebb9@byu.net>
9630
9631         * lib/xstrndup.c: Assume config.h.
9632
9633 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9634
9635         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
9636         stat-macros.h is now for our own macros, whereas stat_h is for
9637         macros in the <sys/stat.h> name space.
9638         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
9639         (STAT_MACROS_H): Remove.
9640         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
9641         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
9642         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
9643         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
9644         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
9645         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
9646         Move these macros to ...
9647         * lib/stat_.h: here.  Don't include stat-macros.h.
9648         * lib/canonicalize.c: Don't include stat-macros.h.
9649         * lib/chown.c: Likewise.
9650         * lib/euidaccess.c: Likewise.
9651         * lib/file-type.c: Likewise.
9652         * lib/filemode.c: Likewise.
9653         * lib/glob.c: Likewise.
9654         * lib/isapipe.c: Likewise.
9655         * lib/lchown.c: Likewise.
9656         * lib/lstat.c: Likewise.
9657         * lib/mkdir-p.c: Likewise.
9658         * lib/rmdir.c: Likewise.
9659         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
9660         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
9661         unless mkdir isn't declared, to speed up 'configure'.
9662         Always create sys/stat.h, since it's unlikely any real sys/stat.h
9663         would define all the S_* symbols.
9664         * modules/canonicalize (Depends-on):
9665         Depend on sys_stat, not stat-macros.
9666         * modules/chown: Likewise.
9667         * modules/euidaccess: Likewise.
9668         * modules/filemode: Likewise.
9669         * modules/file-type: Likewise.
9670         * modules/glob: Likewise.
9671         * modules/isapipe: Likewise.
9672         * modules/lchown: Likewise.
9673         * modules/lstat: Likewise.
9674         * modules/mkancesdirs: Likewise.
9675         * modules/rmdir: Likewise.
9676         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
9677         * modules/modechange: Likewise.
9678         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
9679         (configure.ac): Remove gl_STAT_MACROS.
9680         * modules/sys_stat (Depends-on): Remove stat-macros.
9681
9682 2006-10-27  Bruno Haible  <bruno@clisp.org>
9683
9684         * m4/signed.m4: Remove file.
9685         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
9686         invocation.
9687         * modules/vasnprintf (Files): Remove m4/signed.m4.
9688
9689 2006-10-27  Bruno Haible  <bruno@clisp.org>
9690
9691         Update to GNU gettext 0.16.
9692         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
9693         m4/inttypes-h.m4, m4/signed.m4.
9694         * m4/gettext.m4: Update to GNU gettext 0.16.
9695         * m4/intl.m4: New file, from GNU gettext.
9696         * m4/intldir.m4: New file, from GNU gettext.
9697         * config/srclist.txt: Update
9698
9699 2006-10-27  Eric Blake  <ebb9@byu.net>
9700
9701         * MODULES.html.sh: Document tempname.
9702         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
9703         dependencies.
9704         (Files): Move lib/tempname.c...
9705         * modules/tempname: ...to this new module.
9706         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
9707         (gl_PREREQ_TEMPNAME): Move...
9708         * m4/tempname.m4: ...to this new file.
9709         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
9710         * modules/sys_stat (Depends-on): Add stat-macros.
9711         * lib/stat_.h (includes): Pick up stat macros.
9712         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
9713         if stat macros are broken.
9714         * lib/tempname.c (includes): No need to include "stat-macros.h".
9715         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
9716         (direxists, __path_search) [!_LIBC]: Don't compile these in
9717         gnulib; the tmpdir module covers that.
9718         * lib/tempname.h: New file.
9719
9720 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
9721
9722         * COPYING: Explain how gnulib-tool converts licence headers.
9723         Almost all wording by Eric Blake.
9724
9725 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
9726
9727         * lib/mbchar.h (is_basic_table): Make read-only.
9728         * lib/mbchar.c (is_basic_table): Likewise.
9729         Reported by John Darrington.
9730
9731 2006-10-25  Bruno Haible  <bruno@clisp.org>
9732
9733         * lib/progname.h (set_program_name): Undefine before defining.
9734
9735 2006-10-25  Bruno Haible  <bruno@clisp.org>
9736
9737         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
9738         false for non-gcc C++ compilers.
9739         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
9740
9741 2006-10-24  Bruno Haible  <bruno@clisp.org>
9742
9743         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
9744         iconv implementations like Irix iconv.
9745
9746 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9747
9748         * modules/vararrays: New file.
9749         * m4/vararrays.m4: New file, taken from diffutils.
9750         * MODULES.html.sh: New module vararrays.
9751
9752 2006-10-24  Karl Berry  <karl@gnu.org>
9753
9754         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
9755         Don't call GNU Unix.
9756
9757 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9758
9759         * users.txt: Add Libtool.
9760
9761         Sync from Libtool:
9762
9763         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9764
9765         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
9766         to gnulib's policy of including config.h unconditionally.
9767
9768 2006-10-24  Bruno Haible  <bruno@clisp.org>
9769
9770         * modules/wcwidth (Files): Add m4/wint_t.m4.
9771         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
9772         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
9773
9774 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9775
9776         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
9777         to pacify GCC with some -W flags enabled.  Problem reported by
9778         Bruno Haible.
9779
9780 2006-10-24  Jim Meyering  <jim@meyering.net>
9781
9782         * MODULES.html.sh: Remove uinttostr.  It's not a module.
9783         Reported by Karl Berry.
9784
9785 2006-10-23  Bruno Haible  <bruno@clisp.org>
9786
9787         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
9788
9789 2006-10-24  Bruno Haible  <bruno@clisp.org>
9790
9791         * lib/gl_list.h: Use C comment style, not C++ comment style.
9792
9793 2006-10-23  Eric Blake  <ebb9@byu.net>
9794
9795         * lib/getaddrinfo.c (includes): Add missing include.
9796
9797 2006-10-23  Bruno Haible  <bruno@clisp.org>
9798             Paul Eggert  <eggert@cs.ucla.edu>
9799
9800         Ability to rename obstack_free.
9801         * lib/obstack.h (__obstack_free): New macro. Declare instead of
9802         obstack_free.
9803         (obstack_free): Invoke the __obstack_free macro.
9804         * lib/obstack.c (obstack_free): Use __obstack_free macro.
9805
9806 2006-10-23  Bruno Haible  <bruno@clisp.org>
9807             Paul Eggert  <eggert@cs.ucla.edu>
9808
9809         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
9810         __argc, __argv from the declaration. (They are defined as macros on
9811         mingw.)
9812
9813 2006-10-22  Bruno Haible  <bruno@clisp.org>
9814
9815         * doc/gnulib-intro.texi: New file.
9816         * doc/gnulib.texi: Include it.
9817
9818 2006-10-21  Bruno Haible  <bruno@clisp.org>
9819
9820         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
9821         "Introduction", "Miscellanous Notes", "Particular Modules".
9822
9823 2006-10-21  Bruno Haible  <bruno@clisp.org>
9824
9825         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9826         Change mostlyclean-local rule to avoid sh syntax error from bash
9827         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
9828
9829 2006-10-23  Jim Meyering  <jim@meyering.net>
9830
9831         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
9832         in place of snprintf.
9833
9834         * modules/inttostr (Files): Add lib/uinttostr.c.
9835         * lib/uinttostr.c (inttostr): New file/function.
9836         * lib/inttostr.h (uinttostr): Declare.
9837         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
9838         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9839         Add uinttostr.
9840         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
9841
9842 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9843
9844         * lib/canonicalize.c (ELOOP): Define if not already defined.
9845         Problem reported by Bruno Haible in
9846         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
9847
9848 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9849
9850         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
9851         Problem reported by Perry Smith and Ville Laurikari.
9852
9853         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
9854         uses.
9855
9856 2006-10-19  Bruno Haible  <bruno@clisp.org>
9857
9858         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
9859         for mingw.
9860
9861 2006-10-19  Bruno Haible  <bruno@clisp.org>
9862
9863         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
9864         Needed for mingw.
9865
9866 2006-10-19  Bruno Haible  <bruno@clisp.org>
9867
9868         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
9869
9870 2006-10-19  Bruno Haible  <bruno@clisp.org>
9871
9872         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
9873         it.
9874
9875 2006-10-19  Bruno Haible  <bruno@clisp.org>
9876
9877         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
9878         invocation.
9879
9880 2006-10-19  Bruno Haible  <bruno@clisp.org>
9881
9882         * gnulib-tool (func_create_testdir): Don't include ftruncate and
9883         mountlist by default.
9884
9885 2006-10-16  Bruno Haible  <bruno@clisp.org>
9886
9887         * lib/c-strstr.c: Include c-strstr.h.
9888
9889 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9890
9891         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
9892         in a slash.
9893
9894 2006-10-18  Bruno Haible  <bruno@clisp.org>
9895
9896         * lib/lock.h [C++]: Wrap definitions in extern "C".
9897
9898 2006-10-18  Bruno Haible  <bruno@clisp.org>
9899
9900         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
9901         gl_LIBOBJS list.
9902
9903 2006-10-18  Bruno Haible  <bruno@clisp.org>
9904
9905         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
9906
9907 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
9908
9909         * lib/xstrtol.h: Include gettext.h.
9910         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
9911         Problem reported by Eric Blake.
9912         * modules/xstrtol (Depends-on): Add gettext-h.
9913
9914 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
9915
9916         * lib/strftime.c (advance): New macro.
9917         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
9918         incomplete type, so you can't add 0 to it.  Problem and patch
9919         reported by Eelco Dolstra for dietlibc.
9920
9921 2006-10-18  Jim Meyering  <jim@meyering.net>
9922
9923         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
9924         type for a local, and rename it: s/up/user_proc/.
9925
9926 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9927
9928         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
9929         READ_UTMP_USER_PROCESS.
9930         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
9931
9932 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9933
9934         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
9935         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
9936
9937 2006-10-17  Eric Blake  <ebb9@byu.net>
9938
9939         * lib/sigprocmask.c (sigprocmask): Fix typo.
9940
9941         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
9942
9943         * modules/clean-temp (Makefile.am): Don't add to make output...
9944         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
9945         config.h.
9946
9947 2006-10-17  Bruno Haible  <bruno@clisp.org>
9948
9949         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
9950         differently if DEFAULT_TEXT_DOMAIN is set.
9951
9952 2006-10-16  Bruno Haible  <bruno@clisp.org>
9953
9954         * lib/clean-temp.c: Include fwriteerror.h.
9955
9956 2006-10-16  Bruno Haible  <bruno@clisp.org>
9957
9958         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
9959
9960 2006-10-16  Bruno Haible  <bruno@clisp.org>
9961
9962         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
9963         * lib/sigprocmask.h: Include <sys/types.h>.
9964         (sigset_t): Use the system's definition if present.
9965
9966 2006-10-17  Eric Blake  <ebb9@byu.net>
9967
9968         * lib/xvasprintf.c (includes): Assume config.h.
9969         * lib/xasprintf.c (includes): Likewise.
9970
9971 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
9972
9973         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
9974         at least as wide as intmax_t.
9975
9976 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
9977
9978         (Imported from Automake.)
9979         * build-aux/gnupload: Update to version 1.1 of directive file.
9980
9981 2006-10-16  Eric Blake  <ebb9@byu.net>
9982
9983         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
9984         match Automake 1.10a.
9985
9986 2006-10-14  Bruno Haible  <bruno@clisp.org>
9987
9988         * modules/sigprocmask: New file.
9989         * lib/sigprocmask.h: New file.
9990         * lib/sigprocmask.c: New file.
9991         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
9992         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
9993         request sigprocmask.o.
9994         (gl_PREREQ_SIGPROCMASK): New macro.
9995         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
9996         (Depends-on): Add sigprocmask.
9997         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
9998         gt_SIGNALBLOCKING. Test for 'raise' only once.
9999         * lib/fatal-signal.c: Include sigprocmask.h.
10000         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
10001         unblock_fatal_signals): Define always.
10002         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10003         sigprocmask.
10004
10005 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10006
10007         Sync from Automake.
10008         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
10009         which incorrectly sets the mode of an existing destination
10010         directory.  In some cases the unpatched install-sh could do the
10011         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
10012         system.  We hope this is rare in practice, but it's clearly worth
10013         fixing.  Problem reported by Alex Unleashed in
10014         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
10015         Also, don't bother to check for -m bugs unless we're using -m;
10016         suggested by Stepan Kasal.
10017
10018 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10019
10020         Sync from Automake.
10021         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
10022         `-c' flag, so they appear at the same position as in %FASTDEP%
10023         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
10024         which ignores unknown options only after the first non-option.
10025         Bug report against M4 by Nelson H. F. Beebe.
10026
10027 2006-10-13  Jim Meyering  <jim@meyering.net>
10028
10029         Fix a bug in yesterday's change.
10030         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
10031         p->fts_statp->st_dev would be used uninitialized.
10032         Ensures that we always call fts_stat on the very first entry.
10033         Miklos Szeredi reported that find -xdev stopped working.
10034
10035 2006-10-12  Bruno Haible  <bruno@clisp.org>
10036
10037         * gnulib-tool (func_get_automake_snippet): Append an automatically
10038         computed EXTRA_DIST augmentation.
10039         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
10040         * modules/alloca-opt (Makefile.am): Likewise.
10041         * modules/allocsa (Makefile.am): Likewise.
10042         * modules/arcfour (Makefile.am): Likewise.
10043         * modules/arctwo (Makefile.am): Likewise.
10044         * modules/argmatch (Makefile.am): Likewise.
10045         * modules/argz (Makefile.am): Likewise.
10046         * modules/atexit (Makefile.am): Likewise.
10047         * modules/backupfile (Makefile.am): Likewise.
10048         * modules/byteswap (Makefile.am): Likewise.
10049         * modules/c-strtod (Makefile.am): Likewise.
10050         * modules/c-strtold (Makefile.am): Likewise.
10051         * modules/calloc (Makefile.am): Likewise.
10052         * modules/canon-host (Makefile.am): Likewise.
10053         * modules/canonicalize (Makefile.am): Likewise.
10054         * modules/chdir-long (Makefile.am): Likewise.
10055         * modules/chdir-safer (Makefile.am): Likewise.
10056         * modules/check-version (Makefile.am): Likewise.
10057         * modules/chown (Makefile.am): Likewise.
10058         * modules/cloexec (Makefile.am): Likewise.
10059         * modules/close-stream (Makefile.am): Likewise.
10060         * modules/closeout (Makefile.am): Likewise.
10061         * modules/crc (Makefile.am): Likewise.
10062         * modules/csharpexec (Makefile.am): Likewise.
10063         * modules/cycle-check (Makefile.am): Likewise.
10064         * modules/des (Makefile.am): Likewise.
10065         * modules/dev-ino (Makefile.am): Likewise.
10066         * modules/dirfd (Makefile.am): Likewise.
10067         * modules/dirname (Makefile.am): Likewise.
10068         * modules/dup2 (Makefile.am): Likewise.
10069         * modules/eealloc (Makefile.am): Likewise.
10070         * modules/error (Makefile.am): Likewise.
10071         * modules/euidaccess (Makefile.am): Likewise.
10072         * modules/exclude (Makefile.am): Likewise.
10073         * modules/exitfail (Makefile.am): Likewise.
10074         * modules/fcntl-safer (Makefile.am): Likewise.
10075         * modules/fcntl (Makefile.am): Likewise.
10076         * modules/file-type (Makefile.am): Likewise.
10077         * modules/fileblocks (Makefile.am): Likewise.
10078         * modules/filemode (Makefile.am): Likewise.
10079         * modules/filenamecat (Makefile.am): Likewise.
10080         * modules/fnmatch (Makefile.am): Likewise.
10081         * modules/fopen-safer (Makefile.am): Likewise.
10082         * modules/fpending (Makefile.am): Likewise.
10083         * modules/fprintftime (Makefile.am): Likewise.
10084         * modules/free (Makefile.am): Likewise.
10085         * modules/fsusage (Makefile.am): Likewise.
10086         * modules/ftruncate (Makefile.am): Likewise.
10087         * modules/fts (Makefile.am): Likewise.
10088         * modules/gc-arcfour (Makefile.am): Likewise.
10089         * modules/gc-des (Makefile.am): Likewise.
10090         * modules/gc-hmac-md5 (Makefile.am): Likewise.
10091         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
10092         * modules/gc-md4 (Makefile.am): Likewise.
10093         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10094         * modules/gc-sha1 (Makefile.am): Likewise.
10095         * modules/gc (Makefile.am): Likewise.
10096         * modules/getaddrinfo (Makefile.am): Likewise.
10097         * modules/getcwd (Makefile.am): Likewise.
10098         * modules/getdelim (Makefile.am): Likewise.
10099         * modules/getdomainname (Makefile.am): Likewise.
10100         * modules/getgroups (Makefile.am): Likewise.
10101         * modules/gethostname (Makefile.am): Likewise.
10102         * modules/gethrxtime (Makefile.am): Likewise.
10103         * modules/getline (Makefile.am): Likewise.
10104         * modules/getloadavg (Makefile.am): Likewise.
10105         * modules/getlogin_r (Makefile.am): Likewise.
10106         * modules/getndelim2 (Makefile.am): Likewise.
10107         * modules/getopt (Makefile.am): Likewise.
10108         * modules/getpagesize (Makefile.am): Likewise.
10109         * modules/getpass-gnu (Makefile.am): Likewise.
10110         * modules/getpass (Makefile.am): Likewise.
10111         * modules/getsubopt (Makefile.am): Likewise.
10112         * modules/gettime (Makefile.am): Likewise.
10113         * modules/gettimeofday (Makefile.am): Likewise.
10114         * modules/getugroups (Makefile.am): Likewise.
10115         * modules/getusershell (Makefile.am): Likewise.
10116         * modules/glob (Makefile.am): Likewise.
10117         * modules/group-member (Makefile.am): Likewise.
10118         * modules/hard-locale (Makefile.am): Likewise.
10119         * modules/hash (Makefile.am): Likewise.
10120         * modules/hmac-md5 (Makefile.am): Likewise.
10121         * modules/hmac-sha1 (Makefile.am): Likewise.
10122         * modules/human (Makefile.am): Likewise.
10123         * modules/idcache (Makefile.am): Likewise.
10124         * modules/imaxabs (Makefile.am): Likewise.
10125         * modules/imaxdiv (Makefile.am): Likewise.
10126         * modules/inet_ntop (Makefile.am): Likewise.
10127         * modules/inet_pton (Makefile.am): Likewise.
10128         * modules/intprops (Makefile.am): Likewise.
10129         * modules/inttostr (Makefile.am): Likewise.
10130         * modules/inttypes (Makefile.am): Likewise.
10131         * modules/isapipe (Makefile.am): Likewise.
10132         * modules/javaversion (Makefile.am): Likewise.
10133         * modules/lchmod (Makefile.am): Likewise.
10134         * modules/lchown (Makefile.am): Likewise.
10135         * modules/localcharset (Makefile.am): Likewise.
10136         * modules/long-options (Makefile.am): Likewise.
10137         * modules/lstat (Makefile.am): Likewise.
10138         * modules/malloc (Makefile.am): Likewise.
10139         * modules/mathl (Makefile.am): Likewise.
10140         * modules/mbchar (Makefile.am): Likewise.
10141         * modules/md2 (Makefile.am): Likewise.
10142         * modules/md4 (Makefile.am): Likewise.
10143         * modules/md5 (Makefile.am): Likewise.
10144         * modules/memcasecmp (Makefile.am): Likewise.
10145         * modules/memchr (Makefile.am): Likewise.
10146         * modules/memcmp (Makefile.am): Likewise.
10147         * modules/memcoll (Makefile.am): Likewise.
10148         * modules/memcpy (Makefile.am): Likewise.
10149         * modules/memmem (Makefile.am): Likewise.
10150         * modules/memmove (Makefile.am): Likewise.
10151         * modules/mempcpy (Makefile.am): Likewise.
10152         * modules/memrchr (Makefile.am): Likewise.
10153         * modules/memset (Makefile.am): Likewise.
10154         * modules/memxor (Makefile.am): Likewise.
10155         * modules/mkancesdirs (Makefile.am): Likewise.
10156         * modules/mkdir-p (Makefile.am): Likewise.
10157         * modules/mkdir (Makefile.am): Likewise.
10158         * modules/mkdtemp (Makefile.am): Likewise.
10159         * modules/mkstemp (Makefile.am): Likewise.
10160         * modules/mktime (Makefile.am): Likewise.
10161         * modules/modechange (Makefile.am): Likewise.
10162         * modules/mountlist (Makefile.am): Likewise.
10163         * modules/nanosleep (Makefile.am): Likewise.
10164         * modules/obstack (Makefile.am): Likewise.
10165         * modules/openat (Makefile.am): Likewise.
10166         * modules/pagealign_alloc (Makefile.am): Likewise.
10167         * modules/pathmax (Makefile.am): Likewise.
10168         * modules/physmem (Makefile.am): Likewise.
10169         * modules/poll (Makefile.am): Likewise.
10170         * modules/posixtm (Makefile.am): Likewise.
10171         * modules/posixver (Makefile.am): Likewise.
10172         * modules/putenv (Makefile.am): Likewise.
10173         * modules/quote (Makefile.am): Likewise.
10174         * modules/quotearg (Makefile.am): Likewise.
10175         * modules/raise (Makefile.am): Likewise.
10176         * modules/read-file (Makefile.am): Likewise.
10177         * modules/readline (Makefile.am): Likewise.
10178         * modules/readlink (Makefile.am): Likewise.
10179         * modules/readtokens (Makefile.am): Likewise.
10180         * modules/readutmp (Makefile.am): Likewise.
10181         * modules/realloc (Makefile.am): Likewise.
10182         * modules/regex (Makefile.am): Likewise.
10183         * modules/rename-dest-slash (Makefile.am): Likewise.
10184         * modules/rename (Makefile.am): Likewise.
10185         * modules/rijndael (Makefile.am): Likewise.
10186         * modules/rmdir (Makefile.am): Likewise.
10187         * modules/rpmatch (Makefile.am): Likewise.
10188         * modules/safe-read (Makefile.am): Likewise.
10189         * modules/safe-write (Makefile.am): Likewise.
10190         * modules/same-inode (Makefile.am): Likewise.
10191         * modules/same (Makefile.am): Likewise.
10192         * modules/save-cwd (Makefile.am): Likewise.
10193         * modules/savedir (Makefile.am): Likewise.
10194         * modules/setenv (Makefile.am): Likewise.
10195         * modules/settime (Makefile.am): Likewise.
10196         * modules/sha1 (Makefile.am): Likewise.
10197         * modules/sig2str (Makefile.am): Likewise.
10198         * modules/snprintf (Makefile.am): Likewise.
10199         * modules/stat-macros (Makefile.am): Likewise.
10200         * modules/stat-time (Makefile.am): Likewise.
10201         * modules/stdbool (Makefile.am): Likewise.
10202         * modules/stdint (Makefile.am): Likewise.
10203         * modules/stdlib-safer (Makefile.am): Likewise.
10204         * modules/stpcpy (Makefile.am): Likewise.
10205         * modules/stpncpy (Makefile.am): Likewise.
10206         * modules/strcase (Makefile.am): Likewise.
10207         * modules/strcasestr (Makefile.am): Likewise.
10208         * modules/strchrnul (Makefile.am): Likewise.
10209         * modules/strcspn (Makefile.am): Likewise.
10210         * modules/strdup (Makefile.am): Likewise.
10211         * modules/strerror (Makefile.am): Likewise.
10212         * modules/strftime (Makefile.am): Likewise.
10213         * modules/strndup (Makefile.am): Likewise.
10214         * modules/strnlen (Makefile.am): Likewise.
10215         * modules/strpbrk (Makefile.am): Likewise.
10216         * modules/strsep (Makefile.am): Likewise.
10217         * modules/strstr (Makefile.am): Likewise.
10218         * modules/strtod (Makefile.am): Likewise.
10219         * modules/strtoimax (Makefile.am): Likewise.
10220         * modules/strtok_r (Makefile.am): Likewise.
10221         * modules/strtol (Makefile.am): Likewise.
10222         * modules/strtoll (Makefile.am): Likewise.
10223         * modules/strtoul (Makefile.am): Likewise.
10224         * modules/strtoull (Makefile.am): Likewise.
10225         * modules/strtoumax (Makefile.am): Likewise.
10226         * modules/strverscmp (Makefile.am): Likewise.
10227         * modules/sys_socket (Makefile.am): Likewise.
10228         * modules/sys_stat (Makefile.am): Likewise.
10229         * modules/sysexits (Makefile.am): Likewise.
10230         * modules/time_r (Makefile.am): Likewise.
10231         * modules/timegm (Makefile.am): Likewise.
10232         * modules/timespec (Makefile.am): Likewise.
10233         * modules/tmpfile-safer (Makefile.am): Likewise.
10234         * modules/trim (Makefile.am): Likewise.
10235         * modules/unistd-safer (Makefile.am): Likewise.
10236         * modules/unlinkdir (Makefile.am): Likewise.
10237         * modules/unlocked-io (Makefile.am): Likewise.
10238         * modules/userspec (Makefile.am): Likewise.
10239         * modules/utime (Makefile.am): Likewise.
10240         * modules/utimecmp (Makefile.am): Likewise.
10241         * modules/utimens (Makefile.am): Likewise.
10242         * modules/vasnprintf (Makefile.am): Likewise.
10243         * modules/vasprintf (Makefile.am): Likewise.
10244         * modules/vsnprintf (Makefile.am): Likewise.
10245         * modules/xalloc (Makefile.am): Likewise.
10246         * modules/xgetcwd (Makefile.am): Likewise.
10247         * modules/xnanosleep (Makefile.am): Likewise.
10248         * modules/xreadlink (Makefile.am): Likewise.
10249         * modules/xstrtod (Makefile.am): Likewise.
10250         * modules/xstrtol (Makefile.am): Likewise.
10251         * modules/xstrtold (Makefile.am): Likewise.
10252         * modules/yesno (Makefile.am): Likewise.
10253         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
10254
10255 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10256
10257         * modules/error (Makefile.am): Distribute files through
10258         EXTRA_DIST, not lib_SOURCES.
10259
10260 2006-10-12  Eric Blake  <ebb9@byu.net>
10261
10262         * modules/error (Makefile.am): Distribute files in /lib.
10263         * modules/obstack (Makefile.am): Likewise.
10264
10265 2006-10-12  Bruno Haible  <bruno@clisp.org>
10266
10267         * modules/acl (Makefile.am): Distribute all files in lib/ through
10268         EXTRA_DIST.
10269         * modules/arcfour (Makefile.am): Likewise.
10270         * modules/arctwo (Makefile.am): Likewise.
10271         * modules/argmatch (Makefile.am): Likewise.
10272         * modules/argz (Makefile.am): Likewise.
10273         * modules/atexit (Makefile.am): Likewise.
10274         * modules/backupfile (Makefile.am): Likewise.
10275         * modules/c-strtod (Makefile.am): Likewise.
10276         * modules/c-strtold (Makefile.am): Likewise.
10277         * modules/calloc (Makefile.am): Likewise.
10278         * modules/canon-host (Makefile.am): Likewise.
10279         * modules/canonicalize (Makefile.am): Likewise.
10280         * modules/chdir-long (Makefile.am): Likewise.
10281         * modules/chdir-safer (Makefile.am): Likewise.
10282         * modules/check-version (Makefile.am): Likewise.
10283         * modules/chown (Makefile.am): Likewise.
10284         * modules/cloexec (Makefile.am): Likewise.
10285         * modules/close-stream (Makefile.am): Likewise.
10286         * modules/closeout (Makefile.am): Likewise.
10287         * modules/crc (Makefile.am): Likewise.
10288         * modules/cycle-check (Makefile.am): Likewise.
10289         * modules/des (Makefile.am): Likewise.
10290         * modules/dirfd (Makefile.am): Likewise.
10291         * modules/dirname (Makefile.am): Likewise.
10292         * modules/dup2 (Makefile.am): Likewise.
10293         * modules/euidaccess (Makefile.am): Likewise.
10294         * modules/exclude (Makefile.am): Likewise.
10295         * modules/exitfail (Makefile.am): Likewise.
10296         * modules/fcntl-safer (Makefile.am): Likewise.
10297         * modules/file-type (Makefile.am): Likewise.
10298         * modules/fileblocks (Makefile.am): Likewise.
10299         * modules/filemode (Makefile.am): Likewise.
10300         * modules/filenamecat (Makefile.am): Likewise.
10301         * modules/fnmatch (Makefile.am): Likewise.
10302         * modules/fopen-safer (Makefile.am): Likewise.
10303         * modules/fpending (Makefile.am): Likewise.
10304         * modules/fprintftime (Makefile.am): Likewise.
10305         * modules/free (Makefile.am): Likewise.
10306         * modules/fsusage (Makefile.am): Likewise.
10307         * modules/ftruncate (Makefile.am): Likewise.
10308         * modules/fts (Makefile.am): Likewise.
10309         * modules/gc (Makefile.am): Likewise.
10310         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10311         * modules/getaddrinfo (Makefile.am): Likewise.
10312         * modules/getcwd (Makefile.am): Likewise.
10313         * modules/getdelim (Makefile.am): Likewise.
10314         * modules/getdomainname (Makefile.am): Likewise.
10315         * modules/getgroups (Makefile.am): Likewise.
10316         * modules/gethostname (Makefile.am): Likewise.
10317         * modules/gethrxtime (Makefile.am): Likewise.
10318         * modules/getline (Makefile.am): Likewise.
10319         * modules/getloadavg (Makefile.am): Likewise.
10320         * modules/getlogin_r (Makefile.am): Likewise.
10321         * modules/getopt (Makefile.am): Likewise.
10322         * modules/getpass (Makefile.am): Likewise.
10323         * modules/getpass-gnu (Makefile.am): Likewise.
10324         * modules/getsubopt (Makefile.am): Likewise.
10325         * modules/gettime (Makefile.am): Likewise.
10326         * modules/gettimeofday (Makefile.am): Likewise.
10327         * modules/getugroups (Makefile.am): Likewise.
10328         * modules/getusershell (Makefile.am): Likewise.
10329         * modules/glob (Makefile.am): Likewise.
10330         * modules/group-member (Makefile.am): Likewise.
10331         * modules/hard-locale (Makefile.am): Likewise.
10332         * modules/hash (Makefile.am): Likewise.
10333         * modules/hmac-md5 (Makefile.am): Likewise.
10334         * modules/hmac-sha1 (Makefile.am): Likewise.
10335         * modules/human (Makefile.am): Likewise.
10336         * modules/idcache (Makefile.am): Likewise.
10337         * modules/imaxabs (Makefile.am): Likewise.
10338         * modules/imaxdiv (Makefile.am): Likewise.
10339         * modules/inet_ntop (Makefile.am): Likewise.
10340         * modules/inet_pton (Makefile.am): Likewise.
10341         * modules/inttostr (Makefile.am): Likewise.
10342         * modules/isapipe (Makefile.am): Likewise.
10343         * modules/lchown (Makefile.am): Likewise.
10344         * modules/long-options (Makefile.am): Likewise.
10345         * modules/lstat (Makefile.am): Likewise.
10346         * modules/malloc (Makefile.am): Likewise.
10347         * modules/mathl (Makefile.am): Likewise.
10348         * modules/mbchar (Makefile.am): Likewise.
10349         * modules/md2 (Makefile.am): Likewise.
10350         * modules/md4 (Makefile.am): Likewise.
10351         * modules/md5 (Makefile.am): Likewise.
10352         * modules/memcasecmp (Makefile.am): Likewise.
10353         * modules/memchr (Makefile.am): Likewise.
10354         * modules/memcmp (Makefile.am): Likewise.
10355         * modules/memcoll (Makefile.am): Likewise.
10356         * modules/memcpy (Makefile.am): Likewise.
10357         * modules/memmem (Makefile.am): Likewise.
10358         * modules/memmove (Makefile.am): Likewise.
10359         * modules/mempcpy (Makefile.am): Likewise.
10360         * modules/memrchr (Makefile.am): Likewise.
10361         * modules/memset (Makefile.am): Likewise.
10362         * modules/memxor (Makefile.am): Likewise.
10363         * modules/mkancesdirs (Makefile.am): Likewise.
10364         * modules/mkdir (Makefile.am): Likewise.
10365         * modules/mkdir-p (Makefile.am): Likewise.
10366         * modules/mkdtemp (Makefile.am): Likewise.
10367         * modules/mkstemp (Makefile.am): Likewise.
10368         * modules/mktime (Makefile.am): Likewise.
10369         * modules/modechange (Makefile.am): Likewise.
10370         * modules/mountlist (Makefile.am): Likewise.
10371         * modules/nanosleep (Makefile.am): Likewise.
10372         * modules/openat (Makefile.am): Likewise.
10373         * modules/pagealign_alloc (Makefile.am): Likewise.
10374         * modules/physmem (Makefile.am): Likewise.
10375         * modules/poll (Makefile.am): Likewise.
10376         * modules/posixtm (Makefile.am): Likewise.
10377         * modules/posixver (Makefile.am): Likewise.
10378         * modules/putenv (Makefile.am): Likewise.
10379         * modules/quote (Makefile.am): Likewise.
10380         * modules/quotearg (Makefile.am): Likewise.
10381         * modules/raise (Makefile.am): Likewise.
10382         * modules/read-file (Makefile.am): Likewise.
10383         * modules/readline (Makefile.am): Likewise.
10384         * modules/readlink (Makefile.am): Likewise.
10385         * modules/readtokens (Makefile.am): Likewise.
10386         * modules/readutmp (Makefile.am): Likewise.
10387         * modules/realloc (Makefile.am): Likewise.
10388         * modules/regex (Makefile.am): Likewise.
10389         * modules/rename (Makefile.am): Likewise.
10390         * modules/rename-dest-slash (Makefile.am): Likewise.
10391         * modules/rijndael (Makefile.am): Likewise.
10392         * modules/rmdir (Makefile.am): Likewise.
10393         * modules/rpmatch (Makefile.am): Likewise.
10394         * modules/safe-read (Makefile.am): Likewise.
10395         * modules/safe-write (Makefile.am): Likewise.
10396         * modules/same (Makefile.am): Likewise.
10397         * modules/save-cwd (Makefile.am): Likewise.
10398         * modules/savedir (Makefile.am): Likewise.
10399         * modules/setenv (Makefile.am): Likewise.
10400         * modules/settime (Makefile.am): Likewise.
10401         * modules/sha1 (Makefile.am): Likewise.
10402         * modules/sig2str (Makefile.am): Likewise.
10403         * modules/snprintf (Makefile.am): Likewise.
10404         * modules/stdlib-safer (Makefile.am): Likewise.
10405         * modules/stpcpy (Makefile.am): Likewise.
10406         * modules/stpncpy (Makefile.am): Likewise.
10407         * modules/strcase (Makefile.am): Likewise.
10408         * modules/strcasestr (Makefile.am): Likewise.
10409         * modules/strchrnul (Makefile.am): Likewise.
10410         * modules/strcspn (Makefile.am): Likewise.
10411         * modules/strdup (Makefile.am): Likewise.
10412         * modules/strerror (Makefile.am): Likewise.
10413         * modules/strftime (Makefile.am): Likewise.
10414         * modules/strndup (Makefile.am): Likewise.
10415         * modules/strnlen (Makefile.am): Likewise.
10416         * modules/strpbrk (Makefile.am): Likewise.
10417         * modules/strsep (Makefile.am): Likewise.
10418         * modules/strstr (Makefile.am): Likewise.
10419         * modules/strtod (Makefile.am): Likewise.
10420         * modules/strtoimax (Makefile.am): Likewise.
10421         * modules/strtok_r (Makefile.am): Likewise.
10422         * modules/strtol (Makefile.am): Likewise.
10423         * modules/strtoll (Makefile.am): Likewise.
10424         * modules/strtoul (Makefile.am): Likewise.
10425         * modules/strtoull (Makefile.am): Likewise.
10426         * modules/strtoumax (Makefile.am): Likewise.
10427         * modules/strverscmp (Makefile.am): Likewise.
10428         * modules/time_r (Makefile.am): Likewise.
10429         * modules/timegm (Makefile.am): Likewise.
10430         * modules/tmpfile-safer (Makefile.am): Likewise.
10431         * modules/unistd-safer (Makefile.am): Likewise.
10432         * modules/unlinkdir (Makefile.am): Likewise.
10433         * modules/userspec (Makefile.am): Likewise.
10434         * modules/utime (Makefile.am): Likewise.
10435         * modules/utimecmp (Makefile.am): Likewise.
10436         * modules/utimens (Makefile.am): Likewise.
10437         * modules/vasnprintf (Makefile.am): Likewise.
10438         * modules/vasprintf (Makefile.am): Likewise.
10439         * modules/vsnprintf (Makefile.am): Likewise.
10440         * modules/xalloc (Makefile.am): Likewise.
10441         * modules/xgetcwd (Makefile.am): Likewise.
10442         * modules/xnanosleep (Makefile.am): Likewise.
10443         * modules/xreadlink (Makefile.am): Likewise.
10444         * modules/xstrtod (Makefile.am): Likewise.
10445         * modules/xstrtol (Makefile.am): Likewise.
10446         * modules/xstrtold (Makefile.am): Likewise.
10447         * modules/yesno (Makefile.am): Likewise.
10448
10449 2006-10-12  Jim Meyering  <jim@meyering.net>
10450
10451         * m4/getloadavg.m4: Revert the change below.
10452
10453         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
10454         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
10455         fail with a symlink, which is what coreutils' ./bootstrap now
10456         creates by default.
10457
10458 2006-10-12  Bruno Haible  <bruno@clisp.org>
10459
10460         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
10461         mingw.
10462         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
10463         MSVC and mingw explicitly.
10464
10465 2006-10-11  Simon Josefsson  <jas@extundo.com>
10466             Bruno Haible  <bruno@clisp.org>
10467
10468         Add support for multiple gnulib-tool invocations in the scope of a
10469         single configure.ac file.
10470         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
10471         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
10472         with the same contents as the _LIBADD variable.
10473         (func_emit_initmacro_start, func_emit_initmacro_end,
10474         func_emit_initmacro_done): New functions.
10475         (func_import, func_create_testdir): Invoke them. Allow the identifiers
10476         gl_LIBOBJS and gl_LTLIBOBJS.
10477
10478 2006-10-11  Bruno Haible  <bruno@clisp.org>
10479
10480         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
10481         (func_create_testdir): Don't create po/Makefile.am, don't invoke
10482         autoreconf. Instead, invoke autopoint explicitly but move back the
10483         *.m4 files from gnulib.
10484
10485 2006-10-11  Bruno Haible  <bruno@clisp.org>
10486
10487         * gnulib-tool (func_usage): Make module names after --create-testdir
10488         optional.
10489         (func_create_testdir): If no module was specified, use nearly all
10490         modules.
10491
10492 2006-10-12  Jim Meyering  <jim@meyering.net>
10493
10494         Big performance improvement for fts-based tools that use FTS_NOSTAT.
10495         Avoid spurious inode-mismatch problems on non-POSIX file systems.
10496         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
10497         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
10498         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
10499         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
10500         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
10501         (fts_set_stat_required): New function.
10502         (fts_open): Defer the calls to fts_stat, if possible or requested.
10503         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
10504         into fts_stat itself.
10505         (fts_read): Perform any required (deferred) fts_stat call.
10506         (fts_build): Likewise, for the directory we're about to open and read.
10507         In the readdir loop, carefully decide whether each entry will require
10508         an eventual call to fts_stat, using dirent.d_type info if available.
10509         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
10510         a command line argument into this function.  Update all callers.
10511         Map a return value of FTS_DOT to FTS_D for a command line argument.
10512         * modules/fts (Depends-on): Add d-type.  Alphabetize.
10513         Thanks to Miklos Szeredi for his tenacity and for the initial
10514         bug report about "find" failing on a FUSE-based file system.
10515
10516         * lib/fts.c (fts_open): Use consistent indentation.
10517
10518 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10519
10520         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
10521         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
10522         reported by Jim Meyering.  All uses of cache variables renamed
10523         to match Autoconf's.
10524         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
10525         the other one.
10526
10527         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
10528         Fix misspelling in diagnostic.
10529
10530 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10531
10532         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
10533         defined.  Problem reported by Matthew Woehlke.
10534
10535         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
10536         Add support for Tandem NonStop R series.
10537         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
10538         Use new macro.
10539
10540         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
10541         (has_trailing_slash): Omit size arg; all callers changed.
10542         Omit 'inline', since it doesn't help performance and we'd
10543         need to configure it.
10544         Don't count //, ///, etc. as having a trailing slash.
10545         As a side effect, this removes a C99ism reported by Matthew Woehlke.
10546         (rpl_rename_dest_slash): On failure, use rename's errno rather
10547         than (in some cases) an incorrect or junk errno.
10548         Simplify code by removing need to compute length; this does
10549         cause it to make two passes instead of one over the file name,
10550         but it's worth it.
10551
10552         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
10553         change, since Autoconf's version may no longer be appropriate now
10554         that we are using CVS Autoconf's version.  Add support for Tandem.
10555
10556 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10557             Bruno Haible  <bruno@clisp.org>
10558
10559         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
10560         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
10561         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
10562         gl_AC_TYPE_LONG_LONG.
10563
10564         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
10565         instead of HAVE_LONG_LONG.
10566         * lib/printf-args.c (printf_fetchargs): Likewise.
10567         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
10568         * lib/vasnprintf.c (VASNPRINTF): Likewise.
10569         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
10570         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
10571         gl_AC_TYPE_LONG_LONG.
10572
10573 2006-10-11  Bruno Haible  <bruno@clisp.org>
10574
10575         * m4/longlong.m4: Add comments.
10576         * m4/ulonglong.m4: Likewise.
10577
10578 2006-10-10  Bruno Haible  <bruno@clisp.org>
10579
10580         Make it possible to #define stpcpy, strdup to aliases.
10581         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
10582         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
10583
10584 2006-10-10  Bruno Haible  <bruno@clisp.org>
10585
10586         Make it possible to #define gcd to an alias.
10587         * lib/gcd.c: Include config.h.
10588
10589 2006-10-10  Bruno Haible  <bruno@clisp.org>
10590
10591         Make it possible to #define c_isascii to an alias.
10592         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
10593         defined. Undefine the macros before defining them, to avoid gcc
10594         warnings.
10595         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
10596         define NO_C_CTYPE_MACROS early.
10597
10598 2006-10-10  Bruno Haible  <bruno@clisp.org>
10599
10600         Make it possible to #define set_program_name to an alias.
10601         * lib/progname.c: Don't undefine set_program_name; instead, undefine
10602         ENABLE_RELOCATABLE early.
10603
10604 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10605
10606         Port to Tandem NSK OSS, which has 64-bit signed int but at most
10607         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
10608         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
10609         More generally, don't assume that 64-bit signed int is available
10610         if unsigned int is, and vice versa.
10611         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
10612         unsigned symbols, not on their signed counterparts.
10613         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
10614         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
10615         (UINT64_C, UINTMAX_C):
10616         Likewise.
10617         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
10618         unsigned counterparts.
10619         (Have_long_long, Unsigned): New macros.
10620         (Int): Renamed from INT.
10621         (strtoimax): Use the new macros.
10622         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
10623         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
10624         * modules/inttypes (inttypes.h): Substitute
10625         HAVE_UNSIGNED_LONG_LONG_INT.
10626         * modules/stdint (stdint.h): Likewise.
10627         (Files): Add m4/ulonglong.m4.
10628
10629 2006-10-10  Bruno Haible  <bruno@clisp.org>
10630
10631         Fix a gcc -Wshadow warning.
10632         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
10633         to 'bucket'.
10634         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
10635         gl_linked_indexof_from_to): Likewise.
10636         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
10637         Likewise.
10638         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
10639         Likewise.
10640         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
10641         Reported by Eric Blake.
10642
10643 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
10644
10645         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
10646         for NetBSD.  Problem reported by Bruno Haible.
10647
10648 2006-10-09  Jim Meyering  <jim@meyering.net>
10649
10650         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
10651         Patch from Bruno Haible.
10652
10653 2006-10-09  Jim Meyering  <jim@meyering.net>
10654
10655         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
10656         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
10657         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
10658
10659 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
10660
10661         Don't include <config.h> twice; this doesn't work in some cases,
10662         e.g., when config.h has "#define intmax_t long long int" and
10663         we include <config.h>, <inttypes.h>, <config.h> in that order.
10664         Problem reported by Matthew Woehlke in:
10665         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
10666         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
10667         * lib/fts-cycle.c: Don't include config.h.
10668         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
10669         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
10670         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
10671         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
10672         inttypes.h.
10673         * lib/xstrtoumax.c: Likewise.
10674         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
10675         __strtol and the like, so that this module is more like its siblings.
10676         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
10677         Remove; no longer needed now that we assume gnulib inttypes.h.
10678
10679 2006-10-08  Bruno Haible  <bruno@clisp.org>
10680
10681         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
10682         option.
10683
10684 2006-10-07  Jim Meyering  <jim@meyering.net>
10685
10686         * modules/inttypes (inttypes.h): Revert what seems to have been
10687         an inadvertent part of today's change: use "|", not "/" in the
10688         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
10689
10690 2006-10-07  Bruno Haible  <bruno@clisp.org>
10691
10692         * modules/sublist: New file.
10693
10694 2006-10-07  Bruno Haible  <bruno@clisp.org>
10695
10696         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
10697         * modules/argz (argz.h): Likewise.
10698         * modules/arpa_inet (arpa/inet.h): Likewise.
10699         * modules/byteswap (byteswap.h): Likewise.
10700         * modules/configmake (configmake.h): Likewise.
10701         * modules/fcntl (fcntl.h): Likewise.
10702         * modules/fnmatch (fnmatch.h): Likewise.
10703         * modules/getopt (getopt.h): Likewise.
10704         * modules/glob (glob.h): Likewise.
10705         * modules/inttypes (inttypes.h): Likewise.
10706         * modules/netinet_in (netinet/in.h): Likewise.
10707         * modules/poll (poll.h): Likewise.
10708         * modules/stdbool (stdbool.h): Likewise.
10709         * modules/stdint (stdint.h): Likewise.
10710         * modules/sys_select (sys/select.h): Likewise.
10711         * modules/sys_socket (sys/socket.h): Likewise.
10712         * modules/sys_stat (sys/stat.h): Likewise.
10713         * modules/sysexits (sysexits.h): Likewise.
10714         * modules/unistd (unistd.h): Likewise.
10715         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10716         Add a "DO NOT EDIT" comment to the generated file.
10717         (func_import): Likewise for gnulib-comp.m4.
10718
10719 2006-10-07  Bruno Haible  <bruno@clisp.org>
10720
10721         * lib/gl_sublist.h: New file.
10722         * lib/gl_sublist.c: New file.
10723
10724 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10725
10726         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
10727         name (relative to the original working directory) and the file
10728         name component (relative to the temporary working directory).  All
10729         callers changed.
10730         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
10731         * lib/mkdir-p.c (make_dir_parents): Likewise.
10732         * lib/mkdir-p.h (make_dir_parents): Likewise.
10733
10734 2006-10-06  Eric Blake  <ebb9@byu.net>
10735
10736         Define several macros for use by the clean-temp module.
10737         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
10738         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
10739         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
10740
10741         * lib/clean-temp.h (close_stream_temp): New declaration.
10742         * lib/clean-temp.c (includes): Pull in headers according to what
10743         other modules are in use.
10744         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
10745
10746 2006-10-06  Bruno Haible  <bruno@clisp.org>
10747
10748         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
10749         instead of fopen, fwriteerror.
10750
10751 2006-10-06  Bruno Haible  <bruno@clisp.org>
10752
10753         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
10754         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
10755         int.
10756         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
10757         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
10758         Return an error indicator.
10759         Suggested by Eric Blake.
10760
10761 2006-10-06  Bruno Haible  <bruno@clisp.org>
10762
10763         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
10764         Reported by Eric Blake.
10765
10766 2006-10-06  Bruno Haible  <bruno@clisp.org>
10767
10768         * modules/closeout (Description): Mention stderr too.
10769
10770 2006-10-06  Bruno Haible  <bruno@clisp.org>
10771         and Paul Eggert  <eggert@cs.ucla.edu>
10772
10773         * lib/closeout.c (close_stdout): Also close stderr.
10774         * lib/closeout.h: Update comment.
10775
10776 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10777
10778         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
10779         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
10780         * lib/dirchownmod.c: Include lchown.h.
10781         * lib/lchown.c: Don't include files that lchown.h now includes.
10782         Don't declare chown, since lchown.h now does that.
10783         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
10784         (lchown): Define to rpl_chown if lchown is declared but
10785         does not exist.  Declare using a prototype if lchown is not
10786         declared.  Add a copyright notice.
10787         * lib/mkstemp.h: Include <unistd.h>.
10788         * lib/openat.c: Include lchown.h.
10789
10790         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
10791         we now test for that separately.
10792         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
10793         rather than O_NOFOLLOW, when testing whether it's possible to
10794         avoid a race condition reliably.
10795         * lib/savewd.c (savewd_chdir): Likewise.
10796
10797         Remove macros that are no longer needed now that stdint.h is
10798         reliable.
10799         * lib/fsusage.c (UINTMAX_MAX): Remove.
10800         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
10801         * lib/utimecmp.c (SIZE_MAX): Remove.
10802
10803         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
10804
10805         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
10806         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
10807         O_NOATIME works.
10808
10809 2006-10-05  Bruno Haible  <bruno@clisp.org>
10810
10811         * lib/gl_list.h (gl_sortedlist_search_from_to,
10812         gl_sortedlist_indexof_from_to): New declarations.
10813         (gl_list_implementation): New fields sortedlist_search_from_to,
10814         sortedlist_indexof_from_to.
10815         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
10816         inline functions.
10817         * lib/gl_list.c (gl_sortedlist_search_from_to,
10818         gl_sortedlist_indexof_from_to): New functions.
10819         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
10820         function.
10821         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
10822         (gl_array_sortedlist_search_from_to): New function.
10823         (gl_array_list_implementation): Update.
10824         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
10825         function.
10826         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
10827         (gl_carray_sortedlist_search_from_to): New function.
10828         (gl_carray_list_implementation): Update.
10829         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
10830         gl_linked_sortedlist_indexof_from_to): New functions.
10831         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10832         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10833         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
10834         gl_tree_sortedlist_indexof_from_to): New functions.
10835         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10836         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10837         Update.
10838         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10839         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
10840         Update.
10841
10842 2006-10-05  Bruno Haible  <bruno@clisp.org>
10843
10844         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
10845         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
10846         (struct gl_list_implementation): Add fields search_from_to,
10847         indexof_from_to. Remove fields search, indexof.
10848         (gl_list_search): Use the search_from_to method.
10849         (gl_list_search_from, gl_list_search_from_to): New functions.
10850         (gl_list_indexof): Use the indexof_from_to method.
10851         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10852         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
10853         (gl_list_search_from, gl_list_search_from_to): New functions.
10854         (gl_list_indexof): Use the indexof_from_to method.
10855         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10856         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
10857         gl_array_indexof. Add start_index, end_index arguments.
10858         (gl_array_search_from_to): Renamed from gl_array_search. Add
10859         start_index, end_index arguments.
10860         (gl_array_remove, gl_array_list_implementation): Update.
10861         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
10862         gl_carray_indexof. Add start_index, end_index arguments.
10863         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
10864         start_index, end_index arguments.
10865         (gl_carray_remove, gl_carray_list_implementation): Update.
10866         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
10867         gl_linked_search. Add start_index, end_index arguments.
10868         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
10869         start_index, end_index arguments.
10870         (gl_linked_remove): Update.
10871         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10872         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10873         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
10874         field to 'size_t'.
10875         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
10876         gl_tree_search. Add start_index, end_index arguments.
10877         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10878         start_index, end_index arguments.
10879         (gl_tree_remove): Update.
10880         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10881         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10882         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
10883         function.
10884         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
10885         gl_tree_search. Add start_index, end_index arguments.
10886         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10887         start_index, end_index arguments.
10888         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10889         Update.
10890         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
10891
10892 2006-10-05  Bruno Haible  <bruno@clisp.org>
10893
10894         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
10895
10896         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
10897         fwriteerror_temp): New declarations.
10898         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
10899         (descriptors): New variable.
10900         (cleanup): First, close the descriptors.
10901         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
10902         fclose_temp, fwriteerror_temp): New functions.
10903
10904 2006-10-04  Jim Meyering  <jim@meyering.net>
10905
10906         * lib/fts.c (fts_open): Tiny comment change.
10907
10908 2006-10-04  Bruno Haible  <bruno@clisp.org>
10909
10910         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
10911         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
10912         gl_LOCK_BODY.
10913         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
10914         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
10915         gl_LOCK_EARLY_BODY.
10916         (gl_LOCK): Require gl_LOCK_BODY.
10917
10918 2006-10-04  Bruno Haible  <bruno@clisp.org>
10919
10920         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
10921         (gl_oset_search_atleast): New declaration.
10922         (struct gl_oset_implementation): Add field 'search_atleast'.
10923         (gl_oset_search_atleast): New inline function.
10924         * lib/gl_oset.c (gl_oset_search_atleast): New function.
10925         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
10926         (gl_array_oset_implementation): Update.
10927         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
10928         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
10929         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
10930
10931 2006-10-04  Bruno Haible  <bruno@clisp.org>
10932
10933         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
10934
10935 2006-10-03  Bruno Haible  <bruno@clisp.org>
10936
10937         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
10938         from gl_avltreehash_list_implementation.
10939
10940 2006-10-03  Bruno Haible  <bruno@clisp.org>
10941
10942         * lib/gl_oset.c (gl_oset_add): Fix return type.
10943
10944 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
10945
10946         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
10947
10948 2006-10-02  Eric Blake  <ebb9@byu.net>
10949
10950         * modules/strnlen (Depends-on): Add extensions.
10951
10952 2006-10-02  Eric Blake  <ebb9@byu.net>
10953
10954         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
10955         definition in 2.60+.
10956
10957 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
10958
10959         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
10960         checks.
10961
10962 2006-10-02  Bruno Haible  <bruno@clisp.org>
10963
10964         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
10965         to the AUTOMAKE_OPTIONS.
10966         Reported by Jim Meyering.
10967
10968 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10969
10970         Work around bug in Solaris 10 /proc file system:
10971         /proc/self/fd/NNN/.. isn't the parent directory of
10972         the directory whose file descriptor is NNN.  This needs to
10973         be worked around at run time, not compile time, since a
10974         program might be built on Solaris 8, where things work, and
10975         run on Solaris 10.
10976         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
10977         to use the following interface instead:
10978         (OPENAT_BUFFER_SIZE): New macro.
10979         (openat_proc_name): New function.
10980         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
10981         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
10982         Likewise.
10983         * lib/openat-proc.c: New file.
10984         * modules/openat (Files): Add lib/openat-proc.c.
10985         (Depends-on): Add same-inode, stdbool.
10986         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
10987
10988 2006-09-29  Bruno Haible  <bruno@clisp.org>
10989
10990         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
10991         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
10992         argument. Set stdout_closed before testing for ferror, not after.
10993         (fwriteerror, fwriteerror_no_ebadf): New functions.
10994
10995 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10996
10997         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
10998
10999 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
11000
11001         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
11002         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
11003
11004 2006-09-28  Jim Meyering  <jim@meyering.net>
11005
11006         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
11007         Include <unistd.h>.
11008
11009 2006-09-28  Bruno Haible  <bruno@clisp.org>
11010
11011         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
11012         * modules/linkedhash-list (Depends-on): Likewise.
11013         * modules/rbtreehash-list (Depends-on): Likewise.
11014
11015 2006-09-28  Bruno Haible  <bruno@clisp.org>
11016
11017         * lib/strndup.h: Simplify the redefinition of strndup.
11018         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
11019         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
11020
11021 2006-09-28  Bruno Haible  <bruno@clisp.org>
11022
11023         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
11024         * lib/gl_linkedhash_list.c: Likewise.
11025         * lib/gl_rbtreehash_list.c: Likewise.
11026
11027 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11028
11029         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
11030         getaddrinfo.
11031
11032         * lib/__fpending.h: Don't include <stdio_ext.h> unless
11033         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
11034         it causes <stdio_ext.h> to cause a compile-time error.
11035         Problem reported by Nelson H. F. Beebe.
11036         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
11037         of HAVE_DECL___PENDING.
11038
11039         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
11040         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
11041         declaration.
11042
11043 2006-09-27  Jim Meyering  <jim@meyering.net>
11044
11045         This file could end up with a definition for a function
11046         named __strndup, rather than rpl_strndup on a system with
11047         incomplete weak_alias support.
11048         * lib/strndup.c (strndup): Rename from __strndup.
11049         Remove #defines that used to map __strndup to strndup.
11050         Don't use K&R prototypes.
11051         Remove LIBC-related code, since this file is not sync'd with glibc.
11052         * lib/strndup.h: Revamp, accordingly.
11053         * m4/strndup.m4: Modernize.
11054
11055 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11056
11057         * modules/savewd (Depends-on): Add 'raise'.
11058         * lib/savewd.c: Include <signal.h>, for 'raise'.
11059
11060 2006-09-26  Jim Meyering  <jim@meyering.net>
11061
11062         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
11063         when we detect Darwin 8.7.0's acl_get_file bug.
11064         Rearrange to perform the new (below) run-test while $LIBS
11065         contains any acl-related library.  Set USE_ACL at the end.
11066         (gl_ACL_GET_FILE): New function.
11067
11068 2006-09-26  Eric Blake  <ebb9@byu.net>
11069
11070         * lib/verror.c: Include <config.h> unconditionally.
11071
11072 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
11073
11074         * modules/clock-time (Maintainer): Add self.
11075         * modules/getlogin_r (Depends-on): Add extensions.
11076
11077 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11078
11079         * modules/clock-time: New module.
11080         * modules/nanosleep (Depends-on): Add clock-time.
11081         * modules/gethrxtime (Depends-on): Likewise.
11082         * modules/gettime (Depends-on): Likewise.
11083         * modules/settime (Depends-on): Likewise.
11084
11085         * modules/fts-lgpl: Depend on openat.
11086         * modules/mkancesdirs: Depend on savewd.
11087         * modules/mkdir-p: Likewise.
11088
11089 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11090
11091         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
11092
11093         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
11094         `gl_have_arbitrary_file_name_length_limit' to
11095         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
11096         actually works between configure runs.
11097
11098 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11099             Bruno Haible  <bruno@clisp.org>
11100
11101         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
11102
11103 2006-09-25  Jim Meyering  <jim@meyering.net>
11104
11105         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
11106         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
11107
11108 2006-09-25  Eric Blake  <ebb9@byu.net>
11109
11110         * gnulib-tool (func_import, func_create_testdir): Fix typos in
11111         exec's in 2006-09-18 patch when shuffling fds.
11112
11113 2006-09-25  Bruno Haible  <bruno@clisp.org>
11114
11115         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
11116         Reported by Jim Meyering.
11117
11118 2006-09-24  Jim Meyering  <jim@meyering.net>
11119
11120         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
11121         compare a pointer against a literal "0".  That caused failures with
11122         at least HP-UX's hpcc.
11123
11124 2006-09-22  Simon Josefsson  <jas@extundo.com>
11125
11126         * modules/gc-sha1:
11127         * modules/gc-md4:
11128         * modules/gc-hmac-sha1:
11129         * modules/gc-hmac-md5:
11130         * modules/gc-des:
11131         * modules/gc-arcfour: Distribute more files.
11132
11133 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11134
11135         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
11136         (gl_linked_iterator_from_to): Initialize struct completely.
11137         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
11138         (gl_tree_iterator_from_to): Likewise
11139         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
11140         * lib/gl_array_list.c [lint] (gl_array_iterator)
11141         (gl_array_iterator_from_to): Likewise.
11142         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
11143         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
11144         (gl_carray_iterator_from_to): Likewise.
11145
11146         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
11147         * lib/md4.c (md4_process_block): Remove unused variable.
11148         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
11149         parentheses for clarity.
11150
11151 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11152
11153         * modules/bison-i18n (Depends-on): Add gettext.
11154
11155 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11156
11157         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
11158         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
11159         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
11160         also add missing comma that caused broken test.
11161         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
11162         stdlib.h, for `abort'.
11163         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
11164         variables.
11165         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
11166         include unistd.h if present, for `rmdir'.
11167         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
11168         variables.
11169         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
11170         in the process include standard headers for prototypes.
11171         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
11172         gets declared on GNU/Linux.
11173         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
11174         unistd.h, for `rmdir'.
11175         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
11176
11177         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
11178         always true.
11179         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
11180
11181         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
11182
11183 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11184
11185         * gnulib-tool (func_version): Create output all at once.  This
11186         may help avoid triggering unnecessary SIGPIPEs, and at any
11187         rate it doesn't hurt.
11188
11189 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11190             Bruno Haible  <bruno@clisp.org>
11191
11192         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
11193         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
11194         * m4/signed.m4 (bh_C_SIGNED): Likewise.
11195
11196         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
11197         (gl_FUNC_VASPRINTF): Invoke it.
11198
11199 2006-09-22  Bruno Haible  <bruno@clisp.org>
11200
11201         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
11202         getloadavg.c as first argument.
11203
11204 2006-09-22  Bruno Haible  <bruno@clisp.org>
11205
11206         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
11207         at the beginning of the gl_INIT macro.
11208         * modules/getloadavg (configure.ac): Pass $gl_source_base to
11209         gl_GETLOADAVG.
11210
11211 2006-09-22  Bruno Haible  <bruno@clisp.org>
11212
11213         * gnulib-tool (func_create_megatestdir): Don't include the config-h
11214         module.
11215         Suggested by Ralf Wildenhues.
11216
11217 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
11218
11219         Import this patch from libc:
11220
11221         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
11222
11223         * lib/regex_internal.c (re_string_reconstruct): Handle
11224         offset < pstr->valid_raw_len && pstr->offsets_needed case.
11225         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
11226         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
11227         re_string_context_at.
11228
11229         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
11230         now requires it.
11231         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
11232         gl_REGEX now does it for us.
11233         (gl_REGEX): Add test taken from
11234         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
11235
11236         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
11237         Check that large offsets work.  Modernize Autoconf usages.
11238         Prefer "yes" to mean a good thing rather than a bad.
11239         Don't put "#define mkstemp" in config.h, as this might interfere
11240         with standard system headers that "#define mkstemp mkstemp64".
11241
11242         * modules/mkstemp (Depends-on): Add extensions, so that
11243         mkstemp is visible on some platforms.
11244         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
11245         (Include): Change to "mkstemp.h" from <stdlib.h>.
11246         (Files): Add mkstemp.h.
11247
11248         * lib/mkstemp.h: New file, since some standard headers
11249         #define mkstemp.
11250         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
11251         Include "mkstemp.h".
11252         Make the _LIBC code resemble glibc original more,
11253         e.g., use K&R style.
11254         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
11255         (mkstemp): Remove, since mkstemp.h does this for us.
11256         * lib/stdlib--.h: Include mkstemp.h.
11257
11258         Import this patch from libc:
11259
11260         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11261
11262         * lib/tempname.c (__gen_tempname): Change attempts_min
11263         into a macro.  Use preprocessor to decide how to initialize
11264         attempts [Coverity CID 67].
11265
11266 2006-09-20  Bruno Haible  <bruno@clisp.org>
11267
11268         * lib/mkdtemp.c: Import from libc.
11269         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11270                 * sysdeps/posix/tempname.c (__gen_tempname): Change
11271                 attempts_min into a macro.  Use preprocessor to decide how to
11272                 initialize attempts [Coverity CID 67].
11273         2001-11-27  Paul Eggert  <eggert@twinsun.com>
11274                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
11275                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
11276
11277 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11278
11279         * gnulib-tool (func_exit): New function, to allow to pass the
11280         exit status portably through the trap.  Use everywhere.
11281         (--help, --version): Signal a write error.
11282         (trap): catch SIGPIPE, for write errors.
11283         Exit at the end of the trap, with the correct exit status.
11284
11285 2006-09-19  Karl Berry  <karl@gnu.org>
11286
11287         * doc/gnulib.texi: note about the license texinfo files.
11288
11289 2006-09-19  Eric Blake  <ebb9@byu.net>
11290
11291         * gnulib-tool: Avoid space-tab.
11292
11293 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11294
11295         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
11296         that prevented coreutils 6.1 from building.  Problem reported
11297         by Petter Reinholdtsen.
11298
11299 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11300
11301         * gnulib-tool (avoidlist): Fix typo that broke options like
11302         --avoid=lock that are used by coreutils bootstrap.
11303
11304 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
11305
11306         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
11307         more systematically.
11308
11309 2006-09-18  Jim Meyering  <jim@meyering.net>
11310
11311         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
11312
11313 2006-09-18  Bruno Haible  <bruno@clisp.org>
11314
11315         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
11316
11317 2006-09-18  Bruno Haible  <bruno@clisp.org>
11318
11319         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
11320         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
11321         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
11322         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
11323         * m4/gettext.m4: Require autoconf >= 2.52.
11324         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
11325         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
11326         of gl_cv_header_inttypes_h.
11327
11328 2006-09-18  Bruno Haible  <bruno@clisp.org>
11329
11330         * lib/javaversion.c: Include configmake.h.
11331
11332 2006-09-18  Bruno Haible  <bruno@clisp.org>
11333
11334         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
11335         avoid that the while loops be executed in a subshell.
11336
11337 2006-09-18  Bruno Haible  <bruno@clisp.org>
11338
11339         * MODULES.html.sh (func_module): Break long lines.
11340         Suggested by Bruce Korb <bkorb@gnu.org>.
11341
11342 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11343
11344         Speed up by a factor of 1.12.
11345         * gnulib-tool (nl): New variable.
11346         (func_import): Rewrite include directive extraction to only read each
11347         directive once.
11348
11349 2006-09-17  Bruno Haible  <bruno@clisp.org>
11350
11351         * modules/javaversion (Makefile.am): Remove DEFS setting.
11352         (Depends-on): Add configmake, for PKGDATADIR definition.
11353
11354 2006-09-17  Bruno Haible  <bruno@clisp.org>
11355
11356         * gnulib-tool (func_create_testdir): Rewrite all files at once.
11357
11358 2006-09-17  Bruno Haible  <bruno@clisp.org>
11359
11360         * gnulib-tool (func_append): New function, stolen from libtool.m4.
11361         (func_modules_transitive_closure, func_modules_add_dummy,
11362         func_modules_to_filelist, func_import, func_create_testdir,
11363         func_create_megatestdir, ...): Use it wherever possible.
11364         Suggested by Ralf Wildenhues.
11365
11366 2006-09-16  Karl Berry  <karl@gnu.org>
11367
11368         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
11369         to avoid sectioning errors.
11370         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
11371         [ifinfo]: blank line after @center-ed titles.
11372         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
11373         Spell FSF address consistently with others.
11374         (These changes approved by rms.)
11375
11376 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11377
11378         Speed up by a factor of 1.61.
11379         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
11380         already checked module names again.
11381
11382 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11383
11384         Speed up by a factor of 1.13.
11385         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
11386         for new_files, and the input to func_add_or_update.
11387
11388 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11389
11390         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
11391         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
11392
11393 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11394
11395         * modules/mkancesdirs (Depends-on): Add fcntl.
11396         * modules/savewd: New file.
11397         * MODULES.html.sh (File system functions): Add savewd.
11398
11399         * modules/configmake (Makefile.am): Add support for the
11400         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
11401
11402 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11403
11404         * m4/savewd.m4: New file.
11405
11406 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11407
11408         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
11409         (dirchownmod): New arg FD.  All callers changed.
11410         Use FD rather than opening the directory ourself, as opening is
11411         now the caller's responsibility.
11412         * lib/dirchownmod.h: Likewise.
11413         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
11414         hosts that require <sys/types.h> before <sys/stat.h>.  Include
11415         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
11416         (test_dir): Remove.
11417         (mkancesdirs): Return length of prefix of FILE that has already
11418         been made, or -2 if there is a child doing the work.  Redo
11419         algorithm so that it is O(N) rather than O(N**2).  Optimize away
11420         ".", and treat ".." specially since it might stray back into
11421         already-created areas.  Use a subprocess if necessary.  New arg
11422         WD; all users changed.  MAKE_DIR function should now return 1
11423         if it creates a directory that is not readable.  Return -2 if
11424         a child process is spun off.
11425         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
11426         Adjust signature to match code.
11427         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
11428         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
11429         all users changed.
11430         * lib/savewd.c, lib/savewd.h: New files.
11431
11432 2006-09-15  Jim Meyering  <jim@meyering.net>
11433
11434         * modules/rename-dest-slash: New module.
11435         * MODULES.html.sh (posix_compat): Add it here.
11436
11437         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
11438
11439 2006-09-15  Jim Meyering  <jim@meyering.net>
11440
11441         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
11442         file.
11443
11444         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
11445
11446 2006-09-15  Jim Meyering  <jim@meyering.net>
11447
11448         * lib/rename-dest-slash.c (has_trailing_slash): Use
11449         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
11450         (rpl_rename_dest_slash): Perform the cheaper trailing slash
11451         test before testing whether SRC is a directory.
11452         Suggestions from Bruno Haible.
11453
11454         Avoid a warning about an unused variable.
11455         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
11456         into the #ifdef block where it's used.
11457
11458         * lib/rename-dest-slash.c: New file.
11459
11460 2006-09-14  Bruno Haible  <bruno@clisp.org>
11461
11462         * lib/allocsa.c: Include <config.h> unconditionally.
11463         * lib/asnprintf.c: Likewise.
11464         * lib/asprintf.c: Likewise.
11465         * lib/c-strcasecmp.c: Likewise.
11466         * lib/c-strcasestr.c: Likewise.
11467         * lib/c-strncasecmp.c: Likewise.
11468         * lib/c-strstr.c: Likewise.
11469         * lib/classpath.c: Likewise.
11470         * lib/clean-temp.c: Likewise.
11471         * lib/concatpath.c: Likewise.
11472         * lib/copy-file.c: Likewise.
11473         * lib/csharpcomp.c: Likewise.
11474         * lib/csharpexec.c: Likewise.
11475         * lib/execute.c: Likewise.
11476         * lib/fatal-signal.c: Likewise.
11477         * lib/findprog.c: Likewise.
11478         * lib/fwriteerror.c: Likewise.
11479         * lib/gl_array_list.c: Likewise.
11480         * lib/gl_array_oset.c: Likewise.
11481         * lib/gl_avltree_list.c: Likewise.
11482         * lib/gl_avltree_oset.c: Likewise.
11483         * lib/gl_avltreehash_list.c: Likewise.
11484         * lib/gl_carray_list.c: Likewise.
11485         * lib/gl_linked_list.c: Likewise.
11486         * lib/gl_linkedhash_list.c: Likewise.
11487         * lib/gl_list.c: Likewise.
11488         * lib/gl_oset.c: Likewise.
11489         * lib/gl_rbtree_list.c: Likewise.
11490         * lib/gl_rbtree_oset.c: Likewise.
11491         * lib/gl_rbtreehash_list.c: Likewise.
11492         * lib/imaxabs.c: Likewise.
11493         * lib/imaxdiv.c: Likewise.
11494         * lib/javacomp.c: Likewise.
11495         * lib/javaexec.c: Likewise.
11496         * lib/javaversion.c: Likewise.
11497         * lib/linebreak.c: Likewise.
11498         * lib/localcharset.c: Likewise.
11499         * lib/lock.c: Likewise.
11500         * lib/mbchar.c: Likewise.
11501         * lib/mbswidth.c: Likewise.
11502         * lib/mkdtemp.c: Likewise.
11503         * lib/pipe.c: Likewise.
11504         * lib/printf-args.c: Likewise.
11505         * lib/printf-parse.c: Likewise.
11506         * lib/progname.c: Likewise.
11507         * lib/progreloc.c: Likewise.
11508         * lib/readlink.c: Likewise.
11509         * lib/sh-quote.c: Likewise.
11510         * lib/stpcpy.c: Likewise.
11511         * lib/stpncpy.c: Likewise.
11512         * lib/strcasecmp.c: Likewise.
11513         * lib/strcasestr.c: Likewise.
11514         * lib/strcspn.c: Likewise.
11515         * lib/striconv.c: Likewise.
11516         * lib/strncasecmp.c: Likewise.
11517         * lib/strnlen1.c: Likewise.
11518         * lib/strstr.c: Likewise.
11519         * lib/strtok_r.c: Likewise.
11520         * lib/tls.c: Likewise.
11521         * lib/tmpdir.c: Likewise.
11522         * lib/unicodeio.c: Likewise.
11523         * lib/unsetenv.c: Likewise.
11524         * lib/vasnprintf.c: Likewise.
11525         * lib/vasprintf.c: Likewise.
11526         * lib/wait-process.c: Likewise.
11527         * lib/xallocsa.c: Likewise.
11528         * lib/xsetenv.c: Likewise.
11529         * lib/xstriconv.c: Likewise.
11530
11531 2006-09-13  Simon Josefsson  <jas@extundo.com>
11532
11533         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
11534         that internally, suggested by Ralf Wildenhues
11535         <Ralf.Wildenhues@gmx.de>.
11536
11537 2006-09-13  Simon Josefsson  <jas@extundo.com>
11538
11539         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
11540         @LIBOBJS@.
11541         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11542
11543 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
11544
11545         * lib/_fpending.c: Include <config.h> unconditionally, since we no
11546         longer worry about uses that don't define HAVE_CONFIG_H.
11547         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
11548         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
11549         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
11550         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
11551         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
11552         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
11553         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
11554         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
11555         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
11556         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
11557         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
11558         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
11559         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
11560         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
11561         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
11562         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
11563         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
11564         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
11565         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
11566         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
11567         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
11568         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
11569         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
11570         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
11571         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
11572         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
11573         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
11574         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
11575         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
11576         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
11577         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
11578         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
11579         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
11580         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
11581         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
11582         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
11583         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
11584         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
11585         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
11586         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
11587         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
11588         Likewise.
11589
11590 2006-09-13  Eric Blake  <ebb9@byu.net>
11591
11592         * lib/getopt.c: Fix typo in last commit.
11593
11594 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11595
11596         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
11597         dgettext.
11598
11599 2006-09-12  Jim Meyering  <jim@meyering.net>
11600
11601         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
11602         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
11603         Reported by Nelson H. F. Beebe.
11604
11605 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11606
11607         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
11608         program_invocation_name and program_invocation_short_name are
11609         initialized.
11610         * lib/argp-namefrob.h: Move declarations of program_invocation_name
11611         and program_invocation_short_name to argp.h, so they are visible
11612         to user programs.
11613         * lib/argp.h: Likewise
11614
11615 2006-09-10  Bruno Haible  <bruno@clisp.org>
11616
11617         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11618         m4/inttypes_h.m4, m4/uintmax_t.m4.
11619
11620 2006-09-10  Bruno Haible  <bruno@clisp.org>
11621
11622         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
11623         gl_AC_TYPE_UINTMAX_T.
11624
11625 2006-09-10  Bruno Haible  <bruno@clisp.org>
11626
11627         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
11628
11629 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11630
11631         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
11632         convention.  Text proposed by Bruno Haible.
11633         (struct argp_option): Document the use of N_() wrappers.
11634
11635         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
11636         '\v', and translate the two parts separately, instead of feeding
11637         the whole string to gettext.  This allows to exclude
11638         '\v' from the strings visible to the translator by writing doc
11639         strings as N_("..") "\v" N_("..").
11640
11641 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
11642
11643         * config/srclist.txt: Undo latest change; the bug was fixed.
11644
11645 2006-09-09  Bruno Haible  <bruno@clisp.org>
11646
11647         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
11648         assignments if building a library without libtool.
11649         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
11650         in func_emit_lib_Makefile_am.
11651         (func_import): When building a static library libfoo.a, arrange to
11652         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
11653         (func_create_testdir): Likewise.
11654         * modules/gc (configure.ac, Makefile.am): If building statically,
11655         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
11656         * modules/iconvme (configure.ac, Makefile.am): Likewise.
11657         * modules/striconv (configure.ac, Makefile.am): Likewise.
11658         Based on a suggestion by Ralf Wildenhues.
11659
11660 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11661
11662         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
11663         Check for unistd.h too, since Autoconf doesn't assume POSIX.
11664         Also:
11665
11666         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11667         Add year_2050_test to catch glibc bug 2821
11668         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11669
11670         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11671         Prefer #ifdef to #if.
11672
11673         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
11674         Return from 'main' instead of calling 'exit'.
11675
11676 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11677
11678         * lib/mktime.c (guess_time_tm): Fix bug where mktime
11679         returned the maximum time_t value rather than (time_t) -1.
11680         Problem originally reported by William Bardwell
11681         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11682
11683         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11684         Moved to here ...
11685         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11686         ... from here.
11687
11688 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11689
11690         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
11691         2821 is fixed.
11692
11693 2006-09-08  Jim Meyering  <jim@meyering.net>
11694
11695         Don't make generated files read-only.  That would bother too many
11696         people.  However, do retain the ability to work when targets are
11697         read-only: remove the destination and temporary files before writing
11698         them (when generated via sed or echo), or by using the -f option for
11699         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
11700         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11701         * modules/byteswap, modules/configmake, modules/fcntl:
11702         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11703         * modules/localcharset, modules/netinet_in, modules/poll:
11704         * modules/stdbool, modules/stdint, modules/sys_select:
11705         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11706
11707 2006-09-08  Jim Meyering  <jim@meyering.net>
11708
11709         Avoid new build failure on FreeBSD 6.0.
11710         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
11711         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
11712         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
11713
11714 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11715
11716         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
11717
11718 2006-09-07  Jim Meyering  <jim@meyering.net>
11719
11720         Fix global typo in last change: use chmod u-w, not chmod u-x.
11721         Spotted by Paul Eggert and Bruce Korb.
11722         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11723         * modules/byteswap, modules/configmake, modules/fcntl:
11724         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11725         * modules/localcharset, modules/netinet_in, modules/poll:
11726         * modules/stdbool, modules/stdint, modules/sys_select:
11727         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11728
11729 2006-09-06  Jim Meyering  <jim@meyering.net>
11730
11731         Make generated files be read-only.
11732         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
11733         Ensure that each generated file is now read-only.
11734         * modules/argz: Likewise.
11735         * modules/arpa_inet: Likewise.
11736         * modules/byteswap: Likewise.
11737         * modules/configmake: Likewise.
11738         * modules/fcntl: Likewise.
11739         * modules/fnmatch: Likewise.
11740         * modules/getopt: Likewise.
11741         * modules/glob: Likewise.
11742         * modules/inttypes: Likewise.
11743         * modules/netinet_in: Likewise.
11744         * modules/poll: Likewise.
11745         * modules/stdbool: Likewise.
11746         * modules/stdint: Likewise.
11747         * modules/sys_select: Likewise.
11748         * modules/sys_socket: Likewise.
11749         * modules/sys_stat: Likewise.
11750         * modules/sysexits: Likewise.
11751         * modules/localcharset: Same as above, but continue using temporary
11752         file named "t-$@" (why different?) rather than the "$@-t" used
11753         everywhere else.
11754
11755         * modules/sysexits (Makefile.am): Replace literal occurrences
11756         of "sysexit.h" more readable, and more consistent, "$@".
11757
11758 2006-09-06  Bruno Haible  <bruno@clisp.org>
11759
11760         * modules/striconv: New file.
11761         * modules/xstriconv: New file.
11762         * MODULES.html.sh (Internationalization functions): Add striconv,
11763         xstriconv.
11764
11765 2006-09-06  Bruno Haible  <bruno@clisp.org>
11766
11767         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
11768         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
11769         not using libtool correctly.
11770
11771 2006-09-06  Bruno Haible  <bruno@clisp.org>
11772
11773         * lib/striconv.h: New file.
11774         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
11775         iconvstring.c.
11776         * lib/xstriconv.h: New file.
11777         * lib/xstriconv.c: New file.
11778
11779 2006-09-06  Bruno Haible  <bruno@clisp.org>
11780
11781         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
11782         lib_..._LDFLAGS.
11783
11784 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11785
11786         * lib/argz_.h: Sync from Libtool.
11787
11788         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
11789                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11790
11791         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
11792
11793 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11794
11795         * modules/trim: New file.
11796
11797 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11798
11799         * lib/trim.h: New file.
11800         * lib/trim.c: New file.
11801
11802 2006-09-05  Bruno Haible  <bruno@clisp.org>
11803
11804         * MODULES.html.sh (String handling): Add trim.
11805
11806 2006-09-04  Karl Berry  <karl@gnu.org>
11807
11808         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
11809         until next release.
11810
11811 2006-09-03  Bruno Haible  <bruno@clisp.org>
11812
11813         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
11814         correctly.
11815
11816 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11817
11818         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
11819         not gl_GETLOADAVG.  Omit unneeded semicolons.
11820         Problems reported by Ralf Wildenhues in
11821         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11822         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
11823         at the end, which is the usual gnulib style.
11824
11825         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
11826         of doing all the work ourselves.
11827         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
11828         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
11829
11830 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11831
11832         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
11833         Problem reported by Ralf Wildenhues in
11834         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11835
11836         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
11837         HAVE_STRUCT_STATFS_F_FSTYPENAME.
11838
11839 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11840
11841         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
11842         yesterday's patch by changing test -n to test -z.
11843
11844 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11845
11846         * modules/getloadavg (Files): Add m4/getloadavg.m4.
11847         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
11848         the former is now obsolescent.
11849
11850         * modules/chdir-long (Depends-on): Add fcntl.
11851
11852 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11853
11854         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
11855         obsolescent, and programs should use gnulib instead.
11856         * m4/getloadavg.m4: New file, with contents taken from Autoconf
11857         but with prefixes changed.
11858
11859 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11860
11861         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
11862         or stdbool.h, because they might not exist while configuring.
11863
11864         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
11865         Don't include unistd.h or limits.h; not needed, since chdir-long.h
11866         does that for us.
11867         (O_DIRECTORY): Remove.
11868
11869 2006-08-31  Eric Blake  <ebb9@byu.net>
11870
11871         * gnulib-tool: Don't let emacs change spaces to TAB.
11872
11873 2006-08-31  Bruno Haible  <bruno@clisp.org>
11874
11875         * gnulib-tool: When calling func_import more than once, do it in a
11876         subshell.
11877         Reported by Eric Blake <ebb9@byu.net>.
11878
11879 2006-08-31  Bruno Haible  <bruno@clisp.org>
11880
11881         * gnulib-tool (nl): Remove variable.
11882         (sed_transform_lib_file): Use more robust test for config-h module.
11883         (func_import): Fix typo in 2006-08-25 patch.
11884
11885 2006-08-31  Bruno Haible  <bruno@clisp.org>
11886
11887         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
11888         specified, augment Makefile.am variables instead of assigning them.
11889
11890 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11891
11892         Work around a bug in both the Linux and SunOS 64-bit kernels:
11893         nanosleep mishandles sleeps for longer than 2**31 seconds.
11894         Problem reported by Frank v Waveren in
11895         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11896         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
11897         Check for nanosleep bug.
11898         (LIB_NANOSLEEP): Append clock_gettime library if needed.
11899
11900 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11901
11902         Work around a bug in both the Linux and SunOS 64-bit kernels:
11903         nanosleep mishandles sleeps for longer than 2**31 seconds.
11904         Problem reported by Frank v Waveren in
11905         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11906         * lib/nanosleep.c (BILLION): New constant.
11907         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
11908         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
11909         implementation.
11910
11911 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11912
11913         * modules/nanosleep (Depends-on): Add gettime.
11914
11915 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11916         and Simon Josefsson  <jas@extundo.com>
11917         and Oskar Liljeblad  <oskar@osk.mine.nu>
11918
11919         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
11920         * gnulib-tool (func_import): New license type 'unmodifiable license
11921         text'.
11922         * modules/fdl: Use it.  Longer description.
11923         * module/gpl, module/lgpl: New files.
11924
11925 2006-08-30  Jim Meyering  <jim@meyering.net>
11926
11927         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
11928         shadowing the parameter.
11929
11930 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11931
11932         Sync from Libtool:
11933
11934         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11935
11936         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
11937         sharing with gnulib.  Report by Eric Blake.
11938
11939 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11940
11941         * modules/isapipe: New file.
11942         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
11943
11944 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11945
11946         * modules/configmake (Makefile.am): Add a comment, and omit
11947         the CONFIGMAKE_ prefix from generated macro names.  Suggested
11948         by Bruno Haible.
11949
11950 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11951
11952         * m4/isapipe.m4: New file.
11953
11954 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11955
11956         * lib/isapipe.c, lib/isapipe.h: New files.
11957
11958 2006-08-29  Jim Meyering  <jim@meyering.net>
11959
11960         * modules/configmake (Makefile.am): Make configmake.h depend on
11961         Makefile.  Otherwise, a stale configmake.h could hang around.
11962
11963 2006-08-29  Eric Blake  <ebb9@byu.net>
11964
11965         * lib/error.c (error_at_line, print_errno_message): Match libc, after
11966         resolution of upstream bug 3044.
11967
11968 2006-08-29  Bruno Haible  <bruno@clisp.org>
11969
11970         * modules/localcharset (Depends-on): Add configmake.
11971         (Makefile.am): Remove setting of LIBDIR through DEFS.
11972
11973 2006-08-29  Bruno Haible  <bruno@clisp.org>
11974
11975         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
11976         defined.
11977
11978 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11979
11980         * modules/fcntl: New file.
11981         * modules/chdir-safer (Depends-on): Add fcntl.
11982         * modules/fts: Likewise.
11983         * modules/mkdir-p: Likewise.
11984
11985         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
11986         This undoes the most recent change, since we're now addressing the
11987         problem in a different way.
11988
11989         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
11990         into output, since the output might be called Makefile.am even
11991         if $makefile_name is something different.
11992         (func_import): Use $makefile_am rather than
11993         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
11994         empty.
11995
11996         * modules/inttypes (Files): Add m4/inttypes-h.m4.
11997
11998 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11999
12000         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
12001         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
12002         recent change to stdint.m4, since we're now addressing the problem in a
12003         different way.
12004
12005 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12006
12007         * m4/fcntl_h.m4: New file.
12008
12009 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12010
12011         * lib/fcntl_.h: New file.
12012         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
12013         the fcntl module.
12014         * lib/dirchownmod.c: Likewise.
12015         * lib/fts.c: Likewise.
12016
12017         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
12018         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
12019         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
12020         just before including <inttypes.h>, to avoid circular inclusion.
12021
12022 2006-08-28  Jim Meyering  <jim@meyering.net>
12023
12024         * doc/visibility.texi: Actually read and correct the grammar of the
12025         sentence affected by yesterday's change.
12026
12027 2006-08-28  Eric Blake  <ebb9@byu.net>
12028
12029         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
12030         needs wrapper.
12031
12032 2006-08-28  Eric Blake  <ebb9@byu.net>
12033
12034         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
12035
12036 2006-08-28  Eric Blake  <ebb9@byu.net>
12037
12038         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
12039
12040 2006-08-28  Bruno Haible  <bruno@clisp.org>
12041
12042         * modules/c-strstr: New file, from GNU gettext.
12043         * MODULES.html.sh (String handling): Add c-strstr.
12044
12045 2006-08-28  Bruno Haible  <bruno@clisp.org>
12046
12047         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
12048         macros.
12049         Reported by Eric Blake.
12050
12051 2006-08-28  Bruno Haible  <bruno@clisp.org>
12052
12053         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
12054         (VASNPRINTF): Return a string of length > INT_MAX without failing.
12055         * lib/vasprintf.c: Include errno.h, limits.h.
12056         (EOVERFLOW): New fallback definition.
12057         (vasprintf): Test here whether the string length is > INT_MAX.
12058         * lib/vsnprintf.c: Include errno.h, limits.h.
12059         (EOVERFLOW): New fallback definition.
12060         (vsnprintf): Fix bug when generated string was too long for the buffer.
12061         Test here whether the string length is > INT_MAX.
12062
12063 2006-08-28  Bruno Haible  <bruno@clisp.org>
12064
12065         * lib/inttypes_.h (SCNX*): Remove definitions.
12066         Reported by Eric Blake.
12067
12068 2006-08-28  Bruno Haible  <bruno@clisp.org>
12069
12070         * lib/c-strstr.h: New file, from GNU gettext.
12071         * lib/c-strstr.c: New file, from GNU gettext.
12072
12073 2006-08-28  Bruno Haible  <bruno@clisp.org>
12074
12075         * gnulib-tool: Reorder some statements.
12076
12077 2006-08-28  Bruno Haible  <bruno@clisp.org>
12078
12079         * gnulib-tool: New option --makefile-name.
12080         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
12081         $makefile_name.
12082         (func_import): Write $makefile_name to the cache file, and read it from
12083         there unless explicitly specified. Use $makefile_name as file name
12084         instead of Makefile.am. Adjust the recommendations accordingly.
12085
12086 2006-08-28  Bruno Haible  <bruno@clisp.org>
12087
12088         * gnulib-tool (func_verify_module): Check against misapplying patch.
12089
12090 2006-08-28  Bruno Haible  <bruno@clisp.org>
12091
12092         * gnulib-tool (func_relativize, func_relconcat): New functions.
12093         Give an error if --local-dir is given with --update.
12094         Remove trailing slashes from $local_gnulib_dir.
12095         (func_import): Store the relativized $local_gnulib_dir in
12096         gnulib-cache.m4, and read it from there if not specified explicitly.
12097
12098 2006-08-28  Bruno Haible  <bruno@clisp.org>
12099
12100         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
12101         is the current directory. Respect also $local_gnulib_dir.
12102
12103 2006-08-28  Bruno Haible  <bruno@clisp.org>
12104             Simon Josefsson  <jas@extundo.com>
12105
12106         BeOS portability.
12107         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
12108
12109 2006-08-27  Jim Meyering  <jim@meyering.net>
12110
12111         * doc/visibility.texi: Remove duplicate word: "pointer".
12112
12113 2006-08-26  Bruno Haible  <bruno@clisp.org>
12114
12115         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
12116         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
12117         (Makefile.am): Create inttypes.h from inttypes_.h.
12118         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
12119
12120         * modules/imaxabs: New file.
12121
12122         * modules/imaxdiv: New file.
12123
12124 2006-08-26  Bruno Haible  <bruno@clisp.org>
12125
12126         * m4/inttypes.m4: New file.
12127         * m4/_inttypes_h.m4: Remove file.
12128         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
12129         PRI_MACROS_BROKEN.
12130         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
12131
12132         * m4/imaxabs.m4: New file.
12133
12134         * m4/imaxdiv.m4: New file.
12135
12136 2006-08-26  Bruno Haible  <bruno@clisp.org>
12137
12138         * lib/inttypes_.h: New file.
12139         * lib/inttypes.h: Remove file.
12140         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
12141
12142         * lib/imaxabs.c: New file.
12143
12144         * lib/imaxdiv.c: New file.
12145
12146 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12147
12148         New config-h module, so that "make" output needn't be cluttered
12149         by -DHAVE_CONFIG_H.
12150         * MODULES.html.sh (Support for building libraries and executables):
12151         Add config-h.
12152         * modules/config-h: New file.
12153         * gnulib-tool (nl, sed_transform_lib_file): New vars.
12154         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
12155         the config-h module is used.
12156
12157         New configmake module, so that "make" output needn't be cluttered
12158         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
12159         * MODULES.html.sh (Support for building libraries and executables):
12160         Add configmake.
12161         * modules/configmake: New file.
12162
12163 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12164
12165         * m4/config-h.m4: New file.
12166
12167 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12168
12169         * config/srclist.txt: Add elisp-comp.
12170
12171 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12172
12173         * MODULES.html.sh (Support for building libraries and executables):
12174         Add elisp-comp.
12175         * build-aux/elisp-comp: New file.
12176         * modules/elisp-comp: New file.
12177
12178 2006-08-24  Bruno Haible  <bruno@clisp.org>
12179
12180         * gnulib-tool (func_create_testdir): Use non-default values of
12181         sourcebase and m4base.
12182
12183 2006-08-24  Bruno Haible  <bruno@clisp.org>
12184
12185         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
12186         HTML structure.
12187
12188 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12189
12190         * modules/openat (Depends-on): Add lchown.
12191
12192 2006-08-23  Bruno Haible  <bruno@clisp.org>
12193
12194         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
12195         of gl_LOCK_EARLY instead of gl_LOCK.
12196
12197 2006-08-23  Bruno Haible  <bruno@clisp.org>
12198
12199         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
12200         on OSF/1 to no.
12201         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
12202
12203 2006-08-23  Bruno Haible  <bruno@clisp.org>
12204
12205         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
12206         as unusable.
12207
12208         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
12209         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
12210         (gl_LOCK): New macro.
12211
12212 2006-08-22  Simon Josefsson  <jas@extundo.com>
12213
12214         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
12215         to md5 module.
12216
12217 2006-08-22  Simon Josefsson  <jas@extundo.com>
12218
12219         * MODULES.html.sh: Add "Support for maintaining and release
12220         projects".
12221
12222         * build-aux/gnupload: New file, from coreutils.
12223
12224 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12225
12226         Avoid the need for AC_LIBSOURCES in m4 macros.
12227         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
12228         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
12229         * modules/check-version (EXTRA_DIST): Add check-version.h.
12230         * modules/crc (EXTRA_DIST): Add crc.h.
12231         * modules/des (EXTRA_DIST): Add des.h.
12232         * modules/gc (EXTRA_DIST): Add gc.h.
12233         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
12234         * modules/getline (EXTRA_DIST): Add getline.h.
12235         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
12236         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
12237         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
12238         * modules/md2 (EXTRA_DIST): Add md2.h.
12239         * modules/md4 (EXTRA_DIST): Add md4.h.
12240         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
12241         * modules/read-file (EXTRA_DIST): Add read-file.h.
12242         * modules/readline (EXTRA_DIST): Add readline.h.
12243         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
12244         rijndael-api-fst.h.
12245
12246 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12247
12248         * m4/rijndael.m4 (gl_ARCFOUR):
12249         * m4/arctwo.m4 (gl_ARCTWO):
12250         * m4/check-version.m4 (gl_CHECK_VERSION):
12251         * m4/crc.m4 (gl_CRC):
12252         * m4/des.m4 (gl_DES):
12253         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
12254         * m4/gc.m4 (gl_GC):
12255         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
12256         * m4/getline.m4 (gl_FUNC_GETLINE):
12257         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
12258         * m4/hmac-md5.m4 (gl_HMAC_MD5):
12259         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
12260         * m4/md2.m4 (gl_MD2):
12261         * m4/md4.m4 (gl_MD4):
12262         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
12263         * m4/read-file.m4 (gl_FUNC_READ_FILE):
12264         * m4/readline.m4 (gl_FUNC_READLINE):
12265         * m4/rijndael.m4 (gl_RIJNDAEL):
12266         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12267         to get the necessary .h files and whatnot.
12268
12269 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12270
12271         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
12272         gnulib rather than the other way around.
12273         * config/srclistvars.sh (COREUTILS): Remove.
12274
12275 2006-08-22  Jim Meyering  <jim@meyering.net>
12276
12277         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
12278
12279         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
12280
12281 2006-08-22  Eric Blake  <ebb9@byu.net>
12282
12283         * modules/regexprops-generic: New file.
12284         * MODULES.html.sh (Support for building documentation): List it.
12285
12286 2006-08-22  Eric Blake  <ebb9@byu.net>
12287
12288         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
12289         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
12290         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
12291         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
12292
12293 2006-08-22  Bruno Haible  <bruno@clisp.org>
12294
12295         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
12296         and lib_LTLIBRARIES like the other lib_* variables.
12297
12298 2006-08-22  Bruno Haible  <bruno@clisp.org>
12299
12300         * build-aux/x-to-1.in: New file, from GNU gettext.
12301
12302 2006-08-22  Bruno Haible  <bruno@clisp.org>
12303
12304         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
12305         <utmpx.h> exists.
12306
12307 2006-08-22  Bruno Haible  <bruno@clisp.org>
12308
12309         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
12310         <utmpx.h> exists.
12311
12312 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12313
12314         BeOS portability.
12315         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
12316         exist.
12317         Problem reported by Bruno Haible.
12318
12319 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12320
12321         Avoid the need for AC_LIBSOURCES in m4 macros.
12322         * modules/acl (EXTRA_DIST): Add acl.h.
12323         * modules/argmatch (Files): Add m4/argmatch.m4.
12324         (configure.ac): Add gl_ARGMATCH.
12325         (EXTRA_DIST): Renamed from lib_SOURCES, for
12326         consistency with the other modules.  Remove argmatch.c.
12327         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
12328         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
12329         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
12330         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
12331         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
12332         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
12333         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
12334         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
12335         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
12336         * modules/closeout (EXTRA_DIST): Add closeout.h.
12337         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
12338         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
12339         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
12340         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
12341         dirname.h; remove basename.c and stripslash.c.
12342         * modules/exclude (EXTRA_DIST): Add exclude.h.
12343         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
12344         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
12345         * modules/file-type (EXTRA_DIST): Add file-type.h.
12346         * modules/filemode (EXTRA_DIST): Add filemode.h.
12347         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
12348         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12349         * modules/fpending (EXTRA_DIST): Add __fpending.h.
12350         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
12351         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
12352         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
12353         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
12354         * modules/getdate (EXTRA_DIST): Add getdate.c.
12355         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
12356         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
12357         * modules/getpass (EXTRA_DIST): Add getpass.h.
12358         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
12359         * modules/group-member (EXTRA_DIST): Add group-member.h.
12360         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
12361         * modules/hash (EXTRA_DIST): Add hash.h.
12362         * modules/human (EXTRA_DIST): Add human.h.
12363         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
12364         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
12365         * modules/lchown (EXTRA_DIST): Add lchown.h.
12366         * modules/long-options (EXTRA_DIST): Add long-options.h.
12367         * modules/lstat (EXTRA_DIST): Add lstat.h.
12368         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
12369         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
12370         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
12371         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
12372         * modules/memxor (EXTRA_DIST): Add memxor.h.
12373         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
12374         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
12375         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
12376         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
12377         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
12378         * modules/physmem (EXTRA_DIST): Add physmem.h.
12379         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
12380         * modules/posixver (EXTRA_DIST): Add posixver.h.
12381         * modules/quote (EXTRA_DIST): Add quote.h.
12382         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
12383         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
12384         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
12385         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
12386         regex_internal.h regexec.c.
12387         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
12388         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
12389         * modules/same (EXTRA_DIST): Add same.h.
12390         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
12391         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
12392         * modules/savedir (EXTRA_DIST): Add savedir.h.
12393         * modules/sha1 (EXTRA_DIST): Add sha1.h.
12394         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
12395         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
12396         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
12397         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
12398         * modules/strdup (EXTRA_DIST): Add strdup.h.
12399         * modules/strftime (EXTRA_DIST): Add strftime.h.
12400         * modules/strndup (EXTRA_DIST): Add strndup.h.
12401         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
12402         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
12403         * modules/time_r (EXTRA_DIST): Add time_r.h.
12404         * modules/timespec (EXTRA_DIST): Add timespec.h.
12405         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12406         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
12407         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
12408         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
12409         * modules/userspec (EXTRA_DIST): Add userspec.h.
12410         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
12411         * modules/utimens (EXTRA_DIST): Add utimens.h.
12412         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
12413         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
12414         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
12415         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
12416         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
12417         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
12418         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
12419         * modules/yesno (EXTRA_DIST): Add yesno.h.
12420
12421 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12422
12423         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
12424
12425         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
12426         * m4/dev-ino.m4, same-inode.m4: Remove.
12427
12428         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
12429         * m4/acl.m4 (AC_FUNC_ACL):
12430         * m4/backupfile.m4 (gl_BACKUPFILE):
12431         * m4/c-strtod.m4 (gl_C99_STRTOLD):
12432         * m4/canon-host.m4 (gl_CANON_HOST):
12433         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
12434         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
12435         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
12436         * m4/cloexec.m4 (gl_CLOEXEC):
12437         * m4/close-stream.m4 (gl_CLOSE_STREAM):
12438         * m4/closeout.m4 (gl_CLOSEOUT):
12439         * m4/dirfd.m4 (gl_FUNC_DIRFD):
12440         * m4/dirname.m4 (gl_DIRNAME):
12441         * m4/exclude.m4 (gl_EXCLUDE):
12442         * m4/exitfail.m4 (gl_EXITFAIL):
12443         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
12444         * m4/file-type.m4 (gl_FILE_TYPE):
12445         * m4/filemode.m4 (gl_FILEMODE):
12446         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
12447         * m4/fpending.m4 (gl_FUNC_FPENDING):
12448         * m4/fprintftime.m4 (gl_FPRINTFTIME):
12449         * m4/fts.m4 (gl_FUNC_FTS):
12450         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
12451         * m4/getdate.m4 (gl_GETDATE):
12452         * m4/gethrxtime.m4 (gl_GETHRXTIME):
12453         * m4/getpagesize.m4 (gl_GETPAGESIZE):
12454         * m4/getpass.m4 (gl_FUNC_GETPASS):
12455         * m4/gettime.m4 (gl_GETTIME):
12456         * m4/getugroups.m4 (gl_GETUGROUPS):
12457         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
12458         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
12459         * m4/hard-locale.m4 (gl_HARD_LOCALE):
12460         * m4/hash.m4 (gl_HASH):
12461         * m4/idcache.m4 (gl_IDCACHE):
12462         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
12463         * m4/lchown.m4 (gl_FUNC_LCHOWN):
12464         * m4/long-options.m4 (gl_LONG_OPTIONS):
12465         * m4/lstat.m4 (gl_FUNC_LSTAT):
12466         * m4/md5.m4 (gl_MD5):
12467         * m4/memcasecmp.m4 (gl_MEMCASECMP):
12468         * m4/memcoll.m4 (gl_MEMCOLL):
12469         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
12470         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
12471         * m4/memxor.m4 (gl_MEMXOR):
12472         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
12473         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
12474         * m4/modechange.m4 (gl_MODECHANGE):
12475         * m4/mountlist.m4 (gl_MOUNTLIST):
12476         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
12477         * m4/openat.m4 (gl_FUNC_OPENAT):
12478         * m4/pathmax.m4 (gl_PATHMAX):
12479         * m4/physmem.m4 (gl_PHYSMEM):
12480         * m4/posixtm.m4 (gl_POSIXTM):
12481         * m4/posixver.m4 (gl_POSIXVER):
12482         * m4/quote.m4 (gl_QUOTE):
12483         * m4/quotearg.m4 (gl_QUOTEARG):
12484         * m4/readtokens.m4 (gl_READTOKENS):
12485         * m4/readutmp.m4 (gl_READUTMP):
12486         * m4/regex.m4 (gl_REGEX):
12487         * m4/safe-read.m4 (gl_SAFE_READ):
12488         * m4/safe-write.m4 (gl_SAFE_WRITE):
12489         * m4/same.m4 (gl_SAME):
12490         * m4/save-cwd.m4 (gl_SAVE_CWD):
12491         * m4/savedir.m4 (gl_SAVEDIR):
12492         * m4/settime.m4 (gl_SETTIME):
12493         * m4/sha1.m4 (gl_SHA1):
12494         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
12495         * m4/stat-macros.m4 (gl_STAT_MACROS):
12496         * m4/stat-time.m4 (gl_STAT_TIME):
12497         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
12498         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
12499         * m4/strdup.m4 (gl_FUNC_STRDUP):
12500         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
12501         * m4/strndup.m4 (gl_FUNC_STRNDUP):
12502         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
12503         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
12504         * m4/time_r.m4 (gl_TIME_R):
12505         * m4/timespec.m4 (gl_TIMESPEC):
12506         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
12507         * m4/unlinkdir.m4 (gl_UNLINKDIR):
12508         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
12509         * m4/userspec.m4 (gl_USERSPEC):
12510         * m4/utimecmp.m4 (gl_UTIMECMP):
12511         * m4/utimens.m4 (gl_UTIMENS):
12512         * m4/xalloc.m4 (gl_XALLOC):
12513         * m4/xgetcwd.m4 (gl_XGETCWD):
12514         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
12515         * m4/xreadlink.m4 (gl_XREADLINK):
12516         * m4/xstrtod.m4 (gl_XSTRTOD):
12517         * m4/yesno.m4 (gl_YESNO):
12518         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12519         to get the necessary .h files and whatnot.
12520
12521 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
12522             Bruno Haible  <bruno@clisp.org>
12523
12524         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
12525         /bin/sh understanding of '!' conditional negation.
12526
12527 2006-08-21  Jim Meyering  <jim@meyering.net>
12528
12529         * modules/openat (Depends-on): Really alphabetize.
12530
12531         * modules/acl (Depends-on): Add error and quote.
12532
12533         * check-module (find_included_lib_files): Add at-func.c to the
12534         ok-to-include-more-than-once white list.
12535
12536         * modules/openat (Depends-on): Add lstat.  Alphabetize.
12537
12538 2006-08-21  Bruno Haible  <bruno@clisp.org>
12539
12540         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12541         Emit a pkgdata_DATA variable only if some snippets add contents to it.
12542         Reported by Martin Lambers <marlam@marlam.de>.
12543
12544 2006-08-21  Bruno Haible  <bruno@clisp.org>
12545
12546         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
12547         specify an installation location, don't emit a noinst_LIBRARIES or
12548         noinst_LTLIBRARIES assignment.
12549
12550 2006-08-21  Bruno Haible  <bruno@clisp.org>
12551
12552         BeOS portability.
12553         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
12554         BeOS has mbrtowc() but no <wctype.h>.
12555
12556 2006-08-21  Bruno Haible  <bruno@clisp.org>
12557
12558         BeOS portability.
12559         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
12560         exist.
12561
12562 2006-08-21  Bruno Haible  <bruno@clisp.org>
12563
12564         BeOS portability.
12565         * lib/mbchar.h: Include <wctype.h> only if it exists.
12566
12567 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12568
12569         Remove files that are no longer needed by their respective modules.
12570         * m4/obstack.m4: Remove.
12571         * m4/strerror_r.m4: Remove.
12572         * m4/uint32_t.m4: Remove.
12573         * m4/uintptr_t.m4: Remove.
12574         * m4/ullong_max.m4: Remove.
12575         * m4/xstrtoimax.m4: Remove.
12576         * m4/xstrtoumax.m4: Remove.
12577
12578         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
12579         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
12580         dependencies now capture this.
12581
12582         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
12583         Do not use AC_LIBSOURCES, since gnulib modules now do this.
12584         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
12585         * m4/human.m4 (gl_HUMAN): Likewise.
12586         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
12587         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
12588
12589         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
12590
12591         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
12592         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
12593         stdint.
12594         * m4/human.m4 (gl_HUMAN): Likewise.
12595         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
12596         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
12597         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12598         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12599         * m4/xstrtol (gl_XSTRTOL): Likewise.
12600
12601         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
12602         AC_TYPE_LONG_LONG_INT.
12603         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12604         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
12605         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
12606         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12607
12608         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
12609         on stdbool.
12610
12611         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
12612         (gl_PREREQ_XSTRTOUL): Remove.
12613
12614         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
12615
12616         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
12617         mode.
12618
12619 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12620
12621         Add and change modules to make it easier for coreutils to use
12622         gnulib-tool.
12623         * modules/backupfile (Files): Remove m4/d-ino.m4.
12624         (Depends-on): Add d-ino.
12625         * modules/cycle-check (Depends-on): Add stdint.
12626         (lib_SOURCES): Add cycle-check.h.
12627         * modules/d-ino: New module.
12628         * modules/d-type: New module.
12629         * modules/error (Files): Remove m4/strerror_r.m4.
12630         * modules/filemode (Files): Add m4/st_dm_mode.m4.
12631         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
12632         m4/inttypes_h.m4, m4/uintmax_t.m4.
12633         (Depends-on): Add stdint.
12634         (lib_SOURCES): Add fsusage.h.
12635         * modules/getcwd (Files): Remove d-ino.m4.
12636         (Depends-on): Add d-ino.
12637         * modules/getndelim2 (Depends-on): Add stdint.
12638         * modules/glob (Files): Remove m4/d-type.m4.
12639         (Depends-on): Add d-type.
12640         * modules/host-os: New module.
12641         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
12642         m4/inttypes_h.m4, m4/uintmax_t.m4.
12643         * Depends-on: Add stdint.
12644         (lib_SOURCES): Add human.h.
12645         * modules/inttostr (Files): Remove m4/intmax_t.m4,
12646         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
12647         m4/uintmax_t.m4, m4/ulonglong.m4.
12648         (Depends-on): Add stdint.
12649         (EXTRA_DIST): Add inttostr.h.
12650         * modules/lchmod: New module.
12651         * modules/link-follow: New module.
12652         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
12653         (Depends-on): Add lchmod.
12654         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
12655         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
12656         (Depends-on): Add stdint.
12657         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
12658         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
12659         (Depends-on): Add stdint.
12660         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
12661         * modules/perl: New module.
12662         * modules/regex (Depends-on): Add stdint.
12663         * modules/rmdir-errno: New module.
12664         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12665         m4/intmax_t.m4.
12666         (Depends-on): Add stdint.
12667         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12668         m4/uintmax_t.m4.
12669         (Depends-on): Add stdint.
12670         * modules/unlink-busy: New module.
12671         * modules/utimecmp (Depends-on): Add stdint.
12672         * modules/uptime: New module.
12673         * modules/winsz-ioctl: New module.
12674         * modules/winsz-termios: New module.
12675         * modules/xnanosleep (Depends-on): Add nanosleep.
12676         * modules/ullong_max: Remove.
12677         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
12678         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
12679         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
12680         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
12681         (Depends-on): Add inttypes.
12682         (lib_SOURCES): Add xstrtol.h.
12683         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
12684         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
12685         * MODULES.html.sh: Move 'assert' into the assert section.
12686         Move 'dummy' into the linking section.
12687         Remove ullong_max.
12688         Add section for compatibility checks for POSIX:2001 functions,
12689         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
12690         winsz-ioctl, and winsz-termios into it.
12691         Add lchmod.
12692         Add top-level Misc section and put host-os, perl, and uptime
12693         into it.
12694
12695 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12696
12697         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
12698         now assume the stdint module.  Do not include inttypes.h.
12699         * lib/fsusage.h: Likewise.
12700         * lib/getndelim2.c: Likewise.
12701         * lib/human.h: Likewise.
12702         * lib/inttostr.h: Likewise.
12703         * lib/obstack.c: Likewise.
12704         * lib/regex_internal.h: Likewise.
12705         * lib/tempname.c: Likewise.
12706         * lib/utimecmp.c: Likewise.
12707         * lib/xstrtol.h: Likewise.
12708
12709         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
12710
12711         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
12712         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
12713         * lib/xtime.h: Likewise.
12714
12715 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12716
12717         * modules/openat (Files): Add lib/fchmodat.c.
12718         Fixes problem reported by Jay Youngman.
12719
12720 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12721
12722         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
12723         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
12724
12725 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
12726             Bruno Haible  <bruno@clisp.org>
12727
12728         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
12729         and is a script that invokes bison. Tighten the code. Add comments.
12730
12731 2006-08-18  Jim Meyering  <jim@meyering.net>
12732
12733         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
12734         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
12735         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
12736         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
12737
12738 2006-08-18  Bruno Haible  <bruno@clisp.org>
12739
12740         * modules/bison-i18n: New file.
12741         * MODULES.html.sh (Internationalization functions): Add it.
12742
12743 2006-08-18  Bruno Haible  <bruno@clisp.org>
12744
12745         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
12746         sys/statvfs.h. When getmntinfo was found, check its declaration and
12747         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
12748
12749 2006-08-18  Bruno Haible  <bruno@clisp.org>
12750
12751         * m4/bison-i18n.m4: New file, from bison.
12752
12753 2006-08-18  Bruno Haible  <bruno@clisp.org>
12754
12755         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
12756         (ME_DUMMY): Treat "kernfs" as a dummy.
12757         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
12758
12759 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12760
12761         Update from coreutils.
12762
12763         2006-08-15  Jim Meyering  <jim@meyering.net>
12764
12765         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
12766
12767         2006-01-17  Jim Meyering  <jim@meyering.net>
12768
12769         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
12770
12771         2006-01-11  Jim Meyering  <jim@meyering.net>
12772
12773         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
12774         Check for the lchmod function.
12775
12776 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12777
12778         Update from coreutils.
12779
12780         * lib/__fpending.h: Add copyright notice.
12781         * lib/fprintftime.h: Likewise.
12782         * lib/savedir.c: Use (C) in copyright notice.
12783         * lib/savedir.h: Likewise.
12784
12785         2006-08-15  Jim Meyering  <jim@meyering.net>
12786
12787         * lib/at-func.c: New file, with the logic of all emulated at-functions.
12788         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
12789         in support of the EXPECTED_ERRNO macro.
12790         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
12791         definitions.  Instead, define the appropriate symbols and include
12792         "at-func.c".
12793         * lib/mkdirat.c (mkdirat): Likewise.
12794         * lib/fchmodat.c (fchmodat): Likewise.
12795         (ENOSYS): Remove definition.
12796         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
12797         it.  Don't include "unistd--.h" -- it wasn't ever used.
12798
12799         2006-01-17  Jim Meyering  <jim@meyering.net>
12800
12801         Rewrite fts.c not to change the current working directory,
12802         by using openat, fstatat, fdopendir, etc..
12803
12804         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
12805         (HAVE_OPENAT_SUPPORT): Define.
12806         [_LIBC] (fchdir): Don't undef or define; no longer used.
12807         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
12808         Now, this `function' always succeeds, and consumes its file descriptor
12809         parameter -- so callers must not close such FDs.  Update callers.
12810         (diropen_fd, opendirat, cwd_advance_fd): New functions.
12811         (diropen): Add parameter, SP.  Adjust all callers.
12812         Implement using diropen_fd, rather than open.
12813         (fts_open): Initialize new member, fts_cwd_fd.
12814         Remove fts_rft-setting code.
12815         (fts_close): Close fts_cwd_fd, if necessary.
12816         (__opendir2): Define in terms of opendir or opendirat,
12817         depending on whether the FST_NOCHDIR flag is set.
12818         (fts_build): Since fts_safe_changedir consumes its FD, and since
12819         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
12820         and close the dup'd file descriptor upon failure.
12821         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
12822         (fts_safe_changedir): Tweak semantics to reflect that this function
12823         now calls cwd_advance_fd and hence consumes its FD argument.
12824         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
12825         [struct FTS] (fts_rft): Remove now-unused member.
12826         [struct FTS] (fts_cycle.state): Improve comment.
12827
12828         * lib/openat.c (openat_needs_fchdir): New function.
12829         * lib/openat.h (openat_needs_fchdir): Declare it.
12830
12831 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12832
12833         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
12834         Problem and fix reported by Pádraig Brady in
12835         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
12836
12837 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12838
12839         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
12840
12841 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12842
12843         * lib/memcoll.c (memcoll): Optimize for the common case where the
12844         arguments are bytewise equal.
12845
12846 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12847
12848         * doc/regexprops-generic.texi: Add a copyright notice.
12849
12850 2006-08-15  Bruno Haible  <bruno@clisp.org>
12851
12852         * modules/tmpdir (License): Change to LGPL.
12853
12854 2006-08-15  Bruno Haible  <bruno@clisp.org>
12855
12856         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
12857         module.
12858
12859 2006-08-14  Simon Josefsson  <jas@extundo.com>
12860
12861         * config/srclist.txt: Add gnupload.
12862
12863 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12864
12865         Change copyright notice from LGPL 2 to GPL 2, since that's the
12866         standard form used in the gnulib repository.
12867         * tests/test-lock.c: Likewise.
12868         * tests/test-stdint.c: Likewise.
12869         * tests/test-tls.c: Likewise.
12870
12871         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
12872         prelude-manager.  User shorter URLs for GNU projects, without '?'.
12873         Add copyright notice.
12874
12875         * check-module: Add copyright notice.  Output a copyright
12876         notice if "--version" is specified.
12877         * modules/COPYING: New file.
12878         * tests/test-getaddrinfo.c: Add copyright notice.
12879         * tests/test-verify.c: Likewise.
12880
12881 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12882
12883         Change copyright notice from LGPL 2 to GPL 2, since that's the
12884         standard form used in the gnulib repository.
12885         * lib/lock.c: LGPL -> GPL.
12886         * lib/lock.h: Likewise.
12887         * lib/strnlen1.c: Likewise.
12888         * lib/strnlen1.h: Likewise.
12889         * lib/tls.c: Likewise.
12890         * lib/tls.h: Likewise.
12891         * lib/tmpdir.c: Likewise.
12892
12893         * lib/TODO: Remove; this belongs only in coreutils.
12894
12895 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12896
12897         Add copyright notices to long-enough files that lack them, since
12898         otherwise the files aren't clearly free.  Use the same notice that
12899         getdate.texi already uses.
12900         * doc/alloca-opt.texi: Add copyright notice.
12901         * doc/alloca.texi: Likewise.
12902         * doc/ctime.texi: Likewise.
12903         * doc/functions.texi: Likewise.
12904         * doc/gcd.texi: Likewise.
12905         * doc/gnulib-tool.texi: Likewise.
12906         * doc/inet_ntoa.texi: Likewise.
12907         * doc/visibility.texi: Likewise.
12908
12909         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
12910         * doc/quote.texi: Add copyright notice.
12911
12912         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
12913         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
12914         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
12915         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
12916         is now obsolete, and give a pointer to the Sun list.
12917         Add copyright notice.
12918
12919 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12920
12921         * config/srclistvars.sh: Add copyright notice.
12922
12923 2006-08-14  Eric Blake  <ebb9@byu.net>
12924
12925         Import the following change from libc:
12926
12927         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
12928
12929         Upstream bug 2997.
12930         * lib/misc/error.c: Add space between program name and message if file
12931         name is missing.
12932
12933 2006-08-12  Karl Berry  <karl@gnu.org>
12934
12935         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
12936         remove, these originate in gnulib now.
12937
12938 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12939
12940         * doc/Makefile (standards.info standards.html standards.dvi):
12941         Also depend on make-stds.texi.
12942
12943 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12944
12945         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
12946         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
12947
12948         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
12949         in wchar_t.  Problem reported by Eric Blake.
12950
12951         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
12952         LEN is smaller than SIZE.  Suggested by Bruno Haible.
12953         Also, help the compiler to keep LEN in a register.
12954
12955 2006-08-11  Eric Blake  <ebb9@byu.net>
12956
12957         * users.txt: Sort.  Add tar.
12958
12959 2006-08-11  Bruno Haible  <bruno@clisp.org>
12960
12961         * users.txt: New file.
12962
12963 2006-08-11  Bruno Haible  <bruno@clisp.org>
12964
12965         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
12966         before <wchar.h>. Needed for OSF/1 and BSD/OS.
12967
12968 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12969
12970         * modules/snprintf (Depends-on): Remove minmax.
12971         (Maintainer): Add self and Bruno.
12972
12973 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12974
12975         * lib/.cppi-disable: Add snprintf.h, socket_.h.
12976         * lib/snprintf.c: Include <errno.h> and <limits.h>.
12977         (EOVERFLOW): Define if the system does not.
12978         Do not include "minmax.h"; it wasn't used.
12979         (snprintf): Don't assume size_t promotes to an unsigned type.
12980         Fix bug when generated string was too long for the buffer: the
12981         buffer's contents are supposed to be the initial prefix of the
12982         output.  Don't assume vasnprintf returns EOVERFLOW if the size
12983         exceeds INT_MAX; do the check ourselves.
12984
12985         Import the following changes from libc:
12986
12987         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
12988
12989         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
12990         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
12991         set wc to the byte which couldn't be converted.
12992         (re_string_reconstruct): Don't clear valid_raw_len before calling
12993         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
12994         tip_context using re_string_context_at.
12995
12996         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
12997
12998         * lib/posix/regex.h: g++ still cannot handled [restrict].
12999
13000         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
13001
13002         * lib/posix/regex.h: Remove special handling for VMS.
13003
13004 2006-08-10  Jim Meyering  <jim@meyering.net>
13005
13006         * modules/same-inode: New module.
13007         * modules/dev-ino: New module.
13008         * modules/cycle-check: Depend on these modules, rather than simply
13009         including their .h files.
13010         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
13011         required via m4/cycle-check.m4.
13012         * modules/same: Depend on new same-inode module, rather than
13013         including same-inode.h.
13014         * modules/chdir-safer: New file.
13015
13016         * modules/chown (Depends-on): Add stat-macros.
13017
13018 2006-08-10  Jim Meyering  <jim@meyering.net>
13019
13020         * m4/cycle-check.m4: New file.
13021         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
13022         * m4/dev-ino.m4, m4/same-inode.m4: New files.
13023
13024 2006-08-10  Eric Blake  <ebb9@byu.net>
13025
13026         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
13027         in from original proposal.
13028
13029 2006-08-10  Eric Blake  <ebb9@byu.net>
13030         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13031
13032         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
13033         namespace.
13034
13035 2006-08-10  Bruno Haible  <bruno@clisp.org>
13036
13037         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
13038         as well.
13039
13040 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13041
13042         Sync from coreutils.
13043
13044         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
13045
13046         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
13047         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
13048
13049 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13050
13051         * modules/restrict: Remove; no longer needed now that we assume
13052         Autoconf 2.59 or later.
13053         * MODULES.html.sh: Remove 'restrict'.
13054         * modules/argp (Depends-on): Remove 'restrict'.
13055         * modules/base64 (Depends-on): Likewise.
13056         * modules/gc (Depends-on): Likewise.
13057         * modules/getaddrinfo (Depends-on): Likewise.
13058         * modules/glob (Depends-on): Likewise.
13059         * modules/inet_ntop (Depends-on): Likewise.
13060         * modules/inet_pton (Depends-on): Likewise.
13061         * modules/memxor (Depends-on): Likewise.
13062         * modules/regex (Depends-on): Likewise.
13063         * modules/strtok_r (Depends-on): Likewise.
13064         * modules/time_r (Depends-on): Likewise.
13065
13066 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13067
13068         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
13069         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
13070         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13071         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
13072         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
13073         * m4/memxor.m4 (gl_MEMXOR): Likewise.
13074         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
13075         gl_C_RESTRICT replaced by AC_C_RESTRICT.
13076
13077         Merge from coreutils.
13078         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
13079         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
13080         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
13081         * m4/time_r.m4 (gl_TIME_R): Likewise.
13082
13083 2006-08-09  Karl Berry  <karl@gnu.org>
13084
13085         * config/srclist.txt: no more gettext-tools, per Bruno.
13086
13087 2006-08-08  Eric Blake  <ebb9@byu.net>
13088
13089         * modules/verror: New module.
13090         * MODULES.html.sh: Document it.
13091
13092 2006-08-08  Eric Blake  <ebb9@byu.net>
13093
13094         * lib/verror.h, lib/verror.c: New files.
13095
13096 2006-08-08  Eric Blake  <ebb9@byu.net>
13097
13098         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
13099         verror_at_line output complies with GNU Coding Standards even when
13100         file is NULL.
13101
13102 2006-08-07  Bruno Haible  <bruno@clisp.org>
13103
13104         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
13105         versions of AIX.
13106         Reported by Ralf Wildenhues.
13107
13108 2006-08-07  Bruno Haible  <bruno@clisp.org>
13109
13110         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
13111         in an AC_DEFUN. Needed so that the autoconf snippets can use
13112         AC_REQUIRE.
13113
13114 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13115
13116         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13117         Initialize pkgdata_DATA.
13118         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
13119         overriding it.
13120
13121 2006-08-06  Eric Blake  <ebb9@byu.net>
13122
13123         * lib/error.h: Fold in some upstream changes from glibc.
13124         * lib/error.c: Likewise.
13125
13126 2006-08-04  Bruno Haible  <bruno@clisp.org>
13127
13128         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13129         Make the mostlyclean-local rule depend on mostlyclean-generic.
13130         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
13131
13132 2006-07-31  Bruno Haible  <bruno@clisp.org>
13133
13134         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
13135         <stdlib.h>, <string.h>.
13136
13137 2006-07-30  Bruno Haible  <bruno@clisp.org>
13138
13139         * modules/readlink (License): Change to LGPL.
13140
13141 2006-07-30  Bruno Haible  <bruno@clisp.org>
13142
13143         * modules/javaversion (Makefile.am): Distribute javaversion.java and
13144         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
13145         set PKGDATADIR to point to it.
13146
13147 2006-07-30  Bruno Haible  <bruno@clisp.org>
13148
13149         * modules/csharpexec (configure.ac): Comment out macro invocation.
13150         * modules/javaexec (configure.ac): Likewise.
13151         * modules/javacomp-script (configure.ac): Likewise.
13152
13153         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
13154
13155 2006-07-30  Bruno Haible  <bruno@clisp.org>
13156
13157         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
13158         linked-list.
13159
13160 2006-07-30  Bruno Haible  <bruno@clisp.org>
13161
13162         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
13163
13164 2006-07-30  Bruno Haible  <bruno@clisp.org>
13165
13166         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13167         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
13168         get removed.
13169
13170 2006-07-29  Bruno Haible  <bruno@clisp.org>
13171
13172         Make it possible for gnulib-tool to work with locally modified or
13173         augmented gnulib repositories.
13174         * gnulib-tool (func_usage): Document --local-dir option.
13175         (local_gnulib_dir): New variable.
13176         Handle --local-dir option.
13177         (func_lookup_file): New function.
13178         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
13179         (func_get_description, func_get_filelist, func_get_description,
13180         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
13181         func_get_automake_snippet, func_get_include_directive,
13182         func_get_license, func_get_maintainer): Use func_lookup_file.
13183         (func_import, func_create_testdir): Use func_lookup_file.
13184
13185 2006-07-29  Bruno Haible  <bruno@clisp.org>
13186
13187         * modules/setenv (Depends-on): Add unistd.
13188
13189 2006-07-29  Bruno Haible  <bruno@clisp.org>
13190
13191         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
13192
13193 2006-07-29  Bruno Haible  <bruno@clisp.org>
13194
13195         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
13196
13197 2006-07-29  Bruno Haible  <bruno@clisp.org>
13198
13199         * gnulib-tool (import, update): If there is no Makefile.am, look at
13200         aclocal.m4, instead of bailing out.
13201
13202 2006-07-29  Bruno Haible  <bruno@clisp.org>
13203
13204         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
13205         Categorize the options by when they are useful.
13206
13207 2006-07-29  Bruno Haible  <bruno@clisp.org>
13208
13209         * gnulib-tool (func_usage): Document option --no-libtool.
13210         Handle option --no-libtool.
13211         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
13212         for changed semantics of $libtool variable.
13213         (func_import): Likewise. If libtool is not used, show this through
13214         an option --no-libtool.
13215         (func_create_testdir): Update.
13216
13217 2006-07-29  Bruno Haible  <bruno@clisp.org>
13218
13219         * gnulib-tool (func_import): Extend error message about missing
13220         --doc-base.
13221
13222 2006-07-29  Bruno Haible  <bruno@clisp.org>
13223
13224         * gnulib-tool (func_import): Don't create the $docbase directory if
13225         there is no file to store there.
13226
13227 2006-07-29  Bruno Haible  <bruno@clisp.org>
13228
13229         * gnulib-tool (autoconf_minversion): If a --dir option is given and
13230         relevant, look for configure.ac there, not in the current directory.
13231         Also use a simple search for AC_PREREQ, not "autoconf --trace".
13232
13233 2006-07-29  Bruno Haible  <bruno@clisp.org>
13234
13235         * gnulib-tool (SORT): New variable.
13236         (func_usage): Undocument --assume-autoconf option.
13237         Remove --assume-autoconf option handling.
13238         (autoconf_minversion): Determine from the contents of configure.ac.
13239         (func_import): Remove autoconf_minversion handling.
13240         Suggested by Eric Blake.
13241
13242 2006-07-29  Bruno Haible  <bruno@clisp.org>
13243
13244         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
13245
13246 2006-07-29  Bruno Haible  <bruno@clisp.org>
13247
13248         * config/srclist.txt (*setenv.[ch]): Remove rules.
13249
13250 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13251
13252         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
13253
13254 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13255
13256         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
13257         arpa/inet.h.
13258
13259 2006-07-28  Simon Josefsson  <jas@extundo.com>
13260
13261         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
13262         * modules/inet_pton (Depends-on): Likewise.
13263
13264 2006-07-28  Simon Josefsson  <jas@extundo.com>
13265
13266         * m4/netinet_in_h.m4: New file.
13267
13268 2006-07-28  Simon Josefsson  <jas@extundo.com>
13269
13270         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
13271         #include's.
13272
13273 2006-07-28  Simon Josefsson  <jas@extundo.com>
13274
13275         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
13276         #include's.
13277
13278 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
13279
13280         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
13281         setgid on directories only if they set these bits.
13282         * lib/modechange.h: Remove obsolete comment about masks.
13283
13284 2006-07-28  Eric Blake  <ebb9@byu.net>
13285
13286         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
13287         macro expansion.
13288
13289 2006-07-28  Bruno Haible  <bruno@clisp.org>
13290
13291         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
13292
13293 2006-07-28  Bruno Haible  <bruno@clisp.org>
13294
13295         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
13296
13297 2006-07-28  Bruno Haible  <bruno@clisp.org>
13298
13299         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
13300         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
13301         Define fallbacks.
13302         Avoids link error on FreeBSD 4.x.
13303         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13304
13305         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
13306         encoding.
13307         * lib/mbswidth.c (iswcntrl): Likewise.
13308
13309 2006-07-27  Bruno Haible  <bruno@clisp.org>
13310
13311         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
13312         test.
13313
13314 2006-07-27  Bruno Haible  <bruno@clisp.org>
13315
13316         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
13317         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
13318         defined.
13319
13320 2006-07-26  Eric Blake  <ebb9@byu.net>
13321
13322         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
13323
13324 2006-07-26  Eric Blake  <ebb9@byu.net>
13325
13326         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
13327         like mingw that lack mkstemp.
13328         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
13329         avoid compilation warning on mingw.
13330
13331 2006-07-26  Bruno Haible  <bruno@clisp.org>
13332
13333         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
13334         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
13335         INT_FAST*_MIN, INTPTR_MIN.
13336
13337 2006-07-25  Bruno Haible  <bruno@clisp.org>
13338
13339         * modules/version-etc (Depends-on): Add stdarg.
13340
13341 2006-07-25  Bruno Haible  <bruno@clisp.org>
13342
13343         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
13344         complex commands.
13345
13346 2006-07-25  Bruno Haible  <bruno@clisp.org>
13347
13348         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
13349         defined in <stdarg.h> or config.h.
13350
13351 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13352
13353         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
13354         (gl_STDIO_SAFER): Remove.
13355
13356 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13357
13358         * MODULES.html.sh (File stream based Input/Output):
13359         Add fopen-safer, tmpfile-safer; remove stdio-safer.
13360         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
13361         * modules/fopen-safer, modules/tmpfile-safer: New files.
13362         * modules/stdio-safer: Remove.
13363
13364 2006-07-24  Bruno Haible  <bruno@clisp.org>
13365
13366         * modules/tmpdir: New file.
13367         * MODULES.html.sh (File system functions): Add it.
13368
13369 2006-07-24  Bruno Haible  <bruno@clisp.org>
13370
13371         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
13372         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
13373
13374 2006-07-24  Bruno Haible  <bruno@clisp.org>
13375
13376         * modules/clean-temp: New file.
13377
13378 2006-07-24  Bruno Haible  <bruno@clisp.org>
13379
13380         * m4/tmpdir.m4: New file, from GNU gettext.
13381
13382 2006-07-24  Bruno Haible  <bruno@clisp.org>
13383
13384         * lib/tmpdir.h: New file, from GNU gettext.
13385         * lib/tmpdir.c: New file, from GNU gettext.
13386
13387 2006-07-24  Bruno Haible  <bruno@clisp.org>
13388
13389         * lib/clean-temp.h: New file, from GNU gettext.
13390         * lib/clean-temp.c: New file, from GNU gettext.
13391
13392 2006-07-23  Eric Blake  <ebb9@byu.net>
13393
13394         * modules/stdio-safer (Files): Add tmpfile-safer.c.
13395         (Depends-on): Add binary-io.
13396
13397 2006-07-23  Eric Blake  <ebb9@byu.net>
13398
13399         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
13400
13401 2006-07-23  Eric Blake  <ebb9@byu.net>
13402
13403         * lib/tmpfile-safer.c: New file.
13404         * lib/stdio-safer.h (fopen_safer): Add prototype.
13405         * lib/stdio--.h (tmpfile): Make safer.
13406
13407 2006-07-23  Bruno Haible  <bruno@clisp.org>
13408
13409         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
13410         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
13411         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
13412         gl_linked_remove_at): Use it.
13413
13414 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13415         and Simon Josefsson <jas@extundo.com>
13416
13417         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
13418
13419         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
13420
13421 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13422
13423         * modules/close-stream: New file.
13424         * modules/closeout (Description): Make it clear that it exits
13425         with a diagnostic on error.
13426         (Depends-on): Add close-stream.  Remove fpending, stdbool.
13427         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
13428
13429 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13430
13431         * m4/close-stream.m4: New file.
13432
13433 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13434
13435         * lib/close-stream.c, lib/close-stream.h: New files.
13436
13437 2006-07-22  Bruno Haible  <bruno@clisp.org>
13438
13439         Merge from GNU gettext 0.15.
13440
13441         2006-05-01  Bruno Haible  <bruno@clisp.org>
13442
13443                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
13444
13445         2006-07-22  Bruno Haible  <bruno@clisp.org>
13446
13447                 * modules/javaversion: New file.
13448                 * MODULES.html.sh (Java): Add javaversion.
13449
13450         2006-03-12  Bruno Haible  <bruno@clisp.org>
13451
13452                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
13453
13454         2005-12-04  Bruno Haible  <bruno@clisp.org>
13455
13456                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
13457                 (untested).
13458
13459         2006-06-21  Bruno Haible  <bruno@clisp.org>
13460
13461                 Avoid warnings from recent versions of mcs.
13462                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
13463                 -o, -L, -r any more. Use options documented since mcs-1.0
13464                 instead. Similarly for -g.
13465
13466         2005-12-04  Bruno Haible  <bruno@clisp.org>
13467
13468                 * build-aux/csharpcomp.sh.in: Suffix for resources is
13469                 .resources, not .resource.
13470
13471         2005-07-09  Bruno Haible  <bruno@clisp.org>
13472
13473                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
13474                 add a .dll suffix.
13475                 Reported by Mark Junker <mjscod@gmx.de>.
13476
13477         2006-07-22  Bruno Haible  <bruno@clisp.org>
13478
13479                 * modules/gettext: Upgrade to gettext-0.15.
13480                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
13481                 m4/visibility.m4.
13482                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
13483
13484 2006-07-22  Bruno Haible  <bruno@clisp.org>
13485
13486         Merge from GNU gettext 0.15.
13487
13488         2006-03-25  Bruno Haible  <bruno@clisp.org>
13489
13490                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
13491
13492         2006-07-21  Bruno Haible  <bruno@clisp.org>
13493
13494                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
13495                 "1.1".
13496
13497         2006-05-09  Bruno Haible  <bruno@clisp.org>
13498
13499                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
13500                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
13501                 for the conftestver execution.
13502
13503         2006-05-01  Bruno Haible  <bruno@clisp.org>
13504
13505                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
13506                 optional target-version argument. Verify that the compiler
13507                 groks source of the specified source-version, or add -source
13508                 option as necessary. Verify that the compiler produces
13509                 bytecode in the specified target-version, or add -target and
13510                 -source options as necessary. Make the result of the test
13511                 available as variable CONF_JAVAC. Also log error output in
13512                 config.log.
13513
13514         2006-03-11  Bruno Haible  <bruno@clisp.org>
13515
13516                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
13517
13518         2006-05-09  Bruno Haible  <bruno@clisp.org>
13519
13520                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
13521                 CLASSPATH_SEPARATOR to a semicolon.
13522
13523         2006-03-12  Bruno Haible  <bruno@clisp.org>
13524
13525                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
13526                 available as variable CONF_JAVA, for subsequent autoconf
13527                 tests. Also log error output in config.log.
13528
13529         2006-07-19  Bruno Haible  <bruno@clisp.org>
13530
13531                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
13532                 that getline works on glibc2 systems. Needed to avoid trouble
13533                 in relocatable.c.
13534                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
13535
13536         2005-12-04  Bruno Haible  <bruno@clisp.org>
13537
13538                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
13539                 launcher (untested).
13540
13541         2005-12-04  Bruno Haible  <bruno@clisp.org>
13542
13543                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
13544
13545         2006-07-22  Bruno Haible  <bruno@clisp.org>
13546
13547                 * gettext.m4: Update from GNU gettext-0.15.
13548                 * nls.m4: Likewise.
13549                 * po.m4: Likewise.
13550                 * inttypes-pri.m4: Likewise.
13551                 * inttypes-h.m4: Renamed from inttypes.m4.
13552                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
13553
13554 2006-07-22  Bruno Haible  <bruno@clisp.org>
13555
13556         Merge from GNU gettext 0.15.
13557
13558         2005-07-05  Bruno Haible  <bruno@clisp.org>
13559
13560                 * printf-args.c (printf_fetchargs): Work around broken
13561                 definition of wint_t on mingw.
13562
13563         2005-02-12  Bruno Haible  <bruno@clisp.org>
13564
13565                 * xallocsa.h: Add extern "C" for C++.
13566
13567         2006-05-17  Bruno Haible  <bruno@clisp.org>
13568
13569                 Cygwin portability.
13570                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
13571
13572         2006-04-30  Bruno Haible  <bruno@clisp.org>
13573
13574                 * progreloc.c: Include <mach-o/dyld.h> if available.
13575                 (find_executable): Use _NSGetExecutablePath when possible.
13576
13577         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
13578
13579                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
13580                 function.
13581
13582         2005-12-29  Bruno Haible  <bruno@clisp.org>
13583
13584                 * progreloc.c (set_program_name_and_installdir): Fix
13585                 compilation error.
13586
13587         2005-12-04  Bruno Haible  <bruno@clisp.org>
13588
13589                 Cygwin portability.
13590                 * progreloc.c: Include <windows.h> also on Cygwin.
13591                 (find_executable): Add support for Cygwin.
13592                 (set_program_name_and_installdir): Handle also platforms with
13593                 nonempty EXEEXT.
13594
13595         2006-07-11  Bruno Haible  <bruno@clisp.org>
13596
13597                 * javacomp.c: Fix a comment.
13598                 Reported by Jim Meyering.
13599
13600         2006-04-30  Bruno Haible  <bruno@clisp.org>
13601
13602                 * javacomp.h (compile_java_class): Add source_version,
13603                 target_version arguments.
13604                 * javacomp.c: Rewritten to choose only a compiler that
13605                 respects the specified source_version and target_version.
13606
13607         2006-06-27  Bruno Haible  <bruno@clisp.org>
13608
13609                 Assume correct S_ISDIR macro.
13610                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
13611
13612         2006-07-22  Bruno Haible  <bruno@clisp.org>
13613
13614                 * javaversion.h: New file, from GNU gettext.
13615                 * javaversion.c: New file, from GNU gettext.
13616                 * javaversion.java: New file, from GNU gettext.
13617                 * javaversion.class: New file, from GNU gettext.
13618
13619         2006-05-17  Bruno Haible  <bruno@clisp.org>
13620
13621                 Cygwin portability.
13622                 * javaexec.c (execute_java_class): Test for jview program
13623                 also on Cygwin.
13624
13625         2006-04-09  Bruno Haible  <bruno@clisp.org>
13626
13627                 * fatal-signal.c: Don't include string.h.
13628                 (at_fatal_signal): Use a copying loop instead of memcpy.
13629
13630         2005-12-04  Bruno Haible  <bruno@clisp.org>
13631
13632                 * csharpexec.c: Add support for 'clix' launcher (untested).
13633                 (execute_csharp_using_sscli): New function.
13634                 (execute_csharp_program): Call it.
13635
13636         2006-06-21  Bruno Haible  <bruno@clisp.org>
13637
13638                 Avoid warnings from recent versions of mcs.
13639                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
13640                 -o, -L, -r any more. Use options documented since mcs-1.0
13641                 instead. Similarly for -g.
13642
13643         2005-07-09  Bruno Haible  <bruno@clisp.org>
13644
13645                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
13646                 add a .dll suffix.
13647                 Reported by Mark Junker <mjscod@gmx.de>.
13648
13649         2006-06-17  Bruno Haible  <bruno@clisp.org>
13650
13651                 * config.charset: Update for NetBSD 3.0.
13652
13653         2006-05-17  Bruno Haible  <bruno@clisp.org>
13654
13655                 Cygwin portability.
13656                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
13657
13658         2006-05-16  Bruno Haible  <bruno@clisp.org>
13659
13660                 * localcharset.c [CYGWIN]: Include <windows.h>.
13661                 (get_charset_aliases): For Cygwin, return the same CPxxx
13662                 aliases list as under WIN32.
13663                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
13664                 the environment variables. Fall back to GetACP().
13665
13666         2006-04-05  Bruno Haible  <bruno@clisp.org>
13667
13668                 * config.charset: Update Juan Manuel Guerrero's address.
13669
13670         2005-02-12  Bruno Haible  <bruno@clisp.org>
13671
13672                 * allocsa.h: Add extern "C" for C++.
13673
13674         2005-02-10  Bruno Haible  <bruno@clisp.org>
13675
13676                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
13677                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
13678
13679         2006-07-22  Bruno Haible  <bruno@clisp.org>
13680
13681                 * gettext.h: Update to GNU gettext-0.15.
13682
13683 2006-07-22  Bruno Haible  <bruno@clisp.org>
13684
13685         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
13686         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
13687         lib-prefix.m4, longdouble.m4, ssize_t.m4.
13688
13689 2006-07-21  Eric Blake  <ebb9@byu.net>
13690
13691         * modules/stdlib-safer: New file.
13692         * MODULES.html.sh (File stream based Input/Output): Add
13693         stdlib-safer.
13694
13695 2006-07-21  Eric Blake  <ebb9@byu.net>
13696
13697         * lib/stdlib-safer.h: New file from coreutils, required by
13698         stdlib--.h.
13699
13700 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
13701
13702         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
13703
13704 2006-07-20  Bruno Haible  <bruno@clisp.org>
13705
13706         * gnulib-tool: Recognize new option --assume-autoconf.
13707         (autoconf_minversion): New variable.
13708         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
13709
13710 2006-07-20  Bruno Haible  <bruno@clisp.org>
13711
13712         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
13713
13714 2006-07-19  Derek R. Price  <derek@ximbiot.com>
13715
13716         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
13717         Reindent and repaginate.
13718
13719 2006-07-19  Derek Price  <derek@ximbiot.com>
13720
13721         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
13722         Correct grammar.
13723
13724 2006-07-17  Bruno Haible  <bruno@clisp.org>
13725
13726         * modules/list: New file.
13727         * modules/array-list: New file.
13728         * modules/carray-list, modules/carray-list-tests: New files.
13729         * modules/linked-list, modules/linked-list-tests: New files.
13730         * modules/avltree-list, modules/avltree-list-tests: New files.
13731         * modules/rbtree-list, modules/rbtree-list-tests: New files.
13732         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
13733         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
13734         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
13735         * modules/oset: New file.
13736         * modules/array-oset: New file.
13737         * modules/avltree-oset, modules/avltree-oset-tests: New files.
13738         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
13739         * tests/test-carray_list.c: New file.
13740         * tests/test-linked_list.c: New file.
13741         * tests/test-avltree_list.c: New file.
13742         * tests/test-rbtree_list.c: New file.
13743         * tests/test-linkedhash_list.c: New file.
13744         * tests/test-avltreehash_list.c: New file.
13745         * tests/test-rbtreehash_list.c: New file.
13746         * tests/test-avltree_oset.c: New file.
13747         * tests/test-rbtree_oset.c: New file.
13748         * MODULES.html.sh (Container data structures): New section.
13749
13750 2006-07-17  Bruno Haible  <bruno@clisp.org>
13751
13752         * m4/gl_list.m4: New file.
13753
13754 2006-07-17  Bruno Haible  <bruno@clisp.org>
13755
13756         * lib/gl_list.h: New file.
13757         * lib/gl_list.c: New file.
13758         * lib/gl_array_list.h: New file.
13759         * lib/gl_array_list.c: New file.
13760         * lib/gl_carray_list.h: New file.
13761         * lib/gl_carray_list.c: New file.
13762         * lib/gl_linked_list.h: New file.
13763         * lib/gl_linked_list.c: New file.
13764         * lib/gl_anylinked_list1.h: New file.
13765         * lib/gl_anylinked_list2.h: New file.
13766         * lib/gl_avltree_list.h: New file.
13767         * lib/gl_avltree_list.c: New file.
13768         * lib/gl_anyavltree_list1.h: New file.
13769         * lib/gl_anyavltree_list2.h: New file.
13770         * lib/gl_rbtree_list.h: New file.
13771         * lib/gl_rbtree_list.c: New file.
13772         * lib/gl_anyrbtree_list1.h: New file.
13773         * lib/gl_anyrbtree_list2.h: New file.
13774         * lib/gl_anytree_list1.h: New file.
13775         * lib/gl_anytree_list2.h: New file.
13776         * lib/gl_linkedhash_list.h: New file.
13777         * lib/gl_linkedhash_list.c: New file.
13778         * lib/gl_anyhash_list1.h: New file.
13779         * lib/gl_anyhash_list2.h: New file.
13780         * lib/gl_avltreehash_list.h: New file.
13781         * lib/gl_avltreehash_list.c: New file.
13782         * lib/gl_rbtreehash_list.h: New file.
13783         * lib/gl_rbtreehash_list.c: New file.
13784         * lib/gl_anytreehash_list1.h: New file.
13785         * lib/gl_anytreehash_list2.h: New file.
13786
13787         * lib/gl_oset.h: New file.
13788         * lib/gl_oset.c: New file.
13789         * lib/gl_array_oset.h: New file.
13790         * lib/gl_array_oset.c: New file.
13791         * lib/gl_avltree_oset.h: New file.
13792         * lib/gl_avltree_oset.c: New file.
13793         * lib/gl_rbtree_oset.h: New file.
13794         * lib/gl_rbtree_oset.c: New file.
13795         * lib/gl_anytree_oset.h: New file.
13796
13797 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13798
13799         * m4/mkancesdirs.m4: New file.
13800         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
13801         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
13802         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
13803         it.
13804
13805 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13806
13807         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
13808         * lib/mkancesdirs.h: New files.
13809         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
13810         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
13811         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
13812         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
13813         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
13814         callers changed.  Revamp internals significantly, by not
13815         attempting to create directories that are temporarily more
13816         permissive than the final results.  Do not attempt to use
13817         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
13818         This removes some race conditions, fixes some bugs, and simplifies
13819         things.  Use new dirchownmod function to do owner and mode changes.
13820         * lib/mkdir-p.h: Likewise.
13821         * lib/modechange.c (octal_to_mode): New function.
13822         (struct mode_change): New member mentioned.
13823         (make_node_op_equals): New arg mentioned.  All callers changed.
13824         (mode_compile): Keep track of which mode bits the user has explicitly
13825         mentioned.
13826         (mode_adjust): New arg DIR, so that we implement the X op correctly.
13827         New arg PMODE_BITS, to keep track of which mode bits the user
13828         mentioned; it treats S_ISUID and S_ISGID speciall.
13829         All callers changed.
13830         * lib/modechange.h: Likewise.
13831
13832 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13833
13834         * MODULES.html.sh: Add mkancestors.
13835         * modules/mkancesdirs: New module.
13836         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
13837         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
13838         The chdir-safer and afs files are now orphans; I'll remove them
13839         unless someone speaks up.
13840         Add lib/dirchownmod.c, lib/dirchownmod.h.
13841         (Depends-on): Remove alloca, chown, save-cwd, dirname.
13842         Add lchown, mkancesdirs.
13843         (Maintainer): Add self.
13844
13845 2006-07-15  Karl Berry  <karl@gnu.org>
13846
13847         * gnulib-tool: help message wording/arrangement.
13848
13849 2006-07-14  Simon Josefsson  <jas@extundo.com>
13850
13851         * doc/gnulib.texi (Libtool and Windows): New section.
13852
13853 2006-07-12  Simon Josefsson  <jas@extundo.com>
13854
13855         * modules/gendocs (License): Fix license, approved by Karl.
13856
13857 2006-07-12  Eric Blake  <ebb9@byu.net>
13858
13859         * MODULES.html.sh: Add gendocs.
13860
13861 2006-07-11  Eric Blake  <ebb9@byu.net>
13862
13863         * modules/fdl: New module, to install doc/fdl.texi.
13864         * MODULES.html.sh: Add new section for documentation modules.
13865         * gnulib-tool: Avoid space-tab.
13866         (--doc-base): New option, to manage files from doc.
13867
13868 2006-07-11  Eric Blake  <ebb9@byu.net>
13869
13870         * m4/absolute-header.m4: Fix comments to match recent change.
13871
13872 2006-07-11  Eric Blake  <ebb9@byu.net>
13873
13874         * gnulib-tool: List --doc-base before --tests-base.
13875
13876 2006-07-11  Derek R. Price  <derek@ximbiot.com>
13877
13878         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
13879
13880 2006-07-11  Bruno Haible  <bruno@clisp.org>
13881
13882         * README: Mention where to put documentation.
13883
13884 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13885
13886         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
13887
13888 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13889
13890         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
13891         to stdint.m4.
13892
13893 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13894
13895         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
13896         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
13897         "no/such/file/stdint.h" when there is no such file, so that
13898         the resulting C code can be parsed by dodgy compilers.
13899         Problems reported by Bob Proulx.
13900
13901 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13902
13903         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
13904         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13905         macros into the GNU _D_EXACT_NAMLEN.
13906         * lib/savedir.c:  Likewise.
13907         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
13908
13909 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13910         and Paul Eggert  <eggert@cs.ucla.edu>
13911
13912         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
13913         * m4/savedir.m4:
13914         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13915         macros into the GNU _D_EXACT_NAMLEN.
13916
13917 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13918
13919         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
13920         around the absolute name, to work around a problem with the HP-UX
13921         11.23 native C compiler, reported by Bob Proulx.
13922
13923 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13924
13925         * doc/maintain.texi, make-stds.texi: Sync from
13926         <http://savannah.gnu.org/projects/gnustandards>.
13927
13928 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13929
13930         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
13931
13932 2006-07-09  Jim Meyering  <jim@meyering.net>
13933
13934         * m4/glob.m4: Remove a doubled word in a comment.
13935
13936 2006-07-09  Jim Meyering  <jim@meyering.net>
13937
13938         * lib/argp-pv.c: Remove a doubled word in a comment.
13939         * lib/check-version.c (check_version): Likewise.
13940         * lib/javacomp.c (compile_java_class): Likewise.
13941
13942 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13943
13944         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
13945         for the benefit of people using Autoconf 2.60.  If you want to
13946         support older Autoconf versions you can copy m4/onceonly_2_57.m4
13947         (or m4/onceonly.m4, if pre-2.57) manually.
13948
13949 2006-07-08  Jim Meyering  <jim@meyering.net>
13950
13951         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
13952         comment.
13953         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
13954         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
13955         comment.
13956
13957 2006-07-08  Jim Meyering  <jim@meyering.net>
13958
13959         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
13960
13961 2006-07-07  Simon Josefsson  <jas@extundo.com>
13962
13963         * tests/test-crc.c: Change expected crc value, the test vector
13964         were probably computed using the old broken crc.c?
13965
13966 2006-07-06  Simon Josefsson  <jas@extundo.com>
13967
13968         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
13969         now the canonical place for the M4 file).
13970
13971         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
13972         from the sys_socket dependency now.
13973
13974         * modules/inet_pton (Files): Ditto.
13975
13976         * modules/inet_ntop (Files): Ditto.
13977
13978 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13979
13980         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
13981         not gl_PREREQ_GETUSERSHELL.
13982
13983 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13984
13985         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
13986         with only one argument, for Autoconf 2.60.
13987         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
13988         expand to nothing, so add a shell command to avoid syntax error.
13989         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
13990
13991 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13992
13993         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
13994
13995 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13996
13997         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
13998         no longer needed.  Check for isblank decl.
13999         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
14000         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
14001         of existence.
14002
14003 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14004
14005         * lib/getloadavg.c: Use __VMS, not VMS.
14006         * lib/getopt.c: Likewise.
14007         * lib/getpagesize.h: Likewise.
14008         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
14009         and probably does not work.
14010
14011 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14012
14013         * lib/.cppi-disable: Add wcwidth.
14014         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
14015         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
14016         (ISGRAPH): Remove.  All uses changed to isgraph.
14017         (FOLD) [!defined _LIBC]: Remove special case.
14018         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
14019         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
14020         HAVE_ISBLANK.
14021         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
14022         case.
14023
14024 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14025
14026         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
14027         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
14028         brackets.  Other minor changes to suppress some compiler
14029         warnings.
14030
14031 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14032         and Paul Eggert  <eggert@cs.ucla.edu>
14033
14034         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
14035         of invoking obsolescent AC_HEADER_DIRENT macro.
14036         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
14037         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
14038         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
14039         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
14040         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
14041         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
14042         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
14043         * m4/readdir.m4: Remove; no longer needed.
14044
14045 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14046         and Paul Eggert  <eggert@cs.ucla.edu>
14047
14048         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
14049         Don't worry about this obsolete case any more.
14050         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
14051         directories.
14052         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
14053         worry about this obsolete case any more.
14054         * lib/fts.c: Likewise.
14055         * lib/getcwd.c: Likewise.
14056         * lib/glob.h: Likewise.
14057         * lib/savedir.c: Likewise.
14058
14059 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14060
14061         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
14062         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
14063         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
14064         needed.
14065         All uses removed.
14066         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14067         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14068         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
14069         needed.
14070         * m4/getdate.m4 (gl_GETDATE): Likewise.
14071         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14072         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14073         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14074         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14075         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14076         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14077         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
14078         needed.
14079
14080 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14081
14082         * lib/memcasecmp.c: Include <limits.h>.
14083         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
14084         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
14085         Don't assume isdigit succeeds only on '0' through '9'.
14086
14087 2006-07-05  Eric Blake  <ebb9@byu.net>
14088
14089         * modules/getaddrinfo (Depends-on): Add snprintf.
14090
14091 2006-07-05  Eric Blake  <ebb9@byu.net>
14092
14093         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
14094         to avoid 'header present but could not be compiled' on cygwin.
14095
14096 2006-07-05  Eric Blake  <ebb9@byu.net>
14097
14098         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
14099         missing from netdb.h.
14100         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
14101
14102 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14103
14104         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
14105         no longer needed.
14106         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
14107         * m4/getdate.m4 (gl_GETDATE): Likewise.
14108         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14109         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14110         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14111         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14112         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14113
14114 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14115
14116         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
14117         All uses of is_space replaced by isspace.
14118         * lib/exit.h: Don't talk about STDC_HEADERS.
14119         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
14120         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
14121         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
14122         replaced by isprint etc.
14123         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
14124         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14125         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
14126         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
14127         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
14128         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14129
14130 2006-07-05  Bruno Haible  <bruno@clisp.org>
14131
14132         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
14133         the function exists, before testing against AIX.
14134         Reported by Martin Lambers <marlam@marlam.de>.
14135
14136 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14137
14138         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
14139         From Mark D. Baushke.
14140
14141 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14142
14143         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
14144         to the absolute name, not just one, to bypass Sun C 5.8's
14145         "warning: #include of /usr/include/... may be non-portable".
14146
14147 2006-07-04  Eric Blake  <ebb9@byu.net>
14148
14149         * modules/dirname-tests: New test module.
14150         * tests/test-dirname.c: New file, replacing dirname.c
14151         TEST_DIRNAME section that was recently deleted.
14152
14153 2006-07-04  Bruno Haible  <bruno@clisp.org>
14154
14155         Assume ANSI C header files and <ctype.h> functions.
14156         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
14157         (mbsnwidth): Use isprint, iscntrl instead.
14158
14159 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14160
14161         Merge from coreutils.
14162         * MODULES.html.sh: Add xstrtold.
14163         * modules/xstrtold: New file.
14164         * modules/cycle-check (Files): Add lib/same-inode.h.
14165         * modules/dirname (Files): Add m4/double-slash-root.m4.
14166         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
14167         * modules/mkdir-p (Files): Add lib/same-inode.h.
14168         * modules/same (Files): Add lib/same-inode.h.
14169
14170 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14171
14172         * m4/absolute-header.m4: Renamed from full-header-path.m4.
14173         This is to keep the terminology clean; POSIX talks about
14174         "absolute pathnames", not "full pathnames", but the GNU
14175         Coding Standards say to use "path" for something else;
14176         so use "absolute" to keep both sides happy.
14177         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
14178         Set gl_absolute_header, not gl_full_header_path.
14179         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
14180         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
14181         All uses changed.
14182
14183         Merge from coreutils.
14184
14185         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14186
14187         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
14188         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
14189         want to require the building of c-strtod.o.
14190         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
14191         needs -lm directly.
14192         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
14193
14194         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14195
14196         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
14197         --as-needed option if available.  Problem reported by Albert Chin in
14198         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
14199         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
14200         cc merely issues a bunch of annoying warnings for --as-needed
14201         (this problem was reported by Bob Proulx).  Also, try linking with
14202         -lm to detect a bug in binutils 2.16 (this problem was reported
14203         by Ralf Wildenhues).
14204
14205         2006-06-18  Jim Meyering  <jim@meyering.net>
14206
14207         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
14208         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
14209         macro.
14210         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
14211         also check for glibc-2.4's abort-inducing bug.
14212
14213         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
14214         Low-probability clean-up should be to use rmdir to get rid of
14215         the just-created directory, not unlink.
14216
14217         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
14218         configure fail, and request a bug report to inform us about it.
14219         Add a comment that, barring reports to the contrary, in 2007 we'll
14220         assume ftruncate is universally available.
14221
14222         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14223
14224         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
14225
14226         2006-03-12  Jim Meyering  <jim@meyering.net>
14227
14228         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
14229         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
14230         * m4/same.m4 (gl_SAME): Likewise.
14231         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
14232
14233         2006-03-11  Eric Blake  <ebb9@byu.net>
14234
14235         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
14236         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
14237         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
14238         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
14239
14240 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14241
14242         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
14243         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
14244         reported by Mark D. Baushke, one in
14245         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
14246
14247         Merge from coreutils.
14248
14249         * lib/.cppi-disable: Add stdint_.h.
14250         * lib/.cvsignore: Add stdint.h.
14251
14252         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14253
14254         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
14255         both double and long double versions.
14256         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
14257         * lib/xstrtold.c: New file.
14258         * lib/xstrtod.h (xstrtold): New decl.
14259
14260         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14261
14262         * lib/filemode.c (setst): Remove.
14263         (strmode): Rewrite to avoid setst.  This makes the code shorter,
14264         (arguably) clearer, and the generated code is a bit smaller on my
14265         Debian GNU/Linux stable x86 host.
14266
14267         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14268
14269         * lib/filemode.c: Include "filemode.h" first, to test the interface.
14270         Assume that filemode.h includes sys/types.h and sys/stat.h.
14271         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
14272         (ftypelet): Reorder to put common cases first, for efficiency.
14273         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
14274         to do 'M'.
14275         (strmode): Renamed from mode_string, and now stores 12 bytes instead
14276         of 10, for compatibility with FreeBSD.  All callers changed.
14277         (filemodestring): Now stores 12 bytes instead of 10, and sets file
14278         types that can't be deduced solely from st_mode.  First arg is now a
14279         const pointer.
14280         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
14281         (strmode): Renamed from mode_string.
14282         (filemodestring): New decl.
14283         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
14284         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
14285         needed.
14286         (S_ISPORT, S_ISWHT): New macros, if not already defined.
14287
14288         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14289
14290         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
14291         fsusage.h now does that.  Include fsusage.h first, to test interface.
14292         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
14293         at most one method (the old code could have generated decls that
14294         didn't conform to C89, not that this was ever exercised).
14295         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
14296
14297         2006-03-19  Jim Meyering  <jim@meyering.net>
14298
14299         Work even in a chroot where d_ino values for entries in "/"
14300         don't match the stat.st_ino values for the same names.
14301         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
14302         number, iterate through all entries again, using lstat instead.
14303         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
14304         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
14305
14306         * lib/getcwd.c (__getcwd): Clarify a comment.
14307         Use memcpy in place of a call to strcpy.
14308
14309         2006-03-12  Jim Meyering  <jim@meyering.net>
14310
14311         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
14312         matches that of the current directory (which we're about to chdir ".."
14313         out of), then save the dev-ino of the parent, instead.
14314
14315         * lib/same-inode.h (SAME_INODE): New file/macro.
14316         * lib/chdir-safer.c (SAME_INODE): Remove definition.
14317         Include "same-inode.h", instead.
14318         * lib/same.c: Likewise.
14319         * lib/cycle-check.h: Include "same-inode.h".
14320         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
14321         * lib/cycle-check.c (SAME_INODE): Remove definition.
14322         * lib/root-dev-ino.h: Include "same-inode.h".
14323
14324         2006-03-11  Eric Blake  <ebb9@byu.net>
14325
14326         * lib/same.c (same_name): s/base_name/last_component/
14327         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
14328         * lib/filenamecat.c (file_name_concat): Likewise.
14329
14330         2006-03-11  Eric Blake  <ebb9@byu.net>,
14331                     Paul Eggert  <eggert@cs.ucla.edu>
14332
14333         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
14334         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
14335         drive prefix.
14336         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
14337         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
14338         (last_component): New method.
14339         * lib/dirname.c (dir_len): Determine when drive letters need a
14340         subsequent slash.  Preserve // when it is special.
14341         (dir_name): Don't append dot when drive letter is absolute.
14342         [TEST_DIRNAME]: Move into a full-blown gnulib test.
14343         * lib/basename.c (base_name): New semantics - malloc the result.
14344         Preserve // when it is special.  Preserve relative files that look
14345         like drive letters.
14346         (base_len): Preserve // when it is special.
14347         (last_component): New method, similar to old base_name semantics.
14348         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
14349         base_name.  Strip redundant slashes from ///.
14350
14351 2006-07-03  Jim Meyering  <jim@meyering.net>
14352
14353         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
14354         macro is used before the first cycle_check call.
14355
14356 2006-07-03  Eric Blake  <ebb9@byu.net>
14357
14358         * modules/dirname (Depends-on): Add xstrndup.
14359
14360 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14361
14362         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
14363         test cases, so that config.log is a bit easier to follow.
14364
14365 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14366
14367         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
14368         both are 64 bits, since this seems to be the tradition, and this
14369         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
14370         we ever run into a host that prefers long long to long in this
14371         case, we'll need another configure-time test.  Problem reported by
14372         Jim Meyering.
14373
14374 2006-07-02  Eric Blake  <ebb9@byu.net>
14375
14376         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
14377
14378 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14379
14380         * modules/inttypes (Depends-on): No longer depends on stdint.
14381         * modules/stdint (Description): Say more about assumptions.
14382         Say that the fast types might differ.  Say macros are used.
14383         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
14384         (Makefile.am): Revise list of substituted symbols to match
14385         new stdint.m4.
14386         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
14387         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
14388         * tests/test-stdint.c (verify_same_types)
14389         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
14390         the code conforms to C99/C89.
14391         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
14392         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
14393
14394 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14395
14396         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
14397         but fix a bug, by requiring at least 64 bits.
14398         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
14399         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
14400         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
14401         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
14402
14403         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
14404         changes.  Make 2.59 a prerequisite.  Check and substitute for
14405         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
14406         inttypes.h.  Do not use special include files; just use the
14407         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
14408         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
14409         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
14410         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
14411         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
14412         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
14413         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
14414         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
14415         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
14416         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
14417         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
14418         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
14419         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
14420         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
14421         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
14422         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
14423         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
14424         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
14425         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
14426         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
14427         WINT_MAX.  Check for C99 conformance more strictly, by detecting
14428         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
14429         not check for things that C99 does not require, e.g., int8_t.  If
14430         a test isn't needed unless <stdint.h> isn't working, and is
14431         unlikely to be needed for any other reason, then don't do it
14432         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
14433         size_t, since we assume C89 freestanding at least.  Do not check
14434         for sig_atomic_t, wchar_t, or wint_t, since the code now does
14435         the right thing even if the types are not defined.  Instead use:
14436         (gl_STDINT_TYPE_PROPERTIES): New macro.
14437         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
14438         testing whether <sys/types.h> clashes, as Autoconf does this for
14439         us now.  All uses removed.
14440         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
14441         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
14442         (gl_CHECK_TYPE_SAME):
14443         Remove; no longer needed.
14444         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
14445         exists, since we'll return 0 anyway in that case.
14446         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
14447
14448 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14449
14450         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
14451         possible collision with system files.
14452         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
14453         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
14454         WCHAR_MIN and WCHAR_MAX in this case.
14455         (<stddef.h>): Do not include; no longer needed.
14456         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
14457         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
14458         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
14459         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
14460         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
14461         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
14462         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
14463         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
14464         !defined(__c99))]: Include in this case too, since it's harmless
14465         now.
14466         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
14467         dangerous to do so.
14468         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
14469         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
14470         (_STDINT_MIN, _STDINT_MAX): New macros.
14471         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
14472         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
14473         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
14474         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
14475         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
14476         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
14477         macros, not typedefs; this simplifies things quite a bit.
14478         Use long int for all types narrower than int64_t.
14479         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
14480         Define in terms of long long int or int64_t or long int,
14481         not int64_t or int32_t.  This saves some compile-time testing.
14482         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
14483         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
14484         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
14485         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
14486         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
14487         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
14488         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
14489         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
14490         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
14491         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
14492         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14493         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14494         undef any previous version and define our own version, for
14495         simplicity and consistency with the new macros for types.
14496         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14497         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14498         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
14499         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
14500         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
14501         @WINT_T_SUFFIX@ to keep things simple here.
14502         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
14503         Simplify by assuming typical 8/16/32/64 host, since we're
14504         already doing that elsewhere anyway.
14505         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
14506         and assume long long int is 64 bits if available.  This
14507         speeds up 'configure'.
14508
14509 2006-07-01  Eric Blake  <ebb9@byu.net>
14510
14511         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
14512         Reported by Andreas Buening.
14513
14514 2006-07-01  Eric Blake  <ebb9@byu.net>
14515
14516         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
14517
14518 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14519
14520         * lib/getaddrinfo.c: fixed typo
14521
14522 2006-06-29  Jim Meyering  <jim@meyering.net>
14523
14524         * modules/strftime (Maintainer): Add my name, since with the
14525         FPRINTFTIME changes strftime.c has forked from glibc.
14526
14527 2006-06-29  Eric Blake  <ebb9@byu.net>
14528
14529         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
14530
14531 2006-06-29  Eric Blake  <ebb9@byu.net>
14532
14533         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
14534
14535 2006-06-29  Eric Blake  <ebb9@byu.net>
14536
14537         * lib/stat_.h: New file.
14538
14539 2006-06-29  Eric Blake  <ebb9@byu.net>
14540
14541         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
14542         unused static function.
14543
14544 2006-06-29  Eric Blake  <ebb9@byu.net>
14545
14546         * doc/functions.texi (Function Portability): Document missing lstat
14547         on mingw.
14548
14549 2006-06-29  Eric Blake  <ebb9@byu.net>
14550
14551         * MODULES.html.sh: Add sys_stat.
14552         * modules/sys_stat: New module.
14553         * modules/mkstemp (Depends-on): Add sys_stat.
14554
14555 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14556
14557         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
14558
14559 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14560
14561         * m4/c-bs-a.m4: Removed.
14562
14563 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14564
14565         * lib/strftime.c: Assume strftime() exists.
14566
14567 2006-06-29  Derek Price  <derek@ximbiot.com>
14568
14569         * modules/c-bs-a: Removed - \a is C89.
14570         * MODULES.html.sh: Remove c-bs-a.
14571
14572 2006-06-29  Bruno Haible  <bruno@clisp.org>
14573
14574         * modules/wcwidth (License): Change to LGPL.
14575
14576 2006-06-28  Simon Josefsson  <jas@extundo.com>
14577
14578         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
14579         on _WIN32.
14580
14581         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
14582         getnameinfo.
14583
14584 2006-06-28  Simon Josefsson  <jas@extundo.com>
14585
14586         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
14587
14588 2006-06-28  Simon Josefsson  <jas@extundo.com>
14589
14590         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
14591         functions there.  It will succeed on Windows XP, but on Windows
14592         2000 and (presumably) earlier, it will fail, and use the internal
14593         re-implementation.
14594         (use_win32_p): New function.
14595         (getaddrinfo): Use strtoul on servname, to support numeric ports.
14596         Support AI_NUMERICSERV to disable getservbyname.
14597         (getnameinfo): New function, only supports
14598         NI_NUMERICHOST|NI_NUMERICSERV for now.
14599
14600         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
14601         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
14602         getnameinfo.
14603
14604 2006-06-28  Eric Blake  <ebb9@byu.net>
14605
14606         * modules/wcwidth: New file.
14607         * modules/mbchar (Depends-on): Add wcwidth.
14608         * modules/mbswidth (Depends-on): Add wcwidth.
14609         * MODULES.html.sh: Add wcwidth.
14610
14611 2006-06-28  Eric Blake  <ebb9@byu.net>
14612
14613         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
14614         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
14615
14616 2006-06-28  Eric Blake  <ebb9@byu.net>
14617
14618         * lib/xvasprintf.h: Fix comments.
14619
14620 2006-06-28  Eric Blake  <ebb9@byu.net>
14621
14622         * lib/mbchar.h (wcwidth): Include wcwidth.h.
14623         * lib/mbswidth.c (wcwidth): Move from here...
14624         * lib/wcwidth.h: ...to this new file.
14625
14626 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14627
14628         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
14629
14630         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
14631         it's obsolete.
14632         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
14633
14634 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14635
14636         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
14637         Autoconf 2.60 says this stuff was obsolete.
14638
14639 2006-06-28  Bruno Haible  <bruno@clisp.org>
14640
14641         * modules/wcwidth (Files): Add m4/wchar_t.m4.
14642
14643 2006-06-28  Bruno Haible  <bruno@clisp.org>
14644
14645         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
14646         gt_TYPE_WCHAR_T.
14647
14648 2006-06-28  Bruno Haible  <bruno@clisp.org>
14649
14650         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
14651         declaration for wcwidth.
14652         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
14653
14654 2006-06-28  Bruno Haible  <bruno@clisp.org>
14655
14656         * lib/mkdtemp.c [MINGW]: Include <io.h>.
14657         (mkdir): Define using _mkdir.
14658
14659 2006-06-28  Bruno Haible  <bruno@clisp.org>
14660
14661         * lib/getaddrinfo.h: Fix POSIX URL.
14662         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
14663         _WIN32.
14664         (use_win32_p): Make static.
14665         (getaddrinfo): Reject service name if it is empty or does not consist
14666         solely of decimal digits, or if its value is > 65535.
14667         (getnameinfo): Remove useless casts.
14668
14669 2006-06-27  Simon Josefsson  <jas@extundo.com>
14670
14671         * modules/sys_select: New file, suggested by Bruno Haible, Paul
14672         Eggert and Martin Lambers.
14673
14674 2006-06-27  Simon Josefsson  <jas@extundo.com>
14675
14676         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
14677         Eggert and Martin Lambers.
14678
14679 2006-06-27  Bruno Haible  <bruno@clisp.org>
14680
14681         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
14682         result to 0, not to empty.
14683         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
14684
14685 2006-06-27  Bruno Haible  <bruno@clisp.org>
14686
14687         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
14688
14689 2006-06-26  Simon Josefsson  <jas@extundo.com>
14690
14691         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
14692         present.
14693
14694 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
14695
14696         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
14697         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
14698         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
14699
14700 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
14701
14702         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
14703
14704 2006-06-26  Bruno Haible  <bruno@clisp.org>
14705
14706         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
14707
14708 2006-06-26  Bruno Haible  <bruno@clisp.org>
14709
14710         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
14711
14712 2006-06-26  Bruno Haible  <bruno@clisp.org>
14713
14714         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
14715         SGI C compiler in pre-C99 mode.
14716         Suggested by Mark D. Baushke and Larry Jones.
14717
14718 2006-06-26  Bruno Haible  <bruno@clisp.org>
14719
14720         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
14721         WCHAR_MAX.
14722         Reported by Mark D. Baushke and Larry Jones.
14723
14724 2006-06-26  Bruno Haible  <bruno@clisp.org>
14725
14726         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
14727         in pre-C99 mode.
14728         Suggested by Mark D. Baushke and Larry Jones.
14729
14730 2006-06-23  Simon Josefsson  <jas@extundo.com>
14731             Bruno Haible  <bruno@clisp.org>
14732
14733         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
14734         Emit mostlyclean-local rule.
14735         (func_emit_tests_Makefile_am): Likewise.
14736         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
14737
14738 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
14739
14740         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
14741
14742 2006-06-23  Bruno Haible  <bruno@clisp.org>
14743
14744         * tests/test-stdint.c: Update to match ISO C 99 Technical
14745         Corrigendum 1.
14746
14747 2006-06-23  Bruno Haible  <bruno@clisp.org>
14748
14749         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
14750
14751 2006-06-23  Bruno Haible  <bruno@clisp.org>
14752
14753         * lib/stdint_.h: Treat IRIX like OpenBSD.
14754
14755 2006-06-23  Bruno Haible  <bruno@clisp.org>
14756
14757         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
14758         ISO C 99 Technical Corrigendum 1.
14759
14760 2006-06-22  Simon Josefsson  <jas@extundo.com>
14761
14762         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
14763         MinGW.
14764
14765 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14766
14767         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
14768         needed.  Some compiler complained about some of them.  Problem reported
14769         by Larry Jones in
14770         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
14771
14772 2006-06-21  Simon Josefsson  <jas@extundo.com>
14773
14774         * tests/test-getaddrinfo.c: New file.
14775
14776         * modules/getaddrinfo-tests: New file.
14777
14778         * MODULES.html.sh: Add inet_pton.
14779
14780         * modules/inet_pton: New file.
14781
14782 2006-06-21  Simon Josefsson  <jas@extundo.com>
14783
14784         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
14785         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
14786         of using the (limited) gnulib implementation on Windows XP.
14787
14788         * m4/inet_pton.m4: New file.
14789
14790 2006-06-21  Simon Josefsson  <jas@extundo.com>
14791
14792         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
14793         variable.
14794
14795         * lib/socket_.h: Don't define WINVER.
14796
14797         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
14798         slightly modified to work in gnulib.
14799
14800 2006-06-21  Simon Josefsson  <jas@extundo.com>
14801
14802         * doc/gnulib.texi (Windows sockets): Add.
14803
14804 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
14805
14806         * lib/read-file.c (fread_file): Start with buffer allocation of
14807         0 bytes rather than 1 byte; this simplifies the code.
14808         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
14809         code to free buffer and save/restore errno.
14810         (internal_read_file): Remove unused local.
14811
14812 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
14813
14814         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
14815         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
14816         Problem reported by Denis Excoffier in
14817         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
14818
14819 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14820
14821         * modules/sys_socket, modules/socklen: Include sys/types since
14822         FreeBSD 4.x's sys/socket.h needs it.
14823
14824 2006-06-19  Simon Josefsson  <jas@extundo.com>
14825
14826         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
14827
14828 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14829
14830         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
14831
14832 2006-06-19  Bruno Haible  <bruno@clisp.org>
14833
14834         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
14835         and FULL_PATH_INTTYPES_H in angle brackets.
14836         Reported by Mark D. Baushke <mdb@gnu.org>.
14837
14838 2006-06-17  Eric Blake  <ebb9@byu.net>
14839
14840         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
14841         errno.
14842
14843 2006-06-17  Bruno Haible  <bruno@clisp.org>
14844
14845         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
14846         <sys/inttypes.h>.
14847
14848 2006-06-17  Bruno Haible  <bruno@clisp.org>
14849
14850         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
14851         whether errno is declared. Assume <errno.h> declares errno.
14852
14853 2006-06-17  Bruno Haible  <bruno@clisp.org>
14854
14855         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
14856
14857 2006-06-17  Bruno Haible  <bruno@clisp.org>
14858
14859         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
14860         problem on Solaris 2.5.1.
14861
14862 2006-06-16  Eric Blake  <ebb9@byu.net>
14863
14864         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
14865         * lib/unicodeio.c [!defined errno]: Likewise.
14866         * lib/strtol.c [!defined errno]: Likewise.
14867         * lib/strtod.c [!defined errno]: Likewise.
14868
14869 2006-06-15  Eric Blake  <ebb9@byu.net>
14870
14871         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
14872
14873 2006-06-15  Eric Blake  <ebb9@byu.net>
14874
14875         * config/srclist.txt (ssize_t.m4): Lose sync.
14876
14877 2006-06-15  Bruno Haible  <bruno@clisp.org>
14878
14879         * modules/stdint (Files): Include m4/full-header-path.m4,
14880         m4/size_max.m4, m4/wchar_t.m4.
14881         (Makefile.am): Many more substitutions.
14882         * modules/stdint-tests: New file.
14883         * tests/test-stdint.c: New file.
14884
14885 2006-06-15  Bruno Haible  <bruno@clisp.org>
14886
14887         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
14888         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
14889         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
14890         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
14891         gl_CHECK_TYPE_SAME): New macros.
14892
14893 2006-06-15  Bruno Haible  <bruno@clisp.org>
14894
14895         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
14896
14897 2006-06-15  Bruno Haible  <bruno@clisp.org>
14898
14899         * lib/stdint_.h: Rewritten to be fully auto-configured.
14900         Fixes bug on HP-UX/IA64.
14901
14902 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
14903
14904         * lib/getdate.y (__attribute__): Don't define if already defined.
14905         Problem reported by Larry Jones.
14906         * lib/utimens.c (__attribute__): Likewise.
14907
14908 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
14909
14910         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
14911         reported by Andreas Schwab.
14912
14913 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14914             Bruno Haible  <bruno@clisp.org>
14915
14916         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
14917         check for the declaration of strnlen and a run test that exposes the
14918         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
14919         rpl_strndup.
14920
14921 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14922             Bruno Haible  <bruno@clisp.org>
14923
14924         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
14925
14926 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14927
14928         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
14929         compile test, for Tru64 4.0D.
14930
14931 2006-05-28  Karl Berry  <karl@gnu.org>
14932
14933         * config/srclist.txt (printf-args.c): lose sync.
14934
14935 2006-05-26  Martin Lambers  <marlam@marlam.de>
14936
14937         * lib/getpass.c: Updates the test for the native W32 API, and adds
14938         missing includes, thus fixing compilation warnings.
14939
14940 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14941
14942         * lib/exclude.c (exclude_fnmatch): New function.
14943         (excluded_file_name): Call exclude_fnmatch.
14944         * lib/exclude.h (excluded_file_name): New prototype
14945
14946 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
14947
14948         * lib/tempname.c (small_open, large_open): New macros.
14949         (__open, __open64) [!_LIBC]: Remove.
14950         (__gen_tempname): Use small_open and large_open instead of __open
14951         and __open64.  This fixes a portability bug on HP-UX 11.11i
14952         reported by Simon Wing-Tang in
14953         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
14954
14955 2006-05-24  Bruno Haible  <bruno@clisp.org>
14956
14957         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
14958         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
14959         Reported by Thorsten Maerz <torte@netztorte.de> via
14960         Aaron Stone <aaron@serendipity.cx>.
14961
14962 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14963
14964         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
14965         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
14966         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
14967         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
14968         not really conditional on the cache.
14969         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
14970
14971 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14972
14973         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
14974         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
14975         (my_usleep): Don't mishandle maximum value.
14976
14977 2006-05-19  Jim Meyering  <jim@meyering.net>
14978
14979         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
14980
14981 2006-05-17  Bruno Haible  <bruno@clisp.org>
14982
14983         Cygwin portability.
14984         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
14985
14986 2006-05-17  Bruno Haible  <bruno@clisp.org>
14987
14988         * lib/stdint_.h: Fix recognition of Cygwin.
14989
14990 2006-05-15  Bruno Haible  <bruno@clisp.org>
14991
14992         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
14993         on libtool patch by Ralf Wildenhues.
14994
14995 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14996
14997         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
14998         test for C99 conformance; (bool) 0.5 is an integer constant
14999         expression, but (bool) -0.5 is not.  Problem reported by Fedor
15000         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
15001
15002 2006-05-11  Simon Josefsson  <jas@extundo.com>
15003
15004         * m4/xvasprintf.m4: Fix obvious typo.
15005
15006 2006-05-11  Jim Meyering  <jim@meyering.net>
15007
15008         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
15009         James Lemley.
15010
15011 2006-05-10  Simon Josefsson  <jas@extundo.com>
15012
15013         * lib/md4.c: Typo fix, update copyright years.
15014         (K1, K2): Don't use L because it turn computations into 64-bit on
15015         64-bit platforms.
15016
15017 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
15018
15019         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
15020         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
15021         unwanted sign propagation, e.g., on hosts with 64-bit int.
15022         There still are some problems with reeelly weird theoretical hosts
15023         (e.g., 33-bit int) but it's not worth worrying about now.
15024         * lib/sha1.c (rol): Likewise.
15025         (K1, K2, K3, K4): Remove unnecessary L suffix.
15026
15027 2006-05-10  Bruno Haible  <bruno@clisp.org>
15028
15029         * lib/des.c: Cast to avoid warnings.
15030
15031 2006-05-09  Bruno Haible  <bruno@clisp.org>
15032
15033         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
15034         (Depends-on): Depend also on xsize, stdarg.
15035         (configure.ac): Add gl_XVASPRINTF.
15036
15037 2006-05-09  Bruno Haible  <bruno@clisp.org>
15038
15039         * m4/xvasprintf.m4: New file.
15040
15041 2006-05-09  Bruno Haible  <bruno@clisp.org>
15042
15043         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
15044         (EOVERFLOW): Define fallback value.
15045         (xstrcat): New function.
15046         (xvasprintf): Recognize the special case of a string concatenation.
15047
15048 2006-05-08  Eric Blake  <ebb9@byu.net>
15049
15050         * gnulib-tool (func_version): Base copyright year on CVS date.
15051         (func_emit_copyright_notice): New function.
15052         (func_emit_lib_Makefile_am): Use it.
15053         (func_emit_tests_Makefile_am): Likewise.
15054         (func_import): Likewise.
15055
15056 2006-05-08  Bruno Haible  <bruno@clisp.org>
15057
15058         * modules/stdarg: New file.
15059         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
15060
15061 2006-05-08  Bruno Haible  <bruno@clisp.org>
15062
15063         * m4/stdarg.m4: New file, from GNU gettext.
15064
15065 2006-05-08  Bruno Haible  <bruno@clisp.org>
15066
15067         * config/srclist.txt (build-aux/config.rpath): different from latest
15068         release.
15069
15070 2006-05-08  Bruno Haible  <bruno@clisp.org>
15071
15072         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
15073
15074 2006-05-05  Jim Meyering  <jim@meyering.net>
15075
15076         * m4/warning.m4: New file, derived from bison's file by the same name.
15077
15078 2006-05-03  Bruno Haible  <bruno@clisp.org>
15079
15080         * lib/stdint_.h: Shorter URL.
15081         * lib/inttypes.h: Likewise.
15082
15083 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15084
15085         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
15086
15087 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15088
15089         * lib/verify.h: Document the internals better.  Most of this change
15090         was written by Bruno Haible.
15091
15092 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15093
15094         * doc/verify.texi: New file, partly based on a proposal by
15095         Bruno Haible.
15096
15097 2006-05-02  Bruno Haible  <bruno@clisp.org>
15098
15099         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
15100         test from here...
15101         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
15102
15103 2006-04-29  Bruno Haible  <bruno@clisp.org>
15104
15105         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
15106         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
15107
15108 2006-04-29  Bruno Haible  <bruno@clisp.org>
15109
15110         * gnulib-tool: Make --update option actually work.
15111
15112 2006-04-29  Bruno Haible  <bruno@clisp.org>
15113
15114         * doc/gcd.texi: New file.
15115         * doc/gnulib.texi: Include it.
15116
15117 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
15118
15119         * lib/getdate.y (get_date): When adding relative date, start with the
15120         initial time, not with the result of the first mktime call.
15121
15122 2006-04-25  Bruno Haible  <bruno@clisp.org>
15123
15124         * gnulib-tool (func_import): Output the include directives in three
15125         blocks, sorted separately.
15126         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15127
15128 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15129
15130         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
15131         to define main with arguments, for C++.  Reported by Eric Blake.
15132         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
15133         Prefer 'int main ()' to 'int main (void)', for C++.
15134         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
15135         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
15136         for 'main', for C99 and C++.
15137
15138 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15139
15140         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
15141         Don't assume that exit status -1 is valid.
15142         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15143         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
15144         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
15145         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
15146         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
15147         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
15148         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
15149         functions can be used without declaring them, or that you can
15150         exit with status -1.
15151         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
15152
15153 2006-04-24  Karl Berry  <karl@gnu.org>
15154
15155         * config/srclist.txt (longdouble.m4): sync lost.
15156
15157 2006-04-24  Eric Blake  <ebb9@byu.net>
15158
15159         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
15160
15161 2006-04-24  Bruno Haible  <bruno@clisp.org>
15162
15163         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
15164         poll() implementation in AIX.
15165         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15166
15167 2006-04-24  Bruno Haible  <bruno@clisp.org>
15168
15169         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
15170         assigned exactly once.
15171
15172 2006-04-23  Claudio Fontana  <claudio@gnu.org>
15173             Bruno Haible  <bruno@clisp.org>
15174
15175         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
15176         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
15177         for AM_CPPFLAGS.
15178
15179 2006-04-23  Bruno Haible  <bruno@clisp.org>
15180
15181         * modules/copy-file: Depend on unistd.
15182         * modules/execute: Likewise.
15183         * modules/fatal-signal: Likewise.
15184         * modules/findprog: Likewise.
15185         * modules/mkdtemp : Likewise.
15186         * modules/pipe: Likewise.
15187         * modules/wait-process: Likewise.
15188
15189 2006-04-23  Bruno Haible  <bruno@clisp.org>
15190
15191         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
15192         condition was already detected.
15193         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15194
15195 2006-04-23  Bruno Haible  <bruno@clisp.org>
15196
15197         * lib/copy-file.c: Include <unistd.h> unconditionally.
15198         * lib/execute.c: Likewise.
15199         * lib/fatal-signal.c: Likewise.
15200         * lib/findprog.c: Likewise.
15201         * lib/mkdtemp.c: Likewise.
15202         * lib/pipe.h: Likewise.
15203         * lib/pipe.c: Likewise.
15204         * lib/wait-process.h: Likewise.
15205
15206 2006-04-23  Bruno Haible  <bruno@clisp.org>
15207
15208         * gnulib-tool (func_usage): Fix --import description. Document
15209         --update.
15210         (func_import): Create temporary file in a temporary directory, if
15211         --dry-run is specified. Silence errors from 'grep' when there are no
15212         m4 files in $m4dir.
15213         (func_create_testdir): Silence errors from 'grep' when there are no
15214         m4 files in $m4dir.
15215         Reported by Karl Berry <karl@freefriends.org>.
15216
15217 2006-04-20  Bruno Haible  <bruno@clisp.org>
15218
15219         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
15220         one argument, so that the code will be portable to Autoconf 2.60.
15221         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
15222         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
15223         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
15224
15225 2006-04-19  Derek Price  <derek@ximbiot.com>
15226             Eric Blake  <ebb9@byu.net>
15227
15228         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
15229         rather than "/full/path.h".  Update comment to match.  Shorten &
15230         generalize m4_translit call via AS_TR_CPP.
15231
15232 2006-04-19  Derek Price  <derek@ximbiot.com>
15233             Eric Blake  <ebb9@byu.net>
15234
15235         * lib/inttypes.h: Correct grammar in comment.
15236
15237 2006-04-18  Derek Price  <derek@ximbiot.com>
15238             Paul Eggert  <eggert@cs.ucla.edu>
15239
15240         * modules/inttypes: New file.
15241         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
15242
15243 2006-04-18  Derek Price  <derek@ximbiot.com>
15244             Paul Eggert  <eggert@cs.ucla.edu>
15245
15246         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
15247         New files.
15248
15249 2006-04-18  Derek Price  <derek@ximbiot.com>
15250             Paul Eggert  <eggert@cs.ucla.edu>
15251
15252         * lib/inttypes.h: New file.
15253         * lib/strtoimax.c: Assume <inttypes.h>.
15254
15255 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
15256
15257         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
15258         isn't mounted.  Problem reported by Kir Kolyshkin.
15259
15260 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15261
15262         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
15263         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
15264         Derek R. Price.
15265         * lib/regex.h (RE_DUP_MAX): Update comment to match current
15266         implementation.
15267
15268 2006-04-12  Eric Blake  <ebb9@byu.net>
15269
15270         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
15271         is now done automatically by the corresponding Autoconf macro.
15272
15273 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
15274
15275         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
15276         time_r.h.
15277
15278 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15279
15280         Merge regex changes from libc, removing some of our
15281         POSIX-conformance changes that were rejected and redoing them in a
15282         less-intrusive way.
15283
15284         * lib/regcomp.c (re_compile_internal, init_dfa):
15285         Length arg is now size_t, not Idx.  All uses changed.
15286         (peek_token): Forward decl now says internal_function.
15287         (__re_error_msgid, __re_error_msgid_idx):
15288         Now static rather than extern with attribute_hidden.
15289         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
15290         For some reason libc prefers K&R style defns for external functions.
15291         (regerror) [!defined _LIBC]: Likewise.
15292         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
15293         (seek_collating_symbol_entry, lookup_collation_sequence_value):
15294         (build_range_exp, build_collating_symbol):
15295         Use K&R-style defn.
15296         (re_compile_fastmap): Use '\0' to memset, not 0.
15297         (utf8_sb_map): Make the calculations more obvious.
15298         (init_dfa, parse_bracket_exp, build_charclass_op):
15299         Call calloc and cast result, as glibc does.
15300         (init_word_char, fetch_token, peek_token, peek_token_bracket):
15301         (build_range_exp, build_collating_symbol):
15302         Now internal functions.
15303
15304         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
15305
15306         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
15307         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
15308         Don't depend on VMS; depend on __VMS instead, for POSIX
15309         namespace cleanness.
15310         (regoff_t): Define to ssize_t, not long int.
15311
15312         Remove the REG_ macros named below.  Instead, make the old names
15313         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
15314         __USE_GNU_REGEX.
15315         (REG_BACKSLASH_ESCAPE_IN_LISTS):
15316         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
15317         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
15318         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
15319         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
15320         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
15321         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
15322         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
15323         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
15324         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
15325         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
15326         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
15327         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
15328         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
15329         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
15330         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
15331         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
15332         (REG_NREGS):
15333         Remove.  All uses replaced by the old RE_* names.
15334         (RE_BACKSLASH_ESCAPE_IN_LISTS):
15335         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
15336         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
15337         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
15338         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
15339         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
15340         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
15341         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
15342         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
15343         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
15344         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
15345         Don't bother having these macros be independent of each others'
15346         values, since they no longer exist in the POSIX name space.
15347
15348         Rename the following member names back to their old names,
15349         unless !__USE_GNU_REGEX.  All uses changed back.
15350         (buffer): Renamed from re_buffer.
15351         (allocated): Renamed from re_allocated.
15352         (used): Renamed from re_used.
15353         (syntax): Renamed from re_syntax.
15354         (fastmap): Renamed from re_fastmap.
15355         (translate): Renamed from re_translate.
15356         (can_be_null): Renamed from re_can_be_null.
15357         (regs_allocated): Renamed from re_regs_allocated.
15358         (fastmap_accurate): Renamed from re_fastmap_accurate.
15359         (no_sub): Renamed from re_no_sub.
15360         (not_bol): Renamed from re_not_bol.
15361         (not_eol): Renamed from re_not_eol.
15362         (newline_anchor): Renamed from re_newline_anchor.
15363         (num_regs): Renamed from rm_num_regs.
15364         (start): Renamed from rm_start.
15365         (end): Renamed from rm_end.
15366
15367         (free_state): Move up a bit.
15368
15369         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
15370         #define to be empty.
15371         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
15372         when that is what is intended.
15373         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
15374         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
15375         (MAX): New macro.
15376         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
15377         All uses changed back to re_malloc, etc.  It's now the caller's
15378         responsibility to check for overflow; all callers changed.
15379         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
15380         (re_x2nrealloc): Remove.
15381         (free_state): Remove decl.
15382
15383         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
15384         (re_set_registers, re_exec):
15385         Use K&R-style defn.
15386
15387         2006-01-31  Roland McGrath  <roland@redhat.com>
15388
15389         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
15390         Reported by Mike Frysinger <vapier@gentoo.org>.
15391
15392         2006-01-15  Andreas Jaeger  <aj@suse.de>
15393
15394         [BZ #1950]
15395         * lib/regex_internal.c (re_string_reconstruct): Adjust for
15396         build_wcs_upper_buffer change.
15397         (build_wcs_upper_buffer): Change return type.
15398
15399         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
15400
15401         * lib/regex_internal.h: Include <stdint.h> if available.
15402
15403         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
15404
15405         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
15406
15407         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
15408
15409         * lib/regcomp.c: Adjust for changed secondary hash function.
15410
15411         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
15412
15413         * lib/regex.h: Pretty printing.
15414         Clean up namespace a bit.
15415
15416         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
15417
15418         * lib/regexec.c (update_cur_sifted_state, check_arrival,
15419         check_arrival_add_next_nodes): Avoid using uninitialized variable.
15420
15421         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
15422                     Ulrich Drepper  <drepper@redhat.com>
15423
15424         [BZ #1302]
15425         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
15426         changed.
15427         (bitset_word_t): Renamed from bitset_word.  All uses changed.
15428
15429         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
15430
15431         [BZ #281]
15432         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
15433         * lib/regcomp.c: Remove unnecessary uses of
15434         unsigned RE_TRANSLATE_TYPE.
15435         * lib/regex_internal.h: Likewise.
15436         * lib/regex_internal.c: Likewise.
15437         * lib/regexec.c: Likewise.
15438         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
15439
15440         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
15441
15442         * lib/regexec.c (find_recover_state): Remove unnecessary
15443         initialization.
15444         (transit_state_bkref): Make DFA a const pointer.
15445         (get_subexp): Likewise.
15446         (check_arrival): Likewise.
15447         (update_cur_sifted_state): Likewise.
15448         (re_search_internal): Likewise.
15449         (prune_impossible_nodes): Likewise.
15450         (acquire_init_state_context): Likewise.
15451         (proceed_next_node): Likewise.
15452         (set_regs): Likewise.
15453         (free_fail_stack_return): Likewise.
15454         (check_arrival_expand_ecl): Mark DFA parameter as const.
15455         (check_arrival_expand_ecl_sub): Likewise.
15456         (check_subexp_limits): Likewise.
15457         (sub_epsilon_src_nodes):  Likewise.
15458         (add_epsilon_src_nodes):  Likewise.
15459         (merge_state_array): Likewise.
15460         (update_regs): Likewise.
15461         (build_trtable): Likewise.
15462         (sift_states_backward): Mark MCTX parameter as const.
15463         (build_sifted_states): Likewise.
15464         (update_cur_sifted_state): Likewise.
15465         (sift_states_mkref): Likewise.
15466         (check_arrival_expand_ecl): Mark eclosure as const.
15467         (check_dst_limits_calc_pos_1): Likewise.
15468         * lib/regex_internal.h (re_match_context_t): Make dfa a const
15469         pointer.
15470
15471         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
15472
15473         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
15474         (transit_state_sb): Likewise.
15475         (transit_state_mb): Likewise.
15476         (sift_states_iter_mb): Likewise.
15477         (check_arrival_add_next_nodes): Likewise.
15478         (check_node_accept_bytes): Change first parameter to pointer-to-const.
15479         [_LIBC] (re_search_2_stub): Use mempcpy.
15480
15481         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
15482         mbrtowc for very simple UTF-8 case.
15483
15484         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
15485         a pointer-to-const.
15486         (re_acquire_state_context): Likewise.
15487         * lib/regex_internal.h: Adjust prototypes.
15488
15489         * lib/regex.c: Prevent using C++ compilers.
15490
15491         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
15492         (re_acquire_state_context): Likewise.
15493
15494 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15495
15496         * modules/regex (Depends-on): Add ssize_t.
15497
15498 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15499
15500         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
15501         translation table.
15502
15503 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15504
15505         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
15506
15507 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
15508             Bruno Haible  <bruno@clisp.org>
15509
15510         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
15511         <sys/types.h> and <inttypes.h>.
15512
15513 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15514
15515         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
15516         `__error_t_defined', so argp.h will not typedef the former.
15517
15518 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
15519
15520         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
15521         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
15522         glibc names.  Even if glibc is changed to conform to POSIX, the
15523         traditional names will be available anyway, since regex depends on
15524         the extensions module.  Also, fix a longstanding typo in the
15525         implementation of Spencer ERE test #75 from grep 2.3.  Problems
15526         reported by Emanuele Giaquinta.  Also, change sense of cached
15527         variable, so that the message makes sense.
15528
15529 2006-03-24  Simon Josefsson  <jas@extundo.com>
15530
15531         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
15532         including some doc fixes.
15533         (base64_encode_alloc): Fix +1 bug on allocation failures.
15534
15535 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15536
15537         * lib/base64.c (base64_encode): Do not read past end of array with
15538         unsanitized input on systems with CHAR_BIT > 8.
15539
15540 2006-03-24  Eric Blake  <ebb9@byu.net>
15541
15542         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
15543
15544 2006-03-22  Karl Berry  <karl@gnu.org>
15545
15546         * config/srclist.txt (*setenv.[ch]): get from coreutils.
15547         * config/srclistvars.sh (COREUTILS): new var.
15548
15549 2006-03-17  Jim Meyering  <jim@meyering.net>
15550
15551         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
15552         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
15553
15554 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15555
15556         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
15557         no longer needs it.  Instead, check that regoff_t is as least
15558         as wide as ptrdiff_t.
15559
15560         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
15561         so that our regex.h stays compatible with the installed regex.
15562         This is helpful for installers who configure --without-included-regex.
15563         Problem reported by Emanuele Giaquinta.
15564
15565 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15566
15567         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
15568         Typedef to long int, not to off_, as POSIX will likely change
15569         in that direction.
15570
15571 2006-03-15  Eric Blake  <ebb9@byu.net>
15572
15573         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
15574
15575 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15576
15577         * lib/argp-help.c (validate_uparams): Fix typo
15578         * lib/argp-parse.c (argp_default_options): Consistently begin help
15579         messages with a lowercase letter.
15580
15581 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
15582
15583         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
15584         overrun buffers and shouldn't be used (much as gets shouldn't be
15585         used).
15586         * lib/time_r.c (asctime_r, ctime_r): Likewise.
15587
15588 2006-03-08  Simon Josefsson  <jas@extundo.com>
15589
15590         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
15591         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15592
15593 2006-03-08  Simon Josefsson  <jas@extundo.com>
15594
15595         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
15596         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15597
15598 2006-03-08  Simon Josefsson  <jas@extundo.com>
15599
15600         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
15601         signal that configure disabled the device.
15602
15603 2006-03-08  Simon Josefsson  <jas@extundo.com>
15604
15605         * build-aux/maint.mk: Fix refresh-po, to handle no translated
15606         languages.
15607
15608 2006-03-07  Simon Josefsson  <jas@extundo.com>
15609
15610         * modules/getopt (Depends-on): Add unistd.
15611
15612         * modules/unistd: New file.
15613
15614 2006-03-07  Simon Josefsson  <jas@extundo.com>
15615
15616         * modules/gc-random: New file.
15617
15618 2006-03-07  Simon Josefsson  <jas@extundo.com>
15619
15620         * m4/unistd_h.m4: New file.
15621
15622 2006-03-07  Simon Josefsson  <jas@extundo.com>
15623
15624         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
15625         test to be side-effect free by storing the result in the cache
15626         variable gl_cv_lib_readline, and moving the assignment of
15627         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
15628         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15629
15630 2006-03-07  Simon Josefsson  <jas@extundo.com>
15631
15632         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
15633         error on missing devices (the functions will return an error).
15634
15635         * m4/gc.m4: Move random stuff to gc-random.m4
15636
15637 2006-03-07  Simon Josefsson  <jas@extundo.com>
15638
15639         * lib/unistd_.h: New file.
15640
15641 2006-03-07  Simon Josefsson  <jas@extundo.com>
15642
15643         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
15644
15645 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15646
15647         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
15648         Problem reported by Juan Manuel Guerrero.
15649
15650 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15651
15652         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
15653         the unistd module.
15654         * lib/getlogin_r.c: Likewise.
15655         * lib/getlogin_r.h: Likewise.
15656         * lib/glob.c: Likewise.
15657         * lib/pagealign_alloc.c: Likewise.
15658         * lib/unistd_.h: Remove; no longer needed.
15659
15660 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15661
15662         * MODULES.html.sh (Support for systems lacking POSIX:2001):
15663         Add unistd.
15664         * modules/c-stack (Depends-on): Add unistd.
15665         * modules/getlogin_r: Likewise.
15666         * modules/glob: Likewise.
15667         * modules/pagealign_alloc: Likewise.
15668         * modules/unistd (Files): Remove lib/unistd_.h.
15669         (EXTRA_DIST): Remove.
15670         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
15671         need unistd_.h.
15672         (MOSTLYCLEANFILES): Remove unistd.h-t.
15673
15674 2006-03-03  Simon Josefsson  <jas@extundo.com>
15675
15676         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
15677
15678 2006-03-03  Simon Josefsson  <jas@extundo.com>
15679
15680         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
15681         libidn and bison.
15682
15683 2006-03-03  Simon Josefsson  <jas@extundo.com>
15684
15685         * build-aux/maint.mk: Add indent target.
15686
15687 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
15688
15689         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
15690         our replacement poll.h in any case, to avoid a differing
15691         declaration from a system header.  Seen on AIX.
15692
15693 2006-03-01  Simon Josefsson  <jas@extundo.com>
15694
15695         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
15696         <kasal@ucw.cz>.
15697
15698 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15699
15700         * modules/gettime (Depends-on): Add extensions module.
15701         * modules/nanosleep (Depends-on): Likewise.
15702         * modules/settime (Depends-on): Likewise.
15703
15704 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15705
15706         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
15707         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
15708         pedantically.
15709         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15710         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
15711
15712         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
15713         not "==".  Reported by Ralf Wildenhues.
15714
15715 2006-03-01  Karl Berry  <karl@gnu.org>
15716
15717         * doc/Copyright/request-*: new files, synced from gnuorg.
15718
15719 2006-03-01  Karl Berry  <karl@gnu.org>
15720
15721         * config/srclist.txt (Copyright/*): new entries.
15722
15723 2006-02-28  Simon Josefsson  <jas@extundo.com>
15724
15725         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
15726
15727 2006-02-27  Simon Josefsson  <jas@extundo.com>
15728
15729         * lib/base64.h: Indent #define's.  From Jim Meyering
15730         <jim@meyering.net>.
15731
15732 2006-02-27  Jim Meyering  <jim@meyering.net>
15733
15734         Revert the change of 2006-02-24, so these files can continue
15735         to be sync'd from gettext.
15736         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
15737         of `config.h'.
15738
15739 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15740
15741         * modules/intprops: New file.
15742         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
15743         Add intprops.
15744         * modules/getloadavg (Files): Remove lib/intprops.h.
15745         (Depends-on): Add intprops.
15746         * modules/human: Likewise.
15747         * modules/inttostr: Likewise.
15748         * modules/openat: Likewise.
15749         * modules/sig2str: Likewise.
15750         * modules/userspec: Likewise.
15751         * modules/utimecmp: Likewise.
15752         * modules/xnanosleep: Likewise.
15753         * modules/xstrtol: Likewise.
15754
15755 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
15756
15757         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
15758         * modules/lock-tests (TESTS): Use $(EXEEXT).
15759         * modules/tls-tests: Likewise.
15760         * modules/argp-tests: Likewise.
15761         (check_PROGRAMS): New var, replacing...
15762         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
15763
15764 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15765
15766         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
15767         `config.h'.
15768
15769 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
15770
15771         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
15772
15773 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15774
15775         Sync from coreutils.
15776         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
15777         gl_CHDIR_SAFER.
15778
15779 2006-02-22  Jim Meyering  <jim@meyering.net>
15780
15781         Sync from coreutils.
15782         * m4/chdir-safer.m4: New file.
15783
15784 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
15785
15786         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
15787         AT_FDCWD exceeds INT_MAX.
15788         * lib/openat.h (AT_FDCWD): Likewise.
15789
15790 2006-02-17  Eric Blake  <address@hidden>
15791
15792         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
15793
15794 2006-02-16  Simon Josefsson  <jas@extundo.com>
15795
15796         * modules/getaddrinfo (Depends-on): Add sys_socket.
15797
15798 2006-02-15  Simon Josefsson  <jas@extundo.com>
15799
15800         * build-aux/maint.mk: Add dsyntax-check rule.
15801
15802 2006-02-15  Eric Blake  <ebb9@byu.net>
15803
15804         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
15805         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
15806         'present but cannot compile' warnings on cygwin.
15807         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
15808         use ws2tcpip.h if sys/socket.h works.
15809         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
15810         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
15811
15812 2006-02-14  Simon Josefsson  <jas@extundo.com>
15813
15814         * modules/maintainer-makefile (Files): Rename.
15815
15816         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
15817         and (the local) Makefile.cfg to maint-cfg.mk.
15818
15819         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
15820         to the latter.
15821
15822         * modules/maintainer-makefile: New module.
15823
15824         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
15825         severaly stripped to make it possible to build it up from scratch
15826         with reliable tests.
15827
15828         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
15829         fixes to permit overriding the default actions when configure and
15830         makefile are not available.
15831
15832 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
15833
15834         Sync from coreutils.
15835         * modules/lstat (Depends-on): Don't depend on xalloc.
15836         (License): Change from GPL to LGPL, since this is now simply a
15837         replacement for a libc function.
15838
15839 2006-02-14  Jim Meyering  <jim@meyering.net>
15840
15841         Sync from coreutils.
15842
15843         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
15844         failure on deficient systems, and simplify gnulib lgpl dependencies.
15845         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
15846         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
15847
15848         * lib/xalloc-die.c: Remove unused definition of N_.
15849
15850 2006-02-14  Jim Meyering  <jim@meyering.net>
15851
15852         Sync from coreutils.
15853         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
15854         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
15855         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
15856         double-quote uses of that variable, to accommodate the rare case in
15857         which getmntent is available in none of the libraries checked.  This
15858         happens at least on FreeBSD 5.0.
15859
15860 2006-02-13  Simon Josefsson  <jas@extundo.com>
15861
15862         * gnulib-tool (Usage): Fix --import, from
15863         karl@freefriends.org (Karl Berry).
15864
15865 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15866
15867         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
15868
15869 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
15870
15871         * lib/argp-namefrob.h: Restore changes accidentally lost during the
15872         "autoupdate" on 2005-12-12.
15873
15874 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15875
15876         * modules/closeout (Depends-on): Remove atexit.
15877
15878 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15879
15880         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
15881         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
15882
15883 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
15884
15885         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
15886         __EXTENSIONS__ if this causes compilation to fail.  Problem
15887         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
15888         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
15889
15890 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
15891
15892         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
15893         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
15894         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
15895         All uses changed.
15896
15897 2006-01-26  Simon Josefsson  <jas@extundo.com>
15898
15899         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
15900         prototype is visible on mingw32.
15901
15902         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
15903         for mingw32.
15904
15905         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
15906         mingw32).
15907
15908 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
15909
15910         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
15911         attempt to open for write; this always fails, at least on POSIX
15912         hosts.  This reinstates the 2006-01-09 change, which was
15913         inadvertently removed.
15914
15915 2006-01-26  Bruno Haible  <bruno@clisp.org>
15916
15917         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
15918         Reported by Paul Eggert.
15919
15920 2006-01-26  Bruno Haible  <bruno@clisp.org>
15921             Paul Eggert  <eggert@cs.ucla.edu>
15922
15923         * lib/stdbool_.h (_Bool)
15924         [(! (defined __cplusplus || defined __BEOS__)
15925           && !defined __GNUC__
15926           && !(defined __HP_cc || defined __xlc__
15927                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
15928                || defined __sgi))]:
15929         #define to signed char in these cases too; this simplifies
15930         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
15931         etc., separately) and makes it more conservative.
15932
15933 2006-01-25  Simon Josefsson  <jas@extundo.com>
15934
15935         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
15936         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
15937         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
15938
15939 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15940
15941         * lib/argp-namefrob.h: Bugfix. Remove stray #
15942
15943 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
15944
15945         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
15946         so that we test the test.
15947         Check for yet another HP-UX cc bug involving *bool |= bool.
15948
15949 2006-01-25  Karl Berry  <karl@gnu.org>
15950
15951         * config/srclist.txt (vasnprintf.c): sync lost.
15952
15953 2006-01-25  Jim Meyering  <jim@meyering.net>
15954
15955         Sync from the stable (b5) branch of coreutils:
15956
15957         * lib/fts.c (fts_children): Don't let close() clobber errno from
15958         failed fchdir().
15959
15960         * lib/fts.c (fts_stat): When following a symlink-to-directory,
15961         don't necessarily interpret stat-fails+lstat-succeeds as indicating
15962         a dangling symlink.  That can also happen at least for ELOOP.
15963         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
15964         FYI, this bug predates the inclusion of fts.c in coreutils.
15965
15966         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
15967         in their own block, so pre-c99 compilers don't object.
15968
15969         Avoid the double-free (first in fts_read, second in fts_close) that
15970         would occur when an `active' directory is made inaccessible (e.g.,
15971         via chmod a-x) during a traversal.
15972         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15973         before returning.  Reproduce this failure by
15974         mkdir -p a/b; cd a; chmod a-x . b
15975         Reported by Stavros Passas.
15976
15977 2006-01-25  Jim Meyering  <jim@meyering.net>
15978
15979         * lib/fileblocks.c: Remove more useless parentheses.
15980         * lib/readutmp.h: Likewise.
15981
15982 2006-01-25  Bruno Haible  <bruno@clisp.org>
15983
15984         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
15985         warnings.
15986         Reported by Paul Eggert.
15987
15988 2006-01-25  Bruno Haible  <bruno@clisp.org>
15989
15990         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
15991         rid of a trap command. For Solaris sh.
15992         Reported by Mark D. Baushke <mdb@gnu.org>.
15993
15994 2006-01-24  Simon Josefsson  <jas@extundo.com>
15995
15996         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
15997         Bruno.
15998
15999 2006-01-24  Karl Berry  <karl@gnu.org>
16000
16001         * config/srclist.txt (argp-namefrob.h): sync lost.
16002
16003 2006-01-24  Jim Meyering  <jim@meyering.net>
16004
16005         * modules/openat (Files): Add lib/intprops.h.
16006         From Mark D. Baushke.
16007
16008 2006-01-24  Jim Meyering  <jim@meyering.net>
16009
16010         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
16011         Reported by Mark D. Baushke.
16012
16013 2006-01-24  Jim Meyering  <jim@meyering.net>
16014
16015         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
16016
16017 2006-01-24  Bruno Haible  <bruno@clisp.org>
16018
16019         * modules/strnlen (Maintainer): Change from glibc to all.
16020
16021 2006-01-24  Bruno Haible  <bruno@clisp.org>
16022
16023         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
16024         Patch by Paul Eggert.
16025
16026 2006-01-24  Bruno Haible  <bruno@clisp.org>
16027
16028         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
16029         already has it.
16030         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
16031         2005-11-26.
16032
16033         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
16034         'signed char' to avoid problems with the built-in _Bool type.
16035         Reported by Paul Eggert on 2005-11-26.
16036
16037 2006-01-24  Bruno Haible  <bruno@clisp.org>
16038
16039         * gnulib-tool (func_import): Avoid constructing complicated sed
16040         expressions inside backquote.
16041         Report and solution by Mark D. Baushke <mdb@gnu.org>.
16042
16043 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
16044
16045         These changes imported from libc.
16046         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
16047         test and two separate function calls.
16048         * lib/strndup.c (__strndup): Add libc_hidden_def.
16049
16050 2006-01-23  Simon Josefsson  <jas@extundo.com>
16051
16052         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
16053         Remove the test_*_SOURCES variable: automake infers it by default.
16054         * modules/tls-tests: Likewise.
16055
16056 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16057
16058         Work around porting bugs reported by Dieter in
16059         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
16060         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
16061         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
16062         Include "getopt.h" first, to check interface.
16063         (getenv): Declare only if defined HAVE_DECL_GETENV &&
16064         !HAVE_DECL_GETENV.
16065         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
16066         (__strndup): Revert to K&R-style function dfns, the glibc style.
16067         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
16068         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
16069         Include strnlen.h first, to get prototype properly.
16070         (strnlen): Renamed from __strnlen.
16071         Remove weak alias.
16072
16073 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16074
16075         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
16076
16077 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16078
16079         * config/srclist.txt: Adjust to reflect glibc reorganization.
16080         This affects only comments.
16081
16082 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16083
16084          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
16085          Reported by Bruce Korb <bkorb@gnu.org>.
16086
16087 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
16088
16089         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
16090         to pacify gcc -Wswitch-default.
16091
16092 2006-01-22  Bruno Haible  <bruno@clisp.org>
16093
16094         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
16095         temporary buffer for sprintf, take into account the precision also
16096         for 'd', 'i', 'u', 'o', 'x', 'X'.
16097
16098 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16099
16100         * modules/argp-tests: New module
16101         * tests/test-argp.c: New file
16102         * tests/test-argp-2.sh: New file
16103
16104 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16105
16106         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
16107         (__argp_base_name): Removed
16108         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
16109         typo.
16110         (__argp_base_name): Provide macro definition or extern declaration
16111         depending on the configuration
16112
16113 2006-01-20  Simon Josefsson  <jas@extundo.com>
16114
16115         * modules/inet_ntop (Depends-on): Depend on sys_socket.
16116
16117 2006-01-20  Simon Josefsson  <jas@extundo.com>
16118
16119         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
16120
16121 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16122
16123         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
16124         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
16125         Suggested by Bruno Haible.
16126
16127 2006-01-20  Karl Berry  <karl@gnu.org>
16128
16129         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
16130         until changes propagate, I guess.
16131
16132 2006-01-19  Simon Josefsson  <jas@extundo.com>
16133
16134         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
16135
16136 2006-01-19  Simon Josefsson  <jas@extundo.com>
16137
16138         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
16139
16140 2006-01-19  Simon Josefsson  <jas@extundo.com>
16141
16142         * gnulib-tool: Set check_PROGRAMS.
16143
16144         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16145         modules/des-tests, modules/gc-arcfour-tests,
16146         modules/gc-arctwo-tests, modules/gc-des-tests,
16147         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16148         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16149         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16150         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16151         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16152         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
16153         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
16154         test_*_SOURCES.
16155
16156 2006-01-18  Simon Josefsson  <jas@extundo.com>
16157
16158         * modules/socklen (Depends-on): Depend on sys_socket.
16159
16160 2006-01-18  Simon Josefsson  <jas@extundo.com>
16161
16162         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16163         modules/des-tests, modules/gc-arcfour-tests,
16164         modules/gc-arctwo-tests, modules/gc-des-tests,
16165         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16166         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16167         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16168         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16169         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16170         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
16171         $(EXEEXT) to automake TESTS variable, for mingw32.
16172
16173 2006-01-17  Simon Josefsson  <jas@extundo.com>
16174
16175         * modules/socklen (Include): Need sys/socket.h.
16176
16177 2006-01-17  Bruno Haible  <bruno@clisp.org>
16178
16179         * modules/ssize_t (Include): Add <sys/types.h>.
16180
16181 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
16182
16183         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
16184         it's not portable and it doesn't work with cross-compiles.
16185         Problem reported by Bruno Haible.  Fix missing-$ typo in
16186         'test "gl_cv_ignore_unused_libraries" ...' that prevented
16187         -zignore from being used with Sun's C compiler.
16188
16189 2006-01-12  Simon Josefsson  <jas@extundo.com>
16190
16191         * lib/base64.c: Fix warning, reported by Bruno Haible
16192         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
16193
16194 2006-01-12  Bruno Haible  <bruno@clisp.org>
16195
16196         * modules/ldd: New file.
16197         * build-aux/ldd.sh.in: New file.
16198         * MODULES.html.sh (Support for building libraries and executables): Add
16199         ldd.
16200
16201 2006-01-12  Bruno Haible  <bruno@clisp.org>
16202
16203         * m4/ldd.m4: New file.
16204
16205 2006-01-12  Bruno Haible  <bruno@clisp.org>
16206
16207         * gnulib-tool (func_import, func_create_testdir): Don't go into an
16208         endless loop while replacing $auxdir with build-aux.
16209
16210 2006-01-11  Simon Josefsson  <jas@extundo.com>
16211
16212         * lib/stdint_.h (SIZE_MAX): Add missing (.
16213
16214 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
16215
16216         Sync from coreutils.
16217         * lib/md5.c: Fix commentary typos.
16218         (alignof, UNALIGNED_P): No need for a GCC-specific version.
16219         * lib/md5.h (__attribute__): Remove; unused.
16220         * lib/sha1.c: Fix commentary to match md5 better.
16221         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
16222         so that we don't need to worry about alignment.  All uses changed.
16223         This merges the 2005-10-28 md5 change into sha1.
16224
16225 2006-01-11  Jim Meyering  <jim@meyering.net>
16226
16227         Sync from coreutils.
16228         * lib/md5.c (OP): Fix spacing.
16229
16230 2006-01-11  Bruno Haible  <bruno@clisp.org>
16231
16232         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16233         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
16234         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
16235
16236 2006-01-11  Bruno Haible  <bruno@clisp.org>
16237
16238         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16239         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
16240         the "early" section as well.
16241
16242 2006-01-11  Bruno Haible  <bruno@clisp.org>
16243
16244         Avoid "ar: no archive members specified" error on MacOS X.
16245         * gnulib-tool (func_modules_add_dummy): New function.
16246         (func_import, func_create_testdir): Invoke it.
16247
16248 2006-01-11  Bruno Haible  <bruno@clisp.org>
16249
16250         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
16251         with $auxdir in AC_CONFIG_FILES statements.
16252
16253 2006-01-11  Bruno Haible  <bruno@clisp.org>
16254
16255         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
16256         Initialize also noinst_HEADERS to empty.
16257
16258 2006-01-11  Bruno Haible  <bruno@clisp.org>
16259
16260         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
16261         variables.
16262         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
16263         autoreconf.
16264
16265 2006-01-11  Bruno Haible  <bruno@clisp.org>
16266
16267         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
16268         overridable by the user.
16269         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16270
16271 2006-01-10  Simon Josefsson  <jas@extundo.com>
16272
16273         * modules/sys_socket: New file.
16274
16275 2006-01-10  Simon Josefsson  <jas@extundo.com>
16276
16277         * m4/sys_socket_h.m4: New file.
16278
16279 2006-01-10  Simon Josefsson  <jas@extundo.com>
16280
16281         * lib/socket_.h: New file.
16282
16283 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16284
16285         * modules/readutmp (Maintainer): Add myself.
16286
16287 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16288
16289         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
16290         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
16291         People who are still concerned with buggy memcmp implementations
16292         can invoke gl_FUNC_MEMCMP themselves.
16293
16294 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16295
16296         * lib/regex_internal.h (BITSET_WORD_BITS):
16297         Work around a bug in 64-bit PGC (before version 6.1-2), where the
16298         preprocessor mishandles large unsigned values as if they were signed.
16299         Problem reported by Claudio Fontana in
16300         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
16301
16302 2006-01-10  Jim Meyering  <jim@meyering.net>
16303
16304         Avoid the double-free (first in fts_read, second in fts_close) that
16305         would occur when an `active' directory is made inaccessible (e.g.,
16306         via chmod a-x) during a traversal.
16307         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
16308         before returning.  Reproduce this failure by
16309         mkdir -p a/b; cd a; chmod a-x . b
16310         Reported by Stavros Passas.
16311
16312         Sync from coreutils.
16313         * lib/sha1.c: Tweak grammar in a comment.
16314
16315 2006-01-10  Jim Meyering  <jim@meyering.net>
16316
16317         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
16318         Patch by Joerg Sonnenberger.
16319
16320 2006-01-10  Bruno Haible  <bruno@clisp.org>
16321
16322         * modules/readutmp: Depend on module free.
16323         * modules/strtok_r: Depend on module restrict.
16324
16325 2006-01-10  Bruno Haible  <bruno@clisp.org>
16326
16327         * modules/gettext (configure.ac): Add an invocation of
16328         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
16329
16330 2006-01-10  Bruno Haible  <bruno@clisp.org>
16331
16332         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
16333         Reported by Werner Lemberg <wl@gnu.org>.
16334
16335 2006-01-10  Bruno Haible  <bruno@clisp.org>
16336
16337         * lib/localcharset.c: Update from GNU gettext.
16338
16339 2006-01-10  Bruno Haible  <bruno@clisp.org>
16340
16341         * lib/argp.h (__const): Remove macro. Use const instead.
16342         * lib/argp-fmtstream.h (__const): Likewise.
16343         * lib/glob_.h (__const): Remove macro.
16344         * lib/glob-libc.h: Use const instead of __const.
16345
16346 2006-01-10  Bruno Haible  <bruno@clisp.org>
16347
16348         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
16349         variable.
16350         Needed to avoid an automake error regarding the 'gettext' module.
16351
16352 2006-01-09  Simon Josefsson  <jas@extundo.com>
16353
16354         * modules/inet_ntop (Depends-on): Add restrict.
16355
16356 2006-01-09  Simon Josefsson  <jas@extundo.com>
16357
16358         * modules/gc-rijndael-tests (License): Put under LGPL.
16359
16360         * modules/gc-des-tests (License): Likewise.
16361
16362         * modules/gc-arcfour-tests (License): Likewise.
16363
16364         * modules/gc-arctwo-tests (License): Likewise.
16365
16366         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
16367
16368         * modules/gc-hmac-sha1-tests (Files): Likewise.
16369
16370         * modules/gc-hmac-md5-tests (License): Likewise.
16371
16372         * modules/gc-sha1-tests (License): Likewise.
16373
16374         * modules/gc-md5-tests (License): Likewise.
16375
16376         * modules/gc-md4-tests (License): Likewise.
16377
16378         * modules/gc-md2-tests (License): Likewise.
16379
16380         * modules/gc-tests (License): Likewise.
16381
16382         * modules/des-tests (License): Likewise.
16383
16384         * modules/md4-tests (License): Likewise.
16385
16386         * modules/md2-tests (License): Likewise.
16387
16388 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16389
16390         Sync from coreutils:
16391
16392         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
16393         * modules/lib-ignore: New file.
16394         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
16395         chdir-safer.m4, lchmod.m4.
16396         * modules/openat: Add mkdirat.c, openat-priv.h.
16397
16398 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16399
16400         Sync from coreutils.
16401         * m4/lib-ignore.m4: New file.
16402         * m4/lchmod.m4: New file.
16403
16404 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16405
16406         Sync from coreutils.
16407         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
16408         for write access: POSIX says that must fail.
16409         * lib/fts.c (diropen): Likewise.
16410         * lib/save-cwd.c (save_cwd): Likewise.
16411         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
16412         well, for minor improvements on hosts that lack O_DIRECTORY.
16413         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
16414         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
16415         Fall back on chown if open failed with EACCES.
16416
16417         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
16418         Report an error at compile-time if only a 1-second nominal clock
16419         resolution is found.
16420
16421         * lib/lchmod.h: New file.
16422         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
16423         (make_dir_parents): Use lchown rather than chown, and
16424         lchmod rather than chmod.
16425
16426         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
16427         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
16428         "proc" reported by n0dalus.
16429
16430         * lib/mountlist.c: Include <limits.h>.
16431         (dev_from_mount_options)
16432         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
16433         New function.  It no longer assumes "dev=" has the System V meaning
16434         on Linux (since it doesn't).  It also parses "dev=" more carefully.
16435         (read_file_system_list)
16436         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
16437         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
16438         dev= in that case.
16439
16440         * lib/posixtm.h (PDS_PRE_2000): New macro.
16441         * lib/posixtm.c (year): Arg is now syntax_bits rather than
16442         allow_century.  All usages changed.  Reject dates outside the range
16443         1969-1999 if PDS_PRE_2000 is used.
16444
16445 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16446
16447         Sync from coreutils.
16448         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
16449         (Time of day items): Mention the possibility of leap seconds.
16450         Problem reported by Dr. David Alan Gilbert.
16451
16452 2006-01-09  Jim Meyering  <jim@meyering.net>
16453
16454         Sync from coreutils.
16455
16456         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
16457
16458         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
16459
16460         * lib/modechange.c (mode_compile): Reject an invalid mode string
16461         that starts with an octal digit.  From Andreas Gruenbacher.
16462
16463         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
16464         and dup to open_safer and dup_safer, respectively.
16465         (openat_permissive): Fix typo in comment.
16466
16467         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
16468         "gettext.h"; either no longer needed or are guaranteed by openat.h.
16469         (_): Remove; no longer needed.
16470         (openat): Renamed from rpl_openat; no need for rpl_openat
16471         since openat.h renames openat for us.
16472         Replace most of the body with a call to openat_permissive,
16473         to avoid duplicate code.
16474         Port to (probably hypothetical) environments were mode_t is
16475         wider than int.
16476         (openat_permissive): Require mode arg, so that we can check
16477         types better.  Put it just after flags.  Change cwd failure
16478         indicator from pointer-to-bool to pointer-to-errno-value.
16479         All callers changed.
16480         Invoke openat_save_fail and/or openat_restore_fail if
16481         cwd_errno is null, so that openat can call us.
16482         (openat_permissive, fdopendir, fstatat, unlinkat):
16483         Simplify errno handling to avoid some duplicate code,
16484         as it's OK to set errno on success.
16485         * lib/openat.h: Revamp code so that function macros depend on
16486         __OPENAT_PREFIX only, not also on AT_FDCWD.
16487         (openat_ro): Remove.  Caller changed to use openat_permissive.
16488         (openat_permissive): Now a macro, if not a function.
16489         (openat_restore_fail, openat_save_fail): Now always functions,
16490         since mkdirat needs them even if __OPENAT_PREFIX is defined.
16491
16492         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
16493         and openat.c.
16494         * lib/mkdirat.c: Include openat-priv.h.
16495         Remove definitions of macros defined therein.
16496         * lib/openat.c: Likewise.
16497
16498         * lib/mkdirat.c (mkdirat): New file and function.
16499         * lib/openat.h (mkdirat): Declare.
16500
16501         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
16502
16503         * lib/openat.h (openat_permissive): Declare.
16504         (openat_ro): Define.
16505
16506         * lib/openat.c (EXPECTED_ERRNO): New macro.
16507         (openat_permissive): New function -- used in remove.c rewrite.
16508         (all functions): Set errno just before returning, only if there
16509         was an actual failure.
16510         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
16511
16512         Emulate openat-family functions using Linux's procfs, if possible.
16513         Idea and some code based on Ulrich Drepper's glibc changes.
16514
16515         * lib/openat.c: (BUILD_PROC_NAME): New macro.
16516         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
16517         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
16518         before falling back on save_cwd and restore_cwd.
16519         (fdopendir, fstatat, unlinkat): Likewise.
16520
16521         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
16522         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
16523
16524         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
16525         as second argument to va_arg.  Otherwise, some versions of gcc
16526         warn that `if this code is reached, the program will abort'.
16527
16528 2006-01-09  Jim Meyering  <jim@meyering.net>
16529
16530         Sync from coreutils.
16531         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
16532         Require openat-priv.h.
16533
16534 2006-01-09  Bruno Haible  <bruno@clisp.org>
16535
16536         * modules/strnlen (Include): Use strnlen.h.
16537
16538 2006-01-09  Bruno Haible  <bruno@clisp.org>
16539
16540         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
16541
16542 2006-01-09  Bruno Haible  <bruno@clisp.org>
16543
16544         * lib/sysexit_.h (EX_OK): New macro.
16545         Suggested by Martin Lambers <marlam@marlam.de>.
16546
16547 2006-01-09  Bruno Haible  <bruno@clisp.org>
16548
16549         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
16550         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
16551
16552 2006-01-09  Bruno Haible  <bruno@clisp.org>
16553
16554         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
16555         numbers.
16556
16557 2006-01-09  Bruno Haible  <bruno@clisp.org>
16558
16559         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
16560         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
16561         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
16562         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
16563
16564 2006-01-09  Bruno Haible  <bruno@clisp.org>
16565
16566         * build-aux/javacomp.sh.in: New file, moved from lib/.
16567         * modules/javacomp-script (Files): Update.
16568         (configure.ac): Add AC_CONFIG_FILES invocation.
16569         (EXTRA_DIST): Remove variable.
16570
16571         * build-aux/javaexec.sh.in: New file, moved from lib/.
16572         * modules/javaexec (Files): Update.
16573         (configure.ac): Add AC_CONFIG_FILES invocation.
16574         (EXTRA_DIST): Remove javaexec.sh.in.
16575
16576         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
16577         * modules/csharpcomp-script (Files): Update.
16578         (configure.ac): Add AC_CONFIG_FILES invocation.
16579         (EXTRA_DIST): Remove variable.
16580
16581         * build-aux/csharpexec.sh.in: New file, moved from lib/.
16582         * modules/csharpexec (Files): Update.
16583         (configure.ac): Add AC_CONFIG_FILES invocation.
16584         (EXTRA_DIST): Remove csharpexec.sh.in.
16585
16586 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16587
16588         Sync from coreutils.
16589
16590         Add POSIX ACL support
16591         * lib/acl.h (copy_acl, set_acl): Add declarations.
16592         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
16593         systems other than Linux.
16594         (chmod_or_fchmod): New function: use fchmod when possible,
16595         and chmod otherwise.
16596         (file_has_acl): Add a POSIX ACL implementation, with a
16597         Linux-specific subcase.
16598         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
16599         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
16600         acls are unsupported.
16601         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
16602         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
16603         are unsupported.
16604
16605 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16606
16607         Sync from coreutils.
16608         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
16609
16610 2006-01-07  Bruno Haible  <bruno@clisp.org>
16611
16612         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
16613         gl_EARLY.
16614
16615 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16616
16617         * lib/strftime.c (tzname): Don't declare if it is already #defined.
16618         Problem reported for Mingw by Mark Junker.
16619
16620 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16621
16622         * README: Gnulib normally doesn't generate a tarball.
16623
16624 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
16625
16626         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
16627         long int, not int, for nanosecond counts, so that people who are
16628         used to POSIX struct timespec won't be surprised.  Reported by Jim
16629         Meyering.
16630
16631 2005-12-28  Bruno Haible  <bruno@clisp.org>
16632
16633         * build-aux/config.rpath: Update from GNU gettext.
16634
16635 2005-12-16  Jim Meyering  <jim@meyering.net>
16636
16637         * modules/fprintftime: New module.
16638         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
16639
16640 2005-12-16  Jim Meyering  <jim@meyering.net>
16641
16642         * m4/fprintftime.m4: New file.
16643
16644 2005-12-16  Jim Meyering  <jim@meyering.net>
16645
16646         * lib/fprintftime.c, lib/fprintftime.h: New files.
16647
16648 2005-12-15  Simon Josefsson  <jas@extundo.com>
16649
16650         * modules/socklen (configure.ac): Fix M4 macro name, to align with
16651         new m4/socklen.m4.
16652
16653 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16654
16655         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
16656         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
16657
16658 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16659
16660         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
16661         * lib/argp-help.c (fill_in_uparams): Check if the constructed
16662         struct uparams is valid. Fall back to the default values if it is
16663         not.
16664
16665 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16666
16667         * modules/argp (Files): Add argp-pin.c
16668         (Depends-on): dirname
16669         (lib_SOURCES): Add argp-pin.c
16670
16671 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16672
16673         * m4/argp.m4:  Check if program_invocation_name and
16674         program_invocation_short_name are declared and define appropriate
16675         macros if they are not.
16676
16677 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16678
16679         * lib/argp-help.c (__argp_base_name): New function
16680         (__argp_short_program_name): Rewrite using __argp_base_name
16681         * lib/argp-namefrob.h: Define program_invocation_name and
16682         program_invocation_short_name if requested
16683         (__argp_base_name): Add prototype
16684         * lib/argp-parse.c (argp_def): Use gettext wrappers
16685         (argp_default_parser): Use __argp_base_name
16686         * lib/argp-pin.c: New file. Defines program_invocation_name and
16687         program_invocation_short_name on systems that lack them.
16688
16689 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16690
16691         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
16692         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16693         porting problem reported by Georg Schwarz in
16694         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16695
16696 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16697
16698         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
16699         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16700         porting problem reported by Georg Schwarz in
16701         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16702
16703 2005-12-05  Bruno Haible  <bruno@clisp.org>
16704
16705         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
16706         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
16707         Reported by Mark Junker <mjscod@gmx.de>.
16708
16709 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
16710
16711         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
16712         Use implementation from Albert Chin, with some
16713         comments/corrections by Stepan Kasal and myself.
16714
16715 2005-12-02  Bruno Haible  <bruno@clisp.org>
16716
16717         * gnulib-tool (func_import): Accept GPLed build tool modules when
16718         --lgpl is given.
16719         * modules/csharpcomp-script: New file.
16720         * modules/csharpcomp: Depend on it.
16721         * modules/javacomp-script: New file.
16722         * modules/javacomp: Depend on it.
16723         Suggested by Simon Josefsson.
16724
16725 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
16726
16727         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
16728         statement, to work around an HP-UX 10.20 compiler bug reported by
16729         Peter O'Gorman.
16730
16731 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16732
16733         * modules/savedir (Depends-on): Add openat.
16734
16735 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16736
16737         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
16738         (uintmax_t) [defined uintmax_t]: Do not declare.
16739         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
16740         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
16741         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
16742         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
16743         sake of portability to weird hosts that C allows (though we don't
16744         know of any practical examples).
16745
16746         * lib/savedir.h (fdsavedir): New decl.
16747         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
16748         contains most of the former guts of savedir.
16749         (savedir): Use savedirstream.
16750         Include "openat.h".
16751
16752 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16753
16754         * modules/obstack (Files): Add m4/ulonglong.m4.
16755         Problem reported by Davide Angelocola.
16756
16757 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
16758
16759         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
16760         coreutils no longer futzes with rounding modes.
16761
16762 2005-11-14  Jim Meyering  <jim@meyering.net>
16763
16764         * lib/mkstemp-safer.c: Include <config.h>, required for possible
16765         replacement of mkstemp.
16766
16767 2005-11-10  Simon Josefsson  <jas@extundo.com>
16768
16769         * lib/readline.c: Remove EOL.
16770
16771 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16772
16773         * modules/gethrxtime (Depends-on): Add gettime.
16774
16775 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16776
16777         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
16778         or gettimeofday; no longer needed.
16779
16780 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16781
16782         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
16783         time business.
16784         (gethrxtime) [! (HAVE_NANOUPTIME
16785         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
16786         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
16787         our own approximation.
16788
16789 2005-11-08  Eric Blake  <ebb9@byu.net>
16790
16791         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16792
16793 2005-11-08  Eric Blake  <ebb9@byu.net>
16794
16795         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16796
16797 2005-11-04  Bruno Haible  <bruno@clisp.org>
16798
16799         * gnulib-tool: Implement --update mode.
16800
16801 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16802
16803         Fix porting problem reported by Theodoros V. Kalamatianos.
16804         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
16805         Don't assume that futimes failing means we must fail.
16806
16807 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16808
16809         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
16810         variables to suggest the intended function of the PATH_MAX check.
16811
16812 2005-10-30  Kean Johnston  <jkj@sco.com>
16813
16814         Trivial changes to support SCO systems.
16815         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
16816         as PATH_MAX.
16817         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
16818         where __ptr is null when no I/O is pending.
16819
16820 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16821
16822         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
16823         leave errno alone.  Problem reported by Dmitry V. Levin.
16824
16825 2005-10-28  Simon Josefsson  <jas@extundo.com>
16826
16827         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
16828         Test more.
16829
16830         * tests/test-gc-md2.c, tests/test-md2.c: New files.
16831
16832         * modules/md2, modules/md2-tests: New files.
16833
16834 2005-10-28  Simon Josefsson  <jas@extundo.com>
16835
16836         * m4/inet_ntop.m4: More tests.
16837
16838         * m4/gc-md2.m4, md2.m4: New file.
16839
16840 2005-10-28  Simon Josefsson  <jas@extundo.com>
16841
16842         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
16843         "restrict" keywords, as per POSIX.  Protect the function
16844         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
16845         Don't use K&R prototypes.  Check the sprintf return values.
16846         Re-define EAFNOSUPPORT if not present.  Indent.
16847
16848         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
16849         suggested by Bruno Haible <bruno@clisp.org>.
16850
16851         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
16852
16853         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
16854
16855         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
16856         libgcrypt).
16857
16858         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
16859
16860         * lib/md2.h, lib/md2.c: New files.
16861
16862 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
16863
16864         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
16865         errno alone.  Problem reported by Frederic Jolliton.
16866
16867 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
16868
16869         * modules/verify (License): Change from GPL to LGPL.  This is a
16870         tiny module and there are apparently near-equivalents that are
16871         under the BSD license.
16872
16873 2005-10-24  Simon Josefsson  <jas@extundo.com>
16874
16875         * modules/sha1: Relicense to LGPL.
16876
16877 2005-10-24  Simon Josefsson  <jas@extundo.com>
16878
16879         * lib/md4.h: Shrink buffer size, now that we changed the type.
16880
16881 2005-10-23  Simon Josefsson  <jas@extundo.com>
16882
16883         * gnulib-tool (func_import): Fix --tests-base.
16884
16885 2005-10-22  Simon Josefsson  <jas@extundo.com>
16886
16887         * modules/arcfour (Depends-on): Need stdint.
16888
16889 2005-10-22  Simon Josefsson  <jas@extundo.com>
16890
16891         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
16892         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
16893
16894 2005-10-22  Simon Josefsson  <jas@extundo.com>
16895
16896         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
16897         suggested by Bruno Haible <bruno@clisp.org>.
16898
16899 2005-10-22  Simon Josefsson  <jas@extundo.com>
16900
16901         * lib/crc.h: Include stddef.h, for size_t.
16902
16903 2005-10-22  Simon Josefsson  <jas@extundo.com>
16904
16905         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
16906         arcfour_context struct (simplify test vector testing in GNU
16907         Shishi).
16908
16909 2005-10-21  Simon Josefsson  <jas@extundo.com>
16910
16911         * modules/des, modules/des-tests: New files.
16912
16913         * modules/gc-des, modules/gc-des-tests: New files.
16914
16915         * tests/test-des.c, tests/test-gc-des.c: New file.
16916
16917 2005-10-21  Simon Josefsson  <jas@extundo.com>
16918
16919         * modules/arctwo, modules/arctwo-tests: New files.
16920
16921         * tests/test-arctwo.c: New file.
16922
16923         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
16924
16925         * tests/test-gc-arctwo.c: New file.
16926
16927 2005-10-21  Simon Josefsson  <jas@extundo.com>
16928
16929         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
16930         Bruno Haible <bruno@clisp.org>.
16931
16932         * m4/gc-des.m4: New file.
16933
16934 2005-10-21  Simon Josefsson  <jas@extundo.com>
16935
16936         * m4/arctwo.m4: New file.
16937
16938         * m4/gc-arctwo.m4: New file.
16939
16940 2005-10-21  Simon Josefsson  <jas@extundo.com>
16941
16942         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
16943         block.
16944
16945 2005-10-21  Simon Josefsson  <jas@extundo.com>
16946
16947         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
16948         <bruno@clisp.org>.
16949
16950         * lib/hmac-sha1.c (hmac_sha1): Likewise.
16951
16952         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
16953         Bruno Haible <bruno@clisp.org>.
16954
16955         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
16956         <bruno@clisp.org>.
16957
16958 2005-10-21  Simon Josefsson  <jas@extundo.com>
16959
16960         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
16961
16962 2005-10-21  Simon Josefsson  <jas@extundo.com>
16963
16964         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
16965
16966 2005-10-21  Simon Josefsson  <jas@extundo.com>
16967
16968         * lib/des.h, lib/des.c: New files.
16969
16970         * lib/gc-gnulib.c: Support DES.c
16971
16972 2005-10-21  Simon Josefsson  <jas@extundo.com>
16973
16974         * lib/arctwo.h, lib/arctwo.c: New files.
16975
16976         * lib/gc-gnulib.c: Support ARCTWO.
16977
16978 2005-10-21  Simon Josefsson  <jas@extundo.com>
16979
16980         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
16981         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16982
16983 2005-10-21  Simon Josefsson  <jas@extundo.com>
16984
16985         * gnulib-tool (func_import, func_create_testdir): Define automake
16986         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
16987         Makefile.am snippet),
16988         suggested by Bruno Haible <bruno@clisp.org>.
16989
16990         * modules/gc (Makefile.am): Use it.
16991
16992 2005-10-21  Bruno Haible  <bruno@clisp.org>
16993
16994         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
16995         patch.
16996
16997 2005-10-19  Simon Josefsson  <jas@extundo.com>
16998
16999         * tests/test-gc-rijndael.c: New file.
17000
17001         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
17002
17003 2005-10-19  Simon Josefsson  <jas@extundo.com>
17004
17005         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
17006         interface too.
17007
17008 2005-10-19  Simon Josefsson  <jas@extundo.com>
17009
17010         * tests/test-gc-arcfour.c: New file.
17011
17012         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
17013
17014 2005-10-19  Simon Josefsson  <jas@extundo.com>
17015
17016         * modules/gc-md4, modules/gc-md4-tests: New file.
17017
17018         * tests/test-gc-md4.c: New file.
17019
17020 2005-10-19  Simon Josefsson  <jas@extundo.com>
17021
17022         * m4/gc-md4.m4: New file.
17023
17024 2005-10-19  Simon Josefsson  <jas@extundo.com>
17025
17026         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
17027         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
17028         <kasal@ucw.cz>.
17029
17030 2005-10-19  Simon Josefsson  <jas@extundo.com>
17031
17032         * m4/gc-arcfour.m4: New file.
17033
17034         * m4/gc-rijndael.m4: New file.
17035
17036 2005-10-19  Simon Josefsson  <jas@extundo.com>
17037
17038         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
17039
17040 2005-10-19  Simon Josefsson  <jas@extundo.com>
17041
17042         * lib/gc-gnulib.c: Support ARCFOUR.
17043
17044 2005-10-19  Simon Josefsson  <jas@extundo.com>
17045
17046         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
17047         support.
17048
17049         * lib/gc.h: Add ECB enum type.
17050
17051         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
17052
17053 2005-10-18  Simon Josefsson  <jas@extundo.com>
17054
17055         * tests/test-md5.c: New file.
17056
17057         * modules/md5-tests: New file.
17058
17059 2005-10-18  Simon Josefsson  <jas@extundo.com>
17060
17061         * tests/test-md4.c: New file.
17062
17063         * modules/md4, modules/md4-tests: New files.
17064
17065 2005-10-18  Simon Josefsson  <jas@extundo.com>
17066
17067         * m4/md4.m4: New file.
17068
17069 2005-10-18  Simon Josefsson  <jas@extundo.com>
17070
17071         * lib/md4.h, lib/md4.c: New files, based on md5.?.
17072
17073 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
17074
17075         * gnulib-tool (func_create_testdir): Omit the second check whether
17076         BUILT_SOURCES in nonempty.
17077
17078 2005-10-17  Simon Josefsson  <jas@extundo.com>
17079
17080         * tests/test-rijndael.c: New file.
17081
17082 2005-10-17  Simon Josefsson  <jas@extundo.com>
17083
17084         * modules/sha1: Depend on stdint instead of md5.
17085
17086         * modules/md5: Depend on stdint, remove uint32_t.
17087
17088 2005-10-17  Simon Josefsson  <jas@extundo.com>
17089
17090         * modules/gc-sha1-tests: New file.
17091
17092         * tests/test-gc-sha1.c: New file.
17093
17094 2005-10-17  Simon Josefsson  <jas@extundo.com>
17095
17096         * m4/md5.m4: Remove call to uint32_t.m4.
17097
17098 2005-10-17  Simon Josefsson  <jas@extundo.com>
17099
17100         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
17101
17102         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
17103         md5.h.
17104
17105         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
17106
17107         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
17108
17109 2005-10-17  Simon Josefsson  <jas@extundo.com>
17110
17111         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
17112
17113 2005-10-17  Simon Josefsson  <jas@extundo.com>
17114
17115         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
17116
17117 2005-10-17  Simon Josefsson  <jas@extundo.com>
17118
17119         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
17120
17121         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
17122
17123 2005-10-17  Bruno Haible  <bruno@clisp.org>
17124
17125         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
17126         that it can also be used in a test.
17127
17128 2005-10-16  Bruno Haible  <bruno@clisp.org>
17129
17130         * gnulib-tool (func_emit_tests_Makefile_am): Also define
17131         TESTS_ENVIRONMENT, so that individual tests can augment it.
17132
17133         * gnulib-tool (func_create_testdir): Use an intermediate target for
17134         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
17135         macros, like $(ALLOCA_H), which cannot be passed through the command
17136         line.
17137
17138 2005-10-15  Simon Josefsson  <jas@extundo.com>
17139
17140         * modules/rijndael-tests: New file.
17141
17142         * modules/rijndael: New file.
17143
17144 2005-10-15  Simon Josefsson  <jas@extundo.com>
17145
17146         * m4/rijndael.m4: New file.
17147
17148 2005-10-15  Simon Josefsson  <jas@extundo.com>
17149
17150         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
17151
17152         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
17153
17154 2005-10-14  Simon Josefsson  <jas@extundo.com>
17155
17156         * tests/test-arcfour.c: New file.
17157
17158         * modules/arcfour, modules/arcfour-tests: New files.
17159
17160 2005-10-14  Simon Josefsson  <jas@extundo.com>
17161
17162         * m4/arcfour.m4: New file.
17163
17164 2005-10-14  Simon Josefsson  <jas@extundo.com>
17165
17166         * lib/arcfour.h, lib/arcfour.c: New files.
17167
17168 2005-10-14  Roland McGrath  <roland@redhat.com>
17169
17170         Import from libc.  [BZ #1331]
17171         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
17172         macro argument.
17173         Reported by Matej Vela <vela@debian.org>.
17174
17175 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17176
17177         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
17178         include <wchar.h>; no longer needed.
17179
17180 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17181
17182         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
17183
17184 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
17185         and  Ulrich Drepper  <drepper@redhat.com>
17186
17187         Import from libc.
17188         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
17189         instead of inline stream orientation test and two separate
17190         function calls.  Pay no attention to USE_IN_LIBIO.
17191
17192 2005-10-13  Simon Josefsson  <jas@extundo.com>
17193
17194         * modules/gc-hmac-md5-tests: New file.
17195
17196         * tests/test-gc-hmac-sha1.c: New file.
17197
17198         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
17199
17200         * modules/gc-hmac-md5-tests: New file.
17201
17202         * tests/test-gc-md5.c: New file.
17203
17204         * modules/gc-md5-tests: New file.
17205
17206 2005-10-13  Simon Josefsson  <jas@extundo.com>
17207
17208         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
17209         Move memory allocation outside of loop.
17210
17211 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
17212
17213         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
17214         intermediate directory is in a read-only file system.  Problem
17215         reported by Eric Blake.
17216
17217 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
17218
17219         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
17220
17221 2005-10-12  Simon Josefsson  <jas@extundo.com>
17222
17223         * tests/test-hmac-sha1.c: New file.
17224
17225         * modules/hmac-sha1-tests: New file.
17226
17227         * modules/hmac-sha1: New file.
17228
17229 2005-10-12  Simon Josefsson  <jas@extundo.com>
17230
17231         * modules/gc-sha1: New file.
17232
17233 2005-10-12  Simon Josefsson  <jas@extundo.com>
17234
17235         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
17236
17237         * tests/test-gc-pbkdf2-sha1.c: New file.
17238
17239 2005-10-12  Simon Josefsson  <jas@extundo.com>
17240
17241         * modules/gc-md5, modules/gc-hmac-md5: New files.
17242
17243         * modules/gc (Files): Remove md5, memxor and hmac files.
17244
17245 2005-10-12  Simon Josefsson  <jas@extundo.com>
17246
17247         * m4/gc-pbkdf2-sha1.m4: New file.
17248
17249         * m4/gc-hmac-sha1.m4: New file.
17250
17251         * m4/gc-sha1: New file.
17252
17253         * m4/hmac-sha1.m4: New file.
17254
17255 2005-10-12  Simon Josefsson  <jas@extundo.com>
17256
17257         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
17258
17259         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
17260
17261 2005-10-12  Simon Josefsson  <jas@extundo.com>
17262
17263         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
17264         suggested by Bruno Haible <bruno@clisp.org>.
17265
17266 2005-10-12  Simon Josefsson  <jas@extundo.com>
17267
17268         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
17269
17270 2005-10-12  Simon Josefsson  <jas@extundo.com>
17271
17272         * lib/gc-pbkdf2-sha1.c: New file.
17273
17274         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
17275
17276 2005-10-12  Simon Josefsson  <jas@extundo.com>
17277
17278         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
17279
17280         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
17281
17282 2005-10-12  Simon Josefsson  <jas@extundo.com>
17283
17284         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
17285         GC_USE_HMAC_MD5, respectively.
17286
17287         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
17288         (gc_md5): Fix typo.
17289
17290         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
17291
17292         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
17293
17294         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
17295
17296 2005-10-12  Bruno Haible  <bruno@clisp.org>
17297
17298         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
17299         Reported by Stepan Kasal <kasal@ucw.cz>.
17300
17301 2005-10-11  Simon Josefsson  <jas@extundo.com>
17302
17303         * tests/test-crc.c: New file.
17304
17305         * modules/crc, modules/crc-tests: New files.
17306
17307 2005-10-11  Simon Josefsson  <jas@extundo.com>
17308
17309         * m4/crc.m4: New file.
17310
17311 2005-10-11  Simon Josefsson  <jas@extundo.com>
17312
17313         * lib/gc.h: Add gc_hash and gc_hash_buffer.
17314
17315         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
17316
17317         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
17318
17319 2005-10-11  Simon Josefsson  <jas@extundo.com>
17320
17321         * lib/crc.h, lib/crc.c: New files.
17322
17323         * lib/gc.h (gc_hash_buffer): Add doc.
17324
17325 2005-10-11  Bruno Haible  <bruno@clisp.org>
17326
17327         * modules/c-strcasestr: New file.
17328         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
17329
17330 2005-10-11  Bruno Haible  <bruno@clisp.org>
17331
17332         * modules/c-strcase: New file.
17333         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
17334
17335 2005-10-11  Bruno Haible  <bruno@clisp.org>
17336
17337         * lib/strcasecmp.c: Include limits.h.
17338         (strcasecmp): Avoid integer overflow on exotic platforms.
17339         * lib/strncasecmp.c: Include limits.h.
17340         (strncasecmp): Avoid integer overflow on exotic platforms.
17341         Reported by Paul Eggert.
17342
17343 2005-10-11  Bruno Haible  <bruno@clisp.org>
17344
17345         * lib/c-strcasestr.h: New file, from GNU gettext.
17346         * lib/c-strcasestr.c: New file, from GNU gettext.
17347
17348 2005-10-11  Bruno Haible  <bruno@clisp.org>
17349
17350         * lib/c-strcase.h: New file, from GNU gettext.
17351         * lib/c-strcasecmp.c: New file, from GNU gettext.
17352         * lib/c-strncasecmp.c: New file, from GNU gettext.
17353
17354 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17355
17356         * modules/mempcpy (License): GPL -> LGPL.
17357         * modules/strchrnul (License): Likewise.
17358         * modules/sysexits (License): Likewise.
17359
17360 2005-10-08  Simon Josefsson  <jas@extundo.com>
17361
17362         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
17363
17364 2005-10-07  Simon Josefsson  <jas@extundo.com>
17365
17366         * m4/memxor.m4: Remove gl_C_RESTRICT call.
17367
17368 2005-10-06  Simon Josefsson  <jas@extundo.com>
17369
17370         * tests/test-hmac-md5.c: New file.
17371
17372         * modules/hmac-md5-tests: New file.
17373
17374         * modules/hmac-md5: New file.
17375
17376 2005-10-06  Simon Josefsson  <jas@extundo.com>
17377
17378         * m4/hmac-md5.m4: New file.
17379
17380         * m4/memxor.m4: Require gl_C_RESTRICT.
17381
17382 2005-10-06  Simon Josefsson  <jas@extundo.com>
17383
17384         * lib/memxor.c (memxor): Avoid casts and warnings.
17385
17386 2005-10-06  Simon Josefsson  <jas@extundo.com>
17387
17388         * lib/hmac-md5.c: New file.
17389
17390         * lib/hmac.h: New file.
17391
17392 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17393
17394         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
17395         promotes to int, not unsigned int, to catch the AIX 5.3
17396         compiler bug.
17397
17398 2005-10-05  Simon Josefsson  <jas@extundo.com>
17399
17400         * modules/memxor: New file.
17401
17402         * modules/iconv (Files): Move config.rpath to havelib, it is used
17403         there.
17404
17405         * modules/havelib (Files): Add config.rpath.
17406
17407 2005-10-05  Simon Josefsson  <jas@extundo.com>
17408
17409         * m4/memxor.m4: New file.
17410
17411 2005-10-05  Simon Josefsson  <jas@extundo.com>
17412
17413         * lib/memxor.c (memxor): Fix compiler error.
17414
17415         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
17416         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
17417
17418         * lib/memxor.h, lib/memxor.c: New files.
17419
17420         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
17421         we assume all systems have it, suggested by Jim Meyering
17422         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
17423         any systems lack sys/socket.h; mingw32 is known to lack it, but we
17424         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
17425         same reasons.
17426
17427 2005-10-05  Simon Josefsson  <jas@extundo.com>
17428
17429         * config/srclist.txt: Add glibc bug 1423 for md5.h.
17430
17431 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
17432
17433         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
17434         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
17435         needed, since the source code now assumes these .h files.
17436
17437 2005-10-05  Derek Price  <derek@ximbiot.com>
17438
17439         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
17440
17441 2005-10-05  Bruno Haible  <bruno@clisp.org>
17442
17443         * modules/stdint (License): Change to LGPL.
17444
17445 2005-10-04  Simon Josefsson  <jas@extundo.com>
17446
17447         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
17448         D. Baushke" <mdb@gnu.org>.
17449
17450 2005-10-04  Bruno Haible  <bruno@clisp.org>
17451
17452         * lib/verify.h (verify_true): Provide alternative definition for C++.
17453
17454 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
17455
17456         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
17457         (SSIZE_MAX): New macro, if not already defined.
17458         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
17459         than 2 GiB.
17460
17461 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17462
17463         Sync from coreutils.
17464         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
17465         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
17466         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
17467         ULLONG_MAX doesn't work with 2.7.2.1.
17468
17469 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17470
17471         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
17472         From Ben Pfaff.
17473
17474         * modules/exclude (Depends-on): Depend on verify.
17475         * modules/strtoimax (Depends-on): Likewise.
17476         * modules/utimecmp (Depends-on): Likewise.
17477
17478 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17479
17480         * lib/exclude.c: Include verify.h.
17481         (verify): Remove.  All callers changed to use verify.h's version.
17482         * lib/strtoimax.c: Likewise.
17483         * lib/utimecmp.c: Likewis.e
17484
17485         Sync from coreutils.
17486         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
17487         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
17488         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
17489         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
17490         bother returning ENOSYS if settimeofday or stime fails; just let
17491         them return whatever errno they want to return.
17492         * lib/utimens.c: Include unistd.h, for dup2.
17493         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
17494         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
17495
17496 2005-10-02  Jim Meyering  <jim@meyering.net>
17497
17498         Sync from coreutils.
17499         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
17500         from glibc-2.2.5 that fails for read-only files.
17501
17502 2005-10-02  Jim Meyering  <jim@meyering.net>
17503
17504         Sync from coreutils.
17505         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
17506         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
17507         `#if HAVE_CONFIG_H'.
17508         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
17509         Remove AT_FDCWD test.
17510         Do not consume the fd unless successful.
17511         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
17512         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
17513         block, so that we don't even try to compile it if settimeofday is
17514         available.  This works around a compilation failure on OSF1 V5.1,
17515         due to stime requiring a `long int*' while tv_sec is `int'.
17516
17517 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
17518
17519         Sync from coreutils.
17520         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
17521         against `yes', rather than just testing for nonempty.
17522
17523 2005-10-01  Simon Josefsson  <jas@extundo.com>
17524
17525         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
17526         and Darwin.
17527
17528         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
17529         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
17530         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
17531         freeaddrinfo and gai_strerror are declared by the POSIX headers.
17532         Check if struct addrinfo is declared.
17533
17534 2005-10-01  Simon Josefsson  <jas@extundo.com>
17535
17536         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
17537         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
17538         AI_* and EAI_* definitions.  Protect function declarations.
17539
17540 2005-10-01  Jim Meyering  <jim@meyering.net>
17541
17542         Sync from coreutils.
17543
17544         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
17545         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
17546         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
17547         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17548         in the inet and nsl libraries.  Required on Solaris 5.7.
17549
17550 2005-10-01  Jim Meyering  <jim@meyering.net>
17551
17552         Sync from coreutils.
17553         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17554         in the inet and nsl libraries.  Required on Solaris 5.7.
17555
17556 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
17557
17558         * lib/getdelim.c (getdelim): Remove unused variables.
17559
17560 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
17561
17562         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
17563         so that the code works even with ancient cpp.  Portability problem
17564         with GCC 2.7.2.1 reported by Thomas M.Ott.
17565
17566 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
17567
17568         * modules/regex (Depends-on): Add strcase.
17569
17570         * modules/gethostname (Licence): Change from GPL to LGPL, since
17571         gethostname.c is a trivial implementation of a standard library
17572         function.
17573         * modules/poll (License): Change from GPL to LGPL, since it's
17574         derived from LGPL code.
17575
17576 2005-09-27  Jim Meyering  <jim@meyering.net>
17577
17578         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
17579         HAVE_CONFIG_H.
17580
17581         * lib/intprops.h (signed_type_or_expr__): Define.
17582         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
17583         for unsigned types.
17584
17585 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
17586
17587         * lib/verify.h (verify_expr): Remove, replacing with:
17588         (verify_true): New macro that returns true instead of void.
17589         (verify_type__): Remove.
17590         (verify): Use verify_true rather than verify_type__.
17591
17592 2005-09-26  Bruno Haible  <bruno@clisp.org>
17593
17594         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
17595         is necessary.
17596         (lib_SOURCES): Remove mbchar.c.
17597         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
17598         (Files): Add m4/mbrtowc.m4.
17599         * modules/mbiter: Likewise.
17600         * modules/mbuiter: Likewise.
17601
17602 2005-09-26  Bruno Haible  <bruno@clisp.org>
17603
17604         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
17605         compile mbchar.c if they are not both present.
17606         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
17607         * m4/mbiter.m4 (gl_MBITER): Likewise.
17608         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
17609         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
17610         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
17611
17612 2005-09-25  Jim Meyering  <jim@meyering.net>
17613
17614         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
17615         also uses socklen_t.
17616
17617 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
17618
17619         * lib/utimens.c (ENOSYS): Define if not already defined.
17620         (futimens): Support having a null PATH if the file descriptor
17621         is nonnegative.
17622
17623         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
17624         Remove.
17625         (__attribute): Define to empty unless GCC 3.1 or later.
17626         This works around a core dump on OpenBSD 3.4, which has GCC
17627         2.95.3, which dumps core when given __attribute__(()).  It also
17628         simplifies other tests, since we really don't want to bother with
17629         worrying about which ancient version of GCC supported what.
17630         Original problem reported by Yoann Vandoorselaere, with part of
17631         the fix suggested by Derek Price.
17632
17633 2005-09-24  Jim Meyering  <jim@meyering.net>
17634
17635         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
17636         so we can once again use a positive bitfield width of 1 -- now we
17637         don't have to explain why we were using a bitfield width of 2.
17638
17639 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17640
17641         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
17642         and similarly for the other external symbols.  Problem reported
17643         by James Gallager.
17644
17645         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
17646         bug reported by Jim Meyering.
17647
17648         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
17649         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
17650         not needed, since socklen is a prerequisite module.
17651
17652 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17653
17654         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
17655         Problem reported by Eric Blake.
17656         (getaddrinfo): Initialize se so that it's not garbage.
17657         Redo internal storage allocation so that it doesn't make unportable
17658         assumptions about alignment.
17659         Fix a memory leak.
17660
17661         * lib/utimens.c (futimens): Use futimesat if available.
17662         Prefer it to futimes since it doesn't have the futimes bug.
17663
17664         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
17665         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
17666         Instead, declare a function that returns a pointer to an array,
17667         and use verify_type__ to declare the size of the array.
17668         Problem and germ of a solution reported by Bruno Haible.
17669         (verify_type__): Use 2, not 1, for bitfield size, to avoid
17670         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
17671
17672 2005-09-23  Jim Meyering  <jim@meyering.net>
17673
17674         Sync from coreutils.
17675         Correct build failure (socklen_t not defined) on at least
17676         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
17677         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
17678
17679 2005-09-23  Jim Meyering  <jim@meyering.net>
17680
17681         * modules/getaddrinfo (Depends-on): Add socklen.
17682
17683 2005-09-23  Bruno Haible  <bruno@clisp.org>
17684
17685         * tests/test-verify.c: New file.
17686
17687 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17688
17689         Sync from coreutils.
17690
17691         * modules/argmatch (Depends-on): Add verify.
17692         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
17693         unistd-safer.
17694         * modules/save-cwd (Depends-on): Likewise.
17695
17696         * modules/openat (Files): Add lib/openat-die.c.
17697         (Depends-on): Remove error, exitfail.
17698         Add dirname.
17699
17700         * modules/verify: New file.
17701         * MODULES.html.sh (Diagnostics <assert.h>): New section,
17702         with "verify" module.
17703
17704 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17705
17706         Sync from coreutils.
17707
17708         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
17709         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
17710         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
17711         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
17712         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
17713         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
17714         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
17715         Don't bother checking for string.h, stdlib.h, unistd.h.
17716         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
17717         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
17718         module's job.
17719         * m4/jm-macros.m4 (gl_MACROS): Likewise.
17720         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
17721
17722         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
17723         (gl_GETDATE): Use it.
17724
17725         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
17726
17727 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17728
17729         Sync from coreutils.
17730
17731         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
17732         stat-time.h.
17733         * lib/argmatch.h: Include verify.h
17734         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
17735         (ARGMATCH_ASSERT): Remove; unused.
17736         * lib/canonicalize.c: Assume STDC_HEADERS.
17737         * lib/exclude.c: Include "strcase.h".
17738         * lib/regex_internal.h [!defined _LIBC]: Likewise.
17739         * lib/getusershell.c: Include stdio--.h rather than stdio.h
17740         and stdio-safer.h.
17741         (getusershell): Call fopen, not fopen_safer.
17742         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
17743         Do not include unistd-safer.h.
17744         (save_cwd): Don't call fd_safer; no longer needed
17745         now that we include fcntl--.h.
17746
17747         * lib/getdate.y (relative_time): New type.
17748         (RELATIVE_TIME_0): New constant.
17749         (parser_control): Use relative_time instead of doing it ourselves.
17750         (%union): Add new relative_time rel member.
17751         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
17752         Now typeless.
17753         (relunit, relunit_snumber): Now of type rel.
17754         (zone, rel, relunit, get_date): Adjust to above changes.
17755
17756         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
17757         Do not include unistd-safer.h.
17758         (getloadavg): Don't call fd_safer; no longer needed
17759         now that we include fcntl--.h.
17760
17761         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
17762         (make_dir_parents): Treat ENOSYS like EEXIST.
17763
17764         Improve quality of diagnostics on restore_cwd failure.
17765         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
17766         (make_dir_parents): Last arg is now int * (for errno), not bool *.
17767         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
17768         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
17769         each time through the loop.  Do not diagnose restore_cwd failure;
17770         that is the caller's job (and perhaps the caller does not care).
17771
17772         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
17773         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
17774         If the file already exists but is not a directory, don't bother
17775         to try to make its parents.
17776         Close potential file descriptor leak if we can't chdir("/") (!).
17777         Don't always return true if chdir($PWD) fails; return true only
17778         if the requested action was done successfully (except for the
17779         chdir($PWD)).
17780         Don't log final directory unless we actually made it.
17781         Refactor to avoid duplicate code to fix up permissions.
17782         Don't attempt to fix up parent permissions if chdir($PWD) fails.
17783
17784         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
17785         to make it a bit faster and (I hope) clearer.
17786         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
17787         Fix bug in formats like %2N.
17788
17789         * lib/verify.h: New file.
17790
17791 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17792
17793         Sync from coreutils.
17794         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
17795
17796 2005-09-22  Jim Meyering  <jim@meyering.net>
17797
17798         Sync from coreutils.
17799
17800         * m4/lstat.m4 (gl_FUNC_LSTAT):
17801         Use AC_LIBSOURCES to require lstat.c and lstat.h.
17802         Remove obsolete comment.
17803         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
17804         * m4/xstrtod.m4: Likewise.
17805
17806         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
17807
17808 2005-09-22  Jim Meyering  <jim@meyering.net>
17809
17810         Sync from coreutils.
17811
17812         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
17813
17814         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
17815         the .tm_year member, since otherwise gcc-4.0 would now warn about
17816         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
17817
17818         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
17819         order to avoid an unsuppressible warning from gcc on 64-bit systems.
17820
17821         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
17822         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
17823         when run in a time zone for which daylight savings time is in effect
17824         for the starting date.
17825
17826         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
17827         stop us from restricting permissions of just-created absolute-named
17828         directories.
17829         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
17830         to restore initial working directory.
17831         * lib/mkdir-p.c (make_dir_parents): New parameter:
17832         different_working_dir, to tell caller if/when we change the working
17833         directory and are unable to return to the initial one.
17834         * lib/mkdir-p.h (make_dir_parents): Update prototype.
17835         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
17836         `return false'.  This fixes a bug introduced on 2004-07-30.
17837
17838         * lib/openat.c (fdopendir): Be sure to close the supplied
17839         file descriptor before returning.  This makes our replacement
17840         implementation a little closer to Solaris's, where fdopendir
17841         ties the file descriptor to the returned DIR* pointer.
17842         * lib/openat.c (unlinkat): New function.
17843         * lib/openat.h (unlinkat): Add prototype.
17844         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
17845         (openat_restore_fail): Rename from openat_restore_die.
17846         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
17847
17848         Provide an alternative to exiting immediately upon save_cwd or
17849         restore_cwd failure.  Now, an application can arrange e.g.,
17850         to perform a longjump in that case.
17851         * lib/openat.c: Include dirname.h.
17852         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
17853         (rpl_openat, fdopendir, fstatat): Call openat_save_die
17854         and openat_restore_die rather than calling error directly.
17855         Don't include "error.h" or "exitfail.h"; they're no longer needed.
17856
17857         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
17858         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
17859         define.
17860
17861         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
17862         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
17863                             int utc, int nanoseconds);
17864         Background:
17865         date should not have to allocate a megabyte of virtual memory to
17866         handle a format argument like +%1048575T.  When implemented with
17867         strftime, it must allocate such a buffer, use strftime to fill it
17868         in, print it, then free it.
17869         With fprintftime, it simply prints everything and exits.
17870         With no need for memory allocation, that's one fewer way to fail.
17871         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
17872         optional field width, not before, so we accept %9:z, not %:9z.
17873         (my_strftime): Be sure to use L_('x') for literals.
17874
17875         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
17876         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
17877         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
17878         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
17879         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
17880         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
17881         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
17882         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
17883         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
17884         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
17885         * lib/xgethostname.c, lib/xreadlink.c:
17886         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
17887
17888         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
17889         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
17890         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
17891         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
17892         and don't include <sys/file.h>).
17893
17894 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
17895
17896         Sync from coreutils.
17897
17898         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
17899         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
17900         [!LDAV_DONE]: Avoid unused variable warning.
17901
17902 2005-09-21  Bruno Haible  <bruno@clisp.org>
17903
17904         * lib/unicodeio.h (unicode_to_mb): New declaration.
17905
17906 2005-09-20  Derek Price  <derek@ximbiot.com>
17907
17908         * lib/getaddrinfo.c: Don't include <netdb.h> included from
17909         getaddrinfo.h.
17910
17911 2005-09-20  Bruno Haible  <bruno@clisp.org>
17912
17913         * gnulib-tool: Remove trailing slashes from the values specified for
17914         --source-base, --m4-base, --tests-base, --aux-dir.
17915         Suggested by Simon Josefsson <jas@extundo.com>.
17916
17917 2005-09-20  Bruno Haible  <bruno@clisp.org>
17918
17919         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
17920         func_modules_to_filelist, func_import, func_create_testdir): Make all
17921         sorting results locale-independent, so that gnulib-cache.m4 doesn't
17922         change when gnulib-tool is invoked in a different locale.
17923
17924 2005-09-19  Simon Josefsson  <jas@extundo.com>
17925
17926         * m4/socklen.m4: Fix typo.
17927
17928 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
17929
17930         Use a consistent style for including <config.h>.
17931         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
17932         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
17933         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
17934         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
17935         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
17936         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
17937         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
17938         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
17939         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
17940         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
17941         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
17942         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
17943         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
17944         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
17945         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
17946         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
17947         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
17948         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
17949         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
17950         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
17951         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
17952         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
17953         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
17954         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
17955         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
17956         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
17957         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
17958         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
17959         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
17960         lib/xstrtoumax.c, lib/yesno.c:
17961         Standardize inclusion of config.h.
17962         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
17963         lib/inttostr.h:  Removed inclusion of config.h from header files.
17964         * lib/inttostr.c:  Adjusted in-tree users.
17965         * lib/timespec.h: Remove superfluous warning to include config.h.
17966         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
17967         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
17968         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
17969         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
17970         config.h with HAVE_CONFIG_H.
17971
17972 2005-09-19  Jim Meyering  <jim@meyering.net>
17973
17974         * modules/pathmax (License): Change to LGPL.
17975
17976 2005-09-19  Derek Price  <derek@ximbiot.com>
17977
17978         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
17979
17980 2005-09-19  Bruno Haible  <bruno@clisp.org>
17981
17982         * gnulib-tool (import): Provide default for --tests-base.
17983
17984 2005-09-19  Bruno Haible  <bruno@clisp.org>
17985
17986         * doc/quote.texi: New file, extracted from gnulib.texi.
17987         * doc/ctime.texi: New file, extracted from gnulib.texi.
17988         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
17989         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
17990         * doc/gnulib.texi: Include them.
17991
17992 2005-09-18  Bruno Haible  <bruno@clisp.org>
17993
17994         Portability fix.
17995         * gnulib-tool (func_readlink): New function.
17996         (func_ln_if_changed): Use it.
17997
17998 2005-09-18  Bruno Haible  <bruno@clisp.org>
17999
18000         * gnulib-tool: Support --with-tests also with --import.
18001         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
18002         (func_import): Use variables $testsbase and $inctests. Emit a
18003         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
18004         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
18005         SUBDIRS += $testsdir.
18006         (func_create_testdir): Update.
18007
18008 2005-09-18  Bruno Haible  <bruno@clisp.org>
18009
18010         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
18011         instead of $dry_run.
18012         (func_cp_if_changed, func_mv_if_changed): Remove functions.
18013         (func_ln_if_changed): Don't handle dry-run here.
18014         (func_import): In dry-run mode, detect more precisely which actions
18015         would be performed, and don't use "...ing" verbs.
18016
18017 2005-09-18  Bruno Haible  <bruno@clisp.org>
18018
18019         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
18020         (func_import): Use join on two temporary files instead of three nested
18021         loops, in order to determine which files are new or old.
18022
18023 2005-09-18  Bruno Haible  <bruno@clisp.org>
18024
18025         * gnulib-tool (func_import): Comment out code that spits out the
18026         new files with --dry-run.
18027
18028 2005-09-18  Bruno Haible  <bruno@clisp.org>
18029
18030         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
18031
18032 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18033
18034         * lib/stat-time.h: New file.
18035         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
18036         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
18037         in a different way.
18038         (timespec_cmp): New function.
18039         * lib/utimecmp.c: Include stat-time.h.
18040         (SYSCALL_RESOLUTION): Depend on whether various struct stat
18041         members exist, not on the obsolescent ST_MTIM_NSEC.
18042         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
18043
18044 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18045
18046         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
18047
18048 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18049
18050         * MODULES.html.sh (File system functions): Add stat-time.
18051         * modules/stat-time: New file.
18052         * modules/timespec (Files): Remove m4/st_mtim.m4; this
18053         is now done in a different way, by the stat-time module.
18054         * modules/utimecmp (Depends-on): Add stat-time.
18055
18056 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
18057
18058         * m4/st_mtim.m4: Remove.  Superseded by...
18059         * m4/stat-time.m4: New file.
18060         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
18061         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
18062
18063 2005-09-15  Derek Price  <derek@ximbiot.com>
18064
18065         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
18066
18067 2005-09-15  Derek Price  <derek@ximbiot.com>
18068
18069         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
18070         * lib/regex_internal.c: Ditto, using this...
18071         (__GNUC_PREREQ): ...new macro.
18072         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
18073         using...
18074         (__GNUC_PREREQ): ...this new macro.
18075
18076         * lib/strstr.h: Include string.h. Define strstr as a macro here.
18077
18078 2005-09-15  Derek Price  <derek@ximbiot.com>
18079             Paul Eggert  <eggert@cs.ucla.edu>
18080
18081         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
18082         changes, consolidating in...
18083         * lib/regex_internal.h: ...this file.
18084
18085 2005-09-13  Jim Meyering  <jim@meyering.net>
18086
18087         * lib/canon-host.c: Filter through gnu indent and reword comments
18088         slightly.
18089         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
18090
18091 2005-09-13  Derek Price  <derek@ximbiot.com>
18092
18093         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
18094         failure.
18095         Reported by Jim Meyering  <jim@meyering.net>.
18096
18097 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18098
18099         * lib/base64.c: Typo.
18100         (base64_encode): Put b64str in initialized data section.
18101
18102 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
18103
18104         Merge glibc and coreutils changes into gnulib, plus a few
18105         extra fixes.
18106         * lib/md5.c: Use #error rather than a string.
18107         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
18108         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
18109         (__attribute__): Define to empty for non recent-GCC.
18110         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
18111         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
18112         Renamed from their non-__ counterparts, with new macros replacing
18113         them if not _LIBC.  Add __THROW attribute.
18114         (rol): Remove.
18115         (struct md5_ctx): Align buffer if using GCC.
18116         * lib/sha1.h (struct sha1_ctx): Likewise.
18117         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
18118         The old name was backwards.
18119         (NOTSWAP): Remove; not used.
18120         (rol): New macro, moved here from md5.h.
18121         (sha1_process_block): Remove a FIXME that doesn't make sense.
18122
18123 2005-09-12  Derek Price  <derek@ximbiot.com>
18124
18125         Return usable errors from canon-host.
18126         * lib/canon-host.h: New file.
18127         * lib/canon-host.c (canon_host): Wrap...
18128         (canon_host_r): ...this new function, which now relies exclusively on
18129         getaddrinfo.
18130         (ch_strerror): New function.
18131         (last_cherror): New global.
18132         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
18133         interface.
18134         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
18135         void *.
18136         (freeaddrinfo): Free ai->ai_canonname when set.
18137
18138 2005-09-12  Derek Price  <derek@ximbiot.com>
18139
18140         Make canon-host require getaddrinfo.
18141         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
18142         AC_LIBSOURCE canon-host.h.  Call...
18143         (gl_PREREQ_CANON_HOST): ...this new function, which requires
18144         gl_GETADDRINFO.
18145         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
18146
18147 2005-09-12  Derek Price  <derek@ximbiot.com>
18148
18149         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
18150         LGPL.
18151         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
18152
18153 2005-09-12  Derek Price  <derek@ximbiot.com>
18154
18155         * lib/gai_strerror.c: Include config.h when available.  Include
18156         getaddrinfo.h before other headers to test interface.
18157         Reported by Larry Jones <lawrence.jones@ugs.com>.
18158
18159 2005-09-12  Derek Price  <derek@ximbiot.com>
18160             Paul Eggert  <eggert@cs.ucla.edu>
18161
18162         * modules/glob (Files): Add glob-libc.h.
18163
18164 2005-09-12  Derek Price  <derek@ximbiot.com>
18165             Paul Eggert  <eggert@cs.ucla.edu>
18166
18167         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
18168         glob_.h, glob-libc.h.
18169         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
18170
18171 2005-09-12  Derek Price  <derek@ximbiot.com>
18172             Paul Eggert  <eggert@cs.ucla.edu>
18173
18174         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
18175         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
18176         protecting things that should be done only in gnulib contexts.
18177         * lib/glob_.h: New file, containing only the glob things needed for
18178         gnulib.
18179         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
18180         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
18181         (glob, globfree, glob_pattern_p): Now defined simply in terms of
18182         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
18183         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
18184         and to respect the namespace rules better.
18185
18186 2005-09-08  Simon Josefsson  <jas@extundo.com>
18187
18188         * modules/socklen: New file.
18189
18190 2005-09-08  Simon Josefsson  <jas@extundo.com>
18191
18192         * m4/socklen.m4: New file.
18193
18194 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18195
18196         * modules/utimens (Files): Add m4/utimbuf.m4, since
18197         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
18198         Reported by Sergey Poznyakoff.
18199
18200 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18201
18202         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
18203         definitions, since that's the preferred style in glibc.
18204         Fix a minor spacing issue, and update copyright notice to match
18205         glibc's.
18206
18207 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18208
18209         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
18210
18211 2005-09-06  Simon Josefsson  <jas@extundo.com>
18212
18213         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
18214         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
18215
18216 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18217
18218         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
18219         warning.
18220
18221 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18222
18223         * config/srclist.txt: Add glibc bug 1302.
18224
18225 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
18226
18227         Change bitset word type from unsigned int to unsigned long int,
18228         as this has better performance on typical 64-bit hosts.
18229         Port bitset code to hosts with unusual word sizes.
18230         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
18231         (build_collating_symbol):
18232         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
18233         argument is a bitset.  This is merely a style issue, but it makes
18234         it clearer that an entire array is expected.
18235         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
18236         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
18237         Port to the case where bitset_word is not the same as unsigned int.
18238         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18239         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
18240         Likewise.
18241         * lib/regexec.c (check_dst_limits_calc_pos_1,
18242         check_subexp_matching_top):
18243         (build_trtable, group_nodes_into_DFAstates):
18244         Likewise.
18245         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
18246         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
18247         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
18248         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
18249         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
18250         * lib/regcomp.c (optimize_subexps, lower_subexp):
18251         Work even if bitset_word has holes in its bitwise representation.
18252         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
18253         * lib/regexec.c (check_dst_limits_calc_pos_1,
18254         check_subexp_matching_top):
18255         Likewise.
18256         * lib/regex_internal.c (re_string_reconstruct):
18257         Don't assume UCHAR_MAX == 255.
18258         * lib/regex_internal.h (bitset_set_all): Likewise.
18259         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
18260         All uses changed.
18261         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
18262         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
18263         All uses changed.
18264         (BITSET_WORD_MAX): New macro.
18265         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
18266         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
18267         (bitset_empty, bitset_copy):
18268         Prefer sizeof (bitset) to multiplying it out ourselves.
18269         (bitset_not_merge): Remove; unused.
18270         (bitset_contain): Return bool, not unsigned int with one bit on.
18271         All callers changed.
18272         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
18273         alignment than re_node_set; do this by defining a new internal
18274         type struct dests_alloc and using it to allocate memory.
18275
18276 2005-09-05  Bruno Haible  <bruno@clisp.org>
18277
18278         * gnulib-tool (func_import): Fix comparison in handling of symbolic
18279         links.
18280
18281 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
18282
18283         * modules/size_max (Makefile.am): Add size_max.h
18284
18285 2005-09-04  Derek Price  <derek@ximbiot.com>
18286
18287         * gnulib-tool (func_import): Fix reversed $symbolic logic.
18288
18289 2005-09-03  Simon Josefsson  <jas@extundo.com>
18290
18291         * gnulib-tool: Fix typo.
18292
18293 2005-09-03  Simon Josefsson  <jas@extundo.com>
18294
18295         * config/srclist.txt: Add glibc bug 1293.
18296
18297 2005-09-03  Derek Price  <derek@ximbiot.com>
18298
18299         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
18300         From Larry Jones <lawrence.jones@ugs.com>.
18301
18302 2005-09-02  Simon Josefsson  <jas@extundo.com>
18303
18304         * modules/socklen: New file.
18305
18306 2005-09-02  Simon Josefsson  <jas@extundo.com>
18307
18308         * modules/havelib: New module.
18309
18310         * modules/gettext, modules/iconv, modules/lock, modules/readline:
18311         Use havelib.
18312
18313 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18314
18315         Check for arithmetic overflow when calculating sizes, to prevent
18316         some buffer-overflow issues.  These patches are conservative, in the
18317         sense that when I couldn't determine whether an overflow was possible,
18318         I inserted a run-time check.
18319         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
18320         macros.
18321         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
18322         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
18323         (re_xnrealloc, re_x2nrealloc): New inline functions.
18324         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
18325         parse_bracket_exp):
18326         (build_equiv_class, build_charclass): Check for arithmetic overflow
18327         in size expression calculations.
18328         * lib/regex_internal.c (re_string_realloc_buffers):
18329         (build_wcs_upper_buffer, re_node_set_add_intersect):
18330         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
18331         (re_dfa_add_node, register_state): Likewise.
18332         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
18333         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
18334         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
18335         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
18336
18337 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18338
18339         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18340         m4/ulonglong.m4.  Problem reported by Martin Lambers.
18341
18342 2005-09-02  Bruno Haible  <bruno@clisp.org>
18343
18344         Support for lib vs. lib64 distinction on biarch platforms.
18345         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
18346         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
18347         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
18348
18349 2005-09-02  Bruno Haible  <bruno@clisp.org>
18350
18351         * gnulib-tool (import): In the other first-use case, provide defaults
18352         as well.
18353
18354 2005-09-02  Bruno Haible  <bruno@clisp.org>
18355
18356         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
18357         patches not yet found in the latest gettext release.
18358
18359 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18360
18361         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
18362         to avoid a collision with bits/local_lim.h in glibc.
18363         All uses changed.  Problem reported by Dmitry V. Levin in
18364         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
18365
18366         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
18367         bugs in int versus size_t comparisons.
18368         (re_string_context_at): Fix bug where the code assumed that
18369         Idx is signed.
18370
18371         Use bool where appropriate.
18372         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
18373         All callers changed.
18374         (calc_eclosure_iter): Likewise, for ROOT arg.
18375         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
18376         (build_charclass_op): Likewise, for NON_MATCH arg.
18377         * lib/regex_internal.c (re_string_allocate, re_string_construct):
18378         (re_string_construct_common): Likewise, for ICASE arg.
18379         * lib/regexec.c (re_search_2_stub, re_search_stub):
18380         Likewise, for RET_LEN arg.
18381         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
18382         (set_regs): Likewise, for FL_BACKTRACK arg.
18383         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
18384         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
18385         (calc_eclosure_iter, parse_bracket_exp):
18386         Use bool for internal variables that are booleans.
18387         * lib/regexec.c (re_search_internal, check_matching,
18388         proceed_next_node):
18389         (set_regs, build_sifted_states, sift_states_bkref):
18390         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
18391         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18392         (find_collation_sequence_value):
18393         Likewise.
18394         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
18395         (re_node_set_compare):
18396         Return bool, not int. All callers changed.
18397         * lib/regexec.c (check_halt_node_context, check_dst_limits):
18398         (build_trtable, check_node_accept): Likewise.
18399         * lib/regex_internal.h: Include stdbool.h.
18400
18401         Fix bugs uncovered when converting to bool.
18402         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
18403         failure instead of charging ahead blindly.
18404         * lib/regex_internal.c (register_state): Likewise.
18405         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
18406         for freeing internal storage.
18407         (group_nodes_into_DFA_states): Use unsigned int, not int, for
18408         bitset pieces used as boolean, to avoid undefined behavior
18409         on hosts that do int overflow checking.
18410
18411 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18412
18413         * config/srclist.txt: Add glibc bugs 1285-1287.
18414
18415 2005-09-01  Jim Meyering  <jim@meyering.net>
18416
18417         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
18418         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
18419         Require gl_STAT_MACROS, too.
18420
18421 2005-09-01  Bruno Haible  <bruno@clisp.org>
18422
18423         * gnulib-tool (import): In the first-use case, provide defaults.
18424
18425 2005-09-01  Bruno Haible  <bruno@clisp.org>
18426
18427         * gnulib-tool (func_import): Remove the .tmp files.
18428
18429 2005-09-01  Bruno Haible  <bruno@clisp.org>
18430
18431         * gnulib-tool (func_import): Fix handling of symbolic links.
18432
18433 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18434
18435         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
18436         old glibc regex code mishandles strings longer than 2**31 bytes.
18437         This patch fixes this when the regex code is used in gnulib
18438         (i.e., outside glibc).
18439
18440         This patch should not affect the use of the regex code inside
18441         glibc.  No doubt this problem also needs to be handled for glibc
18442         as well, but the result will be an incompatible change to the
18443         glibc ABI, and the old ABI will have to be supported too.  That
18444         can be the the subject for another patch.
18445
18446         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
18447         governing whether the rest of this patch is active.  By default,
18448         the macro is disabled and the patch has no effect.
18449         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
18450         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
18451         (struct re_pattern_buffer, re_search, re_search_2, re_match):
18452         (re_match_2, re_set_registers): Use the new types.
18453         * lib/regex_internal.h (Idx, re_hashval_t): New types.
18454         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
18455         New macros.
18456         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
18457         (re_string_context_at, bin_tree_t, re_dfastate_t):
18458         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
18459         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
18460         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
18461         (re_string_char_size_at, re_string_wchar_at):
18462         (re_string_elem_size_at):
18463         Use the new types and macros to port to 64-bit hosts.
18464         Use unsigned types for internal values, so that the code
18465         mostly works even for arrays larger than SSIZE_MAX.
18466         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
18467         (search_duplicated_node, calc_eclosure_iter, fetch_number):
18468         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
18469         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
18470         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
18471         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
18472         (calc_inveclosure, parse_dup_op, build_range_exp):
18473         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
18474         (fetch_number, create_token_tree, mark_opt_subexp):
18475         Likewise.
18476         * lib/regex_internal.c (re_string_construct_common,
18477         create_ci_newstate):
18478         (create_cd_newstate, re_string_allocate, re_string_construct):
18479         (re_string_realloc_buffers, build_wcs_upper_buffer):
18480         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18481         (re_string_reconstruct, re_string_peek_byte_case):
18482         (re_string_fetch_byte_case, re_string_context_at):
18483         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18484         (re_node_set_init_copy, re_node_set_add_intersect):
18485         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18486         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18487         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18488         (re_acquire_state, re_acquire_state_context, register_state):
18489         Likewise.
18490         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
18491         search_cur_bkref_entry):
18492         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
18493         (re_search_internal, re_search_2_stub, re_search_stub)
18494         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
18495         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
18496         (update_cur_sifted_state, check_dst_limits):
18497         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18498         (check_subexp_limits, sift_states_bkref, merge_state_array):
18499         (check_subexp_matching_top, get_subexp, get_subexp_sub):
18500         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
18501         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18502         (expand_bkref_cache, check_node_accept_bytes):
18503         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
18504         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
18505         (acquire_init_state_context, check_halt_node_context):
18506         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
18507         (sift_states_backward, clean_state_log_if_needed):
18508         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
18509         (find_recover_state, transit_state_sb, transit_state_mb):
18510         (transit_state_bkref, build_trtable, match_ctx_clean):
18511         Likewise.
18512         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
18513         to work around an assumption that REG_MISSING is negative.
18514
18515         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
18516         (seek_collating_symbol_entry) [defined _LIBC]:
18517         (lookup_collation_sequence_value) [defined _LIBC]:
18518         (build_range_exp, build_collating_symbol) [defined _LIBC]:
18519         Use prototypes rather than old-style function definitions.
18520         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
18521         (transit_state_sb) [0]:
18522         (find_collation_sequence_value) [defined _LIBC]: Likewise.
18523
18524         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
18525         rm_eo.
18526
18527         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
18528         (optimize_subexps, lower_subexp):
18529         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
18530         since the signed shift might overflow.  Use 1u<<31 instead.
18531         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18532         Likewise.
18533         * lib/regexec.c (check_dst_limits_calc_pos_1,
18534         check_subexp_matching_top): Likewise.
18535
18536         * lib/regcomp.c (optimize_subexps, lower_subexp):
18537         Use CHAR_BIT rather than 8, for clarity.
18538         * lib/regexec.c (check_dst_limits_calc_pos_1):
18539         (check_subexp_matching_top): Likewise.
18540         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
18541         have to worry about portability issues when shifting it left.
18542         Remove no-longer-needed test for table_size > 0.
18543         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
18544         in a word, as the resulting behavior is undefined.
18545         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
18546         in one case, a <= should have been an <, and in another case the
18547         whole test was missing.
18548         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
18549         the standard name CHAR_BIT.
18550         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
18551         this is not true on one's complement and signed-magnitude hosts.
18552
18553         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
18554         next_last_offset.
18555         (struct re_dfa_t): Remove unused member states_alloc.
18556         * lib/regcomp.c (init_dfa): Don't initialize unused members.
18557
18558 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18559
18560         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
18561         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
18562         and large-file glibc and in 32-bit large-file Solaris.
18563
18564 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18565
18566         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
18567         lengths fit in regoff_t; this isn't true if regoff_t is the same
18568         width as size_t.
18569         * lib/regex.c (re_search_internal): 5th arg is LAST_START
18570         (= START + RANGE) instead of RANGE.  This avoids overflow
18571         problems when regoff_t is the same width as size_t.
18572         All callers changed.
18573         (re_search_2_stub): Check for overflow when adding the
18574         sizes of the two strings.
18575         (re_search_stub): Check for overflow when adding START
18576         to RANGE; if it occurs, substitute the extreme value.
18577
18578 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18579
18580         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
18581
18582 2005-08-31  Jim Meyering  <jim@meyering.net>
18583
18584         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
18585         a pointer-to-const.
18586         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
18587         (register_state): Likewise.
18588         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
18589         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18590         (group_nodes_into_DFAstates): Likewise.
18591
18592 2005-08-31  Jim Meyering  <jim@meyering.net>
18593
18594         * check-module: Add a FIXME comment.
18595
18596 2005-08-31  Eric Blake  <ebb9@byu.net>
18597
18598         * modules/unistd-safer (Files): Add unistd--.h.
18599         * modules/stdio-safer (Files): Add stdio--.h.
18600
18601 2005-08-31  Derek Price  <derek@ximbiot.com>
18602
18603         * lib/getdelim.c (getdelim): Return EOF on EOF.
18604         Reported by Larry Jones <lawrence.jones@ugs.com>.
18605
18606 2005-08-31  Bruno Haible  <bruno@clisp.org>
18607
18608         Avoid unnecessary diffs in the generated lib/Makefile.am.
18609         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
18610         the generated files.
18611         (func_import): Don't set cmd.
18612
18613 2005-08-31  Bruno Haible  <bruno@clisp.org>
18614
18615         * lib/strstr.c: Include <stddef.h>, for NULL.
18616         * lib/strcasestr.c: Likewise.
18617         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
18618
18619 2005-08-31  Bruno Haible  <bruno@clisp.org>
18620
18621         * gnulib-tool: New option --macro-prefix.
18622         (func_import): Use macro_prefix.
18623         (import): Handle option --macro-prefix.
18624
18625 2005-08-31  Bruno Haible  <bruno@clisp.org>
18626
18627         * gnulib-tool (import): Rename most ac_* variables to cached_*.
18628         Also use new variables cached_lgpl, cached_libtool.
18629
18630 2005-08-31  Bruno Haible  <bruno@clisp.org>
18631
18632         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
18633         always instantiating them.
18634
18635 2005-08-31  Bruno Haible  <bruno@clisp.org>
18636
18637         * gnulib-tool (func_import): Read the previous cached settings
18638         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
18639         earlier added by gnulib but are now dropped. Warn when a gnulib file
18640         overwrites a non-gnulib file.
18641
18642 2005-08-31  Bruno Haible  <bruno@clisp.org>
18643
18644         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
18645         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
18646         projects that don't keep autogenerated files in CVS. Put into
18647         actioncmd only the specified modules, not the transitive closure.
18648
18649 2005-08-31  Bruno Haible  <bruno@clisp.org>
18650
18651         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
18652         Create directories that shall be filled.
18653         (import): Don't look for gl_* macros in configure.ac. Recurse across
18654         all directories containing a gnulib-cache.m4 files, if meaningful.
18655
18656 2005-08-31  Bruno Haible  <bruno@clisp.org>
18657
18658         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
18659         (import): Set seen_libtool when we see gl_LIBTOOL.
18660
18661 2005-08-31  Bruno Haible  <bruno@clisp.org>
18662
18663         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
18664         declaration macro definitions from generated gnulib.m4.
18665
18666 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
18667
18668         * lib/iconvme.h: Add prototype for iconv_alloc.
18669
18670 2005-08-29  Simon Josefsson  <jas@extundo.com>
18671
18672         * lib/iconvme.c: Fix errno.
18673
18674 2005-08-29  Bruno Haible  <bruno@clisp.org>
18675
18676         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
18677         that it works when the directory contains spaces.
18678
18679 2005-08-29  Bruno Haible  <bruno@clisp.org>
18680
18681         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
18682
18683 2005-08-29  Bruno Haible  <bruno@clisp.org>
18684
18685         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
18686         Emit more advice.
18687
18688 2005-08-29  Bruno Haible  <bruno@clisp.org>
18689         and Stepan Kasal  <kasal@ucw.cz>
18690
18691         * check-module: If more parameters are given, check each of them
18692         separately; add more exceptions, as noted by Jim Meyering.
18693         (check_module): New procedure.
18694         (%exempt_header): Now contains all exceptions.
18695
18696 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
18697
18698         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
18699
18700 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18701
18702         * lib/iconvme.c: Split iconv_string into iconv_alloc.
18703
18704 2005-08-28  Bruno Haible  <bruno@clisp.org>
18705
18706         * m4/gnulib-tool.m4: New file.
18707
18708 2005-08-27  Jim Meyering  <jim@meyering.net>
18709
18710         * modules/unistd-safer (Files): Add pipe-safer.c.
18711         * modules/fcntl-safer (Files): Add creat-safer.c.
18712
18713 2005-08-27  Jim Meyering  <jim@meyering.net>
18714
18715         * m4/stdlib-safer.m4: New file.  From coreutils.
18716         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
18717         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
18718         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
18719         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
18720         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
18721
18722 2005-08-27  Jim Meyering  <jim@meyering.net>
18723
18724         * lib/fopen-safer.c: Merge minor changes from coreutils.
18725         * lib/dup-safer.c: Likewise.
18726         * lib/fd-safer.c: Likewise.
18727
18728         Merge from coreutils.
18729         * lib/stdio--.h: New file.
18730         * lib/stdlib--.h: New file.
18731         * lib/mkstemp-safer.c: New file.
18732
18733         GNU tar needs these.
18734         * lib/pipe-safer.c: New file.
18735         * lib/creat-safer.c: New file.
18736         * lib/fcntl--.h (creat): Define to creat_safer.
18737         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
18738         * lib/unistd--.h (pipe): Define to pipe_safer.
18739         * lib/unistd-safer.h: Declare pipe_safer.
18740
18741 2005-08-26  Simon Josefsson  <jas@extundo.com>
18742
18743         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
18744         Haible <bruno@clisp.org>.
18745
18746 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
18747
18748         * lib/regex_internal.h: Remove all references to
18749         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
18750         or better.
18751         (bitset_not, bitset_merge, bitset_not_merge):
18752         (bitset_mask, re_string_allocate, re_string_construct):
18753         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
18754         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
18755         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
18756         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
18757         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18758         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18759         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
18760         (re_acquire_state_context):
18761         Remove unnecessary forward decls.
18762         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
18763         Put __attribute at function definition,
18764         now that the function decl has been removed.
18765         * lib/regex_internal.c (re_string_peek_byte_case):
18766         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
18767         Likewise.
18768
18769 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
18770
18771         * m4/regex.m4: Add AC_PREREQ(2.50).
18772         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
18773
18774 2005-08-25  Simon Josefsson  <jas@extundo.com>
18775
18776         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
18777         __fsetlocking.
18778
18779 2005-08-25  Simon Josefsson  <jas@extundo.com>
18780
18781         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
18782         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
18783         GLIBC specific code.
18784
18785 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18786
18787         Make regex safe for g++.  This fixes one real bug (an "err"
18788         that should have been "*err").  g++ problem reported by
18789         Sam Steingold.
18790         * lib/regex_internal.h (re_calloc): New macro, consistent with
18791         re_malloc etc.  All callers of calloc changed to use re_calloc.
18792         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
18793         not int.  All callers changed.
18794         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
18795         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
18796         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
18797         (find_recover_state): Change "err" to "*err"; this fixes what
18798         appears to be a real bug.
18799         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
18800         versus int.
18801
18802 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18803
18804         * modules/regex (Depends-on): Add malloc, since the code
18805         assumes that !malloc(0) means failure.
18806
18807 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18808
18809         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
18810
18811         alloca modernization/simplification for regex.
18812         * lib/regex.c: Remove portability cruft for alloca.  This no longer
18813         needs to be at the start of the file, and can be moved into
18814         regex_internal.h and simplified.
18815         * lib/regex_internal.h: Include <alloca.h>.
18816         (__libc_use_alloca) [!defined _LIBC]: New macro.
18817         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
18818         now works outside glibc.
18819
18820 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18821
18822         * config/srclist.txt: Add glibc bugs 1241, 1245.
18823
18824 2005-08-25  Jim Meyering  <jim@meyering.net>
18825
18826         * lib/open-safer.c: Include <config.h>.
18827         Otherwise, we'd lose LARGEFILE support in any file using
18828         e.g. "fcntl--.h"
18829
18830 2005-08-25  Bruno Haible  <bruno@clisp.org>
18831
18832         * m4/minmax.m4: Require autoconf 2.52.
18833         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
18834         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
18835         alternatives of translit over the alphabet.
18836         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
18837
18838 2005-08-24  Simon Josefsson  <jas@extundo.com>
18839
18840         * tests/test-getpass.c: New file.
18841
18842 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18843
18844         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
18845         for GNU regex features.
18846
18847 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18848
18849         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
18850         * lib/regex.h (regerror): Likewise.
18851
18852         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
18853         requires this.  (The code never needed it.)
18854
18855         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
18856         All uses of recently-renamed identifiers changed to use the new,
18857         POSIX-compliant names.  The code will build and run just fine
18858         without these changes, but it's better to eat our own dog food
18859         and use the standard-conforming names.
18860
18861         * lib/regex.h: Fix a multitude of POSIX name space violations.
18862         These changes have an effect only for programs that define
18863         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
18864         do not change anything for programs compiled in the normal way.
18865         Also, there is no effect on the ABI.
18866
18867         (_REGEX_SOURCE): New macro.
18868         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
18869         defined and _GNU_SOURCE is not; this fixes a name space violation.
18870
18871         Rename the following macros to obey POSIX requirements.
18872         The old names are still visible as macros if _REGEX_SOURCE is defined.
18873         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
18874         RE_BACKSLASH_ESCAPE_IN_LISTS.
18875         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
18876         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
18877         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
18878         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
18879         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
18880         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
18881         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
18882         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
18883         (REG_INTERVALS): renamed from RE_INTERVALS.
18884         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
18885         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
18886         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
18887         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
18888         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
18889         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
18890         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
18891         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
18892         RE_UNMATCHED_RIGHT_PAREN_ORD.
18893         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
18894         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
18895         (REG_DEBUG): renamed from RE_DEBUG.
18896         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
18897         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
18898         unusual, since we can't clash with the POSIX REG_ICASE.
18899         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
18900         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
18901         (REG_NO_SUB): renamed from RE_NO_SUB.
18902         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
18903         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
18904         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
18905         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
18906         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
18907         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
18908         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
18909         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
18910         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
18911         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
18912         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
18913         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
18914         RE_SYNTAX_POSIX_MINIMAL_BASIC.
18915         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
18916         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
18917         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
18918         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
18919         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
18920         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
18921         (REG_FIXED): Renamed from REGS_FIXED.
18922         (REG_NREGS): Renamed from RE_NREGS.
18923
18924         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
18925         of other REG_* macros, since POSIX says the user is allowed to
18926         #undef these macros selectively.
18927
18928         (reg_errcode_t): Update comment stating what other tables need
18929         to be consistent.
18930
18931         Rename the following enum values to obey POSIX requirements.
18932         The old names are still visible as macros.
18933         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
18934         is not defined, since GNU is supposed to be a superset of POSIX as
18935         much as possible, and since we want reg_errcode_t to be a signed
18936         type for implementation consistency.
18937         (_REG_NOERROR): Renamed from REG_NOERROR.
18938         (_REG_NOMATCH): Renamed from REG_NOMATCH.
18939         (_REG_BADPAT): Renamed from REG_BADPAT.
18940         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
18941         (_REG_ECTYPE): Renamed from REG_ECTYPE.
18942         (_REG_EESCAPE): Renamed from REG_EESCAPE.
18943         (_REG_ESUBREG): Renamed from REG_ESUBREG.
18944         (_REG_EBRACK): Renamed from REG_EBRACK.
18945         (_REG_EPAREN): Renamed from REG_EPAREN.
18946         (_REG_EBRACE): Renamed from REG_EBRACE.
18947         (_REG_BADBR): Renamed from REG_BADBR.
18948         (_REG_ERANGE): Renamed from REG_ERANGE.
18949         (_REG_ESPACE): Renamed from REG_ESPACE.
18950         (_REG_BADRPT): Renamed from REG_BADRPT.
18951         (_REG_EEND): Renamed from REG_EEND.
18952         (_REG_ESIZE): Renamed from REG_ESIZE.
18953         (_REG_ERPAREN): Renamed from REG_ERPAREN.
18954         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
18955         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
18956         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
18957         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
18958
18959         (_REG_RE_NAME, _REG_RM_NAME): New macros.
18960         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
18961         changed.  But support the old name if the new one is not defined
18962         and if _REGEX_SOURCE.
18963
18964         Change the following member names in struct re_pattern_buffer.
18965         The old names are still supported if !_REGEX_SOURCE.
18966         The new names are always supported, regardless of _REGEX_SOURCE.
18967         (re_buffer): Renamed from buffer.
18968         (re_allocated): Renamed from allocated.
18969         (re_used): Renamed from used.
18970         (re_syntax): Renamed from syntax.
18971         (re_fastmap): Renamed from fastmap.
18972         (re_translate): Renamed from translate.
18973         (re_can_be_null): Renamed from can_be_null.
18974         (re_regs_allocated): Renamed from regs_allocated.
18975         (re_fastmap_accurate): Renamed from fastmap_accurate.
18976         (re_no_sub): Renamed from no_sub.
18977         (re_not_bol): Renamed from not_bol.
18978         (re_not_eol): Renamed from not_eol.
18979         (re_newline_anchor): Renamed from newline_anchor.
18980
18981         Change the following member names in struct re_registers.
18982         The old names are still supported if !_REGEX_SOURCE.
18983         The new names are always supported, regardless of _REGEX_SOURCE.
18984         (rm_num_regs): Renamed from num_regs.
18985         (rm_start): Renamed from start.
18986         (rm_end): Renamed from end.
18987
18988         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
18989         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
18990         Prepend __ to parameter names.
18991
18992         Undo yesterday's changes.
18993
18994 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18995
18996         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
18997         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
18998         lib/regex.c.
18999
19000 2005-08-24  Jim Meyering  <jim@meyering.net>
19001
19002         Sync from coreutils.
19003         * m4/fcntl-safer.m4: New file.
19004
19005         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
19006         and object files for this module.
19007
19008 2005-08-24  Jim Meyering  <jim@meyering.net>
19009
19010         Sync from coreutils.
19011         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
19012
19013 2005-08-24  Jim Meyering  <jim@meyering.net>
19014
19015         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
19016         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
19017
19018 2005-08-24  Jim Meyering  <jim@meyering.net>
19019
19020         * modules/fcntl-safer: New module.
19021         * modules/fts (Depends-on): Add fcntl-safer.
19022         * MODULES.html.sh (File descriptor based Input/Output):
19023         Add fcntl-safer.
19024
19025 2005-08-24  Bruno Haible  <bruno@clisp.org>
19026
19027         Support for unit test modules.
19028         * modules/README: Mention tests modules.
19029         * modules/TEMPLATE-TESTS: New file.
19030         * gnulib-tool: New options --extract-tests-module, --with-tests and
19031         --tests-base (unused for the moment).
19032         (testsbase, inctests): New variables.
19033         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
19034         (func_verify_module): Exclude TEMPLATE-TESTS.
19035         (func_verify_nontests_module, func_verify_tests_module): New functions.
19036         (func_get_dependencies): Add implicit dependency for tests modules.
19037         (func_get_tests_module): New function.
19038         (func_modules_transitive_closure): When --with-tests was specified,
19039         include the unit tests as well, unless explicitly avoided.
19040         (func_emit_lib_Makefile_am): Ignore the tests modules here.
19041         (func_emit_tests_Makefile_am): New function.
19042         (func_create_testdir): When --with-tests was specified, emit a
19043         tests/ directory.
19044         * MODULES.html.sh (Future developments): Update.
19045
19046 2005-08-24  Bruno Haible  <bruno@clisp.org>
19047
19048         * modules/tls-tests: New file.
19049         * tests/test-tls.c: New file, from GNU gettext.
19050
19051 2005-08-24  Bruno Haible  <bruno@clisp.org>
19052
19053         * modules/lock-tests: New file.
19054         * tests/test-lock.c: New file, from GNU gettext.
19055
19056 2005-08-24  Bruno Haible  <bruno@clisp.org>
19057
19058         * lib/lock.h: Add multiple inclusion guard.
19059         * lib/tls.h: Add multiple inclusion guard.
19060
19061 2005-08-24  Bruno Haible  <bruno@clisp.org>
19062
19063         * gnulib-tool: Add support for the --aux-dir option to
19064         --create-testdir, --create-megatestdir, --test, --megatest.
19065         (func_create_testdir, func_create_megatestdir): Optionally emit a
19066         AC_CONFIG_AUX_DIR directive.
19067         (create-testdir, create-megatestdir, test, megatest): Provide a
19068         default value for $auxdir.
19069
19070 2005-08-24  Bruno Haible  <bruno@clisp.org>
19071
19072         * gnulib-tool (import): Use compound statement instead of subshell
19073         where possible.
19074
19075 2005-08-24  Bruno Haible  <bruno@clisp.org>
19076
19077         * gnulib-tool (import): Change --aux-dir default to "build-aux".
19078
19079 2005-08-24  Bruno Haible  <bruno@clisp.org>
19080
19081         * gnulib-tool (func_version): Update.
19082
19083 2005-08-24  Bruno Haible  <bruno@clisp.org>
19084
19085         * gnulib-tool (func_import, func_create_testdir,
19086         func_create_megatestdir): Quote all autoconf macro arguments.
19087
19088 2005-08-24  Bruno Haible  <bruno@clisp.org>
19089
19090         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
19091         option --force, because --force causes the aclocal.m4 of each
19092         subdirectory to be newer than the corresponding config.h.in.
19093
19094 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19095
19096         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
19097         All contents moved to gl_REGEX.
19098         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
19099         assume that it does.
19100
19101 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19102
19103         * lib/regex.h (REG_NOSYS)
19104         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
19105         Define, since POSIX requires it as of 2001.
19106         (_REG_ENOSYS)
19107         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
19108         New private symbol, used to keep the enum signed in all cases.
19109         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
19110         Youngman in
19111         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
19112
19113         * lib/regex_internal.c (re_string_skip_chars, register_state):
19114         (calc_state_hash):
19115         Remove forward decls; no longer needed now that we use prototypes.
19116         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
19117         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
19118         (clean_state_log_if_needed): Likewise.
19119
19120 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19121
19122         * config/srclist.txt: Add glibc bugs 1231-1233.
19123
19124 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19125
19126         Fix problems reported by Sam Steingold in
19127         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
19128         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
19129         assumed that reg_errcode_t is a signed type, which is not
19130         necessarily true if _XOPEN_SOURCE is not defined.
19131         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
19132         since some compilers warn about it otherwise.
19133
19134 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19135
19136         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
19137         (init_word_char, create_initial_state, duplicate_node_closure):
19138         (fetch_token, peek_token_bracket, build_range_exp):
19139         (build_collating_symbol): Remove forward decls; no longer needed
19140         now that we use prototypes.
19141
19142         * lib/regcomp.c:
19143         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
19144         (re_compile_fastmap_iter, regcomp, regerror, regfree):
19145         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
19146         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
19147         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
19148         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
19149         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
19150         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
19151         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
19152         (build_range_exp, build_collating_symbol, parse_bracket_exp):
19153         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
19154         (build_charclass, build_charclass_op, fetch_number, create_tree):
19155         (create_token_tree, mark_opt_subexp, duplicate_tree):
19156         Use prototypes rather than old-style definitions.
19157
19158         * lib/regex_internal.c:
19159         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
19160         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
19161         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
19162         (re_string_reconstruct, re_string_peek_byte_case):
19163         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
19164         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
19165         (re_node_set_init_copy, re_node_set_add_intersect):
19166         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
19167         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
19168         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
19169         (re_acquire_state, re_acquire_state_context, register_state):
19170         (create_ci_newstate, create_cd_newstate, free_state):
19171         Likewise.
19172         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
19173         re_search_2):
19174         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
19175         (re_search_internal, prune_impossible_nodes):
19176         (acquire_init_state_context, check_matching, static):
19177         (check_halt_node_context, check_halt_state_context, proceed_next_node):
19178         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
19179         (update_regs, sift_states_backward, build_sifted_states):
19180         (clean_state_log_if_needed, merge_state_array):
19181         (update_cur_sifted_state, add_epsilon_src_nodes):
19182         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
19183         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
19184         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
19185         (find_recover_state, check_subexp_matching_top, transit_state_mb):
19186         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
19187         (check_arrival, check_arrival_add_next_nodes):
19188         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
19189         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
19190         (check_node_accept_bytes, check_node_accept, extend_buffers):
19191         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
19192         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
19193         (sift_ctx_init):
19194         Likewise.
19195
19196         * lib/regex_internal.h:
19197         (re_string_allocate, re_string_construct, re_string_reconstruct):
19198         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
19199         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
19200         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
19201         (re_string_context_at, re_string_peek_byte_case):
19202         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
19203         is defined, since we now use prototypes always.
19204
19205         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
19206         C89 or better.  All uses removed.
19207
19208 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19209
19210         * config/srclist.txt: Add glibc bugs 1220-1227.
19211
19212 2005-08-20  Jim Meyering  <jim@meyering.net>
19213
19214         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
19215         of unused local, dfa.
19216
19217 2005-08-20  Bruno Haible  <bruno@clisp.org>
19218
19219         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
19220
19221 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19222
19223         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
19224         (re_node_set_insert_last, re_dfa_add_node):
19225         Rename local variables to avoid GCC shadowing warnings.
19226
19227 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19228
19229         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
19230         [defined lint]: Suppress bogus uninitialized-variable warnings.
19231
19232         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
19233         and let the caller return REG_ESPACE if out of space.  This
19234         removes an uninitialied-variable warning with GCC 4.0.1, and also
19235         avoids taking the address of a local variable.  All callers
19236         changed.
19237
19238 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19239
19240         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
19241         $LIBCSRC/posix/regexec.c.
19242         Add glibc bug 1217 for regcomp.c.
19243
19244 2005-08-19  Jim Meyering  <jim@meyering.net>
19245
19246         * lib/regexec.c (proceed_next_node): Redo local variables to
19247         avoid GCC shadowing warnings.
19248
19249 2005-08-18  Bruno Haible  <bruno@clisp.org>
19250
19251         * lib/strstr.c (strstr): Fix return value in multibyte case.
19252         * lib/strcasestr.c (strcasestr): Likewise.
19253
19254 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
19255
19256         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
19257
19258 2005-08-17  Jim Meyering  <jim@meyering.net>
19259
19260         Make the %s format (seconds since the epoch) work for a negative
19261         number and when used with a zero-padded field width, e.g. %015s.
19262
19263         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
19264         label so that it precedes the code to set `digits'.  Otherwise,
19265         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
19266         print `00-22'.  Now, it prints `-0022', as it should.
19267
19268 2005-08-17  Bruno Haible  <bruno@clisp.org>
19269
19270         * modules/strstr (Files): Add m4/mbrtowc.m4.
19271         (Depends-on): Add mbuiter.
19272
19273 2005-08-17  Bruno Haible  <bruno@clisp.org>
19274
19275         * modules/strcasestr: New file.
19276         * MODULES.html.sh (String handling, based on ANSI C 89): Add
19277         strcasestr.
19278
19279 2005-08-17  Bruno Haible  <bruno@clisp.org>
19280
19281         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
19282
19283 2005-08-17  Bruno Haible  <bruno@clisp.org>
19284
19285         * modules/mbuiter: New file.
19286         * MODULES.html.sh (Extended multibyte and wide character utilities):
19287         Add mbuiter.
19288
19289 2005-08-17  Bruno Haible  <bruno@clisp.org>
19290
19291         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
19292         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
19293
19294 2005-08-17  Bruno Haible  <bruno@clisp.org>
19295
19296         * m4/strcasestr.m4: New file.
19297
19298 2005-08-17  Bruno Haible  <bruno@clisp.org>
19299
19300         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
19301         * lib/strstr.c: Completely rewritten, with multibyte locale support.
19302
19303 2005-08-17  Bruno Haible  <bruno@clisp.org>
19304
19305         * lib/strcasestr.h: New file.
19306         * lib/strcasestr.c: New file.
19307
19308 2005-08-17  Bruno Haible  <bruno@clisp.org>
19309
19310         * lib/strcasecmp.c: Use mbuiter.h.
19311
19312 2005-08-17  Bruno Haible  <bruno@clisp.org>
19313
19314         * lib/mbuiter.h: New file.
19315
19316 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
19317
19318         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
19319         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
19320         and gl_GETOPT are both invoked via different paths (as happens
19321         with GNU tar CVS because it uses both argp and getopt), the former
19322         wins.
19323
19324 2005-08-16  Bruno Haible  <bruno@clisp.org>
19325
19326         * modules/tls: New file.
19327         * MODULES.html.sh (Multithreading): Add tls.
19328
19329 2005-08-16  Bruno Haible  <bruno@clisp.org>
19330
19331         * modules/strnlen1: New file.
19332         * MODULES.html.sh (String handling): Add strnlen1.
19333
19334 2005-08-16  Bruno Haible  <bruno@clisp.org>
19335
19336         * modules/strcase (Files): Add m4/mbrtowc.m4.
19337         (Depends-on): Add strnlen1, mbchar.
19338
19339 2005-08-16  Bruno Haible  <bruno@clisp.org>
19340
19341         * modules/mbiter: New file.
19342         * MODULES.html.sh (Extended multibyte and wide character utilities):
19343         Add mbiter.
19344
19345 2005-08-16  Bruno Haible  <bruno@clisp.org>
19346
19347         * modules/mbfile: New file.
19348         * MODULES.html.sh (Extended multibyte and wide character utilities):
19349         Add mbfile.
19350
19351 2005-08-16  Bruno Haible  <bruno@clisp.org>
19352
19353         * modules/mbchar: New file.
19354         * MODULES.html.sh (Extended multibyte and wide character utilities):
19355         New section.
19356
19357 2005-08-16  Bruno Haible  <bruno@clisp.org>
19358
19359         * m4/tls.m4: New file, from GNU gettext.
19360
19361 2005-08-16  Bruno Haible  <bruno@clisp.org>
19362
19363         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
19364         always.
19365         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
19366
19367 2005-08-16  Bruno Haible  <bruno@clisp.org>
19368
19369         * m4/mbiter.m4: New file.
19370
19371 2005-08-16  Bruno Haible  <bruno@clisp.org>
19372
19373         * m4/mbfile.m4: New file.
19374
19375 2005-08-16  Bruno Haible  <bruno@clisp.org>
19376
19377         * m4/mbchar.m4: New file.
19378
19379 2005-08-16  Bruno Haible  <bruno@clisp.org>
19380
19381         * lib/tls.h: New file, from GNU gettext.
19382         * lib/tls.c: New file, from GNU gettext.
19383
19384 2005-08-16  Bruno Haible  <bruno@clisp.org>
19385
19386         * lib/strnlen1.h: New file.
19387         * lib/strnlen1.c: New file.
19388
19389 2005-08-16  Bruno Haible  <bruno@clisp.org>
19390
19391         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
19392         (mbi_init): Update.
19393         (mbi_avail, mbi_advance): Let the iteration end before the terminating
19394         NUL byte, not after it.
19395
19396 2005-08-16  Bruno Haible  <bruno@clisp.org>
19397
19398         * lib/strcase.h (strcasecmp): Add note in comments.
19399         * lib/strncasecmp.c: Use code from strcasecmp.c.
19400         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
19401         (strcasecmp): Work correctly in multibyte locales.
19402
19403 2005-08-16  Bruno Haible  <bruno@clisp.org>
19404
19405         * lib/mbiter.h: New file.
19406
19407 2005-08-16  Bruno Haible  <bruno@clisp.org>
19408
19409         * lib/mbfile.h: New file.
19410
19411 2005-08-16  Bruno Haible  <bruno@clisp.org>
19412
19413         * lib/mbchar.h: New file.
19414         * lib/mbchar.c: New file.
19415
19416 2005-08-16  Bruno Haible  <bruno@clisp.org>
19417
19418         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
19419         the valid ones. Makes the comparison operations transitive:
19420         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
19421         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
19422
19423 2005-08-15  Simon Josefsson  <jas@extundo.com>
19424
19425         * modules/ssize_t (License): Change to 'unlimited'.
19426
19427         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
19428
19429 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
19430
19431         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
19432         Add comments for each pending glibc patch.
19433
19434 2005-08-15  Bruno Haible  <bruno@clisp.org>
19435
19436         * lib/regex.h (__restrict_arr): Don't define to __restrict if
19437         __cplusplus is defined.
19438
19439 2005-08-14  Jim Meyering  <jim@meyering.net>
19440
19441         Sync from coreutils.
19442
19443         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
19444         Use the hash-table-based cycle-detection code not just when
19445         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
19446         Reported by James Youngman in
19447         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
19448         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
19449         FTS_TIGHT_CYCLE_CHECK.
19450         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
19451         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
19452         once again.
19453         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
19454         * lib/fts.c (fd_safer): Remove decl.
19455         Include fcntl--.h rather than unistd-safer.h
19456         (fts_safe_changedir): Don't call fd_safer; no longer needed
19457         now that we include fcntl--.h.
19458
19459 2005-08-12  Simon Josefsson  <jas@extundo.com>
19460
19461         * modules/getndelim2: Use ssize_t module.
19462         * modules/getnline: Likewise.
19463         * modules/safe-read: Likewise.
19464         * modules/xreadlink: Likewise.
19465
19466         * modules/ssize_t: New file.
19467
19468 2005-08-12  Simon Josefsson  <jas@extundo.com>
19469
19470         * m4/readline.m4: Look for termcap, curses or ncurses if required.
19471
19472 2005-08-12  Simon Josefsson  <jas@extundo.com>
19473
19474         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19475         ssize_t.
19476
19477 2005-08-12  Simon Josefsson  <jas@extundo.com>
19478
19479         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
19480         readline, getdelim and check_version.
19481         (Support for systems lacking ISO C 99: Sizes of integer types):
19482         Add size_max.
19483
19484 2005-08-12  Bruno Haible  <bruno@clisp.org>
19485
19486         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
19487
19488 2005-08-11  Simon Josefsson  <jas@extundo.com>
19489
19490         * modules/readline: New file.
19491
19492         * modules/strnlen (Files): Add strnlen.h.
19493
19494 2005-08-11  Simon Josefsson  <jas@extundo.com>
19495
19496         * m4/readline.m4: New file.
19497
19498 2005-08-11  Simon Josefsson  <jas@extundo.com>
19499
19500         * lib/readline.h, readline.c: New file.
19501
19502 2005-08-11  Simon Josefsson  <jas@extundo.com>
19503
19504         * doc/gnulib.texi (Initial import, Finishing touches): Mention
19505         gl_AVOID.
19506
19507 2005-08-11  Bruno Haible  <bruno@clisp.org>
19508
19509         * lib/strnlen.h (strnlen): Change parameter name to match comment.
19510
19511 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
19512
19513         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
19514
19515 2005-08-10  Simon Josefsson  <jas@extundo.com>
19516
19517         * tests/test-iconvme.c: New file.
19518
19519 2005-08-10  Simon Josefsson  <jas@extundo.com>
19520
19521         * m4/strnlen.m4: New file.
19522
19523         * m4/strndup.m4: Don't check for strnlen declaration, done in
19524         strnlen.m4.
19525
19526 2005-08-10  Simon Josefsson  <jas@extundo.com>
19527
19528         * lib/strndup.c: Use strnlen.h.
19529
19530         * lib/strnlen.h: New file.
19531
19532 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
19533
19534         * README: Typos.
19535
19536 2005-08-02  Simon Josefsson  <jas@extundo.com>
19537
19538         * modules/readline: New file.
19539
19540 2005-08-02  Simon Josefsson  <jas@extundo.com>
19541
19542         * modules/getdelim: New file.
19543
19544         * modules/getline: Rewrite, don't use getndelim2.
19545
19546 2005-08-02  Simon Josefsson  <jas@extundo.com>
19547
19548         * m4/getline.m4: Separate out getdelim stuff into separate module.
19549
19550         * m4/getdelim.m4: New file.
19551
19552 2005-08-02  Simon Josefsson  <jas@extundo.com>
19553
19554         * lib/getline.h, getline.c: Rewrite.
19555
19556         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
19557
19558 2005-07-31  Bruno Haible  <bruno@clisp.org>
19559
19560         * lib/lock.h (gl_lock_initializer): New macro.
19561         (gl_lock_define_initialized): Use it.
19562         (gl_rwlock_initializer): New macro.
19563         (gl_rwlock_define_initialized): Use it.
19564         (gl_recursive_lock_initializer): New macro.
19565         (gl_recursive_lock_define_initialized): Use it.
19566
19567 2005-07-30  Karl Berry  <karl@gnu.org>
19568
19569         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
19570         Report from Ben Pfaff, regarding getopt.
19571
19572 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
19573
19574         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
19575         normal way.
19576         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
19577         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
19578         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
19579         (gl_GETOPT): Use the new macros.  Most of the implementation
19580         is moved to the new macros.  This is for programs like Emacs
19581         that don't want all the functionality of gl_GETOPT.
19582
19583 2005-07-26  Bruno Haible  <bruno@clisp.org>
19584
19585         * m4/lock.m4: Update from GNU gettext.
19586
19587 2005-07-26  Bruno Haible  <bruno@clisp.org>
19588
19589         * lib/lock.h: Update from GNU gettext.
19590         * lib/lock.c: Update from GNU gettext.
19591
19592 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
19593
19594         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
19595         obsolescent AC_TRY_RUN.  Include the default includes files, for
19596         'exit'.
19597
19598 2005-07-24  Bruno Haible  <bruno@clisp.org>
19599
19600         * modules/visibility: New file.
19601         * MODULES.html.sh (Misc): Add visibility.
19602
19603 2005-07-24  Bruno Haible  <bruno@clisp.org>
19604
19605         * m4/visibility.m4: New file.
19606
19607 2005-07-24  Bruno Haible  <bruno@clisp.org>
19608
19609         * doc/visibility.texi: New file.
19610
19611 2005-07-22  Bruno Haible  <bruno@clisp.org>
19612
19613         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
19614         $(ALLOCA_H), redundant through BUILT_SOURCES.
19615         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
19616         redundant through BUILT_SOURCES.
19617         * modules/byteswap (Makefile.am): Remove explicit dependency on
19618         $(BYTESWAP_H), redundant through BUILT_SOURCES.
19619         * modules/fnmatch (Makefile.am): Remove explicit dependency on
19620         $(FNMATCH_H), redundant through BUILT_SOURCES.
19621         * modules/getopt (Makefile.am): Remove explicit dependency on
19622         $(GETOPT_H), redundant through BUILT_SOURCES.
19623         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
19624         redundant through BUILT_SOURCES.
19625         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
19626         redundant through BUILT_SOURCES.
19627         * modules/stdbool (Makefile.am): Remove explicit dependency on
19628         $(STDBOOL_H), redundant through BUILT_SOURCES.
19629         * modules/stdint (Makefile.am): Remove explicit dependency on
19630         $(STDINT_H), redundant through BUILT_SOURCES.
19631         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
19632         Remove explicit dependency on $(SYSEXITS_H).
19633         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
19634
19635 2005-07-18  Simon Josefsson  <jas@extundo.com>
19636
19637         * lib/check-version.c (check_version): Accept identical versions too.
19638
19639 2005-07-18  Bruno Haible  <bruno@clisp.org>
19640
19641         * modules/lock: New file.
19642         * MODULES.html.sh (Multithreading): New section.
19643
19644 2005-07-18  Bruno Haible  <bruno@clisp.org>
19645
19646         * m4/lock.m4: New file, from GNU gettext.
19647
19648 2005-07-18  Bruno Haible  <bruno@clisp.org>
19649
19650         * lib/lock.h: New file, from GNU gettext.
19651         * lib/lock.c: New file, from GNU gettext.
19652
19653 2005-07-18  Bruno Haible  <bruno@clisp.org>
19654
19655         * lib/lock.h (gl_once_t): New type.
19656         (gl_once_define, gl_once): New macros.
19657         * lib/lock.c (fresh_once): New variable.
19658         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
19659         functions.
19660
19661 2005-07-16  Simon Josefsson  <jas@extundo.com>
19662
19663         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
19664         workaround, suggested by Bruno.
19665
19666 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19667
19668         * modules/xalloc (Depends-on): Add xalloc-die.
19669         * modules/xvasprintf (Depends-on): Add xalloc-die.
19670
19671 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19672
19673         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
19674         with a minor change.
19675
19676 2005-07-15  Bruno Haible  <bruno@clisp.org>
19677
19678         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
19679         When using lib/poll.c, define poll as rpl_poll.
19680
19681 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
19682
19683         * modules/argp (Depends-on): Remove unlocked-io.
19684
19685 2005-07-14  Derek Price  <derek@ximbiot.com>
19686
19687         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
19688         for glob symlink bug.
19689
19690 2005-07-14  Bruno Haible  <bruno@clisp.org>
19691
19692         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
19693         Instead, test for *_unlocked function declarations directly.
19694
19695 2005-07-11  Simon Josefsson  <jas@extundo.com>
19696
19697         * modules/size_max: New file.
19698
19699         * modules/xsize: Depend on size_max module for size_max.m4.
19700
19701 2005-07-11  Simon Josefsson  <jas@extundo.com>
19702
19703         * lib/size_max.h: New file.
19704
19705 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
19706
19707         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
19708         copyright symbol and the year.
19709         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
19710         (version_etc_va): Use parameterized copyright notice.
19711         Reword to conform to the current GNU coding standards.
19712
19713 2005-07-11  Karl Berry  <karl@gnu.org>
19714
19715         * doc/gnulib.texi (Quoting): new node.
19716         (Initial import): more info, from Patrice.
19717
19718 2005-07-11  Bruno Haible  <bruno@clisp.org>
19719
19720         * gnulib-tool (func_usage): Document option --avoid.
19721         (Command line options): Handle --avoid.
19722         (func_acceptable): New function.
19723         (func_modules_transitive_closure): Use it.
19724
19725 2005-07-11  Bruno Haible  <bruno@clisp.org>
19726
19727         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
19728         Reported by Jim Meyering.
19729
19730 2005-07-10  Bruno Haible  <bruno@clisp.org>
19731
19732         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
19733         Needed when size_t is smaller than 'unsigned int'.
19734         Reported by Paul Eggert.
19735
19736 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19737
19738         * modules/argp (Depends-on): Add unlocked-io
19739
19740 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19741
19742         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
19743         block of defines.
19744
19745 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
19746
19747         * config/srclist.txt: Comment out regcomp.c, since we have a porting
19748         fix now.
19749
19750 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
19751         and Paul Eggert  <eggert@cs.ucla.edu>
19752
19753         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
19754         in wint_t, not wchar_t.  Remove now-unnecessary cast.
19755
19756 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19757
19758         * modules/regex (Files): Add lib/regex_internal.c,
19759         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
19760         (Depends-on): Add extensions.
19761         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
19762
19763 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19764
19765         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
19766         pathconf.
19767         * m4/same.m4 (gl_SAME): Likewise.
19768         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
19769
19770         * m4/regex.m4: Adjust to new libc regex implementation.
19771         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
19772         all the .c and .h parts of (the new) regex.
19773         Quote the m4 stuff better.
19774         Check for RE_ICASE bug of old gnulib.
19775         Check for REG_STARTEND of recent libc.
19776         Rename local variables from jm_* to gl_*.
19777         Quote operand of "test -f".
19778         Say "recent enough" version of libc, not "version 2".
19779         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
19780         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
19781         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
19782         Remove check for btowc, isascii.
19783         Require AM_LANGINFO_CODESET.
19784
19785 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19786
19787         * lib/regex.c, regex.h: Sync from libc.
19788         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
19789         * lib/regexec.c:
19790         New files, synced from libc, except that regex_internal.h
19791         currently has a small porting fix.
19792
19793 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19794
19795         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
19796         regex_internal.c, regexec.c.
19797         Add regex_internal.h too, but as a comment, since the libc version
19798         is currently broken in gnulib mode.
19799
19800 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
19801
19802         Support programs like Emacs that use gnulib but not gettext.
19803         * MODULES.html.sh (Internationalization functions): Add gettext-h.
19804         * modules/gettext-h: New file.
19805         * modules/gettext (Files): Remove lib/gettext.h.
19806         (Depends-on): Add gettext-h.
19807         (Makefile.am): Remove lib_SOURCES.
19808         * modules/argmatch, modules/c-stack, modules/closeout:
19809         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
19810         * modules/execute, modules/file-type, modules/getaddrinfo:
19811         * modules/getopt, modules/human, modules/javacomp:
19812         * modules/javaexec, modules/mkdir-p, modules/obstack:
19813         * modules/openat, modules/pagealign_alloc, modules/pipe:
19814         * modules/quotearg, modules/regex, modules/rpmatch:
19815         * modules/unicodeio, modules/userspec, modules/version-etc:
19816         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
19817         * modules/xsetenv:
19818         Depend on gettext-h, not gettext.
19819
19820 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
19821
19822         * gnulib-tool (func_import): Add support for 'public domain' license.
19823         * modules/alloca, modules/atexit, modules/memmove:
19824         Now public domain, not GPL.
19825         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
19826         * modules/realloc, modules/strerror, modules/strtod:
19827         Now LGPL, not GPL.
19828
19829 2005-07-05  Bruno Haible  <bruno@clisp.org>
19830
19831         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
19832         autoconf CVS. Needed for mingw.
19833
19834 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19835
19836         Remove the dependency of the strftime module on the tzset module.
19837         * modules/strftime (Depends-on): Remove dependency on tzset.
19838
19839 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19840
19841         Remove the dependency of the strftime module on the tzset module.
19842         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
19843         gl_FUNC_TZSET_CLOBBER.
19844
19845 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19846
19847         Remove the dependency of the strftime module on the tzset module.
19848         * lib/strftime.c (my_strftime)
19849         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
19850         Copy the input structure, to work around some of the bug with
19851         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
19852         Solaris releases, you should also use the tzset module, but we won't
19853         require it as a dependency any more since we don't want LGPLed code
19854         to depend on GPLed code.
19855
19856 2005-07-02  Jim Meyering  <jim@meyering.net>
19857
19858         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
19859         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
19860         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
19861         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
19862
19863 2005-07-02  Jim Meyering  <jim@meyering.net>
19864
19865         * lib/backupfile.c (backup_args): Change a `0' to NULL.
19866
19867 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
19868
19869         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
19870         declares only 'struct timespec;' (!).
19871
19872 2005-07-01  Jim Meyering  <jim@meyering.net>
19873
19874         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
19875         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
19876         * lib/save-cwd.c, tempname.c:
19877         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
19878         and don't include <sys/file.h>).
19879
19880 2005-06-29  Jim Meyering  <jim@meyering.net>
19881
19882         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
19883         type name.  Use the variable name instead.
19884         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
19885         Likewise.
19886
19887 2005-06-28  Simon Josefsson  <jas@extundo.com>
19888
19889         * modules/check-version (Files): Add check-version.m4.
19890
19891 2005-06-28  Simon Josefsson  <jas@extundo.com>
19892
19893         * m4/check-version.m4: New file, suggested by Jim Meyering
19894         <jim@meyering.net>.
19895
19896 2005-06-28  Simon Josefsson  <jas@extundo.com>
19897
19898         * lib/check-version.h, lib/check-version.c: New files.
19899
19900 2005-06-28  Simon Josefsson  <jas@extundo.com>
19901
19902         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
19903         collision with global variable.  Better indentation.  Don't
19904         increment buffer pointer beyond buffer end.  Based on comments
19905         from Paul Eggert <eggert@cs.ucla.edu>.
19906
19907         * lib/base64.h: Indent.
19908
19909 2005-06-28  Simon Josefsson  <jas@extundo.com>
19910
19911         * doc/gnulib.texi (Library version handling): New section.
19912
19913 2005-06-28  Jim Meyering  <jim@meyering.net>
19914
19915         * check-module (find_included_lib_files): Hard-code another
19916         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
19917         but modules/fts-lgpl (correctly) does not list those files.
19918
19919         * modules/canonicalize (Files): Add lib/pathmax.h.
19920
19921 2005-06-25  Simon Josefsson  <jas@extundo.com>
19922
19923         * modules/check-version: New file.
19924
19925 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
19926
19927         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
19928         initializer of struct addrinfo, as an indication that we don't
19929         care how many members the structure has.
19930
19931 2005-06-24  Derek Price  <derek@ximbiot.com>
19932         and Bruno Haible  <bruno@clisp.org>
19933
19934         Remove stat module & update lstat.
19935         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
19936         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
19937         * m4/stat.m4: Remove this file.
19938
19939 2005-06-24  Derek Price  <derek@ximbiot.com>
19940         and Bruno Haible  <bruno@clisp.org>
19941
19942         Remove stat module & update lstat.
19943         * lib/stat.c: Remove this file...
19944         (slash_aware_lstat): ...moving this content and its support...
19945         * lib/lstat.c (rpl_lstat): ...into here.
19946         * lib/lstat.h: New file.
19947
19948 2005-06-24  Derek Price  <derek@ximbiot.com>
19949         and Bruno Haible  <bruno@clisp.org>
19950
19951         Remove stat module & update lstat.
19952         * config/srclist.txt (libc sources): Remove stat.
19953
19954 2005-06-24  Derek Price  <derek@ximbiot.com>
19955         and Bruno Haible  <bruno@clisp.org>
19956
19957         Remove stat module & update lstat.
19958         * MODULES.html.sh (stat): Remove.
19959         * MODULES.html: Regenerated.
19960         * modules/lstat (Description): Correct function name.
19961         (Files): Add "lstat.h".
19962         (Depends-on): Remove stat, add xalloc, stat-macros.
19963         * modules/stat: Remove this file.
19964         (Include): Add "lstat.h", remove <sys/stat.h>.
19965
19966 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
19967
19968         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
19969         (ranged_convert): Don't save conversion in a temporary struct.
19970         This causes a warning with GCC 4.0.0, and anyway in the typical
19971         case it's not worth the extra 100 bytes or so of code.
19972         (ranged_convert, __mktime_internal): When calling a function via a
19973         pointer P, use P () rather than (*P) (), as we now assume C89 or
19974         better.
19975
19976 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19977
19978         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
19979         "who -r" failed to give output.  Problem reported by Tim Waugh.
19980
19981         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
19982         (xcalloc): Use it to avoid needless tests.
19983         Problem reported by Jim Meyering.
19984
19985 2005-06-20  Derek Price  <derek@ximbiot.com>
19986
19987         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
19988         unnecessary for Autoconfs > 2.59c.
19989
19990 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19991
19992         * lib/argp.h (__option_is_short): Check upper limit of
19993         __key. Isprint() requires its argument to have the value
19994         of an unsigned char or EOF.
19995
19996 2005-06-16  Jim Meyering  <jim@meyering.net>
19997
19998         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
19999         when either N or S is zero.
20000
20001 2005-06-16  Derek Price  <derek@ximbiot.com>
20002
20003         * m4/bison.m4: Declare YACC & YFLAGS precious.
20004
20005 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
20006
20007         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
20008         multibyte string or pattern, fall back on unibyte matching.
20009         Problem reported by James Youngman.
20010
20011 2005-06-08  Bruno Haible  <bruno@clisp.org>
20012
20013         * modules/csharpcomp: New file.
20014         * MODULES.html.sh (C#): Add csharpcomp.
20015
20016 2005-06-08  Bruno Haible  <bruno@clisp.org>
20017
20018         * m4/csharpcomp.m4: New file, from GNU gettext.
20019
20020 2005-06-08  Bruno Haible  <bruno@clisp.org>
20021
20022         * lib/csharpcomp.h: New file, from GNU gettext.
20023         * lib/csharpcomp.c: New file, from GNU gettext.
20024         * lib/csharpcomp.sh.in: New file, from GNU gettext.
20025
20026 2005-06-08  Bruno Haible  <bruno@clisp.org>
20027
20028         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
20029         warning on mingw.
20030
20031 2005-06-07  Derek Price  <derek@ximbiot.com>
20032
20033         Sync from CVS.
20034         * lib/glob_.h: Indent nested #ifdef.
20035
20036 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20037
20038         Sync from coreutils.
20039         Use "file name" when talking about file names, instead of "filename"
20040         or "path", as per the GNU coding standards.
20041         * lib/mkdir-p.c: Renamed from makepath.c.
20042         (make_dir_parents): Renamed from make_path.  All callers changed.
20043         * lib/mkdir-p.h: Likewise.  All includers changed.
20044         * lib/filenamecat.c: Renamed from path-concat.c.
20045         (file_name_concat): Renamed from path_concat.  All callers changed.
20046         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
20047         * lib/filenamecat.h: Likewise.  All includers changed.
20048         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
20049         in comments or local variable names.
20050         * lib/basename.c: Likewise.
20051         * lib/canonicalize.c, canonicalize.h: Likewise.
20052         * lib/dirname.c, dirname.h: Likewise.
20053         * lib/euidaccess.c: Likewise.
20054         * lib/exclude.c: Likewise
20055         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
20056         * lib/fsusage.c, fsuage.h: Likewise.
20057         * lib/fts.c, fts_.h: Likewise.
20058         * lib/getcwd.c: Likewise.
20059         * lib/getloadavg.c: Likewise.
20060         * lib/mkstemp.c: Likewise.
20061         * lib/mountlist.c, mountlist.h: Likewise.
20062         * lib/openat.c, openat.h: Likewise.
20063         * lib/readlink-stub.c: Likewise.
20064         * lib/readutmp.c, readutmp.h: Likewise.
20065         * lib/rename.c: Likewise.
20066         * lib/rmdir.c: Likewise.
20067         * lib/same.c: Likewise.
20068         * lib/savedir.c: Likewise.
20069         * lib/stripslash.c: Likewise.
20070         * lib/tempname.c: Likewise.
20071         * lib/xreadlink.c: Likewise.
20072         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
20073         All uses changed.
20074         * lib/exclude.h: Likewise.
20075
20076         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
20077         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20078         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
20079         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20080         * lib/pathmax.h: Include <limits.h> unconditionally, since other
20081         files have been getting away with it for years (MORE/BSD 4.3
20082         is extinct now).
20083         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
20084         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20085
20086         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
20087         Define to 256, not 255, as per modern POSIX.
20088
20089 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20090
20091         Sync from coreutils.
20092         Use "file name" when talking about file names, instead of "filename"
20093         or "path", as per the GNU coding standards.
20094         * MODULES.html.sh: mkdir-p renamed from makepath.
20095         filenamecat renamed from path-concat.
20096         * modules/filenamecat: Renamed from modules/path-concat.
20097         (Files): filenamecat.h and filenamecat.c renamed from
20098         path-concat.h and path-concat.c.
20099         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
20100         (Include): filenamecat.h, not path-concat.h.
20101         * modules/mkdir-p: Renamed from modules/makepath.
20102         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
20103         makepath.c.
20104         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
20105         (Include): mkdir-p.h, not makepath.h.
20106
20107 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20108
20109         Sync from coreutils.
20110         * m4/mkdir-p.m4: Renamed from makepath.m4.
20111         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
20112         Rename files from makepath.c to mkdir-p.c, and from
20113         makepath.h to mkdir-p.h.
20114         * m4/filenamecat.m4: Renamed from path-concat.m4.
20115         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
20116         Rename files from path-concat.c to filenamecat.c,
20117         and from path-concat.h to filenamecat.h.
20118         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
20119         "file name" in local variables or comments.
20120         * m4/rename.m4: Likewise.
20121
20122 2005-06-01  Bruno Haible  <bruno@clisp.org>
20123
20124         * modules/csharpexec: New file.
20125         * MODULES.html.sh (C#): New section.
20126
20127 2005-06-01  Bruno Haible  <bruno@clisp.org>
20128
20129         * m4/csharp.m4: New file, from GNU gettext.
20130         * m4/csharpexec.m4: New file, from GNU gettext.
20131
20132 2005-06-01  Bruno Haible  <bruno@clisp.org>
20133
20134         * lib/csharpexec.h: New file, from GNU gettext.
20135         * lib/csharpexec.c: New file, from GNU gettext.
20136         * lib/csharpexec.sh.in: New file, from GNU gettext.
20137
20138 2005-05-31  Derek Price  <derek@ximbiot.com>
20139             Paul Eggert  <eggert@cs.ucla.edu>
20140
20141         Sync from cvs.
20142         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20143
20144 2005-05-31  Derek Price  <derek@ximbiot.com>
20145             Paul Eggert  <eggert@cs.ucla.edu>
20146
20147         Sync from cvs.
20148         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20149
20150 2005-05-29  Derek Price  <derek@ximbiot.com>
20151
20152         * config/srclist.txt (glob_.h, glob.c): Add these files.
20153
20154 2005-05-29  Derek Price  <derek@ximbiot.com>
20155
20156         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
20157         * modules/glob: New file.
20158         * modules/getlogin_r: Add link to POSIX spec in description.
20159
20160 2005-05-29  Derek Price  <derek@ximbiot.com>
20161             Paul Eggert  <eggert@cs.ucla.edu>
20162
20163         * m4/glob.m4: New file.
20164
20165 2005-05-29  Derek Price  <derek@ximbiot.com>
20166             Paul Eggert  <eggert@cs.ucla.edu>
20167
20168         * lib/glob_.h, lib/glob.c: New files.
20169
20170 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20171
20172         * modules/fts (Files): Remove m4/inttypes-pri.m4.
20173         * modules/fts-lgpl (Depends-on): Remove gettext.
20174
20175 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20176
20177         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
20178         and don't require gt_INTTYPES_PRI.
20179
20180 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20181
20182         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
20183
20184         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
20185         the configuration hassle isn't worth it.
20186         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
20187         (LONGEST_MODIFIER, PRIuMAX): Remove.
20188
20189 2005-05-27  Bruno Haible  <bruno@clisp.org>
20190
20191         * lib/getlogin_r.h: Remove second include of <stddef.h>.
20192
20193 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
20194
20195         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
20196         _POSIX_PTHREAD_SEMANTICS for Solaris.
20197
20198 2005-05-25  Derek Price  <derek@ximbiot.com>
20199
20200         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
20201
20202 2005-05-25  Derek Price  <derek@ximbiot.com>
20203             Paul Eggert  <eggert@cs.ucla.edu>
20204
20205         * modules/getlogin_r, m4/getlogin_r.m4: New files.
20206         * lib/getlogin_r.c, getlogin_r.h: New files.
20207
20208 2005-05-25  Bruno Haible  <bruno@clisp.org>
20209             Derek Price  <derek@ximbiot.com>
20210
20211         * lib/getlogin_r.h: Simplify API documentation.
20212
20213 2005-05-23  Derek Price  <derek@ximbiot.com>
20214
20215         * modules/minmax (Files): Add m4/minmax.m4.
20216         (configure.ac): Add gl_MINMAX.
20217
20218 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
20219
20220         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
20221         so that unistd-safer.h (GPL'ed code) need not be included.
20222
20223 2005-05-22  Bruno Haible  <bruno@clisp.org>
20224
20225         * m4/minmax.m4: New file.
20226         Based on a patch by Derek Price <derek@ximbiot.com>.
20227
20228 2005-05-22  Bruno Haible  <bruno@clisp.org>
20229
20230         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
20231         (INT64_MIN): Fix definition.
20232         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
20233
20234         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
20235         NEED_SIGNED_INT_TYPES.
20236
20237         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
20238         HAVE_SYSTEM_INTTYPES.
20239
20240 2005-05-22  Bruno Haible  <bruno@clisp.org>
20241
20242         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
20243         Also include <sys/param.h> if it defines MIN, MAX.
20244         Based on a patch by Derek Price <derek@ximbiot.com>.
20245
20246 2005-05-21  Jim Meyering  <jim@meyering.net>
20247
20248         * modules/fts (Files): Add m4/inttypes-pri.m4.
20249         (Depends-on): Add lstat and remove gettext.  Alphabetize.
20250
20251 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20252
20253         New fts module.
20254         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
20255         (setup_dir, free_dir): New functions.
20256         (enter_dir, leave_dir): Define trivial
20257         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
20258         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
20259         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
20260         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
20261         Move to fts-cycle.c.
20262         (fts_open): Use setup_dir.
20263         (fts_close): Use free_dir.
20264         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
20265         This adds a label and some gotos, but the alternatives were messier.
20266         Check for memory allocation failure when entering a dir.
20267         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
20268         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
20269         (FTS): New member fts_cycle, that is a union that contains the
20270         old active_dir_ht and cycle_state.  All uses changed to mention
20271         fts_cycle.ht and fts_cycle.state.
20272         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
20273         fts.c, with the following changes:
20274         (setup_dir, free_dir): New functions.
20275         (enter_dir): Now returns bool.  Return true if successful, false
20276         if memory exhausted.  All callers changed.
20277         Do not bother partly cleaning up on
20278         memory allocation failure; that is free_dir's job.
20279         However, free ad if hash_insert fails, to avoid memory leak.
20280         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
20281         fts->fts_options to see which union member to use.
20282
20283 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20284
20285         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
20286         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
20287
20288 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20289
20290         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
20291
20292 2005-05-20  Jim Meyering  <jim@meyering.net>
20293
20294         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
20295         Now a macro, to pacify GCC.
20296
20297 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20298
20299         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
20300         of -1.
20301
20302 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20303
20304         * lib/chown.c (rpl_chown): Return -1 on failure.
20305
20306 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20307
20308         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
20309         Don't check for stddef.h.
20310         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
20311         don't use its results.
20312         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
20313         since we include them unconditionally.  Don't require
20314         AM_STDBOOL_H, since stdbool is a prerequisite.
20315         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
20316         since we assume C89 or better.
20317         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
20318         as we don't use their results.
20319         Don't check for fchdir, memmove, memset, strrchr, as we use
20320         them unconditionally.
20321         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
20322         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
20323
20324 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20325
20326         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
20327         Include <stddef.h> unconditionally, since we assume C89 now.
20328         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
20329         * lib/fts.c: Include fts_.h first, to check interface.
20330         Do not include intprops.h; no longer needed.
20331         Include cycle-check.h and hash.h, since fts_.h no longer does.
20332         Remove unnecessary casts of closedir to void.
20333         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
20334         decide whether to decrement nlinks.
20335         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
20336         (FTS): Use struct hash_table * instead of Hash_table, so that
20337         we no longer need to include hash.h here.
20338
20339 2005-05-18  Jim Meyering  <jim@meyering.net>
20340
20341         * modules/dirfd (License): Change to LGPL.  Most of the code
20342         is already in the public domain.
20343
20344 2005-05-18  Jim Meyering  <jim@meyering.net>
20345
20346         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
20347         Reported by Yoann Vandoorselaere.
20348
20349 2005-05-17  Jim Meyering  <jim@meyering.net>
20350
20351         * m4/fts.m4: New file, from coreutils.
20352
20353 2005-05-17  Jim Meyering  <jim@meyering.net>
20354
20355         * lib/fts.c, lib/fts_.h: New files, from coreutils.
20356
20357 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20358
20359         Sync from coreutils.
20360         * m4/unlinkdir.m4: New file.
20361
20362 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20363
20364         Sync from coreutils.
20365         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
20366         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
20367         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
20368         White space changes only.
20369         * lib/makepath.c (make_path): Port to hosts where leading "//" is
20370         special.
20371         * lib/yesno.c: Include getline.h, not ctype.h.
20372         (yesno): Don't remove leading white space; POSIX doesn't allow it.
20373         Use getline to remove arbitrary restriction on response length.
20374
20375 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20376
20377         * config/srclist-update: Spell out "Street" in FSF postal
20378         mail address; this is the style the FSF seems to prefer.
20379
20380         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
20381         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
20382         this updates FSF postal mail address.
20383
20384         Sync from coreutils.
20385         * modules/unlinkdir: New file.
20386         * modules/yesno (Depends-on): Add getline.
20387         * MODULES.html.sh (File system functions): Add unlinkdir.
20388
20389 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20390
20391         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
20392         lib/strsep.h:
20393         Change the initial comment to refer to GPL, not LGPL.
20394         gnulib-tool will change it to LGPL as needed.
20395
20396         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
20397         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
20398         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
20399         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
20400         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
20401         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
20402         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
20403         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
20404         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
20405         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
20406         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
20407         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
20408         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
20409         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
20410         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
20411         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
20412         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
20413         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
20414         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
20415         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
20416         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
20417         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
20418         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
20419         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
20420         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
20421         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
20422         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
20423         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
20424         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
20425         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
20426         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
20427         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
20428         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
20429         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
20430         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
20431         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
20432         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
20433         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
20434         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
20435         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
20436         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
20437         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
20438         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
20439         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
20440         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
20441         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
20442         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
20443         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
20444         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
20445         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
20446         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
20447         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
20448         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
20449         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
20450         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
20451         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
20452         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
20453         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
20454         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
20455         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
20456         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
20457         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
20458         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
20459         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
20460         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
20461         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
20462         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
20463         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
20464         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
20465         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
20466         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
20467         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
20468         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
20469         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
20470         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
20471         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
20472         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
20473         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
20474         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
20475         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
20476         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
20477         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
20478         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
20479         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
20480         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
20481         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
20482         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
20483         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
20484         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
20485         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
20486         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
20487         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
20488         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
20489         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
20490         lib/yesno.c, lib/yesno.h:
20491         Update FSF postal mail address.
20492
20493 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20494
20495         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
20496         tests/test-memmem.c, tests/test-stpncpy.c:
20497         Update FSF postal mail address.
20498
20499 2005-05-13  Bruno Haible  <bruno@clisp.org>
20500
20501         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
20502         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
20503         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
20504         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
20505         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
20506         Add support for 64-bit integers in the MSVC compiler.
20507
20508 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20509
20510         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
20511
20512 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
20513
20514         * gnulib-tool (func_import): Sort and uniquify recommended includes.
20515
20516 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
20517
20518         * doc/getdate.texi (General date syntax): Don't say that date
20519         date --iso-8601=ns generates acceptable dates; it doesn't yet.
20520         Problem reported by Nic Ferrier.
20521
20522 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20523
20524         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
20525         specified in ai_socktype. Fix invalid ai_protocol
20526         check. ai_protocol is usually set to 0 or depending on
20527         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
20528         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
20529         ai_socktype / ai_protocol in the returned addrinfo structure.
20530
20531 2005-05-10  Simon Josefsson  <jas@extundo.com>
20532
20533         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
20534         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
20535
20536 2005-05-10  Karl Berry  <karl@gnu.org>
20537
20538         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
20539         (from http://www.gnu.org/licenses).
20540         * doc/COPYING.LIB: also rename to COPYING.LESSER.
20541         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
20542         fdl.texi suffices.
20543
20544 2005-05-10  Karl Berry  <karl@gnu.org>
20545
20546         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
20547         (COPYING.DOC): remove.
20548
20549         * config/srclist-update: new FSF address.
20550
20551 2005-05-10  Derek Price  <derek@ximbiot.com>
20552
20553         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
20554         possible.
20555
20556 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20557             Bruno Haible  <bruno@clisp.org>
20558
20559         * modules/inet_ntop: New file.
20560         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20561         inet_ntop.
20562
20563 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20564             Bruno Haible  <bruno@clisp.org>
20565
20566         * m4/inet_ntop.m4: New file.
20567
20568 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20569             Bruno Haible  <bruno@clisp.org>
20570
20571         * lib/inet_ntop.h: New file.
20572         * lib/inet_ntop.c: New file, from glibc with modifications.
20573
20574 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
20575
20576         * modules/time_r (License): Change to LGPL.
20577         * modules/extensions (License): Change to LGPL.  Actually,
20578         the license is more permissive than that, but currently gnulib-tool
20579         doesn't know how to handle more-permissive licenses.
20580
20581         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
20582         Problem reported by Dave Love.
20583
20584 2005-05-08  Jim Meyering  <jim@meyering.net>
20585
20586         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
20587         blank.
20588
20589 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20590
20591         * modules/argmatch (Depends-on): Add stdbool.
20592         * modules/backupfile (Depends-on): Likewise.
20593         * modules/chdir-long (Depends-on): Likewise.
20594         * modules/closeout (Depends-on): Likewise.
20595         * modules/cycle-check (Depends-on): Likewise.
20596         * modules/dirname (Depends-on): Likewise.
20597         * modules/fnmatch (Depends-on): Likewise.
20598         * modules/fsusage (Depends-on): Likewise.
20599         * modules/fwriteerror (Depends-on): Likewise.
20600         * modules/getcwd (Depends-on): Likewise.
20601         * modules/getloadavg (Depends-on): Likewise.
20602         * modules/hard-locale (Depends-on): Likewise.
20603         * modules/makepath (Depends-on): Likewise.
20604         * modules/mountlist (Depends-on): Likewise.
20605         * modules/nanosleep (Depends-on): Likewise.
20606         * modules/posixtm (Depends-on): Likewise.
20607         * modules/quotearg (Depends-on): Likewise.
20608         * modules/readtokens (Depends-on): Likewise.
20609         * modules/readtokens0 (Depends-on): Likewise.
20610         * modules/readutmp (Depends-on): Likewise.
20611         * modules/save-cwd (Depends-on): Likewise.
20612         * modules/strftime (Depends-on): Likewise.
20613         * modules/userspec (Depends-on): Likewise.
20614         * modules/utimecmp (Depends-on): Likewise.
20615         * modules/xgetcwd (Depends-on): Likewise.
20616         * modules/xnanosleep (Depends-on): Likewise.
20617         * modules/xstrtod (Depends-on): Likewise.
20618         * modules/yesno (Depends-on): Likewise.
20619
20620 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
20621
20622         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
20623         needless checks.
20624
20625 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20626
20627         Merge from coreutils.  Among other things,
20628         add bulletproofing for cases where stdin, stdout, or stderr are closed.
20629         * lib/fd-safer.c: New file.
20630         * lib/fcntl-safer.h, open-safer.c: Remove.
20631         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
20632         * lib/dup-safer.c: Include unistd-safer.h first.
20633         Don't include errno.h.
20634         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
20635         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
20636         * lib/file-type.c: Rely on file-type.h change.
20637         * lib/getloadavg.c: Include unistd-safer.h.
20638         (getloadavg): Use safer open.
20639         * lib/getusershell.c: Include "stdio-safer.h".
20640         (getusershell): Use safer fopen.
20641         * lib/long-options.c (long_options): Use NULL rather than 0.
20642         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
20643         'free'.
20644         * lib/modechange.c: Likewise.
20645         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
20646         (MODE_DONE): New constant.
20647         (struct mode_change): Remove 'next' member.
20648         (make_node_op_equals): New function; like the old one of the
20649         same name, except it allocates an array.
20650         (mode_compile, mode_create_from_ref): Use it.
20651         (mode_compile): Allocate result as an array, not a linked list.
20652         Parse octal string ourself, so that we catch mistakes like "+0".
20653         (mode_adjust): Arg is an array, not a linked list.
20654         * lib/modechange.c: Include stat-macros.h, xalloc.h.
20655         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
20656         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
20657         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
20658         Remove.  This is now stat-macros.h's job.
20659         (talloc): Remove.  All callers replaced by xalloc, so that
20660         our invokers don't have to worry about reporting memory failures.
20661         (make_node_op_equals): Remove.
20662         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20663         New constants.
20664         (struct mode_change): Moved here from modechange.h.
20665         (mode_append_entry): Remove.
20666         (mode_compile): Remove MASKED_OPS arg, since it encouraged
20667         apps to have incorrect behavior.  Use simpler algorithm for head
20668         and tail.  Don't futz with umask; that's now the job of mode_adjust.
20669         Detect more invalid usages rather than having somewhat-random behavior.
20670         Don't insert an "a=" action, as that leads to incorrect behavior.
20671         (mode_compile, mode_create_from_ref): Return NULL on error instead
20672         of an enum, since now there's only one way to have an error.  All
20673         callers changed.
20674         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
20675         at the correct time.  Simplify calculation of "+u" and its ilk.
20676         Don't mishandle "+X".
20677         (mode_free): Remove "register" and localize decls.
20678         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20679         (struct mode_change): Move to modechange.c; callers don't
20680         need to see this stuff.
20681         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
20682         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
20683         (mode_change, mode_adjust): Reflect the new signatures noted above.
20684         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
20685         that might redefine system include files.
20686         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
20687         (my_usleep): Use NULL rather than (void *) 0.
20688         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
20689         Use siginterrupt to specify that system calls should be interrupted.
20690         (rpl_nanosleep): Move initialization of suspended closer to call of
20691         my_usleep.
20692         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
20693         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
20694         (desirable_utmp_entry): New function.
20695         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
20696         using x2nrealloc, to simplify logic.
20697         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
20698         size calculation.  Do not assume utmp file is a regular file.
20699         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
20700         (READ_UTMP_CHECK_PIDS): New constant.
20701         * lib/save-cwd.c: Include unistd-safer.h.
20702         (save_cwd): Use fd_safer.
20703         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
20704         [!_LIBC] Include "stat-macros.h" instead.
20705         * lib/unistd-safer.h (fd_safer): New decl.
20706
20707 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20708
20709         * modules/getloadavg (Depends-on): Add unistd-safer.
20710         * modules/getusershell (Depends-on): Add stdio-safer.
20711         * modules/lstat (Depends-on): Remove xalloc.
20712         * modules/mkstemp (Depends-on): Add stat-macros.
20713         * modules/modechange (Depends-on): Remove xstrtol.
20714         Add stat-macros, xalloc.
20715         * modules/save-cwd (Depends-on): Add unistd-safer.
20716         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
20717         * modules/unistd-safer (Files): Add lib/fd-safer.c
20718         (Makefile.am): Remove lib_SOURCES.
20719
20720         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
20721         Remove fcntl-safer; unistd-safer supersedes it.
20722
20723 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20724
20725         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
20726         AC_HEADER_STAT.
20727         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
20728         (gl_PREREQ_CHOWN): Remove.
20729         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
20730         it.  Don't require AC_HEADER_STAT.
20731         (gl_PREREQ_LSTAT): Remove.
20732         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
20733         Don't require AC_HEADER_STAT.
20734         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
20735         (gl_PREREQ_RMDIR): Remove.
20736         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
20737         mention stat-macros.h or AC_HEADER_STAT, since we'll make
20738         the stat-macros module a prerequisite.
20739         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
20740         * m4/filemode.m4 (gl_FILEMODE): Likewise.
20741         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
20742         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
20743         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
20744         variable names.
20745         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
20746         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
20747         variable prefixes.
20748         * m4/fcntl-safer.m4: Remove.
20749         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
20750         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
20751         Invoke gl_PREREQ_FD_SAFER.
20752         (gl_PREREQ_FD_SAFER): New macro.
20753         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
20754         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
20755         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
20756         Remove duplicate call to AC_LIBOBJ(readutmp).
20757         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
20758
20759         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
20760         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
20761
20762 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20763
20764         * MODULES.html.sh (Misc): Add byteswap.
20765
20766 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20767
20768         * modules/getcwd (Depends-on): Add extensions.
20769         * modules/openat (Depends-on): Likewise.
20770
20771 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20772
20773         * modules/byteswap: New file.
20774
20775 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20776
20777         * m4/byteswap.m4: New file.
20778
20779 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20780
20781         * lib/byteswap_.h: New file.
20782
20783 2005-04-25  Karl Berry  <karl@gnu.org>
20784
20785         * m4/gettext.m4: Update from GNU gettext 0.14.4.
20786
20787 2005-04-25  Albert Chin  <china@thewrittenword.com>
20788
20789         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
20790         Toolkit C bug.
20791
20792 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
20793
20794         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
20795         (func_ln_if_changed) Remove forcibly for no error message
20796         in case file does not exist.
20797
20798 2005-04-19  Simon Josefsson  <jas@extundo.com>
20799
20800         * gnulib-tool (Options): Make --symlink mean --symbolic.
20801
20802 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
20803
20804         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
20805
20806 2005-04-16  Simon Josefsson  <jas@extundo.com>
20807
20808         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
20809
20810 2005-04-15  Simon Josefsson  <jas@extundo.com>
20811
20812         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
20813
20814 2005-04-15  Simon Josefsson  <jas@extundo.com>
20815
20816         * gnulib-tool: Rename --symlink to --symbolic.
20817
20818 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
20819
20820         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
20821         symbolic links to files instead of copying/moving.  Add --aux-dir,
20822         specifying directory relative --dir where auxiliary build tools
20823         are placed.
20824
20825 2005-04-14  Bruno Haible  <bruno@clisp.org>
20826
20827         * modules/allocsa (License): Change to LGPL.
20828         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
20829
20830 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
20831
20832         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
20833         that "UTC +1 second" continues to work.  Problem reported
20834         by Dmitry V. Levin.
20835         (relunit_snumber): New rule.
20836         (relunit): Use it.
20837
20838 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
20839
20840         * lib/getdate.y (universal_time_zone_table): New constant.
20841         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
20842         universal_time_zone_table.
20843         (lookup_zone): Prefer universal_time_zone_table to
20844         local_time_zone_table, so that "GMT" time stamps are allowed in
20845         London during the summer.  Problem reported by Ian Abbott.
20846
20847 2005-04-12  Jim Meyering  <jim@meyering.net>
20848
20849         * lib/human.c (humblock): Set *options even when returning due to
20850         xstrtoumax conversion failure.  Thanks to a used-uninitialized
20851         warning from gcc-4.
20852
20853 2005-04-09  Jim Meyering  <jim@meyering.net>
20854
20855         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
20856         -Wuninitialized: initialize tm0.tm_year.
20857
20858 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
20859
20860         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
20861         count, since there's no maximum.  All uses changed.
20862         Add member dsts_seen.
20863         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
20864         not being INT_MAX.
20865         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
20866         Use pc_rels_seen to decide whther a date is absolute.
20867
20868         * lib/getdate.y (number): Don't overwrite year.
20869         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
20870         check.
20871
20872 2005-04-02  Simon Josefsson  <jas@extundo.com>
20873
20874         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
20875         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
20876
20877 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
20878
20879         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
20880         where no absolute path name can be longer than PATH_MAX.
20881
20882 2005-03-27  Jim Meyering  <jim@meyering.net>
20883
20884         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
20885
20886 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
20887
20888         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
20889         "one's complement" -> "ones' complement" in comment, as per Knuth.
20890         "value of type" -> "type or expression" in comment.
20891         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
20892
20893 2005-03-26  Jim Meyering  <jim@meyering.net>
20894
20895         Comment nits.
20896         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
20897         Correct typos: s/or/of/.
20898
20899 2005-03-26  Jim Meyering  <jim@meyering.net>
20900
20901         * modules/check-include-files: Move to ../ and rename to...
20902         * check-module: ...this.
20903
20904 2005-03-25  Jim Meyering  <jim@meyering.net>
20905
20906         * modules/xvasprintf (Files): Add xalloc.h.
20907
20908 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
20909
20910         * modules/gettext (Files): config/config.rpath ->
20911         build-aux/config.rpath
20912         * modules/iconv (Files): Likewise.
20913         Problem reported by Oskar Liljeblad.
20914
20915 2005-03-23  Jim Meyering  <jim@meyering.net>
20916
20917         * modules/check-include-files: New script to check for
20918         missing dependencies, multiple includes, etc.
20919
20920         * modules/c-strtold (Depends-on): Add xalloc.
20921         * modules/c-strtod (Depends-on): Add xalloc.
20922         * modules/hash (Depends-on): Add xalloc.
20923         (Files): Remove lib/xalloc.h.
20924
20925         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
20926         * modules/userspec (Files): Add lib/inttostr.h.
20927
20928 2005-03-23  Jim Meyering  <jim@meyering.net>
20929
20930         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
20931
20932 2005-03-22  Jim Meyering  <jim@meyering.net>
20933
20934         * modules/stat-macros: New module.
20935         * modules/canonicalize, modules/euidaccess, modules/file-type,
20936         * modules/filemode, modules/lchown, modules/makepath,
20937         * modules/rmdir, modules/stat: Depend on new stat-macros module
20938         rather than listing lib/stat-macros.h manually.
20939         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
20940
20941 2005-03-22  Jim Meyering  <jim@meyering.net>
20942
20943         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
20944
20945 2005-03-22  Bruno Haible  <bruno@clisp.org>
20946
20947         * config/srclist.txt: Replace target directory 'config' with
20948         'build-aux'.
20949         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
20950         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
20951         ../build-aux/.
20952
20953 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
20954
20955         * modules/chdir-long (Depends-on): Add mempcpy.
20956
20957         * modules/acl, modules/backupfile, modules/c-strtod,
20958         modules/c-strtold, modules/canon-host, modules/canonicalize,
20959         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
20960         modules/exclude, modules/exitfail, modules/file-type,
20961         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
20962         modules/getdate, modules/getline, modules/getpagesize,
20963         modules/getpass, modules/getugroups, modules/group-member,
20964         modules/hard-locale, modules/hash, modules/human, modules/idcache,
20965         modules/inttostr, modules/long-options, modules/makepath,
20966         modules/md5, modules/memcasecmp, modules/memcoll,
20967         modules/modechange, modules/mountlist, modules/path-concat,
20968         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
20969         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
20970         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
20971         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
20972         modules/strftime, modules/strndup, modules/strverscmp,
20973         modules/timespec, modules/unlocked-io, modules/userspec,
20974         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
20975         modules/yesno:
20976         Remove lib_SOURCES line from Makefile.am section, as this is now
20977         done automatically by the corresponding Autoconf macro.
20978
20979 2005-03-21  Jim Meyering  <jim@meyering.net>
20980
20981         Changes imported from coreutils.
20982
20983         * lib/cycle-check.c: Don't include xalloc.h.
20984
20985         * lib/path-concat.c: Don't include assert.h.
20986         (path_concat): Remove assertion that would have triggered
20987         for ABASE starting with more than one slash.
20988         Reported by Andreas Schwab.
20989
20990         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
20991         properly when ABASE is an absolute file name.
20992         Correct the description of this function.
20993         Include <assert.h>.
20994         Add an assertion and a test driver.
20995         This fixes a bug introduced on 2004-07-02.
20996         Andreas Schwab reported the resulting failure of cp --parents:
20997         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
20998
20999 2005-03-21  Jim Meyering  <jim@meyering.net>
21000
21001         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
21002         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
21003
21004 2005-03-21  Jim Meyering  <jim@meyering.net>
21005         and  Paul Eggert  <eggert@cs.ucla.edu>
21006
21007         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
21008         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
21009         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
21010         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
21011         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
21012         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
21013         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
21014         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
21015         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
21016         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
21017         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
21018         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
21019         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
21020         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
21021         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
21022         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
21023         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
21024         for these modules.
21025
21026 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
21027
21028         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
21029         (which shouldn't happen), generate nothing instead of returning 0
21030         immediately, so that nstrftime (NULL, ...) doesn't return 0.
21031
21032 2005-03-16  Bruno Haible  <bruno@clisp.org>
21033
21034         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
21035         HAVE_LONGLONG_64BIT.
21036
21037 2005-03-16  Bruno Haible  <bruno@clisp.org>
21038
21039         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
21040         HAVE_LONGLONG_64BIT.
21041
21042 2005-03-16  Bruno Haible  <bruno@clisp.org>
21043
21044         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
21045         HAVE_LONGLONG_64BIT.
21046
21047 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21048
21049         * lib/strftime.c (my_strftime): Prepend space to format so that we can
21050         reliably distinguish strftime failure from empty output on POSIX
21051         hosts.
21052
21053 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21054
21055         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
21056         (iconv_string): Don't guess a size-zero buffer, as that might cause
21057         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
21058         result would be 'too large', where 'too large' is (heuristically)
21059         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
21060         overflow concerns.  This will prevent some unwanted malloc failures
21061         when the inputs are very large.
21062
21063 2005-03-15  Karl Berry  <karl@gnu.org>
21064
21065         * config/srclist.txt (config.rpath): from gettext.
21066         * config/config.rpath: update.
21067
21068 2005-03-15  Bruno Haible  <bruno@clisp.org>
21069
21070         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
21071         to 'negate'.
21072
21073         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
21074         variable.
21075
21076         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
21077         results.
21078
21079 2005-03-14  Simon Josefsson  <jas@extundo.com>
21080
21081         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
21082         <fx@gnu.org>.
21083
21084 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
21085
21086         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
21087         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
21088         intprops.h.
21089         * lib/strtol.c: Likewise.
21090
21091 2005-03-14  Jim Meyering  <jim@meyering.net>
21092
21093         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
21094         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
21095         to be nonzero so that we (and caller) can detect the difference
21096         between a valid zero-length expansion and an error return, even
21097         when the underlying strftime fails before writing anything into
21098         that location.
21099
21100 2005-03-14  Bruno Haible  <bruno@clisp.org>
21101
21102         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
21103         Update from GNU gettext 0.14.3.
21104
21105 2005-03-10  Jim Meyering  <jim@meyering.net>
21106
21107         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
21108
21109 2005-03-10  Jim Meyering  <jim@meyering.net>
21110
21111         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
21112         so that this module works on systems without fchdir.
21113
21114 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
21115
21116         Factor int-properties macros into a single file, except for
21117         glibc-related files.
21118         * lib/intprops.h: New file.
21119         * lib/getloadavg.c: Include it instead of limits.h.
21120         (INT_STRLEN_BOUND): Remove.
21121         * lib/human.c: Include intprops.h.
21122         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
21123         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
21124         302/1000.
21125         * lib/inttostr.h: Include intprops.h instead of limits.h.
21126         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
21127         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
21128         for consistency with intprops.h.
21129         (time_t_is_integer, twos_complement_arithmetic): Use them.
21130         * lib/sig2str.h: Include <signal.h>, intprops.h.
21131         (INT_STRLEN_BOUND): Remove.
21132         * lib/strftime.c (TYPE_SIGNED): Remove.
21133         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
21134         * lib/strtol.c: Adjust comments to match intprops.h.
21135         * lib/userspec.c: Include intprops.h.
21136         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
21137         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
21138         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
21139         instead of rolling our own expressions.
21140         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
21141
21142         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
21143         instead of int.
21144         (my_strftime): Do not mishandle years close to INT_MAX, by doing
21145         the right thing even if adding 1900 would overflow.  Similarly
21146         for tm_mon + 1 and tm_yday + 1.
21147         Make %Y always equivalent to %C%y, and similarly for %G and %g.
21148         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
21149         (DO_SIGNED_NUMBER): New macro.
21150         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
21151
21152 2005-03-07  Bruno Haible  <bruno@clisp.org>
21153
21154         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
21155
21156 2005-03-07  Bruno Haible  <bruno@clisp.org>
21157
21158         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
21159
21160 2005-03-04  Derek R. Price  <derek@ximbiot.com>
21161
21162         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
21163         (func_import): Only replace files via --import when they have actually
21164         changed.
21165
21166 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21167
21168         * m4/mmap-anon.m4: New file.
21169         * m4/pagealign_alloc.m4: New file.
21170
21171 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21172             Bruno Haible  <bruno@clisp.org>
21173
21174         * modules/pagealign_alloc: New file.
21175         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
21176
21177 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21178             Bruno Haible  <bruno@clisp.org>
21179
21180         * lib/pagealign_alloc.h: New file.
21181         * lib/pagealign_alloc.c: New file.
21182
21183 2005-03-03  Bruno Haible  <bruno@clisp.org>
21184
21185         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
21186         Use an all-permissive copyright notice, recommended by RMS.
21187
21188 2005-03-02  Bruno Haible  <bruno@clisp.org>
21189
21190         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
21191         of AIX, the replacement has to be done only after <string.h> is
21192         included, therefore not in config.h. stpncpy.h does the replacement,
21193         and stpncpy.c uses it.
21194
21195 2005-03-02  Bruno Haible  <bruno@clisp.org>
21196
21197         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
21198         stpncpy.c uses it.
21199
21200 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21201
21202         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
21203         The workaround isn't strictly needed for POSIX conformance, and
21204         it's too much of a pain to configure and maintain.  We'll ask
21205         people to fix their kernels instead.
21206         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
21207         (NANOSLEEP_BUG_WORKAROUND): Remove.
21208         (xnanosleep): Remove the workaround.
21209
21210 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21211
21212         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
21213         Reported by Derek Price.
21214         (Include): Add "timespec.h".
21215
21216         * modules/xnanosleep (Depends-on): Remove gethrxtime.
21217
21218 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21219
21220         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
21221         to detect nanosleep bug.
21222
21223 2005-03-01  Bruno Haible  <bruno@clisp.org>
21224
21225         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
21226
21227 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
21228
21229         * modules/gethrxtime: New file.
21230         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
21231         (Depends-on): Add gethrxtime.
21232         (configure.ac): Add gl_XNANOSLEEP.
21233         (Makefile.am): Remove lib_SOURCES line.
21234
21235 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21236
21237         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
21238         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
21239
21240 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21241
21242         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
21243         * lib/timespec.h (gettime): Return void, since it always
21244         succeeds now.  All uses changed.
21245         * lib/gettime.c (gettime) Likewise.
21246         [HAVE_NANOTIME]: Prefer nanotime.
21247         Assume gettimeofday succeeds, as POSIX requires.
21248         Assime time () succeeds, since other code already does.
21249         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
21250         (timespec_subtract): Remove.
21251         (NANOSLEEP_BUG_WORKAROUND): New constant.
21252         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
21253         things considerably.  Use it only on GNU/Linux hosts, since the
21254         workaround shouldn't be needed elsewhere.
21255
21256 2005-02-24  Bruno Haible  <bruno@clisp.org>
21257
21258         * modules/gettext (Files): Add m4/glibc2.m4.
21259
21260 2005-02-24  Bruno Haible  <bruno@clisp.org>
21261
21262         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
21263         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
21264         * m4/progtest.m4:
21265         Update from GNU gettext 0.14.2.
21266         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
21267
21268 2005-02-24  Bruno Haible  <bruno@clisp.org>
21269
21270         * lib/localcharset.c: Update from GNU gettext 0.14.2.
21271         * lib/config.charset: Update from GNU gettext 0.14.2.
21272
21273 2005-02-24  Bruno Haible  <bruno@clisp.org>
21274
21275         * lib/gettext.h: Update from GNU gettext 0.14.2.
21276
21277 2005-02-23  Simon Josefsson  <jas@extundo.com>
21278
21279         * m4/iconvme.m4: New file.
21280
21281 2005-02-23  Jim Meyering  <jim@meyering.net>
21282
21283         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
21284         change.
21285         Thanks to Bruno Haible for catching it.
21286
21287 2005-02-22  Simon Josefsson  <jas@extundo.com>
21288
21289         * modules/iconvme: New file.
21290
21291         * MODULES.html.sh: Add iconvme.
21292
21293 2005-02-22  Simon Josefsson  <jas@extundo.com>
21294
21295         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
21296
21297 2005-02-22  Simon Josefsson  <jas@extundo.com>
21298
21299         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
21300
21301 2005-02-22  Jim Meyering  <jim@meyering.net>
21302
21303         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
21304         s/ifndef/ifdef/.
21305
21306 2005-02-20  Neil Conway  <neilc@samurai.com>
21307
21308         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
21309         returned by OSX/Darwin if the specified buffer is not large
21310         enough for the hostname.
21311
21312 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21313
21314         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
21315         pass it to _help, otherwise the latter coredumps trying to
21316         dereference state.root_argp.
21317
21318 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21319
21320         * modules/chdir-long (Depends-on): Add memrchr.
21321         * modules/memrchr (Files): Add lib/memrchr.h.
21322         (Include): "memrchr.h".
21323
21324 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21325
21326         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
21327
21328 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21329
21330         * lib/memrchr.h: New file.
21331         * lib/chdir-long.c: Include it.
21332         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
21333         Don't bother including stddef.h.
21334
21335 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
21336
21337         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
21338         inclusion.
21339         Include <sys/types.h>, for dev_t.
21340         (ME_DUMMY, ME_REMOTE): Move from here....
21341         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
21342         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
21343         Dmitry V. Levin.
21344         Include mountlist.h first, to test the interface.
21345
21346 2005-01-29  Bruno Haible  <bruno@clisp.org>
21347
21348         * lib/progname.c (program_name): Initialize.
21349         Needed when linking statically on MacOS X.
21350
21351 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21352
21353         Sync from coreutils.
21354         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
21355         (Depends-on): Add c-strtod.
21356         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
21357
21358 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21359
21360         Sync from coreutils.
21361         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
21362
21363         Remove files that are specific to coreutils.
21364         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
21365
21366 2005-01-28  Bruno Haible  <bruno@clisp.org>
21367
21368         * modules/javacomp: New file.
21369         * MODULES.html.sh (Java): Add javacomp.
21370
21371 2005-01-28  Bruno Haible  <bruno@clisp.org>
21372
21373         * m4/javacomp.m4: New file, from GNU gettext.
21374
21375 2005-01-28  Bruno Haible  <bruno@clisp.org>
21376
21377         * lib/javacomp.sh.in: New file, from GNU gettext.
21378         * lib/javacomp.h: New file, from GNU gettext.
21379         * lib/javacomp.c: New file, from GNU gettext.
21380
21381 2005-01-26  Simon Josefsson  <jas@extundo.com>
21382
21383         * lib/gai_strerror.c: Use GPL in header.
21384
21385 2005-01-26  Bruno Haible  <bruno@clisp.org>
21386
21387         * modules/javaexec: New file.
21388         * MODULES.html.sh (Java): Add javaexec.
21389
21390 2005-01-26  Bruno Haible  <bruno@clisp.org>
21391
21392         * m4/javaexec.m4: New file, from GNU gettext.
21393
21394 2005-01-26  Bruno Haible  <bruno@clisp.org>
21395
21396         * lib/javaexec.sh.in: New file, from GNU gettext.
21397         * lib/javaexec.h: New file, from GNU gettext.
21398         * lib/javaexec.c: New file, from GNU gettext.
21399
21400 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21401
21402         * modules/lchown (Depends-on): Remove lchown.h
21403
21404 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21405
21406         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
21407         must be defined if the header file was not found, in order
21408         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
21409
21410 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21411
21412         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
21413         initializers for struct pentry_state.
21414         (__argp_error): Check return value of __asprintf
21415         (__argp_failure): Translate error message
21416
21417         * lib/argp-parse.c: Removed braces around the expansion of N_()
21418
21419 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
21420
21421         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
21422         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
21423         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
21424         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
21425         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
21426         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
21427         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
21428         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
21429         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
21430         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
21431         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
21432         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
21433         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
21434         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
21435         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
21436         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
21437         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
21438         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
21439         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
21440         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
21441         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
21442         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
21443         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
21444         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
21445         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
21446         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
21447         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
21448         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
21449         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
21450         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
21451         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
21452         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
21453         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
21454         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
21455         xstrtol.m4, xstrtoumax.m4, yesno.m4:
21456         Use an all-permissive copyright notice, recommended by RMS.
21457
21458 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
21459
21460         * modules/chdir-long (Depends-on): Remove mempcpy.
21461
21462 2005-01-21  Jim Meyering  <jim@meyering.net>
21463
21464         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
21465         same value as for Solaris 9.
21466
21467         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
21468         component length.  This included changing the parameter to be
21469         of type `char *' rather than `char const *'.
21470         * lib/chdir-long.h (chdir_long): Update prototype.
21471
21472         * lib/openat.c (fdopendir, fstatat): New functions.
21473         * lib/openat.h: Include headers required for use of DIR and struct
21474         stat.
21475         [AT_SYMLINK_NOFOLLOW]: Define.
21476         (fdopendir, fstatat): Add prototypes.
21477
21478 2005-01-21  Bruno Haible  <bruno@clisp.org>
21479
21480         * modules/classpath: New file.
21481         * MODULES.html.sh (Java): Add classpath.
21482
21483 2005-01-21  Bruno Haible  <bruno@clisp.org>
21484
21485         * lib/classpath.h: New file, from GNU gettext.
21486         * lib/classpath.c: New file, from GNU gettext.
21487
21488 2005-01-20  Simon Josefsson  <jas@extundo.com>
21489
21490         * modules/version-etc-fsf: New file.
21491
21492 2005-01-20  Simon Josefsson  <jas@extundo.com>
21493
21494         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
21495         * lib/version-etc.c: Remove version_etc_copyright.
21496         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
21497         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
21498
21499 2005-01-20  Simon Josefsson  <jas@extundo.com>
21500
21501         * lib/base64.h (isbase64): Add.
21502
21503         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
21504         using a unsigned prototype, don't inline.
21505         (base64_decode): Use it.
21506
21507 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21508
21509         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
21510         it.
21511
21512 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21513
21514         * lib/save-cwd.c (save_cwd): Remove code to support the case
21515         where fchdir is missing or flaky.
21516
21517 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21518
21519         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
21520
21521 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
21522
21523         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
21524         AC_LIBSOURCES now does this.
21525         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
21526         with new ullong_max module.
21527
21528 2005-01-19  Bruno Haible  <bruno@clisp.org>
21529
21530         * modules/sh-quote: New file.
21531         * MODULES.html.sh (Executing programs): Add sh-quote.
21532
21533 2005-01-19  Bruno Haible  <bruno@clisp.org>
21534
21535         * lib/sh-quote.h: New file, from GNU gettext.
21536         * lib/sh-quote.c: New file, from GNU gettext.
21537
21538 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21539
21540         Merge from coreutils.
21541         * m4/ullong_max.m4: New file.
21542         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
21543         (gl_MACROS): Assume localeconv exists.
21544
21545 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21546
21547         Merge changes from coreutils, as described below in several
21548         changelogs dated today.
21549
21550         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
21551         (O_DIRECTORY): Remove; not needed here, since "." must be
21552         a directory.  All uses removed.
21553         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
21554         universal on Suns, and we also need to test for IRIX.
21555         Revamp code to use 'if' rather than '#if'.
21556         Avoid unnecessary comparison of cwd->desc to 0.
21557
21558         * lib/utimens.c (futimens): Robustify the previous patch, by checking
21559         for known valid error numbers rather than observed invalid ones.
21560
21561 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21562
21563         * modules/ullong_max: New file.
21564
21565         * modules/chdir-long, modules/openat: New files.
21566         * modules/save-cwd (Depends-on): Depend on chdir-long.
21567         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
21568
21569 2005-01-18  Jim Meyering  <jim@meyering.net>
21570
21571         Merge from coreutils.
21572         * m4/chdir-long.m4, m4/openat.m4: New files.
21573         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
21574         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
21575         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
21576         is sane and DOES follow symlinks.  Besides, testing 20 different
21577         systems found no broken chown implementations.
21578         Prompted by a change in rsync's copy of this macro.
21579         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
21580
21581         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
21582
21583         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
21584         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
21585         NULL-means-set-to-current-time semantics.
21586         Remove temporary file immediately, rather than waiting
21587         for configure's at-exit trap code to do it.
21588
21589 2005-01-18  Jim Meyering  <jim@meyering.net>
21590
21591         * lib/version-etc.c (version_etc_copyright): Update copyright date.
21592
21593         * lib/utimens.c (futimens): Account for the fact that futimes
21594         can also fail with errno == ENOSYS or errno == ENOENT.
21595         Patch from Dmitry V. Levin.
21596
21597         Change the name of the robust chdir function from chdir to chdir_long.
21598         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
21599         (restore_cwd): Use chdir_long, not chdir.
21600         * lib/chdir-long.c: Renamed from chdir.c.
21601         * lib/chdir-long.h: Renamed from chdir.h.
21602         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
21603         Hurd.
21604
21605 2005-01-18  Bruno Haible  <bruno@clisp.org>
21606
21607         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
21608         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
21609         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
21610         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
21611         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
21612         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
21613         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
21614         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
21615         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
21616         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
21617         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
21618         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
21619         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
21620         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
21621         Use an all-permissive copyright notice, recommended by RMS.
21622
21623 2005-01-18  Bob Proulx  <bob@proulx.com>
21624
21625         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
21626         simplify offsetof() macro construct to avoid compile failure with
21627         native HP-UX 11.0 ANSI C compiler.
21628
21629 2005-01-17  Bruno Haible  <bruno@clisp.org>
21630
21631         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
21632         redundant because stpncpy.m4 takes care of it.
21633
21634 2005-01-17  Bruno Haible  <bruno@clisp.org>
21635
21636         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
21637
21638 2005-01-17  Bruno Haible  <bruno@clisp.org>
21639
21640         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
21641         used.
21642
21643 2005-01-17  Bruno Haible  <bruno@clisp.org>
21644
21645         * lib/fwriteerror.h (fwriteerror): Change specification to include
21646         fclose.
21647         * lib/fwriteerror.c: Include <stdbool.h>.
21648         (fwriteerror): At the end, close the file stream. Record whether
21649         stdout was already closed.
21650
21651 2005-01-17  Bruno Haible  <bruno@clisp.org>
21652
21653         * lib/execute.c (environ): Declare if needed.
21654         * lib/pipe.c (environ): Likewise.
21655         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
21656
21657 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21658
21659         * modules/argp: Depend on vsnprintf
21660
21661 2005-01-10  Jim Meyering  <jim@meyering.net>
21662
21663         * modules/closeout (Depends-on): Add atexit.
21664
21665 2005-01-06  Bruno Haible  <bruno@clisp.org>
21666
21667         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
21668
21669 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
21670
21671         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
21672         definitions to be after all include files, to avoid collisions.
21673         Problem reported by Bob Proulx.
21674
21675 2005-01-04  Jim Meyering  <jim@meyering.net>
21676
21677         Changes imported from coreutils.
21678         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
21679         as the mkstemp template, use a temporary directory and an
21680         8.3-friendly template to avoid trouble on systems like DJGPP.
21681         Reported by Juan M. Guerrero via Stepan Kasal.
21682         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
21683         close. Remove the temporary directory right away, rather than waiting
21684         for configure's at-exit trap code to do it.
21685         Suggestion from Stepan Kasal.
21686
21687 2005-01-01  Simon Josefsson  <jas@extundo.com>
21688
21689         * gnulib-tool: Print #include directives when --import'ing.
21690
21691 2004-12-28  Simon Josefsson  <jas@extundo.com>
21692
21693         * tests/test-base64.c: Include required header files.  Remove
21694         unused variables.
21695
21696 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21697
21698         * modules/error (Depends-on): Remove gettext.
21699
21700 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21701
21702         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
21703         not needed.  This removes a dependency on the gettext module.
21704         [defined _LIBC]: Do not include <libintl.h>; not needed.
21705
21706 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21707
21708         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
21709         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
21710
21711 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21712
21713         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
21714         HAVE_DECL_STRTOLD.
21715
21716 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21717
21718         * modules/getdate (Depends-on): Remove alloca-opt.
21719
21720 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21721
21722         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
21723
21724 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21725
21726         * lib/argp-parse.c: Include <stddef.h>.
21727         (alignof, alignto): New macros.
21728         (parser_init): Don't assume that void * is aligned sufficiently
21729         for struct option.
21730
21731         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
21732         need to extend the stack.
21733         (YYINITDEPTH): New macro, so that the initial stack isn't overly
21734         large.
21735
21736 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21737
21738         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
21739
21740 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21741
21742         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
21743         (2004-10-24) change.  Apparently this was a false alarm.
21744
21745         * modules/getdate: Depend on alloca-opt, not alloca.
21746
21747 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21748
21749         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
21750         Remove now-obsolete comment about AIX.
21751         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
21752         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
21753         (YYMAXDEPTH): New macro.
21754
21755 2004-12-18  Simon Josefsson  <jas@extundo.com>
21756
21757         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
21758
21759 2004-12-18  Bruno Haible  <bruno@clisp.org>
21760
21761         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
21762
21763 2004-12-18  Bruno Haible  <bruno@clisp.org>
21764
21765         * lib/fatal-signal.c (fatal_signals): Make non-const.
21766         (init_fatal_signals): New function.
21767         (uninstall_handlers, install_handlers): Ignore signals that were set to
21768         SIG_IGN.
21769         (at_fatal_signal): Call init_fatal_signals.
21770         (init_fatal_signal_set): Likewise. Ignore signals that were set to
21771         SIG_IGN.
21772         Reported by Paul Eggert.
21773
21774 2004-12-18  Bruno Haible  <bruno@clisp.org>
21775
21776         * doc/alloca.texi: New file.
21777         * doc/alloca-opt.texi: New file.
21778
21779 2004-12-17  Jim Meyering  <jim@meyering.net>
21780
21781         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
21782         Otherwise, install-sh could exit with improper exit status when
21783         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
21784
21785 2004-12-16  Simon Josefsson  <jas@extundo.com>
21786
21787         * tests/test-base64.c: Add license.
21788
21789 2004-12-15  Stepan Kasal  <address@hidden>
21790
21791         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
21792
21793 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
21794
21795         * modules/getcwd (Files): Add m4/d-ino.m4.
21796         Suggested by Mark D. Baushke.
21797
21798 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21799
21800         * lib/getdate.y (textint): New member "negative".
21801         (time_zone_hhmm): New function.
21802         Expect 14 shift-reduce conflicts, not 13.
21803         (o_colon_minutes): New rule.
21804         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
21805         (yylex): Set the "negative" member of signed numbers.
21806
21807 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21808
21809         * doc/getdate.texi (Time of day items, Time zone items):
21810         Describe new formats +00:00, UTC+00:00.
21811
21812 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
21813
21814         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
21815         spurious "-l"s.  Problem reported by Stepan Kasal.
21816
21817 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
21818
21819         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
21820         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
21821
21822 2004-12-04  Simon Josefsson  <jas@extundo.com>
21823
21824         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
21825         Vandoorselaere <yoann@prelude-ids.org>.
21826
21827 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21828
21829         Changes imported from coreutils.
21830         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
21831         exist.
21832         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
21833
21834 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21835
21836         Changes imported from coreutils.
21837         * lib/hard-locale.c: Assume <locale.h> exists.
21838         Include "strdup.h".
21839         (GLIBC_VERSION): New macro.
21840         (hard_locale): Assume setlocale exists.
21841         Rewrite to avoid #ifdef.
21842         Use strdup rather than malloc + strcpy.
21843         * lib/human.c: Assume <locale.h> exists.
21844         (human_readable): Assume localeconv exists.
21845
21846 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21847
21848         * modules/hard-locale (Depends-on): Add strdup.
21849
21850 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
21851
21852         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
21853         convert T2, not T.  (Imported from libc.)
21854
21855 2004-11-30  Simon Josefsson  <jas@extundo.com>
21856
21857         * modules/restrict (License): Change to LGPL.
21858
21859 2004-11-30  Simon Josefsson  <jas@extundo.com>
21860
21861         * m4/restrict.m4: Add copyright and copying conditions.
21862
21863 2004-11-30  Simon Josefsson  <jas@extundo.com>
21864
21865         * m4/base64.m4: New file.
21866
21867 2004-11-30  Simon Josefsson  <jas@extundo.com>
21868
21869         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
21870         base64.
21871
21872         * tests/test-base64.c: New file.
21873
21874         * modules/base64: New file.
21875
21876 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21877
21878         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
21879         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
21880
21881         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
21882
21883 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21884
21885         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
21886         (__getcwd.c): Don't restore errno; glibc doesn't.
21887         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
21888         first, falling back to our code only if its results look suspicious.
21889         Ensure that the resulting buffer is only as large as necessary.
21890
21891         * lib/readutmp.c: Include readutmp.h first.
21892         Include <errno.h>, since readutmp.h no longer does that.
21893         * lib/readutmp.h: Don't include <errno.h>,
21894         <sys/param.h>, <time.h>; not needed to establish interface.
21895         (errno): Remove decl.
21896         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
21897         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
21898         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
21899
21900 2004-11-28  Simon Josefsson  <jas@extundo.com>
21901
21902         * lib/base64.h, base64.c: New file.
21903
21904 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
21905
21906         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
21907
21908 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
21909
21910         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
21911         (Depends-on): Remove pathmax, same.  Add mempcpy.
21912         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
21913         (Makefile.am): Append getcwd.h to lib_SOURCES.
21914         (Include): Add getcwd.h.
21915         (Maintainer): Change from Jim Meyering to "all, glibc",
21916         since getdate now uses intended-for-glibc code.
21917         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
21918         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
21919
21920 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21921
21922         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
21923         HP's ANSI C compiler.
21924         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
21925         Declaring int functions causes warnings on some modern systems and
21926         shouldn't be needed to compile on ancient ones.
21927         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
21928         defined.
21929
21930         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
21931         with the following changes.
21932         (__set_errno): Parenthesize properly.
21933         Include <stdbool.h>.
21934         (MIN, MAX, MATCHING_INO): New macros.
21935         (__getcwd): Define with prototype, not K&R form.
21936         Use heuristics to allocate default buffer on stack if possible.
21937         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
21938         behavior, and to avoid the PATH_MAX limit when computing
21939         ../../../../...
21940         Use MATCHING_INO to compare inode number to file.
21941         Check for arithmetic overflow in size calculations.
21942         Fix bug in reallocation of dot array that caused getcwd to fail
21943         on directories nested deeper than 75.
21944         Be more careful about saving errno on error.
21945         Do not use realloc; use only free+malloc, as this is a bit
21946         more flexible and avoids a needless copy operation.
21947         Do not inspect st_dev and st_ino for symbolic links; POSIX
21948         doesn't specify the latter.
21949         Check for closedir errors.
21950         Avoid needless casts.
21951         Use "#ifdef weak_alias" around weak_alias, to be like other
21952         glibc code.
21953         The following changes to getcwd.c have effect only when used in
21954         gnulib; they have no effect inside glibc proper.
21955         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
21956         as alloca isn't used.
21957         (alloca, __alloca): Likewise.
21958         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
21959         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21960         unconditionally, as gnulib assumes C89 or better.
21961         Do not include <sys/param.h>.
21962         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
21963         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
21964         better.
21965         (NULL) [!defined NULL]: Remove; we assume C89 or better.
21966         Include <dirent.h> in a way that is compatible with modern Autoconf.
21967         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
21968         New macros, if not already defined.
21969         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
21970         Use "_LIBC", not "defined _LIBC", for consistency.
21971         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
21972         a mempcpy module.
21973         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
21974         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
21975         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
21976         credit only to Jim Meyering and adjust the copyright dates.
21977         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
21978         <stdlib.h>, <unistd.h>, "pathmax.h".
21979         Instead, include "xgetcwd.h" (first) and "getcwd.h".
21980         (INITIAL_BUFFER_SIZE): Remove.
21981         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
21982
21983 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21984
21985         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
21986         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
21987         Use the _ONCE methods, for efficiency.
21988         Check for fcntl.h.  In test program, include <errno.h>
21989         and <fcntl.h> if available.  Remove old K&R cruft from
21990         test program.  Check for common errors in GNU/Linux,
21991         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
21992         don't do AC_LIBOBJ, as that's getcwd.m4's job.
21993         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
21994         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
21995         name accordingly.
21996         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
21997         accommodate new getcwd.c.
21998         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
21999         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
22000         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
22001         that's all we need now.
22002
22003 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22004
22005         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
22006         argp-parse.c depends on getopt internals, that means we should
22007         always use our getopt, to be on the safe side.
22008         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
22009         order not to spoil the result of an eventual previous invocation
22010         of gl_GETOPT_SUBSTITUTE.
22011
22012 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22013
22014         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
22015         redefinition warnings. To avoid them, include the defines
22016         in `#if !defined __need_getopt ... #endif'. The only place
22017         where __getopt_argv_const is used is in definitions
22018         of getopt_long and getopt_long_only below, which are as well
22019         protected by `#ifndef __need_getopt'.
22020         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
22021         __need_getopt after including <stdio.h> and <unistd.h> These
22022         headers might have defined it.
22023
22024 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22025
22026         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
22027
22028 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22029
22030         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
22031         (futimens): New function, which uses futimes if available.
22032         (futimens, utimens): Support timespec==NULL, with same semantics
22033         as utime and utimens.
22034         * lib/utimens.h (futimens): New decl.
22035
22036 2004-11-23  Jim Meyering  <jim@meyering.net>
22037
22038         * lib/getopt_.h: Remove trailing blanks.
22039
22040 2004-11-23  Jim Meyering  <jim@meyering.net>
22041
22042         * lib/__fpending.c: Add comment.
22043
22044 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
22045
22046         * modules/canonicalize (Depends-on): Add xreadlink.
22047         Problem reported by James Youngman.
22048
22049 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
22050
22051         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
22052         New macros.
22053         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
22054         optopt): Use them instead of invoking ## directly; otherwise, the
22055         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
22056
22057 2004-11-19  Bruno Haible  <bruno@clisp.org>
22058
22059         * lib/strtok_r.c: Move comments from here...
22060         * lib/strtok_r.h: ... to here.
22061
22062 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22063
22064         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
22065         implementations that mishandle size_t overflow.
22066
22067 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22068
22069         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
22070         might fail.  Problem reported by Yoann Vandoorselaere.
22071         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
22072         implementations that mishandle size_t overflow.
22073
22074 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22075
22076         * modules/canon-host (Depends-on): Add strdup.
22077
22078 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22079
22080         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
22081
22082 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22083
22084         * lib/canon-host.c: Include "strdup.h".
22085         (canon_host): Use getaddrinfo if available, so that IPv6 works.
22086         Use strdup instead of malloc/strcpy to duplicate strings.
22087
22088         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
22089         (human_space_before_unit): New constant.
22090         * lib/human.c (human_readable): Support it.
22091
22092         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
22093         (xgetcwd): Set errno correctly when failing.
22094         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
22095         the failure is actually due to a PATH_MAX problem.
22096
22097         Further getopt changes to make it more likely that glibc will
22098         buy the changes back.
22099         * lib/getopt.c (POSIXLY_CORRECT): New constant.
22100         (getopt): Use it, so to preserve glibc semantic
22101         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
22102         when compiling for libc.
22103         * lib/getopt_.h (__getopt_argv_const): Bring it back.
22104         (getopt_long, getopt_long_only): Use it.
22105
22106         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22107         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
22108         (getopt): Argv is now char * const *, as per standard.
22109         (_getopt_internal_r, _getopt_internal): Argv is now char **,
22110         not char *__getopt_argv_const *.
22111         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22112         _getopt_long_only_r): Likewise.
22113         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
22114         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22115         _getopt_long_r, _getopt_long_only_r): Likewise.
22116         * lib/getopt_.h (__getopt_argv_const): Remove.
22117         (getopt): Argv is now char * const *, as per standard.
22118
22119         * lib/getdate.y (tORDINAL): New token.
22120         (day, relunit): Allow it for relative times.
22121         (relative_time_table): Use tORDINAL for ordinals.
22122
22123 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22124
22125         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
22126         Document that "second" isn't allowed as an ordinal number.
22127
22128 2004-11-16  Jim Meyering  <jim@meyering.net>
22129
22130         * modules/closeout (Depends-on): Add fpending.
22131
22132 2004-11-15  Jim Meyering  <jim@meyering.net>
22133
22134         * lib/closeout.c: Include "__fpending.h" once again.
22135         Include <stdbool.h>.
22136         (close_stdout): Don't fail just because stdout was closed initially,
22137         since some programs don't write to stdout in the normal course of
22138         operation (other than --version and --help), and we don't want this
22139         function to make e.g. `touch file >&-' fail.
22140         But do fail if it was closed and someone has tried to write to it.
22141         E.g., `printf foo >&-' must fail.
22142
22143 2004-11-13  Jim Meyering  <jim@meyering.net>
22144
22145         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
22146
22147 2004-11-12  Simon Josefsson  <jas@extundo.com>
22148
22149         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
22150         small doc fix is still pending.
22151
22152 2004-11-11  Simon Josefsson  <jas@extundo.com>
22153
22154         * modules/strtok_r: New file.
22155
22156         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22157         strtok_r.
22158
22159 2004-11-11  Simon Josefsson  <jas@extundo.com>
22160
22161         * m4/strtok_r.m4: New file.
22162
22163         * m4/getopt.m4: Replace opterr.
22164
22165 2004-11-11  Simon Josefsson  <jas@extundo.com>
22166
22167         * lib/strtok_r.h, strtok_r.c: New file.
22168
22169 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22170
22171         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
22172         of replacing opterr, getopt, etc.  This should handle the
22173         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
22174
22175 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22176
22177         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
22178         we can stop lying to compilers about the constness of argv when we
22179         are compiled outside glibc.
22180         (getopt, getopt_long, getopt_long_only): Use it.
22181         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22182         _getopt_internal, getopt): Likewise.
22183         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22184         _getopt_long_only_r): Likewise.
22185         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22186         _getopt_long_r, _getopt_long_only_r): Likewise.
22187
22188         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
22189         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
22190         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
22191         the other external symbols.
22192         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
22193         declaration, since the above renaming now works around collisions.
22194
22195 2004-11-11  Jim Meyering  <jim@meyering.net>
22196
22197         * lib/linebreak.c: Remove trailing blanks.
22198         * lib/alloca_.h: Likewise.
22199         * lib/acosl.c: Likewise.
22200         * lib/euidaccess.c: Likewise.
22201         * lib/allocsa.h: Likewise.
22202
22203 2004-11-10  Simon Josefsson  <jas@extundo.com>
22204
22205         * m4/getaddrinfo.m4: New file.
22206
22207 2004-11-10  Simon Josefsson  <jas@extundo.com>
22208
22209         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
22210
22211 2004-11-10  Simon Josefsson  <jas@extundo.com>
22212
22213         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22214         getaddrinfo.
22215
22216         * modules/getaddrinfo: New file.
22217
22218 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22219
22220         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
22221
22222 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22223
22224         * lib/mktime.c (SHR): New macro, which is a portable
22225         substitute for >> that should work even on Crays.
22226         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
22227         Problem reported by Mark D. Baushke in
22228         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
22229         * lib/getdate.y (SHR): Likewise.
22230         (tm_diff): Use it.
22231         * lib/strftime.c (SHR): Likewise.
22232         (tm_diff): Use it.
22233         * lib/quotearg.c (struct quoting_options): Use unsigned int for
22234         quote_these_too, so that right shifts are well defined.  All uses
22235         changed.
22236
22237 2004-11-10  Jim Meyering  <jim@meyering.net>
22238
22239         Ensure that no close failure goes unreported.
22240         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
22241         return early when it seems there's nothing to flush.
22242         Don't include __fpending.h.
22243
22244 2004-11-10  Jim Meyering  <jim@meyering.net>
22245
22246         * modules/closeout (Depends-on): Remove fpending.
22247
22248 2004-11-10  Jim Meyering  <jim@meyering.net>
22249
22250         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
22251
22252 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22253
22254         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
22255         gl_FUNC_STRFTIME.
22256         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
22257         and AC_REQUIRE when possible, to avoid duplicate checks.
22258         Check for <wchar.h>.
22259
22260 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22261
22262         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
22263
22264 2004-11-09  Bruno Haible  <bruno@clisp.org>
22265
22266         * m4/sockpfaf.m4: New file.
22267
22268 2004-11-05  Bruno Haible  <bruno@clisp.org>
22269
22270         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
22271         Reported by Mark D. Baushke <mdb@cvshome.org>.
22272
22273 2004-11-04  Bruno Haible  <bruno@clisp.org>
22274
22275         2004-09-11  Bruno Haible  <bruno@clisp.org>
22276                 * allocsa.valgrind: New file.
22277         2004-02-06  Bruno Haible  <bruno@clisp.org>
22278                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
22279                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
22280                 Reported by Christopher Seip <chris.seip@hp.com>.
22281
22282 2004-11-04  Bruno Haible  <bruno@clisp.org>
22283
22284         * modules/allocsa (Files): Add lib/allocsa.valgrind.
22285         (Makefile.am): Distribute it.
22286
22287 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
22288
22289         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
22290         with errno == ERANGE if the buffer is too small.
22291         Problem reported by Mark D. Baushke.
22292
22293 2004-11-03  Albert Chin  <china@thewrittenword.com>
22294             Paul Eggert  <eggert@cs.ucla.edu>
22295
22296         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
22297         equivalent, substitute $ac_type for equivalent type rather than
22298         blindly using uint32_t *always* which won't work if uint32_t is not
22299         available.  Define _UINT32_T to work around typedef of uint32_t if
22300         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
22301         2.5.1.
22302
22303 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22304
22305         * m4/jm-macros.m4: Sync from coreutils.
22306         (gl_MACROS): Check for mbrlen, for pathchk.
22307         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
22308
22309 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22310
22311         * lib/xreadlink.c (MAXSIZE): New macro.
22312         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
22313         size does not exceed MAXSIZE.  Avoid cast.
22314         As suggested by Mark D. Baushke in
22315         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
22316         if readlink fails with buffer size just under MAXSIZE, try again
22317         with MAXSIZE.
22318
22319 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22320
22321         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
22322
22323 2004-11-02  Derek R. Price  <derek@ximbiot.com>
22324         and  Paul Eggert  <eggert@cs.ucla.edu>
22325
22326         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
22327         (get_date): Overparenthesize to avoid GCC warning.
22328
22329 2004-11-02  Bruno Haible  <bruno@clisp.org>
22330
22331         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
22332         returns void.
22333
22334 2004-11-02  Bruno Haible  <bruno@clisp.org>
22335
22336         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
22337         function returns void.
22338
22339 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22340
22341         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
22342         fflush_unlocked, flockfile, funlockfile, funlockfile,
22343         fputs_unlocked, putc_unlocked.
22344
22345 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22346
22347         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22348         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
22349         already declared.
22350
22351 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22352
22353         * modules/getdate (Files): Add doc/getdate.texi.
22354         (Depends-on): Add setenv, xalloc.
22355
22356 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22357
22358         * lib/getdate.y: Add support for TZ="foo" within a date string.
22359         Fix some bugs near time_t boundaries.  Reject dates with
22360         out-of-range components, e.g., "Sept 31".
22361         Include <stdlib.h>, "setenv.h", "xalloc.h".
22362         (ISDIGIT_LOCALE): Remove; unused.
22363         Note that the TZ and time functions used here are not reentrant.
22364         (mktime_ok, get_tz): New functions.
22365         (TZBUFSIZE): New constant.
22366         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
22367         This requires that we sometimes generate our own TZ="XXX..." setting.
22368
22369 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22370
22371         * doc/getdate.texi: New file, from coreutils with modifications for
22372         the new TZ parsing.
22373
22374 2004-10-27  Derek R. Price  <derek@ximbiot.com>
22375
22376         * lib/mktime.c (not_equal_tm): Remove redundant check.
22377
22378 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22379
22380         * modules/regex (lib_SOURCES): Add regex.c.
22381         Reported by James Youngman in
22382         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
22383
22384 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22385
22386         * lib/getdate.y: Use Bison 1.875 features, and some minor
22387         code cleanups.  This change does not affect semantics.
22388         Don't include <stdlib.h>; no longer needed.
22389         Don't include unlocked-io.h; only the "#if TEST" code uses
22390         stdio, and performance isn't crucial there.
22391         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
22392         Bison 1.875 features as described below.
22393         All uses of "PC." replaced by "pc->".
22394         (YYSTYPE): Add a forward declaration.
22395         (yylex, yyerror): Use full prototypes in forward decls.
22396         Use "%pure-parser" rather than obsolescent "%pure_parser".
22397         Use %parse-param and %lex-param instead of obsolescent
22398         YYPARSE_PARAM and YYLEX_PARAM.
22399         (meridian_table, month_and_day_table, time_units_table,
22400         relative_time_table, time_zone_table, military_table,
22401         lookup_zone, lookup_word, get_date):
22402         Use NULL instead of 0 where appropriate.
22403         (to_hour): Avoid abort (), to avoid a dependency on
22404         stdlib.h.
22405         (yyerror, yylex): Now accepts parser_control * arg.
22406         (main) [TEST]: Use '\0' rather than 0 for char.
22407
22408 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22409
22410         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
22411
22412 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22413
22414         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
22415         It's now the caller's responsibility to handle the case where
22416         !HAVE_GETPAGESIZE && !defined getpagesize.
22417
22418         * lib/mktime.c (leapyear): Arg is long int, not int.
22419
22420 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
22421
22422         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
22423
22424 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
22425
22426         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
22427         missing.  Problem reported by James Youngman.
22428
22429 2004-10-16  Simon Josefsson  <jas@extundo.com>
22430
22431         * gnulib-tool: Fix comments.  Fix parse problem.
22432         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
22433
22434 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
22435
22436         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
22437         implementation of getopt_long.  Problem reported by Alexander Taler in:
22438         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
22439
22440 2004-10-15  Bruno Haible  <bruno@clisp.org>
22441
22442         * gnulib-tool: Untabify. Initialize supplied_libname.
22443         (func_usage): More homogenous output.
22444         (func_modules_transitive_closure, func_modules_to_filelist,
22445         func_emit_lib_Makefile_am): New functions.
22446         (func_import): New function, extracted from big case statement. Use
22447         func_get_license, func_modules_transitive_closure,
22448         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
22449         opt_lgpl. Don't use test -a, as it's not portable.
22450         (func_create_testdir): Use func_modules_transitive_closure,
22451         func_modules_to_filelist, func_emit_lib_Makefile_am.
22452
22453 2004-10-15  Bruno Haible  <bruno@clisp.org>
22454
22455         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
22456
22457 2004-10-15  Bruno Haible  <bruno@clisp.org>
22458
22459         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
22460         the portions belonging to each module.
22461         Suggested by Derek Robert Price <derek@ximbiot.com>.
22462
22463 2004-10-12  Simon Josefsson  <jas@extundo.com>
22464
22465         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22466         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
22467         to real functions.
22468
22469 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22470
22471         * modules/vsnprintf: New file.
22472
22473 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22474
22475         * m4/vsnprintf.m4: New file.
22476
22477 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22478
22479         * lib/vsnprintf.h: New file.
22480         * lib/vsnprintf.c: New file.
22481
22482 2004-10-11  Bruno Haible  <bruno@clisp.org>
22483
22484         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
22485         vsnprintf.
22486
22487 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
22488
22489         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
22490
22491 2004-10-07  Bruno Haible  <bruno@clisp.org>
22492
22493         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
22494         fits into the provided buffer.
22495
22496 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
22497
22498         * lib/diacrit.c, diacrit.h: Add GPL notice.
22499
22500         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
22501         notice.
22502         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
22503         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
22504         This avoids a potential constant-folding bug.
22505
22506 2004-10-05  Bruno Haible  <bruno@clisp.org>
22507
22508         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
22509         for the declaration of strsep.
22510
22511 2004-10-05  Bruno Haible  <bruno@clisp.org>
22512
22513         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
22514
22515 2004-10-04  Simon Josefsson  <jas@extundo.com>
22516
22517         * modules/memmem: New file.
22518         * tests/test-memmem.c: New file.
22519         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
22520
22521 2004-10-04  Simon Josefsson  <jas@extundo.com>
22522
22523         * m4/memmem.m4: New file.
22524
22525 2004-10-04  Simon Josefsson  <jas@extundo.com>
22526
22527         * lib/memmem.h: New file.
22528         * lib/memmem.c: New file, taken from glibc.
22529
22530 2004-10-04  Simon Josefsson  <jas@extundo.com>
22531
22532         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
22533         '#ifdef USE_UNLOCKED_IO'.
22534
22535 2004-10-04  Simon Josefsson  <jas@extundo.com>
22536
22537         * config/srclist.txt: Add memmem from glibc.
22538
22539 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22540
22541         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
22542
22543         * modules/argmatch, modules/argp, modules/closeout, modules/error,
22544         modules/exclude, modules/getdate, modules/getline,
22545         modules/getndelim2, modules/getpass, modules/getpass-gnu,
22546         modules/getusershell, modules/linebuffer, modules/md5,
22547         modules/mountlist, modules/posixtm, modules/readtokens,
22548         modules/readutmp, modules/regex, modules/sha1,
22549         modules/version-etc, modules/yesno:
22550         Remove dependency on unlocked-io.
22551
22552 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22553
22554         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
22555
22556         * m4/unlocked-io.m4: Add copyright notice.
22557         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
22558
22559 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22560
22561         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
22562         * lib/xmalloc.c (xmemdup): Likewise.
22563         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
22564         XFREE): Remove these long-obsolescent macros.
22565         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
22566         * lib/xstrdup.c: Remove.
22567
22568         * lib/regex.c (re_comp): Cast gettext return value to char *,
22569         Problem reported by Martin Neitzel via Mark D. Baushke.
22570
22571 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22572
22573         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
22574         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
22575         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
22576         regex.c, sha1.c, version-etc.c, yesno.c:
22577         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
22578         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
22579         the includer's responsibility.
22580
22581         Sync from coreutils.
22582
22583         * lib/modechange.c (mode_compile): Don't decrement a pointer that
22584         points to the start of a string, as the C Standard says the
22585         resulting behavior is undefined.
22586
22587         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
22588         simple -> simple_backups, numbered_existing ->
22589         numbered_existing_backups, numbered -> numbered_backups
22590         to avoid shadowing problems.  All uses changed.
22591         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
22592         * lib/backupfile.c (check_extension, numbered_backup):
22593         Rename locals to avoid shadowing 'basename'.
22594         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
22595         once.
22596
22597         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
22598         * lib/.cvsignore: Add getopt.h.
22599
22600 2004-10-04  Bruno Haible  <bruno@clisp.org>
22601
22602         * modules/README: New file.
22603         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
22604         not a module.
22605
22606 2004-10-02  Jim Meyering  <jim@meyering.net>
22607
22608         * lib/dirfd.h, getpagesize.h: Add copyright notice.
22609
22610 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22611
22612         * modules/strsep: New file.
22613
22614 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22615
22616         * m4/strsep.m4: New file.
22617
22618 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22619
22620         * lib/strsep.h: New file.
22621         * lib/strsep.c: New file.
22622
22623 2004-10-01  Simon Josefsson  <jas@extundo.com>
22624
22625         * lib/snprintf.c (snprintf): Handle size==0.
22626
22627 2004-10-01  Simon Josefsson  <jas@extundo.com>
22628             Bruno Haible  <bruno@clisp.org>
22629
22630         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
22631         (snprintf): Declare 'args'.
22632
22633 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
22634
22635         * lib/snprintf.c: Remove comments as to why each header is needed.
22636
22637 2004-10-01  Bruno Haible  <bruno@clisp.org>
22638
22639         * MODULES.html.sh: Add strsep.
22640
22641 2004-09-30  Simon Josefsson  <jas@extundo.com>
22642
22643         * modules/snprintf: New file.
22644
22645 2004-09-30  Simon Josefsson  <jas@extundo.com>
22646
22647         * m4/snprintf.m4: New file.
22648
22649 2004-09-30  Simon Josefsson  <jas@extundo.com>
22650
22651         * lib/snprintf.h, lib/snprintf.c: New files.
22652
22653 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22654
22655         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
22656         (hol_entry_help): Never translate an empty string.
22657         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
22658         * lib/argp.h (OPTION_NO_TRANS): New option.
22659
22660 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22661
22662         * modules/argp (Maintainer): Replace Simon Josefsson
22663         by Sergey Poznyakoff.
22664
22665 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22666
22667         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
22668         changes merged back into glibc.
22669
22670 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22671
22672         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
22673
22674 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
22675
22676         * lib/xvasprintf.c: Include xalloc.h.
22677         (xvasprintf): Use xalloc_die, not xmalloc_die.
22678
22679 2004-09-29  Bruno Haible  <bruno@clisp.org>
22680
22681         * modules/alloca-opt: New file, derived from modules/alloca.
22682         * modules/allocsa: Depend on alloca-opt instead of alloca.
22683         * modules/setenv: Likewise.
22684         * modules/vasnprintf: Likewise.
22685         * MODULES.html.sh: Add alloca-opt.
22686
22687 2004-09-28  Simon Josefsson  <jas@extundo.com>
22688
22689         * gnulib-tool: New parameter --lgpl, to asseert that modules are
22690         LGPL, and to replace license template from GPL to LGPL.
22691
22692 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22693
22694         * modules/dummy: Change license to LGPL.
22695
22696 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22697
22698         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
22699
22700 2004-09-24  Simon Josefsson  <jas@extundo.com>
22701
22702         * modules/minmax (License): Change from GPL to LGPL.
22703
22704 2004-09-23  Simon Josefsson  <jas@extundo.com>
22705
22706         * gnulib-tool (--import): Typo.
22707
22708 2004-09-23  Simon Josefsson  <jas@extundo.com>
22709
22710         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
22711
22712 2004-09-22  Bruno Haible  <bruno@clisp.org>
22713
22714         * modules/*: Add 'License' field.
22715         * gnulib-tool: Accept --extract-license option.
22716         (func_get_license): New function.
22717
22718 2004-09-21  Bruno Haible  <bruno@clisp.org>
22719
22720         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
22721         Reported by Simon Josefsson.
22722
22723 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22724
22725         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
22726         gl_AC_TYPE_LONG_LONG.
22727
22728 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22729
22730         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
22731
22732 2004-09-18  Simon Josefsson  <jas@extundo.com>
22733         and  Paul Eggert  <eggert@cs.ucla.edu>
22734
22735         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
22736         calls with autoreconf.  Define GL_LIB.
22737
22738 2004-09-14  Karl Berry  <karl@gnu.org>
22739
22740         * config/srclist.txt: unsync setenv.c, sigh.
22741
22742 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22743
22744         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
22745         Problem reported by Bruno Haible in:
22746         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
22747
22748 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22749
22750         * config/srclist.txt: Comment out argp-pvh.c.
22751
22752 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
22753
22754         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
22755         in case some system header has #define'd it.  Problem reported by
22756         Soeren D. Schulze in
22757         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
22758
22759 2004-09-09  Karl Berry  <karl@gnu.org>
22760
22761         * regex.[ch]: delete from the root.  These were supposed to be
22762                 synced with emacs cvs, but this has not happened for about
22763                 a year, and anyway nothing else uses emacs regex.[ch].
22764                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
22765                 lib/regex[.ch] is untouched.
22766
22767 2004-09-09  Bruno Haible  <bruno@clisp.org>
22768
22769         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
22770
22771 2004-09-09  Bruno Haible  <bruno@clisp.org>
22772
22773         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
22774         modifications.
22775         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
22776
22777 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22778
22779         * modules/xvasprintf: New file.
22780         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
22781
22782 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22783
22784         * lib/xvasprintf.h: New file.
22785         * lib/xvasprintf.c: New file.
22786         * lib/xasprintf.c: New file.
22787
22788 2004-09-08  Bruno Haible  <bruno@clisp.org>
22789
22790         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
22791
22792 2004-09-08  Bruno Haible  <bruno@clisp.org>
22793
22794         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
22795         length is > INT_MAX.
22796         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
22797         more.
22798
22799 2004-09-08  Bruno Haible  <bruno@clisp.org>
22800
22801         * lib/stdint_.h: New file, taken from GNU clisp.
22802
22803 2004-09-08  Bruno Haible  <bruno@clisp.org>
22804             Oskar Liljeblad  <oskar@osk.mine.nu>
22805
22806         * modules/stdint: New file.
22807         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
22808
22809 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22810
22811         Import from coreutils.
22812         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
22813         strings on unbounded length.  alloca's performance benefits aren't
22814         that important here.
22815         (V_STRDUP): Remove.
22816         (parse_with_separator): New function, with most of the internals
22817         of the old parse_user_spec.  Allow user to omit both user and group,
22818         for compatibility with FreeBSD.
22819         Clone only the user name, not the entire spec.
22820         Do not set *uid, *gid unless entirely successful.
22821         Avoid memory leak in some failing cases.
22822         Fix regression for USER.GROUP reported by Dmitry V. Levin in
22823         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
22824         (parse_user_spec): Rewrite to use parse_with_separator.
22825
22826 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22827
22828         * modules/userspec: Don't depend on alloca.
22829
22830 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22831
22832         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
22833
22834 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
22835
22836         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
22837         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
22838         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
22839
22840 2004-08-16  Simon Josefsson  <jas@extundo.com>
22841
22842         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
22843         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
22844         Add --dry-run for --import.
22845         Let user provided command line parameters override configure.ac
22846         settings.
22847
22848 2004-08-12  Simon Josefsson  <jas@extundo.com>
22849
22850         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
22851         as discussed with Paul Eggert in threads rooted at
22852         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
22853         and
22854         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
22855         Before, the test was empty, and relied on ELIDE_CODE in source
22856         code.)
22857         (gl_PREREQ_GETOPT): New macro.
22858         (gl_GETOPT): Use them.
22859
22860 2004-08-12  Simon Josefsson  <jas@extundo.com>
22861
22862         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
22863         * lib/getopt_.h: Renamed from getopt.h.
22864
22865 2004-08-12  Simon Josefsson  <jas@extundo.com>
22866
22867         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
22868         Change default library name from libfoo to libgnu.
22869         Now, if you have a configure.ac that says:
22870                 gl_SOURCE_BASE(gl)
22871                 gl_M4_BASE(gl/m4)
22872                 gl_MODULES(error getopt etcetera)
22873                 gl_INIT
22874         you can import all you need by running:
22875                 ../gnulib/gnulib-tool --import
22876
22877         * modules/getopt (Files): Rename getopt.h to getopt_.h.
22878         (Makefile.am): Rewrite, use logic from argz.
22879         (Include): Use <getopt.h> instead of "getopt.h".
22880
22881 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22882
22883         * modules/argp (Files): Add m4/unlocked-io.m4.
22884         (Depends-on): Add extensions.
22885
22886 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22887
22888         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
22889         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
22890         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
22891         Check for program_invocation_name, program_invocation_short_name,
22892         flockfile, funlockfile, features.h, _getopt_long_only_r.
22893
22894 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22895
22896         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
22897         its complicated substitute.
22898         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
22899         and program_invocation_name.
22900         (__argp_basename) [!_LIBC]: Remove; the only use was
22901         replaced by its body.
22902         (__argp_short_program_name): Change condition from
22903         !defined __argp_short_program_name to
22904         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
22905         to match argp-namefrob.h.
22906         (__argp_failure): Don't assume strerror_r returns char *.
22907         * lib/argp-parse.c (N_): Define unconditionally.
22908         (argp_default_options): Fill out initializers with 0 to avoid
22909         gcc warnings.
22910
22911 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22912
22913         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
22914         getopt1.c.
22915
22916 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22917
22918         Merge from coreutils.
22919
22920         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
22921
22922         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
22923         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
22924
22925 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22926
22927         Merge from coreutils.
22928
22929         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
22930         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
22931         for Reliant Unix 5.43.
22932
22933         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
22934         (union fooround): Use uintmax_t, not long int.
22935         The rest is a merge from libc:
22936         [defined _LIBC]: Include <shlib-compat.h>.
22937         (_obstack) [defined _LIBC]: Remove after 2.3.4.
22938
22939         * lib/settime.c (settime): Recode to avoid warning with
22940         Sun Forte C 6U2.
22941
22942         * lib/strverscmp.c: Convert to UTF-8.
22943
22944 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22945
22946         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
22947         m4/uintmax_t.m4.
22948
22949 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22950
22951         * modules/xalloc-die: New file.
22952         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
22953
22954         * modules/md5 (Files): Add m4/uint32_t.m4.
22955         * modules/sha1: Renamed from modules/sha.
22956         (Files):
22957         Rename lib/sha.h to lib/sha1.h.
22958         Rename lib/sha.c to lib/sha1.c.
22959         Rename m4/sha.m4 to m4/sha1.m4.
22960         (lib_SOURCES): Likewise.
22961         (configure.ac): Rename gl_SHA to gl_SHA1.
22962         (Include): sha.h -> sha1.h.
22963
22964 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22965
22966         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
22967         * m4/sha1.m4: Renamed from sha.m4.
22968         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
22969
22970 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22971
22972         * lib/obstack.h (obstack_empty_p):
22973         Don't assume that chunk->contents is suitably aligned.
22974         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
22975         Likewise. Problem reported by Benno in
22976         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
22977
22978         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
22979         readable.  This could be improved further but it'd take some work.
22980
22981 2004-08-08  Simon Josefsson  <jas@extundo.com>
22982
22983         * modules/xgethostname (Depends-on): Remove exit and error (not
22984         used).
22985
22986         * modules/getpass-gnu: Add getpass.h.
22987         (Depends-on): Add stdbool.
22988         * modules/getpass: Add getpass.h.
22989
22990 2004-08-08  Simon Josefsson  <jas@extundo.com>
22991
22992         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
22993         Check getpass declaration.
22994
22995 2004-08-08  Simon Josefsson  <jas@extundo.com>
22996
22997         * lib/xgethostname.c: Don't include error.h (not used).
22998
22999         * lib/getpass.h: Add.
23000         * lib/getpass.c: Include getpass.h first.
23001
23002 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
23003
23004         * lib/xalloc-die.c: New file.
23005         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
23006         All uses removed.
23007         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
23008         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
23009         xalloc-die.c.
23010         (_, N_, xalloc_die): Move to xalloc-die.c.
23011         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
23012         so that we needn't mess with xalloc_msg_memory_exhausted.
23013
23014         * lib/sha1.h: Renamed from sha.h.
23015         (SHA1_H): Renamed from _SHA_H.
23016         (sha1_ctx): Renamed from sha_ctx.
23017         (sha1_init_ctx): Renamed from sha_init_ctx.
23018         (sha1_process_block): Renamed from sha_process_block.
23019         (sha1_process_bytes): Renamed from sha_process_bytes.
23020         (sha1_finish_ctx): Renamed from sha_finish_ctx.
23021         (sha1_read_ctx): Renamed from sha_read_ctx.
23022         (sha1_stream): Renamed from sha_stream.
23023         (sha1_buffer): Renamed from sha_buffer.
23024         * lib/sha1.c: Likewise; renamed from sha.c.
23025         Do not include <sys/types.h>.
23026         Include <stddef.h> rather than <stdlib.h>.
23027
23028 2004-08-08  Bruno Haible  <bruno@clisp.org>
23029
23030         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
23031         FILESYSTEM_PREFIX_LEN.
23032         * lib/progreloc.c: Likewise.
23033         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
23034
23035 2004-08-06  Simon Josefsson  <jas@extundo.com>
23036
23037         * modules/progname (Depends-on): Don't depend on stdbool.
23038
23039 2004-08-06  Simon Josefsson  <jas@extundo.com>
23040
23041         * modules/getsubopt: New file.
23042         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
23043         getsubopt.
23044
23045 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23046
23047         More merge from coreutils.
23048
23049         * m4/utimens.m4, m4/utimecmp.m4: New files.
23050         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
23051         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
23052         prereq.m4, sha.m4: Import changes from coreutils.
23053
23054 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23055
23056         More merge from coreutils.
23057         * modules/raise, modules/readtokens0, modules/utimens:
23058         * modules/utimecmp, module/xnanosleep: New files.
23059         * modules/strftime: Add lib/strftime.h.
23060         Change include from <time.h> to "strftime.h".
23061         * modules/yesno: Add lib/yesno.h.
23062         * modules/backupfile: Remove lib/addext.c.
23063         * modules/euidaccess: Add stat-macros.h.
23064         * modules/canonicalize, modules/euidaccess,
23065         modules/filemode, modules/lchown, modules/makepath,
23066         modules/rmdir, modules/stat: Likewise.
23067
23068 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23069
23070         Merge from tar.
23071         * lib/argp-help.c (make_hol, hol_append): Don't assume that
23072         SIZE_MAX is a valid preprocessor constant.
23073         (__argp_basename): Change from "#ifndef _LIBC"
23074         to "#ifndef __argp_short_program_name", so that
23075         we don't compile these functions for tar.
23076
23077         More merges from coreutils.
23078         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
23079         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
23080         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
23081         * lib/addext.c: Remove; no longer needed.
23082         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
23083         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
23084         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
23085         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
23086         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
23087         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
23088         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
23089         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
23090         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
23091         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
23092         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
23093         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
23094         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
23095         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
23096         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
23097         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
23098         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
23099         Import changes from coreutils.
23100
23101 2004-08-05  Simon Josefsson  <jas@extundo.com>
23102
23103         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
23104
23105 2004-08-05  Simon Josefsson  <jas@extundo.com>
23106
23107         * m4/getsubopt.m4: New file.
23108
23109 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23110
23111         Merge from coreutils.
23112
23113         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
23114         * m4/getcwd-path-max.m4: New files.
23115
23116         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
23117         FILESYSTEM_PREFIX_LEN ->
23118         FILE_SYSTEM_PREFIX_LEN.
23119         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
23120         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
23121         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
23122         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
23123
23124         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
23125         prerequisite modules now handle the DOS stuff.
23126         Don't check for unistd.h.
23127
23128 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23129
23130         Merge from coreutils.
23131
23132         * lib/.gdb-history: Remove; this doesn't belong here.
23133
23134         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
23135         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
23136         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
23137         * lib/getcwd.c: New files.
23138
23139         * lib/dirname.h: Include <stdbool.h>.
23140         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
23141         for consistency with POSIX terminology.  All uses changed.
23142         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
23143         (strip_trailing_slashes): Use bool for booleans.
23144         * lib/stripslash.c (strip_trailing_slashes): Likewise.
23145
23146         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
23147         sometimes returns a positive errno value even when it succeeds.
23148         (print_errno_message) [!LIBC]: Fall back on strerror if
23149         __strerror_r fails.
23150
23151         * lib/path-concat.c (mempcpy): Don't define if a system header defines
23152         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
23153         (longest_relative_suffix): New function.
23154         (path_concat): Use it.  Assume first argument is not NULL.
23155         Port to DOS.  Omit redundant separators.
23156         Report an error instead of returning NULL.
23157         Use mempcpy instead of memcpy.
23158         (xpath_concat): Remove: not declared or used.
23159
23160         * lib/same.h: Include <stdbool.h>
23161         (same_name): Return bool, not int.
23162         * lib/same.c (same_name): Likewise.
23163         (errno): Don't declare; we assume C89 or better now.
23164
23165         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
23166         if not already defined.
23167
23168         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
23169         * lib/dup-safer.c (errno): Likewise.
23170
23171 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23172
23173         Merge from coreutils.
23174         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
23175         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
23176         * modules/path-concat: Don't depend on strdup.
23177
23178 2004-08-03  Simon Josefsson  <jas@extundo.com>
23179
23180         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
23181         * lib/progname.h: Don't include stdbool.h.
23182
23183 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23184
23185         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
23186         * MODULES.html.sh (func_all_modules): Remove fatal.
23187
23188 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23189
23190         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
23191
23192 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23193
23194         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
23195         working.
23196
23197 2004-08-02  Simon Josefsson  <jas@extundo.com>
23198
23199         * lib/getsubopt.h: New file, with comments from Bruno Haible.
23200         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
23201         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
23202
23203 2004-08-01  Simon Josefsson  <jas@extundo.com>
23204
23205         * lib/xgetdomainname.c: Include stdlib.h, for free().
23206
23207 2004-07-19  Bruno Haible  <bruno@clisp.org>
23208
23209         * MODULES.html.sh (func_all_modules): Add dummy.
23210
23211 2004-07-16  Simon Josefsson  <jas@extundo.com>
23212
23213         * modules/dummy: New file.
23214
23215 2004-07-16  Simon Josefsson  <jas@extundo.com>
23216
23217         * lib/dummy.c: New file.
23218
23219 2004-07-16  Bruno Haible  <bruno@clisp.org>
23220
23221         * lib/backupfile.h: Add extern "C" for C++.
23222         * lib/closeout.h: Likewise.
23223         * lib/copy-file.h: Likewise.
23224         * lib/findprog.h: Likewise.
23225         * lib/full-write.h: Likewise.
23226         * lib/pathname.h: Likewise.
23227         * lib/progname.h: Likewise.
23228         * lib/stpcpy.h: Likewise.
23229         * lib/stpncpy.h: Likewise.
23230         * lib/strcase.h: Likewise.
23231         * lib/strstr.h: Likewise.
23232         * lib/xalloc.h: Likewise.
23233
23234         * lib/mbswidth.h: Add extern "C" for C++.
23235         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
23236
23237 2004-07-13  Robert Millan  <robertmh@gnu.org>
23238
23239         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
23240
23241 2004-07-09  Simon Josefsson  <jas@extundo.com>
23242
23243         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
23244         failed without this.)
23245
23246 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23247
23248         * modules/chown (Files): Add lib/fchown-stub.c, since
23249         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
23250
23251 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23252
23253         * lib/fchown-stub.c: New file.
23254
23255 2004-06-24  Jim Meyering  <jim@meyering.net>
23256
23257         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
23258
23259 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23260
23261         * modules/argz: Omit "#include".
23262
23263         * MODULES.html.sh (func_all_modules): Add calloc, to match
23264         2004-06-01 addition of calloc module.
23265
23266 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23267
23268         * m4/argz.m4: New file, which is autoupdated from libtool.
23269
23270 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23271
23272         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
23273         libtool.
23274
23275 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23276
23277         * config/srclist-update: Don't insist on "USA." before the
23278         close-comment, as libtool omits the period and puts the */ on a
23279         separate line.
23280         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
23281         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
23282
23283 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
23284
23285         * modules/argz: New file.
23286         * MODULES.html.sh (func_all_modules): Add argz.
23287
23288 2004-06-12  Jim Meyering  <jim@meyering.net>
23289         and  Paul Eggert  <eggert@cs.ucla.edu>
23290
23291         * modules/hash (Files): Add lib/xalloc.h.
23292         * modules/pipe (Depends-on): Add wait-process.
23293         * modules/stat (Depends-on): Add xalloc.
23294         * modules/userspec (Files): Add lib/userspec.h.
23295         * modules/xstrto
23296
23297         Upgrade from gettext-0.13.
23298         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
23299         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
23300         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
23301
23302 2004-06-10  Jim Meyering  <jim@meyering.net>
23303
23304         * lib/calloc.c: New file.
23305
23306 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
23307
23308         * lib/getdate.y (yylex): Allow space between sign and number.
23309         Problem reported by Dan Jacobson.
23310
23311 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23312
23313         Merge from coreutils CVS.
23314
23315         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
23316         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
23317         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
23318         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
23319         xstrtol.m4: Fix copyright date and/or serial number.
23320
23321         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
23322         See if we need an fchown replacement.
23323         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
23324         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
23325         and use the replacement function if we detect either defect.
23326
23327         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
23328         gl_UTIMECMP.
23329
23330 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23331         and  Jim Meyering  <jim@meyering.net>
23332
23333         Merge from coreutils CVS.
23334
23335         * lib/stat-macros.h: New file, with contents from file-type.h
23336         and coreutils' system.h.
23337         * lib/file-type.c: Include "stat-macros.h".
23338         * lib/file-type.h (file_type): Move all macro definitions to new file,
23339         stat-macros.h.
23340
23341         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
23342         Wrap old code with this conditional.
23343         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
23344         function that does not dereference symlinks.
23345         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
23346
23347         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
23348         dependency problems.
23349         (xreadlink): Accept new arg SIZE, for efficiency.
23350         All decls and uses changed.
23351         * lib/xreadlink.h: Include <stddef.h>, for size_t.
23352
23353         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
23354         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
23355
23356         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
23357         sysexits.h.
23358
23359 2004-06-01  Jim Meyering  <jim@meyering.net>
23360
23361         * m4/calloc.m4: New file.
23362
23363 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
23364
23365         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
23366         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
23367         Also, fix a typo in a diagnostic.
23368
23369 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23370
23371         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
23372         or AC_FUNC_REALLOC.
23373
23374 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23375
23376         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
23377         macros to be defined.
23378         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
23379         the allocator returns NULL because the requested size is zero.
23380
23381 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
23382
23383         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
23384         var.  Add comment explaining why libc still defines it.  This
23385         merges the following patch from glibc:
23386         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
23387
23388 2004-05-20  Andreas Schwab  <schwab@suse.de>
23389
23390         * m4/free.m4: Replace free if it not known to work, not the other
23391         way round.
23392
23393 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
23394
23395         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
23396         present in glibc since revision 1.1 of this file.
23397         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
23398         obstack_alignment_mask, obstack_alloc, obstack_base,
23399         obstack_blank, obstack_blank_fast, obstack_chunk_size,
23400         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
23401         obstack_grow0, obstack_init, obstack_int_grow,
23402         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
23403         obstack_next_free, obstack_object_size, obstack_ptr_grow,
23404         obstack_ptr_grow_fast, obstack_room): Remove declarations of
23405         nonexistent functions.
23406
23407 2004-05-18  Karl Berry  <karl@gnu.org>
23408
23409         * config/srclist.txt: break link for vasnprintf.c.
23410
23411 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23412
23413         Port obstack to the AS/400, where pointers are 16 bytes wide and
23414         you cannot cast an integer to a valid pointer.  This patch is
23415         currently waiting to be integrated into glibc; see
23416         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
23417
23418         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
23419         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
23420         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
23421         (struct obstack): temp member is now a union of a pointer and
23422         an integer, instead of an integer.  All integer uses changed.
23423         This does not affect the physical layout of struct obstack,
23424         except on hosts (like the AS/400) where the size or alignment of
23425         void * is greater than that of ptrdiff_t.
23426         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
23427         __STDC__)]: Store temporary in pointer member of union, not
23428         integer member.
23429         * lib/obstack.c: Include <stddef.h>, for offsetof.
23430         (struct fooalign): Remove; it doesn't need a name.
23431         (union fooround): Change double to long double, and add void *.
23432         (DEFAULT_ALIGNMENT): Use offsetof to compute.
23433         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
23434         not a macro.  Hence the values are always int; so remove all
23435         casts-to-int in uses.
23436
23437 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23438
23439         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
23440         we can get this patch merged into glibc.
23441
23442 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23443             Paul Eggert  <eggert@cs.ucla.edu>
23444
23445         * m4/argp: Depend on alloca.
23446
23447 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23448             Paul Eggert  <eggert@cs.ucla.edu>
23449
23450         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
23451         freecoding.
23452
23453 2004-05-17  Bruno Haible  <bruno@clisp.org>
23454
23455         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
23456         precision that consists of a '.' followed by an empty digit string.
23457         Patch by Tor Lillqvist <tml@iki.fi>.
23458
23459 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23460
23461         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
23462         for backward compatibility with older code.  We need our own
23463         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
23464         it under some other name, and our alloca.h will define it.
23465
23466 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23467             Derek Price  <derek@ximbiot.com>
23468
23469         * lib/alloca.c: Include <alloca.h>, to get our interface.
23470         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
23471         include <alloca.h> first.  Use C89 prototype for alloca; this
23472         requires including <stddef.h> for size_t.  Use extern "C" if C++.
23473         Use #elif for simplicity, since we can assume C89 now.
23474         Don't try to source the system alloca.h since it will not be found
23475         and to prevent recursively including its replacement.
23476         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
23477         * lib/regex.c: Likewise.
23478
23479 2004-05-16  Derek Price  <derek@ximbiot.com>
23480             Paul Eggert  <eggert@cs.ucla.edu>
23481
23482         getline cleanup.  This changes the getndelim2 API: both order of
23483         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
23484         no delimiter).
23485
23486         * lib/getline.c: Don't include stddef.h or stdio.h, since our
23487         interface does that.
23488         (getline): Always use getdelim, so that we don't have two
23489         copies of this code.
23490         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
23491         if available.
23492         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
23493         (GETNDELIM2_MAXIMUM): New macro.
23494         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
23495         instead of the old practice of delim2==0.  All callers changed.
23496         Return -1 on overflow, instead of returning junk.
23497         Do not set *linesize unless allocation succeeds.
23498         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
23499         that we include sys/types.h.
23500         * lib/getnline.h: Likewise.
23501         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
23502         (getndelim2): Reorder arguments.
23503         * lib/getnline.c (getnline, getndelim):
23504         Don't discard the NMAX argument.
23505         (getnline): Invoke getndelim, to avoid code duplication.
23506         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
23507         of (size_t) -1 by callers of the getnline family.
23508
23509 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23510
23511         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
23512         Check for gettimeofday.
23513         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
23514         Check for settimeofday, stime.
23515
23516 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23517
23518         * lib/nanosleep.c (suspended): Change its type from int to
23519         sig_atomic_t volatile.
23520         (first_call): Make it private to rpl_nanosleep, and have it
23521         be zero initially as that's a bit faster.
23522         (my_usleep): Round up fractional times instead of truncating them,
23523         as this is the usual meaning for 'sleep'.
23524
23525         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
23526         doesn't work.
23527         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
23528         (ENOSYS): Define if not defined.
23529         (settime): Fall back on stime if it exists and settimeofday fails.
23530         But don't bother with fallbacks if a method fails with errno == EPERM.
23531
23532 2004-05-11  Jim Meyering  <jim@meyering.net>
23533
23534         Prior to this change, the save_cwd caller required read access to the
23535         current directory on most systems (ones with the fchdir function).
23536
23537         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
23538         fails, try write-only, and finally, resort to using xgetcwd.
23539
23540 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
23541
23542         * lib/obstack.c, obstack.h: Import changes from libc.
23543
23544 2004-04-28  Bruno Haible  <bruno@clisp.org>
23545
23546         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
23547         also implicitly appends .exe to executables.
23548         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
23549         accepts Windows pathnames.
23550         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23551         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23552         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23553         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23554         Reported by Derek Robert Price <derek@ximbiot.com>.
23555
23556 2004-04-21  Karl Berry  <karl@gnu.org>
23557
23558         * config/srclist.txt (localcharset.c): break sync.
23559
23560 2004-04-20  Paul Eggert  <eggert@twinsun.com>
23561
23562         * m4/host-os.m4: Add a copyright notice.
23563
23564 2004-04-20  Jim Meyering  <jim@meyering.net>
23565
23566         Change UTILS_ to gl_ in AC_DEFINE'd names.
23567         Change utils_- and jm_-prefixed variables, too.
23568         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
23569         UTILS_FUNC_MKDIR_TRAILING_SLASH.
23570         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
23571
23572         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
23573         Don't emit trailing blanks.
23574         Also rename jm_-prefixed variables to have gl_ prefix.
23575
23576         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
23577         Also rename jm_-prefixed variables to have gl_ prefix.
23578
23579         * m4/jm-macros.m4: Reflect the renamings.
23580         * m4/prereq.m4: Likewise.
23581
23582 2004-04-20  Jim Meyering  <jim@meyering.net>
23583
23584         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
23585         memory.
23586
23587 2004-04-20  Jim Meyering  <jim@meyering.net>
23588             Bruno Haible  <bruno@clisp.org>
23589
23590         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
23591         memory when realloc fails.
23592
23593 2004-04-19  Jim Meyering  <jim@meyering.net>
23594
23595         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
23596         now that readutmp.c may call `free (0)'.
23597
23598 2004-04-19  Bruno Haible  <bruno@clisp.org>
23599
23600         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
23601         * m4/inttypes_h.m4: Likewise.
23602         * m4/stdint_h.m4: Likewise.
23603         * m4/intmax_t.m4: Likewise.
23604         * m4/uintmax_t.m4: Likewise.
23605
23606 2004-04-18  Jim Meyering  <jim@meyering.net>
23607
23608         * m4/prereq.m4: Don't forbid jm_ prefix.
23609
23610         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
23611         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
23612         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
23613         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
23614         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
23615         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
23616         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
23617         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
23618         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
23619         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
23620         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
23621         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
23622         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
23623         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
23624         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
23625         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
23626         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
23627         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
23628         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
23629
23630 2004-04-18  Jim Meyering  <jim@meyering.net>
23631
23632         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
23633         failure, don't leak memory and do call END_UTMP_ENT.
23634
23635 2004-04-16  Jim Meyering  <jim@meyering.net>
23636
23637         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
23638         coreutils' stat program.
23639         (gl_PREREQ): Don't require jm_PREREQ_STAT.
23640
23641 2004-04-11  Paul Eggert  <eggert@twinsun.com>
23642
23643         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
23644         C89.
23645         (CHAR_BIT): Remove, since we assume C89.
23646         Include <stdint.h> if available, as per current Autoconf CVS advice.
23647
23648 2004-03-31  Jim Meyering  <jim@meyering.net>
23649
23650         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
23651         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
23652         * m4/xalloc.m4: Likewise.
23653
23654 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23655
23656         Merge from coreutils.
23657
23658         * m4/inttostr.m4: New file.
23659         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
23660         Require AM_STDBOOL_H and gl_TIMESPEC instead.
23661         Require gl_CLOCK_TIME.
23662         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
23663
23664 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23665
23666         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
23667         not bool, to be more consistent with Unix conventions.
23668         Suggested by Bruno Haible.
23669
23670         Merge from coreutils.
23671
23672         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
23673         * lib/umaxtostr.c: New files.
23674
23675         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
23676         the usual <time.h> dance.
23677         (get_date): Change signature to support fractional time stamps.
23678         All callers changed.
23679         * lib/getdate.y: Include "getdate.h" first, as we can now
23680         assume C89 and don't need to worry about 'const'.
23681         Similarly, include "unlocked-io.h" near start, not in middle.
23682         Include <limits.h>.
23683         (textint.value): Use long int rather than int.
23684         (textint.digits): Use size_t rather than int.
23685         (BILLION, LOG10_BILLION): New constants.
23686         (parser_control): New member rel_ns.  Members day_ordinal,
23687         time_zone, month, day, hour, minutes, rel_year, rel_month,
23688         rel_day, rel_hour, rel_minutes, rel_seconds
23689         are now long int, not int.  Member seconds is now struct timespec,
23690         not int.  New member timespec_seen.  Members dates_seen, days_seen,
23691         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
23692         not int.
23693         (%union.intval): Now long int, not int.
23694         New member timespec.
23695         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
23696         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
23697         (spec): Now is a timespec or an item list.
23698         (timespec, items): New nonterminals.
23699         (time, rel, relunit, number, get_date):
23700         Add support for fractional seconds.
23701         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
23702         (gmtime, localtime, mktime): Remove decls; not needed with C89.
23703         (to_hour): First arg is now long int, not int.
23704         (to_year): Returns long int, not int.
23705         Don't treat year -70 like 70.
23706         (tm_diff): Returns long int, not int.
23707         (lookup_word): Use bool instead of int when appropriate.
23708         (yylex): Use size_t for count, not int.
23709         Detect overflow when parsing large integer constants.
23710         Add support for fractions.
23711         (get_date): Make pointers 'const' if possible.
23712         Use more-portable code to detect integer overflow.
23713         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
23714         Don't use ctime; it's not reliable if the year has >4 digits.
23715
23716         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
23717         This is for compatibility with BSD.
23718
23719         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
23720         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
23721         From coreutils' system.h.
23722
23723         * lib/userspec.c: Don't include "posixver.h".
23724         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
23725         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
23726         compatible extension.  Simplify code by removing a boolean int
23727         that was always nonzero if a string was nonnull.
23728
23729 2004-03-30  Jim Meyering  <jim@meyering.net>
23730
23731         Merge from coreutils.
23732
23733         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
23734         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
23735         on some systems one must include <grp.h> before it.
23736         Reported by Christian Krackowizer.
23737
23738 2004-03-30  Jim Meyering  <jim@meyering.net>
23739
23740         Merge from coreutils.
23741
23742         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
23743
23744         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
23745         an empty input stream.
23746
23747         * lib/readtokens.c: Include <stdbool.h>.
23748         (readtoken): Use `size_t' rather than int/long.
23749         All callers adjusted.
23750         Use `bool' rather than `int' where appropriate.
23751         Use memset rather than an explicit loop.
23752         Use x2nrealloc rather than xrealloc.
23753         Allow the use of `\0' as a delimiter.
23754         (readtokens): Likewise.
23755         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
23756
23757 2004-03-30  Jim Meyering  <jim@meyering.net>
23758
23759         * m4/realloc.m4: Remove file, since now it does no more than
23760         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
23761         the `configure.ac' section of module/realloc.
23762         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
23763
23764 2004-03-30  Bruno Haible  <bruno@clisp.org>
23765
23766         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
23767         nonnull.
23768
23769 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23770
23771         Merge changes to getloadavg.c from coreutils and Emacs.
23772
23773         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
23774         Define to an expression, not to the empty string.
23775         Include cloexec.h and xalloc.h.
23776         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
23777         Use set_cloexec_flag rather than rolling our own.
23778         * lib/cloexec.c, lib/cloexec.h: New files.
23779
23780 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23781
23782         * m4/cloexec.m4: New file.
23783
23784 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23785
23786         * lib/getopt.h: Sync with libc CVS.
23787
23788 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23789             Bruno Haible  <bruno@clisp.org>
23790
23791         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
23792         mbswidth.
23793
23794 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23795             Bruno Haible  <bruno@clisp.org>
23796
23797         * lib/mbswidth.h: Include <wchar.h> only if
23798         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
23799         <wchar.h>.
23800         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
23801
23802 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23803
23804         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
23805         Sync with libc CVS.
23806         * lib/getopt_int.h: New file, also synced from libc.
23807
23808 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23809
23810         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
23811         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
23812         Bring back getopt.c, getopt.h, getopt1.c.
23813
23814 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23815
23816         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
23817         All uses changed.  Check for sa_sigaction member; this fixes
23818         a bug first reported by Jason Andrade in
23819         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23820
23821 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23822
23823         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
23824         '#if' expressions.  Unlike the code it replaces, it does not
23825         depend on (defined _SC_PAGESIZE).  However, it does depend on
23826         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
23827         first reported by Jason Andrade in
23828         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23829
23830 2004-02-25  Simon Josefsson  <jas@extundo.com>
23831
23832         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
23833
23834 2004-02-25  Simon Josefsson  <jas@extundo.com>
23835
23836         * lib/strdup.h: New file.
23837         * lib/strdup.c: Include it.
23838         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
23839         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
23840
23841 2004-02-23  Karl Berry  <karl@gnu.org>
23842
23843         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
23844         (from fencepost.gnu.org:/gd/gnuorg).
23845
23846 2004-02-23  Karl Berry  <karl@gnu.org>
23847
23848         * config/srclistvars.sh (GNUORG) [karl]: redefine.
23849         * config/srclist.txt: add maintain/standards documents.
23850
23851 2004-02-18  Bruno Haible  <bruno@clisp.org>
23852
23853         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
23854         Reported by Derek Robert Price <derek@ximbiot.com>.
23855
23856 2004-02-16  Karl Berry  <karl@gnu.org>
23857
23858         * config/mkinstalldirs, install-sh: update from automake.
23859
23860 2004-02-06  Karl Berry  <karl@gnu.org>
23861
23862         * m4/po.m4: update from gettext 0.14.1.
23863
23864 2004-02-06  Karl Berry  <karl@gnu.org>
23865
23866         * lib/config.charset: update from gettext 0.14.1.
23867
23868 2004-02-05  Paul Eggert  <eggert@twinsun.com>
23869
23870         Add comments and code, prompted by suggestions from Bruno Haible
23871         for sh-quote.
23872         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
23873         describing the enum quoting_style values.
23874         * lib/quotearg.c (quotearg_alloc): New function.
23875         (quotearg_buffer_restyled): Treat lone { and } as special.
23876         Treat = as special.  Work around bug with older shells
23877         that "see" a '\' that is really the 2nd byte of a multibyte char.
23878         Quote empty string with shell_quoting_style.
23879
23880 2004-02-03  Bruno Haible  <bruno@clisp.org>
23881
23882         * m4/pipe.m4: New file, from GNU gettext.
23883
23884 2004-02-03  Bruno Haible  <bruno@clisp.org>
23885
23886         * lib/pipe.h: New file, from GNU gettext.
23887         * lib/pipe.c: New file, from GNU gettext.
23888
23889 2004-01-27  Bruno Haible  <bruno@clisp.org>
23890
23891         * m4/execute.m4: New file, from GNU gettext.
23892
23893 2004-01-27  Bruno Haible  <bruno@clisp.org>
23894
23895         * lib/execute.h: New file, from GNU gettext.
23896         * lib/execute.c: New file, from GNU gettext.
23897         * lib/w32spawn.h: New file, from GNU gettext.
23898
23899 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23900
23901         Merge from diffutils.
23902
23903         * lib/file-type.c (file_type): Add typed memory objects.
23904         * lib/file-type.h (S_TYPEISTMO): New macro.
23905
23906         * lib/c-stack.h (c_stack_action): Remove argv argument.
23907         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
23908         (die): Don't calculate message unless segv_action returns.
23909         (get_stack_location, min_address_from_argv, max_address_from_argv,
23910         volatile stack_base, volatile_stack_size): Remove.
23911         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
23912         that every segmentation violation is a stack overflow.  (Ouch!)
23913         See Debian bug 136249 (still outstanding) for more info about why
23914         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
23915
23916 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23917
23918         Exit-status fix from coreutils.
23919
23920         Use exit_failure consistently in place of EXIT_FAILURE,
23921         so that program exit statuses are consistent on failure.
23922
23923         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
23924         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
23925         * lib/argmatch.h: Comment fix to match the above.
23926         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
23927         Now a macro referring to exit_failure, instead of a separate
23928         variable.  Include "exitfail.h" to get it.
23929         * lib/xstrtol.h: Include "exitfail.h".
23930         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
23931
23932         * lib/long-options.c (parse_long_options): Use prototype
23933         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
23934         for clarity.
23935
23936 2004-01-21  Jim Meyering  <jim@meyering.net>
23937
23938         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
23939         so as not to conflict with a different-sized __mktime_internal
23940         function in GNU libc.
23941         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
23942         Problem building statically-linked `ls' reported by Michael Brunnbauer.
23943
23944 2004-01-20  Karl Berry  <karl@gnu.org>
23945
23946         * config/config.guess: update from config.
23947
23948         * config/srclistvars.sh: GNUWWWLICENSES for karl.
23949
23950 2004-01-20  Bruno Haible  <bruno@clisp.org>
23951
23952         Safer stack allocation.
23953         * lib/setenv.c: Include allocsa.h.
23954         (alloca): Remove fallback definition.
23955         (freea): Remove macro.
23956         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
23957         instead of freea.
23958
23959 2004-01-20  Bruno Haible  <bruno@clisp.org>
23960
23961         * m4/eealloc.m4: New file, from GNU gettext.
23962
23963 2004-01-20  Bruno Haible  <bruno@clisp.org>
23964
23965         * m4/allocsa.m4: New file, from GNU gettext.
23966
23967 2004-01-20  Bruno Haible  <bruno@clisp.org>
23968
23969         * lib/xallocsa.h: New file, from GNU gettext.
23970         * lib/xallocsa.c: New file, from GNU gettext.
23971
23972 2004-01-20  Bruno Haible  <bruno@clisp.org>
23973
23974         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
23975
23976 2004-01-20  Bruno Haible  <bruno@clisp.org>
23977
23978         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
23979         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
23980         specially.
23981
23982 2004-01-20  Bruno Haible  <bruno@clisp.org>
23983
23984         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
23985         patch.
23986
23987 2004-01-20  Bruno Haible  <bruno@clisp.org>
23988
23989         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
23990
23991 2004-01-20  Bruno Haible  <bruno@clisp.org>
23992
23993         * lib/eealloc.h: New file.
23994
23995 2004-01-20  Bruno Haible  <bruno@clisp.org>
23996
23997         * lib/binary-io.h: Avoid warnings on Cygwin.
23998
23999 2004-01-20  Bruno Haible  <bruno@clisp.org>
24000
24001         * lib/allocsa.h: New file, from GNU gettext.
24002         * lib/allocsa.c: New file, from GNU gettext.
24003
24004 2004-01-18  Karl Berry  <karl@gnu.org>
24005
24006         * doc/gpl.texi, doc/lgpl.texi: new files.
24007
24008 2004-01-18  Karl Berry  <karl@gnu.org>
24009
24010         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
24011         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
24012
24013 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24014
24015         Merge from coreutils.
24016
24017         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
24018         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
24019         (gl_DEFAULT_POSIX2_VERSION): Move
24020         the documentation from 'configure' into 'config.hin',
24021         so that 'configure --help' isn't burdened by it and
24022         we don't have to worry about its formatting there.
24023         Reword the documentation so that it's more succinct
24024         and can be run together into a single paragraph.
24025         * m4/same.m4 (gl_SAME): Check for pathconf.
24026
24027 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24028
24029         Merge from coreutils.
24030
24031         * lib/posixver.c: Include posixver.h.
24032
24033         * lib/same.c: Include <stdbool.h>, <limits.h>.
24034         (_POSIX_NAME_MAX): Define if not defined.
24035         (MIN): New macro.
24036         (same_name): If file names are silently truncated, report
24037         that the file names are the same if they are the same after
24038         the silent truncation.
24039
24040         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
24041         conversion function.
24042         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
24043         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
24044         longer needed.
24045
24046 2004-01-15  Jim Meyering  <jim@meyering.net>
24047
24048         Merge from coreutils.
24049
24050         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
24051         if no library is required.
24052         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
24053         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
24054         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
24055         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
24056         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
24057         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
24058         value, $ac_cv_search_crypt, if it's "none required".
24059         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
24060         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
24061         not gl_FUNC_GETLOADAVG.
24062         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
24063         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
24064
24065 2004-01-15  Jim Meyering  <jim@meyering.net>
24066
24067         Merge from coreutils.
24068
24069         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
24070         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
24071         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
24072
24073         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
24074         optional configure-time default.
24075
24076         * lib/version-etc.c (version_etc_copyright): Update copyright date.
24077
24078         * lib/xreadlink.c (xreadlink): Correct outdated comment.
24079
24080 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
24081
24082         Merge from coreutils.
24083
24084         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
24085         value, $ac_cv_search_nanosleep, if it's "none required".
24086
24087 2004-01-14  Paul Eggert  <eggert@twinsun.com>
24088
24089         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
24090         with like-named macro in fnmatch.c.
24091         (EXT): Use an internal constant instead.
24092
24093         Merge fnmatch patches from glibc.
24094         * lib/fnmatch.c (mbsinit): Remove define.
24095         Add libc_hidden_ver (__fnmatch, fnmatch).
24096         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
24097         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
24098
24099 2004-01-14  Karl Berry  <karl@gnu.org>
24100
24101         * config/install-sh: update from automake.
24102
24103 2004-01-13  Karl Berry  <karl@gnu.org>
24104
24105         * config/install-sh: update from automake.
24106
24107 2004-01-09  Karl Berry  <karl@gnu.org>
24108
24109         * config/install-sh: update from automake.
24110
24111 2004-01-05  Karl Berry  <karl@gnu.org>
24112
24113         * config/config.{sub,guess}: update from config.
24114
24115 2003-12-31  Karl Berry  <karl@gnu.org>
24116
24117         * config/depcomp: update from automake.
24118
24119 2003-12-14  Karl Berry  <karl@gnu.org>
24120
24121         * lib/config.charset: update from gettext-runtime.
24122
24123 2003-12-03  Paul Eggert  <eggert@twinsun.com>
24124
24125         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
24126         Bug reported by Alfred M. Szmidt.
24127
24128 2003-12-03  Bruno Haible  <bruno@clisp.org>
24129
24130         * m4/gettext.m4: Upgrade from gettext-0.13.
24131         * m4/po.m4: Upgrade from gettext-0.13.
24132         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
24133         * m4/intmax.m4: New file, from gettext-0.13.
24134         * m4/printf-posix.m4: New file, from gettext-0.13.
24135
24136 2003-11-29  Karl Berry  <karl@gnu.org>
24137
24138         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
24139
24140 2003-11-25  Paul Eggert  <eggert@twinsun.com>
24141             Bruno Haible  <bruno@clisp.org>
24142
24143         * lib/printf-parse.h: Don't include sys/types.h.
24144         (ARG_NONE): New macro.
24145         (char_directive): Change type of *arg_index fields to size_t.
24146         * lib/printf-parse.c: Don't include sys/types.h.
24147         (SSIZE_MAX): Remove macro.
24148         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
24149         Remove unnecessary overflow check.
24150         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
24151         fields.
24152
24153 2003-11-25  Bruno Haible  <bruno@clisp.org>
24154
24155         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
24156
24157 2003-11-25  Bruno Haible  <bruno@clisp.org>
24158
24159         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
24160         gt_TYPE_SSIZE_T.
24161
24162 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24163
24164         * modules/alloca: Remove dependency on xalloc.
24165
24166 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24167
24168         * lib/alloca.c: Remove dependency on xalloc module.
24169         (xalloc_die): Remove.
24170         (memory_full) [!defined emacs]: New macro.
24171         [!defined emacs]: Don't include xalloc.h.
24172         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
24173         address arithmetic overflows.  Change datatypes a bit to avoid
24174         unnecessary casts.
24175
24176 2003-11-22  Jim Meyering  <jim@meyering.net>
24177
24178         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
24179         s/size/size_t/.
24180
24181 2003-11-21  Karl Berry  <karl@gnu.org>
24182
24183         * config/config.{sub,guess}: update from config.
24184
24185 2003-11-18  Karl Berry  <karl@gnu.org>
24186
24187         * config/config.{sub,guess}: update from config.
24188
24189         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
24190
24191 2003-11-17  Paul Eggert  <eggert@twinsun.com>
24192
24193         * README: Mention that S+T cannot overflow if S is the size of
24194         an existing object and T is sufficiently small.
24195
24196 2003-11-17  Jim Meyering  <jim@meyering.net>
24197
24198         On systems without utime and without a utimes function capable of
24199         dealing with a NULL struct utimbuf* argument, this utime replacement
24200         could -- in unusual circumstances -- leak a file descriptor.
24201         * lib/utime.c: Include <unistd.h> and <errno.h>.
24202         (utime_null): Be sure to close `fd' and to preserve errno.
24203         Reported by Geoff Collyer via Arnold Robbins.
24204
24205 2003-11-17  Bruno Haible  <bruno@clisp.org>
24206
24207         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
24208         (Depends-on): Add xsize.
24209
24210 2003-11-17  Bruno Haible  <bruno@clisp.org>
24211
24212         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
24213
24214 2003-11-17  Bruno Haible  <bruno@clisp.org>
24215
24216         * lib/vasnprintf.c (alloca): Remove fallback definition.
24217         (freea): Remove definition.
24218         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
24219         Reported by Paul Eggert.
24220
24221 2003-11-16  Paul Eggert  <eggert@twinsun.com>
24222             Bruno Haible  <bruno@clisp.org>
24223
24224         Protect against address arithmetic overflow.
24225         * lib/printf-args.h: Include stddef.h.
24226         (arguments): Change type of field 'count' to size_t.
24227         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
24228         'unsigned int' where appropriate.
24229         * lib/printf-parse.h: Include sys/types.h.
24230         (char_directive): Change type of *arg_index fields to ssize_t.
24231         (char_directives): Change type of fields 'count', max_*_length to
24232         size_t.
24233         * lib/printf-parse.c: Include sys/types.h and xsize.h.
24234         (SSIZE_MAX): Define fallback value.
24235         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
24236         instead of 'int' where appropriate. Check a_allocated, d_allocated
24237         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
24238         * lib/vasnprintf.c: Include xsize.h.
24239         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
24240         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
24241         overflow. Avoid wraparound when converting a width or precision from
24242         decimal to binary.
24243
24244 2003-11-16  Bruno Haible  <bruno@clisp.org>
24245
24246         Update from GNU gettext.
24247         * lib/printf-parse.c: Generalize to it can be compiled for wide
24248         strings.
24249         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
24250         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
24251         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
24252         SNPRINTF): New macros.
24253         Don't include <alloca.h> if the file is used inside libintl.
24254         (local_wcslen): New function, for Solaris 2.5.1.
24255         (VASNPRINTF): Use it instead of wcslen.
24256
24257 2003-11-16  Bruno Haible  <bruno@clisp.org>
24258
24259         * lib/xsize.h (xmax): New function.
24260         (xsum, xsum3, xsum4): Declare as "pure" functions.
24261
24262 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24263
24264         * modules/xalloc (Files): Undo latest change, since xalloc.h
24265         no longer needs SIZE_MAX or PTRDIFF_MAX.
24266
24267 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24268
24269         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
24270         gl_PTRDIFF_MAX.
24271
24272 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24273
24274         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
24275         "return", to pacify some unknown compiler.  Problem reported
24276         by Joerg Schilling.
24277
24278 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24279
24280         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
24281         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
24282         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
24283         heuristic is just as accurate as far as we know, and it removes a
24284         dependency on size_max.m4 and ptrdiff_max.m4.
24285
24286 2003-11-11  Bruno Haible  <bruno@clisp.org>
24287
24288         * modules/xsize (Files): Add m4/size_max.m4.
24289         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
24290
24291 2003-11-11  Bruno Haible  <bruno@clisp.org>
24292
24293         * m4/size_max.m4: New file.
24294         * m4/ptrdiff_max.m4: New file.
24295         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
24296         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
24297         (gl_XALLOC): Invoke it.
24298
24299 2003-11-11  Bruno Haible  <bruno@clisp.org>
24300
24301         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
24302         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
24303         defined.
24304
24305 2003-11-10  Paul Eggert  <eggert@twinsun.com>
24306
24307         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
24308         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
24309         rejected some allocations of exactly SIZE_MAX - 2 bytes.
24310         From Bruno Haible.
24311         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
24312         not (size_t) -1, since it's defined here.
24313
24314 2003-11-09  Karl Berry  <karl@gnu.org>
24315
24316         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
24317
24318 2003-11-06  Paul Eggert  <eggert@twinsun.com>
24319
24320         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
24321         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
24322         Reject sizes of exactly SIZE_MAX bytes.
24323         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
24324         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
24325
24326 2003-11-05  Bruno Haible  <bruno@clisp.org>
24327
24328         * lib/xsize.h: Include limits.h, to avoid a possible collision with
24329         SIZE_MAX defined in <limits.h> on Solaris.
24330
24331 2003-11-04  Jim Meyering  <jim@meyering.net>
24332
24333         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
24334         variable names, rather than @VAR@.
24335         * modules/poll: Likewise.
24336
24337 2003-11-04  Bruno Haible  <bruno@clisp.org>
24338
24339         * modules/xsize: New file.
24340         * modules/linebreak: Depend on xsize.
24341         * MODULES.html.sh (func_all_modules): Add xsize.
24342
24343 2003-11-04  Bruno Haible  <bruno@clisp.org>
24344
24345         * m4/xsize.m4: New file.
24346
24347 2003-11-04  Bruno Haible  <bruno@clisp.org>
24348
24349         * lib/xsize.h: New file.
24350         * lib/linebreak.c: Include xsize.h.
24351         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
24352         argument for overflow.
24353         Suggested by Paul Eggert.
24354
24355 2003-11-03  Karl Berry  <karl@gnu.org>
24356
24357         * config/config.{guess,sub}: update from config.
24358
24359 2003-11-03  Jim Meyering  <jim@meyering.net>
24360
24361         * modules/userspec (lib_SOURCES): Add userspec.h.
24362         (Include): Add "userspec.h".
24363         Improve description.
24364
24365 2003-11-03  Jim Meyering  <jim@meyering.net>
24366
24367         * lib/userspec.c: Include "userspec.h".
24368         * lib/userspec.h: New file.
24369
24370 2003-11-03  Bruno Haible  <bruno@clisp.org>
24371
24372         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
24373
24374 2003-11-03  Bruno Haible  <bruno@clisp.org>
24375
24376         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
24377         available, to avoid (extremely rare) race condition.
24378         Suggested by Paul Eggert.
24379
24380 2003-11-02  Karl Berry  <karl@gnu.org>
24381
24382         * config/srclist.txt (vasprintf.c): sync broken, sigh.
24383
24384 2003-10-31  Paul Eggert  <eggert@twinsun.com>
24385
24386         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
24387         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
24388         (read_filesystem_list): Set and use me_type_malloced.
24389         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
24390         whatever the type happens to be), for brevity and consistency.
24391         Check for size calculation overflow on Alphas running OSF/1.
24392
24393 2003-10-31  Jim Meyering  <jim@meyering.net>
24394
24395         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
24396
24397         * lib/linebuffer.c: Include <string.h> for declaration of memset.
24398
24399 2003-10-30  Paul Eggert  <eggert@twinsun.com>
24400             Bruno Haible  <bruno@clisp.org>
24401
24402         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
24403         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
24404
24405 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
24406
24407         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
24408         netbsd*-gnu*.  Suggested by Robert Millan.
24409
24410 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24411
24412         * modules/group-member: Depend on stdbool.
24413
24414 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24415
24416         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
24417
24418 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24419
24420         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
24421         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
24422         after the 'gnu' in these cases.  This fixes some bugs in the
24423         previous change, and is based on suggestions by Robert Millan.
24424
24425 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24426
24427         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
24428         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
24429         no longer needed.
24430         * lib/quotearg.c (quotearg_n_options): Use it.
24431         * lib/group-member.c: Include <stdbool.h>.
24432         (free_group_info): Arg is now const *; don't free arg.
24433         (get_group_info): Now returns bool and accepts struct group_info *,
24434         rather than returning a malloc'ed struct group_info *.
24435         All uses changed.  Check for overflow in internal size calculation.
24436
24437         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
24438         rather than xmalloc/xrealloc.
24439         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
24440         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
24441         conformance bug: the old code used a pointer after freeing the
24442         storage that it addressed.
24443         * lib/hash.c (hash_initialize): Simplify the code by using
24444         xalloc_oversized rather than doing it by hand.
24445         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
24446         the buffer preserved.  Use free and xmalloc instead.
24447         * lib/quotearg.c (quotearg_n_options): Likewise.
24448         Use a simpler test for size overflow.  Don't use xalloc_oversized
24449         because unsigned int might be wider than size_t (!); this suggests
24450         that we should switch from unsigned int to size_t for slot numbers.
24451
24452 2003-10-28  Paul Eggert  <eggert@twinsun.com>
24453
24454         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
24455         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
24456         NetBSD kernels.  Requested by Richard Stallman.
24457
24458 2003-10-27  Paul Eggert  <eggert@twinsun.com>
24459
24460         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
24461         to allocate the returned structure.  Do not allocate a subarray,
24462         as x2nrealloc will do that.
24463         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
24464         instead of xnrealloc.
24465         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
24466
24467 2003-10-27  Bruno Haible  <bruno@clisp.org>
24468
24469         * lib/stdbool_.h: Better support for BeOS.
24470
24471 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24472
24473         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
24474         now uses inline.
24475
24476 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24477
24478         * lib/xalloc.h (xalloc_oversized): New static inline function, for
24479         callers that want to do their own size-overflow checking.  Include
24480         <stdbool.h>, since xalloc_oversized returns bool.
24481         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
24482         to use xalloc_oversized.
24483
24484         Add two functions x2realloc, x2nrealloc, for programs that grow
24485         arrays dynamically by doubling their sizes.
24486         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
24487         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
24488         New functions.
24489
24490         Port to C99 semantics for 'inline' of external functions.
24491         Bug reported by Bruno Haible.
24492         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
24493         with the old contents of xnmalloc.
24494         (xnmalloc, xmalloc): Use it.
24495         (xnrealloc_inline): New static inline function,
24496         with the old contents of xnrealloc.
24497         (xnrealloc, xrealloc): Use it.
24498
24499         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
24500         that.
24501
24502 2003-10-26  Karl Berry  <karl@gnu.org>
24503
24504         * config/srclist.txt (COPYING.DOC): no longer available from
24505         /gd/gnuorg; don't know where the ultimate source is.
24506
24507 2003-10-25  Paul Eggert  <eggert@twinsun.com>
24508
24509         Fix several address-calculation bugs in the hash modules,
24510         plus some minor code cleanup.
24511
24512         * lib/hash.h: Include <stdbool.h>, for bool.
24513         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
24514         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
24515         hash_get_n_entries, hash_get_max_bucket_length,
24516         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
24517         hash_rehash): Use size_t rather than unsigned.
24518         * lib/hash.c (struct hash_table, hash_get_n_buckets,
24519         hash_get_n_buckets_used, hash_get_n_entries,
24520         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
24521         hash_get_entries, hash_do_for_each, hash_string, is_prime,
24522         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
24523         Likewise.
24524         (SIZE_MAX): Define if not defined.
24525         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
24526         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
24527         hash_print):
24528         Use const * when possible.
24529         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
24530         (check_tuning): Fix bug: if tuning parameters were very close to
24531         0 or 1, rounding errors could have caused subscript violations.
24532         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
24533         (hash_initialize): Add 'fail:' label
24534         to free table and return NULL, and use it to simplify code.
24535         Use calloc rather than clearing the storage ourself.
24536         (hash_initialize, hash_rehash): Check for arithmetic overflow in
24537         buffer size calculations.
24538         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
24539         Include <stddef.h>, for size_t.
24540         * lib/hash-pjw.c (hash_pjw): Likewise.
24541         Switch to method described by Bruno Haible.
24542         Include <limits.h>, for CHAR_BIT.
24543         (SIZE_BITS): New macro.
24544
24545 2003-10-23  Paul Eggert  <eggert@twinsun.com>
24546
24547         * m4/getline.m4 (AM_FUNC_GETLINE):
24548         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
24549         hosts.  Problem reported by Derek Robert Price in
24550         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
24551         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
24552         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
24553
24554 2003-10-21  Paul Eggert  <eggert@twinsun.com>
24555
24556         * lib/getndelim2.c (getndelim2): When size calculation overflows,
24557         ceiling the allocation at NMAX bytes rather than silently
24558         discarding input bytes before NMAX is reached.  This makes
24559         a difference only if NMAX exceeds SIZE_MAX / 2.
24560
24561         * lib/obstack.c: Merge from glibc.
24562         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
24563         Add libc_hidden_def (_obstack_newchunk).
24564         (_obstack_free) [! defined _LIBC]: Remove.
24565         [defined _LIBC]: Make a strong alias from obstack_free, rather than
24566         a clone of the function body.
24567         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
24568         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
24569
24570         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
24571         glibc.
24572         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
24573         arg to memcpy.
24574
24575         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
24576         (obstack_ptr_grow_fast, obstack_int_grow_fast):
24577         Don't use lvalue casts, as GCC plans to remove support for them
24578         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
24579         was also present in the non-GCC version, indicating that this
24580         code had always been buggy and had never been widely used.
24581         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
24582         Use the fast variant of each macro, rather than copying the
24583         definiens of the fast variant; that way, we'll be more likely to
24584         catch future bugs in the fast variants.
24585
24586 2003-10-20  Bruno Haible  <bruno@clisp.org>
24587
24588         * modules/wait-process: New file.
24589         * MODULES.html.sh (func_all_modules): Add wait-process.
24590
24591 2003-10-20  Bruno Haible  <bruno@clisp.org>
24592
24593         * m4/wait-process.m4: New file.
24594
24595 2003-10-20  Bruno Haible  <bruno@clisp.org>
24596
24597         * lib/wait-process.h: New file, from GNU gettext.
24598         * lib/wait-process.c: New file, from GNU gettext.
24599
24600 2003-10-19  Jim Meyering  <jim@meyering.net>
24601
24602         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
24603         HPUX 10.20.
24604
24605 2003-10-18  Karl Berry  <karl@gnu.org>
24606
24607         * config/config.guess: update from config.
24608
24609 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24610
24611         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
24612         (getgroups): First arg is int, not size_t.
24613         Don't let 'free' mangle errno.
24614
24615 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24616
24617         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
24618
24619 2003-10-16  Karl Berry  <karl@gnu.org>
24620
24621         * config/config.{guess,sub}: update from config.
24622
24623 2003-10-16  Jim Meyering  <jim@meyering.net>
24624
24625         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
24626         memcpy.
24627
24628 2003-10-15  Paul Eggert  <eggert@twinsun.com>
24629
24630         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
24631         (SIZE_MAX): Remove.
24632         (new_exclude, add_exclude_file): Initial size no longer needs to
24633         be a power of 2.
24634         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
24635         our own address arithmetic overflow checking.
24636
24637         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
24638         (fnmatch): Do not alloca more than 2000 wide characters;
24639         instead, use malloc for large buffers.
24640         Check for address arithmetic overflow, and return -1
24641         with errno set to ENOMEM in that case.
24642         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
24643         (NEW_PATTERN): Do not alloca more than 8000 bytes;
24644         instead, return -1.  Check for address arithmetic overflow.
24645
24646 2003-10-14  Paul Eggert  <eggert@twinsun.com>
24647
24648         Handle invalid suffixes and overflow independently, so that
24649         callers can treat them independently as needed.  Fix some bugs in
24650         suffix handling, e.g., "100k@" was not diagnosed as an invalid
24651         suffix for a human-readable blocksize.  The major caller-visible
24652         change is the addition of a new
24653         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
24654         that both overflow and suffix chars were found.
24655
24656         * lib/human.c (humblock): Don't check separately for invalid suffix
24657         char; that is xstrtoumax's job (now that its bug is fixed).
24658         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
24659         INTMAX_MAX]: New macros.
24660         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
24661         TYPE_MAXIMUM): New macros.
24662         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
24663         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
24664         if overflow occurs, as it's what __strtol does and it's more useful
24665         in practice.
24666         (__xstrtol): If __strtol reports some error other than ERANGE,
24667         reflect it to the caller as LONGINT_INVALID.  If it reports
24668         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
24669         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
24670         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
24671         value.
24672         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
24673         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
24674         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
24675         [defined UINTMAX_MAX]: New macros.
24676
24677 2003-10-14  Bruno Haible  <bruno@clisp.org>
24678
24679         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
24680
24681 2003-10-14  Bruno Haible  <bruno@clisp.org>
24682
24683         * m4/sig_atomic_t: New file, from GNU gettext.
24684         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
24685
24686 2003-10-14  Bruno Haible  <bruno@clisp.org>
24687
24688         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
24689         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
24690         Also use volatile where needed.
24691
24692 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24693
24694         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
24695         Change maintainer from Bruno Haible to 'all'.
24696
24697 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24698
24699         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
24700
24701 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24702
24703         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
24704         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
24705         and define in terms of the other primitives.
24706         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
24707         (SIZE_MAX): Define if not already defined.
24708         (array_size_overflow): New function.
24709         (xalloc_die): Abort instead of exiting if 'error' returns.
24710         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
24711         (xmalloc, xrealloc): Use them.
24712         (xcalloc): Check for address arithmetic overflow.
24713         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
24714         a bit faster than strcpy.
24715
24716 2003-10-10  Simon Josefsson  <jas@extundo.com>
24717
24718         * modules/argp (Depends-on): Add restrict and strcase.
24719
24720 2003-10-10  Simon Josefsson  <jas@extundo.com>
24721
24722         * m4/argp.m4: Add AC_C_INLINE.
24723
24724 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24725
24726         Merge getpass from libc, plus a few fixes.
24727
24728         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
24729         Include <stdbool.h>.
24730         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
24731         __fsetlocking to empty.
24732         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
24733         do include <bits/libc-lock.h>.
24734         Do not include <fcntl.h>; not needed.
24735         [_LIBC]: Include <wchar.h>.
24736         (NOTCANCEL_MODE): New macro.
24737         (flockfile, funlockfile) [_LIBC]: New macros.
24738         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
24739         [!_LIBC]: New macros.
24740         (call_fclose): New function.
24741         (getpass): Use it.  Save tty stream separately; this simplifies the
24742         code and makes it more reliable if stdin happens to equal stdout.
24743         Invoke __fsetlocking on tty.
24744         Handle thread cancellation if needed.
24745         Namespace cleanup (use __tcgetattr, __getline).
24746         Use bool for Booleans.
24747         [USE_IN_LIBIO]: Handle wide streams.
24748         [!_LIBC]: Unconditionally do the fseek, since we don't know what
24749         stream might go where.
24750
24751         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
24752         doesn't have to include <stdio.h> before us.
24753         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
24754         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
24755         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
24756         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
24757         if not declared, so that we can use getpass.c code from libc without
24758         rewriting it.
24759         (flockfile, ftrylockfile, funlockfile): New macros.
24760
24761 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24762
24763         * modules/getpass: Depend on stdbool.
24764
24765 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24766
24767         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
24768
24769 2003-10-07  Karl Berry  <karl@gnu.org>
24770
24771         * config/config.{guess,sub}: update from config.
24772
24773 2003-10-06  Jim Meyering  <jim@meyering.net>
24774             Bruno Haible  <bruno@clisp.org>
24775
24776         This lets translators provide better translations for the
24777         "Written by ..." part of --version output.
24778         * lib/version-etc.h: Include stdarg.h.
24779         (version_etc_copyright): Declare as readonly.
24780         (version_etc): Make this function variadic with a NULL-terminated list
24781         of author name strings.
24782         (version_etc_va): New declaration.
24783         * lib/version-etc.c: Include stdarg.h, stdlib.h.
24784         (version_etc_copyright): Declare as readonly.
24785         (version_etc_va): New function. Provide a different translatable string
24786         for each possible number of authors < 10. Abbreviate when there are 10
24787         authors or more.
24788         (version_etc): Make this function variadic. Call version_etc_va.
24789         Suggestion from Gary V. Vaughan.
24790
24791         * lib/long-options.h (parse_long_options): Change prototype: the
24792         authors string is moved to the end and becomes variadic.
24793         * lib/long-options.c: Include stdarg.h.
24794         (parse_long_options): Make this function variadic, too.
24795         Call version_etc_va, not version_etc.
24796
24797 2003-10-06  Bruno Haible  <bruno@clisp.org>
24798
24799         * modules/version-etc-2: Remove file.
24800         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
24801
24802 2003-10-06  Bruno Haible  <bruno@clisp.org>
24803
24804         * modules/fatal-signal: New file.
24805         * MODULES.html.sh (func_all_modules): Add fatal-signal.
24806
24807 2003-10-06  Bruno Haible  <bruno@clisp.org>
24808
24809         * m4/fatal-signal.m4: New file.
24810         * m4/signalblocking.m4: New file, from GNU gettext.
24811
24812 2003-10-06  Bruno Haible  <bruno@clisp.org>
24813
24814         * lib/version-etc-2.h: Remove file.
24815         * lib/version-etc-2.c: Remove file.
24816
24817 2003-10-06  Bruno Haible  <bruno@clisp.org>
24818
24819         * lib/fatal-signal.h: New file, from GNU gettext.
24820         * lib/fatal-signal.c: New file, from GNU gettext.
24821
24822 2003-10-05  Paul Eggert  <eggert@twinsun.com>
24823
24824         * README: Rework advice for preventing empty .o files.
24825         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
24826         not <sys/types.h>.
24827
24828 2003-10-04  Karl Berry  <karl@gnu.org>
24829
24830         * lib/argp*: update from libc.
24831
24832 2003-10-04  Karl Berry  <karl@gnu.org>
24833
24834         * config/config.{guess,sub}: update from config.
24835
24836 2003-10-02  Bruno Haible  <bruno@clisp.org>
24837
24838         * modules/lchown (Include): Add lchown.h.
24839         * modules/time_r (Include): Use "..." syntax.
24840         * modules/xgetdomainname (Include): Add xgetdomainname.h.
24841
24842 2003-10-01  Simon Josefsson  <jas@extundo.com>
24843
24844         * MODULES.html.sh (func_all_modules): Move gethostname from section
24845         'based on' to section 'lacking' POSIX:2001.
24846
24847 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
24848
24849         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
24850         to output mode on the same stream.
24851
24852 2003-09-29  Paul Eggert  <eggert@twinsun.com>
24853
24854         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
24855         Fix arg typo in previous patch.
24856
24857 2003-09-28  Jim Meyering  <jim@meyering.net>
24858
24859         * lib/error.c: Correct cpp indentation.
24860
24861 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24862
24863         * modules/free: New file.
24864
24865 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24866
24867         * m4/free.m4: New file.
24868
24869 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24870
24871         * lib/minmax.h (MIN, MAX)
24872         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
24873         Omit the special code that used __typeof__, since we worry that
24874         it could be more trouble than it's worth.  See:
24875         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
24876         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
24877
24878         * lib/free.c: New file.
24879
24880 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
24881
24882         Trivial fixes to Makefile.am parts of module listings.
24883         * modules/strstr: Append strstr.h to lib_SOURCES.
24884         * modules/strcase: Likewise, for strcase.h.
24885
24886 2003-09-27  Karl Berry  <karl@gnu.org>
24887
24888         * config/mkinstalldirs: update from automake.
24889
24890 2003-09-26  Paul Eggert  <eggert@twinsun.com>
24891
24892         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
24893         (error_tail): Do not loop, reallocating temporary buffer, since
24894         the output cannot contain more wide characters than the input
24895         contains bytes, the size must be big enough already.  This avoids
24896         one potential size overflow calculation.  Check for size overflow
24897         when calculating temporary buffer size.  Free temporary buffer
24898         when done, if it was allocated with malloc; this plugs a memory
24899         leak.  Remove casts from void * to pointers, that are no longer
24900         needed now that we're assuming C89 or better.
24901
24902         Merge error changes from glibc.
24903
24904         * lib/error.c, error.h: Update copyright notice header to match glibc.
24905         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
24906         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
24907         Disable cancellation while printing error.
24908         * lib/error.h: Prepend __ to parameter names.
24909
24910 2003-09-26  Jim Meyering  <jim@meyering.net>
24911
24912         * lib/error.c (error_tail): Move some declarations
24913         into inner scope where the local variables are used.
24914
24915 2003-09-26  Bruno Haible  <bruno@clisp.org>
24916
24917         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
24918         stpncpy().
24919         Don't define stpncpy through config.h; it's now done through stpncpy.h.
24920
24921 2003-09-26  Bruno Haible  <bruno@clisp.org>
24922
24923         * lib/stpncpy.h (gnu_stpncpy): New declaration.
24924         (stpncpy): Define as alias for gnu_stpncpy.
24925         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
24926
24927 2003-09-25  Simon Josefsson  <jas@extundo.com>
24928
24929         * lib/xgetdomainname.h: New file.
24930         * lib/xgetdomainname.c: New file.
24931
24932 2003-09-25  Simon Josefsson  <jas@extundo.com>
24933             Bruno Haible  <bruno@clisp.org>
24934
24935         * modules/getdomainname: New file.
24936         * modules/xgetdomainname: New file.
24937         * MODULES.html.sh (func_all_modules): Add getdomainname,
24938         xgetdomainname.
24939
24940 2003-09-25  Simon Josefsson  <jas@extundo.com>
24941             Bruno Haible  <bruno@clisp.org>
24942
24943         * m4/getdomainname.m4: New file.
24944
24945 2003-09-25  Simon Josefsson  <jas@extundo.com>
24946             Bruno Haible  <bruno@clisp.org>
24947
24948         * lib/getdomainname.h: New file.
24949         * lib/getdomainname.c: New file.
24950
24951 2003-09-25  Karl Berry  <karl@gnu.org>
24952
24953         * lib/argp-fmtstream.c, argp-help.c: update from libc.
24954
24955 2003-09-25  Karl Berry  <karl@gnu.org>
24956
24957         * config/install-sh: update from automake.
24958
24959 2003-09-25  Bruno Haible  <bruno@clisp.org>
24960
24961         * modules/version-etc-2: New file, from modules/version-etc with
24962         modifications.
24963         * MODULES.html.sh (func_all_modules): Add version-etc-2.
24964
24965 2003-09-25  Bruno Haible  <bruno@clisp.org>
24966
24967         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
24968         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
24969
24970 2003-09-24  Simon Josefsson  <jas@extundo.com>
24971
24972         * modules/xgethostname: Add xgethostname.h.
24973
24974 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24975
24976         * lib/linebuffer.c (freebuffer): Don't free the argument, just
24977         the buffer associated with the argument.  Bug reported by
24978         Simon Josefsson.
24979
24980 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24981
24982         * README: Document assumptions that 'int' is at least 32 bits
24983         wide, that integer arithmetic is 2's complement without overflow,
24984         that there are no holes in integer values, that adding sizes of
24985         two nonoverlapping objects can't overflow, and that all-bits-zero
24986         yields scalar zero.  Fix spelling and capitalization typos.
24987
24988 2003-09-19  Karl Berry  <karl@gnu.org>
24989
24990         * lib/argp.h: update from libc.
24991
24992 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24993
24994         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
24995         to avoid spurious warnings like "AC_RUN_IFELSE was called before
24996         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
24997
24998 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24999
25000         * gnulib-tool: Use "test -h", not "test -L", for portability
25001         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
25002         (tags_regexp): Remove, since \| doesn't conform to POSIX.
25003         (sed_extract_prog): Issue s commands one-by-one, rather than
25004         using \| in one s command.
25005
25006 2003-09-16  Paul Eggert  <eggert@twinsun.com>
25007
25008         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
25009         input error, instead of returning NULL the next time we are called
25010         (and therefore losing track of errno).
25011
25012 2003-09-16  Bruno Haible  <bruno@clisp.org>
25013
25014         * gnulib-tool (func_create_testdir): Warn about duplicated
25015         dependencies.
25016
25017 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25018
25019         * modules/argmatch, modules/fatal, modules/obstack,
25020         modules/xalloc, modules/xgethostname: Sort dependencies by
25021         importance, not alphabetically.
25022
25023 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25024
25025         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
25026         fails, so that the caller gets the proper errno.
25027
25028         * lib/readutmp.c (read_utmp): Likewise.
25029         Check for fstat error.  Close stream and free storage
25030         when failing.
25031
25032 2003-09-14  Karl Berry  <karl@gnu.org>
25033
25034         * config/srclist.txt (strdup.c): disable for c89 changes.
25035
25036 2003-09-14  Jim Meyering  <jim@meyering.net>
25037
25038         * lib/getloadavg.c: Correct cpp indentation.
25039         * lib/strdup.c: Likewise.
25040         * lib/vasnprintf.c: Likewise.
25041
25042 2003-09-14  Bruno Haible  <bruno@clisp.org>
25043
25044         * modules/fwriteerror: New file.
25045         * MODULES.html.sh (func_all_modules): Add fwriteerror.
25046
25047 2003-09-14  Bruno Haible  <bruno@clisp.org>
25048
25049         * lib/fwriteerror.h: New file.
25050         * lib/fwriteerror.c: New file.
25051
25052 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25053
25054         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
25055         modules/xgethostname, modules/xalloc: Depend on exit.
25056
25057 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25058
25059         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
25060
25061         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
25062         and AC_MINIX, too, so that their extensions are available.
25063
25064         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
25065         This macro has been superseded by gl_BACKUPFILE.
25066
25067         More patches to assume C89 or better.
25068
25069         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
25070
25071         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
25072         unconditionally.
25073         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
25074         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
25075         Include <string.h>, <stdlib.h> unconditionally.
25076         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
25077         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
25078         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
25079         headers or for string.h.
25080         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
25081         or strtoul.
25082
25083         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
25084         headers.
25085         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
25086         * m4/userspec.m4 (gl_USERSPEC): Likewise.
25087         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
25088         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
25089         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
25090         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
25091         memcpy, memset.
25092         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
25093         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
25094         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
25095         strtol.
25096         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
25097         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
25098         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
25099         strtoul.
25100
25101 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25102
25103         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
25104         * lib/obstack.c [!defined _LIBC]: Likewise.
25105         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
25106         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
25107         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
25108
25109         More changes to assume C89 or better.
25110
25111         * lib/error.c (error_tail): Assume vprintf.
25112
25113         * lib/argmatch.c (getenv): Remove decl.
25114         * lib/progreloc.c (get_full_program_name): Define via prototype.
25115         * lib/setenv.c (clearenv): Likewise.
25116         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
25117         needed.
25118         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
25119         (malloc, memcpy): Remove decls.
25120         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
25121         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
25122         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25123         (memcpy): Remove macro.
25124         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
25125         (__P): Remove.  All uses removed.
25126         (PTR): Remove.  All uses changed to void *.
25127         (CHAR_BIT, NULL): Remove.
25128         (spaces, zeros, memset_space, memset_zero)
25129         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
25130         Remove.
25131         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
25132         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
25133         Define with prototype.
25134         Remove now-unnecessary prototype decl.
25135         (extra_args_spec): Assume ANSI C.  All uses changed.
25136         (extra_args_spec_iso): Remove.
25137         (my_strftime, emacs_strftimeu): Define via prototype.
25138         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
25139         unconditionally.
25140         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
25141         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
25142         (strtoul, strtol): Remove decls.
25143         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
25144         LONG_MAX): Remove.
25145         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25146         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
25147         (LOCALE_PARAM_PROTO): New macro.
25148         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
25149         (INTERNAL (strtol), strtol): Define with a prototype.
25150         (PARAMS): Remove.  All uses removed.
25151         * lib/tempname.c: Include <string.h> unconditionally.
25152         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
25153         * lib/xgethostname.c (main): Define with a prototype.
25154         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
25155         Include <stdlib.h> unconditionally.
25156         (calloc, malloc, realloc, free): Remove decls.
25157         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
25158         Include <stdlib.h> unconditionally.  Sort include file names.
25159         (strtod): Remove.
25160         (xstrtod): Define with a prototype.
25161         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
25162         (strtol, strtoul): Remove decls.
25163
25164 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25165
25166         More patches to assume C89 or better.
25167         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
25168         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
25169         string.h, memchr, STDC_HEADERS.
25170
25171 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25172
25173         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
25174         Include <stdlib.h>, <string.h> unconditionally.
25175         Remove now-unnecessary cast to char *.
25176         * lib/strnlen.c: Include <string.h> unconditionally.
25177         * lib/yesno.c (yesno): Define with a prototype.
25178
25179 2003-09-11  Bruno Haible  <bruno@clisp.org>
25180
25181         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
25182
25183 2003-09-10  Jim Meyering  <jim@meyering.net>
25184
25185         * lib/error.c: Correct indentation of cpp directives.
25186
25187 2003-09-10  Bruno Haible  <bruno@clisp.org>
25188
25189         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
25190         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
25191         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
25192         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
25193         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
25194         <stdlib.h> and <string.h> checks.
25195         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
25196         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
25197
25198 2003-09-10  Bruno Haible  <bruno@clisp.org>
25199
25200         * lib/strcspn.c: Include <string.h> unconditionally.
25201         * lib/strpbrk.c: Include <string.h> unconditionally.
25202         * lib/strstr.c: Include <string.h> unconditionally.
25203         * lib/unicodeio.c: Include <string.h> unconditionally.
25204         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
25205         * lib/unsetenv.c: Likewise.
25206         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
25207         * lib/yesno.c: Include <stdlib.h> unconditionally.
25208         (rpmatch): Add prototype.
25209
25210 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25211
25212         More patches to assume C89 or better.
25213         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
25214         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
25215         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
25216         or for string.h.
25217         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
25218         stdlib.h.
25219         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
25220         C headers.
25221         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
25222         string.h.
25223         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
25224         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
25225         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
25226         or for string.h.
25227         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
25228         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
25229         C headers.
25230         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
25231         memcpy.
25232         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
25233         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
25234         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
25235         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
25236         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
25237         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
25238         string.h, free.
25239         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
25240         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
25241         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
25242         C headers, or for string.h.
25243         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
25244         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
25245         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
25246         headers, memory.h, stdlib.h, string.h, strings.h.
25247         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
25248         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
25249         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
25250         strchr.
25251         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
25252         headers, memory.h, string.h.
25253         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
25254         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
25255         free.
25256         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
25257         headers.
25258         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
25259         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
25260         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
25261         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
25262         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
25263
25264 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25265
25266         More K&R removal.
25267
25268         * lib/acosl.c (main): Use a prototype.
25269         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
25270         tanl.c: Likewise.
25271
25272         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
25273
25274         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
25275         (getopt, etopt_long, getopt_long_only, _getopt_internal)
25276         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
25277         with a prototype.
25278         * lib/getopt.c (const): Remove macro.
25279         Include <string.h> unconditionally.
25280         (my_index): Remove; all uses changed to strchr.
25281         (strlen): Remove decl.
25282         (exchange): Remove forward decl; no longer needed.
25283         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
25284         Define with prototype.
25285         * lib/getopt1.c (const): Remove macro.
25286         (getopt_long, getopt_long_only, main): Define with prototype.
25287
25288         * lib/getugroups.c: Include <string.h> unconditionally.
25289
25290         * lib/getusershell.c: Include <stdlib.h> unconditionally.
25291         (getusershell, setusershell, endusershell, readname, main):
25292         Define with prototypes.
25293
25294         * lib/group-member.c: Include group-member.h first.
25295         Include <stdlib.h> unconditionally.
25296
25297         * lib/hard-locale.c: Include hard-locale.h first.
25298         Include <stdlib.h>, <string.h> unconditionally.
25299
25300         * lib/hash.c (free, malloc): Remove decls.
25301         Include <stdlib.h> unconditionally.
25302
25303         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
25304         (getenv): Do not declare.
25305
25306         * lib/idcache.c: Include <string.h> unconditionally.
25307
25308         * lib/long-options.c: Include long-options.h first, to test interface.
25309         Include <stdlib.h> unconditionally.
25310
25311         * lib/makepath.c: Include makepath.h first, to test interface.
25312         Include <stdlib.h> and <string.h> unconditionally.
25313
25314         * lib/linebuffer.c: Include <stdlib.h>.
25315         (free): Remove decl.
25316
25317         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
25318         stddef.h. rpl_malloc returns void *, not char *.
25319         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
25320         prototype.
25321
25322         * lib/md5.h: Include <limits.h> unconditionally.
25323         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
25324         (__P): Remove; all uses removed.
25325         * lib/md5.c: Include "md5.h" first.
25326         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
25327         md5_buffer, md5_process_bytes, md5_process_block):
25328         Define with prototypes.
25329         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
25330         * lib/sha.c: Include "sha.h" first.
25331         Include <stdlib.h>, <string.h> unconditionally.
25332
25333         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
25334         * lib/memcmp.c (__ptr_t): Likewise.
25335         * lib/memrchr.c (__ptr_t): Likewise.
25336         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
25337         Include <string.h> unconditionally.
25338         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
25339         * lib/memchr.c: Include <stdlib.h> unconditionally.
25340         * lib/memchr.c (LONG_MAX): Remove.
25341         * lib/memrchr.c (LONG_MAX): Likewise.
25342         * lib/memchr.c (__memchr): Define via a prototype.
25343         * lib/memrchr.c (__memrchr): Likewise.
25344         * lib/memcmp.c (__P): Remove, and remove all uses.
25345         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
25346         Remove forward decls; no longer needed.
25347         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
25348         Use types required by C89 in prototype.
25349
25350         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
25351         * lib/savedir.c: Likewise.
25352         * lib/mkdir.c (free): Remove decl.
25353         * lib/rmdir.c (rmdir): Define with a prototype.
25354         * lib/savedir.c: Include savedir.h first, to test interface.
25355
25356         * lib/mktime.c (STDC_HEADERS): Remove.
25357         Include <stdlib.h>, <string.h> unconditionally.
25358
25359         * lib/modechange.c: Include <stdlib.h> unconditionally.
25360         (malloc): Remove decl.
25361
25362         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
25363         (free): Remove decl.
25364
25365         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
25366         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
25367         (This type really should be intptr_t, but that's a C99ism.)
25368         (_obstack_memcpy): Remove: all uses changed to memcpy.
25369         Include <string.h> unconditionally.
25370         (struct obstack): Assume __STDC__ for types of members
25371         chunkfun, freefun, extra_arg.
25372         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
25373         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
25374         obstack_begin, obstack_specify_allocation,
25375         obstack_specify_allocation_with_arg, obstack_chunkfun,
25376         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
25377         Remove unprototyped decls and the macros that use them.
25378         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
25379         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
25380         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
25381         (defined __STDC__ && __STDC__)]:
25382         Remove nonprototyped code.
25383         Include <stdlib.h> unconditionally.
25384         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
25385         _obstack_allocated_p, _obstack_free, obstack_free,
25386         _obstack_memory_used, print_and_abort):
25387         Define using prototypes.
25388         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
25389         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
25390         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
25391         obstack_next_free, obstack_object_size, obstack_room) [0]:
25392         Remove unused, unprototyped code.
25393
25394         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
25395
25396         * lib/physmem.c (physmem_total, physmem_available, main): Define
25397         with prototypes.
25398
25399         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
25400         (main): Define with a prototype.
25401
25402         * lib/posixver.c (getenv): Remove decl.
25403
25404         * lib/putenv.c (malloc): Returns void *, not char *.
25405         Include <string.h> unconditionally.
25406         (strchr, memcpy, NULL): Do not define.
25407
25408         * lib/readtokens.c: Include readtokens.h first, to test interface.
25409         Include <stdlib.h>, <string.h> unconditionally.
25410         (init_tokenbuffer): Define with a prototype.
25411
25412         * lib/regex.c (PARAMS): Remove.  All uses removed.
25413         All uses of _RE_ARGS removed, too.
25414         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
25415         unconditionally.
25416         (bzero): Assume memset exists.
25417         (memcmp, memcpy, NULL): Remove.
25418         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
25419         char, or assignments to local vars of type signed char.
25420         (init_syntax_once, PREFIX(extract_number_and_incr),
25421         PREFIX(print_partial_compiled_pattern),
25422         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
25423         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
25424         PREFIX(regex_grow_registers), PREFIX(regex_compile),
25425         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
25426         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
25427         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
25428         wcs_compile_range, byte_compile_range, truncate_wchar,
25429         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
25430         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
25431         count_mbs_length, wcs_re_match_2_internal,
25432         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
25433         PREFIX(alt_match_null_string_p),
25434         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
25435         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
25436         regfree, PREFIX(extract_number)): Define with prototype.  Remove
25437         now-unnecessary declaration, if any.
25438         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
25439         regcomp, regexec):
25440         Remove now-unnecessary casts among pointer types.
25441         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
25442
25443         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
25444         (free): Remove decl.
25445
25446         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
25447
25448         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
25449         (free): Remove decl.
25450
25451         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
25452         * lib/xgetcwd.c: Likewise.
25453
25454         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
25455         (free): Remove decl.
25456
25457         * lib/strchrnul.c (strchrnul): Define with a prototype.
25458         Fix bug: c_in was not converted to char before searching.
25459
25460         The following changes are not K&R related:
25461
25462         * lib/group-member.h: Include <sys/types.h>, so that this file is
25463         self-contained.
25464         * lib/makepath.h: Likewise.
25465
25466         * lib/getusershell.c (readname, default_index, line_size, readname):
25467         Use size_t, not int, for sizes.
25468         (readname): If the size overflows, report an error instead of
25469         looping forever.
25470
25471 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25472
25473         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
25474         libc.
25475
25476 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25477
25478         * README: New section: portability guidelines.
25479
25480 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25481
25482         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
25483         C89 spec.
25484
25485 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25486
25487         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
25488
25489 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25490
25491         Assume C89 or better; remove K&R cruft.
25492         A few of these changes were first proposed by Derek Robert Price
25493         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
25494
25495         * lib/addext.c: Include <string.h> unconditionally.
25496         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
25497         Don't declare getenv or malloc.
25498
25499         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
25500         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
25501         (NULL): Remove.
25502         (find_stack_direction, alloca): Use prototypes.
25503
25504         * lib/atexit.c (atexit): Define using a prototype.
25505
25506         * lib/basename.c, dirname.c, stripslash.c:
25507         Include <string.h> unconditionally.
25508
25509         * lib/bcopy.c: Include <stddef.h>.
25510         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
25511
25512         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
25513
25514         * lib/error.h (error, error_at_line, error_print_progname)
25515         [! (defined (__STDC__) && __STDC__)]: Remove decls.
25516         * lib/error.c: Include error.h first, to check interface.
25517         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25518         (VA_START): Remove; all uses changeed to va_start.
25519         (exit, strerror): Remove decls.
25520         (error_print_progname): Prototype uncondionally.
25521         Don't include <errno.h>; no longer needed.
25522         (private_strerror): Remove.
25523         (error_tail): Always define.
25524         (error, error_at_line): Assume C89 or better; always use prototypes.
25525         * lib/fatal.c: Include "fatal.h" first, to test interface.
25526         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25527         (VA_START): Remove; all uses changed to va_start.
25528         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
25529         this case.
25530         (exit): Remove decl.
25531         (fatal): Prototype unconditionally.  Assume va_start works.
25532         Abort at end, to pacify gcc.
25533
25534         * lib/euidaccess.c (main): Define with a prototype.
25535
25536         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
25537
25538         * lib/exitfail.c: Include <stdlib.h> unconditionally.
25539
25540         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
25541         prototypes.
25542         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
25543         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
25544         (getenv): Remove decl.
25545         (fnmatch): Define using a prototype.
25546         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
25547         (FCT): Define using a prototype.
25548
25549         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
25550
25551         * lib/gethostname.c: Include <stddef.h>.
25552         (gethostname): Define with prototype.  Length is size_t, not int.
25553
25554 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25555
25556         Assume C89 or better; remove K&R cruft.
25557         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
25558         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
25559         string.h, getenv, malloc.
25560         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
25561         headers.
25562         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
25563         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
25564         do not check for strerror.
25565         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
25566         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
25567         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
25568         do not check for doprnt or vprintf.
25569         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
25570         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
25571
25572 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25573
25574         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
25575         getversion.c should have been removed then, but was accidentally
25576         preserved.
25577
25578         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
25579         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
25580
25581 2003-09-08  Karl Berry  <karl@gnu.org>
25582
25583         * config/config.sub, config.guess, srclistvars.sh: update from savannah
25584                 config, forget about prep.
25585
25586         * config/depcomp, missing: update from automake.
25587
25588 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25589
25590         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
25591         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25592
25593 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25594
25595         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
25596         copy_tm_result.  Bug reported by Simon Josefsson in
25597         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25598
25599 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25600
25601         * m4/time_r.m4: New file.
25602         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
25603         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
25604         is. Check for timegm declaration.
25605         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
25606         Do not check for gmtime_r.
25607         Replace mktime if __mktime_internal does not exist and if mktime
25608         hasn't been replaced already.
25609
25610 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25611
25612         * lib/time_r.c, lib/time_r.h: New files.
25613
25614         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
25615         __localtime_r.
25616         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
25617         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
25618
25619         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
25620         __gmtime_r.
25621         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
25622         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
25623         Include <time_r.h>.
25624
25625         * lib/timegm.c: Switch to glibc implementation, with the following
25626         changes:
25627         [defined HAVE_CONFIG_H]: Include <config.h>.
25628         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
25629         (__mktime_internal) [!defined _LIBC]: New decl.
25630         (__gmtime_r) [!defined _LIBC]: New macro and function.
25631         (timegm): Use a prototype, since gnulib assumes C89.
25632         Do not bother declaring tmp to be const, as it's not really usefu.
25633         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
25634         (timegm): Declare only if HAVE_DECL_TIMEGM.
25635
25636 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25637
25638         * MODULES.html.sh (func_all_modules): Add time_r.
25639         * modules/time_r: New file.
25640         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
25641         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
25642
25643 2003-09-03  Paul Eggert  <eggert@twinsun.com>
25644
25645         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
25646         Bug reported by Lute Kamstra in
25647         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
25648
25649         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
25650         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
25651         course with correspondingly smaller numbers for tomorrow and
25652         yesterday.  From Tadayoshi Funaba.  Originally installed into
25653         sh-utils on 1999-08-07, but the patch got lost (I guess during the
25654         coreutils merge?).
25655
25656 2003-08-31  Simon Josefsson  <jas@extundo.com>
25657
25658         * modules/timegm: New file.
25659         * MODULES.html.sh (func_all_modules): Add timegm.
25660
25661 2003-08-31  Simon Josefsson  <jas@extundo.com>
25662
25663         * m4/timegm.m4: New file.
25664
25665 2003-08-31  Simon Josefsson  <jas@extundo.com>
25666
25667         * lib/timegm.h: New file.
25668         * lib/timegm.c: New file.  Based on
25669         wget-1.8.2/src/http.c:mktime_from_utc.
25670
25671 2003-08-31  Karl Berry  <karl@gnu.org>
25672
25673         * lib/argp.h: update from libc.
25674
25675 2003-08-28  Bruno Haible  <bruno@clisp.org>
25676
25677         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
25678         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
25679         followed by '#define fnmatch fnmatch_posix' gives an error.
25680
25681 2003-08-28  Bruno Haible  <bruno@clisp.org>
25682
25683         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
25684         warning on QNX, which defines O_BINARY to 000000.
25685
25686 2003-08-27  Jim Meyering  <jim@meyering.net>
25687
25688         * m4/mkstemp.m4: Require that the system mkstemp be able to create
25689         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
25690         would fail after 32.  Reported by Danny Levinson.  Details here:
25691         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
25692
25693 2003-08-24  Bruno Haible  <bruno@clisp.org>
25694
25695         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
25696         MSVC7 <stdio.h> is included later.
25697
25698 2003-08-22  Simon Josefsson  <jas@extundo.com>
25699
25700         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
25701
25702 2003-08-20  Karl Berry  <karl@gnu.org>
25703
25704         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
25705
25706 2003-08-20  Bruno Haible  <bruno@clisp.org>
25707
25708         * modules/progname: New file.
25709         * MODULES.html.sh (func_all_modules): Add progname.
25710
25711 2003-08-20  Bruno Haible  <bruno@clisp.org>
25712
25713         * lib/progname.h: New file, from GNU gettext.
25714         * lib/progname.c: New file, from GNU gettext.
25715         * lib/progreloc.c: New file, from GNU gettext.
25716
25717 2003-08-19  Jim Meyering  <jim@meyering.net>
25718
25719         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
25720         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
25721
25722 2003-08-19  Bruno Haible  <bruno@clisp.org>
25723
25724         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
25725         more.
25726
25727 2003-08-19  Bruno Haible  <bruno@clisp.org>
25728
25729         * lib/xstrdup.c: Assume <string.h> exists.
25730
25731 2003-08-18  Paul Eggert  <eggert@twinsun.com>
25732
25733         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
25734         in makefile rules.
25735
25736 2003-08-18  Jim Meyering  <jim@meyering.net>
25737
25738         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
25739         * m4/lib-ld.m4: Likewise.
25740
25741 2003-08-18  Jim Meyering  <jim@meyering.net>
25742
25743         * lib/setenv.h: Indent nested cpp directive.
25744         * lib/vasnprintf.c: Remove trailing blanks.
25745
25746 2003-08-17  Simon Josefsson  <jas@extundo.com>
25747
25748         * modules/xstrndup: New file.
25749         * MODULES.html.sh (func_all_modules): Add xstrndup.
25750
25751 2003-08-17  Simon Josefsson  <jas@extundo.com>
25752
25753         * modules/argp: Fix autoconf macro name. Add more dependencies.
25754
25755 2003-08-17  Simon Josefsson  <jas@extundo.com>
25756
25757         * m4/xstrndup.m4: New file.
25758
25759 2003-08-17  Simon Josefsson  <jas@extundo.com>
25760
25761         * m4/argp.m4: New file.
25762
25763 2003-08-17  Simon Josefsson  <jas@extundo.com>
25764             Bruno Haible  <bruno@clisp.org>
25765
25766         * lib/xstrndup.h: New file.
25767         * lib/xstrndup.c: New file.
25768
25769 2003-08-17  Bruno Haible  <bruno@clisp.org>
25770
25771         * modules/strndup (Files, Include): Add lib/strndup.h.
25772
25773 2003-08-17  Bruno Haible  <bruno@clisp.org>
25774
25775         * modules/euidaccess (Files): Add lib/euidaccess.h.
25776
25777 2003-08-17  Bruno Haible  <bruno@clisp.org>
25778
25779         * lib/strndup.h: New file.
25780
25781 2003-08-17  Bruno Haible  <bruno@clisp.org>
25782
25783         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
25784         like AC_GNU_SOURCE.
25785         * modules/extensions (configure.ac): Comment out the invocation of
25786         gl_USE_SYSTEM_EXTENSIONS.
25787
25788 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25789
25790         Merges from coreutils, etc.
25791         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
25792         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
25793         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
25794         fixing a typo.
25795         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
25796         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
25797
25798 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25799
25800         Document merge from coreutils.
25801         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
25802         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
25803         * modules/utime: Add m4/utimes-null.m4.
25804
25805 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25806
25807         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
25808         space, undoing this 2003-08-12 change:
25809         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25810
25811 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25812
25813         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
25814         strtoul.c from libc, undoing this 2003-08-12 change:
25815         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25816
25817 2003-08-16  Jim Meyering  <jim@meyering.net>
25818
25819         Merges from coreutils.
25820         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
25821         prefix.  Adjust cache variables similarly.  Create 500 rather than
25822         just 300 files, to exercise bug on Darwin6.5, too.
25823         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
25824         $missing_dir.
25825         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
25826         AM_SYS_POSIX_TERMIOS.
25827         Reported by mkc@mathdogs.com.
25828         Also change use of $am_cv_sys_posix_termios
25829         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
25830         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
25831         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
25832         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
25833         in /proc/mounts until it finds one with matching device number.  This
25834         is unnecessary when the FILE argument *is* a mount point.  No stat call
25835         is necessary in that case.  So, disable the statvfs-testing code on
25836         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
25837         as RedHat bug# 84846.
25838         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25839         to 1MB, so as not to render systems with no stack size limit (e.g.,
25840         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25841         Include <unistd.h>.  On some systems,
25842         it is required for the definition of _SC_PAGESIZE.
25843
25844 2003-08-16  Jim Meyering  <jim@meyering.net>
25845
25846         Merge from coreutils.
25847         * lib/xstrtoimax.c: #else #if -> #elif.
25848         * lib/xstrtoumax.c: Likewise.
25849
25850 2003-08-16  Jim Meyering  <jim@meyering.net>
25851
25852         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
25853         * m4/utimes.m4: Removed.
25854         * m4/utimes-null.m4: Renamed from utimes.m4.
25855
25856         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25857         to 1MB, so as not to render systems with no stack size limit (e.g.,
25858         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25859         Include <unistd.h>.  On some systems,
25860         it is required for the definition of _SC_PAGESIZE.
25861
25862 2003-08-16  Jim Meyering  <jim@meyering.net>
25863         and Paul Eggert  <eggert@cs.ucla.edu>
25864
25865         Merges from coreutils, etc.
25866
25867         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
25868         using the latest version from cvs.  This avoids problems with #line
25869         directives using a vendor (Sun) compiler.
25870         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
25871         Don't set GETGROUPS_LIB here; now it's
25872         done via getgroups.m4's wrapper function.
25873         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
25874         rather than just in sh-util/configure.in, so that the
25875         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
25876         same.
25877         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
25878         AC_FUNC_GETLOADAVG where to find getloadavg.c.
25879         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
25880         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
25881         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
25882         Remove code that is now done by the newly-required macros.
25883         Append $(EXEEXT) to DF_PROG.
25884         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
25885         Do not invoke or require the following here,
25886         since prereq.m4 or some gnulib .m4 now does this for us:
25887         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
25888         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
25889         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
25890         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
25891         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
25892         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
25893         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
25894         AC_FUNC_OBSTACK.
25895         Do not replace the following functions, as this is now the job
25896         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
25897         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
25898         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
25899         atexit getpass, strdup, getpagesize.
25900         Replace 'raise'.
25901         Do not check for the following functions, as this is now the job
25902         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
25903         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
25904         setregid.
25905         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
25906         Check for sys/sysctl.h.
25907         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
25908         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
25909         of checking for ssize_t ourselves.
25910
25911         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
25912         Require every macro that gnulib/modules/* suggests for us.
25913         (jm_PREREQ_ADDEXT): New macro.
25914         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
25915         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
25916
25917         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
25918         (gl_PHYSMEM): Use it.
25919         Also check for `table' function.
25920         Check for new headers and functions.
25921         Add check for sys/sysmp.h.
25922         With suggestions from Kaveh Ghazi.
25923         Ignore headers that are present but cannot be compiled.  This
25924         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
25925         C 5.4.
25926
25927 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25928
25929         Document merge from coreutils.
25930         * modules/userspec: Depend on posixver.
25931         * modules/strftime: Depend on tzset.
25932
25933 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25934
25935         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
25936         rather than tab, after '#' in shell-script copyright notices.
25937         Suggested by Bruno Haible.
25938
25939 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25940
25941         * config/srclist-update: Use three spaces, rather than tab, after '#'
25942         in shell-script copyright notices.  Suggested by Bruno Haible.
25943         Remove unnecessary parenthesization in regular expression.
25944
25945 2003-08-15  Jim Meyering  <jim@meyering.net>
25946
25947         Merge from coreutils.
25948         * lib/xgethostname.c: Include <stdlib.h>.
25949         (xghostname): Don't exit for anything other than memory-related
25950         failure; just return NULL.
25951         * lib/userspec.c: Include "posixver.h".
25952         (parse_user_spec): Accept `.' as a separator only
25953         in pre-POSIX-200112 mode.
25954         * lib/strtoimax.c: Use #elif rather than #else #if.
25955         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
25956         Remove function, now that we can rely on a working tzset function.
25957         [!_LIBC]: Ensure that the required autoconf test has been run.
25958         [!defined _NL_CURRENT && HAVE_STRFTIME]:
25959         Use underlying_strftime for %r.
25960         * lib/sha.c: Merge in some clean-up and optimization changes from
25961         glibc.
25962         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
25963         Ensure that it is a multiple of 64.
25964         Rearrange loop exit tests so as to avoid performing an
25965         additional fread after encountering an error or EOF.
25966         * lib/realloc.c: Update copyright date.
25967
25968 2003-08-15  Jim Meyering  <jim@meyering.net>
25969         and Paul Eggert  <eggert@twinsun.com>
25970
25971         Merge from coreutils.
25972         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
25973         member but strut utmpx does not.  Needed for AIX 4.3.3.
25974         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
25975
25976 2003-08-15  Jim Meyering  <jim@meyering.net>
25977         and Paul Eggert  <eggert@cs.ucla.edu>
25978
25979         Merges from coreutils, etc.
25980         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
25981         Require gl_FUNC_TZSET_CLOBBER.
25982         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
25983         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
25984         members.
25985
25986 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25987
25988         Help the merge from coreutils.
25989         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
25990         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
25991         * m4/tzset.m4: Use it too.
25992
25993 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25994
25995         * modules/tzset: New file.
25996
25997 2003-08-14  Jim Meyering  <jim@meyering.net>
25998
25999         Merges from coreutils.
26000         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
26001         variable names, rather than @FNMATCH_H@.
26002         * modules/alloca: Likewise for $(ALLOCA_H).
26003
26004         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
26005         the three copies of the literal target, `fnmatch.h'.
26006         * modules/alloca (alloca.h): Likewise.
26007
26008 2003-08-14  Jim Meyering  <jim@meyering.net>
26009
26010         Merge from coreutils.
26011         * m4/tzset.m4: New file.
26012         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
26013         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
26014         otherwise, AIX 5.1 systems would end up using the latter.
26015         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
26016         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
26017         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
26018         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
26019
26020 2003-08-14  Jim Meyering  <jim@meyering.net>
26021
26022         Merge from coreutils.
26023         * lib/obstack.h: Whitespace changes.
26024         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
26025         and xcalloc return values.
26026         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
26027         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
26028         hang on OSF/1 5.1 for DIR on both local and remote file systems.
26029         Reported by (and fix confirmed by) Nelson H. F. Beebe.
26030         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26031         error from mntctl.
26032         Use mntctl's return value to drive the entry-processing loop, since
26033         we can't rely on the value of the vmt_length member in the last
26034         entry.  On some systems doing so could result in exhausting
26035         virtual memory.  Based in part on a patch from Mike Jetzer.
26036
26037 2003-08-14  Jim Meyering  <jim@meyering.net>
26038         and Paul Eggert  <eggert@twinsun.com>
26039
26040         Merges from coreutils, plus other fixes.
26041         * lib/physmem.c: Merge in portability changes from gcc/libiberty
26042         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
26043         for credits and details.  Thanks to Kaveh Ghazi for helping
26044         to keep these files in sync.
26045         (ARRAY_SIZE): Define it.
26046         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
26047         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
26048         (memcasecmp): Don't assume size_t fits in unsigned int.
26049         Remove casts and duplicate code.
26050         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
26051         (memcpy): Remove definition.
26052         Merge in some clean-up and optimization changes from glibc.
26053         [BLOCKSIZE]: Move definition to top of file.
26054         Ensure that it is a multiple of 64.
26055         Rearrange loop exit tests so as to avoid performing an
26056         additional fread after encountering an error or EOF.
26057         * lib/md5.h (md5_uintptr): Define.
26058         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
26059         return to the initial working directory.  Preserve errno
26060         for caller.
26061         * lib/idcache.c: Include "xalloc.h".
26062         (xmalloc, xrealloc): Remove decls.
26063         (getuser): Remove casts no longer required in C89.
26064         * lib/human.c: Include stdio.h, for sprintf.
26065         * lib/group-member.c: Include "xalloc.h".
26066         (xmalloc, xrealloc): Remove decls.
26067         (get_group_info): Remove casts no longer required in C89.
26068         * lib/getusershell.c (readname): Remove casts no longer required in
26069         C89.
26070         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
26071         * lib/getline.c: Whitespace fix, from coreutils.
26072
26073 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26074
26075         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
26076         Check for isascii.
26077
26078         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26079         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26080         Undo previous (whitespace-only) change.
26081
26082 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26083
26084         * lib/exclude.c: Include <ctype.h>
26085         (IN_CTYPE_DOMAIN): New macro.
26086         (is_space): New fn.
26087         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
26088         and empty lines.
26089
26090         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26091         Undo previous (whitespace-only) change.
26092
26093 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26094
26095         * config/srclist-update: Change update back to the old behavior,
26096         leaving whitespace alone.  Use one 'sed' command rather than a
26097         pipeline.
26098         (fixlicense): Now a variable, not a function.
26099         (remove_trailing_blanks): Remove.
26100         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
26101         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26102         Undo previous (whitespace-only) change.
26103
26104 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26105
26106         Merge from coreutils.
26107         * modules/euidaccess: Add lib_SOURCES, include for new
26108         file euidaccess.h
26109
26110 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26111
26112         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26113         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26114         Normalize leading white space and remove trailing white space.
26115
26116         Merge from coreutils
26117         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
26118
26119         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
26120         0.12.1.  These files are now being upgraded automatically by
26121         ../config/srclist-update.
26122
26123 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26124
26125         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26126         Normalize leading white space and remove trailing white space.
26127         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
26128         notice, as per ../config/srclist-update.
26129
26130         Merge from coreutils.
26131         * lib/euidaccess.h: New file.
26132         * lib/euidaccess.c: Include it.
26133         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
26134         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
26135         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
26136
26137 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26138
26139         * config/srclist-update: Add copyright notice.
26140         (remove_id_lines, remove_trailing_blanks): New constants.
26141         (fixfile): Use them to normalize spacing a bit in copied files.
26142         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26143         Normalize leading white space and remove trailing white space.
26144
26145         * config/texinfo.tex: Sync with texinfo.
26146
26147         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
26148         strtoul.c from libc, to merge coreutils whitespace changes.
26149
26150         * config/srclist.txt: Get the following m4 files from gettext:
26151         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
26152         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
26153         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
26154         wint_t.m4.
26155
26156 2003-08-12  Karl Berry  <karl@gnu.org>
26157
26158         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
26159         been made.
26160
26161 2003-08-11  Paul Eggert  <eggert@twinsun.com>
26162
26163         * modules/gnu-source, m4/gnu-source.m4:
26164         Remove; we're assuming Autoconf 2.54 or later now.
26165         Suggested by Bruno Haible.
26166         * MODULES.html.sh (func_all_modules): Remove gnu-source.
26167
26168 2003-08-11  Bruno Haible  <bruno@clisp.org>
26169
26170         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
26171
26172 2003-08-11  Bruno Haible  <bruno@clisp.org>
26173
26174         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
26175         (vasnprintf): Use it instead of wcslen.
26176
26177 2003-08-11  Bruno Haible  <bruno@clisp.org>
26178
26179         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
26180         value to ensure that _Bool promotes to int. Use #define for _Bool when
26181         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
26182
26183 2003-08-10  Karl Berry  <karl@gnu.org>
26184
26185         * lib/regex.h: update from libc (whitespace fix).
26186
26187 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26188
26189         Merge some files from coreutils.  These changes were
26190         originally made by Jim Meyering.
26191         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
26192         many older Unixes require this.
26193         * lib/alloca.c (alloca): Remove cast to argument of free;
26194         no longer needed in C89.
26195         * lib/alloca_.h, regex.h: Fix white space to match
26196         what GNU indent does.
26197
26198 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26199
26200         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
26201         apparently Emacs's Unicode mode got confused before my 2003-08-05
26202         checkin.
26203
26204 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26205
26206         * m4/extensions.m4: New file.
26207         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
26208         Require gl_USE_SYSTEM_EXTENSIONS.
26209         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
26210         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
26211
26212 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26213
26214         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
26215         * modules/extensions, modules/gnu-source: New files.
26216         * modules/timespec, modules/unlocked-io: Depend on extensions.
26217
26218 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26219
26220         * modules/restrict: New file.
26221         * MODULES.html.sh (func_all_modules): Add restrict.
26222         * modules/regex: Depend on restrict.
26223
26224 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26225
26226         * m4/restrict.m4: New file.
26227         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
26228
26229 2003-08-07  Bruno Haible  <bruno@clisp.org>
26230
26231         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
26232         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
26233
26234 2003-08-07  Bruno Haible  <bruno@clisp.org>
26235
26236         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
26237         makes the module 'getndelim2' compatible with the module 'getline'.
26238
26239 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26240
26241         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
26242         byte with "\201" to avoid glitches when editing that source file
26243         with multi-gnome-terminal.
26244
26245 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26246
26247         * lib/bumpalloc.h: Remove.
26248
26249 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26250
26251         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
26252         * modules/bumpalloc: Remove.
26253
26254 2003-08-04  Paul Eggert  <eggert@twinsun.com>
26255
26256         * lib/getloadavg.c: Change copyright notice and spacing to conform to
26257         GNU coding style.
26258
26259         Merge from coreutils.
26260         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
26261         1. From glibc.
26262         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
26263         from Karl Berry, implemented by Jim Meyering.
26264         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
26265         from Dmitry V. Levin.
26266         Remove anachronistic cast of xrealloc.
26267         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
26268         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
26269         type. Otherwise, it wouldn't compile with at least /bin/cc on
26270         ymp-cray-unicos9.0.2.X.
26271         Combine two mostly-identical uses of alloca into one.
26272         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
26273
26274 2003-08-04  Dave Love  <d.love@dl.ac.uk>
26275
26276         [From Emacs.]
26277
26278         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
26279         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
26280         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
26281         obsolete NLIST_NAME_UNION.
26282         [__GNU__]: Undef BSD and FSCALE.
26283         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
26284
26285 2003-08-03  Paul Eggert  <eggert@twinsun.com>
26286
26287         * lib/stdbool_.h (_Bool): Make it signed char, instead of
26288         an enum type, so that it's guaranteed to promote to int.  See:
26289         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
26290
26291 2003-08-03  Karl Berry  <karl@gnu.org>
26292
26293         * config/depcomp: update from automake.
26294
26295 2003-07-31  Paul Eggert  <eggert@twinsun.com>
26296
26297         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
26298         (strerror): Don't assume that a printable int fits in 14 bytes.
26299
26300 2003-07-31  Bruno Haible  <bruno@clisp.org>
26301
26302         * modules/getpass-gnu: New file.
26303         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
26304
26305 2003-07-31  Bruno Haible  <bruno@clisp.org>
26306
26307         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
26308
26309 2003-07-24  Karl Berry  <karl@gnu.org>
26310
26311         * config/missing: update from automake.
26312
26313 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
26314             Bruno Haible  <bruno@clisp.org>
26315
26316         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
26317         * lib/getline.c (getline, getdelim): Likewise.
26318         Remove _GNU_SOURCE define; now it's defined in config.h through
26319         m4/getline.m4.
26320
26321 2003-07-23  Karl Berry  <karl@gnu.org>
26322
26323         * config/config.sub: update from prep.
26324
26325 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26326
26327         * modules/xalloc (Depends-on): Add exitfail.
26328         * modules/xmemcoll: Likewise.
26329
26330 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26331
26332         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
26333         over-parenthesization in macros.
26334
26335         Sync with coreutils.
26336
26337         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
26338         required by C99.
26339
26340         Use `exit_failure' for xalloc and xmemcoll instead of their own
26341         private exit-failure variables.
26342         * lib/xalloc.h (xalloc_exit_failure): Remove.
26343         * lib/xmalloc.c: Likewise.  Include exitfail.h.
26344         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
26345         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
26346         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
26347         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
26348
26349 2003-07-20  Jim Meyering  <jim@meyering.net>
26350
26351         * modules/closeout (Depends-on): Add exitfail.
26352         Suggestion from Bruno Haible.
26353
26354 2003-07-19  Karl Berry  <karl@gnu.org>
26355
26356         * config/config.sub: update from prep.
26357
26358 2003-07-18  Paul Eggert  <eggert@twinsun.com>
26359
26360         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
26361         Remove.
26362         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
26363         to test that it can stand by itself.  Include "exitfail.h".
26364         Clients should set exit_failure instead.
26365         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
26366
26367 2003-07-18  Bruno Haible  <bruno@clisp.org>
26368
26369         * modules/getndelim2: New file.
26370         * modules/getline: Share files with module getndelim2.
26371         * modules/getnline: Depend on getndelim2 instead of sharing files with
26372         it. Add getnline.c to lib_SOURCES.
26373         * MODULES.html.sh (func_all_modules): Add getndelim2.
26374
26375 2003-07-18  Bruno Haible  <bruno@clisp.org>
26376
26377         * m4/getndelim2.m4: New file.
26378         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
26379         invoke gl_PREREQ_GETNDELIM2.
26380         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
26381         gl_PREREQ_GETNDELIM2.
26382         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
26383         gl_GETNDELIM2.
26384
26385 2003-07-18  Bruno Haible  <bruno@clisp.org>
26386
26387         * lib/getndelim2.h: New file.
26388         * lib/getndelim2.c: Make into a module of its own. Include config.h,
26389         getndelim2.h.
26390         (getndelim2): Make non-static. Change return type to ssize_t.
26391         * lib/getline.h: Change argument names.
26392         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
26393         * lib/getnline.c: Include getndelim2.h.
26394
26395 2003-07-18  Andreas Schwab  <schwab@suse.de>
26396
26397         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
26398
26399 2003-07-17  Karl Berry  <karl@gnu.org>
26400
26401         * config/config.sub: update from prep.
26402
26403 2003-07-17  Bruno Haible  <bruno@clisp.org>
26404
26405         * modules/getnline: New file.
26406         * modules/getline: Add lib/getndelim2.c to source file list.
26407         * MODULES.html.sh (func_all_modules): Add getnline.
26408
26409 2003-07-17  Bruno Haible  <bruno@clisp.org>
26410
26411         * m4/getnline.m4: New file.
26412
26413 2003-07-17  Bruno Haible  <bruno@clisp.org>
26414
26415         * m4/Makefile.am.in: Remove file.
26416         * m4/Makefile.am: Remove file.
26417         * m4/Makefile.in: Remove file.
26418
26419 2003-07-17  Bruno Haible  <bruno@clisp.org>
26420
26421         * lib/getnline.h: New file.
26422         * lib/getnline.c: New file.
26423         * lib/getndelim2.c: New file, extracted from getline.c.
26424         (getndelim2): Renamed from getdelim2, with added nmax argument.
26425         * lib/getline.c: Include getndelim2.c.
26426         (getdelim2): Moved out to getndelim2.c.
26427         (getline, getdelim): Update.
26428
26429 2003-07-17  Bruno Haible  <bruno@clisp.org>
26430
26431         * lib/Makefile.am: Remove file.
26432         * lib/Makefile.in: Remove file.
26433
26434 2003-07-17  Bruno Haible  <bruno@clisp.org>
26435
26436         * configure.in: Remove file.
26437         * Makefile.in: Remove file.
26438
26439 2003-07-17  Bruno Haible  <bruno@clisp.org>
26440
26441         * MODULES.html.sh: Put the </BODY> right before </HTML>.
26442
26443 2003-07-16  Karl Berry  <karl@gnu.org>
26444
26445         * config/srclist-update: was running fixlicense twice, which caused
26446                 texinfo.tex to be nullified for some reason.  Simplify,
26447                 $gplsrc is no longer needed as far as I can see?
26448
26449 2003-07-16  Jim Meyering  <jim@meyering.net>
26450
26451         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
26452
26453 2003-07-15  Paul Eggert  <eggert@twinsun.com>
26454
26455         * config/srclist.txt: Get the following files from gettext-runtime/intl
26456         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
26457         ref-del.sin.  From Bruno Haible.
26458         * config/srclist-update (fixfile): Change grep pattern again, since the
26459         previous fix didn't work (there was another trailing $).  Use
26460         '[$]' to escape the $s.
26461
26462 2003-07-15  Karl Berry  <karl@gnu.org>
26463
26464         * lib/vasnprintf.c: update from gettext.
26465
26466 2003-07-15  Karl Berry  <karl@gnu.org>
26467
26468         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
26469         gets expanded when surrounded by '$'.
26470
26471 2003-07-15  Jim Meyering  <jim@meyering.net>
26472
26473         * modules/save-cwd: Don't depend on error.  From Derek Price.
26474
26475 2003-07-15  Jim Meyering  <jim@meyering.net>
26476
26477         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
26478
26479 2003-07-14  Simon Josefsson  <jas@extundo.com>
26480
26481         * modules/mempcpy: New file.
26482         * MODULES.html.sh (func_all_modules): Add mempcpy.
26483
26484 2003-07-14  Simon Josefsson  <jas@extundo.com>
26485
26486         * m4/mempcpy.m4: New file.
26487
26488 2003-07-14  Simon Josefsson  <jas@extundo.com>
26489
26490         * lib/mempcpy.h: New file.
26491         * lib/mempcpy.c: New file.
26492
26493 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26494
26495         * modules/getdate, modules/posixtm: Depend on mktime.
26496
26497 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26498
26499         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
26500         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
26501         unicodeio.c, unicodeio.h, unlocked-io.h:
26502         Switch from LGPL to GPL.
26503
26504 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26505
26506         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
26507         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
26508         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
26509         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
26510         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
26511         updated automatically by ../config/srclist-update.  This changes
26512         their license from LPGL to GPL.
26513
26514 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26515
26516         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
26517         assumed to refer to the root of the most recent stable gettext version.
26518         * config/srclistvars.sh: Add defaults for eggert.
26519         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
26520         Match "This program" as well as "The program".  This is needed
26521         for gettext.
26522
26523 2003-07-14  Jim Meyering  <jim@meyering.net>
26524
26525         Don't emit diagnostics.  Let callers do that.
26526         * lib/save-cwd.c: Don't include "error.h".
26527         (save_cwd): Don't call error.  Ensure that errno is valid
26528         when returning nonzero.
26529
26530         * lib/save-cwd.h (restore_cwd): Update prototype.
26531         * lib/save-cwd.c (restore_cwd): Remove two parameters.
26532         Simplify.  Don't call error upon failure.  Let callers do that.
26533         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
26534         when auditing is enabled.  But don't bother updating the #if.
26535
26536 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
26537
26538         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
26539         it breaks C++ compilation.
26540         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
26541
26542 2003-07-10  Simon Josefsson  <jas@extundo.com>
26543
26544         * modules/strchrnul (Makefile.am): Add strchrnul.h.
26545
26546 2003-07-10  Jim Meyering  <jim@meyering.net>
26547
26548         * m4/clock_time.m4: Remove trailing blank.
26549         * m4/intmax_t.m4: Likewise.
26550
26551 2003-07-10  Jim Meyering  <jim@meyering.net>
26552
26553         * lib/vasnprintf.c: Remove trailing blanks.
26554         Make cpp indentation consistent.
26555
26556 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26557
26558         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
26559         posixver.c, strftime.c, strnlen.c, strverscmp.c:
26560         Switch from LGPL to GPL.
26561
26562 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26563
26564         * config/srclist.txt: Sort sublists.  Add
26565         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
26566         that differ from gnulib for one reason or another; we'd like this list
26567         to be smaller but for now let's document what we have.
26568
26569 2003-07-08  Paul Eggert  <eggert@twinsun.com>
26570
26571         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
26572         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
26573         and sweeter "eval x=$x".
26574         * config/srclist.txt: Get lib/argp* from glibc.
26575
26576 2003-07-07  Paul Eggert  <eggert@twinsun.com>
26577
26578         * lib/mktime.c: Fix some boundary cases and remove need for floating
26579         point.
26580
26581         Issue a compile-time diagnostic if time_t is floating point, or if
26582         two's complement arithmetic is not in effect, or if arithmetic
26583         right shift does not propagate the sign.  These assumptions were
26584         all in the original code but they weren't checked.
26585
26586         (TIME_T_MIDPOINT, verify): New macros.
26587         (__isleap): Remove; it has integer overflow problems.
26588         (leapyear): New function, without those problems.
26589         (ydhms_tm_diff): Remove; splitting into two parts.
26590         (ydhms_diff): New function, containing the arithmetic part of
26591         the old ydhms_tm_diff function.  Issue a compile-time
26592         diagnostic if we are not using C99 integer division.
26593         Avoid casts when possible.
26594         (guess_time_tm): New function, containing the checking part of
26595         the old ydhms_tm_diff function.  Return the new value, rather than
26596         the difference between it and the old.  Accept a new argument T
26597         so that *T specifies the old value.  Check for overflow in the result.
26598
26599         (__mktime_internal): Use a time_t offset, not a long int offset.
26600         This undoes the 2003-06-04 change, which is no longer needed now
26601         that we have better overflow checking.
26602         (localtime_offset): Likewise.
26603
26604         (__mktime_internal): Avoid harmful overflow on hosts where time_t
26605         and long are 64-bit but int is only 32-bit.
26606         (ydhms_diff): Use long int to store year1 and yday1.
26607         Issue a compile-time diagnostic if long int is not wide enough.
26608
26609         (__mktime_internal): Use long int to store adjusted year and yday.
26610         Use plain C rather than preprocessor commands, if that doesn't
26611         affect efficiency.
26612         Check for overflow (and try to repair) after each probe
26613         rather than checking only at the very end.  This avoids some bugs
26614         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
26615         does not equal GMT offset at maximum time).
26616         Use integer to check for overflow rather than floating point; this
26617         is more portable to non-IEEE hosts, and is a tad faster.
26618         When we detect that we are oscillating between two values,
26619         don't check whether tm_isdst has the requested value, since
26620         we already know the answer.  When tm_isdst has the wrong value,
26621         use a different heuristic to find the right one, based on the
26622         extreme values actually observed in practice in tz2003a,
26623         rather than the (overly optimistic) "previous 3 calendar quarters".
26624
26625         (not_equal_tm, print_tm, check_result): Use "const T" rather than
26626         "T const" to accommodate glibc style.
26627         (check_result): Use less-confusing report format.  "long" -> "long int.
26628         (main): Likewise.
26629         Don't loop if the iteration overflows time_t.
26630         Allow a negative step in the iteration.
26631
26632 2003-07-06  Karl Berry  <karl@gnu.org>
26633
26634         * config/depcomp: update from automake.
26635         * config/config.sub: update from prep.
26636
26637 2003-07-03  Karl Berry  <karl@gnu.org>
26638
26639         * config/config.guess: update from prep.
26640
26641 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26642
26643         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
26644         xreadlink.c now includes it unconditionally.
26645
26646 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26647
26648         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
26649         having it depend on HAVE_SYS_TYPES_H.
26650
26651 2003-07-01  Bruno Haible  <bruno@clisp.org>
26652
26653         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
26654         <sys/types.h> should be sufficient.
26655         Reported by Paul Eggert.
26656
26657 2003-06-26  Karl Berry  <karl@gnu.org>
26658
26659         * config/depcomp: update from automake.
26660
26661 2003-06-26  Bruno Haible  <bruno@clisp.org>
26662
26663         * modules/human: Depend on module stdbool.
26664
26665 2003-06-25  Bruno Haible  <bruno@clisp.org>
26666
26667         * modules/readlink: New file.
26668         * modules/xreadlink: Depend on it.
26669         * MODULES.html.sh (func_all_modules): Add readlink.
26670
26671 2003-06-25  Bruno Haible  <bruno@clisp.org>
26672
26673         * m4/readlink.m4: New file.
26674
26675 2003-06-25  Bruno Haible  <bruno@clisp.org>
26676
26677         * lib/readlink.c: New file.
26678
26679 2003-06-22  Karl Berry  <karl@gnu.org>
26680
26681         * config/srclist.txt: update mkinstalldirs from automake.
26682         * config/mkinstalldirs: update.
26683
26684 2003-06-22  Bruno Haible  <bruno@clisp.org>
26685
26686         Portability to mingw32.
26687         * m4/ssize_t.m4: New file, from GNU gettext.
26688         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
26689         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
26690
26691 2003-06-22  Bruno Haible  <bruno@clisp.org>
26692
26693         * modules/safe-read: Add m4/ssize_t.m4.
26694         * modules/xreadlink: Add m4/ssize_t.m4.
26695
26696 2003-06-20  Bruno Haible  <bruno@clisp.org>
26697
26698         Assume C89, so PARAMS isn't needed.
26699         * lib/unicodeio.h (PARAMS): Remove.
26700         * lib/unicodeio.c: Don't use PARAMS.
26701
26702 2003-06-18  Karl Berry  <karl@gnu.org>
26703
26704         * config/config.{guess,sub}: update from prep.
26705
26706 2003-06-18  Jim Meyering  <jim@meyering.net>
26707
26708         Merge changes from coreutils.
26709         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
26710         Remove explicit declarations of xmalloc and realloc.
26711         Include xalloc.h.
26712         (read_utmp): Remove anachronistic cast of xmalloc.
26713
26714 2003-06-17  Paul Eggert  <eggert@twinsun.com>
26715
26716         Assume C89, so PARAMS isn't needed.
26717         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
26718         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
26719         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
26720         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
26721         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
26722         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
26723         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
26724         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
26725         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
26726         lib/xstrtod.h, lib/xstrtol.h: Likewise.
26727         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
26728         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
26729         no longer needed. Anyway, config.h should always be included before any
26730         other file.
26731
26732 2003-06-11  Simon Josefsson  <jas@extundo.com>
26733
26734         * modules/sysexits: New file.
26735         * MODULES.html.sh (func_all_modules): Add sysexits.
26736
26737 2003-06-11  Simon Josefsson  <jas@extundo.com>
26738
26739         * lib/sysexit_.h: New file.
26740
26741 2003-06-11  Derek Price  <derek@ximbiot.com>
26742
26743         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
26744         necessary.
26745
26746 2003-06-11  Bruno Haible  <bruno@clisp.org>
26747
26748         * m4/sysexits.m4: New file.
26749
26750 2003-06-10  Simon Josefsson  <jas@extundo.com>
26751
26752         * lib/argp.h: New file, from glibc.
26753         * lib/argp-ba.c: New file, from glibc.
26754         * lib/argp-eexst.c: New file, from glibc.
26755         * lib/argp-fmtstream.c: New file, from glibc.
26756         * lib/argp-fmtstream.h: New file, from glibc.
26757         * lib/argp-fs-xinl.c: New file, from glibc.
26758         * lib/argp-help.c: New file, from glibc.
26759         * lib/argp-namefrob.h: New file, from glibc.
26760         * lib/argp-parse.c: New file, from glibc.
26761         * lib/argp-pv.c: New file, from glibc.
26762         * lib/argp-pvh.c: New file, from glibc.
26763         * lib/argp-xinl.c: New file, from glibc.
26764
26765 2003-06-10  Simon Josefsson  <jas@extundo.com>
26766
26767         * modules/strchrnul: New file.
26768
26769 2003-06-10  Simon Josefsson  <jas@extundo.com>
26770
26771         * modules/argp: New file.
26772
26773 2003-06-10  Simon Josefsson  <jas@extundo.com>
26774
26775         * m4/strchrnul.m4: New file.
26776
26777 2003-06-10  Simon Josefsson  <jas@extundo.com>
26778
26779         * lib/strchrnul.h: New file.
26780         * lib/strchrnul.c: New file.
26781
26782 2003-06-10  Bruno Haible  <bruno@clisp.org>
26783
26784         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
26785
26786 2003-06-07  Karl Berry  <karl@gnu.org>
26787
26788         * config/config.{guess,sub}: update from prep.
26789
26790 2003-06-07  Jim Meyering  <jim@meyering.net>
26791
26792         * modules/strtod: Use $(...) notation, not @...@ for
26793         AC_REPLACE'd variables.
26794         * modules/localcharset: Likewise.
26795
26796 2003-06-07  Jim Meyering  <jim@meyering.net>
26797
26798         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
26799         in place of my name in the copyright comment.
26800         Remove definition and uses of __P.
26801
26802         From coreutils.
26803         * lib/stat.c: Don't declare xmalloc explicitly.
26804         Instead, include "xalloc.h".
26805         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
26806         xrealloc, and xcalloc return values.
26807         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
26808         Improve comment.
26809         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
26810
26811 2003-06-07  Bruno Haible  <bruno@clisp.org>
26812
26813         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
26814         avoid AC_CONFIG_LINKS.
26815         * modules/fnmatch (Makefile.am): Use explicit creation rule for
26816         fnmatch.h, to avoid AC_CONFIG_LINKS.
26817         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
26818
26819 2003-06-07  Bruno Haible  <bruno@clisp.org>
26820
26821         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
26822         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
26823         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26824         directory.
26825         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
26826         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26827         directory.
26828
26829 2003-06-06  Jim Meyering  <jim@meyering.net>
26830
26831         Merge from coreutils.
26832         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
26833         Consolidate declarations and initializations of *_base* locals.
26834
26835         Merge from coreutils.
26836         This avoids a core dump on systems without GNU putenv,
26837         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
26838         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
26839         (unsetenv): New static function, from GNU libc.
26840         (rpl_putenv): Use it.
26841
26842         * lib/modechange.c: Remove trailing blanks.
26843
26844         Merge from coreutils.
26845         * lib/fsusage.c: Remove declaration of statfs.
26846         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
26847
26848         * lib/posixtm.c: Include <stdbool.h> unconditionally.
26849
26850 2003-06-06  Jim Meyering  <jim@meyering.net>
26851
26852         * lib/stdbool_.h: Renamed from stdbool.h.in.
26853
26854 2003-06-06  Jim Meyering  <jim@meyering.net>
26855             Bruno Haible  <bruno@clisp.org>
26856
26857         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
26858         Adjust Makefile.am snippet not to redirect directly to target.
26859         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
26860
26861 2003-06-05  Paul Eggert  <eggert@twinsun.com>
26862
26863         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
26864         mismatch, look in future quarters as well as past.  This fixes a
26865         bug when processing fall-backwards gaps immediately after a long
26866         period of daylight-saving time.
26867
26868         * lib/mktime.c: Assume freestanding C89 or better.
26869         (HAVE_LIMITS_H): Remove.  Assume it's 1.
26870         (__P): Remove; not used.
26871         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
26872         (mktime, not_equal_tm, print_tm, check_result,
26873         main): Use prototypes.  Use const * where appropriate.
26874         (main): Fix typo in testing code that uncovered by above changes.
26875         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
26876
26877 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26878
26879         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
26880         locale.h, localeconv.  This merges changes from coreutils.
26881
26882         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
26883         It can be removed after the next Autoconf is released.
26884         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
26885         needed.
26886
26887 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26888
26889         * lib/mktime.c: Fix Debian bug 177940
26890         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
26891         (localtime_offset): Now long int, not time_t, because we want it
26892         to be guaranteed to be signed.  All uses changed.
26893         (__mktime_internal): If overflow would occur when adding offset,
26894         don't add it.
26895
26896         Merge 'human' changes from coreutils.  Rewrite to support
26897         locale-specific notations like thousands separators.
26898         * lib/human.c: Simplify authorship notice.
26899         Include human.h immediately after config.h.
26900         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
26901         <limits.h>: Do not include, since human.h does.
26902         (SIZE_MAX, UINTMAX_MAX): New macros.
26903         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
26904         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
26905         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
26906         (power_letter): Renamed from suffixes.
26907         (generate_suffix_backwards): Remove.
26908         (adjust_value): Now takes int style (because of human.h changes)
26909         and long double value (for greater precision on some platforms).
26910         (group_number): New function.
26911         (human_readable): Use it.  Use integer options, not enum.
26912         Put the options before the sizes in the arg list.
26913         Support all the new options.
26914         The old human_readable function has been removed;
26915         use inttostr.h instead.
26916         (human_readable, default_block_size, humblock):
26917         Use uintmax_t, not int, for block sizes.
26918         (human_readable_inexact, block_size_types): Remove.
26919         (block_size_opts): New constant.
26920         (human_options): Renamed from human_block_size, with new signature
26921         that allows block sizes up to UINTMAX_MAX.  All callers changed.
26922         * lib/human.h: Add copyright and authorship notice.
26923         Include <limits.h> and <stdbool.h> unconditionally.
26924         (PARAMS): Remove.  All uses removed.
26925         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
26926         (enum human_inexact_style): Remove tag; now a nameless enum.
26927         (human_floor, human_ceiling, human_round_to_even): Now have
26928         values 2, 0, 1 rather than -1, 1, 0.
26929         (human_group_digits, human_suppress_point_zero, human_autoscale,
26930         human_base_1024, human_SI, human_B): New constants.
26931         (human_readable_inexact, human_block_size): Remove.
26932         (human_readable): Size args are now uintmax_t, not int.
26933         (human_options): New decl.
26934
26935         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
26936         unnecessary now that we assume C89 or better.  This change
26937         imported from coreutils.
26938
26939         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26940         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
26941         in the 2003-05-30 sync from glibc.
26942
26943         .h files should stand alone, but we shouldn't include <sys/types.h>
26944         if we can get away with just <stddef.h>.
26945
26946         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
26947         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
26948         rather than <sys/types.h>, as we merely need size_t.
26949         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
26950         to get size_t.
26951         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
26952         Include <stdio.h>, to get FILE.
26953         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
26954         memcasecmp.h has included <stddef.h> and all we need is size_t.
26955         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
26956         our interface, instead of including <sys/types.h>
26957
26958 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26959
26960         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
26961         now, as glibc mktime is buggy on non-glibc systems.
26962
26963 2003-06-03  Karl Berry  <karl@gnu.org>
26964
26965         * config/config.sub: update from prep.
26966
26967 2003-06-02  Paul Eggert  <eggert@twinsun.com>
26968
26969         [from coreutils]
26970         Fix some minor time-related bugs with POSIX time arguments.
26971         Some valid time stamps were being rejected (notably -1, and
26972         time stamps before 1900 on 64-bit hosts).  And some invalid
26973         time stamps were being accepted, e.g. September 31.
26974
26975         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
26976         that we can return (time_t) -1 successfully.
26977         * lib/posixtm.c: Likewise.
26978         [HAVE_STDBOOL_H]: Include <stdbool.h>.
26979         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
26980         (t): Remove static var.
26981         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
26982         of static var.  All uses changed.
26983         (year): Do not reject years before 1900; they can occur with
26984         64-bit time_t.
26985         (posix_time_parse): Do not check for out-of-range components;
26986         that is now the caller's responsibility, since our checks were
26987         only approximations.
26988         (posixtime): Use mktime to check for out-of-range components,
26989         since it knows them exactly.
26990         If mktime returns (time_t) -1, check whether an error actually occurred
26991         by invoking localtime on -1.
26992         (main) [TEST_POSIXTIME]: Check for input data errors, and report
26993         posixtime failures better.
26994         Improve the test data (in comments only).
26995
26996 2003-06-02  Karl Berry  <karl@gnu.org>
26997
26998         * config/mkinstalldirs (version): new variable.
26999         (--version): new option.
27000         (usage): improve message.
27001
27002 2003-05-30  Karl Berry  <karl@gnu.org>
27003
27004         * lib/mktime.c: update from libc.
27005
27006 2003-05-30  Bruno Haible  <bruno@clisp.org>
27007
27008         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
27009         * config/config.rpath: Upgrade to gettext-0.12.1.
27010
27011 2003-05-30  Bruno Haible  <bruno@clisp.org>
27012
27013         * m4/gettext.m4: Upgrade to gettext-0.12.1.
27014         * m4/nls.m4: New file, from gettext-0.12.1.
27015         * m4/po.m4: New file, from gettext-0.12.1.
27016         * m4/progtest.m4: Upgrade to gettext-0.12.1.
27017
27018 2003-05-30  Bruno Haible  <bruno@clisp.org>
27019
27020         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
27021         * lib/localcharset.h: Likewise.
27022         * lib/localcharset.c: Likewise.
27023
27024 2003-05-29  Karl Berry  <karl@gnu.org>
27025
27026         * config/config.rpath: update from gettext.
27027
27028 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27029
27030         Assume the headers required for C89 freestanding compilers.
27031         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
27032         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
27033         * m4/human.m4 (gl_HUMAN): Likewise.
27034         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
27035         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
27036         * m4/userspec.m4 (gl_USERSPEC): Likewise.
27037         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
27038         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
27039         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
27040
27041 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27042
27043         Assume the headers required for C89 freestanding compilers.
27044         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
27045         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
27046         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
27047         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
27048         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
27049         define, since <limits.h> is guaranteed to do that.
27050         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
27051         * lib/exclude.c: Include <stdbool.h> unconditionally.
27052         * lib/tempname.c: Include <stddef.h> unconditionally.
27053         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
27054         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
27055         <stddef.h> does that.
27056         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
27057         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
27058         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
27059         needed.
27060         * lib/xstrtol.c: Likewise.
27061         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
27062         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
27063
27064         * lib/addext.c (addext): Use assignment rather than cast, to avoid
27065         warnings on some platforms.
27066
27067         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
27068         arbitrarily.
27069
27070 2003-05-26  Jim Meyering  <jim@meyering.net>
27071
27072         Merge in a change from coreutils:
27073         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
27074         that is guaranteed to be `no'.  Use `no_such_member' to indicate
27075         that condition, rather than `-1' which is slightly misleading.
27076         Change the name of the cache variable to have the gl_ prefix.
27077         Prompted by a patch from Richard Dawe for DJGPP.
27078
27079 2003-05-24  Karl Berry  <karl@gnu.org>
27080
27081         * config/config.guess: update from prep.
27082
27083 2003-05-22  Karl Berry  <karl@gnu.org>
27084
27085         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
27086
27087 2003-05-20  Karl Berry  <karl@gnu.org>
27088
27089         * config/config.guess: update from prep.
27090
27091 2003-05-18  Karl Berry  <karl@gnu.org>
27092
27093         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
27094         might actually be set by the user.
27095
27096         * config/depcomp, install-sh, mdate-sh: update from automake.
27097
27098 2003-05-17  Bruno Haible  <bruno@clisp.org>
27099
27100         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
27101         invalid expansion for AC_EGREP_CPP.
27102         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
27103         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
27104         Suggested by Akim Demaille <akim@epita.fr> in
27105         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
27106
27107 2003-05-12  Jim Meyering  <jim@meyering.net>
27108
27109         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
27110         the space-padded-by-default conversion specifiers, %e, %k, %l.
27111
27112 2003-05-12  Bruno Haible  <bruno@clisp.org>
27113
27114         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
27115         the string is longer than 4 KB.
27116
27117 2003-05-11  Karl Berry  <karl@gnu.org>
27118
27119         * config/config.{guess,sub}: update from prep.
27120
27121 2003-05-09  Bruno Haible  <bruno@clisp.org>
27122
27123         * modules/error: Add m4/strerror_r.m4 to file list.
27124
27125 2003-05-03  Bruno Haible  <bruno@clisp.org>
27126
27127         Upgrade to Unicode-4.0.
27128         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
27129         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
27130         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
27131         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
27132         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
27133         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
27134         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
27135         Change width of U+E0100..U+E01EF from 1 to 0.
27136
27137 2003-04-25  Jim Meyering  <jim@meyering.net>
27138
27139         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
27140         of type size_t, not int.
27141
27142 2003-04-25  Bruno Haible  <bruno@clisp.org>
27143
27144         * lib/copy-file.c: Include <stddef.h>, for size_t.
27145
27146 2003-04-21  Paul Eggert  <eggert@twinsun.com>
27147
27148         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
27149         code which expansion is under static control.  Patch imported from
27150         Akim Demaille's patch to Bison; see
27151         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
27152
27153 2003-04-14  Bruno Haible  <bruno@clisp.org>
27154
27155         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
27156
27157 2003-04-11  Jim Meyering  <jim@meyering.net>
27158
27159         Merge changes from Coreutils.
27160
27161         2003-03-22  Jim Meyering  <jim@meyering.net>
27162
27163         * lib/strftime.c (widen): Cast alloca return value to proper type.
27164
27165         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
27166
27167         From GNU libc.
27168         * lib/strftime.c (my_strftime): Handle very large width
27169         specifications for numeric values correctly.  Improve checks for
27170         overflow.
27171
27172         2003-01-19  Jim Meyering  <jim@meyering.net>
27173
27174         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
27175         definitions.
27176         (nl_get_alt_digit) [! defined my_strftime]: Define.
27177         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
27178         _nl_get_alt_digit and _nl_get_walt_digit.
27179
27180         * lib/strftime.c (my_strftime): Merge in locale-related changes from
27181         libc. These changes have no effect outside of _LIBC.
27182
27183 2003-04-10  Bruno Haible  <bruno@clisp.org>
27184
27185         * modules/findprog: New file.
27186         * MODULES.html.sh (func_all_modules): Add it.
27187
27188 2003-04-10  Bruno Haible  <bruno@clisp.org>
27189
27190         * m4/findprog.m4: New file.
27191         * m4/eaccess.m4: New file.
27192
27193 2003-04-10  Bruno Haible  <bruno@clisp.org>
27194
27195         * lib/findprog.h: New file, from GNU gettext.
27196         * lib/findprog.c: New file, from GNU gettext.
27197
27198 2003-04-05  Jim Meyering  <jim@meyering.net>
27199
27200         Merge changes from Coreutils.
27201
27202         * lib/exclude.h (PARAMS): Remove definition and uses.
27203         * lib/exclude.c: Remove uses of `PARAMS'.
27204
27205         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
27206         Add test-cases for DOS filenames. Declare program_name.
27207         (main): Set up program_name.  Patch by Rich Dawe.
27208
27209         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
27210         error from mntctl.
27211         Use mntctl's return value to drive the entry-processing loop, since
27212         we can't rely on the value of the vmt_length member in the last
27213         entry.  On some systems doing so could result in exhausting
27214         virtual memory.  Based in part on a patch from Mike Jetzer.
27215
27216 2003-04-04  Bruno Haible  <bruno@clisp.org>
27217
27218         * modules/linebreak: New file.
27219         * MODULES.html.sh (func_all_modules): Add it.
27220
27221 2003-04-04  Bruno Haible  <bruno@clisp.org>
27222
27223         * m4/linebreak.m4: New file.
27224
27225 2003-04-04  Bruno Haible  <bruno@clisp.org>
27226
27227         * lib/linebreak.h: New file, from GNU gettext.
27228         * lib/linebreak.c: New file, from GNU gettext with slight
27229         modifications.
27230         * lib/lbrkprop.h: New file, from GNU gettext.
27231
27232 2003-04-03  Bruno Haible  <bruno@clisp.org>
27233
27234         * modules/utf8-ucs4: New file.
27235         * modules/utf16-ucs4: New file.
27236         * modules/ucs4-utf8: New file.
27237         * modules/ucs4-utf16: New file.
27238         * MODULES.html.sh (func_all_modules): Add them.
27239
27240 2003-04-03  Bruno Haible  <bruno@clisp.org>
27241
27242         * m4/utf-ucs4.m4: New file.
27243         * m4/ucs4-utf.m4: New file.
27244
27245 2003-04-03  Bruno Haible  <bruno@clisp.org>
27246
27247         * lib/utf8-ucs4.h: New file, from GNU gettext.
27248         * lib/utf16-ucs4.h: New file, from GNU gettext.
27249         * lib/ucs4-utf8.h: New file, from GNU gettext.
27250         * lib/ucs4-utf16.h: New file, from GNU gettext.
27251
27252 2003-04-02  Bruno Haible  <bruno@clisp.org>
27253
27254         * modules/binary-io: New file.
27255         * MODULES.html.sh (func_all_modules): Add it.
27256
27257 2003-04-02  Bruno Haible  <bruno@clisp.org>
27258
27259         * lib/binary-io.h: New file, from GNU gettext.
27260
27261 2003-04-01  Bruno Haible  <bruno@clisp.org>
27262
27263         * modules/pathname: New file.
27264         * MODULES.html.sh (func_all_modules): Add it.
27265
27266 2003-04-01  Bruno Haible  <bruno@clisp.org>
27267
27268         * lib/pathname.h: New file, from GNU gettext.
27269         * lib/concatpath.c: New file, from GNU gettext.
27270
27271 2003-03-30  Bruno Haible  <bruno@clisp.org>
27272
27273         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
27274
27275 2003-03-30  Bruno Haible  <bruno@clisp.org>
27276
27277         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
27278         function chown() doesn't exist.
27279
27280 2003-03-28  Bruno Haible  <bruno@clisp.org>
27281
27282         * modules/copy-file: New file.
27283         * MODULES.html.sh (func_all_modules): Add it.
27284
27285 2003-03-28  Bruno Haible  <bruno@clisp.org>
27286
27287         * m4/copy-file.m4: New file.
27288
27289 2003-03-28  Bruno Haible  <bruno@clisp.org>
27290
27291         * lib/copy-file.h: New file, from GNU gettext.
27292         * lib/copy-file.c: New file, from GNU gettext.
27293
27294 2003-03-18  Jim Meyering  <jim@meyering.net>
27295
27296         * lib/quote.c (quote_n): Fix typo in comment.
27297
27298 2003-03-18  Bruno Haible  <bruno@clisp.org>
27299
27300         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
27301         checking.
27302         * m4/onceonly_2_57.m4: Likewise.
27303
27304 2003-03-17  Bruno Haible  <bruno@clisp.org>
27305
27306         * m4/onceonly.m4: Require autoconf 2.54 or newer.
27307         (m4_quote): Remove macro.
27308         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
27309
27310 2003-03-14  Jim Meyering  <jim@meyering.net>
27311
27312         Merge changes from Coreutils.
27313         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
27314         to be const, in order to avoid warnings.
27315         (obstack_room): Likewise.
27316         (obstack_empty_p): Likewise.
27317
27318 2003-03-14  Bruno Haible  <bruno@clisp.org>
27319
27320         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
27321         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
27322
27323 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27324
27325         Merge changes from Bison.
27326         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
27327         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
27328         when compiling Bison 1.875's `bitset bset = obstack_alloc
27329         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
27330         * lib/hash.c: Include <stdbool.h> unconditionally.
27331
27332 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27333
27334         * m4/onceonly.m4 (m4_quote): New macro.
27335         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
27336         Quote AC_FOREACH variable-expansions properly.
27337
27338 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27339
27340         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
27341
27342 2003-03-09  Paul Eggert  <eggert@twinsun.com>
27343
27344         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
27345         Reported by Bruce Becker; see:
27346         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
27347
27348 2003-03-03  Paul Eggert  <eggert@twinsun.com>
27349             Bruno Haible  <bruno@clisp.org>
27350
27351         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
27352         Reported by John Hughes, see
27353         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
27354
27355 2003-02-20  Bruno Haible  <bruno@clisp.org>
27356
27357         * MODULES.html.sh (func_all_modules): Add poll.
27358
27359 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27360
27361         * modules/poll: New file.
27362
27363 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27364
27365         * lib/poll_.h: New file.
27366         * lib/poll.c: New file.
27367
27368 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27369
27370         * m4/poll.m4: New file.
27371
27372 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27373
27374         * modules/mathl: New file.
27375
27376 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27377
27378         * lib/mathl.h: New file.
27379         * lib/acosl.c: New file.
27380         * lib/asinl.c: New file.
27381         * lib/atanl.c: New file.
27382         * lib/ceill.c: New file.
27383         * lib/cosl.c: New file.
27384         * lib/expl.c: New file.
27385         * lib/floorl.c: New file.
27386         * lib/frexpl.c: New file.
27387         * lib/ldexpl.c: New file.
27388         * lib/logl.c: New file.
27389         * lib/sincosl.c: New file.
27390         * lib/sinl.c: New file.
27391         * lib/sqrtl.c: New file.
27392         * lib/tanl.c: New file.
27393         * lib/trigl.c: New file.
27394         * lib/trigl.h: New file.
27395
27396 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27397
27398         * m4/mathl.m4: New file.
27399
27400 2003-02-18  Bruno Haible  <bruno@clisp.org>
27401
27402         * MODULES.html.sh (func_all_modules): Add mathl.
27403
27404 2003-02-17  Bruno Haible  <bruno@clisp.org>
27405
27406         * modules/mkdtemp: New module.
27407         * MODULES.html.sh (func_all_modules): Add it.
27408
27409 2003-02-17  Bruno Haible  <bruno@clisp.org>
27410
27411         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
27412
27413 2003-02-17  Bruno Haible  <bruno@clisp.org>
27414
27415         * lib/mkdtemp.h: New file, from GNU gettext.
27416         * lib/mkdtemp.c: New file, from GNU gettext.
27417
27418 2003-02-02  Jim Meyering  <jim@meyering.net>
27419
27420         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
27421         e.g. glibc-2.2.93.
27422
27423 2003-01-31  Bruno Haible  <bruno@clisp.org>
27424
27425         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
27426         'rpl_rename'.
27427         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
27428         'rpl_strnlen'.
27429         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
27430         'rpl_strtod'.
27431         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
27432         'rpl_utime'.
27433
27434 2003-01-31  Bruno Haible  <bruno@clisp.org>
27435
27436         * lib/rename.c: #undef rename before defining rpl_rename.
27437         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
27438
27439 2003-01-30  Bruno Haible  <bruno@clisp.org>
27440
27441         * modules/vasnprintf, modules/vasprintf: New modules.
27442         * MODULES.html.sh (func_all_modules): Add them.
27443
27444 2003-01-30  Bruno Haible  <bruno@clisp.org>
27445
27446         * m4/signed.m4: New file, from GNU gettext.
27447         * m4/longdouble.m4: New file, from GNU gettext.
27448         * m4/wchar_t.m4: New file, from GNU gettext.
27449         * m4/wint_t.m4: New file, from GNU gettext.
27450         * m4/vasnprintf.m4: New file.
27451         * m4/vasprintf.m4: New file.
27452
27453 2003-01-30  Bruno Haible  <bruno@clisp.org>
27454
27455         * lib/printf-args.h: New file, from GNU gettext.
27456         * lib/printf-args.c: New file, from GNU gettext.
27457         * lib/printf-parse.h: New file, from GNU gettext.
27458         * lib/printf-parse.c: New file, from GNU gettext.
27459         * lib/vasnprintf.h: New file, from GNU gettext.
27460         * lib/vasnprintf.c: New file, from GNU gettext.
27461         * lib/asnprintf.c: New file, from GNU gettext.
27462         * lib/vasprintf.h: New file, from GNU gettext with modifications.
27463         * lib/vasprintf.c: New file, from GNU gettext.
27464         * lib/asprintf.c: New file, from GNU gettext.
27465
27466 2003-01-29  Bruno Haible  <bruno@clisp.org>
27467
27468         * modules/stpncpy: New module.
27469         * MODULES.html.sh (func_all_modules): Add it.
27470
27471 2003-01-29  Bruno Haible  <bruno@clisp.org>
27472
27473         * m4/stpncpy.m4: New file.
27474
27475 2003-01-29  Bruno Haible  <bruno@clisp.org>
27476
27477         * lib/stpncpy.h: New file, from GNU gettext with modifications.
27478         * lib/stpncpy.c: New file, from GNU gettext with modifications.
27479
27480 2003-01-28  Bruno Haible  <bruno@clisp.org>
27481
27482         * modules/c-ctype: New module.
27483         * MODULES.html.sh (func_all_modules): Add it.
27484
27485 2003-01-28  Bruno Haible  <bruno@clisp.org>
27486
27487         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
27488         Paul Eggert.
27489         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
27490         Paul Eggert.
27491
27492 2003-01-27  Bruno Haible  <bruno@clisp.org>
27493
27494         * modules/xsetenv: New module.
27495         * MODULES.html.sh (func_all_modules): Add it.
27496
27497 2003-01-27  Bruno Haible  <bruno@clisp.org>
27498
27499         * lib/xsetenv.h: New file, from GNU gettext.
27500         * lib/xsetenv.c: New file, from GNU gettext.
27501
27502 2003-01-23  Jim Meyering  <jim@meyering.net>
27503
27504         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
27505         from working on systems without dirfd (at least Irix and OSF1/Tru64).
27506
27507 2003-01-23  Bruno Haible  <bruno@clisp.org>
27508
27509         * modules/minmax: New module.
27510         * MODULES.html.sh (func_all_modules): Add it.
27511
27512 2003-01-23  Bruno Haible  <bruno@clisp.org>
27513
27514         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
27515         Eggert.
27516
27517 2003-01-22  Bruno Haible  <bruno@clisp.org>
27518
27519         * modules/exit: New module.
27520         * MODULES.html.sh (func_all_modules): Add it.
27521
27522 2003-01-22  Bruno Haible  <bruno@clisp.org>
27523
27524         * lib/exit.h: New file, from GNU gettext.
27525
27526 2003-01-19  Bruno Haible  <bruno@clisp.org>
27527
27528         * gnulib-tool: Recognize option --extract-maintainer.
27529         (func_get_maintainer): New function.
27530         * modules/*: Add Maintainer entry.
27531
27532 2003-01-16  Jim Meyering  <jim@meyering.net>
27533
27534         * m4/regex.m4: The `regex' struct is both input and output.
27535         Initialize it before each use.  Patch by Tim Waugh.
27536
27537 2003-01-16  Bruno Haible  <bruno@clisp.org>
27538
27539         * MODULES.html.sh: Add a table of contents. Add the module name as
27540         leftmost column. Add hyperlinks.
27541
27542 2003-01-15  Bruno Haible  <bruno@clisp.org>
27543
27544         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
27545
27546 2003-01-15  Bruno Haible  <bruno@clisp.org>
27547
27548         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
27549         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
27550         suffix.
27551
27552 2003-01-15  Bruno Haible  <bruno@clisp.org>
27553
27554         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
27555
27556 2003-01-15  Bruno Haible  <bruno@clisp.org>
27557
27558         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
27559         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
27560
27561 2003-01-14  Jim Meyering  <jim@meyering.net>
27562
27563         * lib/same.c (same_name): Tweak a comment.
27564
27565 2003-01-14  Bruno Haible  <bruno@clisp.org>
27566
27567         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
27568         when a string comparison is sufficient.
27569
27570 2003-01-14  Bruno Haible  <bruno@clisp.org>
27571
27572         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
27573         'unsigned int'.
27574
27575 2003-01-14  Bruno Haible  <bruno@clisp.org>
27576
27577         * lib/hash-pjw.c: Add comment about low quality of this function.
27578
27579 2003-01-13  Bruno Haible  <bruno@clisp.org>
27580
27581         * modules/stpcpy: Distribute lib/stpcpy.h.
27582         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
27583
27584 2003-01-13  Bruno Haible  <bruno@clisp.org>
27585
27586         * modules/*: Add a description.
27587         * modules/strpbrk: Fix Makefile.am snippet.
27588         * modules/strtoimax: Fix dependencies.
27589         * modules/strtoumax: Likewise.
27590
27591 2003-01-13  Bruno Haible  <bruno@clisp.org>
27592
27593         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
27594         * modules/alloca (Makefile.am): All object files depend on alloca.h.
27595         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
27596
27597 2003-01-13  Bruno Haible  <bruno@clisp.org>
27598
27599         * gnulib-tool (func_create_testdir): Store config/* files in the main
27600         directory.
27601         * config.rpath: Move to ...
27602         * config/config.rpath: ... here.
27603         * modules/gettext: Contains config/config.rpath, not config.rpath.
27604         * modules/iconv: Likewise.
27605
27606 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27607
27608         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27609         to avoid collisions with libcurses and libreadline.
27610
27611         * m4/getstr.m4: Remove.
27612         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
27613
27614 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27615
27616         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27617         to avoid collisions with libcurses and libreadline.
27618
27619         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
27620         * lib/getstr.h, getstr.c: Remove.
27621         * lib/getline.c: Include "getline.h", to check interface.
27622         Move body of old getstr.c here: this defines MIN_CHUNK and
27623         declares getdelim2, which is renamed from getstr.
27624         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
27625
27626         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
27627         All uses changed.
27628         * lib/linebuffer.h: Likewise.
27629         (readline): Remove backward-compatibility macro.
27630
27631 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27632
27633         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27634         to avoid collisions with libcurses and libreadline.
27635         * getstr: Remove.
27636         * MODULES.html.sh: Remove getstr.
27637         * modules/getline: Depend on unlocked-io, not getstr.
27638
27639 2003-01-12  Jim Meyering  <jim@meyering.net>
27640
27641         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
27642
27643 2003-01-10  Bruno Haible  <bruno@clisp.org>
27644
27645         * modules/alloca: Change Makefile.am requirements. Simplify Include
27646         requirements. Add lib/alloca_.h to file list.
27647
27648 2003-01-10  Bruno Haible  <bruno@clisp.org>
27649
27650         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
27651
27652 2003-01-10  Bruno Haible  <bruno@clisp.org>
27653
27654         * lib/alloca_.h: New file.
27655         * lib/getdate.y: Unconditionally include alloca.h.
27656         * lib/makepath.c: Likewise.
27657         * lib/setenv.c: Likewise.
27658         * lib/userspec.c: Likewise.
27659
27660 2003-01-09  Karl Berry  <karl@gnu.org>
27661
27662         * MODULES.html.sh: include `dirname $0` in PATH, to find
27663         gnulib-tool.
27664
27665 2003-01-09  Bruno Haible  <bruno@clisp.org>
27666
27667         * modules/stdbool: Change configure.ac, Makefile.am requirements.
27668         Simplify Include requirements. Add lib/stdbool.h.in to file list.
27669
27670 2003-01-09  Bruno Haible  <bruno@clisp.org>
27671
27672         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
27673
27674 2003-01-09  Bruno Haible  <bruno@clisp.org>
27675
27676         * lib/stdbool.h.in: New file.
27677
27678 2003-01-09  Bruno Haible  <bruno@clisp.org>
27679
27680         * gnulib-tool (func_all_modules): Ignore files ending in ~.
27681         * MODULES.html.sh: Likewise.
27682
27683 2003-01-08  Jim Meyering  <jim@meyering.net>
27684
27685         * lib/full-write.c: Undefine and define-away `const' after inclusion
27686         of errno.h, not before.  Suggestion from Bruno Haible.
27687
27688 2003-01-08  Bruno Haible  <bruno@clisp.org>
27689
27690         * modules/full-read: Depend on full-write.
27691
27692 2003-01-08  Bruno Haible  <bruno@clisp.org>
27693
27694         * lib/safe-read.c: Include specification header first, to ensure its
27695         selfcontainedness.
27696         * lib/full-write.c: Likewise.
27697
27698 2003-01-07  Jim Meyering  <jim@meyering.net>
27699
27700         * lib/full-write.c: Rework so that it may serve to define full_read,
27701         too.
27702         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
27703
27704 2003-01-07  Bruno Haible  <bruno@clisp.org>
27705
27706         * lib/strtoimax.c: Include <stdint.h> as an alternative to
27707         <inttypes.h>.
27708         * lib/xstrtol.h: Likewise.
27709         * lib/xstrtoimax.c: Likewise.
27710         * lib/xstrtoumax.c: Likewise.
27711         * lib/human.h: Likewise.
27712
27713         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
27714         on systems that have <inttypes.h> but not <stdint.h>.
27715
27716 2003-01-07  Bruno Haible  <bruno@clisp.org>
27717
27718         * MODULES.html.sh: Add copyright notice.
27719         (missed_files): Omit CVS directory entries.
27720         (func_module): Make it work with sed-3.02.
27721         * MODULES.txt: Remove file.
27722
27723 2003-01-06  Jim Meyering  <jim@meyering.net>
27724
27725         * lib/version-etc.c: Update year in translatable copyright string.
27726
27727 2003-01-03  Karl Berry  <karl@gnu.org>
27728
27729         * config/config.{guess,sub}: update from prep.
27730
27731 2003-01-02  Karl Berry  <karl@gnu.org>
27732
27733         * doc/COPYING.DOC: belatedly updated to 1.2.
27734
27735 2003-01-01  Karl Berry  <karl@gnu.org>
27736
27737         * gnulib-tool (func_verify_module): report module name $module in
27738         error message, not $1.
27739         * gnulib-tool (create-testdir): don't complain if destdir couldn't
27740         be created, only if it doesn't exist.
27741         * gnulib-tool (last_checkin_date): don't expand the $Date here.
27742
27743 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27744
27745         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
27746
27747 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27748
27749         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
27750         memcmp if strcoll doesn't work.
27751
27752 2002-12-31  Bruno Haible  <bruno@clisp.org>
27753
27754         * lib/utime.c (utime_null): No need to call ftruncate if the file was
27755         nonempty.
27756
27757 2002-12-31  Bruno Haible  <bruno@clisp.org>
27758
27759         * lib/memcoll.c (STRCOLL): New macro.
27760         (memcoll): Use it.
27761
27762 2002-12-31  Bruno Haible  <bruno@clisp.org>
27763
27764         * lib/localcharset.h: New file.
27765         * lib/localcharset.c: Include it.
27766         * lib/unicodeio.c: Likewise.
27767
27768 2002-12-31  Bruno Haible  <bruno@clisp.org>
27769
27770         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
27771         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
27772
27773 2002-12-31  Bruno Haible  <bruno@clisp.org>
27774
27775         * lib/getline.h: Include <stddef.h>, for size_t.
27776
27777         * lib/unicodeio.h: Include <stddef.h>, for size_t.
27778         * lib/unicodeio.c: Don't include <stddef.h>.
27779
27780 2002-12-31  Bruno Haible  <bruno@clisp.org>
27781
27782         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
27783         HAVE_TM_ZONE.
27784
27785 2002-12-24  Karl Berry  <karl@gnu.org>
27786
27787         * config/config.guess: update from prep.
27788
27789 2002-12-24  Bruno Haible  <bruno@clisp.org>
27790
27791         General infrasructure.
27792         * m4/README: Rewritten.
27793         * m4/onceonly.m4: New file.
27794         * m4/onceonly_2_57.m4: New file.
27795
27796         Module atexit.
27797         * m4/atexit.m4: New file.
27798
27799         Module strtod.
27800         * m4/strtod.m4: New file.
27801
27802         Module strtol.
27803         * m4/strtol.m4: New file.
27804
27805         Module strtoul.
27806         * m4/strtoul.m4: New file.
27807
27808         Module memchr.
27809         * m4/memchr.m4: New file.
27810
27811         Module memcmp.
27812         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
27813         (jm_FUNC_MEMCMP): Invoke it.
27814
27815         Module memcpy.
27816         * m4/memcpy.m4: New file.
27817
27818         Module memmove.
27819         * m4/memmove.m4: New file.
27820
27821         Module memset.
27822         * m4/memset.m4: New file.
27823
27824         Module strcspn.
27825         * m4/strcspn.m4: New file.
27826
27827         Module strpbrk.
27828         * m4/strpbrk.m4: New file.
27829
27830         Module strstr.
27831         * m4/strstr.m4: New file.
27832
27833         Module strerror.
27834         * m4/strerror.m4: New file.
27835
27836         Module mktime.
27837         * m4/mktime.m4: Renamed from jm-mktime.m4.
27838         (gl_PREREQ_MKTIME): New macro.
27839         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
27840
27841         Module malloc.
27842         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
27843         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
27844         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
27845
27846         Module realloc.
27847         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
27848         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
27849         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
27850
27851         Module strftime.
27852         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
27853         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
27854         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
27855         gl_TM_GMTOFF.
27856         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
27857
27858         Module xalloc.
27859         * m4/xalloc.m4: New file.
27860
27861         Module alloca.
27862         * m4/alloca.m4: New file.
27863
27864         Module putenv.
27865         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
27866         (jm_FUNC_PUTENV): Invoke it.
27867
27868         Module setenv.
27869         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
27870         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
27871         when invoked twice.
27872         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
27873         gt_FUNC_SETENV.
27874
27875         Module memrchr.
27876         * m4/memrchr.m4: New file.
27877
27878         Module stpcpy.
27879         * m4/stpcpy.m4: New file.
27880
27881         Module strcase.
27882         * m4/strcase.m4: New file.
27883
27884         Module strdup.
27885         * m4/strdup.m4: New file.
27886
27887         Module strnlen.
27888         * m4/strnlen.m4: New file.
27889
27890         Module strndup.
27891         * m4/strndup.m4: New file.
27892
27893         Module xstrtod.
27894         * m4/xstrtod.m4: New file.
27895
27896         Module xstrtol.
27897         * m4/xstrtol.m4: New file.
27898
27899         Module getdate.
27900         * m4/getdate.m4: New file.
27901
27902         Module unlocked-io.
27903         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
27904         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
27905         * m4/jm-glibc-io.m4n: Remove file.
27906
27907         Module long-options.
27908         * m4/long-options.m4: New file.
27909
27910         Module md5.
27911         * m4/md5.m4: New file.
27912
27913         Module sha.
27914         * m4/sha.m4: New file.
27915
27916         Module getstr.
27917         * m4/getstr.m4: New file.
27918
27919         Module getline.
27920         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
27921         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
27922         <sys/types.h>, for size_t. Use the function name gnu_getline, not
27923         simply getline. Infoke gl_PREREQ_GETLINE.
27924
27925         Module obstack.
27926         * m4/obstack.m4: New file.
27927
27928         Module hash.
27929         * m4/hash.m4: New file.
27930
27931         Module readtokens.
27932         * m4/readtokens.m4: New file.
27933
27934         Module strverscmp.
27935         * m4/strverscmp.m4: New file.
27936
27937         Module stdbool.
27938         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
27939         OSF/1.
27940
27941         Module strtoll.
27942         * m4/strtoll.m4: New file.
27943
27944         Module strtoull.
27945         * m4/strtoull.m4: New file.
27946
27947         Module strtoimax.
27948         * m4/strtoimax.m4: New file.
27949
27950         Module strtoumax.
27951         * m4/strtoumax.m4: New file.
27952
27953         Module xstrtoimax.
27954         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
27955         jm_AC_PREREQ_XSTRTOIMAX.
27956         Moved the strtol prerequisites to strtol.m4.
27957         Moved the strtoll prerequisites to strtoll.m4.
27958         Moved the strtoimax prerequisites to strtoimax.m4.
27959
27960         Module xstrtoumax.
27961         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
27962         jm_AC_PREREQ_XSTRTOUMAX.
27963         Moved the strtoul prerequisites to strtoul.m4.
27964         Moved the strtoull prerequisites to strtoull.m4.
27965         Moved the strtoumax prerequisites to strtoumax.m4.
27966
27967         Module chown.
27968         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
27969         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
27970
27971         Module dup2.
27972         * m4/dup2.m4: New file.
27973
27974         Module ftruncate.
27975         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
27976         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
27977
27978         Module getgroups.
27979         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
27980         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
27981
27982         Module gettimeofday.
27983         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
27984         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
27985         gl_PREREQ_GETTIMEOFDAY.
27986
27987         Module mkdir.
27988         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
27989         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
27990
27991         Module mkstemp.
27992         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
27993         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
27994         jm_AC_TYPE_UINTMAX_T.
27995         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
27996
27997         Module stat.
27998         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
27999         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
28000
28001         Module lstat.
28002         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
28003         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
28004
28005         Module timespec.
28006         * m4/timespec.m4 (gl_TIMESPEC): New macro.
28007         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
28008         * m4/st_mtim.m4: Indentation.
28009
28010         Module nanosleep.
28011         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
28012         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
28013         gl_PREREQ_NANOSLEEP.
28014
28015         Module regex.
28016         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
28017         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
28018         (gl_REGEX): New macro.
28019
28020         Module rename.
28021         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
28022         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
28023
28024         Module rmdir.
28025         * m4/rmdir.m4: New file.
28026
28027         Module utime.
28028         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
28029         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
28030         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
28031
28032         Module dirname.
28033         * m4/dirname.m4: New file.
28034
28035         Module getopt.
28036         * m4/getopt.m4: New file.
28037
28038         Module unistd-safer.
28039         * m4/unistd-safer.m4: New file.
28040
28041         Module fnmatch.
28042         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
28043         declaration.
28044         (gl_PREREQ_FNMATCH_EXTRA): New macro.
28045         (gl_FUNC_FNMATCH_POSIX): New macro.
28046         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
28047         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
28048         simply fnmatch.
28049
28050         Module exclude.
28051         * m4/exclude.m4: New file.
28052
28053         Module human.
28054         * m4/human.m4: New file.
28055
28056         Module acl.
28057         * m4/acl.m4: Nop.
28058
28059         Module backupfile.
28060         * m4/backupfile.m4: New file.
28061         * m4/d-ino.m4: Indentation.
28062
28063         Module fsusage.
28064         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
28065         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
28066         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
28067
28068         Module dirfd.
28069         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
28070         requirements.
28071
28072         Module euidaccess.
28073         * m4/euidaccess.m4: New file.
28074
28075         Module file-type.
28076         * m4/file-type.m4: New file.
28077
28078         Module fileblocks.
28079         * m4/fileblocks.m4: New file.
28080
28081         Module filemode.
28082         * m4/filemode.m4: New file.
28083
28084         Module isdir.
28085         * m4/isdir.m4: New file.
28086
28087         Module lchown.
28088         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
28089         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
28090
28091         Module makepath.
28092         * m4/makepath.m4: New file.
28093
28094         Module modechange.
28095         * m4/modechange.m4: New file.
28096
28097         Module mountlist.
28098         * m4/mountlist.m4: New file.
28099         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
28100         Indentation.
28101
28102         Module path-concat.
28103         * m4/path-concat.m4: New file.
28104
28105         Module pathmax.
28106         * m4/pathmax.m4: New file.
28107
28108         Module same.
28109         * m4/same.m4: New file.
28110
28111         Module save-cwd.
28112         * m4/save-cwd.m4: New file.
28113
28114         Module savedir.
28115         * m4/savedir.m4: New file.
28116
28117         Module xgetcwd.
28118         * m4/xgetcwd.m4: New file.
28119         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
28120
28121         Module xreadlink.
28122         * m4/xreadlink.m4: New file.
28123
28124         Module safe-read.
28125         * m4/safe-read.m4: New file.
28126
28127         Module safe-write.
28128         * m4/safe-write.m4: New file.
28129
28130         Module closeout.
28131         * m4/closeout.m4: New file.
28132
28133         Module stdio-safer.
28134         * m4/stdio-safer.m4: New file.
28135
28136         Module getpass.
28137         * m4/getpass.m4: New file.
28138
28139         Module getugroups.
28140         * m4/getugroups.m4: New file.
28141
28142         Module group-member.
28143         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
28144         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
28145
28146         Module idcache.
28147         * m4/idcache.m4: New file.
28148
28149         Module userspec.
28150         * m4/userspec.m4: New file.
28151
28152         Module gettime.
28153         * m4/clock_time.m4: New file.
28154         * m4/gettime.m4: New file.
28155
28156         Module settime.
28157         * m4/settime.m4: New file.
28158
28159         Module posixtm.
28160         * m4/posixtm.m4: New file.
28161
28162         Module gethostname.
28163         * m4/gethostname.m4: New file.
28164
28165         Module canon-host.
28166         * m4/canon-host.m4: New file.
28167
28168         Module gettext.
28169         * m4/codeset.m4: New file, from gettext-0.11.5.
28170         * m4/gettext.m4: New file, from gettext-0.11.5.
28171         * m4/glibc21.m4: New file, from gettext-0.11.5.
28172         * m4/iconv.m4: New file, from gettext-0.11.5.
28173         * m4/intdiv0.m4: New file, from gettext-0.11.5.
28174         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
28175         * m4/inttypes.m4: New file, from gettext-0.11.5.
28176         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
28177         * m4/isc-posix.m4: New file, from gettext-0.11.5.
28178         * m4/lcmessage.m4: New file, from gettext-0.11.5.
28179         * m4/lib-ld.m4: New file, from gettext-0.11.5.
28180         * m4/lib-link.m4: New file, from gettext-0.11.5.
28181         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
28182         * m4/progtest.m4: New file, from gettext-0.11.5.
28183         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
28184         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
28185         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
28186
28187         Module localcharset.
28188         * m4/localcharset.m4: New file.
28189
28190         Module hard-locale.
28191         * m4/hard-locale.m4: New file.
28192
28193         Module mbswidth.
28194         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
28195         onceonly macros.
28196         * m4/mbrtowc.m4: Add comment.
28197
28198         Module memcasecmp.
28199         * m4/memcasecmp.m4: New file.
28200
28201         Module memcoll.
28202         * m4/memcoll.m4: New file.
28203
28204         Module unicodeio.
28205         * m4/unicodeio.m4: New file.
28206
28207         Module rpmatch.
28208         * m4/rpmatch.m4: New file.
28209
28210         Module yesno.
28211         * m4/yesno.m4: New file.
28212
28213         Module exitfail.
28214         * m4/exitfail.m4: New file.
28215
28216         Module c-stack.
28217         * m4/c-stack.m4 (gl_C_STACK): New macro.
28218         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
28219
28220         Module error.
28221         * m4/error.m4 (gl_ERROR): New macro.
28222         (jm_PREREQ_ERROR): Use onceonly macros.
28223
28224         Module fatal.
28225         * m4/fatal.m4: New file.
28226
28227         Module getloadavg.
28228         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
28229         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
28230
28231         Module getpagesize.
28232         * m4/getpagesize.m4: New file.
28233
28234         Module getusershell.
28235         * m4/getusershell.m4: New file.
28236
28237         Module physmem.
28238         * m4/physmem.m4: New file.
28239
28240         Module posixver.
28241         * m4/posixver.m4: New file.
28242
28243         Module quotearg.
28244         * m4/quotearg.m4: New file.
28245
28246         Module quote.
28247         * m4/quote.m4: New file.
28248
28249         Module readutmp.
28250         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
28251
28252         Module sig2str.
28253         * m4/sig2str.m4: New file.
28254
28255         Other.
28256         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
28257         ulonglong.m4.
28258         * m4/intmax_t.m4: New file.
28259         * m4/d-type.m4: Indentation.
28260         * m4/jm-macros.m4: Update.
28261         * m4/prereq.m4 (jm_PREREQ): Update.
28262         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
28263         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
28264         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
28265         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
28266         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
28267         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
28268         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
28269         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
28270         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
28271         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
28272         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
28273         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
28274         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
28275         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
28276         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
28277         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
28278         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
28279         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
28280         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
28281
28282 2002-12-24  Bruno Haible  <bruno@clisp.org>
28283
28284         * MODULES.txt: Update according to m4/ changes.
28285
28286         Module gettext.
28287         * config.rpath: New file, from gettext-0.11.5.
28288
28289         * modules/*: New module descriptions.
28290         * gnulib-tool: New file.
28291         * MODULES.html.sh: New file.
28292
28293 2002-12-21  Karl Berry  <karl@gnu.org>
28294
28295         * doc/fdl.texi: update to version 1.2.
28296
28297 2002-12-19  Karl Berry  <karl@gnu.org>
28298
28299         * config/config.guess: update from prep.
28300
28301 2002-12-18  Bruno Haible  <bruno@clisp.org>
28302
28303         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
28304         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
28305
28306 2002-12-17  Bruno Haible  <bruno@clisp.org>
28307
28308         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
28309         stdlib.h, string.h.
28310
28311 2002-12-17  Bruno Haible  <bruno@clisp.org>
28312
28313         * lib/canon-host.c (strdup): Remove unused declaration.
28314
28315         * lib/fsusage.c: Include full_read.h.
28316         (get_fs_usage): Use full_read instead of safe_read.
28317
28318         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
28319
28320 2002-12-12  Karl Berry  <karl@gnu.org>
28321
28322         * config/config.guess: update from prep.
28323
28324 2002-12-11  Bruno Haible  <bruno@clisp.org>
28325
28326         * m4/setenv.m4: New file, from gettext-0.11.5.
28327
28328 2002-12-11  Bruno Haible  <bruno@clisp.org>
28329
28330         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
28331         not unsetenv().
28332         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
28333         modifications:
28334
28335         2002-12-11  Bruno Haible  <bruno@clisp.org>
28336
28337                 * setenv.c (alloca): Fall back to malloc.
28338                 (freea): New macro.
28339                 (setenv): Use freea() to free memory allocated with alloca().
28340
28341         2002-11-13  Bruno Haible  <bruno@clisp.org>
28342
28343                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
28344                 function declarations.
28345                 * unsetenv.c (unsetenv): Likewise.
28346
28347         2002-03-04  Bruno Haible  <bruno@clisp.org>
28348
28349                 Portability to AIX 4.3.3.
28350                 * unsetenv.c: New file, extracted from setenv.c.
28351                 * setenv.c: Move the unsetenv() function to unsetenv.c.
28352
28353         2001-12-20  Bruno Haible  <bruno@clisp.org>
28354
28355                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
28356                 use malloc instead. For SunOS 4.
28357
28358         2001-12-11  Bruno Haible  <bruno@clisp.org>
28359
28360                 * setenv.c: Declare alloca.
28361                 (compar_fn_t): New typedef.
28362                 (KNOWN_VALUE, STORE_VALUE): Use it.
28363
28364         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
28365         setenv.h.
28366
28367 2002-12-10  Paul Eggert  <eggert@twinsun.com>
28368
28369         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
28370         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
28371         Choose values that are less likely to collide with system fnmatch
28372         options.
28373         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
28374         defined (e.g., a pure POSIX system).
28375         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
28376         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
28377
28378 2002-12-06  Paul Eggert  <eggert@twinsun.com>
28379
28380         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
28381         a pain in practice to deal with generated m4 files.  This change
28382         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
28383
28384         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
28385         and jm-glibc-io.m4, as they are no longer a special case.
28386         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
28387         kludge and the auto-generation stuff.  Check only whether the
28388         functions are declared, not whether they exist, since older hosts
28389         that don't declare the functions can't use the optimization anyway.
28390
28391 2002-12-06  Jim Meyering  <jim@meyering.net>
28392
28393         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
28394
28395         Merge in changes from libc's misc/error.c, in preparation
28396         for the merge of gnulib's changes back into libc.
28397
28398         * lib/error.c (_): Define only if not already defined.
28399         Move definition to follow all #include directives.
28400         Include unlocked-io.h only if !_LIBC.
28401         [_LIBC]: Include <libio/libioP.h>.
28402         [USE_IN_LIBIO]: Include <libio/iolibio.h>
28403         (fflush): Tweak definition to use INTUSE.
28404         (putc): Define.
28405
28406 2002-12-05  Paul Eggert  <eggert@twinsun.com>
28407
28408         * lib/alloca.c [defined emacs]: Include "lisp.h".
28409         (xalloc_die) [defined emacs]: New macro.
28410         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
28411         [! defined emacs]: Include <xalloc.h>.
28412         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
28413         (pointer): Typedef to POINTER_TYPE *.
28414         (malloc): Remove decl; we now always use xmalloc.
28415         (alloca): Use old-style definition, since Emacs needs this.
28416         Check for arithmetic overflow when computing combined size.
28417
28418 2002-12-04  Paul Eggert  <eggert@twinsun.com>
28419
28420         Do not generate unlocked-io.h automatically, since it's easier to
28421         maintain it by hand.
28422
28423         * lib/unlocked-io.h: New file, from GNU diffutils,
28424         but with proper copyright notice and attribution.
28425         * lib/gen-uio: Remove.
28426         * lib/Makefile.am: Add copyright notice.
28427         (libfetish_a_SOURCES): Add unlocked-io.h.
28428         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
28429         (DISTCLEANFILES, io_functions): Remove macros.
28430         (EXTRA_DIST): Remove gen_uio.
28431         (unlocked-io.h): Remove rule.
28432
28433 2002-12-04  Jim Meyering  <jim@meyering.net>
28434
28435         Reflect the fact that stat.c and lstat.c are no longer generated.
28436         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
28437         (DISTCLEANFILES): Likewise.
28438         (EXTRA_DIST): Likewise.
28439         (all_local): Don't depend on stat.c or lstat.c.
28440         (stat.c, lstat.c): Remove rules.
28441         (EXTRA_DIST): Remove xstat.in.
28442
28443         * lib/xstat.in: Remove file.  Contents moved into stat.c.
28444         * lib/stat.c: New file.  Contents mostly from xstat.in.
28445         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
28446         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
28447
28448         * lib/safe-read.c: Rework so that it may serve to define safe_write,
28449         too.
28450         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
28451
28452 2002-12-03  Jim Meyering  <jim@meyering.net>
28453
28454         * lib/safe-read.c, safe-write.c: Change variable names and comments,
28455         but not semantics, to minimize the differences between these two files.
28456         (safe_read): Change comment to mention SAFE_READ_ERROR.
28457
28458         * lib/safe-read.c (IS_EINTR): Define.
28459         (safe_read): Use IS_EINTR in place of in-function cpp directives.
28460
28461 2002-12-02  Jim Meyering  <jim@meyering.net>
28462
28463         * lib/safe-read.c (EINTR): Define.
28464         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
28465         (INT_MAX): Provide fallback.
28466         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
28467
28468         * lib/safe-read.h (SAFE_READ_ERROR): Define.
28469
28470 2002-12-02  Bruno Haible  <bruno@clisp.org>
28471
28472         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
28473         Define, taken from safe-read.c.
28474         (INT_MAX): Provide fallback.
28475         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
28476         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
28477
28478         * lib/safe-read.c (EINTR): Remove definition.
28479         (safe_read): Don't use EINTR if it is absent.
28480
28481 2002-12-01  Jim Meyering  <jim@meyering.net>
28482
28483         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
28484         zero.
28485         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
28486
28487 2002-11-27  Paul Eggert  <eggert@twinsun.com>
28488
28489         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
28490         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
28491         with `if (! (value < limit)) abort ();', for readability.
28492
28493 2002-11-26  Karl Berry  <karl@gnu.org>
28494
28495         * lib/strdup.c: copy from libc again, with jim's ok.
28496         * lib/.cppi-disable: re-add strdup.c
28497
28498 2002-11-25  Karl Berry  <karl@gnu.org>
28499
28500         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
28501         instead of "strtol.c".
28502
28503 2002-11-25  Karl Berry  <karl@gnu.org>
28504
28505         * config/install-sh: update from automake for variable quoting, $0 in
28506         error msgs, etc.
28507
28508         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
28509         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
28510         entry.
28511
28512 2002-11-25  Jim Meyering  <jim@meyering.net>
28513
28514         * lib/mktime.c: Sync from libc, now that it has the latest fix.
28515
28516 2002-11-24  Karl Berry  <karl@gnu.org>
28517
28518         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
28519         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
28520
28521 2002-11-24  Jim Meyering  <jim@meyering.net>
28522
28523         Update from coreutils:
28524
28525         * lib/mktime.c: Merge in changes from libc.
28526
28527         Avoid a link-time failure on some Linux systems.
28528         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
28529         (otherwise).
28530         (__mon_yday): Declare with the STATIC attribute.
28531         (__mktime_internal): Likewise.
28532         Based on a report from Greg Schafer.
28533
28534 2002-11-23  Jim Meyering  <jim@meyering.net>
28535
28536         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
28537         Use `unsigned', not `int', as type of index.
28538
28539         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
28540
28541         * lib/fsusage.c: Remove unneeded parentheses around operands of
28542         `defined'.
28543
28544 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28545
28546         * lib/quotearg.h: Allow multiple inclusion by surrounding with
28547         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
28548         so that we can be included first.
28549         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
28550         * lib/quotearg.c: Include quotearg.h immediately after config.h.
28551         No need to include stddef.h or sys/types.h any more.
28552         Surround local include files with "", not "<>".
28553         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
28554         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
28555         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
28556         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
28557         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
28558         (ISPRINT): Remove; no longer needed now that we assume C89.
28559
28560         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
28561         Preserve errno.
28562
28563         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
28564         quotearg_char): Use SIZE_MAX rather than
28565         (size_t) -1 when we are talking about "infinity".
28566
28567         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
28568
28569 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28570
28571         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
28572         hint that one should use `if (! x) abort ();' rather than `assert
28573         (x);', and anyway it's one less thing to worry about configuring.
28574         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
28575         hash_rehash, hash_insert): Use abort rather than assert.
28576
28577 2002-11-22  Bruno Haible  <bruno@clisp.org>
28578
28579         * lib/safe-read.h: Assume C89. Add comments.
28580         (safe_read): Change return type to size_t.
28581         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
28582         byte counts > SSIZE_MAX correctly.
28583         * lib/safe-write.h: New file.
28584         * lib/safe-write.c: New file.
28585         * lib/full-read.h: New file.
28586         * lib/full-read.c: New file.
28587         * lib/full-write.h: Assume C89. Add comments.
28588         * lib/full-write.c: Include safe-write.h.
28589         (full_write): Rewritten to use safe_write.
28590         Suggested by Jim Meyering and Paul Eggert.
28591
28592 2002-11-21  Jim Meyering  <jim@meyering.net>
28593
28594         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
28595
28596         Merge in changes from the coreutils.
28597
28598         2002-09-25  Paul Eggert  <eggert@twinsun.com>
28599         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
28600         <stdint.h>.
28601         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
28602         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
28603         int.  Work more efficiently if X is the same width as uintmax_t.
28604         Do not compare X to -1, to avoid bogus compiler warning.
28605         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
28606         Don't assume that f_frsize and f_bsize are the same type.
28607
28608         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
28609         warning on FreeBSD.
28610
28611         * lib/makepath.c (make_path): Restore umask *before* creating the final
28612         component.
28613         (make_path): Minor reformatting.
28614
28615         * lib/xmalloc.c: Adjust to work with new autoconf macros,
28616         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
28617         HAVE_MALLOC/HAVE_REALLOC.
28618
28619         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
28620         dummy ones.  At least on GNU/Linux systems, `auto' means something
28621         else.
28622         From Michael Stone.
28623
28624 2002-11-21  Bruno Haible  <bruno@clisp.org>
28625
28626         Remove case insensitive option matching.
28627         * lib/argmatch.h (argcasematch): Remove declaration.
28628         (ARGCASEMATCH): Remove macro.
28629         (__xargmatch_internal): Remove case_sensitive argument.
28630         (XARGMATCH): Update.
28631         (XARGCASEMATCH): Remove macro.
28632         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
28633         case_sensitive argument.
28634         (argcasematch): Remove function.
28635         (__xargmatch_internal): Remove case_sensitive argument.
28636         (main): Use XARGMATCH instead of XARGCASEMATCH.
28637
28638         * lib/xmalloc.c: Change compile-time error message. Add comment about
28639         required autoconf version.
28640
28641 2002-11-20  Paul Eggert  <eggert@twinsun.com>
28642
28643         Merge argmatch cleanups from Bison.  Assume C89.
28644
28645         * lib/argmatch.c: Include config.h here, not in argmatch.h.
28646         Include stdlib.h, for EXIT_FAILURE.
28647         Always include <string.h>, since we assume C89.
28648         (EXIT_FAILURE): Remove pre-C89 bug workaround.
28649         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
28650         Include <stddef.h> instead, since it's all we need for size_t.
28651         (PARAMS): Remove.  All uses removed.
28652         (ARRAY_CARDINALITY): Do not bother to #undef.
28653         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
28654         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28655         Remove unnecessary parentheses.
28656         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28657         Insert necessary parentheses.
28658         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
28659         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
28660
28661 2002-11-19  Bruno Haible  <bruno@clisp.org>
28662
28663         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
28664         * lib/mbswidth.h: Include <stddef.h>, for size_t.
28665
28666         * lib/mbswidth.h (PARAMS): Remove macro.
28667         (mbswidth, mbsnwidth): Use ANSI C function declarations.
28668         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
28669
28670         * lib/gcd.h (PARAMS): Remove macro.
28671         (gcd): Use ANSI C function declarations.
28672         * lib/gcd.c (gcd): Likewise.
28673
28674 2002-11-15  Bruno Haible  <bruno@clisp.org>
28675
28676         * lib/strcspn.c: Include <stddef.h>.
28677         (strcspn): Use ANSI C function declaration. Change return type to
28678         size_t. Use NULL.
28679         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
28680         (strpbrk): Use NULL.
28681         * lib/strpbrk.h (PARAMS): Remove macro.
28682         (strpbrk): Use ANSI C function declaration.
28683         * lib/strstr.c: Don't include <sys/types.h>.
28684         * lib/strstr.h (PARAMS): Remove macro.
28685         (strstr): Use ANSI C function declarations.
28686
28687 2002-11-14  Karl Berry  <karl@gnu.org>
28688
28689         * config/mkinstalldirs: `do' on separate line, instead of
28690         `for var; do'.
28691
28692 2002-11-06  Bruno Haible  <bruno@clisp.org>
28693
28694         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
28695         * lib/gcd.c (gcd): Likewise.
28696
28697 2002-11-05  Bruno Haible  <bruno@clisp.org>
28698
28699         * lib/gcd.h: New file, from gettext-0.11.5.
28700         * lib/gcd.c: New file, from gettext-0.11.5.
28701
28702 2002-11-05  Bruno Haible  <bruno@clisp.org>
28703
28704         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28705         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28706         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28707         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28708
28709         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
28710         <libintl.h>.
28711         * lib/makepath.c: Include gettext.h instead of <locale.h> and
28712         <libintl.h>.
28713
28714         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
28715         * lib/human.c: Include gettext.h instead of <libintl.h>.
28716         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
28717         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
28718         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
28719         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
28720         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
28721         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
28722         (textdomain): Remove definition.
28723         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
28724
28725         * lib/long-options.c: Remove include of <libintl.h> and definition of
28726         _.
28727         * lib/same.c: Remove include of <libintl.h> and definition of _.
28728
28729 2002-11-04  Owen Taylor  <otaylor@redhat.com>
28730
28731         * lib/config.charset: A few additions for Solaris.
28732
28733 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28734
28735         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
28736         * lib/localcharset.c (locale_charset): Declare as extern "C".
28737
28738 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28739
28740         * lib/config.charset: msdos in uk_UA uses CP1125.
28741
28742 2002-11-04  Bruno Haible  <bruno@clisp.org>
28743
28744         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
28745         * lib/strcase.h: New file, from GNU gettext-0.11.5.
28746         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
28747         * lib/strstr.h: New file, from GNU gettext-0.11.5.
28748         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
28749
28750 2002-11-04  Bruno Haible  <bruno@clisp.org>
28751
28752         * lib/localcharset.c (locale_charset): Don't return an empty string.
28753
28754 2002-11-04  Bruno Haible  <bruno@clisp.org>
28755
28756         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
28757         aliases.
28758
28759 2002-11-04  Bruno Haible  <bruno@clisp.org>
28760
28761         * lib/config.charset: Update for newest glibc. Add canonical names
28762         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
28763
28764 2002-11-04  Bruno Haible  <bruno@clisp.org>
28765
28766         * lib/config.charset: Add support for NetBSD.
28767
28768 2002-11-04  Bruno Haible  <bruno@clisp.org>
28769
28770         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
28771
28772 2002-11-01  Bruno Haible  <bruno@clisp.org>
28773
28774         * configure.in: Add AC_CONFIG_AUX_DIR call.
28775         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
28776         test/Makefile.
28777         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
28778
28779 2002-09-28  Karl Berry  <karl@gnu.org>
28780
28781         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
28782         installed automake until the next release, since changes have been
28783         made.
28784
28785 2002-09-25  Karl Berry  <karl@gnu.org>
28786
28787         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
28788         * lib/getopt*: copy from libc/posix.
28789         * lib/gettext.h: copy from gettext.
28790         * lib/.cppi-disable: add strdup.c, gettext.h.
28791
28792 2002-09-25  Karl Berry  <karl@gnu.org>
28793
28794         * config/srclist.txt: enable gettext.h check.
28795         * config/config.{guess,sub}: update from prep.
28796         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
28797                 from automake 1.6.3.
28798         See srclist*.
28799
28800 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
28801
28802         * regex.c (PATFETCH): Remove the translating fetch.
28803         (PATFETCH_RAW): Rename to PATFETCH.
28804         (set_image_of_range): New fun.
28805         (SET_RANGE_TABLE_WORK_AREA): Use it.
28806         (regex_compile): Don't translate the pattern chars so eagerly.
28807         Only do it when inserting an `exactn' bytecode or when handling
28808         a char-range.
28809         (mutually_exclusive_p): Avoid empty statement.
28810
28811 2002-07-06  Jim Meyering  <meyering@lucent.com>
28812
28813         * m4/README: Don't mention Makefile.am.in.
28814         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
28815
28816 2002-07-01  Jim Meyering  <meyering@lucent.com>
28817
28818         * lib/c-stack.c: Include sys/time.h.
28819         From Volker Borchert.
28820
28821 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28822
28823         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
28824
28825 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28826
28827         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
28828         New macro.  Use it uniformly instead of
28829         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
28830         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
28831         reported by Vin Shelton.
28832
28833 2002-06-22  Paul Eggert  <eggert@twinsun.com>
28834
28835         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
28836         Do not assume SA_SIGINFO behavior.
28837         Bug reported by Jim Meyering on NetBSD 1.5.2.
28838
28839 2002-06-22  Jim Meyering  <meyering@lucent.com>
28840
28841         * m4/c-stack.m4: New file, from diffutils-2.8.2.
28842         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
28843
28844         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
28845         now that configure.ac uses AC_GNU_SOURCE.
28846         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
28847         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
28848
28849         Update to latest tools.  Suggestions from Paul Eggert.
28850         * m4/stdbool.m4: New file, from diffutils-2.8.2.
28851         * m4/gnu-source.m4: Update from diffutils-2.8.2.
28852         * m4/fnmatch.m4: Likewise.
28853         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
28854         to AC_HEADER_STDBOOL
28855
28856 2002-06-22  Jim Meyering  <meyering@lucent.com>
28857
28858         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
28859         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
28860
28861 2002-06-22  Jim Meyering  <meyering@lucent.com>
28862
28863         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
28864
28865         * lib/exitfail.c, exitfail.h: Likewise.
28866         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
28867
28868         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
28869         of fnmatch.h.
28870         (EXTRA_DIST): Add fnmatch_loop.c.
28871         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
28872
28873         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
28874         * lib/fnmatch.c: Update from diffutils-2.8.2.
28875         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
28876         * lib/fnmatch.h: Remove file.
28877
28878 2002-06-21  Jim Meyering  <meyering@lucent.com>
28879
28880         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
28881         * m4/mbrtowc.m4: Likewise.
28882
28883         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
28884         * m4/mbswidth.m4: Reflect name change:
28885         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
28886         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
28887
28888         * m4/lib-link.m4: Update from gettext-0.11.2.
28889         * m4/gettext.m4: Likewise.
28890
28891         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
28892         From Alfred M. Szmidt.
28893
28894 2002-06-18  Paul Eggert  <eggert@twinsun.com>
28895
28896         * lib/file-type.h: Report an error if neither S_ISREG nor
28897         S_IFREG is defined, instead of using a test specific to glibc
28898         2.2.  This should be safe, since POSIX requires S_ISREG and
28899         Unix Version 7 had S_IFREG.  We don't need to check for
28900         <sys/types.h> since we don't use any symbols that it defines.
28901
28902 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
28903
28904         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
28905         $@-t, so that each temporary file name is unique and valid in the first
28906         8 characters, for operation under DOS.
28907
28908 2002-06-15  Paul Eggert  <eggert@twinsun.com>
28909
28910         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
28911
28912 2002-06-15  Jim Meyering  <meyering@lucent.com>
28913
28914         Work even with DJGPP 2.03, which lacks support for symlinks.
28915         From Richard Dawe.
28916         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
28917         is defined.
28918         * lib/lchown.c (S_ISLNK): Likewise.
28919
28920 2002-06-15  Jim Meyering  <meyering@lucent.com>
28921
28922         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
28923         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
28924         have been included before this file.
28925
28926 2002-06-14  Jim Meyering  <meyering@lucent.com>
28927
28928         * lib/file-type.h: Use the version from diffutils-2.8.2.
28929         * lib/file-type.c: Likewise.
28930
28931 2002-06-07  Jim Meyering  <meyering@lucent.com>
28932
28933         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
28934         They're needed at least for NetBSD 1.5.2.
28935         ($statxfs_includes): Include those same headers.
28936         ($statxfs_includes): Include sys/vfs.h if available.
28937         ($statxfs_includes): Likewise for sys/statvfs.h.
28938         Check for the following members in both structs statfs and statvfs:
28939         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
28940
28941 2002-06-01  Jim Meyering  <meyering@lucent.com>
28942
28943         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
28944         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
28945
28946 2002-05-28  Jim Meyering  <meyering@lucent.com>
28947
28948         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
28949         Reported by Volker Borchert.
28950
28951 2002-05-27  Jim Meyering  <meyering@lucent.com>
28952
28953         Fix a problem seen only on nonconforming systems whereby ls.c's
28954         use of localtime, and then of gettimeofday would cause trouble:
28955         the localtime call used to initialize rpl_gettimeofday's save
28956         mechanism would clobber ls's current local time information so
28957         that in any long listing the first file would always be listed
28958         with date 1970-01-01.  Analysis by Volker Borchert.
28959
28960         * lib/gettimeofday.c (localtime): Undefine.
28961         (rpl_localtime): New function.
28962
28963 2002-05-27  Jim Meyering  <meyering@lucent.com>
28964
28965         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
28966         localtime.
28967
28968         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
28969         use the replacement function; it wouldn't resolve at link time.
28970         Reported by Volker Borchert.
28971
28972 2002-05-22  Jim Meyering  <meyering@lucent.com>
28973
28974         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
28975         file-type.h.
28976         * lib/file-type.h: New file.
28977         * lib/file-type.c (file_type): New file/function.  Extracted from
28978         diffutils.
28979
28980 2002-04-30  Jim Meyering  <meyering@lucent.com>
28981
28982         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
28983
28984 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28985
28986         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
28987
28988 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28989
28990         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
28991         Do not check for alloca.h (no longer used) or stdbool.h (was never
28992         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
28993
28994 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28995
28996         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
28997
28998 2002-04-29  Jim Meyering  <meyering@lucent.com>
28999
29000         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
29001         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
29002         Use AC_FUNC_STRNLEN here instead.
29003
29004         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
29005         With autoconf-2.53a, it's part of AC_PROG_CC.
29006
29007 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29008
29009         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
29010         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
29011
29012 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29013
29014         * lib/sig2str.h, lib/sig2str.c: New files.
29015         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
29016
29017 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29018
29019         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
29020         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
29021         of 127, since 64 is the largest conceivable number for ancient
29022         nonstandard hosts.
29023         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
29024
29025 2002-04-28  Jim Meyering  <meyering@lucent.com>
29026
29027         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
29028
29029 2002-04-24  Jim Meyering  <meyering@lucent.com>
29030
29031         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
29032         (jm_PREREQ): Use it.
29033
29034         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
29035         mach/mach.h fcntl.h.
29036         Check for this function: setlocale.
29037
29038 2002-04-24  Jim Meyering  <meyering@lucent.com>
29039
29040         * lib/gettext.h: New file, from Gettext.
29041         * lib/Makefile.am (INCLUDES): Remove -I../intl.
29042         (libfetish_a_SOURCES): Add gettext.h.
29043
29044 2002-04-16  Jim Meyering  <meyering@lucent.com>
29045
29046         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
29047         ut_pid, ut_id, ut_exit.
29048
29049 2002-04-16  Jim Meyering  <meyering@lucent.com>
29050
29051         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
29052         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
29053         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
29054
29055 2002-04-12  Jim Meyering  <meyering@lucent.com>
29056
29057         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
29058         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
29059         existence of the getmntinfo function.  Needed for Darwin 5.3.
29060
29061         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
29062         This is necessary at least on Darwin 5.3.
29063
29064         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
29065         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
29066         strnlen.o in the library, and that makes some versions of ranlib
29067         object.
29068
29069 2002-04-12  Jim Meyering  <meyering@lucent.com>
29070
29071         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
29072
29073 2002-04-09  Jim Meyering  <meyering@lucent.com>
29074
29075         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
29076         to be more precise.  Rather than saying we're checking whether the
29077         function `works', say what we're testing.
29078         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
29079         Reported by Bruno Haible.
29080
29081 2002-03-10  Jim Meyering  <meyering@lucent.com>
29082
29083         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
29084         Suggestion from Santiago Vila.
29085
29086 2002-03-08  Jim Meyering  <meyering@lucent.com>
29087
29088         * lib/rename.c: Mention that this wrapper is needed also on
29089         mips-dec-ultrix4.4 systems.
29090
29091 2002-03-02  Jim Meyering  <meyering@lucent.com>
29092
29093         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
29094         not HAVE_CLOCK_SETTIME.
29095
29096 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29097
29098         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
29099         Check for clock_settime.
29100
29101 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29102
29103         * lib/nanosleep.h: Rename to....
29104         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
29105
29106         * lib/gettime.c: New file.
29107         * lib/settime.c: New file.
29108         * lib/stime.c: Remove.
29109
29110         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
29111         timespec.h.  Remove nanosleep.h.
29112
29113 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29114
29115         * m4/acl.m4: New file.
29116         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
29117         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
29118
29119 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29120
29121         * lib/acl.c, lib/acl.h: New files.
29122         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
29123
29124 2002-02-24  Jim Meyering  <meyering@lucent.com>
29125
29126         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
29127         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
29128         cause trouble.  Reported by Nelson Beebe.
29129
29130 2002-02-23  Paul Eggert  <eggert@twinsun.com>
29131
29132         * lib/path-concat.c (xpath_concat): Reorder code to pacify
29133         compilers that don't know that xalloc_die never returns.
29134
29135 2002-02-20  Jim Meyering  <meyering@lucent.com>
29136
29137         * lib/getdate.c: Regenerate using bison-1.33.
29138
29139 2002-02-17  Jim Meyering  <meyering@lucent.com>
29140
29141         * config/config.guess (main): Don't use `head -1'; it's no longer
29142         portable. Use `sed 1q' instead.
29143
29144 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
29145
29146         * m4/codeset.m4: Upgrade to gettext-0.11.
29147         * m4/gettext.m4: Upgrade to gettext-0.11.
29148         * m4/glibc21.m4: Upgrade to gettext-0.11.
29149         * m4/iconv.m4: Upgrade to gettext-0.11.
29150         * m4/isc-posix.m4: Upgrade to gettext-0.11.
29151         * m4/lcmessage.m4: Upgrade to gettext-0.11.
29152         * m4/lib-ld.m4: New file, from gettext-0.11.
29153         * m4/lib-link.m4: New file, from gettext-0.11.
29154         * m4/lib-prefix.m4: New file, from gettext-0.11.
29155         * m4/progtest.m4: Upgrade to gettext-0.11.
29156
29157 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29158
29159         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
29160         (jm_PREREQ): Use it.
29161
29162 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29163
29164         * lib/posixver.c, lib/posixver.h: New files.
29165         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29166
29167 2002-02-02  Paul Eggert  <eggert@twinsun.com>
29168             Bruno Haible  <bruno@clisp.org>
29169
29170         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
29171         (fwrite_success_callback): New declaration.
29172         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
29173         print_unicode_char. Call failure callback instead of error.
29174         (fwrite_success_callback): New function.
29175         (exit_failure_callback): New function.
29176         (fallback_failure_callback): New function.
29177         (print_unicode_char): Call unicode_to_mb.
29178
29179 2002-01-26  Jim Meyering  <meyering@lucent.com>
29180
29181         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
29182         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
29183
29184 2002-01-26  Jim Meyering  <meyering@lucent.com>
29185
29186         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
29187
29188 2002-01-22  Paul Eggert  <eggert@twinsun.com>
29189
29190         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
29191
29192 2002-01-22  Jim Meyering  <meyering@lucent.com>
29193
29194         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
29195         Otherwise, some versions of automake would omit the rule that makes
29196         Makefile from Makefile.in.
29197
29198 2002-01-21  Paul Eggert  <eggert@twinsun.com>
29199
29200         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
29201         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29202         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
29203         (memcoll): Set errno to zero if there is no error.
29204
29205         * lib/quotearg.c (quotearg_buffer_restyled):
29206         Fix bug with quoting buffers containing NUL when backslashing escapes.
29207         This bug was exposed by the other changes in this patch.
29208         (quotearg_n_options): New arg ARGSIZE.
29209         All callers changed.
29210         (quoting_options_from_style): New function.
29211         (quotearg_n_style): Use it.
29212         (quotearg_n_style_mem): New function.
29213
29214         * lib/quotearg.h (quotearg_n_style_mem): New function.
29215
29216 2002-01-19  Jim Meyering  <meyering@lucent.com>
29217
29218         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
29219         Remove useless quotes: DF_PROG="df".
29220         * m4/strnlen.m4: New file.
29221
29222 2002-01-16  Paul Eggert  <eggert@twinsun.com>
29223
29224         * lib/backupfile.c (ISDIGIT): Comment fix.
29225         * lib/getdate.y (ISDIGIT): Likewise.
29226         * lib/posixtm.c (ISDIGIT, year): Likewise.
29227         * lib/strverscmp.c (ISDIGIT): Likewise.
29228         * lib/userspec.c (ISDIGIT): Likewise.
29229
29230 2002-01-16  Jim Meyering  <meyering@lucent.com>
29231
29232         * lib/getdate.y: Add three semicolons, each just before a closing
29233         brace. Bison (as of version 1.31) no longer papers over that mistake.
29234
29235 2002-01-05  Jim Meyering  <meyering@lucent.com>
29236
29237         * lib/version-etc.c (version_etc_copyright): Update copyright year.
29238
29239 2001-12-19  Paul Eggert  <eggert@twinsun.com>
29240
29241         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
29242         not silently exit merely because the output buffer happens to
29243         have nothing pending.
29244
29245 2001-12-18  Paul Eggert  <eggert@twinsun.com>
29246
29247         See the big note in ../ChangeLog.
29248         * lib/human.c (suffixes): Prefer K to k for 1024.
29249         (generate_suffix_backwards): New function.
29250         (human_readable_inexact): Use it.
29251         * lib/xstrtol.c (__xstrtol): If there is no number but there
29252         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
29253         Accept 'K' as well as 'k'.
29254
29255 2001-12-15  Jim Meyering  <meyering@lucent.com>
29256
29257         * lib/regex.h (__restrict_arr): Update from libc.
29258
29259         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
29260         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
29261         (STREQ): Define.
29262
29263 2001-12-14  Jim Meyering  <meyering@lucent.com>
29264
29265         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
29266         Suggestion from Bruno Haible.
29267
29268 2001-12-10  Jim Meyering  <meyering@lucent.com>
29269
29270         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
29271         xrealloc, Instead, include "xalloc.h".
29272         (initbuffer): Don't cast xmalloc return value to char*.
29273         (readline): Reword comment.
29274         Don't cast xrealloc return value to char*
29275         Return NULL, not 0.
29276
29277 2001-12-09  Jim Meyering  <meyering@lucent.com>
29278
29279         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
29280         about `signed and unsigned type in conditional expression'.
29281         * lib/posixtm.c (posix_time_parse): Likewise.
29282
29283         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
29284
29285         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
29286         to avoid a pedantic warning.
29287
29288         * lib/getstr.c: Don't include assert.h.
29289         (getstr): Remove warning-evoking assertions.
29290         Return -1 if offset parameter is out of bounds.
29291         Change the type of a local from int to size_t.
29292
29293         * lib/strftime.c (my_strftime_localtime_r): Include this function
29294         definition in the `#if ! HAVE_TM_GMTOFF' block.
29295
29296         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
29297         Include xalloc.h instead.
29298
29299 2001-12-02  Jim Meyering  <meyering@lucent.com>
29300
29301         * lib/tempname.c: Don't declare getenv, thus reverting the change of
29302         2001-11-18.  It's no longer necessary, now that stdlib.h is always
29303         included.
29304
29305         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
29306         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
29307
29308 2001-11-30  Akim Demaille  <akim@epita.fr>
29309
29310         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
29311         before being defined.
29312
29313 2001-11-27  Paul Eggert  <eggert@twinsun.com>
29314
29315         * lib/quotearg.h (quotearg_n, quotearg_n_style):
29316         First arg is int, not unsigned.
29317         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
29318         (SIZE_MAX, UINT_MAX): New macros.
29319         (quotearg_n_options): Abort if N is negative.
29320         Avoid overflow check on hosts where size_t is 64 bits and int
29321         is 32 bits, as overflow is impossible there.
29322         Fix off-by-one typo that caused unnecessary reallocation.
29323
29324 2001-11-27  Jim Meyering  <meyering@lucent.com>
29325
29326         * lib/tempname.c: Merge with version from libc.
29327         * lib/regex.c: Likewise.
29328
29329         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
29330         systems for which STDC_HEADERS is 0, it was not included, resulting in
29331         a warning about an integer-to-pointer conversion problem with getenv.
29332         Reported by Volker Borchert.
29333
29334 2001-11-26  Jim Meyering  <meyering@lucent.com>
29335
29336         * lib/gtod.h: Remove file.
29337         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
29338         * lib/gettimeofday.c: Don't include gtod.h.
29339         (GTOD_init): Remove function.
29340         (rpl_gettimeofday): Do its job here instead, rather than aborting.
29341         Suggestion from Volker Borchert.
29342
29343 2001-11-23  Jim Meyering  <meyering@lucent.com>
29344
29345         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
29346         it.
29347         * lib/hash.c (struct hash_table): Define it here instead.
29348
29349 2001-11-22  Jim Meyering  <meyering@lucent.com>
29350
29351         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
29352
29353 2001-11-20  Jim Meyering  <meyering@lucent.com>
29354
29355         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
29356         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
29357
29358 2001-11-19  Jim Meyering  <meyering@lucent.com>
29359
29360         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
29361         directory.  Use "conftestXXXXXX" as the template.
29362         Suggestion from Paul Eggert.
29363
29364         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
29365         immediately, so the test doesn't mistakenly hit the max-open-files
29366         limit.
29367
29368 2001-11-18  Paul Eggert  <eggert@twinsun.com>
29369
29370         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
29371         (TEMPORARIES): New macro.
29372         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
29373         removes an artificial limitation (e.g. HP-UX 10.20, where
29374         TMP_MAX is 17576).
29375
29376 2001-11-18  Jim Meyering  <meyering@lucent.com>
29377
29378         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
29379
29380 2001-11-18  Jim Meyering  <meyering@lucent.com>
29381
29382         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
29383         on SunOS 4.
29384
29385         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
29386         files will be created before anything else.
29387
29388 2001-11-17  Paul Eggert  <eggert@twinsun.com>
29389
29390         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
29391         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
29392
29393 2001-11-17  Jim Meyering  <meyering@lucent.com>
29394
29395         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
29396         Prompted by a report from Bob Proulx.
29397
29398         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
29399         Instead, require UTILS_FUNC_MKSTEMP.
29400
29401 2001-11-17  Jim Meyering  <meyering@lucent.com>
29402
29403         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
29404         Now, that's done as part of AC_FUNC_STRTOD.
29405
29406 2001-11-17  Jim Meyering  <meyering@lucent.com>
29407
29408         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
29409         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
29410         rather than group writable.  Patch by Juan F. Codagnone.
29411
29412         * lib/readtokens.c: Remove explicit declarations of xmalloc and
29413         xrealloc, Instead, include "xalloc.h".
29414
29415         * lib/mountlist.c: Include unlocked-io.h after all system headers.
29416         Remove explicit declarations of xmalloc, xrealloc,
29417         and xstrdup.  Instead, include "xalloc.h".
29418
29419         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
29420         unlocked-io.h.
29421         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
29422         Likewise.
29423         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
29424
29425         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
29426         Reported by Padraig Brady.
29427
29428         * lib/mkstemp.c: #undef mkstemp.
29429         Include config.h.
29430         (rpl_mkstemp): Rename from mkstemp.
29431         Protoize.
29432
29433 2001-11-16  Jim Meyering  <meyering@lucent.com>
29434
29435         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
29436         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
29437         determine the amount of total physical memory, use pstat_getstatic.
29438         HPUX-11 doesn't define _SC_PHYS_PAGES.
29439         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
29440         If sysconf couldn't be used to determine the amount of available
29441         physical memory, use both pstat_getstatic and pstat_getdynamic.
29442         Based on a patch from Bob Proulx.
29443
29444 2001-11-10  Jim Meyering  <meyering@lucent.com>
29445
29446         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
29447         (jm_PREREQ): Use it.
29448
29449 2001-11-09  Jim Meyering  <meyering@lucent.com>
29450
29451         * m4/jm-macros.m4: Require autoconf-2.52f.
29452         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
29453         Use these AC_-prefixed names, not the AM_-prefixed ones.
29454
29455         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
29456
29457 2001-11-05  Jim Meyering  <meyering@lucent.com>
29458
29459         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
29460
29461 2001-11-04  Jim Meyering  <meyering@lucent.com>
29462
29463         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
29464         $DEFS.
29465
29466 2001-11-03  Jim Meyering  <meyering@lucent.com>
29467
29468         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
29469         of AC_DEFUN.
29470
29471         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
29472         know the name of the variable in the macro definition.
29473
29474 2001-11-03  Jim Meyering  <meyering@lucent.com>
29475
29476         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
29477         in argmatch_to_argument call.
29478
29479         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
29480         argument.
29481
29482         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
29483         e.g., a fault due to an attempt to free a NULL pointer.
29484
29485 2001-11-01  Jim Meyering  <meyering@lucent.com>
29486
29487         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
29488         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
29489
29490 2001-11-01  Jim Meyering  <meyering@lucent.com>
29491
29492         * lib/dirfd.c, lib/dirfd.h: New files.
29493         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
29494
29495         * lib/hash.c (hash_print) [TESTING]: Clean up.
29496
29497 2001-10-22  Paul Eggert  <eggert@twinsun.com>
29498
29499         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
29500         to avoid a warning if -Wall.
29501
29502 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
29503
29504         * README: New file
29505         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
29506         (per RMS's instructions, this is now the canonical source)
29507         * lgpl/, gpl/: New directories.
29508
29509 2001-10-21  Paul Eggert  <eggert@twinsun.com>
29510
29511         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
29512
29513 2001-10-21  Jim Meyering  <meyering@lucent.com>
29514
29515         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
29516         this code would end up calling gettext even in packages built
29517         with --disable-nls.
29518         * lib/getopt.c (_): Likewise.
29519         * lib/regex.c (_): Likewise.
29520
29521 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29522
29523         * m4/error.m4 (jm_PREREQ_ERROR):
29524         Do not invoke AC_CHECK_FUNCS with strerror_r, as
29525         AC_FUNC_STRERROR_R does that.
29526         Check for strerror declaration.
29527
29528         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
29529         are supposed to have them these days.
29530         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
29531         Merge changes from latest Autoconf CVS.
29532         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
29533         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
29534         POSIX decided to standardize on the int flavor of strerror_r.
29535
29536 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29537
29538         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
29539         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
29540         Use strerror_r that is only a macro, even if it is not a function.
29541         (strerror): Check for HAVE_DECL_STRERROR before declaring.
29542         (private_strerror): Use prototypes, not old-style function definition.
29543         (print_errno_message): New function.
29544         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
29545         char*-flavored one.
29546         (error_tail, error, error_at_line): Use it.
29547
29548 2001-10-11  Jim Meyering  <meyering@lucent.com>
29549
29550         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
29551         and quote_n (1, ... to avoid clobbering a buffer.
29552
29553 2001-10-05  Jim Meyering  <meyering@lucent.com>
29554
29555         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
29556         hash-pjw.h.
29557         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
29558         * lib/hash-pjw.h: New file.
29559
29560 2001-09-30  Jim Meyering  <meyering@lucent.com>
29561
29562         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
29563         `struct fsstat' has the `f_fstypename' member.
29564         Use that to define FS_TYPE, which is now used to make
29565         the getfsstat link test tighter.
29566
29567 2001-09-30  Jim Meyering  <meyering@lucent.com>
29568
29569         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
29570         Include <sys/ucred.h>, for Apple Darwin.
29571         Include sys/mount.h and sys/fs_types.h only if available.
29572         (FS_TYPE): Define.
29573         (read_filesystem_list): Use FS_TYPE.
29574
29575 2001-09-29  Paul Eggert  <eggert@twinsun.com>
29576
29577         * lib/exclude.c (excluded_filename): 0 -> false, since it's
29578         a boolean context.
29579
29580 2001-09-29  Jim Meyering  <meyering@lucent.com>
29581
29582         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29583         [one-argument getmntent function]): Include stdio.h before mntent.h.
29584         SunOS 4.1.x needs it for the declaration of `FILE'.
29585         Patch by Volker Borchert.
29586
29587         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29588         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
29589         sys/fs_types.h, and make the link-test for getfsstat guard #include
29590         directives with appropriate #if HAVE_*_H tests so that we can
29591         detect getfsstat on Apple Darwin1.3.7 systems.
29592         Reported by Nelson Beebe.
29593         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
29594
29595 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29596
29597         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29598         #defines strtoimax.  Also treat the other strto* functions
29599         like strtoimax.
29600
29601         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29602         Check for strtoul and strtoumax,
29603         as those declarations are made even in the signed case.
29604         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
29605         Likewise, for strtol and strtoimax.
29606
29607 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29608
29609         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29610         #defines strtoimax.  Also treat the other strto* functions
29611         like strtoimax.
29612
29613         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
29614         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
29615         (strtoimax, strtoumax): Do not declare if already defined as a macro.
29616
29617 2001-09-26  Jim Meyering  <meyering@lucent.com>
29618
29619         Most macros in unlocked-io.h had the wrong number of arguments.
29620         * lib/gen-uio: New script.
29621         (USE_UNLOCKED_IO): Define to 1 if not already defined.
29622         * lib/unlocked-io.hin: Remove file.
29623         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
29624         rather than trying to embed it here.
29625         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
29626         Reported by Padraig Brady.
29627
29628 2001-09-25  Volker Borchert  <bt@teknon.de>
29629
29630         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
29631         `result'.
29632
29633 2001-09-24  Jim Meyering  <meyering@lucent.com>
29634
29635         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
29636
29637 2001-09-23  Jim Meyering  <meyering@lucent.com>
29638
29639         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
29640         instead of the mere test for existence of mntent.h.  The latter
29641         would get a false-positive on AIX 3.4 systems.
29642         In the outer getmntent if-block, don't die if neither of the getmntent
29643         tests succeeds.  Instead, just fall through and continue with the
29644         remaining tests.
29645
29646 2001-09-23  Jim Meyering  <meyering@lucent.com>
29647
29648         * lib/mountlist.c: Remove useless parentheses in #if directives.
29649         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
29650         the deprecated MOUNTED symbol is no longer defined in mntent.h.
29651
29652 2001-09-22  Jim Meyering  <meyering@lucent.com>
29653
29654         * m4/gettext.m4: New file.  From gettext.
29655         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
29656         * m4/progtest.m4: Likewise
29657         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
29658         * m4/glibc21.m4: Likewise.
29659
29660         * m4/libintl.m4: Remove.  No longer used.
29661
29662 2001-09-22  Jim Meyering  <meyering@lucent.com>
29663
29664         * lib/localcharset.c: Update from latest gettext.
29665         * lib/config.charset: Likewise.
29666
29667 2001-09-20  Jim Meyering  <meyering@lucent.com>
29668
29669         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
29670         strtoimax.
29671         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
29672         strtoumax.
29673
29674 2001-09-20  Jim Meyering  <meyering@lucent.com>
29675
29676         * lib/xstrtol.c (strtoimax): Guard declaration with
29677         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
29678         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
29679         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
29680         (strtoumax): Likewise, for completeness (it wasn't necessary).
29681
29682 2001-09-17  Paul Eggert  <eggert@twinsun.com>
29683
29684         * lib/strtoimax.c (HAVE_LONG_LONG):
29685         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
29686         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
29687         to work around bug in IBM C compiler.
29688
29689 2001-09-17  Jim Meyering  <meyering@lucent.com>
29690
29691         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
29692         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
29693         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
29694         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
29695         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
29696         whenever the right hand side need not be expanded by the shell.
29697
29698 2001-09-16  Paul Eggert  <eggert@twinsun.com>
29699
29700         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
29701         library.  It's not correct, as some older glibcs are buggy.
29702         fnmatch wasn't fixed until glibc 2.2.
29703
29704         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
29705         special shell magic here.
29706
29707 2001-09-16  Jim Meyering  <meyering@lucent.com>
29708
29709         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
29710         * m4/jm-macros.m4: Require it.
29711
29712 2001-09-16  Jim Meyering  <meyering@lucent.com>
29713
29714         * lib/mkdir.c: New file.
29715
29716 2001-09-15  Jim Meyering  <meyering@lucent.com>
29717
29718         * m4/jm-macros.m4: Check for help2man.
29719
29720 2001-09-11  Jim Meyering  <meyering@lucent.com>
29721
29722         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
29723         The body, by Paul Eggert, was moved here from configure.in.
29724         * m4/jm-macros.m4: Require UTILS_HOST_OS.
29725
29726 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29727
29728         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
29729         (jm_PREREQ): Use it.
29730
29731 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29732
29733         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
29734         Use ssize_t, not int, to store result of readlink.
29735         Check for ssize_t overflow as well as size_t overflow,
29736         as POSIX says the result of readlink is implementation-defined
29737         when ssize_t overflows.
29738         Remove unnecessary cast to char*.
29739         Use free+malloc instead of realloc, as the storage doesn't need
29740         to be preserved and it's clearer and can be more efficient that way.
29741         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
29742         * lib/xreadlink.h (xreadlink): Update prototype.
29743
29744 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29745
29746         * lib/xgetcwd.c: Revert some of the previous change; intead,
29747         fix the HAVE_GETCWD_NULL code to behave more like the
29748         !HAVE_GETCWD_NULL code used to.
29749
29750         Include "xalloc.h".
29751         (xgetcwd): Do not return NULL when memory is exhausted; instead,
29752         invoke xalloc_die.
29753
29754 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29755
29756         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
29757         sys/param.h, as pathmax.h includes them.
29758
29759 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29760
29761         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
29762         (jm_PREREQ_XGETCWD): New macro.
29763
29764         * m4/getcwd.m4: New file.
29765
29766 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29767
29768         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
29769         like the HAVE_GETCWD_NULL code.
29770         Include pathmax.h if not HAVE_GETCWD.
29771         Do not include xalloc.h.
29772         (INITIAL_BUFFER_SIZE): New symbol.
29773         Do not use xmalloc / xrealloc, since the caller is responsible for
29774         handling errors.  Preserve errno around `free' during failure.
29775         Do not overrun buffer when using getwd.
29776
29777 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29778
29779         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
29780         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
29781         getcwd (NULL, 0).
29782
29783 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29784
29785         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
29786         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
29787         spotted by Jim Meyering.
29788
29789 2001-09-03  Jim Meyering  <meyering@lucent.com>
29790
29791         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
29792         failure.
29793
29794 2001-09-02  Jim Meyering  <meyering@lucent.com>
29795
29796         * lib/error.c: Update from GNU libc.
29797
29798 2001-09-01  Jim Meyering  <meyering@lucent.com>
29799
29800         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
29801         Used by df.
29802
29803 2001-09-01  Jim Meyering  <meyering@lucent.com>
29804
29805         * lib/xreadlink.c: New file.
29806         * lib/xreadlink.h: New file.
29807         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
29808         xreadlink.h.
29809
29810         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
29811         doesn't conflict with sparc Solaris 7's definition in
29812         /usr/include/sys/int_types.h.
29813
29814         * lib/exclude.c: Use `""', not `<>' to #include non-system header
29815         files.
29816         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
29817         and strncasecmp as r-values.  Unixware didn't have declarations.
29818
29819 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29820
29821         * lib/xstrtol.h: Add copyright notice.
29822         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
29823         LONGINT_INVALID_SUFFIX_CHAR.
29824
29825 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29826
29827         * lib/xstrtol.c (strtoimax): New decl.
29828
29829 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29830
29831         * lib/xgetcwd.c: Don't include pathmax.h.
29832         Include stdlib.h and unistd.h if available.
29833         Include xalloc.h.
29834         (xmalloc, xstrdup, free): Remove decls.
29835         (xgetcwd): Don't assume sizes fit in unsigned.
29836         Check for overflow when computing sizes.
29837         Simplify reallocation code.
29838
29839 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29840
29841         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
29842         a directory's st_size can have an arbitrary value, so the old
29843         usage could waste an arbitrary amount of memory.  All uses
29844         changed.
29845         * lib/savedir.h: Update prototype.
29846
29847 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29848
29849         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
29850
29851         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
29852         old strtoimax.c.
29853
29854         Also, make the following further changes to make this file's
29855         configuration more similar to that of strtol.c:
29856         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
29857         (strtoumax, uintmax_t, strtoull, strtol): Remove.
29858         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
29859         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
29860         changed to signed values.
29861
29862         And make the following changes as well:
29863         Fix copyright notice, as 1999 was missing.
29864         (verify): New macro.
29865         (strtoimax): Check sizes at compile-time, not run-time.
29866         Prefer strtol to strtoll if both work.
29867         (main): Remove; it was not that useful and was a pain to maintain.
29868
29869         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
29870
29871 2001-08-31  Jim Meyering  <meyering@lucent.com>
29872
29873         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
29874         Use an initial, malloc'd, buffer of length 128 rather than
29875         a statically allocated one of length 1024.
29876
29877 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29878
29879         Simplify code, partly by assuming autoconf 2.52 semantics.
29880
29881         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
29882
29883         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
29884         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
29885         All uses removed.
29886         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
29887         Move AC_REQUIRE to next-to-top level, to avoid confusion.
29888         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
29889         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
29890         jm_AC_HEADER_INTTYPES_H.
29891         * m4/jm-macros.m4 (jm_MACROS): Likewise.
29892
29893         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
29894
29895         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29896         Quote first arg of AC_DEFUN.
29897         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
29898         since they are needed to parse the include file even if we need
29899         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
29900         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
29901         but with opposite signedness.
29902
29903 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29904
29905         Merge 'exclude' changes from tar 1.13.22.
29906         This fixes one or two unlikely storage allocation overflow bugs,
29907         but doesn't change user-visible behavior otherwise.
29908
29909 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29910
29911         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
29912         (jm_PREREQ_EXCLUDE): New macro.
29913
29914 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29915
29916         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
29917         tm to be declared.
29918
29919 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29920
29921         * lib/hash.c: Remove '2001' from copyright notice.
29922
29923 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29924
29925         * lib/full-write.h: New file.
29926         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
29927         * lib/full-write.c: Correct credits, as cccp.c no longer
29928         exists and anyway it was so heavily changed from the old cccp
29929         code as to be unrecognizable.  Include full-write.h.
29930         (full_write) Return size_t, with short writes meaning failure.
29931         All callers changed.  This fixes a bug with large buffers
29932         on 64-bit hosts.
29933         * lib/utime.c: Include full-write.h.
29934
29935 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29936
29937         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
29938         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
29939         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
29940         Include if available.
29941         (<xalloc.h>): Include
29942         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
29943         (verify): New macro.  Use it to verify that EXCLUDE macros do not
29944         collide with FNM macros.
29945         (struct patopts): New struct.
29946         (struct exclude): Use it, as exclude patterns now come with options.
29947         (new_exclude): Support above changes.
29948         (new_exclude, add_exclude_file):
29949         Initial size must now be a power of two to simplify overflow checking.
29950         (free_exclude, fnmatch_no_wildcards): New function.
29951         (excluded_filename): No longer requires options arg, as the options
29952         are determined by add_exclude.  Now returns bool, not int.
29953         (excluded_filename, add_exclude):
29954         Add support for the fancy new exclusion options.
29955         (add_exclude, add_exclude_file): Now takes int options arg.
29956         Check for arithmetic overflow when computing sizes.
29957         (add_exclude_file): xrealloc might modify errno, so don't
29958         realloc until after errno might be used.
29959
29960         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
29961         New macros.
29962         (free_exclude): New decl.
29963         (add_exclude, add_exclude_file): Now takes int options arg.
29964         (excluded_filename): No longer requires options arg, as the options
29965         are determined by add_exclude.  Now returns bool, not int.
29966
29967 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29968
29969         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
29970
29971 2001-08-27  Jim Meyering  <meyering@lucent.com>
29972
29973         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
29974
29975         * lib/version-etc.c (N_): Remove definition.
29976         Revert most of last change.
29977         Instead, simply don't mark the `Copyright...' string for translation.
29978         Based on advice from Paul Eggert.
29979
29980         * lib/strtoxmax.c: Tweak comment.
29981
29982 2001-08-26  Jim Meyering  <meyering@lucent.com>
29983
29984         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
29985
29986         * m4/xstrtoimax.m4: New file.
29987         * m4/xstrtoumax.m4: Add comments explaining why we
29988         AC_REPLACE_FUNCS(strtol).
29989
29990 2001-08-26  Jim Meyering  <meyering@lucent.com>
29991
29992         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
29993         of copyright with `%s' so translators don't get an untranslated
29994         message in 2002.
29995         (COPYRIGHT_YEAR): Define.
29996         (version_etc): Use fprintf rather than fputs.
29997         Suggestion from Ulrich Drepper.
29998
29999         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
30000
30001         * lib/strtoll.c: New file, from GNU libc.
30002         * lib/xstrtoimax.c: New file.
30003
30004         * lib/xstrtol.h: Add xstrtoimax.
30005         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
30006         * lib/strtoimax.c: New file.  Likewise, but first define
30007         STRTOUXMAX_SIGNED.
30008
30009         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
30010         ...
30011         * lib/strtoxmax.c: ... then renamed to this.
30012
30013 2001-08-18  Paul Eggert  <eggert@twinsun.com>
30014
30015         * m4/inttypes.m4: Add AC_PREREQ(2.13).
30016         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
30017         (jm_AC_TYPE_INTMAX_T): New macro.
30018         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
30019
30020         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
30021
30022         * m4/longlong.m4: Renamed from ulonglong.m4.
30023         * m4/inttypes.m4: Renamed from inttypes_h.m4.
30024         * m4/uintmax_t.m4: Removed.
30025
30026 2001-08-13  Paul Eggert  <eggert@twinsun.com>
30027
30028         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
30029         Port to Solaris 8, where 'sed' requires a space after the 'r'
30030         command, and where sh dislikes "$/".  Clean up the spacing a bit.
30031         Redirect output to $tmp just once.
30032
30033 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
30034
30035         * lib/addext.c (<errno.h>): Include.
30036         (errno): Declare if not defined.
30037         (addext): Work correctly when pathconf returns -1 and leaves
30038         errno alone because there is no limit.  Also, work even if
30039         pathconf returns a value greater than SIZE_MAX.
30040
30041 2001-08-12  Jim Meyering  <meyering@lucent.com>
30042
30043         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
30044         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
30045         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
30046         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
30047         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
30048         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
30049         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
30050         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
30051         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
30052         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
30053         utime.m4, utimes.m4, xstrtoumax.m4:
30054         Quote the first argument in each use of AC_DEFUN.
30055
30056 2001-08-12  Jim Meyering  <meyering@lucent.com>
30057
30058         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
30059         Simply `return getcwd (NULL, 0);'.
30060         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
30061         Use 1300 as initial value for length, not PATH_MAX.
30062
30063         * lib/pathmax.h: Clean up cpp syntax.
30064
30065 2001-08-12  Jim Meyering  <meyering@lucent.com>
30066
30067         * lib/gettimeofday.c: New file.
30068         * lib/gtod.h: New file.
30069         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
30070
30071 2001-08-05  Jim Meyering  <meyering@lucent.com>
30072
30073         * m4/jm-macros.m4: Require autoconf-2.52.
30074
30075 2001-08-04  Jim Meyering  <meyering@lucent.com>
30076
30077         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
30078         stmt, to get in sync with glibc.
30079
30080 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30081
30082         The following changes are from gettext 0.10.39 as maintained by
30083         Bruno Haible.
30084
30085         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
30086         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
30087         with inverted sense.  All uses changed.
30088
30089         * lib/mbswidth.c: Don't include <limits.h>.
30090         Include <stdlib.h> and <string.h> unconditionally.
30091         (iswcntrl, mbsinit, ISCNTRL): New macros.
30092         (mbsnwidth): Use K&R style function declarations.
30093         Don't bother checking for MB_LEN_MAX == 1, since the compiler
30094         can optimize it when MB_CUR_MAX == 1.
30095         The width of control characters is zero, not 1.
30096
30097 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30098
30099         The following changes are from gettext 0.10.39 as maintained by
30100         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
30101
30102         * m4/codeset.m4: Upgrade to serial AM1.
30103         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
30104         all uses changed.  Quote first arg of AC_DEFUN.
30105         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
30106
30107         * m4/iconv.m4: Upgrade to serial AM2.
30108         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
30109         Add --with-libconv-prefix.
30110         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
30111         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
30112         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
30113         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
30114         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
30115
30116         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
30117         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
30118         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
30119         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
30120         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
30121         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
30122         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
30123         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
30124         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
30125
30126         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
30127         string.h any more.
30128
30129         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
30130         not the default value.
30131
30132         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
30133         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
30134         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
30135         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
30136         Also check for iswcntrl, used for wcwidth fallback.
30137         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
30138         to Autoconf 2.13.
30139
30140 2001-08-03  Jim Meyering  <meyering@lucent.com>
30141
30142         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
30143         as it was in the original.  Reported by Paul Eggert.
30144
30145 2001-07-16  Jim Meyering  <meyering@lucent.com>
30146
30147         * m4/gettimeofday.m4: New file.
30148         Prompted by a report from Bernhard Baehr.
30149
30150 2001-07-15  Jim Meyering  <meyering@lucent.com>
30151
30152         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
30153         stuff. Now it's in ../Makefile.cfg.
30154
30155 2001-07-15  Jim Meyering  <meyering@lucent.com>
30156
30157         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
30158         (BUILT_SOURCES): Add unlocked-io.h.
30159         (io_functions): Define.
30160         (unlocked-io.h): New rule.
30161         (DISTCLEANFILES): Add unlocked-io.h.
30162         (all-local): Depend on unlocked-io.h, to ensure it is created.
30163
30164         * lib/unlocked-io.hin: New file
30165
30166         * lib/regex.c: Update from glibc.
30167
30168 2001-07-05  Jim Meyering  <meyering@lucent.com>
30169
30170         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
30171         recommendation.
30172         (libfetish_a_SOURCES): Put all .h files here instead.
30173         Remove a thus-exposed (better checks in automake) duplicate and
30174         two unnecessary .h files.
30175
30176 2001-07-04  Jim Meyering  <meyering@lucent.com>
30177
30178         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
30179         that generates jm-glibc-io.m4 so that it doesn't trigger any make
30180         distcheck failure.
30181
30182 2001-07-02  Jim Meyering  <meyering@lucent.com>
30183
30184         The following changes were prompted by suggestions from Bruno Haible.
30185
30186         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
30187         is now generated.
30188         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
30189         definition of EXTRA_DIST.
30190         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
30191         ensure that the generated file is created/updated whenever the list
30192         of $(unlocked_functions) is changed.
30193         (jm-glibc-io.m4): New rule.
30194         (unlocked-io.h): New rule -- currently unused.
30195
30196 2001-06-24  Jim Meyering  <meyering@lucent.com>
30197
30198         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
30199         unmatched right bracket, rather than kludging it with an extra,
30200         falsely-matching quote in a comment.  Patch by Akim Demaille.
30201
30202 2001-06-11  Jim Meyering  <meyering@lucent.com>
30203
30204         * lib/regex.c: Update from GNU libc.
30205
30206 2001-05-27  Jim Meyering  <meyering@lucent.com>
30207
30208         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
30209         Check for ut_type in struct utmp.
30210
30211 2001-05-27  Jim Meyering  <meyering@lucent.com>
30212
30213         * lib/readutmp.h (UT_TYPE): Define.
30214
30215 2001-05-24  Jim Meyering  <meyering@lucent.com>
30216
30217         * lib/argmatch.c: Include "quote.h".
30218         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
30219         quote function.  Reported by Göran Uddeborg.
30220
30221 2001-05-22  Jim Meyering  <meyering@lucent.com>
30222
30223         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
30224         now that we use the package-supplied version unconditionally.
30225         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
30226
30227 2001-05-21  Jim Meyering  <meyering@lucent.com>
30228
30229         * m4/regex.m4: Change a couple backticks to single quotes to avoid
30230         shell syntax errors.
30231
30232 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30233
30234         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
30235
30236 2001-05-20  Paul Eggert  <eggert@twinsun.com>
30237
30238         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
30239         Don't bother to check library strftime, since
30240         we'll be using our own my_strftime function anyway.
30241         Define my_strftime instead of strftime.
30242
30243 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
30244
30245         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
30246         which is not yet declared.
30247
30248 2001-05-15  Jim Meyering  <meyering@lucent.com>
30249
30250         * m4/regex.m4: Use proper quoting so brackets appear in the test
30251         program.
30252         Reported by, and with help from, Bruno Haible.
30253
30254 2001-05-13  Jim Meyering  <meyering@lucent.com>
30255
30256         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
30257         undefined.
30258
30259 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30260
30261         dirname code cleanup.  base_name now behaves more compatibly
30262         with POSIX basename when given file names that have trailing
30263         slashes, and similarly for dir_name.  Add new primitives
30264         base_len and dir_len.  Put the directory-name-related decls
30265         into dirname.h.
30266
30267         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
30268         * lib/backupfile.c (base_name): Likewise.
30269         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
30270         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
30271         * lib/makepath.c (strip_trailing_slashes): Likewise.
30272         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
30273         ISSLASH): Likewise.
30274         * lib/rename.c (strip_trailing_slashes): Likewise.
30275         * lib/same.c (base_name): Likewise.
30276         * lib/stripslash.c (ISSLASH): Likewise.
30277
30278         * lib/addext.c: Include <dirname.h> after size_t is defined.
30279         * lib/backupfile.c: Likewise.
30280
30281         * lib/addext.c (addext): Use base_len to trim redundant
30282         trailing slashes instead of doing it ourselves.
30283         But do not trim the last slash if it is not redundant.
30284
30285         * lib/backupfile.c (find_backup_file_name,
30286         max_backup_version): Use base_len instead of rolling it ourselves.
30287         Handle the case of "" and (on DOS) "C:" correctly.
30288
30289         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
30290         needed. Include <string.h>, <dirname.h>.
30291         (base_name): Allow file names ending in slashes, other than names
30292         that are all slashes.  In this case, return the basename followed
30293         by the slashes.  This is more general, and can be used in places
30294         where the original base_name purposely had an assertion failure.
30295         (base_len): New function.
30296
30297         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
30298         Do not include <assert.h>; no longer needed.
30299         Include xalloc.h.
30300         (memrchr): Remove decl.
30301         (dir_name_r): Remove.
30302         (dir_len): Renamed from dirlen.  All callers changed.
30303         Rewrite in terms of base_name, for simplicity and consistency.
30304         (dir_name): Never return NULL.  All callers changed.
30305         Do not include <stdlib.h> in test program; no longer needed.
30306         return 0; is fine for test program.
30307
30308         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
30309         New macros.
30310         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
30311
30312         * lib/path-concat.c (path_concat): Use base_len to compute
30313         base length, not strlen; this means we cannot rely on memcpy
30314         to null-terminate.
30315
30316         * lib/same.c (STREQ): Remove.
30317         (same_name): Handle the case where the basename ends in trailing '/'.
30318
30319         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
30320         a slash was stripped.  Do not strip the last slash after a
30321         file system prefix.
30322
30323 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30324
30325         * lib/Makefile.am (libfetish_a_SOURCES):
30326         Add strftime.c, since we now compile it on all hosts.
30327
30328         * lib/strftime.c (my_strftime):
30329         Define to nstrftime if emacs, but only if my_strftime is not defined.
30330         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
30331         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
30332         Add one more extra argument: a nanoseconds value.
30333         All uses changed.
30334         (ns): New macro.
30335         (my_strftime function): Add %N format.
30336         (emacs_strftimeu): Renamed from emacs_strftime,
30337         with extra ut argument.
30338
30339 2001-05-09  Paul Eggert  <eggert@twinsun.com>
30340
30341         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
30342
30343 2001-04-21  Jim Meyering  <meyering@lucent.com>
30344
30345         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
30346         doesn't interfere.
30347
30348 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30349
30350         * m4/ftruncate.m4: Check for chsize.
30351         Link with ftruncate.o unconditionally if ftruncate is missing.
30352         This was required when cross-compiling to i586-mingw32msvc.
30353
30354 2001-04-08  Jim Meyering  <meyering@lucent.com>
30355
30356         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
30357         recomputed; that's necessary when the offset spans a DST transition.
30358         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
30359
30360 2001-04-02  Jim Meyering  <meyering@lucent.com>
30361
30362         * lib/regex.h, regex.c: Update from GNU libc.
30363
30364 2001-03-24  Jim Meyering  <meyering@lucent.com>
30365
30366         * m4/jm-macros.m4: Require autoconf-2.49d.
30367
30368 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
30369
30370         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
30371
30372 2001-03-19  Paul Eggert  <eggert@twinsun.com>
30373
30374         * lib/version-etc.c (version_etc_copyright): Update to 2001.
30375
30376 2001-03-17  Jim Meyering  <meyering@lucent.com>
30377
30378         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
30379         now that the version in autoconf is equivalent.
30380         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
30381
30382         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
30383         Suggestion from Akim Demaille.
30384
30385         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
30386         (jm_PREREQ_TEMPNAME): New function.
30387
30388 2001-03-16  Paul Eggert  <eggert@twinsun.com>
30389
30390         * lib/tempname.c (uint64_t): Define to uintmax_t if
30391         not defined, and if UINT64_MAX is not defined.
30392         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
30393         Reported by John David Anglin.
30394
30395 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
30396
30397         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
30398         resolve alias if codeset is empty.
30399         * lib/config.charset (BeOS): Use wildcard syntax.
30400
30401 2001-03-13  Jim Meyering  <meyering@lucent.com>
30402
30403         * lib/path-concat.c (path_concat)
30404         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
30405         concatenating e.g., `C:' and `foo'.
30406         From Bruno Haible.
30407
30408 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30409
30410         * lib/localcharset.c (locale_charset): Don't use
30411         setlocale(LC_CTYPE,NULL). Don't return NULL.
30412         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
30413
30414 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30415
30416         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
30417         support for DOS/DJGPP.
30418
30419 2001-03-01  Paul Eggert  <eggert@twinsun.com>
30420
30421         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
30422         lacks mkstemp.  Compile our own tempname.c if we compile our own
30423         mkstemp.c, as mkstemp relies on tempname.
30424
30425 2001-03-01  Jim Meyering  <meyering@lucent.com>
30426
30427         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
30428         AH_VERBATIM really does output its argument verbatim.
30429
30430 2001-02-28  Paul Eggert  <eggert@twinsun.com>
30431
30432         * lib/Makefile.am (libfetish_a_SOURCES):
30433         Add dup-safer.c, fopen-safer.c.
30434         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
30435
30436         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
30437         * lib/unistd-safer.h: New files.
30438
30439 2001-02-25  Paul Eggert  <eggert@twinsun.com>
30440
30441         The mkstemp replacement is taken from glibc 2.2.2, with some
30442         portability fixes for use outside glibc, as follows:
30443
30444         * lib/tempname.c (struct_stat64): New macro.
30445         (direxists, __gen_tempname): Use it.
30446         This avoids a portability problem with Solaris 8.
30447
30448         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
30449         (<stddef.h>, <stdint.h>, <string.h>):
30450         Include only if STDC_HEADERS || _LIBC.
30451         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
30452         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
30453         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
30454         (__set_errno): Define this macro if <errno.h> doesn't.
30455         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
30456         Define these macros if <stdio.h> doesn't.
30457         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
30458         Define these macros if <sys/stat.h>
30459         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
30460         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
30461         __xstat64): Define if not _LIBC.
30462         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
30463         (__gen_tempname): Invoke gettimeofday only if
30464         HAVE_GETTIMEOFDAY || _LIBC;
30465         otherwise, fall back on plain "time".
30466         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
30467
30468         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
30469
30470         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
30471
30472 2001-02-18  Paul Eggert  <eggert@twinsun.com>
30473
30474         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
30475
30476 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30477
30478         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
30479         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
30480         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
30481         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
30482
30483 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30484
30485         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
30486         Remove workaround macros for hosts that have mbrtowc but not
30487         mbstate_t, as we now insist on proper declarations for both
30488         before using mbrtowc.
30489
30490 2001-02-17  Jim Meyering  <meyering@lucent.com>
30491
30492         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
30493         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
30494         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
30495         UnixWare 7.1.1.
30496
30497         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
30498         rather than AC_CACHE_VAL.
30499
30500 2001-02-17  Jim Meyering  <meyering@lucent.com>
30501
30502         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
30503         around included file name.
30504
30505         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
30506
30507         * lib/strftime.c: Update from GNU libc (the only changes were to
30508         comments).
30509
30510 2001-02-17  Jim Meyering  <meyering@lucent.com>
30511
30512         * lib/regex.c: Update from libc.
30513
30514 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
30515
30516         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
30517         clash.
30518
30519 2001-02-16  Paul Eggert  <eggert@twinsun.com>
30520
30521         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
30522         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
30523         Reported by Mark Hounschell via Paul Eggert.
30524
30525 2001-02-07  Jim Meyering  <meyering@lucent.com>
30526
30527         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
30528
30529 2001-02-05  Jim Meyering  <meyering@lucent.com>
30530
30531         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
30532         it includes the patch required for `large file' support with at least
30533         HP-UX's 10.20 /bin/cc.
30534
30535 2001-02-03  Jim Meyering  <meyering@lucent.com>
30536
30537         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
30538         AS_IF, now that it works once again (mysteriously).
30539         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30540
30541 2001-01-30  Jim Meyering  <meyering@lucent.com>
30542
30543         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
30544         * m4/chown.m4: Rename conftestchown to conftest.chown.
30545         * m4/rename.m4: s/conftestdir/conftest.d1/ and
30546         s/conftestdir2/conftest.d2/.
30547         * m4/utimes.m4: s/conftestdata/conftest.data/
30548         Inspired by Pavel Roskin's change in autoconf.
30549
30550 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
30551
30552         * lib/config.charset: Update for FreeBSD 4.2.
30553
30554 2001-01-27  Jim Meyering  <meyering@lucent.com>
30555
30556         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
30557         a use of AS_IF.
30558         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30559
30560 2001-01-26  Jim Meyering  <meyering@lucent.com>
30561
30562         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
30563         quotearg.c includes it.
30564
30565 2001-01-26  Jim Meyering  <meyering@lucent.com>
30566
30567         * lib/quotearg.c: Include stddef.h.
30568         * lib/quote.c: Include stddef.h.
30569         Reported by Axel Kittenberger.
30570
30571         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
30572         line in double quotes so that it evokes a better diagnostic.
30573         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
30574         Reported by Axel Kittenberger.
30575
30576 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
30577
30578         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
30579         as if it was a `charset'.
30580
30581 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30582
30583         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
30584         has const.
30585
30586 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30587
30588         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
30589         to avoid a warning.  Add back 'const' to inptr.
30590
30591 2001-01-20  Jim Meyering  <meyering@lucent.com>
30592
30593         Be sure that headers are checked before used in code compiled
30594         for the type checks.
30595         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
30596         In place of that, invoke jm_CHECK_ALL_TYPES.
30597         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
30598         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
30599         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
30600         The check for ssize_t was mistakenly run before the test for unistd.h.
30601
30602         The configure-time check for stdbool.h was missing.
30603         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
30604         (jm_PREREQ_HASH): New function.
30605
30606 2001-01-17  Jim Meyering  <meyering@lucent.com>
30607
30608         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
30609         for autoconf-2.49c.
30610         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
30611
30612 2001-01-16  Jim Meyering  <meyering@lucent.com>
30613
30614         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
30615         From Bruno Haible.
30616
30617 2001-01-14  Jim Meyering  <meyering@lucent.com>
30618
30619         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
30620         foo and bar.  Create conftestdir/ in the script, not in the C code.
30621         Remove directories in the script, not in the C code.
30622         Remove conftestdir{,2} before trying to create the directory.
30623         Make the entire configure script fail if the mkdir fails.
30624
30625 2001-01-14  Jim Meyering  <meyering@lucent.com>
30626
30627         * lib/rename.c: New file.  From Volker Borchert.
30628         Include stdlib.h, string.h or strings.h, and xalloc.h.
30629         Use strip_trailing_slashes rather than open-coding it.
30630
30631 2001-01-03  Paul Eggert  <eggert@twinsun.com>
30632
30633         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
30634
30635 2001-01-03  Jim Meyering  <meyering@lucent.com>
30636
30637         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
30638         of local `inptr' to avoid warning with some system declarations of
30639         iconv.
30640
30641 2001-01-02  Volker Borchert  <bt@teknon.de>
30642
30643         * m4/rename.m4: New file.
30644         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
30645
30646 2001-01-01  Jim Meyering  <meyering@lucent.com>
30647
30648         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
30649         even on systems with utmpx.h.  It's necessary for the declaration of
30650         utmp's ut_user member.  Reported by Andreas Jaeger.
30651
30652         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
30653         available. They are required for the declarations of getgrgid and
30654         getpwuid resp.
30655         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
30656         Reported by Andreas Jaeger.
30657
30658 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
30659
30660         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
30661         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
30662         so `make install' also works in VPATH builds.
30663
30664 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
30665
30666         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
30667         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
30668         can be used in subdirectories.
30669
30670 2000-12-29  Paul Eggert  <eggert@twinsun.com>
30671
30672         * lib/modechange.c: Do not assume that mode_t uses the
30673         traditional octal encoding.  E.g. "chmod 1 FOO" should set
30674         the other-execute bit of FOO even if S_IXOTH != 1.
30675
30676         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
30677         WOTH, XOTH, ALLM): New macros.
30678         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
30679          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
30680         Use them.
30681         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
30682         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
30683         (mode_compile):
30684         No need to use uintmax_t; unsigned long is long enough.
30685         Don't bother to get suffix since we don't use it.
30686
30687 2000-12-26  Jim Meyering  <meyering@lucent.com>
30688
30689         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
30690         better with autoheader.
30691
30692 2000-12-24  Jim Meyering  <meyering@lucent.com>
30693
30694         * lib/hash.c (is_prime): Return explicit boolean values.
30695         (hash_get_first): Return NULL to appease Irix5.6's 89.
30696         Reported by Nelson Beebe.
30697
30698 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
30699
30700         * lib/localcharset.c (locale_charset): Add support for Win32.
30701
30702 2000-12-18  Paul Eggert  <eggert@twinsun.com>
30703
30704         * lib/physmem.h, lib/physmem.c: New files.
30705
30706         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
30707         (noinst_HEADERS): Add physmem.h.
30708
30709         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
30710         't' for compatibility with Solaris 8 sort.
30711
30712 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
30713
30714         * lib/config.charset: Add support for BeOS.
30715
30716 2000-12-17  Jim Meyering  <meyering@lucent.com>
30717
30718         * m4/dos.m4 (jm_AC_DOS): New file and macro.
30719         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
30720
30721 2000-12-16  Jim Meyering  <meyering@lucent.com>
30722
30723         This bug had a serious impact on chown: `chown N:M FILE' (for integer
30724         N and M) would have treated it like `chown N:N FILE'.
30725
30726         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
30727
30728 2000-12-16  Jim Meyering  <meyering@lucent.com>
30729
30730         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
30731         SHELLS_FILE to a file name that's useful on djgpp systems.
30732         Include stdlib.h.
30733         (ADDITIONAL_DEFAULT_SHELLS): Define.
30734         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
30735         Based mostly on a patch from Prashant TR.
30736
30737 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
30738
30739         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
30740         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
30741         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
30742
30743 2000-12-08  Andreas Schwab  <schwab@suse.de>
30744
30745         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
30746         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
30747
30748 2000-12-07  Jim Meyering  <meyering@lucent.com>
30749
30750         * lib/stripslash.c (ISSLASH): Define.
30751         (strip_trailing_slashes): Use ISSLASH rather than comparing against
30752         `/'.
30753         From Prashant TR.
30754
30755         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
30756         (dir_name_r): Declare this function as static.
30757         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
30758         manifest itself on a name containing a mix of slashes and
30759         backslashes.
30760         Make this function work with names starting with a DOS-style
30761         drive letter and colon prefix.
30762         (dir_name): Append `.' if necessary.
30763         Based mostly on patches from Prashant TR and Eli Zaretskii.
30764
30765         * lib/dirname.h (dir_name_r): Remove prototype.
30766
30767 2000-12-06  Paul Eggert  <eggert@twinsun.com>
30768
30769         * m4/off_t-format.m4: Remove this file.
30770         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
30771
30772 2000-12-06  Jim Meyering  <meyering@lucent.com>
30773
30774         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
30775         replacement strtoull, we may well need the replacement strtoul, too.
30776         Check for declarations of strtoul and strtoull.
30777         Check for strtol.  Mainly as a cue to cause automake to include
30778         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
30779         Check for limits.h -- strtol.c needs it.
30780
30781 2000-12-05  Jim Meyering  <meyering@lucent.com>
30782
30783         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
30784
30785 2000-12-04  Jim Meyering  <meyering@lucent.com>
30786
30787         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
30788         Also include memory.h, stdlib.h, unistd.h if appropriate.
30789         Reported by Andreas Jaeger (conflicting declaration of malloc).
30790
30791 2000-12-02  Jim Meyering  <meyering@lucent.com>
30792
30793         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
30794         * m4/jm-macros.m4 (jm_MACROS): require it.
30795
30796 2000-12-02  Jim Meyering  <meyering@lucent.com>
30797
30798         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
30799
30800 2000-12-01  Paul Eggert  <eggert@twinsun.com>
30801
30802         * lib/memrchr.c: Include <config.h> before any system include file.
30803
30804 2000-11-30  Jim Meyering  <meyering@lucent.com>
30805
30806         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
30807
30808 2000-11-30  Jim Meyering  <meyering@lucent.com>
30809
30810         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
30811
30812 2000-11-29  Paul Eggert  <eggert@twinsun.com>
30813
30814         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
30815
30816 2000-11-26  Jim Meyering  <meyering@lucent.com>
30817
30818         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
30819
30820 2000-11-22  Paul Eggert  <eggert@twinsun.com>
30821
30822         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
30823         size of (size_t) -1; it's not portable.
30824
30825 2000-11-17  Jim Meyering  <meyering@lucent.com>
30826
30827         * lib/strstr.c: Update from GNU libc.
30828
30829 2000-11-17  Akim Demaille  <akim@epita.fr>
30830
30831         * lib/obstack.h: Formatting changes.
30832         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
30833         prevent type checking.
30834         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
30835         cast the value to (void *): assigning a `foo *' to a `void *'
30836         variable is valid.
30837         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
30838
30839 2000-11-16  Jim Meyering  <meyering@lucent.com>
30840
30841         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
30842
30843 2000-11-11  Jim Meyering  <meyering@lucent.com>
30844
30845         * lib/error.c: Add a couple #includes, merging from GNU libc version.
30846
30847 2000-11-10  Jim Meyering  <meyering@lucent.com>
30848
30849         * lib/obstack.h: Update from GNU libc.
30850         * lib/obstack.c: Likewise.
30851
30852 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
30853
30854         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
30855
30856 2000-11-06  Paul Eggert  <eggert@twinsun.com>
30857
30858         * lib/getusershell.c (setusershell): Use rewind rather than
30859         fseek/fseeko, to avoid configuration hassles with fseeko.
30860         Don't bother opening SHELLS_FILE if shellstream is NULL;
30861         it's not necessary.
30862
30863 2000-11-05  Jim Meyering  <meyering@lucent.com>
30864
30865         * lib/makepath.h (make_dir): Declare.
30866         * lib/makepath.c (make_dir): Remove `static' attribute.
30867         Tweak a comment.
30868
30869 2000-11-04  Jim Meyering  <meyering@lucent.com>
30870
30871         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
30872
30873 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
30874
30875         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
30876         last one in a bucket, advance to the next bucket.
30877
30878 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
30879
30880         * lib/fnmatch.c: Do not comment out all the code if we are using
30881         the GNU C library, because in some cases we are replacing buggy
30882         code in the GNU C library itself.
30883
30884 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
30885
30886         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
30887         (regex_compile): Catch bogus \(\1\).
30888
30889 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30890
30891         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
30892         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
30893         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
30894
30895 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30896
30897         * lib/error.h, getline.h, modechange.h:
30898         Remove "2000" from Copyright line, as the file hasn't been
30899         changed this year other than in the copyright notice.
30900
30901         * lib/xalloc.h: Add "2000" to Copyright line, as this file
30902         was changed this year.
30903
30904 2000-10-29  Jim Meyering  <meyering@lucent.com>
30905
30906         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
30907         renaming.
30908         * m4/ls-mntd-fs.m4: Likewise
30909
30910 2000-10-29  Jim Meyering  <meyering@lucent.com>
30911
30912         * lib/xstat.in: Fix grammar in comment.
30913
30914 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
30915
30916         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
30917         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
30918         doesn't define __restrict_arr.
30919
30920 2000-10-28  Jim Meyering  <meyering@lucent.com>
30921
30922         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
30923         (jm_PREREQ_MEMCHR): New function.
30924
30925 2000-10-28  Jim Meyering  <meyering@lucent.com>
30926
30927         * lib/memchr.c: Update from libc.
30928         Adjust for portability:
30929         [HAVE_STDLIB_H]: Include stdlib.h.
30930         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
30931         Undef __memchr, too.
30932         [!weak_alias]: Define __memchr to memchr.
30933
30934         * lib/regex.c: Update from libc.
30935         * lib/regex.h: Likewise.
30936         * lib/getopt1.c: Likewise.
30937         * lib/memcmp.c: Likewise.
30938
30939         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
30940         Avoid using fseek, when possible -- it's broken by design.
30941         Patch by Ulrich Drepper.
30942
30943 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
30944
30945         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
30946         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
30947         Giving in to popular pressure to shut up the compiler with casts.
30948
30949 2000-10-26  Jim Meyering  <meyering@lucent.com>
30950
30951         * lib/strftime.c: Update from libc.
30952
30953 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
30954
30955         * regex.c: More `unsigned char' -> `re_char' changes.
30956         Also change several `int' into `re_wchar_t'.
30957         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
30958         (PUSH_FAILURE_POINTER): Don't cast any more.
30959         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
30960         We want GCC to complain, since this piece of code makes
30961         re_match non-reentrant, which *should* be fixed.
30962         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
30963         (EXTEND_BUFFER): Use RETALLOC.
30964         (SET_LIST_BIT): Don't cast.
30965         (re_wchar_t): New type.
30966         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
30967         that those two functions will always properly return.
30968         (IMMEDIATE_QUIT_CHECK): Cast to void.
30969         (analyse_first): Use recursion rather than an explicit stack.
30970         (re_compile_fastmap): Can't fail anymore.
30971         (re_search_2): Don't check re_compile_fastmap for failure.
30972         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
30973         Now also sets the new value (passed in a new argument).
30974         (re_match_2_internal): Use it.
30975         Also, use a new var `reg' of type size_t when looping through regs
30976         rather than reuse the inappropriate `mcnt'.
30977
30978 2000-10-25  Jim Meyering  <meyering@lucent.com>
30979
30980         * lib/obstack.c: Update from libc.
30981
30982 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
30983
30984         * regex.c (regex_compile): Change the way of handling a range from
30985         a char less than 256 to a char not less than 256.
30986
30987 2000-10-24  Andrew Innes  <andrewi@gnu.org>
30988
30989         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
30990         NT-Emacs only.
30991         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
30992         so that re_search functions only quit when callers expect them to.
30993
30994 2000-10-23  Jim Meyering  <meyering@lucent.com>
30995
30996         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
30997         wrong.  That set_locale call must not have any side effects.
30998         From Paul Eggert.
30999
31000 2000-10-22  Jim Meyering  <meyering@lucent.com>
31001
31002         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
31003         [CYCLIC]: Remove now-unused definition.
31004
31005         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
31006         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
31007         Suggestion from Ulrich Drepper.
31008
31009 2000-10-21  Jim Meyering  <meyering@lucent.com>
31010
31011         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
31012         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
31013         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
31014
31015 2000-10-21  Jim Meyering  <meyering@lucent.com>
31016
31017         * lib/dirname.c (memrchr): Declare if necessary.
31018         (dir_name): Remove the restriction that there be no
31019         trailing slashes.  Now, this code skips past them, effectively
31020         ignoring them.
31021         [TEST_DIRNAME] (main): New unit tests.
31022
31023         * lib/memrchr.c: New file from GNU libc.
31024         Undef __memrchr, too.
31025         [!weak_alias]: Define __memrchr to memrchr.
31026         Guard weak_alias use with `#ifdef weak_alias'.
31027
31028 2000-10-21  Jim Meyering  <meyering@lucent.com>
31029
31030         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
31031         (dir_name): Use dir_name_r.
31032         * lib/dirname.h (dir_name_r): Declare it.
31033
31034 2000-10-17  Jim Meyering  <meyering@lucent.com>
31035
31036         * lib/quote.h (PARAMS): Define and use.
31037         Reported by Akim Demaille.
31038
31039         * lib/getopt.c: Update from libc.
31040
31041 2000-10-16  Jim Meyering  <meyering@lucent.com>
31042
31043         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
31044         setlocale.
31045         From Jan Fedak.
31046
31047 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
31048
31049         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
31050
31051 2000-09-25  Jim Meyering  <meyering@lucent.com>
31052
31053         * lib/md5.h (rol): Define (from GnuPG).
31054
31055         * lib/sha.c: Give credit (GnuPG) where due.
31056         (M): Use rol rather than open-coding it.
31057         Add a FIXME comment.
31058
31059 2000-09-21  Jim Meyering  <meyering@lucent.com>
31060
31061         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
31062         Reported by Michael Stone.
31063
31064 2000-09-20  Jim Meyering  <meyering@lucent.com>
31065
31066         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
31067         (noinst_HEADERS): Add sha.h.
31068         Based on code from Scott G. Miller and from GnuPG.
31069
31070 2000-09-18  Jim Meyering  <meyering@lucent.com>
31071
31072         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
31073         LIBS. Otherwise, everyone ends up linking with -lelf for some
31074         configurations.
31075         Reported by Mike Stone.
31076
31077 2000-09-15  Jim Meyering  <meyering@lucent.com>
31078
31079         * lib/regex.c: Update from libc.
31080
31081 2000-09-10  Jim Meyering  <meyering@lucent.com>
31082
31083         * lib/getopt.c (_getopt_internal): Update from glibc.
31084
31085 2000-09-09  Jim Meyering  <meyering@lucent.com>
31086
31087         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
31088         think it should be used as a general replacement for isascii.
31089         * lib/fnmatch.c: Likewise.
31090         * lib/mbswidth.c: Likewise
31091         * lib/regex.c: Likewise.
31092
31093         Don't use atoi.
31094         * lib/userspec.c: Include sys/param.h and limits.h.
31095         Include xstrtol.h.
31096         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
31097         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
31098         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
31099         UID, GID.  Check range.
31100
31101 2000-09-06  Jim Meyering  <meyering@lucent.com>
31102
31103         * lib/getopt.c (_getopt_internal): Update from glibc.
31104
31105 2000-08-30  Jim Meyering  <meyering@lucent.com>
31106
31107         * lib/strftime.c: Merge in changes from GNU libc.
31108
31109 2000-08-26  Jim Meyering  <meyering@lucent.com>
31110
31111         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
31112         * m4/fpending.m4: New file.
31113
31114 2000-08-26  Jim Meyering  <meyering@lucent.com>
31115
31116         * lib/closeout.c: Include "__fpending.h".
31117         (close_stdout_status): Return right away if there's nothing to flush.
31118
31119         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
31120         * lib/__fpending.c: New file.
31121         * lib/__fpending.h: New file.
31122
31123 2000-08-20  Jim Meyering  <meyering@lucent.com>
31124
31125         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
31126         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
31127         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
31128
31129 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
31130
31131         Improve fileutils installation on systems where running
31132         programs (like install) can't be unlinked.
31133         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
31134         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
31135
31136 2000-08-07  Paul Eggert  <eggert@twinsun.com>
31137
31138         Standardize on "memory exhausted" instead of "Memory exhausted"
31139         or "virtual memory exhausted".
31140         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
31141         "virtual memory exhausted".
31142         * lib/same.c (same_name): Invoke xalloc_die instead of printing
31143         our own message.
31144         * lib/userspec.c (parse_user_spec): Likewise.
31145         * lib/bumpalloc.h: comment fix
31146         * lib/same.c, userspec.c: Include xalloc.h.
31147
31148         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
31149         not char *const and pointing to a constant array.
31150         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
31151         (xrealloc): Comment fix.
31152
31153         * lib/userspec.c (parse_user_spec):
31154         Don't translate a message until just before returning,
31155         to avoid unnecessary translation.
31156
31157 2000-08-07  Jim Meyering  <meyering@lucent.com>
31158
31159         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
31160         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
31161         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
31162         getgroups.c, gethostname.c, getopt.h, group-member.c,
31163         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
31164         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
31165         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
31166         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
31167         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
31168         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
31169         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
31170         yesno.c: Back out Copyright date changes for each file with no change
31171         this year.  This eases coordination with other programs using the same
31172         source code modules.  From Paul Eggert.
31173
31174 2000-08-06  Paul Eggert  <eggert@twinsun.com>
31175
31176         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
31177         not char, for compatibility with glibc 2.1.3 strftime.c.
31178
31179 2000-08-03  Greg McGary  <greg@mcgary.org>
31180
31181         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
31182         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
31183         (EXTEND_BUFFER): Use them.
31184
31185 2000-08-01  Jim Meyering  <meyering@lucent.com>
31186
31187         * lib/dirname.c (ISSLASH): Define.
31188         (BACKSLASH_IS_PATH_SEPARATOR): Define.
31189         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
31190         both `\' and `/' may be use as path separators.
31191         Based on a patch from Prashant TR.
31192
31193 2000-07-31  Paul Eggert  <eggert@twinsun.com>
31194
31195         * lib/quotearg.c (quotearg_n_options): Don't make the initial
31196         slot vector a constant, since it might get modified.
31197
31198 2000-07-31  Jim Meyering  <meyering@lucent.com>
31199
31200         * lib/xmalloc.c: Use `virtual memory exhausted', not
31201         `Memory exhausted'.
31202         * lib/obstack.c (print_and_abort): Likewise.
31203
31204 2000-07-30  Paul Eggert  <eggert@twinsun.com>
31205
31206         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
31207         buffer, so that the caller can always quote one small
31208         component of a "memory exhausted" message in slot 0.
31209         From a suggestion by Jim Meyering.
31210
31211 2000-07-30  Jim Meyering  <meyering@lucent.com>
31212
31213         * lib/makepath.c (make_path): Quote the other instance, too.
31214
31215         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
31216         (STATIC_BUF_SIZE): Define.
31217         (quotearg_n_options): Use only statically allocated storage when
31218         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
31219         than STATIC_BUF_SIZE.
31220
31221 2000-07-29  Jim Meyering  <meyering@lucent.com>
31222
31223         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
31224         * lib/dirname.c (dir_name): Likewise.
31225
31226         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
31227         `/'.
31228
31229         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
31230         (dir_name): Assert that there are no trailing slashes.
31231
31232 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
31233
31234         * lib/mbswidth.h (mbswidth): Add a flags argument.
31235         (mbswidth): New declaration.
31236         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
31237         * lib/mbswidth.c (mbswidth): Add a flags argument.
31238         (mbsnwidth): New function.
31239
31240 2000-07-24  Jim Meyering  <meyering@lucent.com>
31241
31242         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
31243
31244 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31245
31246         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
31247
31248 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31249
31250         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
31251         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
31252         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
31253         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
31254         invoke multibyte primitives.
31255
31256 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31257
31258         * lib/quotearg.c:
31259         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
31260         so that mbstate_t is always defined.
31261
31262         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
31263         be 1 in at least one GCC installation, and this configuration
31264         error is likely to be common.  Ignoring MB_LEN_MAX hurts
31265         performance on hosts that have mbrtowc but have only unibyte
31266         locales, but I assume these hosts are rare.
31267
31268 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31269
31270         * lib/mbswidth.c (_XOPEN_SOURCE):
31271         Don't define; this causes problems on Solaris 7.
31272         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
31273
31274 2000-07-23  Jim Meyering  <meyering@lucent.com>
31275
31276         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
31277         too: getgrgid, getpwuid, getuid.
31278
31279 2000-07-23  Jim Meyering  <meyering@lucent.com>
31280
31281         * lib/basename.c (base_name): Add an assertion.
31282
31283 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
31284
31285         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
31286         shadow its mbsinit function.
31287
31288 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31289
31290         * lib/mbswidth.h: New file.
31291         * lib/mbswidth.c: New file.
31292         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
31293         (noinst_HEADERS): Add mbswidth.h.
31294
31295 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31296
31297         * lib/config.charset: Add support for FreeBSD. Improve support for
31298         HP-UX and IRIX 6.
31299
31300 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
31301
31302         * m4/mbswidth.m4: New file.
31303         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
31304
31305 2000-07-15  Jim Meyering  <meyering@lucent.com>
31306
31307         * lib/makepath.c: Include quote.h.
31308         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
31309         corresponding argument in a `quote (...)' call.
31310         Give better diagnostics.
31311
31312         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
31313         (noinst_HEADERS): Add quote.h.
31314
31315         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
31316         from tar's src/misc.c.
31317         * lib/quote.h: New file.  Prototypes for same.
31318
31319 2000-07-14  Paul Eggert  <eggert@twinsun.com>
31320
31321         From a suggestion by Bruno Haible.
31322         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
31323         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
31324         to decide whether to define the BeOS workaround macro;
31325         this adjusts to the change to AC_MBSTATE_T.
31326
31327 2000-07-14  Jim Meyering  <meyering@lucent.com>
31328
31329         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
31330         jm_AC_TYPE_UINTMAX_T.
31331
31332 2000-07-13  Paul Eggert  <eggert@twinsun.com>
31333
31334         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
31335
31336         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
31337         quotearg_buffer_restyled): Add support for
31338         clocale_quoting_style.  Undo previous change to
31339         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
31340         and "{RIGHT QUOTATION MARK}" msgids.
31341
31342 2000-07-10  Paul Eggert  <eggert@twinsun.com>
31343
31344         From a suggestion by Bruno Haible.
31345         * m4/mbstate_t.m4 (AC_MBSTATE_T):
31346         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
31347         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
31348         and mbstate_t, to a single-part test that simply defines mbstate_t.
31349         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
31350         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
31351
31352 2000-07-10  Jim Meyering  <meyering@lucent.com>
31353
31354         * m4/strerror_r.m4: Mirror the correction made in autoconf.
31355
31356         * m4/gnu-source.m4: Output to confdefs.h directly.
31357         Suggestion from Akim Demaille.
31358
31359 2000-07-09  Paul Eggert  <eggert@twinsun.com>
31360
31361         The old behavior of quoting `like this' doesn't look good with
31362         newer, ISO-style fonts.  See:
31363         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
31364
31365         Instead, quote "like this" by default.  Let the translator
31366         tailor the locale-specific quoting behavior by providing
31367         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
31368
31369         * lib/quotearg.c (N_): New macro.
31370         (gettext_default): New function.
31371         (quotearg_buffer_restyled): Use
31372         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
31373         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
31374
31375 2000-07-09  Jim Meyering  <meyering@lucent.com>
31376
31377         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
31378         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
31379
31380         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
31381         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
31382
31383 2000-07-09  Jim Meyering  <meyering@lucent.com>
31384
31385         * lib/Most files: Update copyright dates to include 2000.
31386
31387 2000-07-08  Jim Meyering  <meyering@lucent.com>
31388
31389         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
31390         if not defined.
31391         (xgethostname): Remove now-unnecessary #ifdef.
31392         Move declaration of `err' into loop where it's used.
31393
31394 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31395         and Bruno Haible  <haible@clisp.cons.org>
31396
31397         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
31398         only if the test for an object-type mbstate_t fails.  This
31399         prevents us from mistakenly reporting that mbstate_t is a
31400         system object type after we "#define mbstate_t int" to work
31401         around its lack.
31402
31403 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31404         and Bruno Haible  <haible@clisp.cons.org>
31405
31406         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
31407
31408 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31409
31410         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
31411         to strerror_r.
31412         Include <ctype.h> for use of isalpha.
31413
31414 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31415
31416         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
31417         by allocating a larger buffer. Test the gethostname return value for
31418         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
31419         returns an error and ENAMETOOLONG isn't defined.
31420
31421 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31422
31423         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
31424         dimension.
31425
31426 2000-07-04  Jim Meyering  <meyering@lucent.com>
31427
31428         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
31429         of the deprecated AC_CHECKING.
31430
31431 2000-07-04  Jim Meyering  <meyering@lucent.com>
31432
31433         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
31434         Reported by Bruno Haible.
31435
31436 2000-07-04  Jim Meyering  <meyering@lucent.com>
31437
31438         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
31439         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
31440         lacks mbrtowc.
31441
31442 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31443
31444         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
31445         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
31446
31447 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31448         and Bruno Haible  <haible@clisp.cons.org>
31449
31450         * lib/quotearg.c (mbrtowc):
31451         Assign to *pwc, and return 1 only if result is nonzero.
31452         (iswprint): Use ISPRINT when substituting our own mbrtowc.
31453
31454 2000-07-03  Jim Meyering  <meyering@lucent.com>
31455
31456         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
31457
31458 2000-07-03  Jim Meyering  <meyering@lucent.com>
31459
31460         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
31461         This is necessary to get a definition of e.g., UTMP_FILE on
31462         HP-UX 10.20.
31463         From Bob Proulx.
31464
31465 2000-07-02  Jim Meyering  <meyering@lucent.com>
31466
31467         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
31468
31469         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
31470         AC_LIBOBJ(function_name).
31471         * m4/chown.m4: Likewise.
31472         * m4/fnmatch.m4: Likewise.
31473         * m4/ftruncate.m4: Likewise.
31474         * m4/getgroups.m4: Likewise.
31475         * m4/getline.m4: Likewise.
31476         * m4/group-member.m4: Likewise.
31477         * m4/jm-macros.m4: Likewise.
31478         * m4/lstat.m4: Likewise.
31479         * m4/malloc.m4: Likewise.
31480         * m4/memcmp.m4: Likewise.
31481         * m4/nanosleep.m4: Likewise.
31482         * m4/putenv.m4: Likewise.
31483         * m4/realloc.m4: Likewise.
31484         * m4/regex.m4: Likewise.
31485         * m4/stat.m4: Likewise.
31486         * m4/strftime.m4: Likewise.
31487
31488 2000-07-02  Jim Meyering  <meyering@lucent.com>
31489
31490         * lib/quotearg.c (mbstate_t): Don't define here.
31491
31492 2000-07-02  Jim Meyering  <meyering@lucent.com>
31493
31494         * lib/nanosleep.c (SIGCONT): Define if not already defined.
31495
31496 2000-07-01  Jim Meyering  <meyering@lucent.com>
31497
31498         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
31499
31500 2000-07-01  Jim Meyering  <meyering@lucent.com>
31501
31502         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
31503         problem.
31504
31505 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31506
31507         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
31508         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
31509
31510 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31511
31512         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
31513         per change in ../m4/ls-mntd-fs.m4.
31514         (read_filesystem_list): Ignore symbolic links.
31515
31516 2000-06-29  Jim Meyering  <meyering@lucent.com>
31517
31518         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
31519         for declaration of strcmp.
31520
31521         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
31522
31523         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
31524         Avoid warning by casting result to `char *' to remove `const'.
31525
31526 2000-06-28  Jim Meyering  <meyering@lucent.com>
31527
31528         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
31529         included by quotearg.c, for which we perform this test.  From
31530         Bruno Haible.
31531
31532 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31533
31534         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
31535         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
31536         <utmpx.h> exists, put readutmp.o into LIBOBJS.
31537
31538 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31539
31540         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
31541
31542 2000-06-26  Paul Eggert  <eggert@twinsun.com>
31543
31544         savedir now sets errno on failure and invokes xmalloc to get memory.
31545         Fix a couple of other minor bugs while we're at it.
31546
31547         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
31548         (NAMLEN): Remove macro.
31549         (malloc, realloc): Remove decls.
31550         (stpcpy): Likewise.
31551         ("xalloc.h"): Include.
31552         (NAME_SIZE_DEFAULT): New macro.
31553         (savedir): Use xmalloc / xrealloc to allocate memory.
31554         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
31555         Skip "" directory entries.
31556         Use strlen to calculate directory entry length, since the old method
31557         is rarely used these days and isn't worth supporting.
31558         Don't use a pointer after freeing it.
31559         Check for integer overflow when calculating allocation size.
31560         Use memcpy to copy entries, instead of stpcpy.
31561         Set errno properly when returning NULL.
31562         Check for readdir error.
31563
31564 2000-06-26  Jim Meyering  <meyering@lucent.com>
31565
31566         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
31567
31568 2000-06-25  Jim Meyering  <meyering@lucent.com>
31569
31570         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
31571         Linux header bug when _XOPEN_SOURCE is defined to 500.
31572
31573 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31574
31575         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
31576         deficiency.
31577
31578 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31579
31580         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
31581         Include xalloc.h.
31582         Don't include <stdlib.h>.  Don't declare malloc, realloc.
31583
31584 2000-06-24  Jim Meyering  <meyering@lucent.com>
31585
31586         * m4/strerror_r.m4: Revive this file -- to try out an experimental
31587         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
31588         for which strerror does return char*, but which lacks a conveniently
31589         accessible declaration of the function.  If the compile-test says
31590         strerror_r doesn't work, then resort to a `run'-test that works on
31591         BeOS and segfaults on DEC Unix.
31592
31593 2000-06-24  Jim Meyering  <meyering@lucent.com>
31594
31595         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
31596
31597 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31598
31599         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
31600         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
31601
31602 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31603
31604         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
31605         (mbrtowc, mbstate_t): Define substitutes if
31606         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
31607         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
31608         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
31609
31610 2000-06-23  Jim Meyering  <meyering@lucent.com>
31611
31612         * m4/afs.m4: Add missing AC_MSG_RESULT.
31613         Reported by Bruno Haible.
31614
31615         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
31616         Suggestion from Bruno Haible.
31617
31618 2000-06-23  Jim Meyering  <meyering@lucent.com>
31619
31620         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
31621
31622 2000-06-21  Jim Meyering  <meyering@lucent.com>
31623
31624         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
31625
31626 2000-06-21  Jim Meyering  <meyering@lucent.com>
31627
31628         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
31629         (noinst_HEADERS): Add getstr.h.
31630
31631         * lib/getline.c (getstr): Move into a separate file.
31632         * lib/getstr.c (getstr): New file, extracted from getline.c, with
31633         the following changes: new parameter, delim2; both delim[12]
31634         parameters have type `int', not `char'.  The latter would lose
31635         with 8-bit delimiters.
31636         * lib/getstr.h: New file.
31637
31638 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31639
31640         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
31641         than 1024, return a memory chunk of least possible size, instead
31642         of size PATH_MAX + 2. In the loop, increment the size proportionally.
31643         Use free/xmalloc instead of xrealloc to avoid copying for very long
31644         paths.
31645
31646 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31647
31648         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
31649         the empty string.
31650
31651 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31652
31653         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
31654         address, not strdup.  Include <stdlib.h> and don't declare free().
31655
31656 2000-06-19  Jim Meyering  <meyering@lucent.com>
31657
31658         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
31659
31660 2000-06-18  Jim Meyering  <meyering@lucent.com>
31661
31662         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
31663
31664         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
31665         `checking whether...' message to be consistent with that of the
31666         lstat test.
31667
31668 2000-06-18  Jim Meyering  <meyering@lucent.com>
31669
31670         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
31671         Besides, these days every porting target provides a mkdir function.
31672
31673         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
31674         needed. (this snippet comes from src/system.h).
31675
31676 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
31677
31678         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
31679
31680 2000-06-15  Paul Eggert  <eggert@twinsun.com>
31681
31682         * lib/human.c (adjust_value): New function.
31683         (human_readable_inexact): Apply rounding style even when
31684         printing approximate values.
31685
31686 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31687
31688         * lib/human.c (human_readable_inexact): Allow an input block
31689         size that is not a multiple of the output block size, and vice versa.
31690         Reported by Piergiorgio Sartor.
31691
31692 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31693
31694         * lib/getdate.y (get_date): Apply relative times after time
31695         zone indicator, not before.  Reported by Todd A. Jacobs.
31696
31697 2000-06-13  Jim Meyering  <meyering@lucent.com>
31698
31699         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
31700
31701         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
31702
31703 2000-06-12  Paul Eggert  <eggert@twinsun.com>
31704
31705         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
31706
31707 2000-06-12  Jim Meyering  <meyering@lucent.com>
31708
31709         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
31710         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
31711         optional argument.
31712         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
31713         the optional argument, `lib'.
31714
31715 2000-06-08  Jim Meyering  <meyering@lucent.com>
31716
31717         * m4/largefile.m4: Remove file (now that it's part of autoconf).
31718
31719 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31720
31721         Rewrite largefile configuration so that we don't need to run
31722         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
31723         AC_CANONICAL_HOST in configure.in -- jmm]
31724
31725         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
31726         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
31727         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
31728         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
31729         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
31730         All uses changed.
31731         Instead of inspecting the output of getconf, try to compile the
31732         test program without and with the macro definition.
31733         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
31734         for getconf.  Instead, check for the needed flags by compiling
31735         test programs.
31736
31737 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31738
31739         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
31740
31741 2000-06-04  Jim Meyering  <meyering@lucent.com>
31742
31743         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
31744         SunOS 4.1.4 for which gid_t is an unsigned type.
31745
31746 2000-06-03  Jim Meyering  <meyering@lucent.com>
31747
31748         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
31749         now that autoconf requires that.
31750
31751         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
31752         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
31753         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
31754
31755 2000-06-03  Jim Meyering  <meyering@lucent.com>
31756
31757         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
31758
31759 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31760
31761         * m4/glibc21.m4: New file.
31762         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
31763
31764 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31765
31766         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
31767         newer, don't install charset.alias.
31768         * lib/config.charset: Change the Linux/glibc rules so they become empty
31769         on glibc-2.1 or newer.
31770
31771 2000-06-02  Jim Meyering  <meyering@lucent.com>
31772
31773         * lib/mountlist.c: Back out last change.  Instead, do this...
31774         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
31775         me_dummy member using the same `ignore'-testing code.
31776         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
31777         fs_type strings.
31778         From Mark D. Roth.
31779
31780 2000-05-29  Jim Meyering  <meyering@lucent.com>
31781
31782         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
31783         mounts with the `ignore' attribute.  Based on a patch from
31784         Mark D. Roth.
31785
31786 2000-05-28  Jim Meyering  <meyering@lucent.com>
31787
31788         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
31789         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31790         * m4/stat.m4: Likewise.
31791         * m4/lstat.m4: Likewise.
31792         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
31793
31794         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
31795         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
31796
31797 2000-05-26  Jim Meyering  <meyering@lucent.com>
31798
31799         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
31800
31801 2000-05-24  Jim Meyering  <meyering@lucent.com>
31802
31803         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
31804         autoconf requires that.
31805         * m4/lib-check.m4: Likewise.
31806         * m4/jm-macros.m4: Likewise.
31807         * m4/strftime.m4: Likewise.
31808
31809         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
31810         AC_CHECK_DECLS, now that autoconf requires that.
31811
31812 2000-05-22  Jim Meyering  <meyering@lucent.com>
31813
31814         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31815         * m4/lstat.m4: Likewise.
31816
31817 2000-05-22  Jim Meyering  <meyering@lucent.com>
31818
31819         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
31820
31821 2000-05-20  Jim Meyering  <meyering@lucent.com>
31822
31823         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
31824         (jm_PREREQ): Use it.
31825
31826 2000-05-18  Jim Meyering  <meyering@lucent.com>
31827
31828         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
31829         back, too, since it may have been modified by allocate_entry.
31830         (hash_delete): Rewrite to use neither the assignment operator
31831         nor the comma operator in an if-expression.
31832
31833 2000-05-15  Paul Eggert  <eggert@twinsun.com>
31834
31835         * lib/closeout.c:
31836         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
31837         Remove; no longer needed.
31838         "quotearg.h": Add include.
31839         (file_name): Do not bother to explicitly initialize to NULL; it's less
31840         efficient on some hosts.
31841         (close_stdout_status): Remove test as to whether stdout was already
31842         closed; it breaks for the case "echo x | sort >&-".
31843         Quote file name colons.
31844         Do not assume that _("write error") lacks format strings.
31845
31846 2000-05-15  Jim Meyering  <meyering@lucent.com>
31847
31848         * lib/version-etc.c (version_etc_copyright): Update the copyright
31849         string used in all --version output.
31850
31851 2000-05-14  Jim Meyering  <meyering@lucent.com>
31852
31853         * lib/closeout.c (close_stdout_set_file_name): New function.
31854         (close_stdout_status): Use new file-scoped global.
31855         Return right away if fstat says the stdout file descriptor is invalid.
31856         * lib/closeout.h (close_stdout_set_file_name): Declare.
31857
31858 2000-05-10  Jim Meyering  <meyering@lucent.com>
31859
31860         * lib/closeout.c [default_exit_status]: New file-scoped variable.
31861         (close_stdout_set_status): New function.
31862         * lib/closeout.h (close_stdout_set_status): Declare.
31863
31864 2000-05-09  Jim Meyering  <meyering@lucent.com>
31865
31866         * m4/gettext.m4: Rename this...
31867         * m4/libintl.m4: ...to this.
31868
31869 2000-05-08  Jim Meyering  <meyering@lucent.com>
31870
31871         * lib/long-options.c: Don't include closeout.h.
31872         (parse_long_options): Don't call close_stdout for --version.
31873
31874 2000-05-06  Paul Eggert  <eggert@twinsun.com>
31875
31876         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
31877         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
31878         2.1.3 bug.  This avoids a clash when files like regex.c define
31879         _GNU_SOURCE.
31880
31881 2000-05-06  Jim Meyering  <meyering@lucent.com>
31882
31883         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
31884         (AC_REPLACE_FUNCS): Add strnlen.
31885
31886         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
31887         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
31888
31889         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
31890         AC_SEARCH_LIBS call for nanosleep.
31891         (LIB_NANOSLEEP): Set and AC_SUBST.
31892
31893 2000-05-06  Jim Meyering  <meyering@lucent.com>
31894
31895         * lib/strnlen.c: Undefine __strnlen and strnlen.
31896         [!weak_alias]: Define __strnlen to strnlen.
31897
31898         * lib/atexit.c: New file, from libiberty.
31899
31900 2000-05-06  Jim Meyering  <meyering@lucent.com>
31901
31902         * lib/closeout.c (close_stdout_status): Also check for errors on the
31903         stderr stream.
31904
31905 2000-05-05  Jim Meyering  <meyering@lucent.com>
31906
31907         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
31908         AC_SEARCH_LIBS call for clock_gettime.
31909         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
31910
31911         * m4/search-libs.m4: Update from autoconf.
31912
31913         su doesn't work on Solaris 2.6.
31914         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
31915         <shadow.h>.  Reported by Dragos Harabor.
31916
31917 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
31918
31919         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
31920         memcpy instead of xmalloc, xrealloc, path_concat.
31921         (locale_charset): Treat empty environment variables as absent.
31922         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
31923
31924 2000-05-04  Jim Meyering  <meyering@lucent.com>
31925
31926         * lib/getopt.c: Update from glibc.
31927         * lib/obstack.c: Likewise.
31928         * lib/obstack.h: Likewise.
31929         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
31930         file
31931
31932         * lib/regex.h: Likewise.
31933         * lib/strndup.c: Likewise.
31934         * lib/strnlen.c: New file, from glibc.
31935
31936 2000-05-03  Jim Meyering  <meyering@lucent.com>
31937
31938         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
31939
31940 2000-05-02  Paul Eggert  <eggert@twinsun.com>
31941
31942         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
31943         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
31944         compile-time test, rather than inspecting host and OS, to
31945         decide whether to define _LARGEFILE_SOURCE.
31946
31947 2000-05-01  Jim Meyering  <meyering@lucent.com>
31948
31949         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
31950
31951         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
31952         Based on a patch from Bruno Haible.
31953
31954 2000-05-01  Jim Meyering  <meyering@lucent.com>
31955
31956         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
31957
31958 2000-04-29  Jim Meyering  <meyering@lucent.com>
31959
31960         * lib/path-concat.c: Declare strdup only if it's not defined.
31961         * lib/canon-host.c: Likewise.
31962
31963 2000-04-28  Jim Meyering  <meyering@lucent.com>
31964
31965         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
31966         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
31967         is included first, then limits.h is included by locale.h by libintl.h.
31968         From John David Anglin.
31969
31970 2000-04-25  Jim Meyering  <meyering@lucent.com>
31971
31972         * lib/makepath.c (S_IRWXUGO): Define.
31973         (make_path): Always perform explicit chmod if MODE specifies any
31974         of the `special' permission bits.  Prompted by a bug report against
31975         install from Mate Wierdl and Joost van Baal.
31976
31977 2000-04-18  Jim Meyering  <meyering@lucent.com>
31978
31979         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
31980         (jm_PREREQ): Use it.
31981
31982 2000-04-18  Jim Meyering  <meyering@lucent.com>
31983
31984         * lib/README: New file.
31985
31986         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
31987         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
31988
31989 2000-04-17  Jim Meyering  <meyering@lucent.com>
31990
31991         Get it right :-)
31992         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
31993         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
31994         Suggestion from Akim Demaille.
31995
31996 2000-04-17  Jim Meyering  <meyering@lucent.com>
31997
31998         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
31999         the definition of it to rpl_strftime also defined-away the system's
32000         declaration.
32001
32002 2000-04-15  Jim Meyering  <meyering@lucent.com>
32003
32004         Use `C' to denote so-called `contiguous' files, the same way
32005         that tar does.
32006         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
32007         (ftypelet): Use S_ISCTG.
32008         From Michael Deutschmann.
32009
32010 2000-04-14  Jim Meyering  <meyering@lucent.com>
32011
32012         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
32013         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
32014         clobbered.
32015
32016 2000-04-14  Jim Meyering  <meyering@lucent.com>
32017
32018         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
32019
32020 2000-04-13  Jim Meyering  <meyering@lucent.com>
32021
32022         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
32023         AH_VERBATIM to insert required #ifndef into config.h.in.
32024         Suggestion from Akim Demaille.
32025
32026 2000-04-12  Jim Meyering  <meyering@lucent.com>
32027
32028         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
32029         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
32030         Christian Krackowizer.
32031
32032         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
32033         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
32034         (AC_SYS_LARGEFILE): Require.
32035         (AM_C_PROTOTYPES): Require.
32036
32037 2000-04-08  Jim Meyering  <meyering@lucent.com>
32038
32039         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
32040         names don't conflict.  Reported by Eli Zaretskii.
32041
32042 2000-04-07  Jim Meyering  <meyering@lucent.com>
32043
32044         * lib/putenv.c: Move inclusion of errno.h so it follows that of
32045         sys/types.h, to work around system header problems on AIX 3.2.5.
32046         From Bruno Haible.
32047
32048 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
32049
32050         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
32051         bug.  Deal with the different error behavior of Irix iconv.
32052
32053 2000-04-05  Paul Eggert  <eggert@twinsun.com>
32054
32055         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
32056         IRIX if the installer said otherwise.
32057
32058 2000-04-05  Jim Meyering  <meyering@lucent.com>
32059
32060         Portability tweaks required for ultrix4.3.
32061         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
32062         (jm_CHECK_DECLS): Add getutent to the list of functions.
32063         (_jm_DECL_HEADERS): Add utmpx.h.
32064         From John David Anglin.
32065
32066         * m4/strftime.m4: Back out the 2000-04-02 change.
32067         Instead of that change, simply undefine putenv in the test program.
32068
32069 2000-04-05  Jim Meyering  <meyering@lucent.com>
32070
32071         Portability tweaks required for ultrix4.3.
32072         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
32073         getutent.
32074         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
32075         * lib/canon-host.c: Declare strdup.
32076         * lib/path-concat.c: Likewise.
32077         From John David Anglin.
32078
32079 2000-04-04  Jim Meyering  <meyering@lucent.com>
32080
32081         Be more DOS 8.3-friendly.
32082         * lib/ref-add.sin: Renamed from ref-add.sed.in.
32083         * lib/ref-del.sin: Renamed from ref-del.sed.in.
32084         * lib/Makefile.am: Reflect renaming.
32085         Reported by Eli Zaretskii.
32086
32087         Use a temporary file name that won't clash with `charset.alias'
32088         in the DOS 8.3 name space.
32089         * lib/Makefile.am (charset_tmp): Define.
32090         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
32091         (uninstall-local): Likewise.
32092         Reported by Eli Zaretskii.
32093
32094 2000-04-03  Jim Meyering  <meyering@lucent.com>
32095
32096         * m4/gettext.m4: Fix typo in comment.
32097
32098         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
32099         textutils/configure.in).  Suggestion from Paul Eggert.
32100         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
32101
32102 2000-04-02  Paul Eggert  <eggert@twinsun.com>
32103
32104         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
32105         variable in the shell rather than using putenv, which isn't
32106         portable.  This avoids the configure-time inter-test dependency
32107         on the potentially-renamed putenv function.
32108
32109 2000-03-30  Paul Eggert  <eggert@twinsun.com>
32110
32111         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
32112         before checking struct stat.st_blksize, so that
32113         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
32114
32115 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32116
32117         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
32118         since strftime.c uses HAVE_STRFTIME to decide whether to use
32119         the underlying strftime.
32120
32121 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32122
32123         * lib/time/strftime.c (my_strftime): Make sure we call the system
32124         strftime, not ourselves, when invoking the underlying strftime.
32125
32126 2000-03-24  Jim Meyering  <meyering@lucent.com>
32127
32128         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
32129         (charset_alias): Define.
32130         (install-exec-local): Factor out common code.
32131         (uninstall-local): Split lines longer than 80.
32132         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
32133         (SUFFIXES): Define.
32134         (.sed.in.sed): New rule.  Don't redirect directly to $@.
32135         (CLEANFILES): Add ref-add.sed and ref-del.sed.
32136
32137 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
32138
32139         * lib/config.charset: Output a line containing "Packages using this
32140         file".
32141         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
32142         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
32143         ref-del.sed): New rules.
32144
32145 2000-03-17  Jim Meyering  <meyering@lucent.com>
32146
32147         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
32148         Otherwise, include <strings.h>
32149
32150 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
32151
32152         * lib/unicodeio.c (utf8_wctomb): New function.
32153         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
32154         format instead of in UCS-4 with platform dependent endianness.
32155
32156 2000-03-10  Jim Meyering  <meyering@lucent.com>
32157
32158         * m4/lib-check.m4: Look for getspnam in -lgen, too.
32159         From Marco Franzen.
32160
32161 2000-03-07  Paul Eggert  <eggert@twinsun.com>
32162
32163         * lib/savedir.c (savedir): Work even if directory size is
32164         negative; this can happen with some screwy NFS configurations.
32165
32166 2000-03-06  Jim Meyering  <meyering@lucent.com>
32167
32168         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
32169         if it's NULL (because we ran out of memory).  From Bruno Haible.
32170
32171 2000-03-05  Jim Meyering  <meyering@lucent.com>
32172
32173         * lib/localcharset.c ("path-concat.h"): Include.
32174         (get_charset_aliases): Use path_concat instead of ANSI string
32175         concatenation.
32176
32177         * lib/unicodeio.h (PARAMS): Define.
32178         Use it to guard prototype.
32179
32180 2000-03-04  Jim Meyering  <meyering@lucent.com>
32181
32182         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
32183         for lib/localcharset.c.
32184
32185 2000-03-04  Jim Meyering  <meyering@lucent.com>
32186
32187         * lib/Makefile.am (install-exec-local): Create $(libdir) before
32188         installing into it.
32189         (uninstall-local): Uncomment this rule so `make distcheck' works
32190         once again.
32191
32192         * lib/unicodeio.c (<errno.h>): Include it.
32193         (errno): Declare if not defined.
32194
32195         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
32196
32197         * lib/config.charset: New version, incorporating remarks from a linux
32198         i18n mailing list.  From Bruno Haible.
32199
32200 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
32201
32202         * m4/codeset.m4: New file.
32203         * m4/iconv.m4: New file.
32204         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
32205
32206 2000-03-03  Jim Meyering  <meyering@lucent.com>
32207
32208         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
32209
32210 2000-03-02  Jim Meyering  <meyering@lucent.com>
32211
32212         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
32213         the messages come out on separate lines.
32214
32215         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
32216         rather than jm_CHECK_DECLARATIONS.
32217         * m4/decl.m4: Remove now-unused file.
32218
32219         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
32220         geteuid.
32221
32222 2000-03-02  Jim Meyering  <meyering@lucent.com>
32223
32224         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
32225
32226 2000-03-01  Jim Meyering  <meyering@lucent.com>
32227
32228         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
32229         * lib/unicodeio.c: Likewise.
32230
32231 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
32232
32233         * lib/config.charset: New file.
32234         * lib/localcharset.c: New file.
32235         * lib/unicodeio.h, lib/unicodeio.c: New files.
32236         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
32237         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
32238         (noinst_HEADERS): Add unicodeio.h.
32239         (all-local, install-exec-local, charset.alias): New targets.
32240
32241 2000-02-28  Paul Eggert  <eggert@twinsun.com>
32242
32243         * lib/quotearg.c (ALERT_CHAR): New macro.
32244         (quotearg_buffer_restyled): Use it.
32245
32246 2000-02-27  Jim Meyering  <meyering@lucent.com>
32247
32248         * m4/check-decl.m4: Add getenv to the list.
32249
32250 2000-02-27  Jim Meyering  <meyering@lucent.com>
32251
32252         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
32253         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
32254
32255         * lib/backupfile.c: Guard inclusion of stdlib.h with
32256         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
32257         Declare malloc if needed.
32258
32259         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
32260         `#ifndef HAVE_DECL..'
32261         now that autoconf always defines the HAVE_DECL_ symbols.
32262         * lib/human.c: Likewise.
32263         * lib/same.c: Likewise.
32264         * lib/strtoumax.c: Likewise.
32265
32266         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
32267         declaration check was not run.
32268         * lib/hash.c: Likewise.
32269         * lib/human.c: Likewise.
32270         * lib/same.c: Likewise.
32271         * lib/strtoumax.c: Likewise.
32272
32273         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
32274         `.', then first look up the entire `.'-containing string as a login
32275         name.
32276
32277 2000-02-23  Jim Meyering  <meyering@lucent.com>
32278
32279         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
32280         in place of my hack.
32281
32282 2000-02-18  Paul Eggert  <eggert@twinsun.com>
32283
32284         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
32285         (textint): New typedef.
32286         (parser_control): Member year changed from int to textint.
32287         All uses changed.
32288         (YYSTYPE): Removed; replaced by %union with int and textint members.
32289         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
32290         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
32291         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
32292         (tSNUMBER, tUNUMBER): Now of type <textintval>.
32293         (date, number, to_year): Use width of number in digits, not its value,
32294         to determine whether it's a 2-digit year, or a 2-digit time.
32295         (yylex): Store number of digits of numeric tokens.
32296         Reported by John Kendall.
32297
32298         (parser_control): Changed from struct parser_control to typedef (for
32299         consistency).  All uses changed.
32300
32301         (tID): Removed; not used.
32302         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
32303
32304 2000-02-14  Paul Eggert  <eggert@twinsun.com>
32305
32306         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
32307         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
32308
32309 2000-02-12  Jim Meyering  <meyering@lucent.com>
32310
32311         * lib/userspec.c (ISDIGIT): Define it.
32312         (isdigit): Remove definition.
32313         (is_number): Use ISDIGIT, not isdigit.
32314         <libintl.h>: Include.
32315         (_ and N_): Define.
32316         (parse_user_spec): Mark translatable strings.
32317
32318 2000-02-10  Jim Meyering  <meyering@lucent.com>
32319
32320         With these changes, nanosleep.[ch] are finally enough like the other
32321         lib/* replacement files to compile on a few more losing systems.
32322
32323         * lib/nanosleep.h: Don't include config.h.
32324         Remove prototype from declaration of nanosleep.
32325         (PARAMS): Remove now-unneeded definition.
32326         * lib/nanosleep.c: #undef nanosleep.
32327         (rpl_nanosleep): Rename from nanosleep.
32328
32329 2000-02-10  Jim Meyering  <meyering@lucent.com>
32330
32331         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
32332         gnu_nanosleep to rpl_nanosleep.
32333
32334 2000-02-09  Jim Meyering  <meyering@lucent.com>
32335
32336         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
32337         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
32338
32339 2000-02-08  Akim Demaille  <akim@epita.fr>
32340
32341         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
32342         `[' and `]' and remove uses of `changequote'.
32343         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
32344         (AC_SYS_LARGEFILE): Likewise.
32345         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
32346         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
32347         of changequote.
32348         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
32349         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
32350         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
32351         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
32352
32353 2000-02-05  Jim Meyering  <meyering@lucent.com>
32354
32355         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
32356         Remove explicit use of AC_HEADER_TIME.  It is required by
32357         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
32358         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
32359         in autoconf whereby the expansion of the latter ended up preceding
32360         the expansion of its prerequisite, AC_HEADER_TIME.
32361         Reported by Volker Borchert.
32362
32363 2000-02-03  Jim Meyering  <meyering@lucent.com>
32364
32365         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
32366
32367 2000-02-03  Jim Meyering  <meyering@lucent.com>
32368
32369         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
32370         rather than with `#if HAVE_UTMPNAME'.
32371
32372 2000-02-02  Jim Meyering  <meyering@lucent.com>
32373
32374         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
32375         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
32376         Reported by Eli Zaretskii.
32377
32378 2000-02-01  Jim Meyering  <meyering@lucent.com>
32379
32380         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
32381
32382 2000-01-31  Jim Meyering  <meyering@lucent.com>
32383
32384         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
32385         functions.  Add the time.h and sys/time.h headers along with the
32386         AC_REQUIRE'ment of AC_HEADER_TIME.
32387
32388 2000-01-31  Jim Meyering  <meyering@lucent.com>
32389
32390         * lib/nanosleep.h (nanosleep): Guard declaration with
32391         `#if ! HAVE_DECL_NANOSLEEP'.
32392         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
32393         the declaration in that vendor's sys/timers.h.
32394         Reported by Christian Krackowizer.
32395
32396         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
32397         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
32398         (ISPRINT): Likewise.
32399         Reported by Tom Tromey.
32400
32401 2000-01-30  Jim Meyering  <meyering@lucent.com>
32402
32403         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
32404
32405         * m4/prereq.m4 (utmp_includes): Define.
32406         Check for ut_user and ut_name members in both struct utmpx
32407         and struct utmp.
32408
32409 2000-01-30  Jim Meyering  <meyering@lucent.com>
32410
32411         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
32412         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
32413         header files where only utmpx.ut_user is declared.
32414
32415         * lib/readutmp.h (UT_USER): Define.
32416
32417 2000-01-29  Jim Meyering  <meyering@lucent.com>
32418
32419         * m4/lib-check.m4: New file containing library-related checks from
32420         fileutils and sh-utils (textutils had none).
32421
32422 2000-01-28  Jim Meyering  <meyering@lucent.com>
32423
32424         * m4/perl.m4: Change format of warning message to look more like that
32425         from the missing script.  Suggestion from François Pinard.
32426
32427 2000-01-25  Jim Meyering  <meyering@lucent.com>
32428
32429         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
32430         well as time.h in the compile check.
32431         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
32432         Fix typo in cross-compiling case: s/yes/no/.
32433
32434 2000-01-23  Jim Meyering  <meyering@lucent.com>
32435
32436         * m4/jm-macros.m4: Move df-related tests here from
32437         fileutils/configure.in
32438
32439         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
32440         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
32441
32442         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
32443         s/space/ac_fsusage_space/.
32444         (jm_FILE_SYSTEM_USAGE): Take two parameters.
32445
32446         * m4/ftruncate.m4: New file (derived from part of
32447         fileutils/configure.in).
32448         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
32449         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
32450
32451         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
32452         AC_SUBST these here, rather than just in sh-util/configure.in, so
32453         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
32454         all the same.
32455         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
32456         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
32457         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
32458         (AC_SUBST(POW_LIBM)): Likewise.
32459         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
32460
32461 2000-01-23  Jim Meyering  <meyering@lucent.com>
32462
32463         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
32464         obstack.c.
32465
32466 2000-01-22  Jim Meyering  <meyering@lucent.com>
32467
32468         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
32469
32470         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
32471
32472         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
32473         configure.in
32474         (AC_CHECK_HEADERS): Likewise for sh-utils.
32475         (AC_CHECK_HEADERS): Likewise for textutils.
32476         Merge the three lists of headers.
32477
32478         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
32479         from fileutils' configure.in.
32480
32481         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
32482         code. Moved tests into their own function (_jm_DECL_HEADERS) in
32483         check-decl.m4.
32484
32485         * m4/check-decl.m4: Use #if rather than #ifdef.
32486         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
32487         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
32488         (_jm_DECL_HEADERS): Define new function.
32489         (jm_CHECK_DECLARATIONS): Require it.
32490
32491 2000-01-22  Jim Meyering  <meyering@lucent.com>
32492
32493         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
32494         [! HAVE_DECL_STRTOULL]: Declare strtoull.
32495         Required for some AIX systems.  Reported by Christian Krackowizer.
32496         [TESTING] (main): New function.
32497
32498         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
32499         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
32500         letters.
32501
32502         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
32503         iswprint.
32504
32505         * lib/strverscmp.c (ISDIGIT): Define.
32506         (strverscmp): Use ISDIGIT, not isdigit.
32507
32508 2000-01-19  Jim Meyering  <meyering@lucent.com>
32509
32510         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
32511         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
32512         defines `struct timespec' in <sys/time.h>
32513
32514         * m4/c-bs-a.m4: Remove uses of changequote altogether.
32515         Thanks to Akim for explaining.
32516
32517 2000-01-17  Paul Eggert  <eggert@twinsun.com>
32518
32519         * lib/nanosleep.c (nanosleep):
32520         Don't use SA_INTERRUPT to decide whether to call sigaction, as
32521         POSIX.1 doesn't require SA_INTERRUPT and some systems
32522         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
32523         it's been part of POSIX.1 since day 1 (in 1988).
32524
32525 2000-01-17  Jim Meyering  <meyering@lucent.com>
32526
32527         * lib/interlock: Remove unused file.  Reported by François Pinard.
32528
32529 2000-01-16  Paul Eggert  <eggert@twinsun.com>
32530
32531         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
32532         alert, backslash, formfeed, and vertical tab unnecessarily in
32533         shell quoting style.
32534
32535 2000-01-16  Jim Meyering  <meyering@lucent.com>
32536
32537         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
32538         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
32539         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
32540         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
32541
32542 2000-01-16  Jim Meyering  <meyering@lucent.com>
32543
32544         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
32545         because the latter didn't work.
32546
32547 2000-01-15  Jim Meyering  <meyering@lucent.com>
32548
32549         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
32550         (AC_REPLACE_FUNCS): Add memcpy and memset.
32551         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
32552         Add strpbrk.
32553         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
32554
32555 2000-01-12  Jim Meyering  <meyering@lucent.com>
32556
32557         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
32558         (jm_PREREQ): Use it.
32559         (jm_PREREQ_READUTMP): New macro.
32560         (jm_PREREQ): Use it.
32561
32562 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32563
32564         Quote multibyte characters correctly.
32565         * m4/c-bs-a.m4: New file.
32566         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
32567         (jm_PREREQ): Use it.
32568
32569 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32570
32571         * m4/uintmax_t.m4: Port to autoconf 2.13.
32572
32573 2000-01-08  Jim Meyering  <meyering@ascend.com>
32574
32575         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
32576         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
32577
32578 2000-01-04  Jim Meyering  <meyering@ascend.com>
32579
32580         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
32581         jm_STRUCT_DIRENT_D_TYPE.
32582         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
32583         jm_STRUCT_DIRENT_D_INO.
32584         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
32585         jm_STRUCT_UTIMBUF.
32586         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
32587         renamings.
32588         * m4/utime.m4: Likewise.
32589
32590         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
32591         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
32592
32593 2000-01-03  Paul Eggert  <eggert@twinsun.com>
32594
32595         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
32596         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
32597
32598 2000-01-02  Jim Meyering  <meyering@ascend.com>
32599
32600         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
32601         remember if this is necessary.
32602
32603 1999-12-26  Jim Meyering  <meyering@ascend.com>
32604
32605         * m4/jm-macros.m4: Use it here.
32606         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
32607
32608 1999-12-23  Jim Meyering  <meyering@ascend.com>
32609
32610         * m4/jm-macros.m4: Check for clock_gettime (moved from
32611         fileutils/configure.in)
32612         Check for gettimeofday.
32613
32614 1999-12-20  Jim Meyering  <meyering@ascend.com>
32615
32616         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
32617         autoconf-2.14a-1999-12-20.
32618
32619 1999-12-19  Jim Meyering  <meyering@ascend.com>
32620
32621         * m4/lstat-slash.m4: New file.
32622         * m4/jm-macros.m4: Use the new macro:
32623         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
32624
32625 1999-12-07  Jim Meyering  <meyering@ascend.com>
32626
32627         * m4/perl.m4: Require that File::Compare be available, too.
32628         Too many systems seem to lack it.
32629
32630         * m4/strftime.m4: Add checks for most of the cpp macros tested in
32631         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
32632
32633 1999-11-18  Paul Eggert  <eggert@twinsun.com>
32634
32635         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
32636         problem with the QNX 4.25 shell, which doesn't propagate exit
32637         status of failed commands inside shell assignments.
32638
32639 1999-11-17  Jim Meyering  <meyering@ascend.com>
32640
32641         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
32642
32643 1999-11-07  Jim Meyering  <meyering@ascend.com>
32644
32645         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
32646
32647 1999-11-06  Jim Meyering  <meyering@ascend.com>
32648
32649         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
32650         * m4/jm-macros.m4 (jm_MACROS): Use it here.
32651
32652 1999-11-05  Jim Meyering  <meyering@ascend.com>
32653
32654         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
32655         configure.in of textutils, fileutils, and sh-utils into this one
32656         (shared between those packages) file.
32657         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
32658         AC_STRUCT_ST_BLKSIZE.
32659
32660 1999-11-03  Jim Meyering  <meyering@ascend.com>
32661
32662         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
32663         of AC_CHECK_TYPE checks includes unistd.h.
32664         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
32665         Suggestion from Akim Demaille.
32666
32667 1999-10-30  Jim Meyering  <meyering@ascend.com>
32668
32669         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
32670         m4-quoted string.
32671         * m4/ls-mntd-fs.m4: Likewise.
32672         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
32673         * m4/jm-winsz1.m4: Likewise.
32674
32675         * m4/const.m4: Remove file, since the fix made it into the experimental
32676         version of autoconf.
32677         * m4/mktime.m4: Likewise.
32678
32679         * m4/check-type.m4: Remove file, now that the latest version of
32680         AC_CHECK_TYPE takes a third arg to specify additional #includes.
32681
32682         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
32683         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
32684         AC_CHECK_TYPE.
32685
32686 1999-10-04  Jim Meyering  <meyering@ascend.com>
32687
32688         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
32689
32690 1999-09-22  Paul Eggert  <eggert@twinsun.com>
32691
32692         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
32693         2.95.1 bug with HP-UX 10.20.
32694
32695 1999-09-17  Jim Meyering  <meyering@ascend.com>
32696
32697         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
32698         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
32699         due to missing strdup (against sh-utils-2.0).
32700
32701 1999-08-29  Jim Meyering  <meyering@ascend.com>
32702
32703         * m4/jm-macros.m4: Require jm_BISON.
32704         * m4/bison.m4: New file.
32705
32706 1999-08-17  Paul Eggert  <eggert@twinsun.com>
32707
32708         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
32709         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
32710
32711 1999-08-05  Jim Meyering  <meyering@ascend.com>
32712
32713         * m4/getline.m4: Rename test file from conftestdata to conftest.data
32714         to avoid conflicts with `conftest' on 8+3 filesystems.
32715         Suggestion from Eli Zaretskii.
32716
32717 1999-08-04  Jim Meyering  <meyering@ascend.com>
32718
32719         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
32720         fileutils and sh-utils (textutils's getline test was inadequate).
32721         (AM_FUNC_GETLINE): Run this test.
32722         (AC_CHECK_FUNCS): Check for getdelim.
32723         Reported by Bob Proulx.
32724
32725 1999-08-02  Jim Meyering  <meyering@ascend.com>
32726
32727         * m4/jm-macros.m4: Add a comment.
32728
32729 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32730
32731         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
32732         <inttypes.h> defines strtoumax as a macro (and not as a
32733         function).
32734
32735 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32736
32737         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
32738         that we can shift, multiply and divide unsigned long long
32739         values; Ultrix cc can't do it.
32740
32741 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32742
32743         * m4/mktime.m4: New file, which is a preview of what should appear
32744         in the next public autoconf release.
32745
32746 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32747
32748         * m4/lfs.m4: Remove this file.
32749         * m4/largefile.m4: New file.  It contains the old contents of
32750         lfs.m4, except that all names with prefix AC_LFS have been
32751         changed to use the prefix AC_SYS_LARGEFILE instead, to be
32752         compatible with future autoconf versions.  Also, some minor m4
32753         quoting problems have been fixed.
32754
32755 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32756
32757         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
32758         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
32759         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
32760         and simplify the shell code.
32761
32762 1999-08-01  Jim Meyering  <meyering@ascend.com>
32763
32764         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
32765         m4.
32766
32767 1999-07-20  Jim Meyering  <meyering@ascend.com>
32768
32769         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
32770
32771 1999-07-15  Jim Meyering  <meyering@ascend.com>
32772
32773         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
32774
32775 1999-05-22  Jim Meyering  <meyering@ascend.com>
32776
32777         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
32778
32779 1999-05-20  Jim Meyering  <meyering@ascend.com>
32780
32781         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
32782         Add a colon after each `then' in case $4 is empty.
32783
32784 1999-05-16  Jim Meyering  <meyering@ascend.com>
32785
32786         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
32787
32788 1999-05-10  Jim Meyering  <meyering@ascend.com>
32789
32790         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
32791
32792         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
32793         AC_FUNC_MKTIME.
32794
32795 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
32796
32797         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
32798
32799 1999-05-04  Paul Eggert  <eggert@twinsun.com>
32800
32801         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
32802         not CPPFLAGS, so that linking works correctly in IRIX.
32803
32804 1999-04-30  Paul Eggert  <eggert@twinsun.com>
32805
32806         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
32807
32808 1999-04-20  Paul Eggert  <eggert@twinsun.com>
32809
32810         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
32811         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
32812         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
32813         jm_AC_TYPE_UNSIGNED_LONG_LONG.
32814         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
32815
32816         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
32817
32818 1999-04-20  Jim Meyering  <meyering@ascend.com>
32819
32820         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
32821         AC_REPLACE xstroull if necessary.  From Paul Eggert.
32822         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
32823
32824 1999-04-18  Jim Meyering  <meyering@ascend.com>
32825
32826         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
32827         * m4/jm-macros.m4: Use it.
32828
32829 1999-04-06  Jim Meyering  <meyering@ascend.com>
32830
32831         * m4/strftime.m4: Remove test for %f.
32832
32833 1999-03-29  Jim Meyering  <meyering@ascend.com>
32834
32835         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
32836         superset of the AC_TYPE_* checks in the textutils, fileutils,
32837         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
32838         AC_TYPE_PID_T.
32839
32840 1999-03-28  Jim Meyering  <meyering@ascend.com>
32841
32842         * m4/jm-macros.m4: Define GNU_PACKAGE here.
32843         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
32844         replaced e.g., in the *.sh files of the sh-utils.
32845
32846 1999-03-20  Jim Meyering  <meyering@ascend.com>
32847
32848         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
32849         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
32850         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
32851
32852 1999-03-19  Jim Meyering  <meyering@ascend.com>
32853
32854         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
32855
32856 1999-03-12  Jim Meyering  <meyering@ascend.com>
32857
32858         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
32859
32860 1999-03-07  Jim Meyering  <meyering@ascend.com>
32861
32862         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
32863         declared.
32864
32865 1999-02-17  Jim Meyering  <meyering@ascend.com>
32866
32867         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
32868         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
32869
32870 1999-02-07  Jim Meyering  <meyering@ascend.com>
32871
32872         * m4/group-member.m4: New file -- extracted from sh-utils'
32873         configure.in.
32874
32875         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
32876         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
32877
32878 1999-02-06  Jim Meyering  <meyering@ascend.com>
32879
32880         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
32881         * m4/fnmatch.m4: Likewise.
32882         * m4/getgroups.m4: Likewise.
32883         * m4/lstat.m4: Likewise.
32884         * m4/malloc.m4: Likewise.
32885         * m4/putenv.m4: Likewise.
32886         * m4/realloc.m4: Likewise.
32887         * m4/regex.m4: Likewise.
32888         * m4/stat.m4: Likewise.
32889         * m4/strftime.m4: Likewise.
32890         Suggestion from Alain Magloire.
32891
32892         * m4/chown.m4: Use `.$ac_objext', not `.o'.
32893         * m4/fnmatch.m4: Likewise.
32894         * m4/getgroups.m4: Likewise.
32895         * m4/getline.m4: Likewise.
32896         * m4/lstat.m4: Likewise.
32897         * m4/malloc.m4: Likewise.
32898         * m4/memcmp.m4: Likewise.
32899         * m4/putenv.m4: Likewise.
32900         * m4/realloc.m4: Likewise.
32901         * m4/regex.m4: Likewise.
32902         * m4/stat.m4: Likewise.
32903         * m4/strftime.m4: Likewise.
32904         Suggestion from Alain Magloire.
32905
32906         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
32907         an argument.
32908
32909         * m4/regex.m4: Add a run-time Test for proper operation of
32910         re_compile_pattern.
32911
32912 1999-01-31  Jim Meyering  <meyering@ascend.com>
32913
32914         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
32915
32916 1999-01-30  Jim Meyering  <meyering@ascend.com>
32917
32918         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
32919
32920         * m4/jm-mktime.m4: Make this a wrapper around the official
32921         AM_FUNC_MKTIME rather than my private copy, now that the official one
32922         is up to date.
32923         * m4/mktime.m4: Remove file.
32924
32925         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
32926         * m4/uptime.m4: Likewise.
32927         * m4/uintmax_t.m4: Likewise.
32928
32929 1999-01-28  Jim Meyering  <meyering@ascend.com>
32930
32931         * m4/jm-macros.m4: Use jm_AFS.
32932         * m4/afs.m4: New file (from fileutils' configure.in).
32933
32934         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
32935         * m4/chown.m4: Likewise.
32936         * m4/d-ino.m4: Likewise.
32937         * m4/d-type.m4: Likewise.
32938         * m4/fnmatch.m4: Likewise.
32939         * m4/getgroups.m4: Likewise.
32940         * m4/gettext.m4: Likewise.
32941         * m4/jm-mktime.m4: Likewise.
32942         * m4/jm-winsz2.m4: Likewise.
32943         * m4/lcmessage.m4: Likewise.
32944         * m4/ls-mntd-fs.m4: Likewise.
32945         * m4/malloc.m4: Likewise.
32946         * m4/memcmp.m4: Likewise.
32947         * m4/putenv.m4: Likewise.
32948         * m4/realloc.m4: Likewise.
32949         * m4/st_mtim.m4: Likewise.
32950         * m4/strftime.m4: Likewise.
32951
32952 1999-01-16  Jim Meyering  <meyering@ascend.com>
32953
32954         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
32955         (ARGMATCH_DIE_DECL): Define.
32956
32957 1999-01-12  Jim Meyering  <meyering@ascend.com>
32958
32959         * m4/Makefile.am.in: Rewrite to avoid using fmt.
32960         Reported by Lars Hecking.
32961
32962 1999-01-10  Jim Meyering  <meyering@ascend.com>
32963
32964         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
32965         gross kludge.
32966         * m4/inttypes_h.m4: Likewise.
32967         * m4/lstat.m4: Likewise.
32968         * m4/malloc.m4: Likewise.
32969         * m4/readdir.m4: Likewise.
32970         * m4/realloc.m4: Likewise.
32971         * m4/st_dm_mode.m4: Likewise.
32972         * m4/stat.m4: Likewise.
32973         * m4/utimbuf.m4: Likewise.
32974         * m4/utimes.m4: Likewise.
32975
32976         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
32977         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
32978         comments in config.h.in are meaningful.
32979
32980         * m4/jm-macros.m4: Require autoconf-2.13 here.
32981
32982         * m4/regex.m4: By default, don't use the included regex.c on systems
32983         with glibc 2.  Suggestion from Uli Drepper.
32984
32985 1999-01-02  Jim Meyering  <meyering@ascend.com>
32986
32987         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
32988
32989 1998-12-18  Jim Meyering  <meyering@ascend.com>
32990
32991         * m4/Makefile.am.in (Makefile.am): Simplify rule.
32992         Based on a suggestion from Lars Hecking.
32993
32994 1998-11-16  Paul Eggert  <eggert@twinsun.com>
32995
32996         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
32997
32998 1998-11-16  Jim Meyering  <meyering@ascend.com>
32999
33000         * m4/lfs.m4: Double-quote the `uname...` expression.
33001
33002 1998-11-14  Jim Meyering  <meyering@ascend.com>
33003
33004         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
33005         * m4/stat.m4: Likewise.
33006
33007 1998-11-03  Jim Meyering  <meyering@ascend.com>
33008
33009         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
33010         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
33011
33012 1998-10-18  Jim Meyering  <meyering@ascend.com>
33013
33014         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
33015
33016 1998-10-17  Jim Meyering  <meyering@ascend.com>
33017
33018         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
33019         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
33020         calls for those previously hard-coded headers.  Instead, take a new
33021         parameter.
33022         (jm_CHECK_DECLARATIONS): Reflect interface change.
33023         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
33024         (jm_CHECK_DECL_LOCALTIME_R): New macro.
33025
33026         * m4/mktime.m4: Test for spring-forward gap before long-running test.
33027
33028 1998-10-14  Jim Meyering  <meyering@ascend.com>
33029
33030         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
33031         instead of "TZ=America/Vancouver".  From Paul Eggert.
33032
33033 1998-10-11  Jim Meyering  <meyering@ascend.com>
33034
33035         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
33036         This adds a test for a recently added compatibility fix for mktime.c.
33037         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
33038
33039 1998-09-27  Jim Meyering  <meyering@ascend.com>
33040
33041         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
33042
33043         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
33044         ../configure.in, including a change from Gordon Matzigkeit to allow
33045         cross-compiling for the Hurd.
33046
33047         * m4/glibc.m4: New file/macro to test for the GNU C Library
33048         versions 1 and 2.  From Gordon Matzigkeit.
33049         Indent.
33050
33051 1998-09-21  Jim Meyering  <meyering@ascend.com>
33052
33053         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
33054
33055 1998-08-18  Paul Eggert  <eggert@twinsun.com>
33056
33057         Port nanosecond-resolution times to UnixWare 2.1.2 and
33058         pedantic Solaris 2.6.
33059
33060         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
33061         AC_STRUCT_ST_MTIM.
33062         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
33063         Generate name of ns member, instead of just 1 or undef.
33064         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
33065
33066 1998-08-15  Jim Meyering  <meyering@ascend.com>
33067
33068         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
33069         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
33070         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
33071         instead of jm_TYPE_SSIZE_T.
33072
33073 1998-08-12  Jim Meyering  <meyering@ascend.com>
33074
33075         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
33076
33077 1998-08-02  Jim Meyering  <meyering@ascend.com>
33078
33079         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
33080         in acconfig.h manually.
33081
33082 1998-07-31  Paul Eggert  <eggert@twinsun.com>
33083
33084         * m4/st_mtim.m4: New file.
33085
33086 1998-07-28  Jim Meyering  <meyering@ascend.com>
33087
33088         * m4/utimes.m4: Undef stat.
33089
33090 1998-07-25  Jim Meyering  <meyering@ascend.com>
33091
33092         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
33093         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
33094
33095 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
33096
33097         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
33098         uid and gid actually remain unchanged.
33099
33100 1998-07-07  Jim Meyering  <meyering@ascend.com>
33101
33102         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
33103
33104 1998-07-04  Jim Meyering  <meyering@ascend.com>
33105
33106         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
33107         to prove that this macro can be used in packages without regex.c.
33108
33109 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
33110
33111         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
33112         is to be used.
33113
33114 1998-07-03  Jim Meyering  <meyering@ascend.com>
33115
33116         * m4/gettext.m4: Add -lintl if it's found to be necessary.
33117
33118         * m4/gettext.m4: New file -- from gettext-0.10.35.
33119         * m4/lcmessage.m4: Likewise.
33120         * m4/progtest.m4: Likewise.
33121
33122         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
33123         * m4/jm-macros.m4: Require the new macro.
33124
33125 1998-06-29  Jim Meyering  <meyering@ascend.com>
33126
33127         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
33128         for the definition of NGROUPS (used in a system header included
33129         by sys/mount.h).
33130
33131 1998-06-28  Jim Meyering  <meyering@ascend.com>
33132
33133         * m4/ls-mntd-fs.m4: New file.
33134         * m4/fstypename.m4: New file.
33135
33136         * m4/jm-macros.m4: Require the new macro.
33137         * m4/jm-glibc-io.m4: New file.
33138
33139 1998-05-19  Jim Meyering  <meyering@ascend.com>
33140
33141         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
33142         * m4/lchown.m4: New file.
33143
33144         * m4/Makefile.am.in: New file.
33145         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
33146
33147 1998-05-14  Jim Meyering  <meyering@ascend.com>
33148
33149         * m4/Makefile.am (EXTRA_DIST): Add them.
33150         * m4/jm-macros.m4: New file.
33151         * m4/utimbuf.m4: New file.
33152
33153 1998-05-12  Jim Meyering  <meyering@ascend.com>
33154
33155         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
33156
33157 1998-05-11  Jim Meyering  <meyering@ascend.com>
33158
33159         * m4/isc-posix.m4: New file.
33160
33161 1998-05-10  Jim Meyering  <meyering@ascend.com>
33162
33163         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
33164
33165 1998-05-09  Jim Meyering  <meyering@ascend.com>
33166
33167         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
33168         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
33169         with automake.
33170
33171         * m4/ssize_t.m4: New file.
33172         * m4/mktime.m4: Remove file -- the new automake has this now.
33173
33174 1998-04-26  Jim Meyering  <meyering@ascend.com>
33175
33176         * m4/assert.m4: New file.
33177         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
33178
33179 1998-04-05  Jim Meyering  <meyering@ascend.com>
33180
33181         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
33182         (jm_PREREQ): Use it here.
33183
33184 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
33185
33186         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
33187         in acconfig.h.
33188
33189 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
33190
33191         * m4/prereq.m4: New file.
33192         * m4/error.m4: New file.
33193         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
33194
33195 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
33196
33197         * m4/getline.m4: Don't set am_cv_func_working_getline before the
33198         cache-check for the same variable -- that defeated the purpose of
33199         the test; the test program was never run.  This was a problem only
33200         on systems with losing getline functions -- HP-UX 10.20 is one.
33201         Reported by Bjorn Helgaas.
33202
33203 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
33204
33205         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
33206
33207 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
33208
33209         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
33210
33211         * m4/const.m4: New file.  Use an initializer in this declaration
33212         typedef int charset[2]; const charset x;
33213         Reported by Bob Glickstein.
33214
33215 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
33216
33217         * m4/chown.m4: Fix reversed types on -1 args to chown.
33218         From Kaveh Ghazi.
33219
33220 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
33221
33222         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
33223         Add lseek and memchr.
33224
33225         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
33226         T.E.Dickey <dickey@clark.net> said that some older preprocessors
33227         have a 20-character limit on names.
33228
33229 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
33230
33231         * m4/inttypes_h.m4: New file.
33232         * m4/uintmax_t.m4: New file.
33233         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
33234
33235 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
33236   Free Software Foundation, Inc.
33237 Copying and distribution of this file, with or without modification,
33238 are permitted provided the copyright notice and this notice are preserved.